@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
  --navy: #1B2A4A;
  --navy-deep: #0F1A2E;
  --navy-mid: #243656;
  --teal: #0E7490;
  --teal-dark: #0C5F75;
  --teal-soft: #E6F4F7;
  --teal-glow: rgba(14, 116, 144, 0.15);
  --canvas: #EEF2F6;
  --surface: #FFFFFF;
  --ink: #1C2434;
  --ink-muted: #5C6678;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --green: #047857;
  --green-bg: #ECFDF5;
  --green-ring: #A7F3D0;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --amber-ring: #FDE68A;
  --red: #B91C1C;
  --red-bg: #FEF2F2;
  --red-ring: #FECACA;
  --grey-bg: #F1F5F9;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 74, 0.06);
  --shadow: 0 8px 30px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 26, 46, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--navy);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.65rem, 2.5vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--teal); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--teal-dark); }

/* ── App shell ── */
.shell {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}

.rail {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: #fff;
  padding: 1.35rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 4px 0 24px rgba(15, 26, 46, 0.12);
}

.rail-top { margin-bottom: 1.25rem; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius);
  transition: background 0.15s var(--ease);
}
.brand:hover { background: rgba(255,255,255,0.06); color: #fff; }

.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.brand-text strong {
  display: block;
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}
.brand-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 0.15rem;
}

.rail-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0 0.65rem;
  margin-bottom: 0.35rem;
}

.rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: stretch;
}

.rail nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255,255,255,0.72);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s var(--ease);
  flex: 0 0 auto;
}

.rail nav a .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.rail nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.rail nav a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(14,116,144,0.35), rgba(14,116,144,0.12));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.2);
}

.rail nav a[aria-current="page"] .nav-icon {
  background: var(--teal);
  color: #fff;
}

.rail-foot {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: auto;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.5rem;
  margin-bottom: 0.65rem;
}

.user-pill .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0891b2);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.user-pill-meta strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.2;
}
.user-pill-meta span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
}

.rail-foot .logout-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.15s var(--ease);
}
.rail-foot .logout-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

/* ── Main content ── */
.main {
  padding: 1.75rem 2rem 3rem;
  overflow-x: auto;
  max-width: 1400px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.page-head .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.page-head p {
  color: var(--ink-muted);
  margin: 0.35rem 0 0;
  max-width: 54ch;
  font-size: 0.95rem;
}

.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--navy-mid), var(--navy-deep));
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 26, 46, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 26, 46, 0.3);
  color: #fff;
}

.btn-teal {
  background: linear-gradient(180deg, #0e8fad, var(--teal-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 116, 144, 0.3);
}
.btn-teal:hover { color: #fff; transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--grey-bg); color: var(--ink); border-color: var(--line-strong); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; border-radius: 8px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }

.btn-block { width: 100%; }

/* ── Flash messages ── */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.flash.ok { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-ring); }
.flash.error { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-ring); }

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
}
.stat.stat-green::before { background: var(--green); }
.stat.stat-amber::before { background: var(--amber); }
.stat.stat-navy::before { background: var(--navy); }

.stat strong {
  display: block;
  font-size: 1.85rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Board / table ── */
.board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafbfc, #f8fafc);
}

