/* ==========================================================================
   Pamoja Admin PWA
   Tokens extracted from template CSS: Outfit, primary #0f79f3, body #eff3f9
   ========================================================================== */

:root {
  /* Brand / accent */
  --primary: #0f79f3;
  --primary-30: #138bfd;
  --primary-40: #f1f2fd;
  --primary-50: #796df6;
  --primary-60: #978bff;
  --primary-hover: #0d6fd9;
  --primary-soft: #e7effd;
  --primary-soft-2: #ecf0ff;

  --secondary: #475569;
  --secondary-40: #314055;
  --secondary-50: #2b2a3f;

  --success: #2ed47e;
  --success-40: #eafbf2;
  --success-50: #00b69b;
  --success-60: #2ecc71;

  --danger: #e74c3c;
  --danger-40: #fde6e6;
  --danger-soft: #fae3e5;

  --warning: #ffb264;
  --warning-40: #fff1e6;
  --warning-50: #ffa500;

  --info: #00cae3;
  --info-40: #2aa9ff;
  --info-soft: #e6fafc;

  --white: #ffffff;
  --dark: #000000;
  --ink: #2c343e;
  --heading: #2b2a3f;
  --muted: #919aa3;
  --muted-40: #697689;
  --muted-50: #7e8999;
  --muted-60: #8e8da1;

  --body-bg: #eff3f9;
  --body-bg-alt: #f4f6fc;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f4f6fc;

  --border: #e7e2e2;
  --border-40: #eeeeee;
  --border-50: #e0e0e0;
  --border-60: #eaecf2;
  --border-70: #c2cada;
  --border-80: #e0e2ec;
  --border-90: #f5f5f5;
  --divider: #f1f2f6;

  /* Dark mode tokens (available if data-theme=dark) */
  --dark-body-bg: #131920;
  --dark-card-bg: #1b232d;
  --dark-border: #ffffff17;
  --dark-body-color: #ffffff80;
  --dark-btn-bg: #293542;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --radius-pill: 50px;
  --shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-card: 0 2px 14px rgba(100, 100, 111, 0.08);
  --transition: all 0.3s ease-in-out;

  --nav-w: 260px;
  --top-h: 70px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  font-family: var(--font);
  color: var(--ink);
  background: var(--body-bg);
  line-height: 1.5;
  font-size: 14.5px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  background: var(--body-bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ========== Shell layout (fixed white sidebar + soft main) ========== */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100dvh;
  background: var(--body-bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: var(--nav-w);
  background: var(--white);
  border-right: 1px solid var(--body-bg);
  box-shadow: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 40;
  transition: var(--transition);
}

.sidebar-brand {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-60);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .sidebar-logo {
  width: 48px;
  height: 56px;
  object-fit: contain;
  object-position: center top;
  border-radius: 10px;
  flex-shrink: 0;
  padding: 4px 6px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 166, 81, 0.35);
  /* Dark plate so the white AFCON trophy mark remains legible */
  background: linear-gradient(160deg, #0b1220 0%, #111827 55%, #052e1a 100%);
}

.sidebar-brand-text {
  min-width: 0;
}

.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.topbar-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--heading);
}

.nav-section,
.nav-section-label {
  padding: 18px 20px 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-60);
  font-weight: 700;
}

.nav-section-label {
  margin-top: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--muted-40);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--primary-40);
  color: var(--primary);
}

.nav-link.active {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  font-weight: 600;
}

/* Material-style charcoal active for all portals; supplier keeps dark pill */
.portal-shell .nav-link.active {
  background: #1e293b;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.portal-shell-supplier .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-link .nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.92;
}

.nav-link .nav-icon svg {
  display: block;
}

.nav-link .nav-label {
  min-width: 0;
  line-height: 1.3;
}

.nav-link .icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 15px;
  opacity: 0.95;
  flex-shrink: 0;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border-60);
  background: linear-gradient(180deg, transparent, var(--primary-40));
}

.sidebar-foot .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar-foot .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-50), var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-foot .user-meta {
  font-size: 12.5px;
  line-height: 1.35;
  min-width: 0;
}

.sidebar-foot .user-meta strong {
  display: block;
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-foot .user-meta span {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--body-bg);
}

/* Top header — white bar, soft elevation */
.topbar {
  min-height: var(--top-h);
  background: var(--white);
  border-bottom: 1px solid transparent;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--body-bg);
  border: 1px solid var(--border-60);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  min-width: min(320px, 36vw);
  color: var(--muted);
  font-size: 13.5px;
}

.topbar-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  color: var(--ink);
}

.topbar-search input::placeholder {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-60);
  background: var(--white);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted-40);
  transition: var(--transition);
  position: relative;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-40);
}

.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

.page {
  padding: 24px 28px 48px;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* ========== Primitives ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.3;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 121, 243, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-gold,
.btn-warning {
  background: var(--warning);
  color: #2b2a3f;
}

.btn-gold:hover:not(:disabled),
.btn-warning:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn-ghost {
  background: var(--white);
  color: var(--secondary);
  border-color: var(--border-50);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-40);
}

.btn-ghost.light {
  background: transparent;
  color: var(--muted-40);
  border-color: var(--border-60);
}

.btn-danger {
  background: var(--danger-40);
  color: var(--danger);
  border-color: transparent;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success-40);
  color: var(--success-50);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 7px;
}

.card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card.elevated {
  box-shadow: var(--shadow);
}

