Nischal Subedi commited on
Commit
ca185b4
·
1 Parent(s): 29ad528
Files changed (1) hide show
  1. app.py +92 -90
app.py CHANGED
@@ -35,7 +35,7 @@ logging.basicConfig(
35
  format='%(asctime)s - %(levelname)s - [%(filename)s:%(lineno)d] - %(message)s'
36
  )
37
 
38
- # --- RAGSystem Class (Processing Logic - KEPT INTACT AS REQUESTED) ---
39
  class RAGSystem:
40
  def __init__(self, vector_db: Optional[VectorDatabase] = None):
41
  logging.info("Initializing RAGSystem")
@@ -239,7 +239,7 @@ Answer:"""
239
  logging.error(f"Failed to load or process PDF '{pdf_path}': {str(e)}", exc_info=True)
240
  raise RuntimeError(f"Failed to process PDF '{pdf_path}': {e}") from e
241
 
242
- # --- GRADIO INTERFACE (NEW UI DESIGN BASED ON VERBAL REQUIREMENTS) ---
243
  def gradio_interface(self):
244
  def query_interface_wrapper(api_key: str, query: str, state: str) -> str:
245
  if not api_key or not api_key.strip() or not api_key.startswith("sk-"):
@@ -255,7 +255,6 @@ Answer:"""
255
  if "<div class='error-message'>" in answer:
256
  return answer
257
  else:
258
- # Use Markdown.format to correctly render markdown inside the HTML output
259
  formatted_response_content = gr.Markdown.format(
260
  f"<div class='response-header'><span class='response-icon'>📜</span>Response for {state}</div><hr class='divider'>{answer}"
261
  )
@@ -286,46 +285,44 @@ Answer:"""
286
  example_queries.append(["What basic rights do tenants have?", "California"])
287
 
288
 
289
- # Custom CSS for the light theme with clear boxes and dynamic effects
290
  custom_css = """
291
  /* Import legible fonts from Google Fonts */
292
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');
293
 
294
  /* Root variables for consistent theming */
295
  :root {
296
- --primary-color: hsl(28, 90%, 50%); /* Vibrant Orange for primary action/highlights */
297
- --primary-hover: hsl(28, 90%, 45%);
298
- --accent-orange: hsl(28, 90%, 55%); /* Slightly brighter orange for specific text */
299
- --accent-blue: hsl(200, 70%, 35%); /* Deep Blue for main title/section headers */
300
- --accent-blue-light: hsl(200, 70%, 90%); /* Light blue for header background tint */
301
 
302
- --background-app: hsl(0, 0%, 98%); /* Very light, off-white for overall background */
303
- --background-header-start: hsl(40, 90%, 95%); /* Light yellow for header gradient start */
304
- --background-header-end: hsl(28, 90%, 95%); /* Light orange for header gradient end */
305
  --background-card: hsl(0, 0%, 100%); /* Pure white for content cards */
306
- --background-input-output: hsl(0, 0%, 100%); /* Pure white for input/output elements */
307
 
308
  --text-dark: hsl(210, 20%, 20%); /* Dark charcoal for primary text */
309
- --text-light: hsl(210, 10%, 30%); /* Slightly lighter dark for general text on white cards */
310
- --text-muted: hsl(210, 10%, 45%); /* Muted gray for secondary info/placeholders */
311
 
312
- --border-card: hsl(210, 10%, 85%); /* Light gray border for cards */
313
- --border-input: hsl(210, 10%, 75%); /* Slightly darker gray for input borders */
314
- --border-focus: var(--primary-color); /* Primary color for focus borders */
315
 
316
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
317
  --shadow-md: 0 4px 10px rgba(0,0,0,0.15);
318
- --shadow-lg: 0 10px 20px rgba(0,0,0,0.25);
319
 
320
  --error-bg: hsl(0, 80%, 95%);
321
  --error-border: hsl(0, 70%, 80%);
322
  --error-text: hsl(0, 70%, 40%);
323
 
324
- --button-secondary-bg: hsl(210, 10%, 92%); /* Light gray for secondary button */
325
- --button-secondary-text: hsl(210, 20%, 30%); /* Dark text for secondary button */
326
  }
