/* ==========================================================================
   Kingdom Africa Tours — base design system
   Brand tokens taken from the supplied UI/UX designs.
   Typography is sans throughout, per client direction.
   ========================================================================== */

:root {
  /* Brand */
  --forest-900: #0B2A1F;
  --forest-800: #0F3D2E;
  --forest-700: #14261D;
  --forest-600: #1B5240;
  --forest-100: #E3EBE5;
  --forest-050: #F1F6F2;

  --gold-700: #8A6417;
  --gold-600: #A67C1F;
  --gold-500: #B98D28;
  --gold-400: #C9A227;
  --gold-100: #F5EAD3;
  --gold-050: #FBF5E9;

  --cream:     #FBF9F4;
  --sand:      #F2EEE4;
  --white:     #FFFFFF;

  --ink-900: #14211B;
  --ink-700: #33433B;
  --ink-500: #5F6F66;
  --ink-400: #7E8D84;
  --ink-300: #A9B5AD;

  --line:      #E3E0D6;
  --line-soft: #EFEDE5;

  --ok-700:   #1F6444;
  --ok-100:   #E1F0E7;
  --warn-700: #8A6417;
  --warn-100: #FAEFD7;
  --bad-700:  #98301D;
  --bad-100:  #FAE3DE;
  --info-700: #1F4E6B;
  --info-100: #E1EDF4;

  /* Type */
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 33, 27, .06);
  --shadow:    0 1px 3px rgba(20, 33, 27, .07), 0 8px 24px -14px rgba(20, 33, 27, .22);
  --shadow-lg: 0 24px 60px -30px rgba(20, 33, 27, .35);

  --wrap: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
a { color: var(--forest-800); text-underline-offset: 2px; }
a:hover { color: var(--gold-600); }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--forest-800); color: #fff; padding: .75rem 1.25rem;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold-600); color: #fff; }
.btn-primary:hover { background: var(--gold-700); color: #fff; }
.btn-forest { background: var(--forest-800); color: #fff; }
.btn-forest:hover { background: var(--forest-900); color: #fff; }
.btn-outline { background: transparent; color: var(--forest-800); border-color: var(--line); }
.btn-outline:hover { border-color: var(--forest-800); color: var(--forest-800); background: var(--forest-050); }
.btn-ghost { background: transparent; color: var(--ink-700); padding: .5rem .75rem; }
.btn-ghost:hover { background: var(--sand); color: var(--ink-900); }
.btn-white { background: #fff; color: var(--forest-800); }
.btn-white:hover { background: var(--sand); }
.btn-danger { background: var(--bad-700); color: #fff; }
.btn-danger:hover { background: #7d2716; color: #fff; }
.btn-sm { padding: .45rem .85rem; font-size: .82rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* --------------------------------------------------------- forms */
.field { margin-bottom: 1.05rem; }
.field label, .form-label {
  display: block; font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-700); margin-bottom: .35rem;
}
.field .req { color: var(--bad-700); }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=datetime-local], input[type=number], input[type=url],
input[type=search], input[type=time], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: .95rem;
  padding: .7rem .85rem; color: var(--ink-900); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-300); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
}
textarea { min-height: 110px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235F6F66' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem;
}
.field-error { color: var(--bad-700); font-size: .8rem; margin: .3rem 0 0; }
.field-hint  { color: var(--ink-400); font-size: .8rem; margin: .3rem 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad-700); }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--ink-700); }
.check input { width: 1.05rem; height: 1.05rem; margin-top: .18rem; accent-color: var(--forest-800); flex: none; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }

fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  padding: 0; margin-bottom: .9rem; color: var(--ink-900);
}

/* --------------------------------------------------------- cards & panels */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.4rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--line-soft);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 1.4rem; }
.card-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--line-soft); background: var(--forest-050); }

.panel-note {
  background: var(--gold-050); border-left: 3px solid var(--gold-500);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem; color: var(--ink-700);
}
.panel-note.ok  { background: var(--ok-100);  border-left-color: var(--ok-700); }
.panel-note.bad { background: var(--bad-100); border-left-color: var(--bad-700); }