.card.bordered {
  border-color: var(--border-60);
  box-shadow: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row.between {
  justify-content: space-between;
}

.page-header {
  margin-bottom: 22px;
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.page-header .breadcrumb span.sep {
  opacity: 0.5;
}

.page-header .breadcrumb strong {
  color: var(--primary);
  font-weight: 500;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  max-width: 62ch;
}

/* Stat cards */
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -12px;
  top: -12px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-40);
  opacity: 0.9;
}

.stat-card .label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.03em;
  color: var(--heading);
  position: relative;
  z-index: 1;
}

.stat-card .hint {
  font-size: 12.5px;
  color: var(--muted-50);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.stat-card.tone-success::after {
  background: var(--success-40);
}
.stat-card.tone-warning::after {
  background: var(--warning-40);
}
.stat-card.tone-danger::after {
  background: var(--danger-40);
}
.stat-card.tone-info::after {
  background: var(--info-soft);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}

.badge-pending,
.badge-pending_review,
.badge-uploaded,
.badge-hold {
  background: var(--warning-40);
  color: #c27803;
}

.badge-verified,
.badge-published,
.badge-confirmed,
.badge-settled,
.badge-approved,
.badge-accepted,
.badge-fulfilled {
  background: var(--success-40);
  color: var(--success-50);
}

.badge-suspended,
.badge-draft,
.badge-out_of_stock,
.badge-unpublished,
.badge-in_escrow {
  background: #f1f5f9;
  color: var(--secondary);
}

.badge-blacklisted,
.badge-cancelled,
.badge-rejected,
.badge-failed,
.badge-refunded {
  background: var(--danger-40);
  color: var(--danger);
}

.badge-featured {
  background: var(--warning-40);
  color: #c27803;
}

.badge-info {
  background: var(--primary-40);
  color: var(--primary);
}

.badge-active {
  background: var(--success-40);
  color: var(--success-50);
}

.badge-inactive {
  background: #f1f5f9;
  color: var(--secondary);
}

/* Help panels & empty states */
.help-panel {
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.55;
}

.help-panel-info {
  background: var(--primary-40);
  border: 1px solid #c5d9fc;
  color: var(--secondary-40);
}

.help-panel-warn {
  background: var(--warning-40);
  border: 1px solid #ffd9b0;
  color: #8a5a12;
}

.help-panel-success {
  background: var(--success-40);
  border: 1px solid #b8efd4;
  color: #0a6b45;
}

.help-panel-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: inherit;
}

.help-panel-body p:last-child {
  margin-bottom: 0;
}

.help-list,
.help-steps {
  margin: 0;
  padding-left: 18px;
}

.help-list li,
.help-steps li {
  margin-bottom: 6px;
}

.help-list li:last-child,
.help-steps li:last-child {
  margin-bottom: 0;
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--primary-40);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.empty-state h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 6px;
}

.empty-state p {
  font-size: 13px;
  margin: 0 auto;
  max-width: 36ch;
  line-height: 1.5;
}

.empty-state-action {
  margin-top: 14px;
}

.section-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.inline-note {
  font-size: 12.5px;
  padding: 8px 10px;
  background: var(--body-bg);
  border-radius: 8px;
  color: var(--muted-40);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Compact stat pills (bookings, payouts, marketplace) */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border-60);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.stat-pill-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.stat-pill strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

/* Supplier onboarding wizard */
.wizard-progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--body-bg);
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-50));
  border-radius: var(--radius-pill);
  transition: width 0.25s ease;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--body-bg);
  border: 1px solid var(--border-60);
  font-size: 12px;
  color: var(--muted-40);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.wizard-step:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.wizard-step.done {
  background: var(--success-40);
  border-color: #b8efd4;
  color: var(--success-50);
  font-weight: 600;
}

.wizard-step.current {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-40);
  font-weight: 600;
}

.wizard-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.wizard-step.done .wizard-step-num {
  background: rgba(0, 182, 155, 0.2);
}

.wizard-step.current .wizard-step-num {
  background: rgba(15, 121, 243, 0.15);
}

.wizard-step-label {
  white-space: nowrap;
}

/* Required docs checklist */
.doc-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.doc-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-90);
  font-size: 13px;
}

.doc-checklist li:last-child {
  border-bottom: none;
}

.doc-checklist li.done .doc-check-mark {
  color: var(--success-50);
  background: var(--success-40);
}

.doc-checklist li.missing .doc-check-mark {
  color: var(--muted);
  background: var(--body-bg);
}

.doc-check-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-checklist.compact li {
  padding: 6px 0;
}

/* Onboarding review summary */
.review-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 8px;
}

.review-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-90);
}

.review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Verification review cards */
.review-card {
  transition: var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow);
}

.verify-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.verify-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--body-bg);
  border: 1px solid var(--border-60);
  font-size: 12px;
  color: var(--muted-40);
}

.verify-step.done {
  background: var(--success-40);
  border-color: #b8efd4;
  color: var(--success-50);
  font-weight: 600;
}

.verify-step.current {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-40);
  font-weight: 600;
}

.verify-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
}

.verify-step.done .verify-step-num {
  background: rgba(0, 182, 155, 0.2);
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-90);
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-90);
  font-size: 13px;
}

.doc-list li:last-child {
  border-bottom: none;
}

.doc-list li span {
  color: var(--muted);
  font-size: 12px;
}

.review-detail {
  padding-top: 4px;
  border-top: 1px solid var(--border-90);
}

