neerajkalyank commited on
Commit
31ade35
1 Parent(s): 75f239a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +124 -109
app.py CHANGED
@@ -76,19 +76,20 @@ def billing_interface(patient_id):
76
 
77
  # Custom CSS styling
78
  custom_css = """
79
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
80
 
81
- /* General Page Style */
82
  * {
83
  margin: 0;
84
  padding: 0;
85
  box-sizing: border-box;
86
  }
87
 
 
88
  body {
89
- font-family: 'Inter', Arial, sans-serif;
90
- background: linear-gradient(135deg, #edf2f7, #cfd8e3);
91
- color: #333333;
92
  display: flex;
93
  justify-content: center;
94
  align-items: center;
@@ -96,88 +97,80 @@ body {
96
  }
97
 
98
  /* Main Container */
99
- .gradio-container {
100
- max-width: 900px;
101
  width: 100%;
102
- margin: 40px auto;
103
  padding: 40px;
104
- background-color: #ffffff;
105
- border-radius: 16px;
106
- border: 1px solid #e2e8f0;
107
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
108
- transition: box-shadow 0.3s ease, transform 0.3s ease;
109
  }
110
- .gradio-container:hover {
111
- transform: translateY(-5px);
112
- box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
113
  }
114
 
115
  /* Header Styling */
116
  #header {
117
- color: #1a202c;
118
  text-align: center;
119
  font-weight: 700;
120
- font-size: 2.6em;
121
- margin-bottom: 25px;
122
- letter-spacing: 0.7px;
123
  text-transform: uppercase;
124
  }
125
 
126
- /* Headings */
127
- h1, h2, h3, h4, h5, h6 {
128
- color: #1a202c;
129
- font-weight: 600;
130
- }
131
-
132
  /* Form Field Styles */
133
- input, select, textarea {
134
  width: 100%;
135
- border: 1px solid #cbd5e0;
136
- border-radius: 12px;
137
  padding: 14px;
138
- font-size: 15px;
139
- color: #2d3748;
140
- background: #f7fafc;
141
  margin-bottom: 20px;
142
- transition: all 0.3s ease;
143
  }
144
  input:focus, select:focus, textarea:focus {
145
- border-color: #3182ce;
146
- background: #e3f2fd;
147
- box-shadow: 0 4px 8px rgba(49, 130, 206, 0.2);
148
  outline: none;
149
  }
150
 
151
  /* Button Styles */
152
  button {
153
  display: inline-block;
154
- padding: 14px 28px;
155
- font-size: 1em;
156
  font-weight: 600;
 
 
157
  border: none;
158
  border-radius: 8px;
159
- color: #ffffff;
160
- background-color: #3182ce;
161
  cursor: pointer;
162
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
163
- box-shadow: 0 5px 15px rgba(49, 130, 206, 0.2);
164
  }
165
  button:hover {
166
- background-color: #2c5282;
167
- transform: translateY(-3px);
168
- box-shadow: 0 8px 24px rgba(44, 82, 130, 0.3);
169
  }
170
  button:active {
171
- transform: translateY(2px);
172
  }
173
 
174
- /* Toggle Switch (Checkbox Alternative) */
175
  .toggle-switch {
176
  position: relative;
 
 
177
  display: inline-block;
178
- width: 55px;
179
- height: 30px;
180
- margin: 10px;
181
  }
182
  .toggle-switch input {
183
  opacity: 0;
@@ -191,101 +184,123 @@ button:active {
191
  left: 0;
192
  right: 0;
193
  bottom: 0;
194
- background-color: #cbd5e0;
195
  transition: 0.4s;
196
  border-radius: 34px;
197
  }
198
  .toggle-slider:before {
199
  position: absolute;
200
  content: "";
201
- height: 24px;
202
- width: 24px;
203
- left: 3px;
204
- bottom: 3px;
205
- background-color: #ffffff;
206
  transition: 0.4s;
207
  border-radius: 50%;
208
  }
209
  input:checked + .toggle-slider {
210
- background-color: #3182ce;
211
  }
212
  input:checked + .toggle-slider:before {
213
- transform: translateX(25px);
214
  }
215
 
216
- /* Radio Button Group */
217
- .gr-radio-group label {
218
- display: inline-flex;
219
  align-items: center;
220
- padding: 12px 18px;
221
- border: 1px solid #cbd5e0;
222
- border-radius: 10px;
223
- color: #2d3748;
224
- background: #f7fafc;
225
- margin-right: 12px;
226
- transition: background-color 0.3s, color 0.3s, border-color 0.3s;
227
  cursor: pointer;
228
  }
229
- .gr-radio-group label:hover {
230
- background-color: #e3f2fd;
231
- border-color: #3182ce;
232
- color: #2c5282;
233
  }
234
- .gr-radio-group input[type="radio"] {
235
- appearance: none;
236
  width: 20px;
237
  height: 20px;
238
- margin-right: 10px;
239
- border: 2px solid #3182ce;
240
- border-radius: 50%;
241
- transition: background-color 0.3s, border-color 0.3s;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  }
243
- .gr-radio-group input[type="radio"]:checked {
244
- background-color: #3182ce;
245
- border-color: #3182ce;
 
 
 
 
246
  }
247
 
248
  /* Tabs */
249
- .nav-tabs {
250
  display: flex;
251
  justify-content: space-around;
252
- background-color: #ffffff;
253
- padding: 15px;
254
- border-bottom: 2px solid #cbd5e0;
255
- border-radius: 10px;
256
  margin-bottom: 25px;
 
257
  }
258
- .nav-tabs .nav-item {
259
- font-size: 1.2em;
260
  font-weight: 500;
261
- color: #2d3748;
262
- padding: 12px 25px;
263
- border: 2px solid transparent;
264
- border-radius: 8px;
265
  cursor: pointer;
266
- transition: color 0.3s, background-color 0.3s, border-color 0.3s;
267
  }
268
- .nav-tabs .nav-item:hover, .nav-tabs .nav-item.active {
269
- color: #3182ce;
270
- background-color: #e3f2fd;
271
- border-color: #3182ce;
272
  }
273
 
274
- /* Output Text Styling */
275
- #registration_output, #test_output, #billing_output {
276
- color: #2d3748;
277
- background-color: #f0f7ff;
278
- padding: 20px;
279
- border-radius: 10px;
280
- font-weight: 600;
281
- text-align: left;
282
- border: 1px solid #cbd5e0;
283
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
284
- transition: background-color 0.3s ease, border-color 0.3s ease;
285
  }
286
- #registration_output:hover, #test_output:hover, #billing_output:hover {
287
- background-color: #e3f2fd;
288
- border-color: #3182ce;
289
  }
290
 
291
  """
 
