/* =====================================================
   MMCT Portal — Design System
   Navy / Gold colour scheme matching mmctweb
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ──────────────────────────────── */
:root {
  --navy:       #1a2744;
  --navy-dark:  #0f1a33;
  --gold:       #c9972a;
  --gold-lt:    #e8b94a;
  --cream:      #faf8f4;

  /* Greys */
  --g100: #f5f5f5;
  --g200: #e8e8e8;
  --g300: #d0d0d0;
  --g400: #a0a0a0;
  --g500: #6b6b6b;
  --g600: #333333;

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.09);
  --transition: 0.18s ease;
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--g600);
  background: var(--g100);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Portal Layout ──────────────────────────────── */
.portal-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar__logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar__logo-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.sidebar__logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.sidebar__logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.sidebar__nav {
  padding: 16px 0;
  flex: 1;
}

.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.78);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.sidebar__nav a:hover {
  color: var(--gold-lt);
  background: rgba(255,255,255,0.05);
  border-left-color: rgba(201,151,42,0.4);
}

.sidebar__nav a.active {
  color: var(--gold-lt);
  background: rgba(201,151,42,0.1);
  border-left-color: var(--gold);
}

.sidebar__nav a .nav-icon {
  width: 18px;
  text-align: center;
  opacity: 0.8;
}

.sidebar__section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 16px 20px 6px;
}

.sidebar__footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ─── Main Area ──────────────────────────────────── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Topbar ─────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--g200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
}

.topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--g500);
}

.topbar__breadcrumb strong {
  color: var(--navy);
  font-weight: 600;
}

.topbar__breadcrumb .sep {
  color: var(--g300);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar__user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}

.topbar__user-role {
  font-size: 11px;
  color: var(--g400);
}

/* ─── Page Content ───────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.page-content__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--g500);
  margin-bottom: 24px;
}

/* ─── Card ───────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card + .card {
  margin-top: 20px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card__title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
}

/* ─── Stat Cards ─────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  border-top: 3px solid var(--gold);
}

.stat-card__number {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--g500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: #fff;
}

.btn--primary:hover {
  background: var(--gold-lt);
  color: #fff;
}

.btn--danger {
  background: #dc3545;
  color: #fff;
}

.btn--danger:hover {
  background: #b02a37;
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--g300);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--sm {
  padding: 5px 12px;
  font-size: 12.5px;
}

.btn--navy {
  background: var(--navy);
  color: #fff;
}

.btn--navy:hover {
  background: var(--navy-dark);
}

/* ─── Badges ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge--sent      { background: #dbeafe; color: #1d4ed8; }
.badge--approved  { background: #dcfce7; color: #166534; }
.badge--rejected  { background: #fee2e2; color: #991b1b; }
.badge--pending   { background: #fef3c7; color: #92400e; }
.badge--draft     { background: var(--g200); color: var(--g500); }
.badge--received  { background: #dbeafe; color: #1d4ed8; }
.badge--review    { background: #fef3c7; color: #92400e; }
.badge--open      { background: #fef3c7; color: #92400e; }
.badge--complete  { background: #dcfce7; color: #166534; }

/* ─── Tables ─────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--navy);
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

thead th:first-child { border-radius: 6px 0 0 0; }
thead th:last-child  { border-radius: 0 6px 0 0; }

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--g200);
  font-size: 13.5px;
  color: var(--g600);
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fffbf2;
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ─── Filter / Toolbar ───────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--g300);
  background: #fff;
  color: var(--g500);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ─── Forms ──────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-label .required {
  color: #dc3545;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--g300);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--g600);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,42,0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* File drop zone */
.file-drop {
  border: 2px dashed var(--g300);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--g100);
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--gold);
  background: #fffbf2;
}

.file-drop__icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.file-drop__text {
  font-size: 13px;
  color: var(--g500);
}

.file-drop__text strong {
  color: var(--gold);
}

.file-drop input[type="file"] {
  display: none;
}

