/* mutual.lk — single stylesheet, mobile-first */
:root {
  --card: #ffffff;
  --warn-bg: #fff6dd;
  --warn-ink: #7a5600;
  --ok-bg: #e7f8ef;
  --ok-ink: #116b3c;
  --err-bg: #fdecec;
  --err-ink: #9b1c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 25, 40, .05), 0 8px 24px rgba(20, 25, 40, .06);
  --shadow-lg: 0 20px 50px rgba(var(--brand-rgb), .18);
  --font: "Inter", "Noto Sans Sinhala", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* ---------- Colour themes: choose one in config.php → 'theme' ---------- */
:root, html[data-theme="ocean"] {
  --brand-700: #0b2a5b; --brand-600: #0f4386; --brand: #12509e; --brand-2: #1f7ae0; --brand-50: #eaf2fc; --brand-100: #d3e4f8; --brand-rgb: 18, 80, 158;
  --accent: #0ea5a4; --accent-600: #0b8584; --accent-50: #e3f6f5; --accent-100: #b9e7e5; --accent-light: #7fe9df; --accent-rgb: 14, 165, 164;
  --bg: #f4f7fb; --line: #e2e8f0; --ink: #13213a; --ink-2: #44536b; --muted: #6b7a90;
}
html[data-theme="emerald"] {
  --brand-700: #053d2f; --brand-600: #065f46; --brand: #047857; --brand-2: #10b981; --brand-50: #e8f7f0; --brand-100: #cdeedd; --brand-rgb: 4, 120, 87;
  --accent: #d97706; --accent-600: #b45309; --accent-50: #fef5e3; --accent-100: #fbe2b0; --accent-light: #fcd34d; --accent-rgb: 245, 158, 11;
  --bg: #f4f8f6; --line: #dfe9e4; --ink: #11261f; --ink-2: #40574e; --muted: #677d74;
}
html[data-theme="maroon"] {
  --brand-700: #4a0818; --brand-600: #74112f; --brand: #8b1538; --brand-2: #b8325a; --brand-50: #fbeef2; --brand-100: #f4d5df; --brand-rgb: 139, 21, 56;
  --accent: #b8860b; --accent-600: #8f6808; --accent-50: #fbf4de; --accent-100: #f1dfa6; --accent-light: #f7d774; --accent-rgb: 212, 160, 23;
  --bg: #faf6f4; --line: #ece2df; --ink: #2a1418; --ink-2: #5a4448; --muted: #86706f;
}
html[data-theme="teal"] {
  --brand-700: #0b3b38; --brand-600: #115e59; --brand: #0f766e; --brand-2: #14b8a6; --brand-50: #e6f6f4; --brand-100: #c8ebe6; --brand-rgb: 15, 118, 110;
  --accent: #e85d75; --accent-600: #c94560; --accent-50: #fdecef; --accent-100: #f7c9d2; --accent-light: #ffb3c1; --accent-rgb: 232, 93, 117;
  --bg: #f3f8f7; --line: #dde8e6; --ink: #11282a; --ink-2: #41585a; --muted: #69807f;
}
html[data-theme="purple"] {
  --brand-700: #470596; --brand-600: #5a08b8; --brand: #6a0dd6; --brand-2: #8b2cf5; --brand-50: #f5effe; --brand-100: #ebdefd; --brand-rgb: 106, 13, 214;
  --accent: #0fb5a0; --accent-600: #0a9583; --accent-50: #e6f8f5; --accent-100: #bfe9e2; --accent-light: #7ff3e1; --accent-rgb: 15, 181, 160;
  --bg: #f6f5fa; --line: #e6e3ef; --ink: #1b1530; --ink-2: #4a4560; --muted: #7a7590;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh;
}
body.lang-si, body.lang-ta { line-height: 1.75; }
body.lang-ta { font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 560px; }
.container-mid { max-width: 860px; }
.site-main { flex: 1; padding: 28px 0 56px; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(120deg, var(--brand-700), var(--brand) 55%, var(--brand-2));
  color: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(var(--brand-rgb), .25);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; color: var(--accent-light); }
.brand-footer { color: var(--ink); font-size: 1.3rem; margin-bottom: 12px; }
.brand-footer b { color: var(--accent); }

.nav-toggle {
  margin-left: auto; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); cursor: pointer; padding: 0 11px;
}
.nav-toggle span:not(.sr-only) { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--brand-700); padding: 8px 16px 18px; box-shadow: 0 16px 30px rgba(0,0,0,.2);
}
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li a {
  display: block; color: #fff; padding: 12px 10px; border-radius: 10px; font-weight: 500; font-size: .98rem;
}
.main-nav li a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.main-nav li a.is-active { background: rgba(255,255,255,.16); }
.nav-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.15); }