/* Multi-portal shell — Material dark active pill (override portal accent) */
.portal-shell .nav-link.active {
  background: #1e293b;
  color: #fff;
}
.priority-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.priority-chip {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--body-bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.priority-chip strong {
  font-size: 13px;
}
.priority-chip span {
  font-size: 11px;
  color: var(--muted);
}
.priority-chip.tone-success {
  background: var(--success-40);
}
.priority-chip.tone-warning {
  background: var(--warning-40);
}
.priority-chip.tone-info {
  background: var(--primary-40);
}
.funnel-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 160px;
  margin-top: 16px;
  padding-top: 8px;
}
.funnel-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.funnel-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, #1046c4, #071b4d);
  border-radius: 6px 6px 2px 2px;
  min-height: 8px;
}
.badge-strategic,
.badge-official,
.badge-preferred,
.badge-registered,
.badge-active,
.badge-ended {
  background: var(--primary-40);
  color: var(--primary);
}
.land-portals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Portal feature navigator */
.nav-group {
  margin: 4px 0 8px;
}
.nav-group-toggle {
  width: calc(100% - 20px);
  margin: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.nav-group-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}
.nav-group-count {
  opacity: 0.7;
  font-size: 10px;
}
.nav-link-sub {
  margin-left: 8px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  align-items: flex-start !important;
}
.nav-feat-id {
  min-width: 18px;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.7;
  margin-top: 2px;
}
.nav-feat-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.feat-workspace .feat-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feat-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--body-bg);
  color: var(--muted-40);
  border: 1px solid var(--border-60);
}
.feat-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-90);
}
.feat-search {
  border: 1px solid var(--border-50);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 200px;
  font: inherit;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--body-bg);
  border: 1px solid var(--border-60);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.cal-cell.busy {
  background: var(--warning-40);
  border-color: #ffd9b0;
}
.cal-cell small {
  font-size: 9px;
  font-weight: 700;
  color: var(--warning);
}
.badge-protected {
  background: var(--success-40);
  color: var(--success-50);
}
.badge-healthy,
.badge-matched,
.badge-operational,
.badge-completed {
  background: var(--success-40);
  color: var(--success-50);
}
.badge-degraded,
.badge-timing_lag,
.badge-investigating,
.badge-mitigating,
.badge-delayed,
.badge-in_progress {
  background: var(--warning-40);
  color: #9a5b00;
}
.badge-critical,
.badge-halted {
  background: var(--danger-40);
  color: var(--danger);
}
.badge-shed_first,
.badge-escalated,
.badge-open,
.badge-default_deny {
  background: var(--warning-40);
  color: #c27803;
}
@media (max-width: 900px) {
  .land-portals {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

/* Material Tailwind-style dark header table panel */
.table-panel {
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.table-panel-header {
  background: linear-gradient(135deg, #1e293b 0%, #2b2a3f 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-panel-header h3,
.table-panel-header .table-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.table-panel-header .table-panel-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

.table-panel .table-wrap {
  box-shadow: none;
  border-radius: 0;
}

.table-panel table.data th {
  background: #f8fafc;
  color: #64748b;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th {
  text-align: left;
  padding: 14px 16px;
  background: var(--body-bg-alt);
  color: var(--muted-40);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-bottom: 1px solid var(--border-60);
  white-space: nowrap;
}

table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-90);
  vertical-align: middle;
  color: var(--ink);
}

table.data tr:last-child td {
  border-bottom: none;
}

table.data tr:hover td {
  background: #f8fafc;
}

/* Status pills — ONLINE / OFFLINE Material style */
.status-pill,
.status-pill-online,
.status-pill-offline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill-online {
  background: #e8faf0;
  color: #0d9f6e;
}

.status-pill-offline {
  background: #f1f5f9;
  color: #64748b;
}

.status-pill-paid,
.status-pill-completed {
  background: #e8faf0;
  color: #0d9f6e;
}

.status-pill-pending,
.status-pill-issued,
.status-pill-processing,
.status-pill-requested {
  background: #fff7ed;
  color: #c27803;
}

.status-pill-failed,
.status-pill-overdue,
.status-pill-void {
  background: #fde8e8;
  color: #c0392b;
}

.status-pill-mpesa {
  background: #e8f8ef;
  color: #0d7a4f;
}

.status-pill-card {
  background: #eef2ff;
  color: #4338ca;
}

.status-pill-bank {
  background: #f0f9ff;
  color: #0369a1;
}

/* Chart cards — framed dashboard panels (standard analytics look) */
.chart-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
}

.chart-card-lg {
  min-height: 380px;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.chart-card-header strong {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.chart-card-header span {
  font-size: 12px;
  color: var(--muted);
}

.chart-kpi-inline {
  display: flex;
  gap: 20px;
  text-align: right;
}

.chart-kpi-inline .muted {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-kpi-inline strong {
  font-size: 16px;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}

.chart-kpi-inline .text-success {
  color: #16a34a;
}

.bar-chart {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.bar-chart-standard {
  gap: 10px;
}

.bar-chart-frame {
  flex: 1;
  min-height: 220px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafbfc;
  overflow: hidden;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: block;
}

.bar-chart-plot-bg {
  fill: #ffffff;
}

.bar-chart-grid {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.bar-chart-axis {
  stroke: #cbd5e1;
  stroke-width: 1.25;
}

.bar-chart-y-label {
  font-size: 11px;
  fill: #64748b;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.bar-chart-x-label {
  font-size: 11px;
  fill: #64748b;
  font-family: inherit;
}

.bar-chart-x-label.is-hover {
  fill: #0f172a;
  font-weight: 600;
}

.bar-rect {
  transition: opacity 0.12s ease, fill 0.12s ease;
}

.bar-group.active .bar-rect {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}

.bar-chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  justify-content: center;
  font-size: 12.5px;
  color: #475569;
  padding: 2px 0 0;
}

.bar-chart-legend-row .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -2px;
}

/* Always-visible value strip under chart */
.bar-chart-value-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  color: #334155;
  min-height: 42px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bar-chart-value-footer.is-hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.bar-chart-period-label {
  font-weight: 700;
  color: #0f172a;
  min-width: 72px;
}

.bar-chart-value-pair {
  font-variant-numeric: tabular-nums;
  color: #475569;
}

.bar-chart-value-pair strong {
  color: #0f172a;
  font-weight: 600;
  margin-right: 4px;
}

.bar-chart-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  background: #fafbfc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  min-height: 220px;
}

/* Legacy CSS bars (analytics fallbacks) */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 8px;
  flex: 1;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  min-height: 0;
  transition: height 0.35s ease;
}

.chart-bar.tone-accent {
  background: linear-gradient(180deg, #0f79f3 0%, #0d5c3d 100%);
}

.chart-bar.tone-success {
  background: linear-gradient(180deg, #2ed47e 0%, #0d9f6e 100%);
}

.chart-bar-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-bar-value {
  font-size: 10px;
  font-weight: 600;
  color: var(--heading);
}

.h-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.h-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.h-bar-track {
  height: 14px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.h-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #3b82f6;
  min-width: 2px;
  transition: width 0.25s ease;
}

/* Stat cards — cleaner production tiles */
.stat-card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.stat-card .value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.table-panel {
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.period-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.period-toggle button {
  border: none;
  background: transparent;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-40);
  cursor: pointer;
  transition: var(--transition);
}

.period-toggle button.active {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.period-toggle button:hover:not(.active) {
  color: var(--heading);
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .quick-link-grid {
    grid-template-columns: 1fr;
  }
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border-60);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: inherit;
}

.quick-link-card:hover {
  border-color: #1e293b;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.quick-link-card strong {
  font-size: 13px;
  color: var(--heading);
}

.quick-link-card span {
  font-size: 12px;
  color: var(--muted);
}

.avatar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-cell .avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #475569);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  font-size: 13px;
}

.detail-grid .label,
.detail-field .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.detail-field-value {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--heading);
  line-height: 1.4;
  word-break: break-word;
}

.detail-field.span-2 {
  grid-column: 1 / -1;
}

.detail-section {
  border: 1px solid var(--border-60);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-60);
}

.detail-section-head h4 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--heading);
}