/* ─── Modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,26,51,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal--wide {
  max-width: 700px;
}

.modal--xl {
  max-width: 1040px;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--g200);
}

.modal__title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.modal__close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--g400);
  line-height: 1;
  padding: 0 4px;
}

.modal__close:hover { color: var(--g600); }

.modal__body {
  padding: 22px 24px;
}

.modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--g200);
}

/* ─── Checklist Items ────────────────────────────── */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Checklist item — card style */
.checklist-item {
  border: 1px solid var(--g200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.checklist-item:last-child { margin-bottom: 0; }

.checklist-item__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--g100);
  border-bottom: 1px solid var(--g200);
}
.checklist-item--checked .checklist-item__header {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
}

.checklist-item__checkbox {
  width: 18px; height: 18px; min-width: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-item__num {
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.checklist-item--checked .checklist-item__num {
  background: #16a34a;
  color: #fff;
}

.checklist-item__label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}
.checklist-item--checked .checklist-item__label {
  color: var(--g500);
}

.checklist-item__meta {
  font-size: 11px;
  color: var(--g400);
  white-space: nowrap;
}

.checklist-item__content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Document rows within checklist items */
.checklist-item__docs {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.audit-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: 8px;
}
.audit-doc-row__icon { font-size: 16px; flex-shrink: 0; }
.audit-doc-row__name {
  flex: 1;
  font-size: 13px;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-item__note {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--g200);
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--g600);
  outline: none;
  resize: none;
  min-height: 36px;
  background: var(--g100);
  box-sizing: border-box;
}
.checklist-item__note:focus {
  border-color: var(--gold);
  background: #fff;
}

/* Legacy doc-chip kept for any existing uses */
.doc-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: #e8f0fe; border-radius: 999px;
  font-size: 11.5px; color: #1a56db; text-decoration: none;
}
.doc-chip:hover { background: #c7d7fc; }

/* ─── Detail Layout (2-col) ──────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 20px;
  align-items: start;
}

.detail-field {
  margin-bottom: 14px;
}

.detail-field__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--g400);
  margin-bottom: 3px;
}

.detail-field__value {
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
}

/* ─── Toast ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  animation: toast-in 0.25s ease;
  max-width: 340px;
}

.toast--success { background: #166534; color: #fff; }
.toast--error   { background: #991b1b; color: #fff; }
.toast--info    { background: var(--navy); color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Empty State ────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--g400);
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state__text {
  font-size: 14px;
}

/* ─── Login Page ─────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.login-card__logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 14px;
}

.login-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 4px;
}

.login-card__sub {
  font-size: 13px;
  color: var(--g400);
  text-align: center;
  margin-bottom: 28px;
}

.login-error {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-error.visible { display: block; }

/* ─── Utilities ──────────────────────────────────── */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}

/* ─── Our Journey ────────────────────────────────── */

.ar-conf-banner {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 0;
}
.ar-conf-banner span { color: var(--gold-lt); }

/* ── Shared labels / utilities ── */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.section-header { margin-bottom: 20px; }
.section-desc   { font-size: 13.5px; color: var(--g500); }

/* ── container is a no-op inside portal sections ── */
.container, .container--narrow { width: 100%; }

