/* OPS identity tokens — electric mint on green-black (see the OPS design system). The site is dark-first. */
:root {
  --ink: #FFFFFF;
  --ink-2: #CFE3DA;
  --ink-3: #8FB3A4;
  --paper: #06110D;
  --card: #0E1C16;
  --raised: #15271F;
  --line: #22382E;
  --brand: #3CFFB4;
  --brand-ink: #06110D;
  --brand-soft: #0F3326;
  --signal: #3CFFB4;
  --buy: #3CFFB4;
  --buy-soft: #0F3326;
  --ok: #3CFFB4;
  --ok-soft: #0F3326;
  --sell: #FF5C6C;
  --sell-soft: #3A1A1F;
  --warn: #FFD166;
  --warn-soft: #2E2410;
  --radius-lg: 28px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: none;
  --font: "Poppins", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.7;
  font-feature-settings: "tnum" 1;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.num, .mono { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; word-break: break-all; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.logo img { display: block; height: 29px; width: auto; }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: var(--radius-sm); }
.nav a:not(.btn):hover { background: var(--paper); color: var(--ink); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; background: var(--brand); color: var(--brand-ink); transition: filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); filter: none; }
.btn-buy { background: var(--buy); color: #fff; }
.btn-sell { background: var(--sell); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { width: 100%; }

label { display: block; font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field { margin-bottom: 16px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[dir="ltr"] { text-align: left; }
.hint { font-size: .82rem; color: var(--ink-3); margin-top: 5px; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* ---------- surfaces ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.notice { border-radius: var(--radius); padding: 12px 14px; background: var(--brand-soft); color: var(--ink); margin-bottom: 16px; font-size: .93rem; }
.notice.warn { background: var(--warn-soft); }
.notice.err { background: var(--sell-soft); }
.notice.ok { background: var(--ok-soft); }

/* ---------- segmented toggle (buy / sell) ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 18px; }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 10px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"].buy { background: var(--buy); color: #fff; }
.seg button[aria-pressed="true"].sell { background: var(--sell); color: #fff; }

/* ---------- hero with quote ticket ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 32em; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: var(--ink-2); font-size: .92rem; padding: 0; list-style: none; }
.hero-facts li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-inline-end: 8px; vertical-align: middle; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } .hero { padding-top: 32px; } }

.ticket { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); position: relative; }
.ticket-body { padding: 24px 24px 18px; }
.ticket-total {
  border-top: 2px dashed var(--line); padding: 18px 24px 22px; position: relative;
}
/* perforation notches */
.ticket-total::before, .ticket-total::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper);
}
.ticket-total::before { right: -10px; }
.ticket-total::after { left: -10px; }
.ticket .amount-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.ticket .amount-row select { width: auto; min-width: 150px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.presets button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.presets button:hover { border-color: var(--brand); color: var(--brand); }
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .92rem; color: var(--ink-2); }
.total-line + .total-line { margin-top: 4px; }
.total-big { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; color: var(--ink); line-height: 1.1; margin: 6px 0 4px; }
.total-big small { font-size: .45em; font-weight: 500; color: var(--ink-3); margin-inline-start: 6px; }

/* ---------- sections ---------- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--card); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 28px; }

/* price ladder: bars show how the rate improves with order size */
.ladder { width: 100%; border-collapse: collapse; }
.ladder th, .ladder td { padding: 14px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.ladder th { font-size: .82rem; font-weight: 500; color: var(--ink-3); }
.ladder td.num { font-weight: 600; }
.ladder .bar { height: 6px; border-radius: 3px; background: var(--brand-soft); position: relative; overflow: hidden; min-width: 80px; }
.ladder .bar span { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--brand); border-radius: 3px; }
@media (max-width: 640px) { .ladder .bar-col { display: none; } }

.market { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.market-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }
.market-item .k { font-weight: 600; }
.market-item .v { text-align: end; }
.market-item .v small { display: block; color: var(--ink-3); font-size: .78rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; inset-inline-start: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--brand); color: var(--brand); display: grid; place-items: center; font-weight: 700;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }

.site-footer { padding: 32px 0 48px; color: var(--ink-3); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

hr.sep { border: 0; border-top: 1px dashed var(--line); margin: 16px 0; }

/* ---------- auth pages ---------- */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px; }
.auth h1 { font-size: 1.6rem; }
.auth .panel { width: min(440px, 100%); }

/* ---------- dashboard ---------- */
.app-shell { padding: 28px 0 64px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button {
  font: inherit; border: 0; background: none; color: var(--ink-2); padding: 12px 14px; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .count { background: var(--sell); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; margin-inline-start: 6px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.list { display: grid; gap: 10px; }
.order-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-align: start; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; font: inherit; color: inherit;
}
.order-row:hover { border-color: var(--brand); }
.side-chip { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.side-chip.buy { background: var(--buy-soft); color: var(--buy); }
.side-chip.sell { background: var(--sell-soft); color: var(--sell); }
.status { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.status.s-completed { background: var(--ok-soft); color: var(--ok); }
.status.s-needs_review, .status.s-payment_submitted, .status.s-deposit_confirmed, .status.s-payment_confirmed { background: var(--warn-soft); color: var(--warn); }
.status.s-cancelled, .status.s-expired, .status.s-rejected { background: var(--sell-soft); color: var(--sell); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; }

.copy-box { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 6px 0 14px; }
.copy-box .mono { flex: 1; font-size: .95rem; }
.big-pay { font-size: 1.9rem; font-weight: 700; }

.progress { display: flex; gap: 6px; margin: 10px 0 18px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--brand); }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }

.kyc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kyc-slot { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer; display: block; min-height: 140px; }
.kyc-slot:hover { border-color: var(--brand); }
.kyc-slot input { display: none; }
.kyc-slot img { max-height: 110px; border-radius: 6px; margin-top: 8px; }
.kyc-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kyc-images img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--ink-3); font-size: .85rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .92rem; }
table.data th, table.data td { padding: 11px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 500; color: var(--ink-3); font-size: .82rem; background: var(--paper); }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--paper); }
.table-scroll { overflow-x: auto; }

