/* Smart Zugdidi — shared design system (public site + admin panel). Fonts as on the Activi platform:
   Noto Sans Georgian (SIL OFL) for Georgian, Inter (SIL OFL) for Latin and Cyrillic. Colours meet
   WCAG 2.1 AA contrast (text ≥ 4.5:1, large text and UI ≥ 3:1). */
@font-face { font-family: 'SZ Sans'; src: url('/fonts/noto-georgian.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F; }
@font-face { font-family: 'SZ Sans'; src: url('/fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BE, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'SZ Sans'; src: url('/fonts/inter-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'SZ Sans'; src: url('/fonts/inter-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --g-900: #10281A; --g-800: #14301F; --g-700: #1F5D3A; --g-600: #276C45; --g-500: #3F8A5C; --g-100: #DCEBDF; --g-50: #EEF6F0;
  --sand: #F7F4EC; --amber: #E8A33D; --amber-ink: #6B4400;
  --text: #14231A; --muted: #4F6156; --border: #D5E0D8; --bg: #F5F8F5; --card: #FFFFFF;
  --ok: #12703A; --ok-bg: #E3F4E8; --err: #B42318; --err-bg: #FDECEA; --warn: #8A5300; --warn-bg: #FFF4DC; --info: #1D4E89; --info-bg: #E8F0FB;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 40, 26, .06), 0 6px 18px -8px rgba(16, 40, 26, .14);
  --focus: 0 0 0 3px #FFFFFF, 0 0 0 6px #1D4E89;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'SZ Sans', system-ui, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; }
img, video { height: auto; }
a { color: var(--g-700); text-underline-offset: 2px; }
a:hover { color: var(--g-900); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .93em; }
small, .small { font-size: 13.5px; color: var(--muted); }
.muted { color: var(--muted); }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--g-800); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.ic { flex: none; vertical-align: -4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--g-600); color: var(--g-700); }
.btn-primary { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.btn-primary:hover { background: var(--g-800); border-color: var(--g-800); color: #fff; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: #1F1400; }
.btn-amber:hover { background: #D99124; color: #1F1400; }
.btn-danger { color: var(--err); border-color: #F1B8B2; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--g-700); cursor: pointer; text-decoration: underline; }

/* forms */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.span-all { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label, fieldset > legend { font-weight: 700; font-size: 14.5px; color: #24382B; }
.field .hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.field .error { font-size: 14px; color: var(--err); font-weight: 600; margin: 0; }
.req { color: var(--err); font-weight: 700; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); padding: 10px 12px; min-height: 44px; border: 1.5px solid #B9C9BE; border-radius: 10px; background: #fff; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px rgba(29, 78, 137, .25); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--g-700); }
fieldset { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; }
.choice:has(input:checked) { border-color: var(--g-700); background: var(--g-50); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input { margin-top: 2px; flex: none; }

/* feedback */
.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.info { background: var(--info-bg); color: var(--info); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: #ECEFEC; color: #3E4D44; }
.badge.green { background: var(--ok-bg); color: var(--ok); }
.badge.red { background: var(--err-bg); color: var(--err); }
.badge.amber { background: var(--warn-bg); color: var(--warn); }
.badge.blue { background: var(--info-bg); color: var(--info); }

/* cards & tables */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.card.pad { padding: 22px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
.tbl th { text-align: left; font-size: 13px; color: #43564A; font-weight: 700; padding: 10px 12px; background: #F3F7F4; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #E6ECE8; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot th, .tbl tr.total td { background: #F3F7F4; font-weight: 800; color: var(--text); }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }
.empty p { margin: 0 0 10px; }
.qr-box { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; line-height: 0; }
.qr-box svg { width: 100%; height: auto; display: block; }
.code-big { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 24px; font-weight: 800; letter-spacing: .08em; }

/* utilities (the CSP forbids inline styles) */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 26px; } .mb-16 { margin-bottom: 16px; } .mb-0 { margin-bottom: 0; }
.mw-320 { max-width: 320px; } .mw-640 { max-width: 640px; } .mw-720 { max-width: 720px; } .mw-820 { max-width: 820px; }
.w-full { width: 100%; } .h-sm { font-size: 16px; }
.nowrap { white-space: nowrap; }