76
 
77
  # Custom CSS styling
78
  custom_css = """
79
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
80
 
81
+ /* Reset */
82
  * {
83
  margin: 0;
84
  padding: 0;
85
  box-sizing: border-box;
86
  }
87
 
88
+ /* General Page Style */
89
  body {
90
+ font-family: 'Roboto', sans-serif;
91
+ background: #f4f7f9;
92
+ color: #333;
93
  display: flex;
94
  justify-content: center;
95
  align-items: center;
 
97
  }
98
 
99
  /* Main Container */
100
+ .container {
101
+ max-width: 800px;
102
  width: 100%;
103
+ margin: 30px auto;
104
  padding: 40px;
105
+ background-color: #fff;
106
+ border-radius: 12px;
107
+ border: 1px solid #e3e8ec;
108
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
109
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
110
  }
111
+ .container:hover {
112
+ transform: scale(1.01);
113
+ box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
114
  }
115
 
116
  /* Header Styling */
117
  #header {
118
+ color: #1c3f60;
119
  text-align: center;
120
  font-weight: 700;
121
+ font-size: 2.5em;
122
+ margin-bottom: 30px;
123
+ letter-spacing: 0.6px;
124
  text-transform: uppercase;
125
  }
126
 
 
 
 
 
 
 
127
  /* Form Field Styles */
128
+ input[type="text"], input[type="email"], select, textarea {
129
  width: 100%;
130
+ border: 1px solid #d1d9e0;
131
+ border-radius: 8px;
132
  padding: 14px;
133
+ font-size: 16px;
134
+ color: #495057;
135
+ background: #f9fbfc;
136
  margin-bottom: 20px;
137
+ transition: border-color 0.3s ease, box-shadow 0.3s ease;
138
  }
139
  input:focus, select:focus, textarea:focus {
140
+ border-color: #1c7ed6;
141
+ box-shadow: 0 4px 12px rgba(28, 126, 214, 0.2);
 
142
  outline: none;
143
  }
144
 
145
  /* Button Styles */
146
  button {
147
  display: inline-block;
148
+ padding: 12px 24px;
149
+ font-size: 16px;
150
  font-weight: 600;
151
+ color: #ffffff;
152
+ background-color: #1c7ed6;
153
  border: none;
154
  border-radius: 8px;
 
 
155
  cursor: pointer;
156
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
157
+ box-shadow: 0 5px 15px rgba(28, 126, 214, 0.3);
158
  }
159
  button:hover {
160
+ background-color: #155a9a;
161
+ transform: translateY(-2px);
162
+ box-shadow: 0 8px 24px rgba(21, 90, 154, 0.3);
163
  }
164
  button:active {
165
+ transform: translateY(1px);
166
  }
167
 
168
+ /* Toggle Switch */
169
  .toggle-switch {
170
  position: relative;
171
+ width: 60px;
172
+ height: 34px;
173
  display: inline-block;
 
 
 
174
  }
175
  .toggle-switch input {
176
  opacity: 0;
 
184
  left: 0;
185
  right: 0;
186
  bottom: 0;
187
+ background-color: #cfd8e3;
188
  transition: 0.4s;
189
  border-radius: 34px;
190
  }
191
  .toggle-slider:before {
192
  position: absolute;
193
  content: "";
194
+ height: 26px;
195
+ width: 26px;
196
+ left: 4px;
197
+ bottom: 4px;
198
+ background-color: white;
199
  transition: 0.4s;
200
  border-radius: 50%;
201
  }
202
  input:checked + .toggle-slider {
203
+ background-color: #1c7ed6;
204
  }
205
  input:checked + .toggle-slider:before {
206
+ transform: translateX(26px);
207
  }
208
 
209
+ /* Checkbox Styles */
210
+ .checkbox-container {
211
+ display: flex;
212
  align-items: center;
213
+ margin-bottom: 20px;
 
 
 
 
 
 
214
  cursor: pointer;
215
  }
216
+ .checkbox-container input[type="checkbox"] {
217
+ opacity: 0;
218
+ position: absolute;
 
219
  }
220
+ .custom-checkbox {
 
221
  width: 20px;
222
  height: 20px;
223
+ background-color: #cfd8e3;
224
+ border-radius: 4px;
225
+ transition: background-color 0.3s;
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ }
230
+ .checkbox-container input[type="checkbox"]:checked + .custom-checkbox {
231
+ background-color: #1c7ed6;
232
+ }
233
+ .checkbox-container input[type="checkbox"]:checked + .custom-checkbox::after {
234
+ content: "✓";
235
+ color: white;
236
+ font-size: 14px;
237
+ }
238
+
239
+ /* Radio Button Group */
240
+ .radio-group {
241
+ display: flex;
242
+ gap: 12px;
243
+ margin-bottom: 20px;
244
+ }
245
+ .radio-group label {
246
+ display: flex;
247
+ align-items: center;
248
+ padding: 10px 20px;
249
+ border: 1px solid #d1d9e0;
250
+ border-radius: 8px;
251
+ font-size: 16px;
252
+ color: #333;
253
+ background-color: #f9fbfc;
254
+ cursor: pointer;
255
+ transition: border-color 0.3s, background-color 0.3s;
256
  }
257
+ .radio-group input[type="radio"] {
258
+ display: none;
259
+ }
260
+ .radio-group input[type="radio"]:checked + label {
261
+ background-color: #e9f2fd;
262
+ border-color: #1c7ed6;
263
+ color: #1c7ed6;
264
  }
265
 
266
  /* Tabs */
267
+ .tabs {
268
  display: flex;
269
  justify-content: space-around;
270
+ background-color: #f4f7f9;
271
+ padding: 10px;
272
+ border-bottom: 2px solid #e3e8ec;
 
273
  margin-bottom: 25px;
274
+ border-radius: 8px;
275
  }
276
+ .tabs .tab-item {
277
+ font-size: 1.1em;
278
  font-weight: 500;
279
+ color: #6c757d;
280
+ padding: 10px 20px;
281
+ border-radius: 6px;
 
282
  cursor: pointer;
283
+ transition: color 0.3s, background-color 0.3s;
284
  }
285
+ .tabs .tab-item:hover, .tabs .tab-item.active {
286
+ color: #1c7ed6;
287
+ background-color: #e9f2fd;
 
288
  }
289
 
290
+ /* Output Section */
291
+ .output-box {
292
+ padding: 18px;
293
+ background-color: #f4f7f9;
294
+ border: 1px solid #e3e8ec;
295
+ border-radius: 8px;
296
+ color: #333;
297
+ font-weight: 500;
298
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
299
+ transition: background-color 0.3s, border-color 0.3s;
 
300
  }
301
+ .output-box:hover {
302
+ background-color: #edf2f7;
303
+ border-color: #1c7ed6;
304
  }
305
 
306
  """