/* --------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: .25rem .55rem; border-radius: 100px; white-space: nowrap;
  background: var(--sand); color: var(--ink-700);
}
.badge.ok      { background: var(--ok-100);   color: var(--ok-700); }
.badge.wait    { background: var(--warn-100); color: var(--warn-700); }
.badge.bad     { background: var(--bad-100);  color: var(--bad-700); }
.badge.neutral { background: var(--sand);     color: var(--ink-500); }
.badge.gold    { background: var(--gold-100); color: var(--gold-700); }

/* --------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-400); font-weight: 700; padding: .75rem 1rem;
  background: var(--forest-050); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--forest-050); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-400); font-size: .92rem; }

/* --------------------------------------------------------- flash */
.flash-stack { position: relative; z-index: 40; }
.flash {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: .75rem;
  font-size: .92rem; border: 1px solid transparent;
}
.flash-success { background: var(--ok-100);  color: var(--ok-700);  border-color: #c5e0d0; }
.flash-error   { background: var(--bad-100); color: var(--bad-700); border-color: #edcabf; }
.flash-info    { background: var(--info-100);color: var(--info-700);border-color: #c6dced; }
.flash button { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; font-size: 1.1rem; line-height: 1; opacity: .6; }
.flash button:hover { opacity: 1; }

/* --------------------------------------------------------- progress */
.bar { height: 8px; background: var(--sand); border-radius: 100px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--forest-600); border-radius: 100px; }
.bar.gold > span { background: var(--gold-500); }

.ring { display: inline-grid; place-items: center; position: relative; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-label {
  position: absolute; font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; color: var(--ink-900);
}

/* --------------------------------------------------------- misc */
.stack   { display: grid; gap: 1rem; }
.stack-sm{ display: grid; gap: .5rem; }
.row     { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.muted   { color: var(--ink-500); }
.small   { font-size: .85rem; }
.tiny    { font-size: .76rem; }
.strong  { font-weight: 600; }
.nowrap  { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2.5rem; }
.hidden { display: none !important; }

.eyebrow {
  font-family: var(--font-display); font-size: .74rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600);
  margin-bottom: .6rem;
}

.avatar {
  width: 38px; height: 38px; border-radius: 100px; flex: none;
  display: grid; place-items: center; background: var(--forest-800); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .02em;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--gold-600); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
}
.logo-text {
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem;
  line-height: 1.05; letter-spacing: -.02em; color: var(--forest-800);
}
.logo-text span { display: block; }
.logo.on-dark .logo-text { color: #fff; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Shared components — used by both the participant portal and the admin
   backend, so they live here rather than in one shell's stylesheet.
   ========================================================================== */
/* ---------------------------------------------------------- stat cards */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-card h3 { font-size: .84rem; letter-spacing: .02em; color: var(--ink-500); font-weight: 600; margin-bottom: .9rem; }
.stat-card .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--ink-900); }
.stat-card .sub { font-size: .8rem; color: var(--ink-400); margin-top: .15rem; }
.stat-card .btn { margin-top: 1rem; }

.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- update list */
.update-list { display: grid; }
.update-item { display: grid; grid-template-columns: 58px 1fr; gap: .9rem; padding: .85rem 1.4rem; border-bottom: 1px solid var(--line-soft); text-decoration: none; }
.update-item:last-child { border-bottom: 0; }
.update-item:hover { background: var(--forest-050); }
.update-item .when { font-size: .76rem; color: var(--ink-400); font-weight: 600; padding-top: .12rem; }
.update-item h4 { font-size: .93rem; margin: 0 0 .15rem; color: var(--ink-900); }
.update-item p { font-size: .84rem; color: var(--ink-500); margin: 0; }
.update-item.is-unread h4::after {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 100px;
  background: var(--gold-500); margin-left: .45rem; vertical-align: middle;
}

/* ---------------------------------------------------------- quick links */
.quick-links { display: grid; }
.quick-links a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.4rem; border-bottom: 1px solid var(--line-soft); text-decoration: none; font-size: .9rem; color: var(--ink-700); }
.quick-links a:last-child { border-bottom: 0; }
.quick-links a:hover { background: var(--forest-050); color: var(--forest-800); }
.quick-links .ic { width: 30px; height: 30px; border-radius: 7px; background: var(--gold-050); display: grid; place-items: center; flex: none; }

/* ---------------------------------------------------------- payments */
.pay-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.pay-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.pay-box .k { font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); font-weight: 700; }
.pay-box .v { font-family: var(--font-display); font-size: 1.42rem; font-weight: 800; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.pay-box.total .v   { color: var(--ink-900); }
.pay-box.paid .v    { color: var(--ok-700); }
.pay-box.balance .v { color: var(--gold-700); }

/* ---------------------------------------------------------- documents */
.doc-list { display: grid; }
.doc-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.4rem; border-bottom: 1px solid var(--line-soft); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .ic { width: 34px; height: 34px; border-radius: 7px; background: var(--sand); display: grid; place-items: center; flex: none; font-size: .68rem; font-weight: 700; color: var(--ink-500); }
.doc-row .meta { min-width: 0; flex: 1; }
.doc-row h4 { margin: 0 0 .1rem; font-size: .93rem; }
.doc-row p { margin: 0; font-size: .8rem; color: var(--ink-400); }

.upload-drop {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.5rem;
  text-align: center; background: var(--forest-050);
}
.upload-drop input[type=file] { margin: .75rem auto 0; max-width: 340px; }

/* ---------------------------------------------------------- checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.4rem; border-bottom: 1px solid var(--line-soft); font-size: .91rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 20px; height: 20px; border-radius: 100px; display: grid; place-items: center; flex: none; font-size: .7rem; font-weight: 700; }
.checklist .tick.done { background: var(--ok-100); color: var(--ok-700); }
.checklist .tick.todo { background: var(--warn-100); color: var(--warn-700); }
.checklist li.is-done { color: var(--ink-500); }

/* ---------------------------------------------------------- messages */
.thread { display: grid; gap: 1rem; }
.msg { padding: .95rem 1.15rem; border-radius: var(--radius); max-width: 78%; font-size: .92rem; }
.msg.them { background: #fff; border: 1px solid var(--line); }
.msg.mine { background: var(--forest-100); margin-left: auto; }
.msg .who { font-size: .74rem; color: var(--ink-400); margin-bottom: .3rem; font-weight: 600; }

/* ---------------------------------------------------------- empty state */
.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--ink-400); }
.empty h3 { color: var(--ink-700); margin-bottom: .4rem; }
