/* ===== Galaxtel KYC — styles ===== */
:root {
  --ink: #0A1A33;        /* panel navy */
  --ink-2: #13284A;
  --blue: #1A73E8;       /* logo blue */
  --blue-deep: #0F5BC4;
  --blue-soft: #E8F1FD;
  --slate: #42444A;      /* logo grey */
  --text: #1C2330;
  --muted: #6B7380;
  --line: #D8DFE9;
  --bg: #F4F7FB;
  --paper: #FFFFFF;
  --danger: #C5221F;
  --danger-soft: #FDF1F0;
  --ok: #137333;
  --ok-soft: #E6F4EA;
  --warn: #9A5B00;
  --warn-soft: #FEF4E2;
  --radius: 10px;
  --display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(26, 115, 232, .45); outline-offset: 2px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--ink); color: #B9C6DB;
  padding: 44px 40px 32px; display: flex; flex-direction: column;
}
.brand img { width: 168px; }
.side-title { font-family: var(--display); font-weight: 500; color: #fff; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 56px 0 12px; }
.side-text { margin: 0 0 36px; max-width: 30ch; }
.side-foot { margin-top: auto; font-size: 14px; position: relative; z-index: 1; }
.side-foot a { color: #fff; }
.side-mark { position: absolute; width: 460px; right: -170px; bottom: -70px; color: var(--blue); opacity: .16; pointer-events: none; }

/* Step tracker (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.steps li { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 26px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 2px; background: var(--ink-2); }
.steps li.is-done::after { background: var(--blue); }
.steps .dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  border: 2px solid #2C4268; color: #8FA2C2; background: var(--ink);
}
.steps b { display: block; color: #DCE4F1; font-weight: 600; }
.steps small { display: block; color: #7D8FAE; font-size: 13px; }
.steps li.is-current .dot { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 5px rgba(26, 115, 232, .22); }
.steps li.is-current b { color: #fff; }
.steps li.is-done .dot { border-color: var(--blue); color: var(--blue); }

.main { padding: 40px clamp(20px, 6vw, 96px) 64px; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 28px; }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.tabs a:hover { color: var(--text); background: #E9EEF5; }
.tabs a[aria-current="page"] { color: var(--blue-deep); background: var(--blue-soft); }

.panel { max-width: 780px; }

/* ---------- Form ---------- */
.progress { height: 4px; background: #E3E9F2; border-radius: 4px; overflow: hidden; margin-bottom: 32px; }
.progress span { display: block; height: 100%; width: 25%; background: var(--blue); transition: width .35s ease; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 26px; font-family: var(--display); font-size: 34px; font-weight: 500; letter-spacing: -.015em; color: var(--ink); line-height: 1.15; }
legend:focus { outline: none; }
.step-no { display: block; font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--blue); letter-spacing: 0; margin-bottom: 6px; }
.lead { color: var(--muted); margin: -12px 0 24px; max-width: 62ch; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { margin-bottom: 22px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 15px; color: var(--slate); margin-bottom: 7px; }
.req { color: var(--blue); }
.opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.hint { margin: -4px 0 10px; color: var(--muted); font-size: 14px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; min-height: 50px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2342444A' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
input::placeholder, textarea::placeholder { color: #A3ABB8; }
input:hover, select:hover, textarea:hover { border-color: #B8C3D3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 115, 232, .14); }

.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); background: var(--danger-soft); }
.err { color: var(--danger); font-size: 14px; margin: 6px 0 0; }

/* Provider type tiles */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.chip { position: relative; display: flex !important; align-items: center; gap: 12px; margin: 0 !important;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  cursor: pointer; font-weight: 500 !important; color: var(--text) !important; font-size: 15px !important; transition: border-color .15s, background .15s; }
.chip:hover { border-color: #B8C3D3; }
.chip input, .confirm input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  border: 2px solid #A9B4C4; border-radius: 5px; background: #fff; display: grid; place-items: center; cursor: pointer;
}
.chip input::after, .confirm input::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.chip input:checked, .confirm input:checked { background: var(--blue); border-color: var(--blue); }
.chip input:checked::after, .confirm input:checked::after { opacity: 1; }
.chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.chip input:focus-visible { outline: 3px solid rgba(26, 115, 232, .45); outline-offset: 2px; }
.has-error .chip { border-color: #EBB5B2; }

.confirm { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 500 !important; color: var(--text) !important; cursor: pointer;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.confirm input { margin-top: 2px; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.actions .btn-ghost { margin-right: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--body); padding: 0 26px; min-height: 50px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-ghost { background: transparent; color: var(--slate); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: #B8C3D3; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; background: #fff; color: var(--blue-deep); border-color: #C4D7F5; }
.btn-small:hover { background: var(--blue-soft); }
.link-btn { background: none; border: 0; padding: 4px; color: var(--blue); font: 600 14px var(--body); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.secure-note { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- Alerts ---------- */
.alert { background: var(--danger-soft); color: var(--danger); border: 1px solid #F3C7C4; padding: 14px 16px; border-radius: var(--radius); margin: 0 0 24px; font-weight: 500; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: #B7DFC3; }

/* ---------- Review ---------- */
.review { margin-bottom: 18px; }
.review-block { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-head h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--ink); }
.review dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; }
.review dt { color: var(--muted); font-size: 14px; }
.review dd { margin: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Thank-you page ---------- */
.done h2, .panel > h2 { font-family: var(--display); font-weight: 500; font-size: 36px; line-height: 1.15; letter-spacing: -.015em; color: var(--ink); margin: 0 0 20px; max-width: 20ch; }
.done .lead { margin: 0 0 28px; color: var(--slate); font-size: 18px; }
.done-mark { width: 84px; color: var(--blue); margin-bottom: 28px; }
.done-mark path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.1s ease forwards; }
.done-mark path + path { animation-delay: .55s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .done-mark path { animation: none; stroke-dashoffset: 0; } .progress span { transition: none; } }

.ref-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 20px 22px; border-radius: var(--radius); background: var(--ink); color: #B9C6DB; margin-bottom: 28px; }
.ref-box span { flex-basis: 100%; font-size: 14px; }
.ref-box strong { font-family: var(--display); font-weight: 500; font-size: 32px; color: #fff; letter-spacing: .04em; }
.next { padding-left: 20px; margin: 0 0 30px; color: var(--slate); }
.next li { margin-bottom: 8px; padding-left: 4px; }

/* ---------- Status ---------- */
.panel > h2 + .lead { margin-top: -8px; }
.status-form { margin-bottom: 24px; }
.result { border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--paper); border-radius: var(--radius); padding: 22px 24px; }
.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.result-text { font-size: 18px; margin: 0 0 12px; }
.pill { display: inline-block; font-weight: 700; font-size: 14px; padding: 5px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); }
.status-approved { border-left-color: var(--ok); } .status-approved .pill { background: var(--ok-soft); color: var(--ok); }
.status-info_needed { border-left-color: #E08A00; } .status-info_needed .pill { background: var(--warn-soft); color: var(--warn); }
.status-rejected { border-left-color: var(--danger); } .status-rejected .pill { background: var(--danger-soft); color: var(--danger); }
.pill-approved { background: var(--ok-soft); color: var(--ok); }
.pill-info_needed { background: var(--warn-soft); color: var(--warn); }
.pill-rejected { background: var(--danger-soft); color: var(--danger); }
.team-msg { background: var(--bg); border-radius: 8px; padding: 14px 16px; margin: 14px 0 6px; }
.team-msg span { font-size: 13px; font-weight: 600; color: var(--muted); }
.team-msg p { margin: 4px 0 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; padding: 22px 20px 20px; }
  .side-title { font-size: 22px; margin: 22px 0 6px; }
  .side-text { margin-bottom: 18px; max-width: none; font-size: 15px; }
  .side-foot, .side-mark { display: none; }
  .steps { display: flex; gap: 6px; }
  .steps li { flex: 1; flex-direction: column; gap: 6px; padding: 0; }
  .steps li::after { display: none; }
  .steps small { display: none; }
  .steps b { font-size: 12px; font-weight: 500; color: #7D8FAE; }
  .main { padding: 24px 18px 48px; }
  legend { font-size: 26px; }
  .done h2, .panel > h2 { font-size: 28px; }
}
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr; }
  .review dl { grid-template-columns: 1fr; gap: 0; }
  .review dd { margin-bottom: 10px; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1; }
  .steps b { display: none; }
}

/* =====================================================
   ADMIN PANEL
   ===================================================== */
.admin-body { background: var(--bg); }
.admin-top { background: var(--ink); color: #B9C6DB; padding: 14px clamp(16px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-top img { width: 130px; }
.admin-top nav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
.admin-top a { color: #fff; text-decoration: none; }
.admin-top a:hover { text-decoration: underline; }
.admin-wrap { padding: 32px clamp(16px, 4vw, 40px) 64px; max-width: 1280px; margin: 0 auto; }
.admin-wrap h1 { font-family: var(--display); font-weight: 500; font-size: 28px; color: var(--ink); margin: 0 0 20px; }

.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.counts a { text-decoration: none; color: var(--slate); background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.counts a b { color: var(--ink); margin-left: 4px; }
.counts a[aria-current="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-deep); }

.filters { display: flex; gap: 10px; margin-bottom: 18px; max-width: 560px; }
.filters input { min-height: 44px; }
.filters .btn { min-height: 44px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFD; }
.list td { padding: 14px 16px; border-bottom: 1px solid #EDF1F6; vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #F7FAFE; }
.list a.ref { font-weight: 700; text-decoration: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.detail { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.card h2 { font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--ink); margin: 0 0 14px; }
.card dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; margin: 0; }
.card dt { color: var(--muted); font-size: 14px; }
.card dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.decision { position: sticky; top: 20px; }
.decision .field label { font-size: 14px; }
.decision .btn { width: 100%; }
.back-link { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); position: relative; overflow: hidden; }
.login .side-mark { display: block; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 32px; }
.login-card img { width: 150px; margin-bottom: 22px; }
.login-card h1 { font-family: var(--display); font-weight: 500; font-size: 24px; color: var(--ink); margin: 0 0 20px; }
.login-card .btn { width: 100%; }

@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; }
  .decision { position: static; }
  .card dl { grid-template-columns: 1fr; gap: 0; }
  .card dd { margin-bottom: 10px; }
}