.detail-section-body {
  padding: 14px;
}

.money-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-60);
  border-radius: 10px;
  overflow: hidden;
}

.money-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-90);
  background: #fff;
}

.money-breakdown-row:last-child {
  border-bottom: none;
}

.money-breakdown-row.tone-muted {
  color: var(--muted-40);
}

.money-breakdown-row.tone-danger strong {
  color: var(--danger);
}

.money-breakdown-row.tone-success {
  background: #f0fdf6;
}

.money-breakdown-row.tone-success strong {
  color: #059669;
  font-size: 15px;
}

.money-breakdown-row.tone-strong strong {
  color: var(--heading);
  font-size: 15px;
}

.detail-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-timeline li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  position: relative;
  padding-bottom: 14px;
}

.detail-timeline li:last-child {
  padding-bottom: 0;
}

.detail-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.detail-timeline li.done:not(:last-child)::before {
  background: #86efac;
}

.detail-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  margin-top: 2px;
  z-index: 1;
}

.detail-timeline li.done .detail-timeline-dot {
  border-color: #16a34a;
  background: #16a34a;
  box-shadow: 0 0 0 3px #dcfce7;
}

.detail-timeline li.current .detail-timeline-dot {
  border-color: #0f79f3;
  background: #0f79f3;
  box-shadow: 0 0 0 3px #dbeafe;
}

.detail-timeline-content strong {
  font-size: 13px;
  color: var(--heading);
}

.detail-timeline-detail {
  font-size: 12.5px;
  color: var(--muted-40);
  margin-top: 2px;
}

.detail-timeline-at {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.detail-note {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.detail-note.tone-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.detail-note.tone-warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.detail-note.tone-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Clickable data rows open detail sheets */
table.data tbody tr.row-clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

table.data tbody tr.row-clickable:hover {
  background: #f1f5f9;
}

table.data tbody tr.row-clickable:hover td {
  color: var(--heading);
}

.modal.modal-sheet.modal-lg {
  width: min(720px, 100%);
  max-height: min(94dvh, 860px);
}

.modal.modal-sheet.modal-xl {
  width: min(880px, 100%);
  max-height: min(94dvh, 900px);
}

.hint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 500;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.field .req {
  color: var(--danger);
  margin-left: 2px;
}

.thread-pane {
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--body-bg);
  border-radius: 10px;
  border: 1px solid var(--border-60);
}

.thread-bubble {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--border-60);
}

.thread-bubble.from-supplier {
  background: var(--primary-soft);
  border-color: transparent;
  align-self: flex-end;
  max-width: 92%;
}

.thread-bubble.from-ops {
  background: #fff;
  max-width: 92%;
}

.thread-bubble.from-system {
  background: #f8fafc;
  color: var(--muted-40);
  font-size: 12.5px;
  max-width: 100%;
}

