/* ==========================================================================
   RSP Theme Tokens — Government Feedback System
   --------------------------------------------------------------------------
   Single source of truth for the entire color system.

   To rebrand: edit ONLY this file. Every template consumes these via var().

   Brand hue anchor: #0094DA = hsl(199.3, 100%, 42.7%)
   All blues below are derived from that single hue so they read as one family.

   Contrast (WCAG 2.1) against white:
     --brand        #0094DA  3.36:1  -> accents/UI only, NOT normal text
     --brand-action #0077B6  4.87:1  -> white-text buttons, links  (AA pass)
   ========================================================================== */

:root {
  /* ── Brand ───────────────────────────────────────────────────────────── */
  --brand:            #0094DA;  /* party blue — focus rings, active nav, icons */
  --brand-action:     #0077B6;  /* buttons, links, form focus (white text safe) */
  --brand-action-hi:  #005F94;  /* pressed / active */
  --brand-light:      #2BAFE4;  /* gradient partner for primary buttons */
  --brand-mid:        #0089C7;  /* hero gradient 3rd stop */
  --brand-deep:       #004E6E;  /* sidebar top */
  --brand-deeper:     #02293B;  /* sidebar bottom */
  --brand-splash:     #00699E;  /* splash screen gradient top */
  --brand-splash-2:   #023048;  /* splash screen gradient bottom */
  --brand-page:       #01496B;  /* login page body gradient top */
  --brand-page-2:     #011F2E;  /* login page body gradient bottom */

  /* ── Text ────────────────────────────────────────────────────────────── */
  --text-strong:      #16303D;  /* headings, footer background */
  --text:             #28414F;  /* body copy, table cells */
  --text-muted:       #4E6875;  /* labels, table headers, muted buttons */
  --text-muted-2:     #5E7A88;  /* menu icon, secondary muted */
  --text-faint:       #7D97A3;  /* input icons, placeholders */
  --text-faint-2:     #8AA3AE;
  --text-faint-3:     #9DB4BE;  /* empty states, meta text */
  --text-faint-4:     #6F8995;  /* address block */

  /* ── Surfaces ────────────────────────────────────────────────────────── */
  --surface:          #FFFFFF;  /* cards, topbar, panels */
  --page-bg:          #F1F5F8;  /* app background */
  --surface-soft:     #F4FAFD;  /* table header, row hover, info panel top */
  --surface-input:    #F7FBFD;  /* form control background */
  --surface-tint:     #E3F2FA;  /* info panel bottom, pale card fills */
  --surface-hover:    #EAF6FC;  /* outline button hover */
  --surface-pale:     #F8FCFE;
  --surface-pale-2:   #F2FAFD;

  /* ── Borders ─────────────────────────────────────────────────────────── */
  --border:           #C9E6F5;  /* form control, outline button */
  --border-soft:      #DCEBF3;  /* pagination */
  --border-table:     #E4F1F8;  /* table header underline */
  --border-divider:   #D3EAF5;  /* info panel divider */
  --border-strong:    #BFD6E0;  /* misc hairline */
  --border-row:       #F1F5F8;  /* table row separator */
  --border-hair:      #EEEEEE;  /* card header divider */

  /* ── Brand-tinted shadows & rings ────────────────────────────────────── */
  --shadow-brand:     rgba(0, 119, 182, .30);
  --shadow-brand-lg:  rgba(0, 119, 182, .40);
  --shadow-brand-md:  rgba(0, 119, 182, .35);
  --shadow-brand-soft:rgba(0, 119, 182, .15);
  --shadow-brand-xs:  rgba(0, 119, 182, .10);
  --shadow-brand-xs2: rgba(0, 119, 182, .12);
  --shadow-brand-lg2: rgba(0, 119, 182, .45);

  /* ── Neutral shadows ─────────────────────────────────────────────────── */
  --shadow-sm:        rgba(0, 0, 0, .06);
  --shadow-card:      rgba(0, 0, 0, .07);
  --shadow-bar:       rgba(0, 0, 0, .08);
  --shadow-soft:      rgba(0, 0, 0, .10);
  --shadow-hero:      rgba(0, 0, 0, .20);
  --shadow-sidebar:   rgba(0, 0, 0, .25);
  --shadow-strong:    rgba(0, 0, 0, .30);
  --shadow-dialog:    rgba(0, 0, 0, .40);

  /* ── White alphas (on dark sidebar / nav / hero surfaces) ────────────── */
  --white-a10:        rgba(255, 255, 255, .10);
  --white-a12:        rgba(255, 255, 255, .12);
  --white-a15:        rgba(255, 255, 255, .15);
  --white-a20:        rgba(255, 255, 255, .20);
  --white-a25:        rgba(255, 255, 255, .25);
  --white-a30:        rgba(255, 255, 255, .30);
  --white-a45:        rgba(255, 255, 255, .45);
  --white-a60:        rgba(255, 255, 255, .60);
  --white-a75:        rgba(255, 255, 255, .75);
  --white-a80:        rgba(255, 255, 255, .80);
  --white-a85:        rgba(255, 255, 255, .85);

  /* ── Neutral UI greys (buttons, badges — not brand) ───────────────────── */
  --grey-btn:         #E5E7EB;
  --grey-btn-hover:   #D1D5DB;
  --grey-btn-text:    #374151;
  --grey-badge-bg:    #F3F4F6;
  --grey-badge-text:  #4B5563;

  /* ── Semantic: success ───────────────────────────────────────────────── */
  --success:          #059669;
  --success-light:    #10B981;
  --success-bg:       #DCFCE7;  /* badge background */
  --success-msg-bg:   #F0FDF4;  /* message banner background */
  --success-border:   #86EFAC;
  --success-text:     #166534;
  --success-shadow:   rgba(5, 150, 105, .30);

  /* ── Semantic: danger ────────────────────────────────────────────────── */
  --danger:           #DC2626;
  --danger-light:     #EF4444;
  --danger-bg:        #FEE2E2;  /* badge background */
  --danger-msg-bg:    #FEF2F2;  /* message + error box background */
  --danger-border:    #FCA5A5;
  --danger-text:      #991B1B;
  --danger-text-2:    #B91C1C;  /* error box text */
  --danger-flat:      #C0392B;  /* department accent (login panel) */
  --danger-shadow:    rgba(220, 38, 38, .30);
  --danger-hover:     rgba(220, 53, 69, .25);  /* sidebar logout hover */

  /* ── Semantic: warning ───────────────────────────────────────────────── */
  --warning:          #D97706;
  --warning-light:    #F59E0B;
  --warning-bg:       #FEF3C7;
  --warning-msg-bg:   #FFFBEB;
  --warning-border:   #FCD34D;
  --warning-text:     #92400E;

  /* ── Semantic: info ──────────────────────────────────────────────────── */
  --info:             #1E40AF;
  --info-bg:          #DBEAFE;
  --info-msg-bg:      #EFF6FF;
  --info-border:      #93C5FD;

  /* ── Accent (dashboard stat card) ────────────────────────────────────── */
  --accent:           #7C3AED;
  --accent-light:     #8B5CF6;

  /* ── White ───────────────────────────────────────────────────────────── */
  --white:            #FFFFFF;
}

/* ==========================================================================
   Logo treatment
   The RSP mark is a white disc. On the pale login info panel it would vanish,
   so that instance gets a tinted circular backdrop.
   ========================================================================== */

.logo-disc {
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-disc img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   Shared focus treatment
   Uses the pure brand color — meets the 3:1 UI-component contrast bar.
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Font stacks
   Noto Sans Devanagari is loaded from public_base.html so Nepali questionnaire
   text renders with proper conjuncts and matras instead of system fallbacks.
   ========================================================================== */

:root {
  --font-sans: "Inter", "Noto Sans Devanagari", "Noto Sans", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
}