327
 
328
- /* Body and Gradio Container */
329
  body {
330
  background-color: var(--background-app) !important;
331
  }
@@ -334,23 +331,23 @@ Answer:"""
334
  margin: 0 auto !important;
335
  padding: 1.5rem !important;
336
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
337
- background-color: var(--background-app) !important; /* Overall background */
338
- box-shadow: none !important; /* Remove outer shadow */
339
  border-radius: 16px !important;
340
  }
341
 
342
- /* Header Styling (title box) - distinct background */
343
  .app-header-wrapper {
344
- background: linear-gradient(135deg, var(--background-header-start) 0%, var(--background-header-end) 100%) !important; /* Gradient from light yellow to light orange */
345
- border: 2px solid var(--border-card) !important; /* Consistent border with cards */
346
  border-radius: 16px !important;
347
  padding: 2.5rem 1.5rem !important;
348
  margin-bottom: 1.5rem !important;
349
- text-align: center !important; /* Centered */
350
  box-shadow: var(--shadow-md) !important;
351
  position: relative;
352
  overflow: hidden;
353
- color: var(--text-dark) !important; /* Dark text on light header */
354
  }
355
  .app-header-wrapper::before { /* Subtle background pattern */
356
  content: '';
@@ -359,17 +356,17 @@ Answer:"""
359
  left: 0;
360
  width: 100%;
361
  height: 100%;
362
- background: radial-gradient(circle at top left, rgba(255,165,0,0.05) 0%, transparent 40%),
363
- radial-gradient(circle at bottom right, rgba(255,165,0,0.05) 0%, transparent 40%);
364
  z-index: 0;
365
  opacity: 0.8;
366
  pointer-events: none;
367
  }
368
  .app-header-logo {
369
- font-size: 4.5rem !important; /* Larger icon */
370
  margin-bottom: 0.75rem !important;
371
  display: block !important;
372
- color: var(--accent-blue) !important; /* Deep blue for icon */
373
  position: relative;
374
  z-index: 1;
375
  animation: float-icon 3s ease-in-out infinite alternate;
@@ -382,8 +379,8 @@ Answer:"""
382
  .app-header-title {
383
  font-family: 'Poppins', sans-serif !important;
384
  font-size: 3rem !important;
385
- font-weight: 800 !important; /* Bold */
386
- color: var(--accent-blue) !important; /* Deep blue for title */
387
  margin: 0 0 0.75rem 0 !important;
388
  line-height: 1.1 !important;
389
  letter-spacing: -0.03em !important;
@@ -392,7 +389,7 @@ Answer:"""
392
  }
393
  .app-header-tagline {
394
  font-size: 1.25rem !important;
395
- color: var(--text-light) !important; /* Muted text for tagline */
396
  font-weight: 400 !important;
397
  margin: 0 !important;
398
  max-width: 700px;
@@ -402,7 +399,7 @@ Answer:"""
402
  z-index: 1;
403
  }
404
 
405
- /* Main Dashboard Container & Card Sections */
406
  .main-dashboard-container {
407
  display: flex !important;
408
  flex-direction: column !important;
@@ -410,74 +407,78 @@ Answer:"""
410
  }
411
  .dashboard-card-section {
412
  background: var(--background-card) !important; /* Pure white for content cards */
413
- border: 2px solid var(--border-card) !important; /* Clear light gray border */
414
  border-radius: 12px !important;
415
  padding: 1.75rem !important;
416
  box-shadow: var(--shadow-sm) !important;
417
  transition: all 0.3s ease-out !important;
418
  cursor: default;
419
- color: var(--text-light) !important; /* Dark text on white cards */
420
  }
421
  .dashboard-card-section:hover {
422
  box-shadow: var(--shadow-md) !important;
423
- transform: translateY(-5px) !important; /* More pronounced lift */
424
  }
425
 