.lang-switch { display: inline-flex; background: rgba(0,0,0,.18); border-radius: 999px; padding: 3px; }
.lang-switch a { color: #e8dcff; padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-weight: 600; line-height: 1.3; }
.lang-switch a:hover { text-decoration: none; color: #fff; }
.lang-switch a.is-active { background: #fff; color: var(--brand-700); }

.user-menu { position: relative; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: rgba(0,0,0,.16); border-radius: 12px; padding: 6px 12px 6px 6px; color: #fff;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--brand);
  display: grid; place-items: center; font-weight: 800;
}
.user-name { font-size: .78rem; line-height: 1.25; opacity: .95; }
.user-name b { font-size: .88rem; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink);
  font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--brand-50); text-decoration: none; }
.user-dropdown form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

@media (min-width: 1020px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex !important; align-items: center; position: static; background: none; padding: 0; box-shadow: none; margin-left: auto; gap: 18px; }
  .main-nav ul { display: flex; gap: 2px; }
  .main-nav li a { padding: 8px 11px; font-size: .92rem; }
  .nav-right { margin: 0; padding: 0; border: 0; flex-wrap: nowrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-align: center;
  transition: transform .08s, background .15s, box-shadow .15s; line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(var(--brand-rgb), .28); }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-danger-link { background: none; border: 0; color: var(--err-ink); padding: 8px 10px; font-weight: 500; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; }

/* ---------- Cards & page heads ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-pad { padding: 24px; }
@media (min-width: 640px) { .card-pad { padding: 32px; } }
.page-head { margin-bottom: 22px; }
.page-head p { color: var(--ink-2); margin: 0; }
.auth-card { max-width: 480px; margin: 12px auto 0; }
.auth-card .card-head {
  background: linear-gradient(120deg, var(--brand-700), var(--brand)); color: #fff;
  padding: 26px 28px; border-radius: var(--radius) var(--radius) 0 0;
}
.auth-card .card-head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.auth-card .card-head p { margin: 0; opacity: .85; font-size: .95rem; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; }
.section-title .count { background: var(--brand-50); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 18px; }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-title { grid-template-columns: 120px 1fr; } }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  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 d='M1 1l5 5 5-5' stroke='%237a7590' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:disabled { background-color: #f3f2f7; color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
textarea { min-height: 80px; resize: vertical; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .92rem; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }
.center { text-align: center; }

/* ---------- Alerts ---------- */
.flash-wrap { margin-bottom: 18px; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: .95rem; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); border-color: #c4ecd5; }
.alert-error { background: var(--err-bg); color: var(--err-ink); border-color: #f6caca; }
.alert-info { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #f4e2a8; }

/* ---------- Home ---------- */
.hero {
  background: radial-gradient(circle at 85% 10%, rgba(var(--accent-rgb), .25), transparent 40%),
              linear-gradient(135deg, var(--brand-700), var(--brand) 60%, var(--brand-2));
  color: #fff; border-radius: 22px; padding: 40px 24px; position: relative; overflow: hidden;
}
@media (min-width: 860px) { .hero { padding: 64px 56px; display: grid; grid-template-columns: 1.2fr .9fr; gap: 40px; align-items: center; } }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.9rem); margin-bottom: 14px; }
.hero p.lead { font-size: 1.08rem; opacity: .92; max-width: 560px; }
.badge-pill { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.hero-badges .badge-pill { margin-bottom: 0; }
.badge-smart { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 11px; border-radius: 999px; overflow: hidden;
  font-size: .82rem; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(110deg, rgba(var(--accent-rgb), .95), rgba(124, 58, 237, .9));
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 4px 18px rgba(var(--accent-rgb), .45); }
.badge-smart:hover { text-decoration: none; color: #fff; filter: brightness(1.08); }
.badge-smart svg { color: #fff8c5; flex: none; animation: smart-twinkle 2.4s ease-in-out infinite; }
.badge-smart::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: smart-shine 3.6s ease-in-out infinite; }
@keyframes smart-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes smart-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.18) rotate(12deg); opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .badge-smart::after, .badge-smart svg { animation: none; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-visual { margin-top: 32px; }
@media (min-width: 860px) { .hero-visual { margin-top: 0; } }
.swap-demo { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 18px; backdrop-filter: blur(6px); }
.swap-person { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 14px; }
.swap-person .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.swap-person small { display: block; color: var(--muted); font-size: .78rem; }
.swap-person strong { font-size: .92rem; }
.swap-arrows { display: flex; justify-content: center; padding: 8px 0; color: var(--accent-light); font-size: 1.4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: -28px 12px 0; position: relative; }
@media (min-width: 860px) { .stats { margin: -36px 56px 0; gap: 20px; } }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 12px; text-align: center; border: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--brand); font-weight: 800; }
.stat span { font-size: .8rem; color: var(--muted); }
.steps { display: grid; gap: 16px; margin-top: 18px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 24px; }
.step .num { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.split { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.info-tile { padding: 24px; }
.info-tile p { margin: 0; color: var(--ink-2); }
.info-tile.accent { background: var(--accent-50); border-color: var(--accent-100); }
.match-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 22px; margin-top: 24px; background: var(--ok-bg); border-color: #c4ecd5; }
.match-banner b { color: var(--ok-ink); }

/* ---------- Transfer form ---------- */
.route-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .route-grid { grid-template-columns: 1fr auto 1fr; align-items: start; } }
.route-box { padding: 22px; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff; }
.route-box h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.route-box h2 .tag { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .85rem; color: #fff; }
.tag-from { background: var(--brand); }
.tag-to { background: var(--accent); }
.route-arrow { display: none; }
@media (min-width: 900px) { .route-arrow { display: block; align-self: start; color: var(--brand); font-size: 1.6rem; padding-top: 128px; } }
.hosp-list { max-height: 320px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 4px; background: #fff; }
.hosp-list:empty { display: none; }
.hosp-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-weight: 400; color: var(--ink); font-size: .93rem; margin: 0; }
.hosp-item:hover { background: var(--brand-50); }
.hosp-item input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.hosp-item.is-hidden { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-50); color: var(--accent-600); border: 1px solid var(--accent-100); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .82rem; font-weight: 600; }
.chip button { border: 0; background: rgba(var(--accent-rgb),.12); color: var(--accent-600); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: .9rem; }
.sel-count { font-size: .85rem; color: var(--accent-600); font-weight: 600; margin-top: 10px; }
.filter-input { margin-bottom: 8px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { background: #2b2640; color: #fff; text-align: left; padding: 13px 16px; font-weight: 600; white-space: nowrap; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #faf8ff; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .prov { display: block; font-size: .78rem; color: var(--muted); }
.count-badge { display: inline-block; min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .82rem; }
@media (max-width: 640px) {
  table.data.stack thead { display: none; }
  table.data.stack tr { display: block; border-top: 1px solid var(--line); padding: 10px 4px; }
  table.data.stack td { display: block; border: 0; padding: 4px 12px; }
  table.data.stack td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
  table.data.stack .num { text-align: left; }
}

/* ---------- Search filters ---------- */
.filters { display: grid; gap: 14px; padding: 20px; }
@media (min-width: 760px) { .filters { grid-template-columns: 1fr 1fr 1fr 1fr auto; align-items: end; } }
.filters .form-row { margin: 0; }
.filter-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }

/* ---------- Matching ---------- */
.request-card { padding: 20px 22px; margin-bottom: 16px; }
.request-route { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-weight: 600; }
.request-route .arrow { color: var(--accent); font-size: 1.2rem; }
.request-route .h { background: var(--brand-50); padding: 5px 12px; border-radius: 8px; font-size: .93rem; }
.request-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.request-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.request-actions form { margin: 0; }
.match-list { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 760px) { .match-list { grid-template-columns: 1fr 1fr; } }
.match-card { border: 1.5px solid var(--accent-100); background: linear-gradient(180deg, var(--accent-50), #fff 60%); border-radius: var(--radius-sm); padding: 16px; }
.match-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.match-card .who .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.match-card .who small { display: block; color: var(--muted); font-size: .8rem; }
.match-card p { font-size: .9rem; color: var(--ink-2); margin: 0 0 12px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.locked { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 12px; font-size: .88rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.chain { display: grid; gap: 8px; margin: 10px 0; }
.chain-step { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: .9rem; }
.chain-step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; }
.no-match { padding: 14px 16px; background: #faf9fd; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: .92rem; margin-top: 14px; }
.empty { text-align: center; padding: 48px 20px; }
.empty .icon { font-size: 2.4rem; margin-bottom: 8px; }
.note { font-size: .85rem; color: var(--ink-2); margin-top: 8px; font-style: italic; }
.verified { display: inline-block; background: var(--ok-bg); color: var(--ok-ink); font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 16px; margin: 18px 0 28px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.plan { padding: 28px; text-align: center; position: relative; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--brand); margin: 6px 0; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; font-size: .92rem; }
.plan li { padding: 6px 0 6px 26px; position: relative; color: var(--ink-2); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.bank { white-space: pre-line; background: #faf9fd; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }

/* ---------- Static pages ---------- */
.prose p { color: var(--ink-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.contact-tiles { display: grid; gap: 14px; }
@media (min-width: 700px) { .contact-tiles { grid-template-columns: repeat(3, 1fr); } }
.contact-tiles .card { padding: 22px; }
.contact-tiles span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .93rem; }
.footer-grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--brand); }
.footer-contact li { margin-bottom: 12px; }
.footer-contact span { display: block; font-size: .78rem; color: var(--muted); }
.footer-contact a { display: inline-block; margin-right: 10px; }
.footer-small a { color: var(--ink-2); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; font-size: .82rem; color: var(--muted); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-tabs a { padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.admin-tabs a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input[type=date] { padding: 6px 8px; font-size: .85rem; width: auto; }
.inline-form input[type=text] { padding: 6px 8px; font-size: .85rem; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 22px; }
.kpis .stat { text-align: left; padding: 18px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .88rem; }
.pager span { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Package gates ---------- */
.gate-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px;
  background: linear-gradient(120deg, var(--brand-50), #fff 70%); border-color: var(--brand-100); }
.gate-card h2 { margin-bottom: 4px; }
.plan { display: flex; flex-direction: column; text-align: left; }
.plan h3 { margin-bottom: 2px; }
.plan .price { margin: 8px 0 0; }
.plan-desc { color: var(--ink-2); font-size: .92rem; margin: 12px 0 0; min-height: 3em; }
.plan ul { flex: 1; margin-bottom: 20px; }
.plan li.off { color: #b3afc2; text-decoration: line-through; }
.plan li.off::before { content: "✕"; color: #c9c5d6; }
.plan-best { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan-current { outline: 3px solid var(--accent); outline-offset: -1px; }
.plan-ribbon { position: absolute; top: -12px; right: 18px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pay-grid { display: grid; gap: 18px; }
@media (min-width: 860px) { .pay-grid { grid-template-columns: 1fr 1fr; } }
.pay-option h2 { display: flex; align-items: center; gap: 10px; }
.pay-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 22px; margin-bottom: 18px; }
.pay-summary .price { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.payhere-btn { background: #1d1a39; color: #fff; }
.payhere-btn:hover { background: #000; }
.methods { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.methods span { border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: .75rem; font-weight: 700; color: var(--ink-2); background: #fff; }

/* ---------- Chat assistant ---------- */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 80; display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 18px 12px 14px; font: inherit; font-weight: 700; font-size: .93rem; cursor: pointer;
  box-shadow: 0 10px 28px rgba(var(--brand-rgb), .38); transition: transform .15s, box-shadow .15s;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(var(--brand-rgb), .45); }
.chat-fab.is-hidden { display: none; }
@media (max-width: 520px) { .chat-fab span { display: none; } .chat-fab { padding: 14px; } }
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 380px; max-width: calc(100vw - 24px); }
.chat-panel {
  display: flex; flex-direction: column; height: min(600px, calc(100vh - 40px)); background: #fff;
  border-radius: 18px; box-shadow: 0 24px 60px rgba(20, 25, 40, .28); overflow: hidden; border: 1px solid var(--line);
  animation: chat-in .18s ease-out;
}
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .chat { right: 0; left: 0; bottom: 0; width: 100%; max-width: none; }
  .chat-panel { height: 100dvh; border-radius: 0; border: 0; }
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff;
  background: linear-gradient(120deg, var(--brand-700), var(--brand)); }
.chat-head b { display: block; font-size: .98rem; }
.chat-head small { opacity: .8; font-size: .75rem; }
.chat-x { margin-left: auto; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.55; word-wrap: break-word; }
.msg-bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; color: var(--ink); }
.msg-user { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { color: var(--brand); font-weight: 600; }
.msg-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-links a { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 999px; padding: 4px 11px; font-size: .82rem; text-decoration: none; }
.msg.is-typing { display: inline-flex; gap: 4px; padding: 14px; }
.msg.is-typing span { width: 7px; height: 7px; border-radius: 50%; background: #b9b3cc; animation: chat-dot 1s infinite; }
.msg.is-typing span:nth-child(2) { animation-delay: .15s; } .msg.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: #fff; border-top: 1px solid var(--line); }
.chat-chips[hidden] { display: none; }
.chat-chips button { border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chat-chips button:hover { background: var(--brand-100); }
.chat-form { display: flex; gap: 8px; padding: 12px 14px 14px; background: #fff; }
.chat-chips:not([hidden]) + .chat-form { padding-top: 10px; }
.chat-form input { flex: 1; border-radius: 999px; padding: 11px 16px; font-size: .95rem; }
.chat-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.05rem; cursor: pointer; }
.chat-form button:hover { background: var(--brand-600); }
.msg-related { margin-top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.msg-related small { color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.msg-related button { text-align: left; border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700); border-radius: 12px; padding: 6px 11px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.msg-related button:hover { background: var(--brand-100); }
.chat-chips { max-height: 132px; overflow-y: auto; }
.site-footer { padding-bottom: 70px; }

/* ---------- Admin FAQ editor ---------- */
@media (min-width: 900px) { .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .faq-meta { grid-template-columns: 2fr 1fr 110px auto; } }
.faq-edit .form-grid > div { margin-bottom: 12px; }
.faq-admin-item { margin-bottom: 10px; }
.faq-admin-item > summary { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; cursor: pointer; font-weight: 600; }
.faq-admin-body { padding: 0 18px 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.faq-admin-item .prov { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* ---------- Admin: delete users ---------- */
.bulk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #a31f1f; }
.btn-danger:disabled { background: #e7c1c1; cursor: not-allowed; }
table.data th.sel, table.data td.sel { width: 36px; padding-right: 0; }
table.data .sel input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 640px) { table.data.stack td.sel { padding-top: 10px; } }

/* ---------- Admin: match alerts ---------- */
.tab-badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #e53935; color: #fff; font-size: .72rem; font-weight: 800; text-align: center; line-height: 1.5; }
.user-menu .avatar { position: relative; }
.avatar-dot { position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #e53935; border: 2px solid #fff; }
.alert-count { background: #fdecec; color: #c62828; }
.alert-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .alert-list { grid-template-columns: 1fr 1fr; } }
.alert-item { padding: 16px 18px; border-left: 4px solid var(--accent); }
.alert-item.is-seen { opacity: .7; border-left-color: var(--line); }
.alert-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.badge-type { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-type.is-direct { background: var(--accent-50); color: var(--accent-600); }
.badge-type.is-three { background: var(--brand-50); color: var(--brand); }
.badge-type.is-four { background: #f1eafe; color: #6d28d9; }
.alert-person { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.alert-person .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .75rem; flex: none; }
.alert-person .prov { display: block; font-size: .82rem; color: var(--muted); }
.prov.joined { color: var(--brand); font-weight: 500; }
.test-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.test-actions form { margin: 0; }

/* ---------- Search ---------- */
.sr-hero { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin: 8px 0 18px; }
.sr-hero h1 { margin: 0 0 4px; font-size: clamp(1.45rem, 3.4vw, 2rem); }
.sr-hero p { margin: 0; color: var(--muted); max-width: 640px; }
.sr-filters { display: grid; gap: 12px; padding: 16px; align-items: end; }
@media (min-width: 860px) { .sr-filters { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) auto; padding: 18px 20px; } }
.sr-route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.sr-field { display: grid; gap: 5px; margin: 0; }
.sr-field > span { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
body.lang-si .sr-field > span, body.lang-ta .sr-field > span { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.sr-field select { padding-top: 11px; padding-bottom: 11px; background-color: var(--bg); font-weight: 600; }
.sr-swap { width: 44px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--brand); font-size: 1.2rem; cursor: pointer; transition: transform .2s, border-color .2s; }
.sr-swap:hover { border-color: var(--brand); transform: rotate(180deg); }
.sr-go[hidden] { display: none; }
.sr-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 2px 0; }
.sr-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; }
.sr-toggle:hover { text-decoration: none; border-color: var(--accent); }
.sr-dot { width: 30px; height: 18px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.sr-dot::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .2s; }
.sr-toggle.is-on { border-color: var(--accent); background: var(--accent-50); color: var(--accent-600); }
.sr-toggle.is-on .sr-dot { background: var(--accent); }
.sr-toggle.is-on .sr-dot::after { left: 14px; }
.sr-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--ink-2); font-size: .92rem; }
.sr-note > span { flex: 1 1 280px; }
.sr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 2px 12px; }
.sr-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 700; color: var(--ink-2); }
.sr-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.sr-chips .chip { padding: 4px 12px; }
.sr-chips .chip:hover { text-decoration: none; background: var(--accent-100); }
.sr-clear { font-size: .85rem; color: var(--muted); text-decoration: underline; }
.sr-sort { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.sr-sort a { padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.sr-sort a:hover { text-decoration: none; color: var(--ink); }
.sr-sort a.is-on { background: var(--brand); color: #fff; }
.sr-grid { display: grid; gap: 14px; }
@media (min-width: 680px) { .sr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .sr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sr-card { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.sr-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand-100); box-shadow: var(--shadow-lg); }
.sr-card-top { display: flex; align-items: center; gap: 11px; }
.sr-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; color: var(--brand); background: var(--brand-50); }
.sr-who { min-width: 0; flex: 1; display: grid; gap: 3px; }
.sr-who b { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.sr-des-badge { justify-self: start; font-size: .74rem; font-weight: 700; color: var(--accent-600); background: var(--accent-50); border-radius: 6px; padding: 2px 8px; }
.sr-age { font-size: .78rem; color: var(--muted); white-space: nowrap; align-self: flex-start; }
.sr-route-view { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); align-items: center; gap: 6px; background: var(--bg); border-radius: var(--radius-sm); padding: 11px 13px; }
.sr-end { min-width: 0; display: grid; gap: 1px; }
.sr-end small { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
body.lang-si .sr-end small, body.lang-ta .sr-end small { text-transform: none; letter-spacing: 0; }
.sr-end b { font-size: .97rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-end-to { text-align: right; display: block; }
.sr-end-to small { display: block; }
.sr-more { font-size: .74rem; font-weight: 700; color: var(--brand); background: var(--brand-100); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.sr-line { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--brand-100) 0 5px, transparent 5px 9px); }
.sr-line::before { content: ''; position: absolute; left: -2px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.sr-line span::after { content: ''; position: absolute; right: -3px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--accent); border-right: 0; }
.sr-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.sr-card-foot .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-view { font-weight: 700; color: var(--brand); font-size: .88rem; white-space: nowrap; }
.sr-card:hover .sr-view { color: var(--accent-600); }
.sr-empty { text-align: center; padding: 40px 20px; }
.sr-empty-icon { font-size: 2.2rem; margin-bottom: 6px; }
.sr-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 8px; flex-wrap: wrap; }
.sr-pager > a, .sr-pager > span { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; color: var(--ink); }
.sr-pager > a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.sr-pager .off { color: var(--muted); opacity: .55; }
.sr-nums { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sr-nums a, .sr-nums span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--ink-2); padding: 0 6px; }
.sr-nums a:hover { text-decoration: none; background: var(--brand-50); color: var(--brand); }
.sr-nums .cur { background: var(--brand); color: #fff; }
.sr-nums .gap { color: var(--muted); min-width: 20px; }
@media (max-width: 560px) {
  .sr-hero { margin-bottom: 14px; }
  .sr-hero p { font-size: .92rem; }
  .sr-route { grid-template-columns: 1fr; gap: 4px; }
  .sr-swap { justify-self: end; width: 36px; height: 36px; font-size: 1rem; margin: -6px 10px -14px 0; position: relative; z-index: 1; transform: rotate(90deg); }
  .sr-swap:hover { transform: rotate(270deg); }
  .sr-pager > a, .sr-pager > span { padding: 8px 12px; font-size: .84rem; }
  .sr-nums { order: -1; width: 100%; }
}
.view-card { padding: 26px; }
@media (min-width: 640px) { .view-card { padding: 34px; } }
.view-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.view-head h1 { font-size: 1.5rem; margin: 0 0 2px; }
.view-head .dot { width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; flex: none; }
.view-facts { margin: 0 0 18px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.view-facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .view-facts > div { grid-template-columns: 1fr; gap: 2px; } }
.view-facts dt { color: var(--muted); font-size: .88rem; }
.view-facts dd { margin: 0; }
.dest-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.view-gate { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 22px; }
.view-gate h2 { margin-bottom: 6px; }
.gate-plans { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .gate-plans { grid-template-columns: 1fr 1fr; } }
.gate-plan { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 16px; color: var(--ink); }
.gate-plan:hover { text-decoration: none; border-color: var(--brand); }
.gate-plan.is-best { border-color: var(--brand); }
.gate-plan .price { font-size: 1.3rem; font-weight: 800; color: var(--brand); }
.gate-plan .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Admin "Log in as" bar ---------- */
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff3cd; color: #6b4e00; border-bottom: 1px solid #f0d98a; padding: 8px 16px; font-size: .9rem; font-weight: 600; }
.imp-bar form { margin: 0; }
.imp-bar button { background: #6b4e00; color: #fff; border: 0; border-radius: 999px; padding: 5px 14px; font: inherit; font-size: .85rem; cursor: pointer; }
.imp-bar + .site-header { top: 37px; }
.imp-bar { height: 44px; padding: 0 12px; flex-wrap: nowrap; }
.imp-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.imp-bar button { white-space: nowrap; }
.imp-bar + .site-header { top: 44px; }

/* ---------- Two-step registration ---------- */
.onb-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; align-items: center; gap: 0; counter-reset: s; }
.onb-steps li { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--muted); font-size: .85rem; font-weight: 600; }
.onb-steps li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--line); margin: 0 10px; min-width: 12px; border-radius: 2px; }
.onb-steps li:last-child { flex: none; }
.onb-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; border: 2px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 800; }
.onb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-steps li.is-current { color: var(--brand); }
.onb-steps li.is-current .onb-num { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.onb-steps li.is-done { color: var(--ok-ink); }
.onb-steps li.is-done .onb-num { border-color: var(--ok-ink); background: var(--ok-ink); color: #fff; }
.onb-steps li.is-done:not(:last-child)::after { background: var(--ok-ink); }
.card-head .onb-steps { margin-bottom: 20px; }
@media (max-width: 520px) { .onb-steps li:not(.is-current) .onb-label { display: none; } .onb-steps li:not(:last-child)::after { margin: 0 6px; } }
.onb-head { margin: 8px 0 18px; }
.onb-head h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.onb-head p { margin: 0 0 12px; color: var(--muted); }
.onb-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f4e2a8; border-radius: var(--radius-sm); padding: 12px 16px; font-size: .94rem; }
.onb-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
@media (max-width: 560px) { .onb-submit .btn { width: 100%; } .onb-submit a.muted { margin: 0 auto; } }
.onb-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 16px;
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f4e2a8; border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .94rem; }
.onb-banner > span { flex: 1 1 300px; }
.onb-done { max-width: 680px; margin: 8px auto 0; padding: 26px 22px 28px; text-align: center; }
@media (min-width: 640px) { .onb-done { padding: 32px 40px 36px; } }
.onb-done .onb-steps { text-align: left; }
.onb-check { width: 68px; height: 68px; margin: 6px auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff; background: var(--ok-ink); box-shadow: 0 0 0 8px var(--ok-bg); }
.onb-done h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 3.4vw, 1.8rem); }
.onb-done .lead { color: var(--muted); margin: 0 auto 20px; max-width: 520px; }
.onb-summary { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; text-align: left; }
.onb-summary small { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.onb-summary b { font-size: .98rem; }
.onb-summary > div:last-child { text-align: right; }
.onb-arrow { color: var(--accent); font-size: 1.3rem; font-weight: 800; }
.onb-match { display: grid; gap: 3px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #c4ecd5; text-align: left; }
.onb-match.is-wait { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.onb-match span { font-size: .92rem; }
.onb-next-title { font-size: 1.05rem; margin: 24px 0 10px; text-align: left; }
.onb-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.onb-next li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--ink-2); }
.onb-next li span { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .8rem; }
.onb-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
@media (max-width: 560px) { .onb-actions .btn { width: 100%; } }
.card-head .onb-steps li { color: rgba(255,255,255,.7); }
.card-head .onb-steps li.is-current { color: #fff; }
.card-head .onb-steps li.is-current .onb-num { background: #fff; color: var(--brand); border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.card-head .onb-steps .onb-num { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.card-head .onb-steps li:not(:last-child)::after { background: rgba(255,255,255,.3); }

/* ---------- Pending list: hospital in the middle, others in a circle ---------- */
.hub-pick { display: grid; gap: 12px; padding: 16px; }
@media (min-width: 720px) { .hub-pick { grid-template-columns: 1fr 2fr; padding: 18px 20px; } }
.hub-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 2px 12px; }
.hub-card { padding: 14px 10px 16px; }
.hub { position: relative; width: 100%; max-width: 660px; aspect-ratio: 1; margin: 0 auto; }
.hub::before { content: ''; position: absolute; inset: 11%; border-radius: 50%; border: 1.5px dashed var(--line); }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-lines line { stroke: var(--accent); stroke-linecap: round; opacity: .75; }
.hub-lines polygon { fill: var(--accent); }
.hub-center { position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: linear-gradient(150deg, var(--brand-700), var(--brand)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6%; box-shadow: 0 0 0 8px var(--brand-50), var(--shadow-lg); z-index: 2; }
.hub-center b { font-size: clamp(.72rem, 2.4vw, 1.05rem); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-center small { opacity: .8; font-size: clamp(.62rem, 1.8vw, .8rem); margin-top: 2px; }
.hub-center span { margin-top: 6px; font-size: clamp(.62rem, 1.9vw, .82rem); font-weight: 700; background: rgba(255,255,255,.16); border-radius: 999px; padding: 2px 10px; }
.hub-center em { font-style: normal; font-size: clamp(.58rem, 1.7vw, .72rem); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-light); margin-bottom: 2px; }
body.lang-si .hub-center em, body.lang-ta .hub-center em { text-transform: none; letter-spacing: 0; }
.hub-node { position: absolute; transform: translate(-50%, -50%); width: clamp(76px, 20%, 132px); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 6px 6px; text-align: center; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, box-shadow .15s; }
.hub-node:hover { text-decoration: none; border-color: var(--accent); transform: translate(-50%, -50%) scale(1.06); box-shadow: var(--shadow-lg); z-index: 4; }
.hub-name { font-size: clamp(.64rem, 1.8vw, .8rem); font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-n { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: .78rem; display: inline-grid; place-items: center; flex: none; }
.hub-node .hub-n { margin-top: -19px; box-shadow: 0 0 0 3px var(--card); }
.hub-empty { position: absolute; left: 50%; top: 78%; transform: translateX(-50%); color: var(--muted); font-weight: 600; white-space: nowrap; }
.hub-legend { text-align: center; margin: 10px auto 0; max-width: 560px; }
.hub-legend b { display: block; color: var(--ink-2); margin-top: 4px; }
.hub-summary { margin: 18px 2px 12px; }
.hub-summary p { margin: 0 0 4px; font-weight: 600; color: var(--ink-2); }
.hub-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hub-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.hub-row-main { flex: 1 1 0; min-width: 0; display: grid; gap: 1px; }
.hub-row-main a { color: var(--ink); display: block; min-width: 0; overflow: hidden; }
.hub-row-main > * { min-width: 0; }
.hub-row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-row .btn { flex: none; }
@media (max-width: 520px) { .hub-row { flex-wrap: wrap; } .hub-row .btn { width: 100%; } }
.hub-top { display: grid; gap: 12px; }
@media (min-width: 640px) { .hub-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .hub-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub-top-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; color: var(--ink); transition: transform .15s, border-color .15s; }
.hub-top-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand-100); }
.hub-mini { position: relative; width: 64px; height: 64px; flex: none; }
.hub-mini i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); opacity: .8; }
.hub-mini b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.hub-top-text { min-width: 0; display: grid; gap: 2px; }
.hub-top-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
