/* Kaithi Bhasa. White page, black text, blue for actions, red for accents.
   No cards or shadows: full-width sections, thin rules, one shared centre line. */
:root {
  --ink: #0b0d12;
  --muted: #555b66;
  --line: #dfe2e8;
  --blue: #1d4ed8;
  --blue-dark: #1739a8;
  --red: #c8102e;
  --ok: #0f7a3d;
  --g: clamp(16px, 4vw, 64px);   /* side gutter, same everywhere */
  --header: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font: 17px/1.6 "Mukta", system-ui, -apple-system, "Segoe UI", "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: 1.25rem; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { padding-left: var(--g); padding-right: var(--g); }
main.wrap { padding-top: 32px; padding-bottom: 48px; }
main.full { padding: 0; }

/* Header: full width, same gutters as the page. Phones: links fold into a menu (CSS only). */
.top { background: #fff; border-bottom: 1px solid var(--ink); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 8px 20px; min-height: var(--header); flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; font-size: .97rem; }
nav a, nav .link { color: var(--ink); text-decoration: none; font-weight: 500; }
nav a:hover, nav .link:hover { color: var(--blue); text-decoration: underline; }
.adminlink { color: var(--red) !important; font-weight: 700 !important; }
.lang { color: var(--blue); font-weight: 700; text-decoration: none; order: 3; }
.navt { position: absolute; opacity: 0; pointer-events: none; }
.menu-btn { display: none; }
@media (max-width: 759px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; order: 4; font-weight: 700; cursor: pointer; user-select: none; }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
  .navt:checked + .menu-btn span { background: transparent; }
  .navt:checked + .menu-btn span::before { top: 0; transform: rotate(45deg); }
  .navt:checked + .menu-btn span::after { top: 0; transform: rotate(-45deg); }
  .navt:focus-visible + .menu-btn { outline: 2px solid var(--blue); outline-offset: 4px; }
  nav { display: none; order: 5; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); margin: 4px 0 -4px; }
  nav > a, nav > form { padding: 14px 0; border-bottom: 1px solid var(--line); }
  nav > :last-child { border-bottom: 0; }
  .navt:checked ~ nav { display: flex; }
}
@media (min-width: 760px) { nav { order: 2; } .lang { order: 3; } }

/* Buttons: the only filled shapes on the page */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; border: 2px solid var(--blue); border-radius: 4px;
  padding: 10px 20px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.big { padding: 13px 28px; font-size: 1.05rem; }