426
- /* Section Titles (e.g., "Welcome & Disclaimer") - now centered and bold */
427
  .sub-section-title {
428
  font-family: 'Poppins', sans-serif !important;
429
  font-size: 1.7rem !important;
430
- font-weight: 700 !important; /* Bold */
431
- color: var(--accent-blue) !important; /* Deep blue for titles */
432
- text-align: center !important; /* CENTERED */
433
  margin: 0 0 1.25rem 0 !important;
434
  padding-bottom: 0.75rem !important;
435
- border-bottom: 2px solid var(--accent-blue) !important; /* Consistent blue line */
436
  display: block !important;
437
  letter-spacing: -0.01em !important;
438
  }
439
  .dashboard-card-section p {
440
  line-height: 1.7 !important;
441
- color: var(--text-light) !important; /* General text on white cards */
442
  font-size: 1rem !important;
443
  }
444
  .dashboard-card-section strong {
445
- color: var(--accent-orange) !important; /* Orange for specific strong text (e.g., Disclaimer) */
 
 
 
 
446
  }
447
 
448
- /* Input Styling (textboxes, dropdowns) - pure white backgrounds */
449
  .gradio-textbox textarea,
450
  .gradio-textbox input,
451
  .gradio-dropdown > div > input[type="text"],
452
  .gradio-dropdown .primary-wrap,
453
  .gradio-dropdown .scroll-hide {
454
- background: var(--background-input-output) !important; /* Pure white background for inputs */
455
- border: 2px solid var(--border-input) !important; /* Light gray border for inputs */
456
  border-radius: 8px !important;
457
  padding: 0.85rem 1rem !important;
458
  font-size: 0.98rem !important;
459
  font-family: 'Inter', sans-serif !important;
460
- color: var(--text-dark) !important; /* Dark text for inputs */
461
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
462
  box-shadow: var(--shadow-sm) !important;
463
  }
464
  .gradio-textbox textarea::placeholder,
465
  .gradio-textbox input::placeholder {
466
- color: var(--text-muted) !important; /* Muted gray placeholder text */
467
- opacity: 0.7;
468
  }
469
  .gradio-textbox textarea:focus,
470
  .gradio-textbox input:focus,
471
  .gradio-dropdown > div > input[type="text"]:focus,
472
  .gradio-dropdown .primary-wrap.focused {
473
  outline: none !important;
474
- border-color: var(--border-focus) !important; /* Orange border on focus */
475
- box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2) !important; /* Orange glow on focus */
476
  }
477
  .gradio-textbox label,
478
  .gradio-dropdown label {
479
  font-weight: 600 !important;
480
- color: var(--text-light) !important; /* Labels on white cards */
481
  font-size: 1rem !important;
482
  margin-bottom: 0.6rem !important;
483
  display: block !important;
@@ -485,7 +486,7 @@ Answer:"""
485
  .gradio-textbox .gr-form,
486
  .gradio-dropdown .gr-form {
487
  font-size: 0.9rem !important;
488
- color: var(--text-muted) !important; /* Info text on white cards */
489
  margin-top: 0.4rem !important;
490
  }
491
  .input-row {
@@ -515,7 +516,7 @@ Answer:"""
515
  text-align: center !important;
516
  }
517
  .gr-button-primary {
518
- background: var(--primary-color) !important; /* Orange button */
519
  color: white !important;
520
  box-shadow: var(--shadow-sm) !important;
521
  }
@@ -525,32 +526,32 @@ Answer:"""
525
  transform: translateY(-2px) !important;
526
  }
527
  .gr-button-primary:active {
528
- transform: translateY(1px) !important; /* Press effect */
529
  box-shadow: none !important;
530
  }
531
  .gr-button-secondary {
532
  background: var(--button-secondary-bg) !important; /* Light gray button */
533
- color: var(--button-secondary-text) !important; /* Dark text */
534
- border-color: var(--border-input) !important; /* Border matches input fields */
535
  }
536
  .gr-button-secondary:hover {
537
- background: hsl(210, 10%, 85%) !important; /* Darker gray on hover */
538
- border-color: var(--primary-color) !important; /* Orange border on hover */
539
  transform: translateY(-2px) !important;
540
  }
541
  .gr-button-secondary:active {
542
- transform: translateY(1px) !important; /* Press effect */
543
  box-shadow: none !important;
544
  }
545
 
546
- /* Output Styling - pure white background */
547
  .output-content-wrapper {
548
- background: var(--background-input-output) !important; /* Pure white background for output box */
549
- border: 2px dashed var(--border-input) !important; /* Dashed gray border */
550
  border-radius: 8px !important;
551
  padding: 1.5rem !important;
552
  min-height: 150px !important;
553
- color: var(--text-dark) !important; /* Dark text for output */
554
  display: flex;
555
  flex-direction: column;
556
  justify-content: center;
@@ -564,7 +565,7 @@ Answer:"""
564
  overflow-wrap: break-word;
