/* Nest Construction MSME. Phone first; a side menu appears on wide screens. */
@font-face { font-family: 'Jakarta'; src: url('fonts/jakarta.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --brand: #2563EB; --brand-d: #1D4ED8; --brand-soft: #EAF1FF; --ink: #12142A; --ink2: #4A5068; --ink3: #8389A0; --line: #E3E7F0; --bg: #F4F6FB; --card: #FFFFFF;
  --ok: #0F9D6B; --ok-soft: #E3F6EE; --bad: #D92D4A; --bad-soft: #FDECEF; --warn: #C97A06; --warn-soft: #FEF3DC; --pink: #FF2F7A; --violet: #6D4AE8; --violet-soft: #EFEAFE;
  --r: 14px; --shadow: 0 1px 2px rgba(18,20,42,.05), 0 6px 18px rgba(18,20,42,.05);
}
[data-theme="dark"] { --ink: #EEF0F8; --ink2: #B6BBD0; --ink3: #8389A0; --line: #2A2E48; --bg: #0E1020; --card: #171A30; --brand-soft: #1B2550; --ok-soft: #0F2F26; --bad-soft: #3A1620; --warn-soft: #3A2C10; --violet-soft: #251F48; --shadow: none; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }

/* shell */
.shell { min-height: 100%; display: flex; }
.rail { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: 86px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 14px 14px 24px; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 58px; }
.top h1 { font-size: 18px; line-height: 1.2; } .top .sub { font-size: 12.5px; color: var(--ink3); }
.top .grow { flex: 1; min-width: 0; } .top .grow > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: inline-grid; place-items: center; cursor: pointer; position: relative; flex: none; }
.iconbtn:hover { border-color: var(--brand); color: var(--brand); } .iconbtn.plain { border-color: transparent; background: transparent; }
.iconbtn .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); display: flex; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--ink3); border-radius: 12px; position: relative; }
.tabbar a.on { color: var(--brand); background: var(--brand-soft); }
.tabbar .dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.s { width: 18px; height: 18px; } svg.i.l { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .rail { display: flex; flex-direction: column; width: 236px; flex: none; background: var(--card); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; padding: 16px 12px; gap: 2px; overflow: auto; }
  .rail .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 800; font-size: 15px; line-height: 1.15; } .rail .brand img { width: 34px; height: 34px; } .rail .brand small { display: block; font-weight: 600; color: var(--ink3); font-size: 11.5px; }
  .rail a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: var(--ink2); font-weight: 600; font-size: 14px; }
  .rail a:hover { background: var(--bg); } .rail a.on { background: var(--brand-soft); color: var(--brand); }
  .rail .grp { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 14px 10px 4px; }
  .rail .cnt { margin-left: auto; background: var(--pink); color: #fff; border-radius: 9px; font-size: 11px; padding: 1px 7px; }
  .tabbar { display: none; } .main { padding-bottom: 0; } .wrap { padding: 20px 28px 40px; } .top .in { padding: 12px 28px; }
  .actions { left: 236px !important; }
}