.btn.outline { background: #fff; color: var(--blue); }
.btn.outline:hover { background: #fff; color: var(--blue-dark); }
.btn.ghost { background: #fff; color: var(--red); border-color: var(--red); }
.btn.tg { background: #229ed9; border-color: #229ed9; }
.btn.wa { background: #17a34a; border-color: #17a34a; }
.btn.file { background: #fff; color: var(--blue); border-style: dashed; }
.btn.file input { display: none; }
.btn[disabled] { opacity: .55; cursor: wait; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }
.textlink { font-weight: 700; text-decoration: none; }
.textlink:hover { text-decoration: underline; }
.danger { color: var(--red); }
form.inline { display: inline; margin: 0; }

/* Split: two equal halves divided by one rule */
.split { display: grid; grid-template-columns: 1fr; }
.split-intro { padding: 48px var(--g) 40px; }
.split-login { padding: 40px var(--g) 48px; border-top: 1px solid var(--ink); }
.eyebrow { color: var(--red); font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.display { font-size: 2.3rem; line-height: 1.12; margin: 0 0 18px; font-weight: 800; }
.display .accent { color: var(--blue); display: block; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 28px 0 0; }
.num { color: var(--red); font-weight: 800; font-variant-numeric: tabular-nums; }
.features { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.features li { display: grid; grid-template-columns: 2.4em 1fr; align-content: start; column-gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.features li > span:last-child { grid-column: 2; color: var(--muted); font-size: .95rem; }

.login { max-width: 400px; }
.login-title { font-size: 1.8rem; font-weight: 800; margin: 0 0 8px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  margin: 24px 0 20px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 4px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.btn-google:hover { background: #f3f4f6; color: var(--ink); }
.small { font-size: .9rem; margin-bottom: .6em; }

/* Bands below the split: heading in left half, content in right half */
.band { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 40px var(--g); border-top: 1px solid var(--ink); }
.band h2 { font-size: 1.5rem; font-weight: 800; }
.band .lead { margin: 0; }
.steps4 { list-style: none; padding: 0; margin: 0; display: grid; }
.steps4 li { display: grid; grid-template-columns: 2.4em 1fr; column-gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps4 li:first-child { padding-top: 0; }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header)); }
  .split-intro { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; justify-content: center; }
  .split-login { border-top: 0; border-left: 1px solid var(--ink); display: flex; align-items: center; padding-top: 72px; padding-bottom: 72px; }
  .login { width: 100%; }
  .display { font-size: clamp(2.6rem, 3.6vw, 3.6rem); }
  .features { grid-template-columns: repeat(3, 1fr); column-gap: 24px; border-top: 0; }
  .features li { grid-template-columns: 1fr; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 12px; }
  .features li > span:last-child { grid-column: 1; }
  .band { grid-template-columns: 1fr 1fr; gap: 0; padding: 56px 0; }
  .band > * { padding: 0 var(--g); }
  .steps4 { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .steps4 li { grid-template-columns: 1fr; border-bottom: 0; border-top: 1px solid var(--line); padding: 12px 0 16px; }
  .steps4 li:first-child { padding-top: 12px; }
}

/* Inner pages: sections separated by rules, no boxes */
.card { display: block; padding: 24px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
main > .card:first-child { border-top: 0; padding-top: 0; }
a.card:hover strong { color: var(--blue); }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.alert { border-left: 3px solid var(--red); color: #8a0d20; padding: 4px 0 4px 12px; }
.okmsg { border-left: 3px solid var(--ok); color: var(--ok); padding: 4px 0 4px 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-size: .92em; }
.steps { padding-left: 1.3em; margin: 0; } .steps li { margin: 8px 0; } .steps li::marker { color: var(--red); font-weight: 800; }
.plain { padding-left: 1.2em; } .plain li { margin: 8px 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; margin-bottom: 8px; }
.row > h1, .row > h2 { margin: 0; }
.kv { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: .95rem; margin-top: 4px; }

.tbl { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.tbl th, .tbl td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid var(--ink); }
#price .muted { color: var(--red); font-weight: 600; }

/* Forms: underlined fields */
.form label { display: block; margin: 0 0 22px; font-weight: 700; }
.form input, .form select, .form textarea, .filters input, .filters select, .payout input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 2px; font: inherit; font-weight: 400;
  color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; }
.form textarea { border: 2px solid var(--line); padding: 10px; }
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus, .filters select:focus, .payout input:focus {
  outline: none; border-color: var(--blue); }
.form small { display: block; font-weight: 400; color: var(--muted); font-size: .86rem; margin-top: 4px; }
.form .btn.big { width: 100%; }
.total { font-size: 1.25rem; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.total strong { color: var(--red); }

/* Status: coloured text, no pills */
.pill { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: "● "; }
.pill.draft { color: var(--red); }
.pill.paid { color: var(--blue); }
.pill.done { color: var(--ok); }

/* Orders, files */
.orders { display: grid; margin: 16px 0; border-top: 2px solid var(--ink); }
.orders .card { border-top: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
.files { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--line); }
.files li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.files li > :first-child { word-break: break-all; flex: 1 1 60%; }

/* Referral and admin numbers */
.refcode { font-size: 2rem; font-weight: 800; letter-spacing: .08em; color: var(--red); margin: .2em 0; }
.refcode-sm { font-size: 1.15rem; letter-spacing: .06em; color: var(--red); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-bottom: 16px; }
.stats > * { border-top: 2px solid var(--ink); padding: 10px 0 14px; text-decoration: none; color: inherit; }
.stats span { display: block; color: var(--muted); font-size: .86rem; }
.stats strong { font-size: 1.5rem; }
.stats a strong { color: var(--blue); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
details.card summary { cursor: pointer; font-weight: 700; color: var(--blue); }
details.card[open] summary { margin-bottom: 10px; }

.subnav, .chips { display: flex; gap: 4px 20px; flex-wrap: wrap; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.subnav a, .chips a { padding: 8px 0; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a.on, .chips a.on { color: var(--ink); border-bottom-color: var(--red); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; align-items: end; }
.filters input, .filters select { flex: 1 1 180px; width: auto; margin: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 10px 0 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; word-break: break-word; }
.actions { margin-top: 12px; }
.payout { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; align-items: end; }
.payout input { flex: 1 1 140px; width: auto; margin: 0; }
.pager { margin: 14px 0; }
.line { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Footer */
.foot { border-top: 1px solid var(--ink); color: var(--muted); font-size: .92rem; padding: 20px 0 32px; }
.foot a { color: var(--ink); }

@media (min-width: 640px) { h1 { font-size: 2rem; } }

/* Profile */
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .check input { width: auto; margin-top: 6px; }

/* Receipt: on screen a narrow document; printed on A4 without site chrome */
.receipt { max-width: 720px; margin: 0 auto; }
.receipt .dl { margin-bottom: 24px; }
.parties { display: grid; grid-template-columns: 1fr; gap: 8px 32px; border-top: 2px solid var(--ink); padding-top: 16px; margin-bottom: 8px; }
.parties h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; }
.num-r { text-align: right !important; white-space: nowrap; }
.tbl tfoot th { border-bottom: 2px solid var(--ink); color: var(--ink); font-size: 1.05rem; text-transform: none; letter-spacing: 0; }
@media (min-width: 640px) { .parties { grid-template-columns: 1fr 1fr; } }
@media print {
  @page { size: A4; margin: 16mm; }
  .top, .foot, .noprint { display: none !important; }
  body { font-size: 11pt; }
  main.wrap { padding: 0; }
  .parties { grid-template-columns: 1fr 1fr; }
  a { color: inherit; text-decoration: none; }
}