565
  word-break: break-word;
566
  text-align: left !important;
567
- color: var(--text-dark) !important; /* Ensure this also overrides to dark text */
568
  }
569
  @keyframes fadeInAndSlideUp {
570
  from { opacity: 0; transform: translateY(15px); }
@@ -573,7 +574,7 @@ Answer:"""
573
  .response-header {
574
  font-size: 1.3rem !important;
575
  font-weight: 700 !important;
576
- color: var(--accent-blue) !important; /* Blue for response header */
577
  margin-bottom: 0.75rem !important;
578
  display: flex !important;
579
  align-items: center !important;
@@ -581,11 +582,11 @@ Answer:"""
581
  }
582
  .response-icon {
583
  font-size: 1.5rem !important;
584
- color: var(--accent-blue) !important;
585
  }
586
  .divider {
587
  border: none !important;
588
- border-top: 1px dashed var(--border-input) !important; /* Dashed light gray divider */
589
  margin: 1rem 0 !important;
590
  }
591
  .error-message {
@@ -620,21 +621,21 @@ Answer:"""
620
  opacity: 0.8;
621
  }
622
  .placeholder {
623
- background: var(--background-input-output) !important; /* Pure white background for placeholder */
624
- border: 2px dashed var(--border-input) !important; /* Dashed light gray border */
625
  border-radius: 8px !important;
626
  padding: 2.5rem 1.5rem !important;
627
  text-align: center !important;
628
- color: var(--text-muted) !important; /* Muted gray text for placeholder */
629
  font-style: italic !important;
630
  font-size: 1.1rem !important;
631
  width: 100%;
632
  box-sizing: border-box;
633
  }
634
 
635
- /* Examples Table Styling - pure white background rows */
636
  .examples-section .gr-samples-table {
637
- border: 2px solid var(--border-card) !important; /* Outer table border matches cards */
638
  border-radius: 8px !important;
639
  overflow: hidden !important;
640
  margin-top: 1rem !important;
@@ -647,20 +648,20 @@ Answer:"""
647
  text-align: left !important;
648
  }
649
  .examples-section .gr-samples-table th {
650
- background: var(--background-card) !important; /* White for example header */
651
  font-weight: 700 !important;
652
- color: var(--accent-blue) !important; /* Blue for header text */
653
  }
654
  .examples-section .gr-samples-table td {
655
- background: var(--background-input-output) !important; /* Pure white for example rows */
656
- color: var(--text-dark) !important; /* Dark text for example rows */
657
- border-top: 1px solid var(--border-input) !important; /* Light gray border between rows */
658
  cursor: pointer !important;
659
  transition: background 0.2s ease, transform 0.1s ease !important;
660
  }
661
  .examples-section .gr-samples-table tr:hover td {
662
  background: hsl(0, 0%, 95%) !important; /* Slightly darker white on hover */
663
- transform: translateX(8px); /* More pronounced slide */
664
  }
665
  .gr-examples .gr-label,
666
  .gr-examples .label-wrap,
