/* public/css/style.css — AKU Financial Assistance Portal */

/* ── Root Variables ─────────────────────────────────────────── */
:root {
  --aku-green: #006B3C;
  --aku-green-dark: #005230;
  --aku-green-light: #e8f5ee;
  --aku-red: #C8360E;
  --aku-orange: #E05A2B;
  --accent-blue: #1a73e8;
  --accent-purple: #7c3aed;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;

  --text: #1e293b;
  --text-2: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--aku-green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--aku-green);
  color: white;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 64px;
}
.header-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-logo { height: 36px; width: 36px; object-fit: contain; border-radius: 8px; }
.brand-name { font-size: 1rem; font-weight: 700; color: white; display: block; }
.brand-sub { font-size: 0.72rem; color: rgba(255,255,255,.75); display: block; }
.header-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: white;
}
.user-name { font-size: 0.85rem; font-weight: 600; color: white; display: block; }
.user-role { font-size: 0.72rem; color: rgba(255,255,255,.7); display: block; text-transform: capitalize; }
.btn-logout {
  color: rgba(255,255,255,.8); padding: 6px; border-radius: var(--radius-sm);
  display: flex; align-items: center; transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.15); color: white; text-decoration: none; }
.btn-logout svg { width: 18px; height: 18px; }
.mobile-menu-toggle { display: none; background: none; border: none; color: white; cursor: pointer; padding: 6px; }

