:root {
  --navy: #0b1b3f; --ink: #0b1b3f; --muted: #5b6785; --line: #dfe4ef;
  --blue: #1a56ff; --blue-d: #0f3fd1; --blue-l: #e8efff;
  --bg: #f4f6fb; --card: #ffffff;
  --ok: #15803d; --ok-l: #e7f6ec; --warn: #b45309; --warn-l: #fff4e0; --bad: #b91c1c; --bad-l: #fdecec;
  --r: 14px; --shadow: 0 1px 2px rgba(11,27,63,.06), 0 4px 16px rgba(11,27,63,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; font-size: 14px; }
.top .grow { flex: 1; }
.top form { margin: 0; }
.langsel { display: flex; gap: 2px; }
.langsel a { color: #c8d2ea; text-decoration: none; font-size: 13px; padding: 6px 7px; border-radius: 6px; }
.langsel a[aria-current] { background: rgba(255,255,255,.14); color: #fff; }
.linkbtn { background: none; border: 0; color: #c8d2ea; font: inherit; font-size: 14px; cursor: pointer; padding: 6px; }
.subnav { background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav .in { max-width: 1180px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; white-space: nowrap; }
.subnav a { display: inline-block; padding: 12px 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
.subnav a[aria-current] { color: var(--blue); border-color: var(--blue); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; text-align: center; margin-left: 4px; }

main { max-width: 1180px; margin: 0 auto; padding: 16px 16px 96px; }
main.narrow { max-width: 560px; }
h1 { font-size: 24px; line-height: 1.2; margin: 8px 0 16px; letter-spacing: -.3px; }
h2 { font-size: 18px; margin: 24px 0 10px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.tile .n { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.tile .l { color: var(--muted); font-size: 13px; }
.tile.alert .n { color: var(--bad); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: var(--blue); color: #fff;
  font: inherit; font-weight: 700; padding: 12px 18px; min-height: 48px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-d); }
.btn.secondary { background: var(--blue-l); color: var(--blue-d); }
.btn.ghost { background: transparent; color: var(--blue); border: 2px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.ok { background: var(--ok); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.bigbtn { width: 100%; min-height: 120px; font-size: 24px; border-radius: 20px; flex-direction: column; }
.bigbtn small { font-weight: 500; font-size: 14px; opacity: .9; }
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 15px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=time], input[type=date], input[type=month], select, textarea {
  width: 100%; font: inherit; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-l); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; font-weight: 500; cursor: pointer; }
.radio-card input { width: 20px; height: 20px; margin-top: 2px; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-l); }
.inline-form { display: inline; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin: 12px 0 4px; }

.alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.alert.err { background: var(--bad-l); color: var(--bad); }
.alert.ok { background: var(--ok-l); color: var(--ok); }
.alert.warn { background: var(--warn-l); color: var(--warn); }
.alert.info { background: var(--blue-l); color: var(--blue-d); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eef1f7; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-l); color: var(--ok); }
.pill.warn { background: var(--warn-l); color: var(--warn); }
.pill.bad { background: var(--bad-l); color: var(--bad); }
.pill.blue { background: var(--blue-l); color: var(--blue-d); }

/* Tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); padding: 8px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
table.t td:first-child { white-space: nowrap; }
table.t a { text-decoration: none; font-weight: 600; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* Bars */
.bar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.bar .track { display: block; background: #eef1f7; border-radius: 6px; height: 12px; overflow: hidden; }
.bar .fill { display: block; background: var(--blue); height: 100%; border-radius: 6px; min-width: 4px; }

/* Worker clock */
.clock-status { text-align: center; padding: 22px 16px; }
.clock-status .big { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week div { background: #eef1f7; border-radius: 10px; padding: 8px 2px; font-size: 12px; }
.week b { display: block; font-size: 14px; }

/* Modal (dialog) */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
dialog::backdrop { background: rgba(11,27,63,.55); }
dialog .dlg { padding: 20px; }
.photo-preview { max-height: 200px; border-radius: 10px; margin-top: 8px; display: none; }

/* Bottom tab bar on phones */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 10px 4px 8px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.tabbar a[aria-current] { color: var(--blue); }
.tabbar svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
@media (min-width: 900px) { .tabbar { display: none; } main { padding-bottom: 40px; } }

/* Landing */
.hero { background: linear-gradient(180deg, var(--navy) 0%, #13306e 100%); color: #fff; }
.hero .in { max-width: 1180px; margin: 0 auto; padding: 48px 16px 56px; display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero .in { grid-template-columns: 1.1fr .9fr; padding: 80px 16px; } }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: #7fa2ff; }
.hero p.lead { font-size: 19px; color: #c8d2ea; margin: 0 0 24px; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.phone { background: #fff; color: var(--ink); border-radius: 28px; padding: 18px; max-width: 320px; margin: 0 auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 8px solid #0a1430; }
.phone .ps { text-align: center; padding: 16px 0; }
.phone .ps .big { font-size: 40px; font-weight: 800; }
.section { max-width: 1180px; margin: 0 auto; padding: 48px 16px; }
.section h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -.5px; margin: 0 0 8px; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
.feature { background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-l); color: var(--blue); display: grid; place-items: center; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.step { background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 10px; }
.footer { background: var(--navy); color: #c8d2ea; font-size: 14px; }
.footer .in { max-width: 1180px; margin: 0 auto; padding: 28px 16px 90px; display: flex; flex-wrap: wrap; gap: 16px 28px; }
.footer a { color: #fff; }
@media (min-width: 900px) { .footer .in { padding-bottom: 28px; } }

.legal { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 19px; margin-top: 28px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal td, .legal th { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }

#map { height: 340px; border-radius: 12px; margin: 10px 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .top, .subnav, .tabbar, .footer, .btn { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