dialog {
  border: 0; border-radius: var(--radius-lg); padding: 0; width: min(720px, 100% - 24px); max-height: 90vh;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 20, 35, .5); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
dialog .dlg-body { padding: 20px 22px; }
.events { list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--ink-2); }
.events li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tiers-editor .tier { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: end; }

#toast {
  position: fixed; bottom: 24px; inset-inline: 16px; margin-inline: auto; width: fit-content; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--radius); z-index: 100;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }
#toast.err { background: var(--sell); color: #fff; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- additions: choices, wallet, reviews, blog, auth extras ---------- */
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice button {
  font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: var(--radius); padding: 9px 14px; cursor: pointer; flex: 1 1 140px;
}
.choice button[aria-pressed="true"] { border-color: var(--brand); color: var(--ink); background: var(--brand-soft); font-weight: 600; }

.balances { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 12px; }
@media (max-width: 640px) { .balances { grid-template-columns: repeat(2, 1fr); } }
.balance { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.balance b { font-size: 1.25rem; }
.transfer-detail { margin-top: -4px; border-color: var(--brand); }

.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.review { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.review blockquote { margin: 0; color: var(--ink); }
.stars { color: #B07A00; letter-spacing: 2px; font-size: 1.05rem; }
.rating-summary { font-weight: 600; }
.star-input { display: flex; gap: 4px; margin: 6px 0 10px; direction: ltr; justify-content: flex-start; }
.star-input button { font-size: 1.7rem; line-height: 1; border: 0; background: none; cursor: pointer; color: var(--line); padding: 2px; }
.star-input button[aria-pressed="true"] { color: #E0A800; }
.review-ask { margin-bottom: 16px; }

.article { max-width: 760px; }
.post-card { border-bottom: 1px solid var(--line); padding: 18px 0; }
.post-card h2 { font-size: 1.3rem; margin-bottom: 4px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.prose { font-size: 1.06rem; line-height: 1.9; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose code { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: .9em; }

.google-btn { gap: 10px; margin-bottom: 4px; }
.g-mark { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285f4; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .85rem; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ok-text { color: var(--ok); }
.err-text { color: var(--sell); }
@media (max-width: 720px) { .nav .nav-secondary { display: none; } }
.nav { gap: 6px; }
.panel.hidden + .panel, .grid-2 > .panel + .panel { margin-top: 0; }
#wallet-root > * + *, .grid-2 + .panel, .panel + .grid-2 { margin-top: 16px; }

/* OPS accents: mint is for the one figure that matters, the primary action and buy */
.total-big { color: var(--brand); }
.ticket { border: 1px solid var(--line); }
.btn { border-radius: var(--radius); }
.btn-sm { border-radius: var(--radius-sm); }
.status, .side-chip { border-radius: 999px; }


/* text on mint / red fills is the ink colour, never white */
.btn-buy, .btn-sell, .seg button[aria-pressed="true"].buy, .seg button[aria-pressed="true"].sell, .tabs .count { color: var(--brand-ink); }
.site-header { background: rgba(6, 17, 13, .86); backdrop-filter: saturate(140%) blur(8px); }
.ticket, .panel, .stat, .order-row, table.data, .market-item, .balance, .review { background: var(--card); }
.ticket-total::before, .ticket-total::after { background: var(--paper); }
section.block.alt { background: #0A1712; }
.seg, .copy-box, table.data th, .presets button:hover { background: var(--raised); }
input, select, textarea { background: var(--raised); border-color: var(--line); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--raised); }
.choice button { background: var(--raised); }
.choice button[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.stars, .star-input button[aria-pressed="true"] { color: var(--brand); }
h1 { letter-spacing: -.03em; }
#toast { background: var(--ink); color: var(--paper); }
dialog::backdrop { background: rgba(6, 17, 13, .75); }
.g-mark { background: #FFFFFF; }
@media (max-width: 420px) { .logo img { height: 20px; width: auto; } }