@@ -670,29 +671,30 @@ Answer:"""
670
 
671
  /* Footer Styling */
672
  .app-footer-wrapper {
673
- background: var(--background-card) !important; /* White for footer */
674
  border: 2px solid var(--border-card) !important;
675
  border-radius: 12px !important;
676
  padding: 1.75rem !important;
677
  margin-top: 1.5rem !important;
678
  text-align: center !important;
679
- color: var(--text-muted) !important; /* Muted text for footer */
680
  }
681
  .app-footer p {
682
  margin: 0.6rem 0 !important;
683
  font-size: 0.95rem !important;
684
- color: var(--text-muted) !important; /* Muted text */
685
  line-height: 1.6 !important;
686
  }
687
  .app-footer a {
688
- color: var(--primary-color) !important; /* ORANGE highlight for links (same as submit button) */
689
  text-decoration: none !important;
690
  font-weight: 600 !important;
691
- transition: text-decoration 0.2s ease, text-decoration-color 0.2s ease !important;
692
  }
693
  .app-footer a:hover {
694
  text-decoration: underline !important;
695
- text-decoration-color: var(--primary-color) !important; /* Orange underline on hover */
 
696
  }
697
 
698
  /* Responsive Design */
@@ -751,7 +753,7 @@ Answer:"""
751
  """
752
  Navigate landlord-tenant laws with ease. This assistant provides detailed, state-specific answers grounded in legal authority.
753
 
754
- <span style="color: var(--accent-orange);">**Disclaimer:**</span> This tool is for informational purposes only and does not constitute legal advice. For specific legal guidance, always consult a licensed attorney in your jurisdiction.
755
  """
756
  )
757
 
 
35
  format='%(asctime)s - %(levelname)s - [%(filename)s:%(lineno)d] - %(message)s'
36
  )
37
 
38
+ # --- RAGSystem Class (Processing Logic - KEPT INTACT) ---
39
  class RAGSystem:
40
  def __init__(self, vector_db: Optional[VectorDatabase] = None):
41
  logging.info("Initializing RAGSystem")
 
239
  logging.error(f"Failed to load or process PDF '{pdf_path}': {str(e)}", exc_info=True)
240
  raise RuntimeError(f"Failed to process PDF '{pdf_path}': {e}") from e
241
 
242
+ # --- GRADIO INTERFACE (PROFESSIONAL DESIGN) ---
243
  def gradio_interface(self):
244
  def query_interface_wrapper(api_key: str, query: str, state: str) -> str:
245
  if not api_key or not api_key.strip() or not api_key.startswith("sk-"):
 
255
  if "<div class='error-message'>" in answer:
256
  return answer
257
  else:
 
258
  formatted_response_content = gr.Markdown.format(
259
  f"<div class='response-header'><span class='response-icon'>📜</span>Response for {state}</div><hr class='divider'>{answer}"
260
  )
 
285
  example_queries.append(["What basic rights do tenants have?", "California"])
286
 
287
 