.thread-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--border-50);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 121, 243, 0.12);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
}

/* Callouts / alerts */
.callout {
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
}

.callout.info {
  background: var(--primary-40);
  border: 1px solid #c5d9fc;
  color: var(--secondary-40);
}

.callout.warn {
  background: var(--warning-40);
  border: 1px solid #ffd9b0;
  color: #8a5a12;
}

.callout.success {
  background: var(--success-40);
  border: 1px solid #b8efd4;
  color: #0a6b45;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty .emoji {
  font-size: 36px;
  margin-bottom: 8px;
}

/* Progress */
.progress-track {
  height: 8px;
  background: var(--border-60);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--info));
  border-radius: var(--radius-pill);
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--border-50);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted-40);
  transition: var(--transition);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 121, 243, 0.22);
}

/* Ad preview */
.ad-preview {
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  box-shadow: var(--shadow-sm);
}

.ad-preview .cta {
  background: #fff;
  color: var(--heading);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 25, 32, 0.45);
  display: grid;
  place-items: end center;
  z-index: 100;
  padding: 0;
  backdrop-filter: blur(2px);
}

.modal {
  background: #fff;
  width: min(560px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 20px 20px 28px;
  animation: slideUp 0.22s ease;
  box-shadow: var(--shadow);
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-50);
  border-radius: 4px;
  margin: 0 auto 14px;
}

/* Professional confirm / prompt dialogs (replace window.prompt / confirm) */
.app-dialog-backdrop {
  place-items: center;
  padding: 24px 16px;
  z-index: 200;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dialogBackdropIn 0.18s ease;
}

@keyframes dialogBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.app-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: min(90dvh, 580px);
  border-radius: 18px;
  padding: 0 0 20px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 28px 56px rgba(15, 23, 42, 0.2),
    0 8px 16px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: dialogPanelIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-dialog-accent {
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--portal-accent, var(--primary)),
    var(--primary-50, #796df6) 55%,
    var(--primary-60, #978bff)
  );
}

.app-dialog-danger .app-dialog-accent {
  background: linear-gradient(90deg, #c0392b, var(--danger), #ff8a7a);
}

.app-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.app-dialog-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.app-dialog-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 2px;
}

.app-dialog-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--heading);
  line-height: 1.3;
}

.app-dialog-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-dialog-danger .app-dialog-eyebrow {
  color: var(--danger);
}

/* Soft icon badges */
.app-dialog-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--portal-accent, var(--primary));
  background: var(--portal-accent-soft, var(--primary-soft));
  box-shadow: inset 0 0 0 1px rgba(15, 121, 243, 0.08);
}

.app-dialog-icon-confirm {
  color: var(--primary);
  background: var(--primary-soft);
}

.app-dialog-icon-prompt {
  color: var(--portal-accent, var(--primary));
  background: var(--portal-accent-soft, var(--primary-soft));
}

.app-dialog-icon-danger {
  color: var(--danger);
  background: var(--danger-soft);
  box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.1);
}

.app-dialog-x {
  flex-shrink: 0;
  min-width: 34px;
  height: 34px;
  border-radius: 10px !important;
  color: var(--muted) !important;
  border-color: transparent !important;
  background: transparent !important;
}

.app-dialog-x:hover:not(:disabled) {
  background: var(--body-bg-alt) !important;
  color: var(--heading) !important;
  border-color: transparent !important;
}

.app-dialog-message {
  margin: 14px 20px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-40);
}

.app-dialog-body {
  margin-top: 4px;
}

.app-dialog-body .app-dialog-message {
  margin-bottom: 0;
}

.app-dialog .field,
.app-dialog-field {
  margin: 14px 20px 0;
}

.app-dialog .field label,
.app-dialog-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.01em;
}

.app-dialog .field input,
.app-dialog .field select,
.app-dialog .field textarea,
.app-dialog-field input,
.app-dialog-field select,
.app-dialog-field textarea {
  border-radius: 10px;
  padding: 11px 14px;
  border-color: var(--border-60);
  background: var(--body-bg-alt);
  font-size: 14.5px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.app-dialog .field input:hover,
.app-dialog .field select:hover,
.app-dialog .field textarea:hover,
.app-dialog-field input:hover,
.app-dialog-field select:hover,
.app-dialog-field textarea:hover {
  border-color: var(--border-70);
  background: var(--white);
}

.app-dialog .field input:focus,
.app-dialog .field select:focus,
.app-dialog .field textarea:focus,
.app-dialog-field input:focus,
.app-dialog-field select:focus,
.app-dialog-field textarea:focus {
  background: var(--white);
  border-color: var(--portal-accent, var(--primary));
  box-shadow: 0 0 0 3px rgba(15, 121, 243, 0.14);
}

.app-dialog-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 20px 0;
  margin-top: 6px;
  border-top: 1px solid transparent;
}

.app-dialog-footer::before {
  content: '';
  flex-basis: 100%;
  height: 0;
  margin: -10px 0 6px;
  border-top: 1px solid var(--divider);
  order: -1;
}

.app-dialog-footer .btn {
  min-width: 108px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 18px;
}

.app-dialog-footer .btn-primary {
  box-shadow: 0 4px 14px rgba(15, 121, 243, 0.28);
  background: var(--portal-accent, var(--primary));
}

.app-dialog-footer .btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
}

.app-dialog-footer .btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.28);
}

.app-dialog-footer .btn-danger:hover:not(:disabled) {
  filter: brightness(0.95);
  background: var(--danger);
  color: #fff;
}

