/* =====================================================================
   WAAREE ONBOARD - Premium UI Theme
   Brand gradient: #3db6bd -> #3cb878 -> #61b441 -> #3a6429
   ===================================================================== */

:root {
  --wa-teal:   #3db6bd;
  --wa-green:  #3cb878;
  --wa-lime:   #61b441;
  --wa-forest: #3a6429;

  --wa-gradient:      linear-gradient(120deg, #3db6bd 0%, #3cb878 40%, #61b441 72%, #3a6429 100%);
  --wa-gradient-soft: linear-gradient(120deg, rgba(61,182,189,.12), rgba(60,184,120,.12), rgba(97,180,65,.12));
  --wa-gradient-vert: linear-gradient(180deg, #3db6bd 0%, #3cb878 45%, #61b441 75%, #3a6429 100%);

  --wa-ink:        #1f2a25;
  --wa-body:       #46554e;
  --wa-muted:      #849690;
  --wa-line:       #e7edea;
  --wa-bg:         #eef3f1;
  --wa-card:       #ffffff;

  --wa-sidebar-w:  266px;
  --wa-radius:     16px;
  --wa-radius-sm:  11px;
  --wa-shadow:     0 6px 24px rgba(31, 68, 52, .07);
  --wa-shadow-lg:  0 18px 48px rgba(31, 68, 52, .14);
  --wa-shadow-sm:  0 2px 8px rgba(31, 68, 52, .06);

  --bs-primary: #2f9f6f;
  --bs-primary-rgb: 47,159,111;
}

/* ------------------------------- Base ------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wa-body);
  background: var(--wa-bg);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,h6 { color: var(--wa-ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--wa-green); text-decoration: none; }
a:hover { color: var(--wa-forest); }
.text-muted { color: var(--wa-muted) !important; }
.text-brand { color: var(--wa-green) !important; }

/* Brand gradient helpers */
.bg-brand-gradient { background-image: var(--wa-gradient) !important; }
.text-gradient {
  background: var(--wa-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.gradient-bar { height: 4px; background-image: var(--wa-gradient); border: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7d5cf; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9bdb4; background-clip: content-box; }

/* ============================= Layout ============================= */
.app-shell { display: flex; min-height: 100vh; }

/* ----- Sidebar ----- */
.app-sidebar {
  width: var(--wa-sidebar-w);
  flex: 0 0 var(--wa-sidebar-w);
  background: var(--wa-card);
  border-right: 1px solid var(--wa-line);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--wa-line);
}
.sidebar-brand img { height: 34px; width: auto; }
.sidebar-brand .brand-text { line-height: 1.1; }
.sidebar-brand .brand-name { font-weight: 800; font-size: 16px; color: var(--wa-ink); letter-spacing: -.02em; }
.sidebar-brand .brand-tag { font-size: 10.5px; color: var(--wa-muted); }

.sidebar-nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--wa-muted); font-weight: 700; padding: 14px 12px 7px;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10.5px 13px; margin: 2px 0;
  border-radius: var(--wa-radius-sm);
  color: var(--wa-body); font-weight: 600; font-size: 14px;
  position: relative; transition: all .16s ease;
}
.sidebar-nav .nav-link i { font-size: 18px; width: 22px; text-align: center; color: #8fa39b; transition: color .16s; }
.sidebar-nav .nav-link:hover { background: #f1f6f4; color: var(--wa-forest); }
.sidebar-nav .nav-link:hover i { color: var(--wa-green); }
.sidebar-nav .nav-link.active {
  background-image: var(--wa-gradient);
  color: #fff; box-shadow: 0 8px 18px rgba(60,184,120,.32);
}
.sidebar-nav .nav-link.active i { color: #fff; }
.sidebar-nav .nav-link .nav-badge {
  margin-left: auto; background: #eef3f1; color: var(--wa-forest);
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px;
}
.sidebar-nav .nav-link.active .nav-badge { background: rgba(255,255,255,.25); color: #fff; }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--wa-line); font-size: 11.5px; color: var(--wa-muted); }

/* ----- Main column ----- */
.app-main {
  margin-left: var(--wa-sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.app-topbar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--wa-line);
  padding: 0 26px; height: 66px;
  display: flex; align-items: center; gap: 16px;
}
.topbar-title { font-size: 18px; font-weight: 800; color: var(--wa-ink); margin: 0; letter-spacing: -.02em; }
.topbar-sub { font-size: 12px; color: var(--wa-muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-icon {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--wa-line);
  background: #fff; color: var(--wa-body); display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; transition: all .16s; position: relative;
}
.btn-icon:hover { border-color: var(--wa-green); color: var(--wa-green); box-shadow: var(--wa-shadow-sm); }
.btn-icon .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; background: #ef5b5b; border-radius: 50%; border: 2px solid #fff; }

.sidebar-toggle { display: none; }

.app-content { padding: 26px; flex: 1; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 23px; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--wa-muted); font-size: 13.5px; }

/* User chip */
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 40px; border: 1px solid var(--wa-line); background: #fff; cursor: pointer; }
.user-chip:hover { box-shadow: var(--wa-shadow-sm); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  background-image: var(--wa-gradient); color: #fff; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em;
}
.avatar-sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
.avatar-lg { width: 60px; height: 60px; flex-basis: 60px; font-size: 21px; }
.user-chip .u-name { font-size: 13px; font-weight: 700; color: var(--wa-ink); line-height: 1.1; }
.user-chip .u-role { font-size: 11px; color: var(--wa-muted); }

/* ============================= Cards ============================= */
.card {
  background: var(--wa-card);
  border: 1px solid var(--wa-line);
  border-radius: var(--wa-radius);
  box-shadow: var(--wa-shadow);
}
.card-header {
  background: transparent; border-bottom: 1px solid var(--wa-line);
  padding: 17px 22px; font-weight: 700; color: var(--wa-ink);
  display: flex; align-items: center; gap: 10px;
}
.card-header .card-title { margin: 0; font-size: 15.5px; font-weight: 700; }
.card-body { padding: 22px; }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--wa-shadow-lg); }

/* KPI cards */
.kpi-card { position: relative; overflow: hidden; }
/* Reusable gradient icon badge (used in KPI cards, role cards, reports, status pages...) */
.kpi-icon {
  width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin-bottom: 14px; box-shadow: var(--wa-shadow-sm); overflow: hidden;
}
.kpi-icon > i { line-height: 1; }
.kpi-card .kpi-value { font-size: 30px; font-weight: 800; color: var(--wa-ink); line-height: 1; letter-spacing: -.03em; }
.kpi-card .kpi-label { font-size: 13px; color: var(--wa-muted); margin-top: 6px; font-weight: 600; }
.kpi-card .kpi-trend { font-size: 12px; font-weight: 700; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; }
.kpi-trend.up { color: #2fa36a; } .kpi-trend.down { color: #e35d5d; }
.kpi-card .kpi-spark { position: absolute; right: -6px; bottom: -6px; opacity: .5; }

.grad-teal   { background-image: linear-gradient(135deg,#3db6bd,#2f9aa0); }
.grad-green  { background-image: linear-gradient(135deg,#3cb878,#2f9f6f); }
.grad-lime   { background-image: linear-gradient(135deg,#61b441,#4f9a34); }
.grad-forest { background-image: linear-gradient(135deg,#3a6429,#2c4d20); }
.grad-full   { background-image: var(--wa-gradient); }

/* ============================= Buttons ============================= */
.btn { border-radius: 11px; font-weight: 650; font-size: 14px; padding: 9px 18px; transition: all .16s; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 13px; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 9px; }
.btn-brand, .btn-primary {
  background-image: var(--wa-gradient); color: #fff; border: none;
  box-shadow: 0 8px 18px rgba(60,184,120,.28);
}
.btn-brand:hover, .btn-primary:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 10px 24px rgba(60,184,120,.38); transform: translateY(-1px); }
.btn-brand:active, .btn-primary:active { transform: translateY(0); }
.btn-outline-brand { background: #fff; color: var(--wa-forest); border: 1.5px solid var(--wa-line); }
.btn-outline-brand:hover { border-color: var(--wa-green); color: var(--wa-green); background: #f4faf7; }
.btn-soft { background: #eef6f1; color: var(--wa-forest); border: none; }
.btn-soft:hover { background: #e2efe8; color: var(--wa-forest); }
.btn-light { background: #fff; border: 1px solid var(--wa-line); color: var(--wa-body); }
.btn-danger { border: none; }

/* ============================= Forms ============================= */
.form-label { font-weight: 650; font-size: 13px; color: var(--wa-ink); margin-bottom: 6px; }
.form-label .req { color: #e35d5d; }
.form-control, .form-select {
  border: 1.5px solid var(--wa-line); border-radius: 11px; padding: 10px 13px;
  font-size: 14px; color: var(--wa-ink); background-color: #fff; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--wa-green); box-shadow: 0 0 0 4px rgba(60,184,120,.14); outline: none;
}
.form-control::placeholder { color: #a9b7b0; }
.form-control.is-invalid, .form-select.is-invalid { border-color: #e35d5d; }
.input-group-text { border: 1.5px solid var(--wa-line); background: #f6faf8; border-radius: 11px; color: var(--wa-muted); }
.form-text { font-size: 12px; color: var(--wa-muted); }
textarea.form-control { min-height: 90px; }
.form-check-input:checked { background-color: var(--wa-green); border-color: var(--wa-green); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(60,184,120,.14); border-color: var(--wa-green); }

/* Section titles inside forms */
.form-section { margin-bottom: 26px; }
.form-section-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--wa-line); }
.form-section-head .sec-no {
  width: 30px; height: 30px; border-radius: 9px; background-image: var(--wa-gradient); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 30px;
}
.form-section-head h3 { margin: 0; font-size: 16px; }
.form-section-head p { margin: 0; font-size: 12px; color: var(--wa-muted); }

/* ============================= Tables ============================= */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { margin: 0; color: var(--wa-body); font-size: 13.8px; }
.table thead th {
  background: #f6faf8; color: var(--wa-muted); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--wa-line);
  padding: 13px 18px; white-space: nowrap;
}
.table tbody td { padding: 14px 18px; border-bottom: 1px solid var(--wa-line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f8fbfa; }
.table .cell-primary { font-weight: 700; color: var(--wa-ink); }
.table .cell-sub { font-size: 12px; color: var(--wa-muted); }

/* ============================= Badges ============================= */
.badge { font-weight: 650; font-size: 11.5px; padding: 5px 11px; border-radius: 20px; letter-spacing: .01em; }
.badge-status { border: 1px solid transparent; }
.bg-success-soft   { background: #e5f6ec; } .text-success { color: #2fa36a !important; }
.bg-info-soft      { background: #e2f4f6; } .text-info    { color: #2f95a0 !important; }
.bg-warning-soft   { background: #fdf2df; } .text-warning { color: #d99323 !important; }
.bg-danger-soft    { background: #fbe7e7; } .text-danger  { color: #d95151 !important; }
.bg-primary-soft   { background: #e6f2ec; } .text-primary { color: #2f9f6f !important; }
.bg-secondary-soft { background: #eef1f0; } .text-secondary { color: #7a8a83 !important; }

/* ============================= Auth pages ============================= */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
  background-image: var(--wa-gradient); color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 52px 56px;
}
.auth-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255,255,255,.10); right: -140px; bottom: -160px;
}
.auth-brand::before {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.08); left: -90px; top: -80px;
}
.auth-brand .ab-logo-badge {
  display: inline-flex; align-items: center; background: #fff;
  padding: 13px 20px; border-radius: 16px; position: relative; z-index: 2;
  box-shadow: 0 14px 34px rgba(0,0,0,.16); align-self: flex-start;
  animation: fadeUp .6s cubic-bezier(.2,.7,.3,1) both;
}
.auth-brand .ab-logo { height: 34px; width: auto; display: block; }
.auth-brand .ab-mid { position: relative; z-index: 2; }
.auth-brand h1 { color: #fff; font-size: 34px; line-height: 1.18; margin: 0 0 16px; font-weight: 800; }
.auth-brand p { color: rgba(255,255,255,.92); font-size: 15.5px; max-width: 420px; }
.auth-brand .ab-points { list-style: none; padding: 0; margin: 26px 0 0; position: relative; z-index: 2; }
.auth-brand .ab-points li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 14.5px; color: rgba(255,255,255,.95); }
.auth-brand .ab-points i { font-size: 20px; }
.auth-brand .ab-foot { position: relative; z-index: 2; font-size: 12.5px; color: rgba(255,255,255,.8); }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--wa-card); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 25px; margin: 0 0 6px; }
.auth-card .sub { color: var(--wa-muted); margin-bottom: 28px; font-size: 14px; }

/* ============================= Timeline (flex-based, self-aligning) === */
.timeline { position: relative; }
/* Each row: [dot rail] [card]. The dot is a flex child so it can never drift
   out of alignment; the connector is drawn at the dot's exact centre. */
.tl-item {
  position: relative; display: flex; gap: 15px; padding-bottom: 22px;
  animation: tlIn .45s ease;               /* fill-mode none -> base opacity stays 1 (never invisible) */
}
.tl-item:last-child { padding-bottom: 2px; }
/* Vertical connector between consecutive dots (dot dia 36 -> centre at 18px). */
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 40px; bottom: -2px; width: 2px;
  background: linear-gradient(180deg, rgba(97,180,65,.55), rgba(58,100,41,.12));
  border-radius: 2px; z-index: 0;
}
@keyframes tlIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tl-item { animation: none; } }

.tl-dot {
  position: relative; z-index: 2; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background-image: var(--wa-gradient); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(60,184,120,.35);
}
.tl-dot.muted { background: #cfdbd5; background-image: none; box-shadow: 0 0 0 4px #fff; }
/* Live pulse for the most recent event */
.tl-dot.tl-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--wa-green); animation: pulse 1.7s infinite;
}

.tl-card {
  flex: 1 1 auto; min-width: 0; background: #fff; border: 1px solid var(--wa-line);
  border-radius: 13px; padding: 12px 16px; box-shadow: var(--wa-shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tl-card:hover { transform: translateX(3px); box-shadow: var(--wa-shadow); border-color: #d4e6dc; }
.tl-card .tl-title { font-weight: 700; color: var(--wa-ink); font-size: 14px; margin: 0 0 4px; line-height: 1.35; }
.tl-card .tl-meta { font-size: 12px; color: var(--wa-muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.tl-card .tl-actor { display: inline-flex; align-items: center; gap: 6px; }
/* Day-section divider used by the Live Tracking feed */
.tl-day {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--wa-forest); background: var(--wa-gradient-soft); border: 1px solid #dcebe3;
  padding: 5px 13px; border-radius: 20px; margin: 18px 0 14px;
}
.tl-day:first-child { margin-top: 0; }

/* Pulse dot for "live" */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3cb878; display: inline-block; position: relative; }
.live-dot::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid #3cb878; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%{transform:scale(.8);opacity:.8} 100%{transform:scale(1.9);opacity:0} }

/* ============================= Misc ============================= */
.stepper { display: flex; gap: 0; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; }
.step .step-num { width: 34px; height: 34px; border-radius: 50%; background: #eef3f1; color: var(--wa-muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid transparent; }
.step.active .step-num { background-image: var(--wa-gradient); color: #fff; }
.step.done .step-num { background: #e5f6ec; color: #2fa36a; border-color: #bfe6cf; }
.step .step-label { font-size: 13px; font-weight: 650; color: var(--wa-muted); }
.step.active .step-label { color: var(--wa-ink); }
.step-line { flex: 1; height: 2px; background: var(--wa-line); margin: 0 12px; min-width: 24px; }
.step-line.done { background: #bfe6cf; }

.empty-state { text-align: center; padding: 54px 20px; color: var(--wa-muted); }
.empty-state i { font-size: 46px; color: #cfdbd5; margin-bottom: 12px; display: block; }
.empty-state h4 { color: var(--wa-ink); font-size: 17px; margin-bottom: 6px; }

.dropdown-menu { border: 1px solid var(--wa-line); border-radius: 14px; box-shadow: var(--wa-shadow-lg); padding: 8px; font-size: 14px; }
.dropdown-item { border-radius: 9px; padding: 9px 12px; font-weight: 550; }
.dropdown-item:hover { background: #f1f6f4; color: var(--wa-forest); }
.dropdown-item.text-danger:hover { background: #fbe7e7; color: #d95151; }

.doc-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--wa-line); border-radius: 12px; background: #fff; }
.doc-tile .doc-ic { width: 42px; height: 42px; border-radius: 10px; background: #eef6f1; color: var(--wa-forest); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 42px; }
.doc-tile.verified { border-color: #bfe6cf; background: #f6fdf9; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; background: #eef3f1; font-size: 12px; font-weight: 600; color: var(--wa-body); }

.divider { height: 1px; background: var(--wa-line); margin: 20px 0; border: 0; }

.spinner-brand { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts */
.wa-toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 1080; display: flex; flex-direction: column; gap: 10px; }
.wa-toast {
  background: #fff; border: 1px solid var(--wa-line); border-left: 4px solid var(--wa-green);
  border-radius: 12px; padding: 13px 18px; box-shadow: var(--wa-shadow-lg); min-width: 300px; max-width: 400px;
  display: flex; align-items: flex-start; gap: 12px; animation: toastIn .3s;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.wa-toast.success { border-left-color: #3cb878; } .wa-toast.success .ti { color: #2fa36a; }
.wa-toast.danger  { border-left-color: #e35d5d; } .wa-toast.danger .ti  { color: #d95151; }
.wa-toast.warning { border-left-color: #e6a532; } .wa-toast.warning .ti { color: #d99323; }
.wa-toast.info    { border-left-color: #3db6bd; } .wa-toast.info .ti    { color: #2f95a0; }
.wa-toast .ti { font-size: 20px; } .wa-toast .tmsg { font-size: 13.5px; color: var(--wa-ink); font-weight: 550; }

/* ============================= Responsive ============================= */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(20,40,30,.35); z-index: 1035; }
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); box-shadow: var(--wa-shadow-lg); }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
@media (max-width: 575.98px) {
  .app-content { padding: 16px; }
  .app-topbar { padding: 0 16px; }
  .user-chip .u-name, .user-chip .u-role { display: none; }
  .kpi-card .kpi-value { font-size: 25px; }
}

/* Print (for form review / records) */
/* ---------- Photographs & signature (post-joining record) ---------- */
.print-only { display: none; }
.pv-photo { display: block; object-fit: cover; background: #f6faf8; }
.pv-photo-head { width: 64px; height: 76px; border-radius: 10px; border: 1px solid var(--wa-line); flex: 0 0 64px; }
.pv-photo-grid { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.pv-photo-item { margin: 0; text-align: center; }
.pv-photo-item .pv-photo { width: 150px; height: 180px; border: 1px solid var(--wa-line); border-radius: 12px; }
.pv-photo-item.pv-sign .pv-photo { width: 240px; height: 90px; object-fit: contain; background: #fff; }
.pv-photo-item figcaption { margin-top: 8px; font-size: 12px; font-weight: 650; color: var(--wa-muted); }

/* ============================= Print ============================= */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  html, body { background: #fff !important; font-size: 11pt; }
  .app-sidebar, .app-topbar, .sidebar-backdrop, .no-print,
  .wa-toast-wrap, .modal, .dropdown-menu, .btn { display: none !important; }
  .app-shell { display: block !important; }
  .app-main { margin-left: 0 !important; }
  .app-content { padding: 0 !important; }
  .print-only { display: block !important; }

  /* Letterhead */
  .print-head { text-align: center; border-bottom: 2px solid #3a6429; padding-bottom: 8px; margin-bottom: 14px; }
  .print-head .ph-title { font-size: 15pt; font-weight: 700; color: #1f2a25; }
  .print-head .ph-sub { font-size: 10pt; color: #46554e; }

  /* Cards -> clean blocks that never split across pages */
  .card { box-shadow: none !important; border: 1px solid #cfd8d3 !important; border-radius: 6px !important;
          break-inside: avoid; page-break-inside: avoid; margin-bottom: 10px !important; }
  .card-header { padding: 8px 12px !important; border-bottom: 1px solid #cfd8d3 !important; background: #f4f8f6 !important; }
  .card-header .card-title { font-size: 11.5pt !important; }
  .card-body { padding: 10px 12px !important; }
  .gradient-bar, .divider { display: none !important; }

  /* Field grid alignment: keep label/value pairs tidy and unbroken */
  .row { display: flex !important; flex-wrap: wrap !important; margin: 0 !important; }
  .row > [class*="col-"] { break-inside: avoid; page-break-inside: avoid; padding: 3px 8px !important; }
  .cell-sub { font-size: 8.5pt !important; color: #6b7a74 !important; text-transform: uppercase; letter-spacing: .02em; }

  /* Tables */
  table { width: 100% !important; border-collapse: collapse !important; break-inside: auto; }
  .table thead th { background: #f4f8f6 !important; border-bottom: 1px solid #cfd8d3 !important;
                    font-size: 8.5pt !important; padding: 5px 7px !important; }
  .table tbody td { border-bottom: 1px solid #e3eae6 !important; padding: 5px 7px !important; font-size: 9.5pt !important; }
  thead { display: table-header-group; }   /* repeat headers across pages */
  tr, img, figure { break-inside: avoid; page-break-inside: avoid; }

  /* Photographs & signature must print */
  .pv-photo, .pv-photo-head, img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pv-photo-grid { display: flex !important; gap: 16mm !important; justify-content: flex-start !important; }
  .pv-photo-item .pv-photo { width: 34mm !important; height: 41mm !important; border: 1px solid #999 !important; }
  .pv-photo-item.pv-sign .pv-photo { width: 55mm !important; height: 20mm !important; }
  .pv-photo-item figcaption { font-size: 8.5pt !important; color: #46554e !important; }
  .pv-photo-head { width: 26mm !important; height: 32mm !important; }

  /* Badges/chips readable in mono print */
  .badge, .chip { border: 1px solid #cfd8d3 !important; color: #1f2a25 !important; background: #fff !important;
                  font-size: 8.5pt !important; padding: 2px 6px !important; }
  a { color: #1f2a25 !important; text-decoration: none !important; }
}

/* =====================================================================
   PREMIUM ANIMATIONS & DASHBOARD (v1.1)
   ===================================================================== */

/* Entrance animation utility (staggered via --d) */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeSoft { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity:0; transform: scale(.9); } 60% { transform: scale(1.03); } 100% { opacity:1; transform: scale(1); } }
.reveal { opacity: 0; animation: fadeUp .6s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
}

/* ---------- Hero greeting banner ---------- */
.hero-banner {
  position: relative; overflow: hidden; border-radius: var(--wa-radius);
  background-image: var(--wa-gradient); color: #fff;
  padding: 26px 30px; box-shadow: 0 16px 40px rgba(58,100,41,.28);
  margin-bottom: 22px;
}
.hero-banner::before, .hero-banner::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
  animation: floaty 9s ease-in-out infinite;
}
.hero-banner::before { width: 260px; height: 260px; right: -60px; top: -120px; }
.hero-banner::after  { width: 180px; height: 180px; right: 120px; bottom: -110px; animation-delay: -3s; background: rgba(255,255,255,.08); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
.hero-banner .hero-inner { position: relative; z-index: 2; }
.hero-banner h1 { color: #fff; font-size: 25px; margin: 0 0 4px; letter-spacing: -.02em; }
.hero-banner p { color: rgba(255,255,255,.92); margin: 0; font-size: 14px; }
.hero-banner .hero-date { font-size: 12.5px; color: rgba(255,255,255,.85); }
.hero-banner .btn-hero {
  background: #fff; color: var(--wa-forest); border: none; font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}
.hero-banner .btn-hero:hover { color: var(--wa-forest); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.2); }
/* Moving shine sweep */
.hero-banner .shine {
  position: absolute; top: 0; left: 0; width: 60%; height: 100%; z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-150%); animation: sweep 6s ease-in-out infinite;
}
@keyframes sweep { 0% { transform: translateX(-150%); } 55%,100% { transform: translateX(320%); } }

/* ---------- Premium KPI cards ---------- */
.kpi-premium { position: relative; overflow: hidden; }
.kpi-premium::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 90px; height: 90px;
  border-radius: 50%; background: var(--wa-gradient-soft); opacity: .7;
}
.kpi-premium .kpi-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.kpi-premium .kpi-icon { margin-bottom: 0; transition: transform .25s; }
.kpi-premium:hover .kpi-icon { transform: scale(1.08) rotate(-4deg); }
.kpi-premium .kpi-value { font-variant-numeric: tabular-nums; margin-top: 14px; position: relative; z-index: 2; }
.kpi-premium .kpi-trend { position: relative; z-index: 2; }
.kpi-trend-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}
.kpi-trend-chip.up { background: #e5f6ec; color: #2fa36a; }
.kpi-trend-chip.flat { background: #eef3f1; color: #7a8a83; }
.kpi-trend-chip.warn { background: #fdf2df; color: #d99323; }

/* Card header polish */
.card-title-lg { font-size: 15.5px; font-weight: 700; color: var(--wa-ink); display: inline-flex; align-items: center; }

/* Progress bar shimmer */
.progress-slim { height: 8px; background: #eef3f1; border-radius: 6px; overflow: hidden; }
.progress-slim > span { display: block; height: 100%; background-image: var(--wa-gradient); border-radius: 6px;
  animation: growBar 1s cubic-bezier(.2,.7,.3,1) both; }
@keyframes growBar { from { width: 0 !important; } }

/* Chart card entrance */
.chart-card canvas { animation: fadeSoft .8s ease both; }

/* =====================================================================
   NOTIFICATION DROPDOWN (topbar bell)
   ===================================================================== */
.notif-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef5b5b; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 20px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(239,91,91,.45);
  box-sizing: border-box; z-index: 3;
}
#notifBell { animation: none; }
.notif-menu { width: 360px; max-width: 92vw; padding: 0; overflow: hidden; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--wa-line); font-weight: 700; color: var(--wa-ink); font-size: 14px;
}
.notif-count-chip { background: #fbe7e7; color: #d95151; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.notif-body { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--wa-line); transition: background .14s; color: var(--wa-body);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f4faf7; }
.notif-ic {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 40px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.notif-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.notif-title { font-size: 13.5px; color: var(--wa-ink); line-height: 1.3; }
.notif-title strong { font-weight: 700; }
.notif-time { font-size: 11.5px; color: var(--wa-muted); margin-top: 3px; }
.notif-arrow { color: #c7d5cf; font-size: 13px; }
.notif-item:hover .notif-arrow { color: var(--wa-green); }
.notif-empty { text-align: center; padding: 34px 20px; color: var(--wa-muted); }
.notif-empty i { font-size: 40px; color: #bfe6cf; display: block; margin-bottom: 8px; }
.notif-empty small { font-size: 12px; }
.notif-foot {
  display: block; text-align: center; padding: 12px; font-weight: 650; font-size: 13px;
  color: var(--wa-forest); border-top: 1px solid var(--wa-line); background: #f7faf9;
}
.notif-foot:hover { background: #eef6f1; color: var(--wa-forest); }

/* =====================================================================
   DOCUMENT TILE LAYOUT FIX (contain long filenames + keep actions inside)
   ===================================================================== */
.doc-tile { overflow: hidden; }
.doc-tile .doc-ic { flex-shrink: 0; }
.doc-tile .doc-info { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.doc-tile .doc-info .cell-primary,
.doc-tile .doc-info .cell-sub {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.doc-tile .doc-actions { flex-shrink: 0; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.doc-tile .doc-actions .btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.doc-tile .doc-actions form { display: inline-flex; }

/* =====================================================================
   LIVE CANDIDATE SEARCH RESULTS (Live Tracking)
   ===================================================================== */
.search-hit {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--wa-line); border-radius: 13px; background: #fff;
  transition: transform .14s, box-shadow .14s, border-color .14s; color: var(--wa-body);
  animation: fadeUp .3s ease both;
}
.search-hit:hover { transform: translateY(-2px); box-shadow: var(--wa-shadow); border-color: #d4e6dc; color: var(--wa-body); }
.search-hit .sh-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 3px; }
.search-hit .sh-name { font-weight: 700; color: var(--wa-ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hit .sh-uid { font-weight: 600; font-size: 11px; color: var(--wa-muted); }
.search-hit .sh-sub { font-size: 12px; color: var(--wa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hit .sh-bar { display: block; height: 5px; background: #eef3f1; border-radius: 4px; overflow: hidden; margin-top: 4px; max-width: 320px; }
.search-hit .sh-bar > span { display: block; height: 100%; background-image: var(--wa-gradient); border-radius: 4px; }
.search-hit .sh-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.search-hit .sh-ago { font-size: 11px; color: var(--wa-muted); }
.search-hit .sh-arrow { color: #c7d5cf; flex-shrink: 0; }
.search-hit:hover .sh-arrow { color: var(--wa-green); }
@media (max-width: 575.98px) {
  .search-hit .sh-side { display: none; }
}

/* =====================================================================
   MULTI-STEP WIZARD (post-joining forms)  - premium, fully responsive
   ===================================================================== */
/* Steps are only hidden once JS activates, so the form still works without JS. */
.wz-active .wz-step { display: none; }
.wz-active .wz-step.is-active { display: block; animation: wzIn .38s cubic-bezier(.2,.7,.3,1); }
@keyframes wzIn { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .wz-active .wz-step.is-active { animation: none; } }

/* ---- Sticky progress header ---- */
.wz-head {
  position: sticky; top: 0; z-index: 20; margin: 0 0 20px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border: 1px solid var(--wa-line); border-radius: var(--wa-radius);
  box-shadow: var(--wa-shadow); padding: 16px 18px;
}
.wz-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wz-title { font-size: 15.5px; font-weight: 800; color: var(--wa-ink); letter-spacing: -.02em; line-height: 1.2; }
.wz-sub { font-size: 12px; color: var(--wa-muted); margin-top: 2px; }
.wz-count {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 800; color: var(--wa-forest);
  background: var(--wa-gradient-soft); border: 1px solid #dcebe3;
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
/* Thin gradient progress bar */
.wz-bar { height: 6px; background: #eef3f1; border-radius: 6px; overflow: hidden; }
.wz-bar > span {
  display: block; height: 100%; width: 0; border-radius: 6px;
  background-image: var(--wa-gradient); transition: width .45s cubic-bezier(.2,.7,.3,1);
}

/* ---- Step dots rail (desktop) ---- */
.wz-rail { display: flex; align-items: flex-start; gap: 0; margin-top: 14px; }
.wz-node { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; position: relative; }
.wz-node .wz-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: #eef3f1; color: #8a9a95;
  border: 2px solid transparent; transition: all .25s ease; position: relative; z-index: 2;
}
.wz-node .wz-lbl {
  font-size: 10.5px; font-weight: 700; color: var(--wa-muted); text-align: center;
  line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* connector between nodes */
.wz-node::before {
  content: ""; position: absolute; top: 14px; left: 0; right: 50%; height: 2px; background: var(--wa-line); z-index: 1;
}
.wz-node::after {
  content: ""; position: absolute; top: 14px; left: 50%; right: 0; height: 2px; background: var(--wa-line); z-index: 1;
}
.wz-node:first-child::before, .wz-node:last-child::after { display: none; }
.wz-node.is-done .wz-dot { background: #e5f6ec; color: #2fa36a; border-color: #bfe6cf; }
.wz-node.is-done::before, .wz-node.is-done::after { background: #bfe6cf; }
.wz-node.is-active .wz-dot {
  background-image: var(--wa-gradient); color: #fff;
  box-shadow: 0 0 0 4px rgba(60,184,120,.18), 0 6px 14px rgba(60,184,120,.32); transform: scale(1.08);
}
.wz-node.is-active .wz-lbl { color: var(--wa-ink); }
.wz-node.is-active::before { background: #bfe6cf; }
.wz-node.is-clickable { cursor: pointer; }
.wz-node.is-clickable:hover .wz-dot { border-color: var(--wa-green); }

/* ---- Footer navigation ---- */
.wz-nav { display: flex; align-items: center; gap: 12px; margin: 20px 0 40px; flex-wrap: wrap; }
.wz-nav .wz-spacer { flex: 1 1 auto; }
.wz-nav .btn { min-width: 132px; }
.wz-saved { font-size: 12px; color: var(--wa-muted); display: inline-flex; align-items: center; gap: 6px; }

/* ---- Long legal document viewer ---- */
.legal-box {
  position: relative; max-height: 420px; overflow-y: auto;
  border: 1px solid var(--wa-line); border-radius: 12px; padding: 18px 20px;
  background: linear-gradient(180deg,#fbfdfc,#ffffff); scroll-behavior: smooth;
}
.legal-box::-webkit-scrollbar { width: 8px; }
.legal-box::-webkit-scrollbar-thumb { background: #cfdbd5; border-radius: 8px; }
.legal-wrap { position: relative; }
.legal-wrap .legal-fade {
  position: absolute; left: 1px; right: 9px; bottom: 1px; height: 44px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%);
  border-radius: 0 0 12px 12px; transition: opacity .25s;
}
.legal-wrap.at-end .legal-fade { opacity: 0; }
.legal-scrollhint {
  position: absolute; right: 18px; bottom: 12px; z-index: 3;
  background: var(--wa-ink); color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.18);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: opacity .25s, transform .25s;
}
.legal-wrap.at-end .legal-scrollhint { opacity: 0; transform: translateY(6px); pointer-events: none; }
/* Acceptance row */
.accept-row {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: #f7faf9; border: 1px solid var(--wa-line); transition: all .2s;
}
.accept-row:has(input:checked) { background: #f2fbf6; border-color: #bfe6cf; }
.accept-row .form-check-label { font-size: 13.5px; font-weight: 600; color: var(--wa-ink); }

/* ---- Review summary (final step) ---- */
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; }
.rv-item { min-width: 0; }
.rv-item .rv-k { font-size: 11px; color: var(--wa-muted); text-transform: uppercase; letter-spacing: .04em; }
.rv-item .rv-v { font-size: 13.5px; font-weight: 650; color: var(--wa-ink); overflow-wrap: anywhere; }
.rv-ack { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
  .wz-head { padding: 13px 14px; border-radius: 13px; }
  .wz-rail { display: none; }                 /* dots rail -> compact bar + counter */
  .wz-title { font-size: 14.5px; }
  .wz-nav .btn { min-width: 0; flex: 1 1 46%; }
  .legal-box { max-height: 340px; padding: 15px 16px; }
}
@media (max-width: 991.98px) and (min-width: 768px) {
  .wz-node .wz-lbl { font-size: 9.5px; }
}


/* =====================================================================
   Forgot password / account recovery
   ===================================================================== */

/* ---- Stepper ---- */
.pw-steps {
  list-style: none; padding: 0; margin: 0 0 26px;
  display: flex; align-items: flex-start; gap: 6px; counter-reset: pwstep;
}
.pw-steps li {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
}
.pw-steps li::before {
  content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px;
  background: var(--wa-line); z-index: 0;
}
.pw-steps li:first-child::before { display: none; }
.pw-steps li.active::before, .pw-steps li.done::before { background: var(--wa-green); }
.pw-steps .pw-dot {
  position: relative; z-index: 1;
  width: 29px; height: 29px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800;
  background: var(--wa-card); color: var(--wa-muted);
  border: 2px solid var(--wa-line); transition: all .25s ease;
}
.pw-steps li.active .pw-dot {
  background: var(--wa-gradient); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(60,184,120,.35);
}
.pw-steps li.done .pw-dot { background: var(--wa-green); color: #fff; border-color: transparent; }
.pw-steps .pw-label {
  font-size: 11px; font-weight: 650; color: var(--wa-muted); line-height: 1.3;
  overflow-wrap: anywhere;
}
.pw-steps li.active .pw-label { color: var(--wa-ink); }
.pw-steps li.done .pw-label { color: var(--wa-green); }

/* ---- One-time code boxes ---- */
.otp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 4px 0 2px; }
.otp-box {
  width: 100%; aspect-ratio: 1 / 1.18; min-height: 52px;
  text-align: center; font-size: 22px; font-weight: 800; color: var(--wa-ink);
  border: 1.5px solid var(--wa-line); border-radius: 12px; background: #f9fbfa;
  transition: border-color .18s, box-shadow .18s, background .18s, transform .12s;
  padding: 0; -moz-appearance: textfield;
}
.otp-box::-webkit-outer-spin-button, .otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-box.filled { background: #fff; border-color: #bfe6cf; }
.otp-box:focus {
  outline: none; background: #fff; border-color: var(--wa-green);
  box-shadow: 0 0 0 3.5px rgba(60,184,120,.16); transform: translateY(-1px);
}

/* ---- Expiry countdown ---- */
.otp-timer {
  margin: 14px 0 0; font-size: 12.8px; color: var(--wa-muted);
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.otp-timer strong { color: var(--wa-forest); font-variant-numeric: tabular-nums; }
.otp-timer.urgent, .otp-timer.urgent strong { color: #c0504d; }
.otp-timer.expired { color: #c0504d; }

/* ---- Inline text links ---- */
.pw-link {
  font-size: 13px; font-weight: 650; color: var(--wa-green);
  text-decoration: none; border: 0; background: none; vertical-align: baseline;
}
.pw-link:hover { color: var(--wa-forest); text-decoration: underline; }
.pw-link.muted { color: var(--wa-muted); font-weight: 600; }
.pw-link.muted:hover { color: var(--wa-ink); }
.pw-link:disabled { color: var(--wa-muted); text-decoration: none; cursor: not-allowed; opacity: .75; }

/* ---- Password strength ---- */
.pw-meter { height: 5px; border-radius: 99px; background: var(--wa-line); overflow: hidden; }
.pw-meter > span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s ease, background .3s ease; }
.pw-meter[data-level='weak']   > span { background: #d95151; }
.pw-meter[data-level='fair']   > span { background: #e0a032; }
.pw-meter[data-level='good']   > span { background: #61b441; }
.pw-meter[data-level='strong'] > span { background: var(--wa-gradient); }

.pw-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.pw-rules li { font-size: 11.8px; color: var(--wa-muted); display: flex; align-items: center; gap: 5px; transition: color .2s; }
.pw-rules li i { font-size: 11px; }
.pw-rules li.ok { color: var(--wa-green); }
.pw-rules li:first-child { grid-column: 1 / -1; }

.pw-match { font-size: 12.2px; margin-top: 6px; min-height: 17px; font-weight: 600; }
.pw-match.ok  { color: var(--wa-green); }
.pw-match.bad { color: #c0504d; }

@media (max-width: 575.98px) {
  .otp-grid { gap: 6px; }
  .otp-box { font-size: 19px; min-height: 46px; border-radius: 10px; }
  .pw-steps .pw-label { font-size: 10px; }
  .pw-rules { grid-template-columns: 1fr; }
}
/* ---- Two-factor badge on the sign-in screen ---- */
.mfa-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--wa-forest); background: #f2fbf6; border: 1px solid #bfe6cf;
  border-radius: 99px; padding: 5px 12px; margin-bottom: 14px;
}
.mfa-badge i { font-size: 12px; color: var(--wa-green); }

/* =====================================================================
   Dashboard: clickable KPI cards + pending analytics tiles
   ===================================================================== */

/* ---- Amber gradient for the "not submitted" card ---- */
.grad-amber { background-image: linear-gradient(135deg, #e6a532, #d98324); }

/* ---- KPI cards are links, but must not look like text links ---- */
.kpi-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.kpi-link:hover, .kpi-link:focus { text-decoration: none; color: inherit; }
.kpi-link .card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.kpi-link:hover .card { transform: translateY(-3px); box-shadow: var(--wa-shadow-lg); border-color: #bfe6cf; }
.kpi-link:focus-visible .card { outline: 2px solid var(--wa-green); outline-offset: 2px; }

.kpi-card .kpi-top { display: flex; align-items: flex-start; justify-content: space-between; }
.kpi-go {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--wa-muted); background: #f4f8f6;
  opacity: 0; transform: translateX(-4px); transition: all .18s ease;
}
.kpi-link:hover .kpi-go { opacity: 1; transform: translateX(0); color: #fff; background: var(--wa-green); }

/* ---- Pending breakdown tiles ---- */
.pend-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  height: 100%; padding: 13px 14px; text-decoration: none;
  border: 1px solid var(--wa-line); border-radius: 13px; background: #fff;
  border-left: 3px solid var(--tc, var(--wa-green));
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.pend-tile:hover {
  transform: translateY(-2px); background: #fbfdfc;
  box-shadow: 0 8px 20px rgba(31,68,52,.09); text-decoration: none;
}
.pend-tile:focus-visible { outline: 2px solid var(--tc, var(--wa-green)); outline-offset: 2px; }
.pend-tile .pt-ico { font-size: 15px; color: var(--tc, var(--wa-green)); line-height: 1; margin-bottom: 3px; }
.pend-tile .pt-val { font-size: 25px; font-weight: 800; color: var(--wa-ink); line-height: 1.05; }
.pend-tile .pt-lbl { font-size: 11.3px; font-weight: 600; color: var(--wa-muted); line-height: 1.3; overflow-wrap: anywhere; }

@media (max-width: 991.98px) {
  .pend-tile .pt-val { font-size: 22px; }
  .kpi-go { display: none; }
}

/* ---- Rich inline alert on the account-recovery screens ---- */
.pw-alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 15px; margin-bottom: 18px;
  border-radius: 13px; border: 1px solid; background: #fff;
}
.pw-alert .pa-ic {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.pw-alert .pa-body { min-width: 0; }
.pw-alert .pa-title { font-size: 14px; font-weight: 750; line-height: 1.3; margin-bottom: 3px; }
.pw-alert .pa-text  { font-size: 13.2px; line-height: 1.55; color: var(--wa-body); overflow-wrap: anywhere; }
.pw-alert .pa-hint  { font-size: 12.4px; line-height: 1.55; color: var(--wa-muted); margin-top: 7px; }

.pw-alert-danger  { border-color: #f2c9c6; background: #fdf6f5; }
.pw-alert-danger  .pa-ic { background: #fdecea; color: #c0504d; }
.pw-alert-danger  .pa-title { color: #a53d3a; }

.pw-alert-warning { border-color: #f2dcae; background: #fffcf5; }
.pw-alert-warning .pa-ic { background: #fdf2df; color: #8a6220; }
.pw-alert-warning .pa-title { color: #8a6220; }

.pw-alert-info    { border-color: #bfe6cf; background: #f7fbf9; }
.pw-alert-info    .pa-ic { background: #f0f7f3; color: var(--wa-forest); }
.pw-alert-info    .pa-title { color: var(--wa-forest); }

/* =====================================================================
   CSP: inline style attributes replaced by data-s hooks
   ---------------------------------------------------------------------
   Generated - do not hand-edit. These rules replace the inline
   style="..." attributes that previously forced
   style-src-attr 'unsafe-inline' in the Content-Security-Policy
   (CERT-IN finding 4, CWE-693). The doubled attribute selector gives
   specificity (0,2,0) so these win over single-class rules, matching
   the precedence the inline attribute used to have.
   ===================================================================== */
[data-s="1"][data-s]{border-radius:11px;font-size:13.5px;}
[data-s="2"][data-s]{font-size:13px;}
[data-s="3"][data-s]{font-size:12.2px;}
[data-s="4"][data-s]{border-radius:11px;font-size:13px;}
[data-s="5"][data-s]{background:var(--wa-gradient-soft);border:none;border-radius:11px;font-size:13px;color:var(--wa-forest);}
[data-s="6"][data-s]{border-radius:12px;}
[data-s="7"][data-s]{background:#f4f7f6;border-radius:12px;padding:14px;}
[data-s="8"][data-s]{width:100%;height:auto;display:block;border-radius:8px;box-shadow:var(--wa-shadow);}
[data-s="9"][data-s]{font-weight:600;}
[data-s="10"][data-s]{border-top:1px dashed var(--wa-line);}
[data-s="11"][data-s]{font-size:12px;align-self:center;}
[data-s="12"][data-s]{display:none;}
[data-s="13"][data-s]{font-size:22px;margin:0;}
[data-s="14"][data-s]{background:var(--wa-gradient-soft);border:none;border-radius:11px;font-size:12.5px;color:var(--wa-forest);}
[data-s="15"][data-s]{padding:26px;}
[data-s="16"][data-s]{font-weight:500;}
[data-s="17"][data-s]{font-weight:700;color:var(--wa-ink);font-size:13.5px;}
[data-s="18"][data-s]{padding:24px;}
[data-s="19"][data-s]{border:none;border-radius:16px;overflow:hidden;}
[data-s="20"][data-s]{font-weight:700;}
[data-s="21"][data-s]{font-size:13.5px;}
[data-s="22"][data-s]{max-width:420px;flex:1;}
[data-s="23"][data-s]{border-radius:12px;background:#f0f7f3;border:1px solid #bfe6cf;color:var(--wa-forest);font-size:13.5px;}
[data-s="24"][data-s]{font-size:12.5px;}
[data-s="25"][data-s]{cursor:pointer;}
[data-s="26"][data-s]{display:flex;align-items:center;justify-content:center;min-height:100vh;}
[data-s="27"][data-s]{width:100%;max-width:460px;}
[data-s="28"][data-s]{height:38px;}
[data-s="29"][data-s]{font-size:22px;}
[data-s="30"][data-s]{font-size:14px;}
[data-s="31"][data-s]{font-size:11px;}
[data-s="32"][data-s]{height:40px;}
[data-s="33"][data-s]{--d:0s;}
[data-s="34"][data-s]{font-size:30px;font-weight:800;line-height:1;}
[data-s="35"][data-s]{font-size:11.5px;opacity:.9;margin-top:4px;}
[data-s="36"][data-s]{width:1px;height:44px;background:rgba(255,255,255,.3);}
[data-s="37"][data-s]{width:50px;height:50px;font-size:23px;}
[data-s="38"][data-s]{--d:.2s;}
[data-s="39"][data-s]{background:#fdecea;color:#c0504d;border-color:#f5c6c2;}
[data-s="40"][data-s]{width:148px;}
[data-s="41"][data-s]{font-size:12.8px;}
[data-s="42"][data-s]{position:relative;height:300px;}
[data-s="43"][data-s]{display:none;position:absolute;inset:0;align-items:center;justify-content:center;flex-direction:column;background:#fff;}
[data-s="44"][data-s]{font-weight:650;}
[data-s="45"][data-s]{font-size:11.8px;}
[data-s="46"][data-s]{color:#c0504d;}
[data-s="47"][data-s]{--d:.28s;}
[data-s="48"][data-s]{position:relative;height:322px;}
[data-s="49"][data-s]{--d:.34s;}
[data-s="50"][data-s]{position:relative;height:302px;}
[data-s="51"][data-s]{--d:.4s;}
[data-s="52"][data-s]{position:relative;height:280px;}
[data-s="53"][data-s]{--d:.46s;}
[data-s="54"][data-s]{--d:.52s;}
[data-s="55"][data-s]{font-weight:600;font-size:13.5px;}
[data-s="56"][data-s]{--d:.58s;}
[data-s="57"][data-s]{padding-bottom:18px;}
[data-s="58"][data-s]{gap:8px;}
[data-s="59"][data-s]{border-radius:10px;font-weight:650;}
[data-s="60"][data-s]{font-weight:600;color:var(--wa-ink);}
[data-s="61"][data-s]{font-size:20px;margin:0;}
[data-s="62"][data-s]{font-weight:700;font-size:13.5px;}
[data-s="63"][data-s]{font-weight:700;font-size:13px;}
[data-s="64"][data-s]{text-transform:uppercase;}
[data-s="65"][data-s]{text-align:right;font-weight:600;}
[data-s="66"][data-s]{font-weight:700;font-size:16px;color:var(--wa-ink);}
[data-s="67"][data-s]{width:48px;height:48px;font-size:22px;}
[data-s="68"][data-s]{width:46px;height:46px;font-size:20px;margin-bottom:12px;}
[data-s="69"][data-s]{font-size:10px;}
[data-s="70"][data-s]{font-size:17px;}
[data-s="71"][data-s]{font-size:13px;min-height:38px;}
[data-s="72"][data-s]{max-width:640px;}
[data-s="73"][data-s]{max-width:720px;}
[data-s="74"][data-s]{max-width:560px;}
[data-s="75"][data-s]{width:2.6em;height:1.35em;cursor:pointer;}
[data-s="76"][data-s]{border-radius:11px;font-size:13px;max-width:720px;}
[data-s="77"][data-s]{font-family:monospace;font-size:11px;cursor:pointer;}
[data-s="78"][data-s]{font-family:monospace;font-size:12.5px;}
[data-s="79"][data-s]{width:46px;height:46px;font-size:20px;}
[data-s="80"][data-s]{font-size:24px;}
[data-s="81"][data-s]{width:230px;}
[data-s="82"][data-s]{padding:40px;}
[data-s="83"][data-s]{border-color:#cfdbd5;border-top-color:#3cb878;width:28px;height:28px;}
[data-s="84"][data-s]{cursor:default;}
[data-s="85"][data-s]{font-size:12px;}
[data-s="86"][data-s]{color:var(--wa-ink);}
[data-s="87"][data-s]{max-width:560px;margin:40px auto;}
[data-s="88"][data-s]{width:64px;height:64px;font-size:30px;}
[data-s="89"][data-s]{max-width:600px;margin:40px auto;}
[data-s="90"][data-s]{width:72px;height:72px;font-size:34px;}
[data-s="91"][data-s]{font-size:26px;}
[data-s="92"][data-s]{min-width:0;}
[data-s="93"][data-s]{border-color:#bfe6cf;background:linear-gradient(120deg,#f4fbf7,#ffffff);}
[data-s="94"][data-s]{width:42px;height:42px;font-size:19px;flex:0 0 42px;}
[data-s="95"][data-s]{font-weight:700;color:var(--wa-ink);font-size:14.5px;}
[data-s="96"][data-s]{font-weight:700;color:var(--wa-ink);font-size:14px;}
[data-s="97"][data-s]{font-weight:400;}
[data-s="98"][data-s]{max-height:340px;}
[data-s="99"][data-s]{background:#f7faf9;border-left:3px solid var(--wa-green);border-radius:8px;padding:10px 13px;margin:0 0 16px;font-size:12.6px;color:#4a5a52;}
[data-s="100"][data-s]{font-weight:600;color:var(--wa-muted);font-size:12.5px;}
[data-s="101"][data-s]{opacity:.85;}
[data-s="102"][data-s]{min-width:170px;font-size:12px;justify-content:flex-start;}
[data-s="103"][data-s]{background:#f7faf9;border-left:3px solid var(--wa-green);border-radius:8px;padding:10px 13px;margin-top:16px;font-size:12.6px;color:#4a5a52;}
[data-s="104"][data-s]{color:var(--wa-body);}


/* ---- CSP: replacements for the last dynamic inline styles ---- */
/* Conditional visibility (prejoin wizard). Toggled by classList, never by an
   inline style attribute, so nothing needs style-src-attr 'unsafe-inline'. */
.wa-hide { display: none !important; }

/* Pagination links - the active state used to be an inline background-image. */
.wa-page { border-radius: 8px; margin: 0 2px; }
.wa-page-on { background-image: var(--wa-gradient); border-color: transparent; }