288
+ # Custom CSS for a professional, light, dynamic dashboard
289
  custom_css = """
290
  /* Import legible fonts from Google Fonts */
291
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');
292
 
293
  /* Root variables for consistent theming */
294
  :root {
295
+ --primary-color: hsl(210, 70%, 45%); /* Professional deep blue */
296
+ --primary-hover: hsl(210, 70%, 35%);
297
+ --secondary-accent-color: hsl(40, 80%, 55%); /* Warm amber/gold for highlights */
298
+ --secondary-accent-hover: hsl(40, 80%, 45%);
 
299
 
300
+ --background-app: hsl(200, 20%, 96%); /* Very light blue-gray for overall background */
301
+ --background-header: linear-gradient(135deg, hsl(200, 40%, 90%) 0%, hsl(210, 40%, 85%) 100%); /* Light blue gradient for header */
 
302
  --background-card: hsl(0, 0%, 100%); /* Pure white for content cards */
303
+ --background-input: hsl(0, 0%, 100%); /* Pure white for input/output elements */
304
 
305
  --text-dark: hsl(210, 20%, 20%); /* Dark charcoal for primary text */
306
+ --text-muted: hsl(210, 10%, 45%); /* Medium gray for secondary info/placeholders */
307
+ --text-light: hsl(0, 0%, 100%); /* White for text on colored backgrounds */
308
 
309
+ --border-card: hsl(210, 10%, 88%); /* Very light gray border for cards */
310
+ --border-input: hsl(210, 10%, 80%); /* Slightly darker gray for input borders */
311
+ --border-focus: var(--primary-color); /* Primary color for input focus */
312
 
313
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
314
  --shadow-md: 0 4px 10px rgba(0,0,0,0.15);
315
+ --shadow-lg: 0 8px 20px rgba(0,0,0,0.25);
316
 
317
  --error-bg: hsl(0, 80%, 95%);
318
  --error-border: hsl(0, 70%, 80%);
319
  --error-text: hsl(0, 70%, 40%);
320
 
321
+ --button-secondary-bg: hsl(210, 10%, 90%); /* Light gray for secondary button */
322
+ --button-secondary-text: var(--text-dark); /* Dark text for secondary button */
323
  }
324
 
325
+ /* Base container and typography */
326
  body {
327
  background-color: var(--background-app) !important;
328
  }
 
331
  margin: 0 auto !important;
332
  padding: 1.5rem !important;
333
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
334
+ background-color: var(--background-app) !important;
335
+ box-shadow: none !important;
336
  border-radius: 16px !important;
337
  }
338
 
339
+ /* Header Styling (distinct background) */
340
  .app-header-wrapper {
341
+ background: var(--background-header) !important;
342
+ border: 2px solid var(--border-card) !important;
343
  border-radius: 16px !important;
344
  padding: 2.5rem 1.5rem !important;
345
  margin-bottom: 1.5rem !important;
346
+ text-align: center !important;
347
  box-shadow: var(--shadow-md) !important;
348
  position: relative;
349
  overflow: hidden;
350
+ color: var(--text-dark) !important;
351
  }
352
  .app-header-wrapper::before { /* Subtle background pattern */
353
  content: '';
 
356
  left: 0;
357
  width: 100%;
358
  height: 100%;
359
+ background: radial-gradient(circle at top left, hsla(200, 70%, 45%, 0.05) 0%, transparent 40%),
360
+ radial-gradient(circle at bottom right, hsla(200, 70%, 45%, 0.05) 0%, transparent 40%);
361
  z-index: 0;
362
  opacity: 0.8;
363
  pointer-events: none;
364
  }
365
  .app-header-logo {
366
+ font-size: 4.5rem !important;
367
  margin-bottom: 0.75rem !important;
368
  display: block !important;
369
+ color: var(--primary-color) !important;
370
  position: relative;
371
  z-index: 1;
372
  animation: float-icon 3s ease-in-out infinite alternate;
 
379
  .app-header-title {
380
  font-family: 'Poppins', sans-serif !important;
381
  font-size: 3rem !important;
382
+ font-weight: 800 !important;
383
+ color: var(--primary-color) !important;
384
  margin: 0 0 0.75rem 0 !important;
385
  line-height: 1.1 !important;
386
  letter-spacing: -0.03em !important;
 
389
  }
390
  .app-header-tagline {
391
  font-size: 1.25rem !important;
392
+ color: var(--text-muted) !important;
393
  font-weight: 400 !important;
394
  margin: 0 !important;
395
  max-width: 700px;
 
399
  z-index: 1;
400
  }
401
 
402
+ /* Main Dashboard Container & Card Sections (White Backgrounds) */
403
  .main-dashboard-container {
404
  display: flex !important;
405
  flex-direction: column !important;
 
407
  }
408
  .dashboard-card-section {
409
  background: var(--background-card) !important; /* Pure white for content cards */
410
+ border: 2px solid var(--border-card) !important;
411
  border-radius: 12px !important;
412
  padding: 1.75rem !important;
413
  box-shadow: var(--shadow-sm) !important;
414
  transition: all 0.3s ease-out !important;
415
  cursor: default;
416
+ color: var(--text-dark) !important; /* Dark text on white cards */
417
  }
418
  .dashboard-card-section:hover {
419
  box-shadow: var(--shadow-md) !important;
420
+ transform: translateY(-5px) !important;
421
  }
422
 
423
+ /* Section Titles (Centered & Bold) */
424
  .sub-section-title {
425
  font-family: 'Poppins', sans-serif !important;
426
  font-size: 1.7rem !important;
427
+ font-weight: 700 !important;
428
+ color: var(--primary-color) !important;
429
+ text-align: center !important; /* Centered */
430
  margin: 0 0 1.25rem 0 !important;
431
  padding-bottom: 0.75rem !important;
432
+ border-bottom: 2px solid var(--border-card) !important; /* Subtle separator line */
433
  display: block !important;
434
  letter-spacing: -0.01em !important;
435
  }
436
  .dashboard-card-section p {
437
  line-height: 1.7 !important;
438
+ color: var(--text-dark) !important;
439
  font-size: 1rem !important;
440
  }
441
  .dashboard-card-section strong {
442
+ color: var(--primary-color) !important; /* Default strong text uses primary color */
443
+ }
444
+ .dashboard-card-section p > span { /* For specific highlights like 'Disclaimer:' */
445
+ color: var(--secondary-accent-color) !important;
446
+ font-weight: 600 !important;
447
  }
448
 
449
+ /* Input Styling (Pure White Backgrounds) */
450
  .gradio-textbox textarea,
451
  .gradio-textbox input,
452
  .gradio-dropdown > div > input[type="text"],
453
  .gradio-dropdown .primary-wrap,
454
  .gradio-dropdown .scroll-hide {
455
+ background: var(--background-input) !important; /* Pure white background for inputs */
456
+ border: 2px solid var(--border-input) !important; /* Light gray border */
457
  border-radius: 8px !important;
458
  padding: 0.85rem 1rem !important;
459
  font-size: 0.98rem !important;
460
  font-family: 'Inter', sans-serif !important;
461
+ color: var(--text-dark) !important;
462
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
463
  box-shadow: var(--shadow-sm) !important;
464
  }
465
  .gradio-textbox textarea::placeholder,
466
  .gradio-textbox input::placeholder {
467
+ color: var(--text-muted) !important;
468
+ opacity: 0.8;
469
  }
470
  .gradio-textbox textarea:focus,
471
  .gradio-textbox input:focus,
472
  .gradio-dropdown > div > input[type="text"]:focus,
473
  .gradio-dropdown .primary-wrap.focused {
474
  outline: none !important;
475
+ border-color: var(--border-focus) !important;
476
+ box-shadow: 0 0 0 4px hsla(210, 70%, 45%, 0.2) !important; /* Primary color glow */
477
  }
478
  .gradio-textbox label,
479
  .gradio-dropdown label {
480
  font-weight: 600 !important;
481
+ color: var(--text-dark) !important;
482
  font-size: 1rem !important;
483
  margin-bottom: 0.6rem !important;
484
  display: block !important;
 
486
  .gradio-textbox .gr-form,
487
  .gradio-dropdown .gr-form {
488
  font-size: 0.9rem !important;
489
+ color: var(--text-muted) !important;
490
  margin-top: 0.4rem !important;
491
  }
492
  .input-row {
 
516
  text-align: center !important;
517
  }
518
  .gr-button-primary {
519
+ background: var(--primary-color) !important; /* Deep blue button */
520
  color: white !important;
521
  box-shadow: var(--shadow-sm) !important;
522
  }
 
526
  transform: translateY(-2px) !important;
527
  }
528
  .gr-button-primary:active {
529
+ transform: translateY(1px) !important;
530
  box-shadow: none !important;
531
  }
532
  .gr-button-secondary {
533
  background: var(--button-secondary-bg) !important; /* Light gray button */
534
+ color: var(--button-secondary-text) !important;
535
+ border-color: var(--border-input) !important;
536
  }
537
  .gr-button-secondary:hover {
538
+ background: hsl(210, 10%, 85%) !important;
539
+ border-color: var(--primary-color) !important;
540
  transform: translateY(-2px) !important;
541
  }
542
  .gr-button-secondary:active {
543
+ transform: translateY(1px) !important;
544
  box-shadow: none !important;
545
  }
546
 
547
+ /* Output Styling (Pure White Background) */
548
  .output-content-wrapper {
549
+ background: var(--background-input) !important; /* Pure white background */
550
+ border: 2px dashed var(--border-input) !important;
551
  border-radius: 8px !important;
552
  padding: 1.5rem !important;
553
  min-height: 150px !important;
554
+ color: var(--text-dark) !important;
555
  display: flex;
556
  flex-direction: column;
557
  justify-content: center;
 
565
  overflow-wrap: break-word;
566
  word-break: break-word;
567
  text-align: left !important;
568
+ color: var(--text-dark) !important;
569
  }
570
  @keyframes fadeInAndSlideUp {
571
  from { opacity: 0; transform: translateY(15px); }
 
574
  .response-header {
575
  font-size: 1.3rem !important;
576
  font-weight: 700 !important;
577
+ color: var(--primary-color) !important;
578
  margin-bottom: 0.75rem !important;
579
  display: flex !important;
580
  align-items: center !important;
 
582
  }
583
  .response-icon {
584
  font-size: 1.5rem !important;
585
+ color: var(--primary-color) !important;
586
  }
587
  .divider {
588
  border: none !important;
589
+ border-top: 1px dashed var(--border-input) !important;
590
  margin: 1rem 0 !important;
591
  }
592
  .error-message {
 
621
  opacity: 0.8;
622
  }
623
  .placeholder {
624
+ background: var(--background-input) !important;
625
+ border: 2px dashed var(--border-input) !important;
626
  border-radius: 8px !important;
627
  padding: 2.5rem 1.5rem !important;
628
  text-align: center !important;
629
+ color: var(--text-muted) !important;
630
  font-style: italic !important;
631
  font-size: 1.1rem !important;
632
  width: 100%;
633
  box-sizing: border-box;
634
  }
635
 
636
+ /* Examples Table Styling (Pure White Background Rows) */
637
  .examples-section .gr-samples-table {
638
+ border: 2px solid var(--border-card) !important;
639
  border-radius: 8px !important;
640
  overflow: hidden !important;
641
  margin-top: 1rem !important;
 
648
  text-align: left !important;
649
  }
650
  .examples-section .gr-samples-table th {
651
+ background: var(--background-card) !important;
652
  font-weight: 700 !important;
653
+ color: var(--primary-color) !important;
654
  }
655
  .examples-section .gr-samples-table td {
656
+ background: var(--background-input) !important; /* Pure white for rows */
657
+ color: var(--text-dark) !important;
658
+ border-top: 1px solid var(--border-input) !important;
659
  cursor: pointer !important;
660
  transition: background 0.2s ease, transform 0.1s ease !important;
661
  }
662
  .examples-section .gr-samples-table tr:hover td {
663
  background: hsl(0, 0%, 95%) !important; /* Slightly darker white on hover */
664
+ transform: translateX(8px);
665
  }
666
  .gr-examples .gr-label,
667
  .gr-examples .label-wrap,
 
671
 
672
  /* Footer Styling */
673
  .app-footer-wrapper {
674
+ background: var(--background-card) !important;
675
  border: 2px solid var(--border-card) !important;
676
  border-radius: 12px !important;
677
  padding: 1.75rem !important;
678
  margin-top: 1.5rem !important;
679
  text-align: center !important;
680
+ color: var(--text-muted) !important;
681
  }
682
  .app-footer p {
683
  margin: 0.6rem 0 !important;
684
  font-size: 0.95rem !important;
685
+ color: var(--text-muted) !important;
686
  line-height: 1.6 !important;
687
  }
688
  .app-footer a {
689
+ color: var(--primary-color) !important; /* Links use primary accent color */
690
  text-decoration: none !important;
691
  font-weight: 600 !important;
692
+ transition: text-decoration 0.2s ease, color 0.2s ease !important; /* Smooth color transition */
693
  }
694
  .app-footer a:hover {
695
  text-decoration: underline !important;
696
+ text-decoration-color: var(--primary-hover) !important;
697
+ color: var(--primary-hover) !important;
698
  }
699
 
700
  /* Responsive Design */
 
753
  """
754
  Navigate landlord-tenant laws with ease. This assistant provides detailed, state-specific answers grounded in legal authority.
755
 
756
+ <span style="color: var(--secondary-accent-color);">**Disclaimer:**</span> This tool is for informational purposes only and does not constitute legal advice. For specific legal guidance, always consult a licensed attorney in your jurisdiction.
757
  """
758
  )
759