/* Form / content modals use the same elevated chrome */
.modal.modal-sheet {
  width: min(520px, 100%);
  max-height: min(92dvh, 720px);
  overflow-y: auto;
  padding-bottom: 18px;
}

.modal-body {
  padding: 14px 20px 0;
}

.modal-body .field {
  margin-top: 12px;
}

.modal-body .field:first-child {
  margin-top: 0;
}

.modal-body .field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--secondary);
}

.modal-body .field input,
.modal-body .field select,
.modal-body .field textarea {
  border-radius: 10px;
  padding: 11px 14px;
  border-color: var(--border-60);
  background: var(--body-bg-alt);
  font-size: 14.5px;
}

.modal-body .field input:hover,
.modal-body .field select:hover,
.modal-body .field textarea:hover {
  border-color: var(--border-70);
  background: var(--white);
}

.modal-body .field input:focus,
.modal-body .field select:focus,
.modal-body .field textarea:focus {
  background: var(--white);
  border-color: var(--portal-accent, var(--primary));
  box-shadow: 0 0 0 3px rgba(15, 121, 243, 0.14);
}

.modal-body > .stack {
  gap: 4px;
}

.modal-body > .stack > p {
  margin: 0 0 8px !important;
  color: var(--muted-40) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.modal-sheet .app-dialog-footer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0.92));
  margin-top: 8px;
  padding-bottom: 2px;
}

@media (max-width: 520px) {
  .app-dialog-backdrop {
    place-items: end center;
    padding: 0;
  }
  .app-dialog {
    width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: min(92dvh, 640px);
    animation: slideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .app-dialog-footer {
    flex-direction: column-reverse;
  }
  .app-dialog-footer .btn {
    width: 100%;
  }
}

/* ========== Supplier module setup wizard (first visit) ========== */
.module-guide-backdrop {
  place-items: center;
  padding: 16px;
  z-index: 120;
}

.module-guide-modal {
  width: min(640px, 100%);
  max-height: min(90dvh, 720px);
  border-radius: 16px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: guidePop 0.2s ease;
}

@keyframes guidePop {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0.5;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.module-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.module-guide-kicker {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.module-guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--portal-accent-soft, var(--primary-soft));
  color: var(--portal-accent, var(--primary));
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.module-guide-badge.muted {
  background: var(--body-bg);
  color: var(--muted);
}

.module-guide-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--heading);
}

.module-guide-purpose {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 48ch;
}

.module-guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.module-guide-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-60);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-40);
  cursor: pointer;
  transition: var(--transition);
}

.module-guide-step:hover {
  border-color: var(--portal-accent, var(--primary));
  color: var(--portal-accent, var(--primary));
}

.module-guide-step.current {
  border-color: var(--portal-accent, var(--primary));
  background: var(--portal-accent-soft, var(--primary-soft));
  color: var(--portal-accent, var(--primary));
}

.module-guide-step.done {
  border-color: var(--success);
  color: var(--success-50);
}

.module-guide-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  background: var(--body-bg);
}

.module-guide-step.current .module-guide-step-num {
  background: var(--portal-accent, var(--primary));
  color: #fff;
}

.module-guide-step.done .module-guide-step-num {
  background: var(--success-40);
  color: var(--success-50);
}

.module-guide-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px 8px;
}

.module-guide-body h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
}

.module-guide-nav-map {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--body-bg);
  border: 1px solid var(--border-60);
}

.module-guide-all-modules {
  margin-top: 16px;
}

.module-guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.module-guide-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-60);
}

.module-guide-footer-left {
  flex: 1;
  min-width: 140px;
}

.module-guide-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-60);
  background: #fff;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-accent, var(--primary));
  cursor: pointer;
  transition: var(--transition);
}

.module-guide-fab:hover {
  border-color: var(--portal-accent, var(--primary));
  background: var(--portal-accent-soft, var(--primary-soft));
}

.module-guide-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(255, 178, 100, 0.35);
}

@media (max-width: 800px) {
  .module-guide-modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    align-self: end;
  }
  .module-guide-backdrop {
    place-items: end center;
    padding: 0;
  }
  .module-guide-fab span:not(.module-guide-fab-dot) {
    /* keep label on mobile for discoverability */
  }
}

/* Persona / list buttons */
.persona {
  border: 1px solid var(--border-60);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  background: #fff;
  width: 100%;
  margin-bottom: 10px;
  box-shadow: none;
}

.persona:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 121, 243, 0.1);
  transform: translateY(-1px);
}

.persona .title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--heading);
}

.persona .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

/* Login — split card */
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(15, 121, 243, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(0, 202, 227, 0.1), transparent 50%),
    var(--body-bg);
}

.login-card {
  width: min(960px, 100%);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.login-hero {
  background: linear-gradient(155deg, #0b5fd0 0%, var(--primary) 48%, #00cae3 140%);
  color: #fff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -60px;
  right: -40px;
}

.login-hero::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  bottom: 40px;
  left: -30px;
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.login-hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}

.login-hero p {
  opacity: 0.9;
  font-size: 14.5px;
  margin-top: 12px;
  max-width: 36ch;
  line-height: 1.55;
}

.login-body {
  padding: 32px 28px;
  background: var(--white);
}

.mobile-nav-btn {
  display: none;
  border: 1px solid var(--border-60);
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--secondary);
}

.drawer-backdrop {
  display: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--primary-40);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Welcome banner (dashboard) */