/* ── Cover ── */
.cover {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1e3a5f 100%);
  color: #fff;
  padding: 36px 32px;
}
.cover__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cover__left {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cover__tag {
  display: inline-block;
  border: 1px solid rgba(201,151,42,0.5);
  color: var(--gold-lt);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  width: fit-content;
}
.cover__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.cover__title em { color: var(--gold-lt); font-style: italic; }
.cover__subtitle { font-size: 13.5px; color: rgba(255,255,255,0.68); line-height: 1.7; }
.cover__meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.cover__meta-item { display: flex; flex-direction: column; gap: 3px; }
.cover__meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.cover__meta-value { font-size: 13.5px; font-weight: 600; color: #fff; }

/* ── Executive Summary ── */
.exec-summary { padding: 28px 32px; background: var(--g100); }
.exec-summary__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
.exec-summary__text { display: flex; flex-direction: column; gap: 13px; }
.exec-summary__text p { font-size: 13.5px; color: var(--g600); line-height: 1.75; }
.exec-summary__text strong { color: var(--navy); }
.exec-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  border-top: 3px solid var(--g200);
}
.kpi--green { border-top-color: #2d7a5f; }
.kpi--navy  { border-top-color: var(--navy); }
.kpi--red   { border-top-color: #c0392b; }
.kpi__value {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}
.kpi__label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--g400); }
.kpi__note  { font-size: 10.5px; color: var(--g400); margin-top: 2px; }

/* ── Timeline / Year tabs ── */
.timeline { padding: 28px 32px; }
.year-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.year-tab {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--g300);
  background: #fff;
  color: var(--g500);
  cursor: pointer;
  transition: var(--transition);
}
.year-tab:hover  { border-color: var(--gold); color: var(--gold); }
.year-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.year-panel      { display: none; }
.year-panel.active { display: block; animation: panelIn 0.28s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Panel head ── */
.panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gold);
}
.panel-badge {
  background: var(--navy);
  color: var(--gold-lt);
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.panel-badge--gold { background: var(--gold); color: #fff; }
.panel-head__title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy); }
.panel-head__sub   { font-size: 13px; color: var(--g500); margin-top: 2px; }

/* ── Card grids ── */
.cards, .cards--wide, .cards--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.span-2 { grid-column: 1 / -1; }

