/* Finix Onboarding — brand layer over Bootstrap 5.3
   Carries over the previous build's design: navy ground, orange accent.
   Orange is the active/attention colour — sidebar selection, pending counts,
   money totals, notification badges. Navy is structure. */

:root {
  --finix-navy:         #0D2B6B;
  --finix-navy-medium:  #1A3A7C;
  --finix-navy-dark:    #071D4F;
  --finix-navy-light:   #EBF0FA;
  --finix-orange:       #E65100;
  --finix-orange-light: #FFF3E0;
  --finix-ink:          #111827;
  --finix-muted:        #6b7280;
  --finix-rule:         #e5e7eb;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--finix-ink);
  background: #f9fafb;
}
.gu, [lang='gu'] { font-family: 'Noto Sans Gujarati', 'Inter', sans-serif; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-finix {
  background: var(--finix-navy); border-color: var(--finix-navy);
  color: #fff; font-weight: 600;
}
.btn-finix:hover, .btn-finix:focus {
  background: var(--finix-navy-medium); border-color: var(--finix-navy-medium); color: #fff;
}
.btn-finix:active { background: var(--finix-navy-dark) !important; }

.btn-finix-orange {
  background: var(--finix-orange); border-color: var(--finix-orange);
  color: #fff; font-weight: 600;
}
.btn-finix-orange:hover, .btn-finix-orange:focus { background: #c44500; border-color: #c44500; color: #fff; }

.btn-finix-outline { border-color: var(--finix-navy); color: var(--finix-navy); font-weight: 600; }
.btn-finix-outline:hover { background: var(--finix-navy); color: #fff; }

.text-finix-navy   { color: var(--finix-navy) !important; }
.text-finix-orange { color: var(--finix-orange) !important; }
.bg-finix-navy-light   { background: var(--finix-navy-light) !important; }
.bg-finix-orange-light { background: var(--finix-orange-light) !important; }

/* ── Floating blobs (login backdrop) ──────────────────────────────────────── */
@keyframes blob-float-1 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(18px, -22px); }
  66%      { transform: translate(-14px, 16px); }
}
@keyframes blob-float-2 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-20px, 14px); }
  66%      { transform: translate(16px, -18px); }
}
@keyframes blob-float-3 {
  0%, 100% { transform: translate(0, -50%); }
  33%      { transform: translate(-12px, calc(-50% + 20px)); }
  66%      { transform: translate(14px, calc(-50% - 16px)); }
}
.blob { position: absolute; border-radius: 50%; pointer-events: none; }
.blob-1 { animation: blob-float-1 9s ease-in-out infinite; }
.blob-2 { animation: blob-float-2 12s ease-in-out infinite; }
.blob-3 { animation: blob-float-3 10s ease-in-out infinite; }
.blob-white  { background: rgba(255, 255, 255, .05); }
.blob-orange { background: rgba(230, 81, 0, .16); }

/* ── Sign-in ──────────────────────────────────────────────────────────────── */
.login-split { min-height: 100vh; display: flex; }

.login-brand {
  width: 50%;
  background: var(--finix-navy);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-brand-inner { position: relative; z-index: 1; text-align: center; max-width: 430px; }
.login-logo-box {
  width: 112px; height: 112px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 46px rgba(0, 0, 0, .35);
  display: grid; place-items: center;
  padding: 12px; margin: 0 auto 30px;
}
.login-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.login-society {
  color: #fff; font-weight: 700; font-size: 1.24rem;
  letter-spacing: .15em; text-transform: uppercase; line-height: 1.65;
  margin: 0;
}
.login-rule {
  width: 48px; height: 4px; border-radius: 999px;
  background: var(--finix-orange);
  margin: 18px auto 0;
}
.login-tagline { color: rgba(255, 255, 255, .6); font-size: .88rem; margin-top: 22px; line-height: 1.6; }
.login-features { margin-top: 38px; text-align: left; display: grid; gap: 15px; }
.login-feature { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .8); font-size: .87rem; }
.login-feature-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  display: grid; place-items: center;
  color: var(--finix-orange);
}
.login-registered {
  position: absolute; bottom: 22px; z-index: 1;
  color: rgba(255, 255, 255, .3); font-size: .74rem;
}

.login-form-panel {
  width: 50%;
  background: #f9fafb;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px;
  position: relative;
}
.login-card {
  width: 100%; max-width: 420px;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  box-shadow: 0 22px 46px rgba(17, 24, 39, .13);
  padding: 32px;
}
.login-card h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.login-card .lede { font-size: .88rem; color: var(--finix-muted); margin: 0 0 26px; }
.login-card .form-label { font-weight: 600; font-size: .87rem; }
.login-card .form-control:focus {
  border-color: var(--finix-navy-medium);
  box-shadow: 0 0 0 .2rem rgba(13, 43, 107, .15);
}
.login-copyright { margin-top: 22px; font-size: .74rem; color: #9ca3af; text-align: center; }
.login-mobile-brand { display: none; }

@media (max-width: 991.98px) {
  .login-brand { display: none; }
  .login-form-panel {
    width: 100%;
    background: var(--finix-navy);
    overflow: hidden;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 40px;
  }
  .login-mobile-brand { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; margin-bottom: 30px; }
  .login-mobile-brand .login-logo-box { width: 80px; height: 80px; border-radius: 16px; margin-bottom: 18px; }
  .login-mobile-brand .login-society { font-size: .96rem; }
  .login-card { position: relative; z-index: 1; }
  .login-copyright { color: rgba(255, 255, 255, .45); position: relative; z-index: 1; }
  .login-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
  .login-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .73rem; color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px; padding: 4px 12px;
  }
  .login-chip i { color: var(--finix-orange); }
}