/* ── Page Layout ────────────────────────────────────────────── */
.page-wrapper { min-height: calc(100vh - 64px - 52px); }
.page-content { max-width: 1300px; margin: 0 auto; padding: 32px 24px; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.page-subtitle { color: var(--text-2); font-size: 0.9rem; margin-top: 2px; }
.page-header.centered { text-align: center; justify-content: center; flex-direction: column; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: white; border-top: 1px solid var(--border);
  padding: 14px 24px; font-size: 0.8rem; color: var(--text-muted);
}
.footer-inner { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-divider { margin: 0 8px; }
.footer-right a { color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--aku-green); color: white; border-color: var(--aku-green); }
.btn-primary:hover { background: var(--aku-green-dark); border-color: var(--aku-green-dark); color: white; }
.btn-secondary { background: var(--aku-orange); color: white; border-color: var(--aku-orange); }
.btn-secondary:hover { background: #c44d20; color: white; }
.btn-outline { background: white; color: var(--text); border-color: var(--border-dark); }
.btn-outline:hover { background: var(--bg); color: var(--text); }
.btn-success { background: #16a34a; color: white; border-color: #16a34a; }
.btn-success:hover { background: #15803d; color: white; }
.btn-warning { background: #d97706; color: white; border-color: #d97706; }
.btn-warning:hover { background: #b45309; color: white; }
.btn-danger { background: #dc2626; color: white; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 8px; font-size: 0.75rem; }
.btn-icon-danger { background: none; border: none; color: #dc2626; cursor: pointer; padding: 4px; border-radius: 4px; display: inline-flex; align-items: center; }
.btn-icon-danger:hover { background: #fee2e2; }
.btn-icon-danger svg { width: 14px; height: 14px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-size: 0.88rem;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert.fade-out { opacity: 0; transition: opacity .5s; }

/* ── Status Badges ──────────────────────────────────────────── */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; text-transform: capitalize;
  letter-spacing: .3px;
}
.status-badge.badge-lg { font-size: 0.85rem; padding: 5px 14px; }
.status-badge.badge-sm { font-size: 0.68rem; padding: 2px 7px; }
.status-draft { background: #f1f5f9; color: #475569; }
.status-submitted { background: #dbeafe; color: #1e40af; }
.status-under_review { background: #ede9fe; color: #5b21b6; }
.status-incomplete { background: #fef3c7; color: #92400e; }
.status-more_info_required { background: #ffedd5; color: #9a3412; }
.status-forwarded_to_committee { background: #e0e7ff; color: #3730a3; }
.status-resubmitted { background: #dbeafe; color: #1e40af; }
.status-completed { background: #cffafe; color: #155e75; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-archived { background: #e5e7eb; color: #4b5563; }
.status-closed { background: #f1f5f9; color: #475569; }
.status-approve { background: #dcfce7; color: #166534; }
.status-reject { background: #fee2e2; color: #991b1b; }
.status-defer { background: #fef3c7; color: #92400e; }

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-page {
  max-width: 960px; margin: 60px auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.auth-card {
  background: white; border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 16px; }
.auth-logo img { height: 54px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 1.3rem; font-weight: 700; }
.auth-header p { color: var(--text-2); font-size: 0.88rem; margin-top: 4px; }
.auth-form .form-group { margin-bottom: 18px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-2); }
.auth-footer p { margin-bottom: 6px; }
.auth-info { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.info-card {
  display: flex; gap: 12px; background: white;
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--aku-green);
}
.info-card svg { width: 20px; height: 20px; color: var(--aku-green); flex-shrink: 0; margin-top: 2px; }
.info-card h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.info-card p, .info-card ul { font-size: 0.82rem; color: var(--text-2); }
.info-card ul { padding-left: 16px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  background: white; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--aku-green);
  box-shadow: 0 0 0 3px rgba(0,107,60,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.readonly-field { background: var(--surface-2) !important; color: var(--text-muted) !important; cursor: default; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; display: block; }
.required { color: #dc2626; margin-left: 2px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.form-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 18px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-badge { font-size: 0.72rem; background: var(--aku-green-light); color: var(--aku-green); padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.sub-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.sub-section h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 12px; color: var(--text-2); }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.input-icon input { padding-left: 36px; }
.input-icon .toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; }
.input-icon .toggle-password svg { position: static; transform: none; }

.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.85rem; }
.checkbox-label input[type=checkbox] { width: auto; flex-shrink: 0; margin-top: 3px; accent-color: var(--aku-green); }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 8px; cursor: pointer; transition: background .12s; font-size: 0.85rem; }
.check-item:hover { background: var(--aku-green-light); }
.check-item input[type=checkbox] { flex-shrink: 0; margin-top: 2px; accent-color: var(--aku-green); width: auto; }
.check-item.large { padding: 14px; font-size: 0.9rem; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-group .checkbox-label { border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-sm); background: white; }
.checkbox-group.small .checkbox-label { font-size: 0.8rem; padding: 5px 10px; }

.form-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; border-top: 1px solid var(--border); margin-top: 24px;
}
.form-actions-right { display: flex; gap: 10px; }

/* ── Form Progress Bar ──────────────────────────────────────── */
.form-progress-bar {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 0.82rem; color: var(--text-2); }
.app-ref-label { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--aku-green); }
.app-ref-label svg { width: 14px; height: 14px; }
.progress-steps { display: flex; align-items: center; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.step-circle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--border-dark); background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  transition: all .2s;
}
.step-circle svg { width: 14px; height: 14px; }
.step-label { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.progress-step.active .step-circle { border-color: var(--aku-green); background: var(--aku-green); color: white; }
.progress-step.active .step-label { color: var(--aku-green); font-weight: 600; }
.progress-step.completed .step-circle { border-color: var(--aku-green); background: var(--aku-green-light); color: var(--aku-green); }
.progress-connector { flex: 1; height: 2px; background: var(--border); margin: 0 4px; min-width: 20px; margin-bottom: 22px; }
.progress-connector.completed { background: var(--aku-green); }

/* ── File Upload ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-dark); border-radius: var(--radius);
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; position: relative;
  background: var(--surface-2);
}
.upload-zone:hover { border-color: var(--aku-green); background: var(--aku-green-light); }
.upload-zone svg { width: 28px; height: 28px; color: var(--text-muted); margin-bottom: 6px; }
.upload-zone strong { display: block; font-size: 0.88rem; margin-bottom: 4px; }
.upload-zone small { color: var(--text-muted); font-size: 0.78rem; }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone.compact { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.upload-zone.compact span { font-size: 0.85rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.upload-zone.compact svg { width: 16px; height: 16px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.8rem; margin-top: 8px; }
.upload-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.upload-item.success { background: #f0fdf4; color: #166534; }
.upload-item.error { background: #fef2f2; color: #991b1b; }
.upload-item.uploading { background: #eff6ff; color: #1e40af; }

/* ── Dashboard Applications Grid ────────────────────────────── */
.applications-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 32px; }
.app-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.app-card:hover { box-shadow: var(--shadow); }
.app-card-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.app-ref { font-weight: 700; font-size: 0.95rem; color: var(--aku-green); }
.app-card-body { padding: 14px 18px; }
.app-info-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 4px 0; }
.app-info-label { color: var(--text-muted); }
.app-info-value { font-weight: 500; }
.app-progress { padding: 10px 18px; }
.progress-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; position: relative; display: flex; align-items: center; }
.progress-fill { height: 100%; background: var(--aku-green); border-radius: 3px; transition: width .3s; }
.progress-text { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.app-card-footer { display: flex; gap: 6px; padding: 12px 18px; background: var(--surface-2); flex-wrap: nowrap; }
/* Buttons shrink evenly to stay on one line rather than wrapping to a
   second row or overflowing the card. Label text truncates with an
   ellipsis as a last resort on very narrow cards; the icon never shrinks. */
.app-card-footer .btn { flex: 1 1 0; min-width: 0; padding: 7px 10px; font-size: 0.78rem; gap: 5px; justify-content: center; }
.app-card-footer .btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ── Application Type Selection ─────────────────────────────── */
.application-type-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; max-width: 960px; margin: 0 auto 32px; align-items: center; }
.type-card { background: white; border-radius: var(--radius-lg); padding: 32px; border: 2px solid var(--border); text-align: center; transition: border-color .15s, box-shadow .15s; cursor: pointer; }
.type-card:hover { border-color: var(--aku-green); box-shadow: var(--shadow); }
.type-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--aku-green-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.type-icon svg { width: 28px; height: 28px; color: var(--aku-green); }
.type-icon-alt { background: #fff3e0; }
.type-icon-alt svg { color: var(--aku-orange); }
.type-card h2 { font-size: 1.2rem; margin-bottom: 10px; }
.type-description { color: var(--text-2); font-size: 0.88rem; margin-bottom: 16px; }
.type-programs { text-align: left; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; }
.type-programs h4 { font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.type-programs ul { list-style: none; }
.type-programs li { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; padding: 3px 0; }
.type-programs li svg { width: 13px; height: 13px; color: var(--aku-green); }
.type-divider { display: flex; align-items: center; justify-content: center; }
.type-divider span { background: var(--bg); border: 2px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-muted); font-size: 0.85rem; }

/* ── Disclaimer ──────────────────────────────────────────────── */
.disclaimer-page { max-width: 760px; margin: 0 auto; }
.disclaimer-header { text-align: center; margin-bottom: 32px; }
.disclaimer-badge { width: 64px; height: 64px; border-radius: 50%; background: #fffbeb; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; border: 2px solid #fde68a; }
.disclaimer-badge svg { width: 28px; height: 28px; color: #d97706; }
.disclaimer-body { background: white; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.doc-checklist { margin-bottom: 24px; }
.doc-checklist h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.doc-checklist h3 svg { width: 18px; height: 18px; color: var(--aku-green); }
.checklist-group { margin-bottom: 20px; }
.checklist-group h4 { font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.disclaimer-notice { display: flex; gap: 12px; background: #eff6ff; border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; font-size: 0.85rem; }
.disclaimer-notice svg { width: 18px; height: 18px; color: var(--accent-blue); flex-shrink: 0; margin-top: 2px; }
.disclaimer-agreement { margin-bottom: 24px; }
.disclaimer-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-meta { padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 0.82rem; color: var(--text-2); }
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--surface-2); padding: 11px 16px; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table.compact td, .data-table.compact th { padding: 8px 12px; }
.data-table .center { text-align: center; }
.ref-link { color: var(--aku-green); font-weight: 600; }
.ref-link:hover { text-decoration: underline; }
.student-cell { display: flex; flex-direction: column; }
.student-name { font-weight: 500; }
.type-tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.type-tag.type-direct_entry { background: #dbeafe; color: #1e40af; }
.type-tag.type-upgrading { background: #fce7f3; color: #9d174d; }

/* ── Filter Bar ──────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: flex-end; gap: 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.filter-group select, .filter-group input { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; background: white; min-width: 140px; }
.search-group { flex: 1; min-width: 200px; }
.search-group { display: flex; flex-direction: column; gap: 5px; }
.search-group > div, .search-group { position: relative; }
.filter-group.search-group input { width: 100%; padding-right: 36px; }

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 20px; height: 20px; }
.icon-blue { background: #dbeafe; color: #1e40af; } .icon-blue svg { color: #1e40af; }
.icon-green { background: #dcfce7; color: #166534; } .icon-green svg { color: #166534; }
.icon-red { background: #fee2e2; color: #991b1b; } .icon-red svg { color: #991b1b; }
.icon-orange { background: #ffedd5; color: #9a3412; } .icon-orange svg { color: #9a3412; }
.icon-purple { background: #ede9fe; color: #5b21b6; } .icon-purple svg { color: #5b21b6; }
.icon-yellow { background: #fef3c7; color: #92400e; } .icon-yellow svg { color: #92400e; }
.stat-number { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Dashboard Cards ─────────────────────────────────────────── */
.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; box-shadow: var(--shadow-sm); }
.dash-card.full-width { grid-column: 1 / -1; }
.dash-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header-row h3 { margin-bottom: 0; }
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .12s; }
.quick-action:hover { background: var(--aku-green-light); border-color: var(--aku-green); text-decoration: none; }
.quick-action svg { width: 18px; height: 18px; color: var(--aku-green); flex-shrink: 0; }
.quick-action div { flex: 1; }
.quick-action strong { display: block; font-size: 0.85rem; }
.quick-action span { font-size: 0.78rem; color: var(--text-muted); }
.quick-action > svg:last-child { width: 14px; height: 14px; color: var(--text-muted); }

/* ── Detail Layout ───────────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; margin-bottom: 20px; }
.detail-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.detail-card h3 svg { width: 16px; height: 16px; color: var(--aku-green); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-grid.compact { gap: 8px; }
.d-item { display: flex; flex-direction: column; gap: 2px; }
.d-item span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.d-item strong { font-size: 0.88rem; color: var(--text); }
.d-item.full-width { grid-column: 1 / -1; }
.sidebar-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; margin-bottom: 16px; }
.sidebar-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; }
.sidebar-card.card-success { border-color: #86efac; background: #f0fdf4; }
.sidebar-card.card-danger { border-color: #fca5a5; background: #fef2f2; }

/* ── Income Summary Table ────────────────────────────────────── */
.income-grid { display: flex; flex-direction: column; gap: 10px; }
.finance-input-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.finance-input-row label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); margin-bottom: 0; }
.finance-input-row label svg { width: 14px; height: 14px; color: var(--text-muted); }
.currency-input { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: white; }
.currency-input.inline { display: inline-flex; }
.currency-prefix { padding: 7px 10px; background: var(--surface-2); font-size: 0.78rem; color: var(--text-muted); font-weight: 600; border-right: 1px solid var(--border); white-space: nowrap; }
.currency-input input { border: none; padding: 7px 10px; font-size: 0.85rem; width: 140px; }
.currency-input input:focus { outline: none; box-shadow: none; }
.finance-total-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 2px solid var(--border-dark); margin-top: 4px; }
.total-display { background: var(--aku-green-light); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; color: var(--aku-green); font-size: 0.9rem; }
.finance-summary-card { background: var(--aku-green-light) !important; border-color: var(--aku-green) !important; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.88rem; border-bottom: 1px solid rgba(0,107,60,.15); }
.summary-row.summary-total { border-top: 2px solid var(--aku-green); border-bottom: none; font-weight: 700; font-size: 0.95rem; padding-top: 12px; }
.amount-positive { color: #166534; }
.amount-negative { color: #991b1b; }
.income-summary-table { margin-bottom: 16px; }
.is-row { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.is-row.header { background: var(--surface-2); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.is-row.total { background: var(--aku-green-light); font-weight: 600; border-bottom: none; }
.is-row.net.positive { background: #dcfce7; font-weight: 700; }
.is-row.net.negative { background: #fee2e2; font-weight: 700; }
.mt-2 { margin-top: 16px; }
.finance-summary-mini { display: flex; flex-direction: column; gap: 0; }
.fsm-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.fsm-row.total { font-weight: 700; border-top: 2px solid var(--border-dark); border-bottom: none; padding-top: 10px; }

/* ── Dynamic Tables ──────────────────────────────────────────── */
.dynamic-table-wrap { overflow-x: auto; }
.dynamic-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.dynamic-table th { background: var(--surface-2); padding: 8px 10px; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); }
.dynamic-table td { padding: 6px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dynamic-table input, .dynamic-table select { border: 1px solid var(--border); border-radius: 4px; padding: 5px 8px; font-size: 0.82rem; width: 100%; }
.dynamic-table input:focus, .dynamic-table select:focus { outline: none; border-color: var(--aku-green); }

/* ── Status Timeline ─────────────────────────────────────────── */
.status-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-bottom: 28px; }
.status-timeline-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; }
.status-timeline-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 24px; }
.timeline { display: flex; flex-direction: column; }
.timeline-step { display: flex; gap: 16px; }
.tl-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-icon svg { width: 16px; height: 16px; color: var(--text-muted); }
.tl-content { flex: 1; padding-bottom: 4px; }
.tl-content strong { font-size: 0.88rem; font-weight: 600; }
.tl-content p { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.tl-connector { width: 2px; background: var(--border); margin: 4px 0 4px 18px; height: 20px; }
.tl-connector.done { background: var(--aku-green); }
.timeline-step.done .tl-icon { background: var(--aku-green-light); border-color: var(--aku-green); }
.timeline-step.done .tl-icon svg { color: var(--aku-green); }
.timeline-step.active .tl-icon { background: var(--aku-green); border-color: var(--aku-green); }
.timeline-step.active .tl-icon svg { color: white; }
.timeline-step.active .tl-content strong { color: var(--aku-green); }
.timeline-step.failed .tl-icon { background: #fee2e2; border-color: #fca5a5; }
.timeline-step.failed .tl-icon svg { color: #991b1b; }
.status-right-panel { display: flex; flex-direction: column; gap: 16px; }
.info-card-panel { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; }
.info-card-panel h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.info-card-panel h3 svg { width: 16px; height: 16px; }
.info-card-panel.warning { border-color: #fde68a; background: #fffbeb; }
.info-card-panel.success { border-color: #86efac; background: #f0fdf4; }
.info-card-panel.danger { border-color: #fca5a5; background: #fef2f2; }
.info-card-panel.info { border-color: #a5f3fc; background: #ecfeff; }
.detail-list { display: flex; flex-direction: column; gap: 6px; }
.detail-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 4px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.history-section { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; margin-bottom: 24px; }
.history-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.history-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--aku-green-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.history-icon svg { width: 14px; height: 14px; color: var(--aku-green); }
.history-content { flex: 1; }
.history-action { font-size: 0.88rem; font-weight: 500; }
.history-notes { margin-top: 2px; }
.history-meta { margin-top: 2px; }
.history-status { flex-shrink: 0; }

/* ── Confirmation ────────────────────────────────────────────── */
.confirmation-page { max-width: 680px; margin: 40px auto; text-align: center; }
.confirmation-icon { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.confirmation-icon svg { width: 32px; height: 32px; color: #16a34a; }
.confirmation-page h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; }
.confirmation-subtitle { color: var(--text-2); margin-bottom: 28px; }
.confirmation-details { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 28px; text-align: left; }
.conf-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.conf-row:last-child { border-bottom: none; }
.conf-label { color: var(--text-2); }
.conf-value { font-weight: 500; }
.conf-value.highlight { color: var(--aku-green); font-weight: 700; font-size: 1rem; }
.confirmation-next-steps { text-align: left; background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; margin-bottom: 24px; }
.confirmation-next-steps h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; }
.steps-list { display: flex; flex-direction: column; gap: 14px; }
.next-step { display: flex; gap: 14px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--aku-green); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.step-text strong { font-size: 0.88rem; display: block; margin-bottom: 2px; }
.step-text p { font-size: 0.82rem; color: var(--text-2); }
.confirmation-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; }
.confirmation-footer-note { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.confirmation-footer-note svg { width: 14px; height: 14px; }

/* ── Dashboard Animations ────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes progressGrow {
  from { width: 0 !important; }
  to   { width: var(--progress-width) !important; }
}
@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,107,60,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(0,107,60,0); }
}
@keyframes bounceIcon {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-10px); }
  60%       { transform: translateY(-5px); }
}

.animate-fade-down { animation: fadeDown .45s ease both; }
.animate-fade-up   { animation: fadeUp  .45s ease both; }

.animate-card {
  animation: cardEntrance .45s ease both;
  animation-delay: var(--card-delay, 0ms);
}

.app-card {
  transition: box-shadow .2s ease, transform .2s ease;
}
.app-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.progress-fill.progress-animate {
  width: 0;
  animation: progressGrow .8s cubic-bezier(.4,0,.2,1) forwards;
  animation-delay: 400ms;
}

.btn-pulse { animation: pulseBorder 2.2s ease infinite; }

.empty-icon-bounce { animation: bounceIcon 1.8s ease infinite; }

/* ── Status Legend — Collapsible ─────────────────────────────── */
.status-legend-wrapper {
  margin-top: 24px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.status-legend-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  transition: background .15s, color .15s;
  gap: 10px;
}
.status-legend-toggle:hover {
  background: var(--aku-green-light);
  color: var(--aku-green);
}
.toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--aku-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.toggle-icon-wrap svg { width: 14px; height: 14px; color: var(--aku-green); }
.status-legend-toggle:hover .toggle-icon-wrap { background: var(--aku-green); }
.status-legend-toggle:hover .toggle-icon-wrap svg { color: white; }

.toggle-chevron svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform .3s cubic-bezier(.4,0,.2,1), color .15s;
}
.status-legend-toggle[aria-expanded="true"] .toggle-chevron svg {
  transform: rotate(180deg);
  color: var(--aku-green);
}

/* Collapsible panel */
.status-legend-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.4,0,.2,1);
  border-top: 1px solid transparent;
}
.status-legend-panel.open {
  grid-template-rows: 1fr;
  border-top-color: var(--border);
}
.status-legend-inner {
  overflow: hidden;
  padding: 0 20px;
  transition: padding .35s cubic-bezier(.4,0,.2,1);
}
.status-legend-panel.open .status-legend-inner {
  padding: 16px 20px 18px;
}

.legend-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  animation: fadeUp .3s ease both;
}
.status-legend-panel.open .legend-item:nth-child(1) { animation-delay: 0.04s; }
.status-legend-panel.open .legend-item:nth-child(2) { animation-delay: 0.08s; }
.status-legend-panel.open .legend-item:nth-child(3) { animation-delay: 0.12s; }
.status-legend-panel.open .legend-item:nth-child(4) { animation-delay: 0.16s; }
.status-legend-panel.open .legend-item:nth-child(5) { animation-delay: 0.20s; }
.status-legend-panel.open .legend-item:nth-child(6) { animation-delay: 0.24s; }
.status-legend-panel.open .legend-item:nth-child(7) { animation-delay: 0.28s; }

/* ── Reviews ─────────────────────────────────────────────────── */
.review-checklist { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; margin-bottom: 24px; }
.review-checklist h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; }
.checklist-row-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.checklist-item.complete { background: #f0fdf4; border-color: #86efac; }
.checklist-item.incomplete { background: #fffbeb; border-color: #fde68a; }
.check-icon svg { width: 18px; height: 18px; }
.checklist-item.complete .check-icon svg { color: #16a34a; }
.checklist-item.incomplete .check-icon svg { color: #d97706; }
.check-label { flex: 1; font-size: 0.88rem; }
.doc-count-summary { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); padding-top: 10px; border-top: 1px solid var(--border); }
.doc-count-summary svg { width: 14px; height: 14px; }
.review-summary { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; margin-bottom: 24px; }
.summary-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.summary-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.summary-section h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.summary-section h3 svg { width: 16px; height: 16px; color: var(--aku-green); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.summary-item { display: flex; flex-direction: column; gap: 2px; }
.s-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.s-value { font-size: 0.88rem; font-weight: 500; }
.doc-list { display: flex; flex-direction: column; gap: 6px; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.doc-item svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.doc-details { flex: 1; display: flex; flex-direction: column; }
.doc-name { font-size: 0.85rem; font-weight: 500; }
.doc-cat { font-size: 0.75rem; text-transform: capitalize; }
.doc-size { font-size: 0.78rem; }
.submit-section { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; }
.submit-notice { display: flex; gap: 16px; background: var(--aku-green-light); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 20px; }
.submit-notice svg { width: 28px; height: 28px; color: var(--aku-green); flex-shrink: 0; }
.submit-notice h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.submit-notice p { font-size: 0.85rem; color: var(--text-2); }
.submit-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Scoring ─────────────────────────────────────────────────── */
.evaluate-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.evaluate-sidebar { position: sticky; top: 80px; }
.scoring-card { border: 2px solid var(--aku-green); }
.score-field { margin-bottom: 14px; }
.score-input-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.score-range { flex: 1; accent-color: var(--aku-green); cursor: pointer; }
.score-display { min-width: 38px; text-align: center; font-weight: 700; font-size: 0.95rem; color: var(--aku-green); }
.overall-score-display { display: flex; justify-content: space-between; align-items: center; background: var(--aku-green-light); padding: 12px 14px; border-radius: var(--radius-sm); margin: 12px 0; }
.overall-score-display strong { font-size: 1.1rem; color: var(--aku-green); }
.score-pill { display: inline-block; background: var(--aku-green-light); color: var(--aku-green); font-weight: 700; padding: 3px 10px; border-radius: 20px; font-size: 0.85rem; }
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 7px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; transition: border-color .12s; }
.radio-label input[type=radio] { accent-color: var(--aku-green); width: auto; }
.radio-label:has(input:checked) { border-color: var(--aku-green); background: var(--aku-green-light); }
.radio-approve svg, .radio-reject svg { width: 14px; height: 14px; }
.radio-group.large .radio-label { flex: 1; justify-content: center; }
.decision-card { border: 2px solid #fca5a5; }
.section-block { margin-bottom: 28px; }
.section-block-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-block-header h2 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-block-header h2 svg { width: 18px; height: 18px; color: var(--aku-green); }
.badge-count { background: var(--aku-green); color: white; border-radius: 20px; padding: 2px 10px; font-size: 0.8rem; font-weight: 700; }

/* ── Mini Timeline ───────────────────────────────────────────── */
.mini-timeline { display: flex; flex-direction: column; gap: 8px; }
.mini-tl-item { display: flex; align-items: flex-start; gap: 10px; }
.mini-tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--aku-green); margin-top: 4px; flex-shrink: 0; }
.mini-tl-content { font-size: 0.82rem; }

/* ── Notices ─────────────────────────────────────────────────── */
.info-notice { display: flex; gap: 12px; background: var(--aku-green-light); border: 1px solid #86efac; border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; font-size: 0.85rem; }
.info-notice svg { width: 18px; height: 18px; color: var(--aku-green); flex-shrink: 0; margin-top: 1px; }
.declaration-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; font-size: 0.88rem; line-height: 1.7; }
.declaration-box ol { padding-left: 20px; }
.declaration-box li { margin-bottom: 6px; }
.declaration-box h4 { margin: 20px 0 8px; color: #1e293b; font-size: 0.95rem; }
.declaration-box ul { padding-left: 20px; margin: 6px 0 12px; }
.declaration-box ul li { margin-bottom: 6px; }

/* ── Terms & Conditions modal callout boxes ─────────────────── */
.tc-callout { border-radius: 8px; padding: 12px 16px; margin: 14px 0; font-size: 0.85rem; line-height: 1.6; }
.tc-callout strong { display: block; margin-bottom: 4px; }
.tc-callout p { margin: 0; }
.tc-callout-warn   { background: #fffbeb; border: 1px solid #fbbf24; color: #78350f; }
.tc-callout-danger { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.tc-callout-info   { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge-success { display: inline-flex; align-items: center; gap: 4px; background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success svg { width: 12px; height: 12px; }
.badge-warning { display: inline-block; background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-muted { display: inline-block; background: #f1f5f9; color: #64748b; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; }
.doc-cat-tag { background: var(--surface-2); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; text-transform: capitalize; }
.doc-req-mini { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.action-row { display: flex; gap: 10px; margin-bottom: 10px; }

/* ── Empty States ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-state svg { width: 32px; height: 32px; color: var(--text-muted); }
.empty-state h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); font-size: 0.88rem; margin-bottom: 20px; }
.empty-inline { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.85rem; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.doc-grid-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.doc-item-sm { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.doc-item-sm svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-info { display: none; }
  .detail-layout, .evaluate-layout, .status-layout, .dashboard-row { grid-template-columns: 1fr; }
  .form-grid-2, .form-row { grid-template-columns: 1fr; }
  .mobile-menu-toggle { display: flex; }
  .application-type-grid { grid-template-columns: 1fr; }
  .type-divider { display: none; }
  .upload-grid { grid-template-columns: 1fr; }
  .progress-steps { overflow-x: auto; padding-bottom: 4px; }
  .step-label { display: none; }
}
@media (max-width: 600px) {
  .page-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header-user .user-info { display: none; }
}
.header-user.dropdown {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

/* ONLY "AY" circle */
.user-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0b6b3a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* hide name + role completely */
.user-info {
    display: none;
}


/* ── Dropdown animation keyframes ────────────────────────── */
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes dropdownOut {
    from { opacity: 1; transform: translateY(0)    scale(1);    }
    to   { opacity: 0; transform: translateY(-8px) scale(0.97); }
}
@keyframes itemSlideIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Chevron rotation ─────────────────────────────────────── */
.dropdown-icon {
    transition: transform 0.25s ease;
    color: #fff;
}
.header-user.dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

/* ── Dropdown panel ──────────────────────────────────────── */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid rgba(0,107,60,0.12);
    border-radius: 12px;
    min-width: 230px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,107,60,0.08);
    z-index: 1000;
    /* Scroll vertically once content exceeds the cap, instead of overflowing
       past the viewport — keeps long nav lists usable on smaller screens. */
    max-height: min(480px, calc(100vh - 90px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    /* hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Thin, themed scrollbar for the dropdown menu */
.dropdown-menu::-webkit-scrollbar { width: 6px; }
.dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu::-webkit-scrollbar-thumb { background: rgba(0,107,60,0.25); border-radius: 6px; }
.dropdown-menu::-webkit-scrollbar-thumb:hover { background: rgba(0,107,60,0.4); }
.dropdown-menu { scrollbar-width: thin; scrollbar-color: rgba(0,107,60,0.25) transparent; }

/* overflow-y:auto (for scrolling) no longer clips corners the way overflow:hidden
   did, so round the first/last row explicitly to match the menu's 12px radius. */
.dropdown-menu > *:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.dropdown-menu > *:last-child  { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

.dropdown-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: dropdownIn 0.22s ease forwards;
}

/* stagger each item sliding in */
.dropdown-menu.active .dropdown-item,
.dropdown-menu.active .dropdown-user-info {
    animation: itemSlideIn 0.2s ease both;
}
.dropdown-menu.active .dropdown-user-info     { animation-delay: 0.04s; }
.dropdown-menu.active .dropdown-item:nth-child(1) { animation-delay: 0.08s; }
.dropdown-menu.active .dropdown-item:nth-child(2) { animation-delay: 0.12s; }
.dropdown-menu.active .dropdown-item:nth-child(3) { animation-delay: 0.16s; }
.dropdown-menu.active .dropdown-item:nth-child(4) { animation-delay: 0.20s; }
.dropdown-menu.active .dropdown-item:nth-child(5) { animation-delay: 0.24s; }

/* ── User info card ──────────────────────────────────────── */
.dropdown-user-info {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: linear-gradient(135deg, #f0faf5 0%, #e6f7ee 100%);
    border-bottom: 1px solid rgba(0,107,60,0.1);
}

.dropdown-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0a3d23;
    white-space: nowrap;
}

.dropdown-user-role {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: #006B3C;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: capitalize;
    align-self: flex-start;
    letter-spacing: 0.02em;
}

/* ── Divider ─────────────────────────────────────────────── */
.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0;
}

/* ── Nav items ───────────────────────────────────────────── */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #2d2d2d;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    position: relative;
}

.dropdown-item svg {
    color: #006B3C;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-item:hover {
    background: #f0faf5;
    color: #006B3C;
    padding-left: 20px;
}

.dropdown-item:hover svg {
    transform: scale(1.15);
}

/* ── Logout item ─────────────────────────────────────────── */
.dropdown-item.logout {
    color: #c0392b;
    border-top: 0;
}

.dropdown-item.logout svg {
    color: #c0392b;
}

.dropdown-item.logout:hover {
    background: #fff5f5;
    color: #a93226;
    padding-left: 20px;
}

.dropdown-item.logout:hover svg {
    transform: scale(1.15);
}

.user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f9d55; /* distinct green */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}
/* ============================================================
   v3 ADDITIONS — Form Compliance, Upload Widgets, Finance Grid
   ============================================================ */

/* ── Student avatar (passport photo, when available) ─────────
   .user-badge is a flex-centered circle used for initials; the avatar
   img is layered on top and sized to fill that same circle exactly. */
.user-badge { position: relative; overflow: hidden; }
.user-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    z-index: 1;
}


/* ── Passport photo upload ─────────────────────────────────── */
.photo-upload-row {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.photo-preview-box {
    width: 120px;
    height: 150px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    flex-shrink: 0;
    overflow: hidden;
}
.passport-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 12px;
}
.photo-upload-controls { flex: 1; min-width: 200px; }
.photo-zone { cursor: pointer; }
.photo-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.upload-zone.compact { position: relative; }

/* ── Prominent "download this template first" CTA ─────────────
   Used for the Recommendation Letter Template and Letter of Undertaking
   buttons — students were missing these as plain outline buttons, so they
   get a highlighted card + a solid amber button with a brief attention
   pulse on load instead. */
.template-cta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    border: 1.5px solid #fbbf24; background: #fffbeb;
    border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
}
.template-cta-text { flex: 1 1 220px; font-size: 0.85rem; color: #92400e; margin: 0; }
.template-cta-text strong { color: #78350f; }
.btn-template-cta {
    background: #d97706; color: #fff; border-color: #d97706;
    font-weight: 600; padding: 11px 22px; font-size: 0.9rem;
    animation: templateCtaPulse 1.8s ease-out 2;
}
.btn-template-cta:hover { background: #b45309; border-color: #b45309; color: #fff; }
@keyframes templateCtaPulse {
    0%   { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.45); }
    70%  { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* ── Document requirement cards ─────────────────────────────── */
.doc-requirement-card {
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color .2s, background .2s;
}
.doc-requirement-card.req-ok {
    border-color: #27ae60;
    background: #f0fdf4;
}
.doc-requirement-card.req-missing {
    border-color: #e74c3c;
    background: #fff5f5;
}
.req-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}
.req-icon { width: 18px; height: 18px; }
.req-icon.ok      { color: #27ae60; }
.req-icon.missing { color: #e74c3c; }

/* ── Toggle switch ──────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: #e74c3c; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* ── Sub-fields (animated show/hide) ────────────────────────── */
.sub-fields { padding: 12px 0 4px 4px; }

/* ── Sibling / child rows ───────────────────────────────────── */
.sibling-row.card-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    background: var(--surface);
}
.sibling-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.form-grid-4 {
    display: grid;
    grid-template-columns: 2fr 80px 2fr 2fr;
    gap: 12px;
}
@media (max-width: 680px) { .form-grid-4 { grid-template-columns: 1fr 1fr; } }

/* ── Finance input rows ─────────────────────────────────────── */
.income-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 640px) { .income-grid { grid-template-columns: 1fr; } }
.finance-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    gap: 12px;
}
.finance-input-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    margin: 0;
}
.finance-input-row label svg { width: 14px; height: 14px; opacity: .6; }
.currency-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--background);
    min-width: 160px;
}
.currency-prefix {
    padding: 6px 8px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.currency-input input {
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    width: 120px;
    background: transparent;
    color: var(--text-primary);
}
.currency-input input:focus { outline: none; }

/* ── Dual income columns (self / spouse) ────────────────────── */
.dual-income-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 680px) { .dual-income-grid { grid-template-columns: 1fr; } }
.dual-col-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--primary);
    padding: 8px 0 12px; margin-bottom: 4px;
    border-bottom: 2px solid var(--primary);
}
.dual-col-header svg { width: 16px; height: 16px; }

/* ── Finance totals ─────────────────────────────────────────── */
.finance-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    border-top: 2px solid var(--border);
    margin-top: 6px;
}
.total-display {
    background: var(--surface);
    border-color: var(--primary);
}
.total-display span { font-weight: 700; color: var(--primary); padding: 6px 10px; }
.grand-total-row { font-size: 15px; }

/* ── Finance summary card ───────────────────────────────────── */
.finance-summary-card { background: var(--surface); }
.summary-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border-light, #f0f0f0);
    font-size: 14px;
}
.summary-total { font-weight: 700; font-size: 16px; border-top: 2px solid var(--border); margin-top: 4px; }
.amount-positive { color: #27ae60; font-weight: 700; }
.amount-negative { color: #e74c3c; font-weight: 700; }

/* ── Education split grid ───────────────────────────────────── */
.edu-split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 12px; }
@media (max-width: 680px) { .edu-split-grid { grid-template-columns: 1fr; } }
.edu-split-col h5 { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.sub-section-title { font-size: 14px; font-weight: 600; color: var(--text-primary); padding-top: 8px; border-top: 1px solid var(--border); }

/* ── Dynamic tables ─────────────────────────────────────────── */
.dynamic-table-wrap { overflow-x: auto; }
.dynamic-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.dynamic-table th {
    background: var(--surface);
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.dynamic-table td { padding: 6px 4px; border-bottom: 1px solid var(--border-light, #f0f0f0); }
.dynamic-table td input,
.dynamic-table td select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--background);
    color: var(--text-primary);
}
.dynamic-table td input[type=number] { min-width: 90px; }
.btn-icon-danger {
    background: none; border: none; cursor: pointer;
    color: #e74c3c; padding: 4px 6px; border-radius: 4px;
    display: flex; align-items: center;
    transition: background .15s;
}
.btn-icon-danger:hover { background: #fff5f5; }
.btn-icon-danger svg { width: 15px; height: 15px; }

/* ── Financial rating radio group ───────────────────────────── */
.rating-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.rating-option { cursor: pointer; }
.rating-option input { display: none; }
.rating-label {
    display: block;
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    user-select: none;
}
.rating-option input:checked + .rating-label {
    border-color: var(--rating-color, var(--primary));
    background: var(--rating-color, var(--primary));
    color: white;
}
.rating-option:hover .rating-label { border-color: var(--rating-color, var(--primary)); }

/* ── Other documents widget ─────────────────────────────────── */
.other-doc-add-widget {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}
.other-doc-add-widget.active { display: block; }
.other-doc-row { margin-bottom: 10px; }
.other-doc-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.other-doc-badge svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.other-doc-badge > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }

/* ── Compliance panel (review page) ─────────────────────────── */
.compliance-panel {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.compliance-panel h3 {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; margin-bottom: 16px; color: var(--text-primary);
}
.compliance-panel h3 svg { width: 18px; height: 18px; color: var(--primary); }
.compliance-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    font-size: 14px;
}
.compliance-item.comp-ok {
    background: #f0fdf4;
    border-color: #86efac;
}
.compliance-item.comp-fail {
    background: #fff5f5;
    border-color: #fca5a5;
}
.compliance-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.compliance-item.comp-ok  svg { color: #16a34a; }
.compliance-item.comp-fail svg { color: #dc2626; }
.compliance-item > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.compliance-item > div strong { font-size: 14px; }
.compliance-item > div span { font-size: 12px; color: var(--text-secondary); }
.comp-detail { color: #dc2626 !important; font-weight: 500; }

/* ── Review: section status grid ────────────────────────────── */
.section-status-grid { display: flex; flex-direction: column; gap: 8px; }
.section-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
}
.section-status-card.done { border-color: #86efac; background: #f0fdf4; }
.ssc-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ssc-body { flex: 1; display: flex; flex-direction: column; }
.ssc-body strong { font-size: 14px; }
.ssc-body span { font-size: 12px; color: var(--text-muted); }
.ssc-status { flex-shrink: 0; }
.badge-ok {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 16px;
    background: #dcfce7; color: #16a34a;
    font-size: 12px; font-weight: 600;
}
.badge-ok svg { width: 12px; height: 12px; }
.badge-warn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 16px;
    background: #fef3c7; color: #d97706;
    font-size: 12px; font-weight: 600;
    text-decoration: none;
}
.badge-warn svg { width: 12px; height: 12px; }
.badge-warn:hover { background: #fde68a; }

/* ── Review actions ─────────────────────────────────────────── */
.review-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; gap: 12px; flex-wrap: wrap;
}

/* ── Doc grid (uploaded docs) ───────────────────────────────── */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.doc-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.doc-card-icon { color: var(--primary); flex-shrink: 0; }
.doc-card-icon svg { width: 22px; height: 22px; }
.doc-card-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.doc-card-body strong { font-size: 13px; }
.doc-card-body span,
.doc-card-body em { font-size: 11px; color: var(--text-muted); }
.doc-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.doc-status-badge.badge-ok { background: #dcfce7; color: #16a34a; }

/* ── Upload item states ─────────────────────────────────────── */
.upload-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 6px; font-size: 13px;
    margin-top: 6px;
}
.upload-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.upload-item.success  { background: #f0fdf4; color: #16a34a; }
.upload-item.error    { background: #fff5f5; color: #dc2626; }
.upload-item.uploading{ background: var(--surface); color: var(--text-secondary); }
.upload-item.warning  { background: #fffbeb; color: #d97706; }
.upload-item span.upload-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-delete {
    background: none; border: none; cursor: pointer; flex-shrink: 0;
    color: inherit; opacity: 0.6; padding: 2px; line-height: 0; border-radius: 4px;
}
.upload-item-delete:hover { opacity: 1; background: rgba(0,0,0,.06); }
.upload-item-delete svg { width: 13px; height: 13px; }

/* ── Info callout ───────────────────────────────────────────── */
.info-callout {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}
.info-callout svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* ── Section badge ──────────────────────────────────────────── */
.section-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Empty states ───────────────────────────────────────────── */
.empty-state-sm {
    display: flex; align-items: center; gap: 10px;
    padding: 16px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px dashed var(--border);
}
.empty-state-sm svg { width: 18px; height: 18px; opacity: .5; }

/* ── Misc utilities ─────────────────────────────────────────── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.col-span-2 { grid-column: span 2; }
.text-muted  { color: var(--text-muted); }
.small       { font-size: 11px; }
.upload-group { display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   Admin / Committee Detail View — v3
   ============================================================ */

/* ── Passport photo (admin view) ────────────────────────────── */
.passport-photo-admin {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.passport-photo-admin .passport-photo-img {
    width: 90px;
    height: 110px;
    max-width: 90px;
    max-height: 110px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.photo-doc-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Detail grid (admin read-only) ─────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px 20px;
    margin-bottom: 8px;
}
.detail-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.d-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.d-item span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
}
.d-item strong {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-word;
}
.d-item p {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}
.d-item.full-width { grid-column: 1 / -1; }

/* ── Sub-sections ───────────────────────────────────────────── */
.sub-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.sub-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Document compliance pills ──────────────────────────────── */
.doc-compliance-mini {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.comp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}
.comp-pill svg { width: 13px; height: 13px; }
.comp-pill.ok   { background: #dcfce7; color: #16a34a; }
.comp-pill.fail { background: #fee2e2; color: #dc2626; }

/* ── Dual income view (admin read-only) ─────────────────────── */
.dual-income-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    margin-bottom: 12px;
}
@media (max-width: 640px) { .dual-income-view { grid-template-columns: 1fr; } }
.col-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 6px 0 10px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 4px;
}
.income-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.income-table td { padding: 5px 4px; border-bottom: 1px solid var(--border-light, #f4f4f4); }
.income-table td.amount { text-align: right; font-variant-numeric: tabular-nums; }
.income-table tr.total-row td {
    border-top: 2px solid var(--border);
    padding-top: 8px;
    font-weight: 600;
}

/* ── Net position bar ───────────────────────────────────────── */
.net-position-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.net-position-bar > div {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    background: var(--surface);
    gap: 2px;
}
.net-position-bar > div span  { font-size: 11px; color: var(--text-muted); }
.net-position-bar > div strong{ font-size: 15px; font-weight: 700; }
.net-position-bar.positive .net-total { background: #f0fdf4; }
.net-position-bar.negative .net-total { background: #fff5f5; }
.net-position-bar.positive .net-total strong { color: #16a34a; }
.net-position-bar.negative .net-total strong { color: #dc2626; }
@media (max-width: 560px) { .net-position-bar { grid-template-columns: 1fr; } }

/* ── Rating pill (recommender) ──────────────────────────────── */
.rating-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Status pill (agencies) ─────────────────────────────────── */
.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
}

/* ── Amount display in tables ───────────────────────────────── */
td.amount { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }

/* ── Document admin list (full width cards) ─────────────────── */
.doc-admin-list { display: flex; flex-direction: column; gap: 8px; }
.doc-admin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color .15s;
}
.doc-admin-row:hover { border-color: var(--primary-light, #86efac); }
.doc-admin-icon { flex-shrink: 0; }
.doc-admin-icon svg { width: 24px; height: 24px; }
.doc-admin-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.doc-admin-meta strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-admin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Verify button states ───────────────────────────────────── */
.btn-success {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}
.btn-success:hover { background: #15803d; }
.badge-danger {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
}
.badge-warning {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fef3c7;
    color: #d97706;
    font-size: 11px;
    font-weight: 600;
}
.ml-1 { margin-left: 6px; }
.status-committee {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 11px;
    font-weight: 600;
}

/* ── Jump links sidebar ─────────────────────────────────────── */
.jump-links { display: flex; flex-direction: column; gap: 6px; }
.jump-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.jump-links a:hover { background: var(--surface); color: var(--primary); }
.jump-links a svg { width: 14px; height: 14px; }

/* ── Score form (committee) ─────────────────────────────────── */
.sticky-card { position: sticky; top: 20px; }
.score-form { display: flex; flex-direction: column; gap: 14px; }
.score-field { display: flex; flex-direction: column; gap: 6px; }
.score-field label { font-size: 13px; font-weight: 600; }
.score-hint { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.score-slider-wrap { display: flex; align-items: center; gap: 10px; }
.score-slider-wrap input[type=range] { flex: 1; accent-color: var(--primary); }
.score-val {
    min-width: 34px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}
.score-overall-display {
    text-align: center;
    padding: 10px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border);
}
.score-overall-display strong { font-size: 22px; color: var(--primary); }
.my-score-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 12px;
}
.score-badge {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.score-badge span { font-size: 14px; color: var(--text-muted); font-weight: 400; }

/* ── Global Modal Styles (doc viewer + letter viewer) ─────────── */
.gm-overlay{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:rgba(0,0,0,0.65);align-items:center;justify-content:center;}
.gm-overlay.open{display:flex;}
.gm-box{background:#fff;width:92%;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 64px rgba(0,0,0,0.45);}
.gm-box-letter{max-width:860px;height:94vh;}
.gm-box-doc{max-width:960px;height:92vh;}
.gm-header{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;border-bottom:1px solid #e2e8f0;flex-shrink:0;background:#f8fafc;}
.gm-title{font-weight:600;font-size:0.9rem;color:#1e293b;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gm-meta{font-size:0.75rem;color:#64748b;margin-top:1px;}
.gm-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;}
.gm-btn-dl{font-size:0.78rem;font-weight:600;color:#006B3C;text-decoration:none;border:1px solid #006B3C;padding:5px 12px;border-radius:4px;}
.gm-btn-tab{font-size:0.78rem;font-weight:500;color:#475569;text-decoration:none;}
.gm-close{background:none;border:none;cursor:pointer;font-size:1.5rem;color:#64748b;line-height:1;padding:0 4px;margin-left:4px;}
.gm-body{flex:1;overflow:hidden;background:#374151;display:flex;align-items:center;justify-content:center;}
.gm-frame{width:100%;height:100%;border:none;}
.gm-img{max-width:100%;max-height:100%;object-fit:contain;}
.gm-spinner{color:#fff;font-family:sans-serif;font-size:0.9rem;opacity:0.7;}
.doc-view-btn svg,.letter-modal-btn svg{pointer-events:none;}