/* cards, lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card + .card, .card + .sec, .sec + .card { margin-top: 12px; }
.kpis > .card, .todo > .card, .rings > .card { margin-top: 0; }
.card .hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; } .card .hd h2 { font-size: 15.5px; flex: 1; } .card .bd { padding: 14px 16px 16px; }
.card .hd .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink2); font-size: 13.5px; margin-bottom: 12px; } .note b { color: var(--ink); }
.note.warn { background: var(--warn-soft); } .note.bad { background: var(--bad-soft); } .note.ok { background: var(--ok-soft); }
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; } .row:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.row .t { font-weight: 650; } .row .s { font-size: 12.5px; color: var(--ink3); } .row .grow { flex: 1; min-width: 0; } .row .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row .r { text-align: right; flex: none; }
.av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--brand-soft); color: var(--brand); flex: none; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--bg); color: var(--ink2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.info { background: var(--brand-soft); color: var(--brand); } .pill.vio { background: var(--violet-soft); color: var(--violet); }
.empty { text-align: center; padding: 34px 16px; color: var(--ink3); } .empty b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 4px; }
.loading { padding: 40px; text-align: center; color: var(--ink3); }
.tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; } .tools .search { flex: 1; min-width: 160px; position: relative; } .tools .search svg { position: absolute; left: 12px; top: 11px; color: var(--ink3); } .tools .search input { padding-left: 40px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 1px solid var(--line); background: var(--card); padding: 8px 13px; border-radius: 22px; font-weight: 650; font-size: 13.5px; color: var(--ink2); white-space: nowrap; cursor: pointer; }
.tabs button.on { background: var(--ink); color: var(--card); border-color: var(--ink); } [data-theme="dark"] .tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; } .form .f.full { grid-column: 1 / -1; } .form .f { min-width: 0; }
@media (max-width: 520px) { .form .f:not(.half) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .form.w3 { grid-template-columns: repeat(3, 1fr); } }
.f label { display: block; font-size: 13px; font-weight: 650; color: var(--ink2); margin-bottom: 5px; } .f label i { color: var(--bad); font-style: normal; margin-left: 2px; }
.f .hint { font-size: 12px; color: var(--ink3); margin-top: 4px; } .f .err { font-size: 12.5px; color: var(--bad); margin-top: 4px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 11px; padding: 10px 12px; min-height: 44px; outline: none; }
textarea { min-height: 84px; resize: vertical; display: block; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[readonly], input:disabled, select:disabled, .ro { background: var(--bg); color: var(--ink2); }
.bad-in input, .bad-in select, .bad-in textarea { border-color: var(--bad); }
.lock { position: relative; } .lock input { padding-right: 36px; text-overflow: ellipsis; } .lock svg { position: absolute; right: 12px; top: 12px; color: var(--ink3); } .cnt { text-align: right; font-size: 11.5px; color: var(--ink3); margin-top: 3px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; max-width: 100%; } .seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 8px; font-weight: 650; color: var(--ink2); cursor: pointer; min-height: 36px; white-space: nowrap; }
.seg button.on { background: var(--brand); color: #fff; } .seg button:disabled { opacity: .5; cursor: default; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; color: var(--ink); }
.btn:hover { border-color: var(--brand); } .btn.p { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.p:hover { background: var(--brand-d); } .btn.d { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 10px; } .btn.link { border: 0; background: transparent; color: var(--brand); padding: 6px 4px; min-height: 32px; } .btn:disabled { opacity: .55; cursor: default; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--card); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: flex-end; }
.actions .btn { flex: 1; max-width: 260px; } .has-actions { padding-bottom: 80px; }
.blk { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; } .blk + .blk { margin-top: 10px; }
.blk .sh { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--brand-soft); font-weight: 700; font-size: 13.5px; color: var(--brand-d); } [data-theme="dark"] .blk .sh { color: var(--ink); }
.blk .sb { padding: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-d); border-radius: 20px; padding: 4px 6px 4px 11px; font-size: 13px; font-weight: 600; } [data-theme="dark"] .chip { color: var(--ink); }
.chip button { border: 0; background: transparent; cursor: pointer; padding: 2px; display: grid; color: inherit; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--ink3); cursor: pointer; display: block; } .drop:hover { border-color: var(--brand); color: var(--brand); } .drop input { display: none; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 4px; cursor: pointer; } .check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; }

/* tables */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; } .t th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink3); background: var(--bg); padding: 9px 10px; white-space: nowrap; }
.t td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; } .t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .t .c { text-align: center; }
.t tr.g td { font-weight: 700; background: color-mix(in srgb, var(--bg) 60%, var(--card)); } .t tfoot td { font-weight: 800; border-top: 2px solid var(--line); } .t tr.click { cursor: pointer; } .t tr.click:hover td { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.t td input, .t td select { min-height: 38px; padding: 7px 9px; min-width: 76px; } .t td .del { color: var(--bad); border: 0; background: transparent; cursor: pointer; padding: 6px; }
.t .neg { color: var(--bad); } .t .pos { color: var(--ok); } .t small { color: var(--ink3); display: block; }

/* sheet (bottom sheet on phones, dialog on wide screens) */
.veil { position: fixed; inset: 0; z-index: 60; background: rgba(12,14,30,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.sheet.wide { max-width: 900px; } .sheet .sh { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; } .sheet .sh h2 { flex: 1; font-size: 17px; }
.sheet .sb { padding: 6px 18px 16px; overflow: auto; } .sheet .sf { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; } .sheet .sf .btn { flex: 1; }
@media (min-width: 700px) { .veil { align-items: center; padding: 24px; } .sheet { border-radius: 20px; } .sheet .sf .btn { flex: none; min-width: 130px; } }
.toasts { position: fixed; left: 0; right: 0; bottom: 96px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { background: var(--ink); color: var(--card); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; max-width: 520px; box-shadow: 0 8px 30px rgba(0,0,0,.25); } .toast.err { background: var(--bad); color: #fff; }

/* home */
.hello { margin-bottom: 14px; } .hello .g { color: var(--ink3); font-weight: 600; } .hello h1 { font-size: 26px; letter-spacing: -.02em; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } @media (min-width: 760px) { .kpis { grid-template-columns: repeat(5, 1fr); } }
.kpi { padding: 14px; } .kpi .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; } .kpi .l { font-size: 12.5px; color: var(--ink3); font-weight: 650; } .kpi .v { font-size: 19px; font-weight: 800; letter-spacing: -.02em; } .kpi .s { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.up { color: var(--ok); font-weight: 700; } .down { color: var(--bad); font-weight: 700; }
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; } .todo a { padding: 12px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); } .todo .n { font-size: 24px; font-weight: 800; line-height: 1.1; } .todo .l { font-size: 12px; color: var(--ink3); font-weight: 650; }
.two { display: grid; gap: 12px; margin-top: 12px; } @media (min-width: 860px) { .two { grid-template-columns: 1.6fr 1fr; } .two .card + .card { margin-top: 0; } }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink2); flex-wrap: wrap; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.rings { display: flex; gap: 18px; justify-content: space-around; text-align: center; font-size: 12.5px; color: var(--ink3); font-weight: 650; }
.split { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .split table { flex: 1; min-width: 200px; font-size: 13.5px; border-collapse: collapse; } .split td { padding: 5px 4px; } .split td.r { text-align: right; font-variant-numeric: tabular-nums; }

/* modules */
.mgroup { margin-bottom: 12px; } .mgroup .mh { display: flex; align-items: center; gap: 12px; padding: 14px 16px 4px; } .mgroup .mh .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; } .mgroup .mh h2 { font-size: 16px; } .mgroup .mh .s { font-size: 12.5px; color: var(--ink3); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px 14px; } @media (min-width: 620px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 650; text-align: center; background: var(--card); line-height: 1.2; }
.tile:hover { border-color: var(--brand); } .tile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.c1 { background: #EAF1FF; color: #2563EB; } .c2 { background: #E3F6EE; color: #0F9D6B; } .c3 { background: #FEF3DC; color: #C97A06; } .c4 { background: #EFEAFE; color: #6D4AE8; } .c5 { background: #FDECEF; color: #D92D4A; } .c6 { background: #E0F5F7; color: #0C8599; }
[data-theme="dark"] .c1, [data-theme="dark"] .c2, [data-theme="dark"] .c3, [data-theme="dark"] .c4, [data-theme="dark"] .c5, [data-theme="dark"] .c6 { background: color-mix(in srgb, currentColor 16%, transparent); }
.b1 { background: #2563EB; } .b2 { background: #0F9D6B; } .b3 { background: #F0760A; } .b4 { background: #6D4AE8; } .b5 { background: #0C8599; }

/* sign-in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, #DCE8FF, transparent), var(--bg); }
.gate .box { width: 100%; max-width: 400px; padding: 26px; } .gate img { width: 52px; height: 52px; } .gate h1 { font-size: 22px; margin: 12px 0 2px; } .gate p { color: var(--ink3); margin: 0 0 18px; } .gate .f + .f { margin-top: 12px; } .gate .btn { width: 100%; margin-top: 16px; }
.qr { width: 200px; margin: 6px auto; display: block; background: #fff; border-radius: 12px; padding: 6px; } .qr svg { width: 100%; height: auto; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; } .kv dt { color: var(--ink3); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.sec { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); margin: 18px 4px 8px; }
.split2 { display: grid; gap: 12px; } @media (min-width: 900px) { .split2 { grid-template-columns: 300px 1fr; align-items: start; } .split2 > .card + .card, .split2 > * + * { margin-top: 0; } }
@media print { .rail, .tabbar, .top, .actions, .tools, .tabs, .noprint { display: none !important; } body { background: #fff; } .card { box-shadow: none; border: 0; } .main { padding: 0; } }

.split2 > *, .two > *, .wrap > * { min-width: 0; } .main { overflow-x: clip; }
@media (min-width: 700px) { .kv.k4 { grid-template-columns: repeat(4, auto); justify-content: space-between; } }