/* ── App shell ────────────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 256px; flex-shrink: 0;
  background: var(--finix-navy);
  color: #fff;
  display: flex; flex-direction: column;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--finix-navy-medium);
}
.sidebar-logo {
  flex-shrink: 0; width: 40px; height: 40px;
  background: #fff; border-radius: 6px;
  display: grid; place-items: center; padding: 4px;
}
.sidebar-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sidebar-brand-text { min-width: 0; line-height: 1.3; }
.sidebar-brand-text .l1 { font-size: .74rem; font-weight: 700; }
.sidebar-brand-text .l2 { font-size: .74rem; opacity: .8; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  color: #dbeafe;
  text-decoration: none;
  font-size: .875rem;
  transition: background-color .15s;
}
.sidebar nav a:hover { background: var(--finix-navy-medium); color: #fff; }
/* Orange marks the current page — the strongest signal in the shell. */
.sidebar nav a.active { background: var(--finix-orange); color: #fff; font-weight: 500; }

.sidebar-user { border-top: 1px solid var(--finix-navy-medium); padding: 16px; }
.sidebar-user .who { font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.role-badge {
  display: inline-block;
  background: var(--finix-orange-light);
  color: var(--finix-orange);
  border: 1px solid #ffd7b0;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .7rem; font-weight: 600;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--finix-rule);
  padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.app-content { flex: 1; overflow-y: auto; padding: 24px 22px 40px; }

/* ── Cards & stats ────────────────────────────────────────────────────────── */
.finix-card {
  background: #fff;
  border: 1px solid var(--finix-rule);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05);
}
.finix-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--finix-rule);
  font-weight: 600;
}
.finix-card-body { padding: 18px; }

.stat-card { display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-label { font-size: .875rem; color: var(--finix-muted); margin: 0; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; margin: 4px 0 0; }
.stat-icon { border-radius: 50%; padding: 12px; display: grid; place-items: center; font-size: 1.15rem; }
.stat-icon.navy   { background: var(--finix-navy-light);   color: var(--finix-navy); }
.stat-icon.orange { background: var(--finix-orange-light); color: var(--finix-orange); }
.stat-icon.green  { background: #e3f5ea;                   color: #1a7f42; }
.stat-icon.red    { background: #fdeaea;                   color: #c02626; }

/* Table headers pick up the tinted band from the previous build */
.finix-table { width: 100%; font-size: .875rem; }
.finix-table thead tr { background: var(--finix-navy-light); text-align: left; }
.finix-table thead th { padding: 10px 12px; font-weight: 500; color: var(--finix-navy); white-space: nowrap; }
.finix-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; }
.finix-table tbody tr:hover { background: #fafbfc; }
.finix-table.orange thead tr { background: var(--finix-orange-light); }
.finix-table.orange thead th { color: var(--finix-orange); }

/* ── Status pills ─────────────────────────────────────────────────────────── */
.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
}
.status-DRAFT    { background: #f3f4f6; color: #4b5563; }
.status-PENDING  { background: var(--finix-orange-light); color: var(--finix-orange); }
.status-APPROVED { background: #e3f5ea; color: #1a7f42; }
.status-REJECTED { background: #fdeaea; color: #c02626; }

.notif-dot {
  position: absolute; top: -4px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--finix-orange);
  color: #fff; font-size: .68rem; font-weight: 700;
  display: grid; place-items: center;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1040;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 1030;
    background: rgba(0, 0, 0, .4);
  }
  .app-content { padding: 16px 14px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .blob-1, .blob-2, .blob-3 { animation: none; }
}

/* ── Form wizard ──────────────────────────────────────────────────────────── */
.wizard-steps { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; }
.wizard-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 600;
  background: #f3f4f6; color: #9ca3af;
  border: 2px solid #e5e7eb;
  text-decoration: none;
}
.wizard-step.current .wizard-dot {
  background: var(--finix-navy); color: #fff; border-color: var(--finix-navy);
  box-shadow: 0 3px 10px rgba(13, 43, 107, .3);
}
.wizard-step.done .wizard-dot {
  background: #fff; color: var(--finix-orange); border-color: var(--finix-orange);
}
.wizard-label { font-size: .68rem; font-weight: 500; color: #9ca3af; text-align: center; white-space: nowrap; }
.wizard-step.current .wizard-label { color: var(--finix-navy); font-weight: 600; }
.wizard-step.done .wizard-label { color: var(--finix-orange); }
.wizard-bar { flex: 1; min-width: 10px; height: 2px; background: #e5e7eb; }
.wizard-bar.done { background: var(--finix-orange); }

.doc-drop {
  border: 2px dashed #d1d5db; border-radius: 10px;
  min-height: 130px; display: grid; place-items: center;
  cursor: pointer; text-align: center; padding: 14px;
  transition: border-color .15s, background-color .15s;
}
.doc-drop:hover { border-color: var(--finix-navy); background: var(--finix-navy-light); }
.doc-thumb { max-height: 150px; border-radius: 8px; }

#sigPad { touch-action: none; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; width: 100%; cursor: crosshair; }
#camVideo, #camCanvas { width: 100%; border-radius: 8px; background: #111; }
.nominee-row { border: 1px solid var(--finix-rule); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: #fff; }