.welcome-banner {
  background: linear-gradient(120deg, var(--primary) 0%, #138bfd 55%, #00cae3 120%);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 121, 243, 0.22);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  position: relative;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  right: -30px;
  top: -40px;
}

.welcome-banner h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.welcome-banner p {
  opacity: 0.9;
  font-size: 13.5px;
  max-width: 48ch;
}

.welcome-banner .banner-actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Responsive */
@media (min-width: 720px) {
  .modal-backdrop {
    place-items: center;
    padding: 24px;
  }
  .modal {
    border-radius: 14px;
    max-height: 85dvh;
  }
  .modal-handle {
    display: none;
  }
}

@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar-search {
    min-width: 180px;
  }
}

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-card {
    grid-template-columns: 1fr;
  }
  .login-hero {
    min-height: auto;
    padding: 28px 24px;
  }
}

@media (max-width: 800px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    border-right: none;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .drawer-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(19, 25, 32, 0.4);
    z-index: 35;
  }
  .mobile-nav-btn {
    display: inline-flex;
  }
  .topbar-search {
    display: none;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .page {
    padding: 16px 14px 40px;
  }
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   AFCON landing + credential login (green / orange stadium theme)
   ========================================================================== */
:root {
  --afcon-green: #0b3d2e;
  --afcon-green-mid: #0d5c3d;
  --afcon-green-deep: #062820;
  --afcon-orange: #ff6b00;
  --afcon-orange-hot: #ff8a1a;
  --afcon-gold: #f5c518;
  --afcon-cream: #fff8f0;
  --afcon-cream-2: #fff1e0;
}

.land {
  min-height: 100dvh;
  background: #fff;
  color: #1a1a1a;
  position: relative;
  overflow-x: hidden;
  font-family: var(--font);
}

.land-edge {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--afcon-orange);
  z-index: 50;
}
.land-edge-left { left: 0; }
.land-edge-right { right: 0; }

.land-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 36px;
  background: var(--afcon-green-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--afcon-orange);
}

.land-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.land-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.land-brand small {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
}
.land-brand-logo {
  width: 44px;
  height: 52px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center top;
  padding: 3px 5px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 166, 81, 0.4);
  background: linear-gradient(160deg, #0b1220 0%, #111827 55%, #052e1a 100%);
}

.land-nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}
.land-nav-links a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.15s;
}
.land-nav-links a:hover {
  color: var(--afcon-orange-hot);
}

.land-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.land-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, filter 0.15s, background 0.15s;
  font-family: inherit;
}
.land-btn:active { transform: scale(0.98); }
.land-btn-sm { padding: 7px 14px; font-size: 12.5px; }
.land-btn-lg { padding: 12px 24px; font-size: 15px; }
.land-btn-orange {
  background: var(--afcon-orange);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.35);
}
.land-btn-orange:hover { filter: brightness(1.06); }
.land-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.land-btn-ghost:hover {
  border-color: var(--afcon-orange);
  color: var(--afcon-orange-hot);
}
.land-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
}
.land-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.land-hero {
  background:
    radial-gradient(ellipse 80% 80% at 70% 40%, rgba(245, 197, 24, 0.12), transparent 55%),
    linear-gradient(160deg, var(--afcon-green-deep) 0%, var(--afcon-green) 45%, var(--afcon-green-mid) 100%);
  color: #fff;
  padding: 48px 36px 56px;
  position: relative;
  overflow: hidden;
}
.land-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 107, 0, 0.15), transparent 40%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.02) 40px,
      rgba(255, 255, 255, 0.02) 41px
    );
  pointer-events: none;
}
.land-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.land-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--afcon-gold);
  margin: 0 0 12px;
}
.land-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0;
}
.land-hero h1 span {
  color: var(--afcon-orange-hot);
}
.land-hero-lead {
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 42ch;
}
.land-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.land-social {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.land-social span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.land-hero-art {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
}
.land-trophy {
  text-align: center;
  position: relative;
  z-index: 2;
}
.land-trophy-cup {
  font-size: 120px;
  line-height: 1;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}
.land-trophy-badge {
  margin-top: 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(245, 197, 24, 0.45);
}
.land-trophy-badge strong {
  color: var(--afcon-gold);
  font-size: 22px;
  letter-spacing: 0.08em;
}
.land-trophy-badge span {
  font-size: 13px;
  font-weight: 700;
}
.land-trophy-badge small {
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-top: 2px;
}
.land-ball {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.15), transparent 45%),
    radial-gradient(circle at 50% 50%, #1a6b45, #0a3d2c);
  border: 3px solid rgba(255, 255, 255, 0.12);
  opacity: 0.55;
  z-index: 1;
  right: 10%;
  top: 12%;
}

.land-search-bar {
  background: #fff;
  padding: 0 36px;
  margin-top: -22px;
  position: relative;
  z-index: 5;
}
.land-search-inner {
  max-width: 1120px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(11, 61, 46, 0.12);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #f0e6dc;
  font-size: 13.5px;
  color: #6b7280;
  font-weight: 500;
}
.land-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  justify-content: stretch;
}
.land-highlight {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--afcon-cream);
  border: 1px solid #f0e0d0;
}
.land-highlight strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--afcon-green-deep);
}
.land-highlight span {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}
.land-section-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--afcon-orange);
}
.land-card-badge {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--afcon-orange);
}
.land-card-list {
  margin: 0 0 14px;
  padding: 0 0 0 16px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
}
.land-card-list li {
  margin-bottom: 4px;
}
.land-outcomes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.land-outcome-body {
  margin: 0;
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.5;
  font-weight: 500;
}
.land-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.land-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 36px;
}
.land-section-cream {
  max-width: none;
  background: var(--afcon-cream);
  padding: 48px 36px;
}
.land-section-cream > .land-section-head,
.land-section-cream > .land-groups,
.land-section-cream > .land-cta-banner {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}
.land-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.land-section-head h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--afcon-green-deep);
  letter-spacing: -0.02em;
  margin: 0;
}
.land-link-orange {
  color: var(--afcon-orange);
  font-weight: 700;
  font-size: 14px;
}
.land-link-orange:hover { text-decoration: underline; }