.board-toolbar input,
.board-toolbar select {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.88rem;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.board-toolbar input:focus,
.board-toolbar select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.board-toolbar input { min-width: 240px; flex: 1; }

.table-wrap { overflow-x: auto; }

.crm-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.crm-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--navy-deep);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.crm-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.crm-table tbody tr { transition: background 0.12s; }
.crm-table tbody tr:hover td { background: #F8FAFC; }
.crm-table tbody tr:last-child td { border-bottom: none; }

.crm-table tbody tr.expiry-warning td {
  background: #FFF7ED;
}
.crm-table tbody tr.expiry-warning:hover td {
  background: #FFEDD5;
}
.crm-table tbody tr.expiry-critical td {
  background: #FEF2F2;
}
.crm-table tbody tr.expiry-critical:hover td {
  background: #FEE2E2;
}
.crm-table tbody tr.expiry-critical .person-meta strong,
.crm-table tbody tr.expiry-critical td {
  color: #991B1B;
}
.crm-table tbody tr.expiry-warning .person-meta strong {
  color: #9A3412;
}

.expiry-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.expiry-tag.warning {
  background: #FFEDD5;
  color: #9A3412;
}
.expiry-tag.critical {
  background: #FECACA;
  color: #991B1B;
}

.password-plain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  background: #F1F5F9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.board-toolbar select { min-width: 150px; }

.person { display: flex; align-items: center; gap: 0.75rem; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-soft), #dbeafe);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
.person-meta strong { display: block; color: var(--ink); font-weight: 600; }
.person-meta span { font-size: 0.78rem; color: var(--ink-muted); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge.grey { background: var(--grey-bg); color: #64748B; border-color: #E2E8F0; }
.badge.amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-ring); }
.badge.green { background: var(--green-bg); color: var(--green); border-color: var(--green-ring); }
.badge.red { background: var(--red-bg); color: var(--red); border-color: var(--red-ring); }
.badge.teal { background: var(--teal-soft); color: var(--teal-dark); border-color: #99F6E4; }

.table-link {
  color: inherit;
  text-decoration: none;
}
.table-link:hover strong { color: var(--teal-dark); text-decoration: underline; }

.article-preview {
  max-height: 420px;
  overflow: auto;
  padding: 1rem 1.1rem;
  background: #FAFBFC;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink);
}

/* ── Cards & panels ── */
.card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.card h3, .panel h3 { font-size: 1.05rem; margin: 0; }

/* ── Forms ── */
.form-grid { display: grid; gap: 1rem; max-width: 680px; }
.form-section {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.form-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.form-section h3 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-section h3::before {
  content: '';
  width: 4px;
  height: 1em;
  background: var(--teal);
  border-radius: 2px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row .hint { font-size: 0.78rem; color: var(--ink-muted); margin-top: 0.3rem; }
.form-row input[disabled] { background: var(--grey-bg); color: var(--ink-muted); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.work-schedule {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.work-schedule-head,
.work-schedule-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
}
.work-schedule-head {
  background: var(--grey-bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.work-schedule-row + .work-schedule-row { border-top: 1px solid var(--line); }
.work-day-label { font-weight: 600; font-size: 0.9rem; }
.work-day-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-day-check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--teal);
}
.work-schedule-row input[type="time"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--teal);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-input-wrap {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem;
  background: #FAFBFC;
  transition: border-color 0.15s, background 0.15s;
}
.file-input-wrap:hover { border-color: var(--teal); background: var(--teal-soft); }
.file-input-wrap input[type="file"] { font-size: 0.85rem; width: 100%; }

/* ── Login ── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-brand {
  background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 55%, var(--teal-dark) 100%);
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(14,116,144,0.35), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
}

.login-brand-inner { position: relative; z-index: 1; }

.login-brand .brand { color: #fff; padding: 0; margin-bottom: 2rem; }
.login-brand .brand:hover { background: transparent; }

.login-brand h2 {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: #fff;
  max-width: 16ch;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.login-brand p {
  color: rgba(255,255,255,0.72);
  max-width: 38ch;
  font-size: 1rem;
  line-height: 1.65;
}

.login-features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
}

.login-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--canvas);
}

.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.login-card .sub {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.login-error {
  background: var(--red-bg);
  color: var(--red);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  border: 1px solid var(--red-ring);
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.login-back:hover { color: var(--teal); }

/* ── Articles ── */
.article-grid { display: grid; gap: 1rem; }

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}
.article-card:hover { box-shadow: var(--shadow); }

.article-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.lang-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.article-card h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.article-card .desc { font-size: 0.88rem; color: var(--ink-muted); margin: 0 0 1rem; }

.article-submit {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.article-submit input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.85rem;
}

/* ── KYC ── */
.kyc-steps { display: grid; gap: 1.25rem; max-width: 780px; }

.notice {
  background: var(--teal-soft);
  border: 1px solid #BAE6FD;
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  margin: 0 0 1rem;
  color: var(--navy);
}
.notice.success { background: var(--green-bg); border-color: var(--green-ring); border-left-color: var(--green); }
.notice.warn { background: var(--red-bg); border-color: var(--red-ring); border-left-color: var(--red); }

.doc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
}
.doc-options label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
}
.doc-options label:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 600;
}

.hidden-block { display: none; }
.hidden-block.show { display: block; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.check-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.88rem;
  padding: 1rem;
  background: var(--grey-bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.check-row input { margin-top: 0.2rem; accent-color: var(--teal); }

.kyc-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.kyc-file {
  background: var(--grey-bg);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  border: 1px solid var(--line);
  text-align: center;
  transition: border-color 0.15s;
}
.kyc-file:hover { border-color: var(--teal); }
.kyc-file a { font-weight: 600; display: block; margin-top: 0.35rem; }

/* ── Dashboard quick actions ── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.action-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.action-tile:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.action-tile strong { font-size: 0.92rem; color: var(--navy); }
.action-tile span { font-size: 0.78rem; color: var(--ink-muted); }

.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--ink-muted);
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.detail-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.detail-item span { font-size: 0.95rem; color: var(--ink); }

.copy-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.copy-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.85rem;
  background: var(--grey-bg);
  color: var(--ink);
}
.reg-link-panel { margin-bottom: 1.25rem; }

@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { padding: 2rem; min-height: auto; }
  .login-brand h2 { font-size: 1.5rem; }
  .login-features { display: none; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: relative;
    height: auto;
    padding: 1rem;
  }
  .rail nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .rail nav a { padding: 0.5rem 0.65rem; }
  .main { padding: 1.25rem 1rem 2rem; }
  .form-2, .upload-grid { grid-template-columns: 1fr; }
}
