:root {
  --ink: #1d2740;
  --ink-2: #3c4763;
  --muted: #6b7286;
  --line: #e6dfd3;
  --bg: #faf6ef;
  --card: #ffffff;
  --kesri: #c2620a;
  --kesri-dark: #9a4d07;
  --kesri-soft: #fdf0e1;
  --navy: #1d2740;
  --navy-soft: #eef0f6;
  --green: #1f7a4d;
  --green-soft: #e5f4ec;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --amber-soft: #fff6d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 39, 64, .06), 0 6px 20px rgba(29, 39, 64, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--kesri-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.tiny { max-width: 460px; }
main { min-height: 70vh; padding: 28px 0 56px; }

/* header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--kesri); display: grid; place-items: center; font-size: .95rem; color: #fff; font-family: var(--sans); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav button.linklike { color: #dfe3ee; text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: .95rem; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button.linklike:hover, .nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav .btn { color: #fff; }
.badge-dot { background: var(--kesri); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 1rem; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a, .nav button.linklike { padding: 12px; text-align: left; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--kesri); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--kesri-dark); }
.btn.secondary { background: var(--navy); }
.btn.secondary:hover { background: #2c3858; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
.btn.sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.inline { display: inline; }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .cards > .card + .card { margin-top: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }

/* forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d8d0c2; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(194, 98, 10, .35); border-color: var(--kesri); }
textarea { min-height: 110px; resize: vertical; }
.req::after { content: " *"; color: var(--kesri); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .93rem; color: var(--ink); margin: 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--kesri); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 600px) { .row, .row-3 { grid-template-columns: 1fr; } }
.phone-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 6px; margin: 0 0 16px; }
legend { font-weight: 600; font-size: .92rem; padding: 0 6px; color: var(--ink-2); }
details.pref { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; background: #fff; }
details.pref summary { cursor: pointer; font-weight: 600; }
details.pref[open] summary { margin-bottom: 12px; }

/* flash */
.flashes { margin-bottom: 18px; display: grid; gap: 8px; }
.flash { padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: .95rem; }
.flash.success { background: var(--green-soft); border-color: #b6dfc8; color: #14532d; }
.flash.error { background: var(--red-soft); border-color: #f2c4bf; color: #7f1d1d; }
.flash.info { background: var(--navy-soft); border-color: #d3d8e6; color: var(--ink); }
.flash.warning { background: var(--amber-soft); border-color: #f0dc95; color: #713f12; }

/* status pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill.draft { background: #eee; color: #555; }
.pill.pending { background: var(--amber-soft); color: #854d0e; }
.pill.more_docs { background: #ffe8d2; color: #9a3412; }
.pill.approved, .pill.accepted { background: var(--green-soft); color: var(--green); }
.pill.rejected, .pill.suspended { background: var(--red-soft); color: var(--red); }
.pill.neutral, .pill.withdrawn { background: var(--navy-soft); color: var(--ink-2); }

/* hero */
.hero { background: linear-gradient(135deg, #1d2740 0%, #2b3757 60%, #3a2a2a 100%); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero.has-image { background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(194,98,10,.35), transparent 65%); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 720px; }
.hero p { font-size: 1.12rem; max-width: 600px; color: #dfe3ee; }
.hero .btn-row { margin-top: 26px; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); }
.trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; color: #cfd5e4; font-size: .92rem; }
.trust span::before { content: "✓ "; color: #f2a541; font-weight: 700; }
.section { padding: 56px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--kesri-soft); color: var(--kesri-dark); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.prose { max-width: 720px; }
.prose p { margin-bottom: 1.1em; }

/* stats */
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .num { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--kesri); }

/* progress */
.progress { height: 8px; background: #eee6d8; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--kesri); border-radius: 99px; }

/* wizard */
.wizard-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.wizard-steps a, .wizard-steps span { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 7px 12px 7px 7px; border-radius: 999px; font-size: .84rem; text-decoration: none; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.wizard-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eee6d8; color: var(--ink-2); font-size: .75rem; }
.wizard-steps .done b { background: var(--green); color: #fff; }
.wizard-steps .current { border-color: var(--kesri); color: var(--ink); font-weight: 600; }
.wizard-steps .current b { background: var(--kesri); color: #fff; }
.wizard-steps span { opacity: .55; }
.wizard-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-tile { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.photo-tile img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.photo-tile .bar { padding: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* profile cards */
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .12s, border-color .12s; }
.pcard:hover { transform: translateY(-2px); border-color: #d9c7aa; }
.pcard .ph { aspect-ratio: 4 / 4.2; background: linear-gradient(135deg, #efe6d6, #e3d6c0); display: grid; place-items: center; color: #a08b6a; font-family: var(--serif); font-size: 2.6rem; position: relative; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .match { position: absolute; top: 10px; left: 10px; background: rgba(29,39,64,.85); color: #fff; font-family: var(--sans); font-size: .75rem; padding: 3px 9px; border-radius: 99px; font-weight: 600; }
.pcard .body { padding: 14px 16px 16px; }
.pcard .name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 2px; }
.pcard .meta { font-size: .88rem; color: var(--ink-2); }
.pcard .meta span + span::before { content: " · "; color: #b8ad9a; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

/* profile page */
.profile-hero { display: grid; grid-template-columns: 320px 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .profile-hero { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #efe6d6, #e3d6c0); display: grid; place-items: center; color: #8a7657; text-align: center; padding: 0; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 62px; height: 72px; flex: 0 0 auto; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--kesri); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; font-size: .95rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 8px; } }
.lock { background: var(--navy-soft); border-radius: 10px; padding: 12px 14px; font-size: .92rem; color: var(--ink-2); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.on { color: var(--ink); border-color: var(--kesri); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list-item { display: flex; gap: 14px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: #eadfcb; flex: 0 0 auto; display: grid; place-items: center; color: #8a7657; font-family: var(--serif); font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.grow { flex: 1; min-width: 0; }
.unread { background: var(--kesri-soft); margin: 0 -12px; padding: 12px !important; border-radius: 8px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:hover td { background: #fffdf9; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; }
.pagination .on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* admin */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.admin-nav { position: sticky; top: 80px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.admin-nav a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .94rem; }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a.on { background: var(--navy); color: #fff; }
@media (max-width: 900px) { .admin-wrap { grid-template-columns: 1fr; } .admin-nav { position: static; display: flex; overflow-x: auto; gap: 4px; } .admin-nav a { white-space: nowrap; } }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; background: var(--kesri); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.bar-labels { display: flex; gap: 6px; font-size: .68rem; color: var(--muted); }
.bar-labels span { flex: 1; text-align: center; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; font-size: .92rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--kesri); }
.doc-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* footer */
.site-footer { background: #151c2f; color: #b8bfd0; padding: 40px 0 28px; font-size: .92rem; }
.site-footer a { color: #dfe3ee; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 600; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.mb0 { margin-bottom: 0; }
.right { margin-left: auto; }