.land-match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.land-match-card {
  background: linear-gradient(145deg, var(--afcon-green) 0%, var(--afcon-green-deep) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(6, 40, 32, 0.2);
}
.land-match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 10px;
}
.land-pill {
  background: var(--afcon-orange);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.land-match-card h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 6px;
}
.land-match-card h3 span {
  color: var(--afcon-gold);
  font-size: 12px;
  margin: 0 6px;
}
.land-match-card p {
  font-size: 12.5px;
  opacity: 0.8;
  margin: 0 0 14px;
}

.land-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.land-group-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #f0e0d0;
  box-shadow: 0 4px 16px rgba(11, 61, 46, 0.06);
}
.land-group-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--afcon-orange);
}
.land-group-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.land-group-card li {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afcon-green-deep);
  padding: 5px 0;
  border-bottom: 1px solid #f5efe8;
}
.land-group-card li:last-child { border-bottom: none; }

.land-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.land-module-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #eee;
  box-shadow: 0 6px 20px rgba(11, 61, 46, 0.06);
  border-top: 3px solid var(--afcon-orange);
}
.land-module-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--afcon-green-deep);
}
.land-module-card p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #6b7280;
  line-height: 1.5;
}

.land-cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(120deg, var(--afcon-green-deep), var(--afcon-green-mid));
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  border: 1px solid rgba(255, 107, 0, 0.25);
}
.land-cta-banner h2 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
}
.land-cta-banner p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
  max-width: 48ch;
}

.land-footer {
  background: var(--afcon-green-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 22px 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  border-top: 3px solid var(--afcon-orange);
}
.land-footer strong { color: #fff; }

/* Credential login */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(255, 107, 0, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(11, 61, 46, 0.12), transparent 50%),
    var(--afcon-cream);
}

.auth-card {
  width: min(960px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(11, 61, 46, 0.12);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth-hero {
  background: linear-gradient(155deg, var(--afcon-green-deep) 0%, var(--afcon-green) 50%, var(--afcon-green-mid) 100%);
  color: #fff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  position: relative;
  overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 107, 0, 0.15);
  top: -50px;
  right: -40px;
}
.auth-hero > * { position: relative; z-index: 1; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 28px;
}
.auth-brand-logo {
  width: 52px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  object-position: center top;
  padding: 4px 6px;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 166, 81, 0.4);
  background: linear-gradient(160deg, #0b1220 0%, #111827 55%, #052e1a 100%);
}
.auth-brand strong { display: block; font-size: 16px; }
.auth-brand small { display: block; font-size: 12px; opacity: 0.8; }

.auth-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--afcon-gold);
  margin: 0 0 12px;
}
.auth-hero h1 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}
.auth-lead {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.9;
}
.auth-hero-foot { margin-top: auto; padding-top: 28px; }
.auth-back {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 600;
}
.auth-back:hover { color: var(--afcon-orange-hot); }

.auth-form-panel {
  padding: 36px 32px;
  background: #fff;
}
.auth-form-panel h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--afcon-green-deep);
  margin: 0 0 6px;
}
.auth-form-sub {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 22px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-error {
  background: #fde6e6;
  color: #c0392b;
  border: 1px solid #f5c6c6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
}
.auth-form .field label {
  color: var(--afcon-green-deep);
}
.auth-form .field input:focus {
  border-color: var(--afcon-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.auth-hints {
  margin-top: 22px;
  border-top: 1px solid #f0e6dc;
  padding-top: 14px;
}
.auth-hints-toggle {
  background: none;
  border: none;
  color: var(--afcon-orange);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.auth-hints-panel {
  margin-top: 12px;
  background: var(--afcon-cream);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #f0e0d0;
}
.auth-hints-panel p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: #6b7280;
}
.auth-hints-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-hint-row {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.auth-hint-row:hover {
  border-color: var(--afcon-orange);
}
.auth-hint-label {
  display: block;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--afcon-green-deep);
  margin-bottom: 4px;
}
.auth-hint-creds {
  display: block;
  font-size: 11.5px;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .land-edge { width: 8px; }
  .land-nav { padding: 12px 18px; flex-wrap: wrap; }
  .land-nav-links { display: none; }
  .land-hero { padding: 36px 20px 48px; }
  .land-hero-inner { grid-template-columns: 1fr; }
  .land-hero-art { min-height: 180px; }
  .land-trophy-cup { font-size: 80px; }
  .land-search-bar { padding: 0 16px; }
  .land-section { padding: 36px 16px; }
  .land-section-cream { padding: 36px 16px; }
  .land-match-grid,
  .land-groups,
  .land-modules,
  .land-outcomes,
  .land-steps,
  .land-highlights { grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-hero { min-height: auto; padding: 28px 24px; }
  .auth-form-panel { padding: 28px 22px; }
}