/* ── Card icon ── */
.card__icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.ic-gold  { background: #fdf3dc; }
.ic-navy  { background: rgba(26,39,68,0.08); }
.ic-green { background: #d1fae5; }
.ic-red   { background: #fee2e2; }
.ic-blue  { background: #dbeafe; }

/* ── Milestones ── */
.milestones { list-style: none; }
.milestones li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--g200);
  align-items: start;
}
.milestones li:last-child { border-bottom: none; }
.m-dot  { display: none; }
.m-date { font-size: 11px; font-weight: 700; color: var(--g400); white-space: nowrap; padding-top: 2px; }
.m-text { font-size: 13.5px; color: var(--g600); line-height: 1.6; }
.m-text strong { color: var(--navy); }

/* ── Callout ── */
.callout {
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
}
.callout--navy { background: var(--navy); color: rgba(255,255,255,0.85); }
.callout--navy strong { color: var(--gold-lt); }
.callout--gold { background: #fdf3dc; color: var(--navy); border-left: 4px solid var(--gold); }
.callout--gold strong { color: var(--navy); }
.callout--red  { background: #fee2e2; color: #7f1d1d; border-left: 4px solid #c0392b; }
.callout--red  strong { color: #7f1d1d; }

/* ── Trustees ── */
.trustees { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.trustee  { flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; }
.trustee__av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-lt);
  font-weight: 700;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.trustee__name { font-size: 13px; font-weight: 600; color: var(--navy); }
.trustee__role { font-size: 11.5px; color: var(--g500); }
.trustee__pan  { font-size: 11px; color: var(--g400); font-family: monospace; }

/* ── Financial rows ── */
.fin-rows { list-style: none; }
.fin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--g200);
  font-size: 13.5px;
}
.fin-row:last-child { border-bottom: none; }
.fin-row__label { color: var(--g600); }
.fin-row__val   { font-weight: 600; color: var(--navy); }
.fin-row__val.cr { color: #166534; }
.fin-row__val.dr { color: #991b1b; }
.fin-row__val.bal { font-size: 15px; }
.fin-row--total .fin-row__label,
.fin-row--total .fin-row__val { font-weight: 700; font-size: 15px; }

/* ── Registration rows ── */
.reg-rows { list-style: none; }
.reg-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--g200);
}
.reg-row:last-child { border-bottom: none; }
.reg-row__label { font-size: 13.5px; font-weight: 500; color: var(--navy); }
.reg-row__date  { font-size: 11.5px; color: var(--g400); }
.reg-row__valid { font-size: 12px; font-weight: 600; color: #166534; text-align: right; }

/* ── Registration card (dark) ── */
.reg-card { background: var(--navy); border-radius: var(--radius); padding: 18px 22px; color: #fff; }
.reg-card__valid { font-size: 13px; font-weight: 600; color: #4ade80; margin-top: 6px; }

/* ── Info list ── */
.info-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.info-list li { font-size: 13.5px; color: var(--g600); padding-left: 15px; position: relative; }
.info-list li::before { content: '·'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ── Tags ── */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.tag--hlth { background: #d1fae5; color: #065f46; }
.tag--edu  { background: #e0f2fe; color: #0369a1; }
.tag--navy { background: #dbeafe; color: #1e40af; }
.tag--gold { background: #fdf3dc; color: #92400e; }

/* ── Project header ── */
.project-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: start;
}
.project-num {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--g200);
  line-height: 1;
}
.project-header__content   { display: flex; flex-direction: column; gap: 5px; }
.project-header__tags      { display: flex; gap: 6px; flex-wrap: wrap; }
.project-header__title     { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); }
.project-header__org       { font-size: 12px; color: var(--g500); }
.project-header__amount    { text-align: right; flex-shrink: 0; }
.project-header__amount-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--g400); }
.project-header__amount-val   { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--gold); }

/* ── Stats strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.stat-box { border-radius: var(--radius); padding: 13px 15px; }
.stat-box--cream { background: var(--cream); border: 1px solid var(--g200); }
.stat-box__val { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 5px; }
.stat-box__lbl { font-size: 11.5px; color: var(--g500); line-height: 1.4; }

/* ── Definition grid ── */
.def-grid { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13px; }
.def-grid dt { font-weight: 600; color: var(--navy); }
.def-grid dd { color: var(--g600); }

/* ── Tables inside report cards ── */
.act-table, .txn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.act-table th, .txn-table th {
  background: var(--g100); color: var(--navy);
  padding: 8px 11px; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; border-bottom: 2px solid var(--g200);
}
.act-table td, .txn-table td { padding: 7px 11px; border-bottom: 1px solid var(--g200); color: var(--g600); vertical-align: top; }
.act-table tr:last-child td, .txn-table tr:last-child td { border-bottom: none; }
.act-table tr:hover td, .txn-table tr:hover td { background: #fffbf2; }
.num, .r { text-align: right; }

/* ── KPI strip (unused ar- prefix kept for compat) ── */
.ar-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.ar-kpi { padding: 18px 20px; border-right: 1px solid var(--g200); text-align: center; }
.ar-kpi:last-child { border-right: none; }
.ar-kpi__value { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.ar-kpi__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g400); }
.ar-kpi__note  { font-size: 11px; color: var(--g400); margin-top: 2px; }

/* ── Footer ── */
.footer {
  background: #060e1c;
  color: rgba(255,255,255,0.75);
  padding: 32px 32px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 20px;
  font-size: 13px;
}
.footer__brand-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--gold-lt); margin-bottom: 4px; }
.footer__brand-sub  { font-size: 11.5px; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.footer__pan        { font-family: monospace; font-size: 10.5px; color: rgba(255,255,255,0.3); line-height: 1.7; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11.5px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Financial Summary section ── */
.fin-section { padding: 28px 32px; }
.fin-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fin-table th {
  background: var(--navy); color: var(--gold-lt);
  padding: 10px 13px; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; white-space: nowrap;
}
.fin-table td { padding: 9px 13px; border-bottom: 1px solid var(--g200); color: var(--g600); vertical-align: top; }
.fin-table tfoot td { background: var(--g100); font-weight: 700; color: var(--navy); border-top: 2px solid var(--g300); border-bottom: none; }
.fin-table tr:hover td { background: #fffbf2; }
.fin-table .tcr { color: #166534; font-weight: 600; }
.fin-table .tdr { color: #991b1b; font-weight: 600; }
.fin-table .tbal { color: var(--navy); font-weight: 700; }

/* ── 3-column card grid ── */
.cards--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Registrations section ── */
.reg-section { padding: 32px 32px 56px; background: #0f1e38; border-top: 3px solid var(--gold); }
.reg-section .section-label--light { color: var(--gold-lt); }
.reg-section .section-title--light { color: #fff; }
.reg-section .section-desc { color: rgba(255,255,255,0.55); }
.reg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.reg-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 18px 20px; color: #fff; }
.reg-card__icon { font-size: 22px; margin-bottom: 10px; }
.reg-card__name { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--gold-lt); margin-bottom: 3px; }
.reg-card__num  { font-family: monospace; font-size: 11.5px; color: rgba(255,255,255,0.45); margin-bottom: 10px; }
.reg-card__meta { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.65; margin-bottom: 10px; }
.reg-card__valid { font-size: 12px; font-weight: 700; color: #4ade80; }

/* ── Document action menu (three-dot) ── */
.doc-menu__btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--g200);
  background: #fff;
  color: var(--g500);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
  letter-spacing: -1px;
}
.doc-menu__btn:hover { background: var(--g100); border-color: var(--g300); color: var(--navy); }

.doc-menu__dropdown {
  position: fixed;
  z-index: 900;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  min-width: 168px;
  padding: 4px 0;
  animation: menuIn 0.14s ease;
}
@keyframes menuIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.doc-menu__item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 14px;
  font-size: 13.5px; color: var(--g600);
  background: none; border: none; cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.doc-menu__item:hover { background: var(--g100); color: var(--navy); }
.doc-menu__item--danger { color: #c0392b; }
.doc-menu__item--danger:hover { background: #fee2e2; color: #c0392b; }
.doc-menu__divider { height: 1px; background: var(--g200); margin: 4px 0; }

/* ── Preview modal ── */
.modal--preview {
  max-width: 880px; width: 95vw;
  height: 88vh;
  display: flex; flex-direction: column;
}
.modal--preview .modal__body {
  flex: 1; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 0 0 var(--radius) var(--radius);
}
#preview-body-content,
#audit-preview-body-content {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.preview-frame { flex: 1; width: 100%; border: none; background: var(--g100); display: block; }
.preview-img-wrap { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--g100); overflow: auto; padding: 16px; }
.preview-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: var(--shadow); }
.preview-unsupported {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--g400); font-size: 14px; background: var(--g100);
}
.preview-unsupported .preview-icon { font-size: 48px; }
.preview-loading {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--g400); font-size: 14px; background: var(--g100);
}

/* Fullscreen preview */
.modal-overlay:fullscreen {
  display: flex; padding: 0;
  background: rgba(0,0,0,0.97);
}
.modal-overlay:fullscreen .modal--preview {
  width: 100%; height: 100%;
  max-width: none; border-radius: 0; margin: 0;
}
.modal-overlay:-webkit-full-screen .modal--preview { width:100%; height:100%; max-width:none; border-radius:0; }
.modal-overlay:-moz-full-screen .modal--preview    { width:100%; height:100%; max-width:none; border-radius:0; }

/* PDF search bar */
.preview-search-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px; background: var(--g100);
  border-bottom: 1px solid var(--g200);
  flex-shrink: 0;
}
.preview-search-bar input {
  flex: 1; padding: 5px 10px;
  border: 1.5px solid var(--g200); border-radius: 6px; font-size: 13px;
  outline: none;
}
.preview-search-bar input:focus { border-color: var(--gold); }

/* ── Scroll fade-up ── */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .exec-summary__grid { grid-template-columns: 1fr 320px; }
}
@media (max-width: 1000px) {
  .exec-summary__grid { grid-template-columns: 1fr; }
  .exec-kpis { grid-template-columns: repeat(4, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .cards--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .cover { padding: 24px 20px; }
  .cover__inner { flex-direction: column; }
  .exec-summary, .timeline { padding: 20px; }
  .fin-section, .reg-section { padding: 20px; }
  .footer { padding: 24px 20px; }
  .cards, .cards--wide, .cards--2, .cards--3 { grid-template-columns: 1fr; }
  .exec-kpis { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .project-header { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* ─── Print ──────────────────────────────────────── */
@media print {
  .sidebar,
  .topbar,
  .btn,
  .modal-overlay,
  .toolbar,
  .filter-tabs {
    display: none !important;
  }

  .portal-layout {
    display: block;
  }

  .main-area {
    overflow: visible;
  }

  .page-content {
    padding: 0;
  }
}


/* ─── User Management ───────────────────────────────────────── */

/* Role badges */
.badge--admin    { background: #ede9fe; color: #5b21b6; }
.badge--reviewer { background: #dbeafe; color: #1d4ed8; }
.badge--viewer   { background: var(--g200); color: var(--g500); }

/* Status badges */
.badge--active   { background: #dcfce7; color: #166534; }
.badge--disabled { background: #fee2e2; color: #991b1b; }

/* Disabled user row */
.user-row--disabled td { opacity: 0.5; }


/* ─── Donation Receipt (.rp-*) ──────────────────────────── */

.rp-receipt {
  padding: 40px 48px 36px;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #1a1a1a;
  font-size: 13px;
}

.rp-header {
  display: flex; align-items: flex-start; gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #c8960c;
}
.rp-logo {
  width: 90px; height: 90px;
  object-fit: contain; flex-shrink: 0;
  border-radius: 6px;
}
.rp-trust-col { flex: 1; }
.rp-trust-name {
  font-size: 18px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: #1a1a1a; line-height: 1.2;
}
.rp-trust-sub { font-size: 12px; color: #555; margin-top: 3px; }
.rp-trust-regs {
  margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px 0;
  font-size: 11px; color: #444;
}
.rp-trust-regs span { display: block; }
.rp-trust-regs strong { color: #1a1a1a; }

.rp-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fdf6e3; border-bottom: 1px solid #e8d5a0;
  padding: 10px 48px; margin: 0 -48px;
}
.rp-title {
  font-size: 15px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: #7a5800;
}
.rp-meta-right { display: flex; gap: 24px; font-size: 12px; text-align: right; }
.rp-meta-item { display: flex; flex-direction: column; }
.rp-meta-label { color: #888; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.rp-meta-value { font-weight: 700; color: #1a1a1a; font-size: 13px; margin-top: 1px; }

.rp-section { margin-top: 22px; }
.rp-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #c8960c;
  border-bottom: 1px solid #f0e0b0; padding-bottom: 5px; margin-bottom: 10px;
}

.rp-donor-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-donor-table td { padding: 5px 0; vertical-align: top; }
.rp-donor-table td:first-child {
  width: 150px; color: #666; font-size: 12px;
  padding-right: 12px; white-space: nowrap;
}
.rp-donor-table td:last-child { font-weight: 500; color: #1a1a1a; }

.rp-amount-box {
  margin-top: 20px;
  border: 1.5px solid #c8960c; border-left: 5px solid #c8960c;
  background: #fffbf0; padding: 14px 18px;
  border-radius: 0 4px 4px 0;
}
.rp-amount-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #c8960c; margin-bottom: 4px;
}
.rp-amount-figure { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.rp-amount-words { font-size: 12px; color: #555; margin-top: 4px; font-style: italic; }

.rp-payment-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  font-size: 12px;
}
.rp-pf-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  color: #888; margin-bottom: 3px;
}
.rp-pf-value { font-weight: 600; color: #1a1a1a; }

.rp-purpose {
  margin-top: 16px; font-size: 13px;
  padding: 10px 14px; background: #f8f9fa;
  border-radius: 4px; color: #333;
}
.rp-purpose strong { color: #555; font-weight: 600; }

.rp-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 48px; padding-top: 16px; border-top: 1px solid #e5e7eb;
}
.rp-footer-note {
  font-size: 11px; color: #666; max-width: 360px; line-height: 1.5;
  font-style: italic;
}
.rp-signature-block { text-align: center; }
.rp-sig-line { border-top: 1.5px solid #333; width: 180px; margin: 0 auto 6px; }
.rp-sig-label { font-size: 11px; color: #555; }
.rp-sig-trust { font-size: 11px; font-weight: 700; color: #1a1a1a; }
