/* Compulsory Scorecard Engineering design system: shared by the website, portals and office. */
:root {
  --red: #0c689d; --red-d: #08507a; --red-l: #e7f1f8; --red-t: rgba(12, 104, 157, .1);
  --ink: #101216; --ink-2: #262a31; --ink-3: #3a3f48; --muted: #646b76; --faint: #8b919b;
  --line: #e3e5e9; --line-2: #eef0f2; --bg: #fff; --bg-2: #f6f5f2; --bg-3: #edebe6; --card: #fff;
  --ok: #12804a; --ok-l: #e6f5ec; --warn: #a96300; --warn-l: #fff3df; --bad: #c42a2a; --bad-l: #fdecec; --info: #1d5bb8; --info-l: #e8effb;
  --r: 16px; --r-sm: 11px; --r-xs: 8px;
  --sh: 0 1px 2px rgba(16, 18, 22, .05), 0 10px 30px -14px rgba(16, 18, 22, .22);
  --sh-lg: 0 30px 80px -30px rgba(16, 18, 22, .45);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Manrope", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #eef0f3; --ink-2: #d6d9de; --ink-3: #b9bec6; --muted: #9aa1ab; --faint: #7a818b;
  --line: #2b2f37; --line-2: #23272e; --bg: #15171b; --bg-2: #1b1e23; --bg-3: #22262c; --card: #1b1e23;
  --red-l: rgba(12, 104, 157, .16); --ok-l: rgba(18, 128, 74, .18); --warn-l: rgba(169, 99, 0, .2); --bad-l: rgba(196, 42, 42, .2); --info-l: rgba(29, 91, 184, .22);
  --sh: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--red) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--red); color: #fff; }
.i { display: inline-block; width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .red { color: var(--red); } .ok { color: var(--ok); } .bad { color: var(--bad); }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; } .num { font-variant-numeric: tabular-nums; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.top { align-items: flex-start; } .row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: 12px; } .stack-lg > * + * { margin-top: 22px; }
.grow { flex: 1; min-width: 0; }
.g2, .g3, .g4 { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.hide { display: none !important; }
@media (max-width: 700px) { .hide-sm { display: none !important; } }

/* buttons */
.btn { --b: var(--ink); --c: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .62em 1.15em; border-radius: 999px; border: 1.5px solid var(--b);
  background: var(--b); color: var(--c); font: 600 .95rem/1.1 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background .15s, box-shadow .2s, border-color .15s; white-space: nowrap; user-select: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(16, 18, 22, .45); }
.btn:active { transform: translateY(0); }
.btn.primary { --b: var(--red); }
.btn.primary:hover { --b: var(--red-d); }
.btn.dark { --b: #101216; }
.btn.light { --b: #fff; --c: #101216; }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); box-shadow: none; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.outline:hover { border-color: var(--ink-3); }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn.danger { --b: var(--bad); }
.btn.wa { --b: #1fa855; }
.btn.sm { min-height: 34px; padding: .4em .85em; font-size: .85rem; }
.btn.lg { min-height: 54px; padding: .8em 1.5em; font-size: 1.02rem; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }
.btn.icon.sm { width: 32px; min-height: 32px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.req::after { content: " *"; color: var(--red); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .66em .85em; min-height: 46px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 2.2em; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 4px var(--red-t); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--red); flex: none; }
input[type=range] { padding: 0; min-height: 0; accent-color: var(--red); border: 0; background: none; }
input[type=file] { padding: .5em; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { margin-top: 2px; }
.unit { position: relative; }
.unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.unit > input { padding-right: 3.6em; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: .45em .95em; border-radius: 999px; font: 600 .86rem var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: var(--sh); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line); border: 0; transition: background .2s; position: relative; cursor: pointer; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--red); }
.switch input:checked::after { transform: translateX(18px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: .5em .9em; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-size: .9rem; font-weight: 600; transition: all .15s; user-select: none; }
.chip:hover { border-color: var(--ink-3); }
.chip.on, .chip:has(input:checked) { border-color: var(--red); background: var(--red-l); color: var(--red-d); }
.chip input { display: none; }
[data-theme="dark"] .chip.on, [data-theme="dark"] .chip:has(input:checked) { color: #ffb3b6; }
.error-msg { color: var(--bad); font-size: .9rem; font-weight: 600; }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card.pad { padding: 22px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { margin: 0; font-size: 1.02rem; }
.card-b { padding: 18px 20px; }
.panel { background: var(--bg-2); border-radius: var(--r); padding: 18px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: .22em .65em; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .01em; background: var(--bg-3); color: var(--ink-3); white-space: nowrap; }
.badge.ok { background: var(--ok-l); color: var(--ok); } .badge.warn { background: var(--warn-l); color: var(--warn); } .badge.bad { background: var(--bad-l); color: var(--bad); }
.badge.info { background: var(--info-l); color: var(--info); } .badge.red { background: var(--red-l); color: var(--red-d); } .badge.dark { background: var(--ink); color: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.prog { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #e97e25); border-radius: 99px; transition: width .6s var(--ease); }
.prog.ok > i { background: var(--ok); }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .i { width: 38px; height: 38px; margin: 0 auto 10px; color: var(--faint); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--info-l); color: var(--ink-2); font-size: .94rem; }
.alert.warn { background: var(--warn-l); } .alert.ok { background: var(--ok-l); } .alert.bad { background: var(--bad-l); }
.alert .i { margin-top: 2px; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 14px; font-size: .94rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.newver { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 2000; display: flex; gap: 12px; align-items: center; background: #1f2a33; color: #fff; padding: 10px 10px 10px 16px; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28); width: max-content; max-width: calc(100vw - 24px); font-size: .92rem; } .newver .i { flex: none; }
/* tables */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--bg-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.sticky-h th { position: sticky; top: 0; z-index: 1; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 12px 14px; font: 600 .92rem var(--font); color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tab[aria-selected=true] { color: var(--ink); border-color: var(--red); }
.tab .n { background: var(--bg-3); border-radius: 99px; padding: 0 .5em; font-size: .75rem; }

/* overlays */
.modal-bg, .drawer-bg { position: fixed; inset: 0; background: rgba(12, 13, 16, .55); backdrop-filter: blur(3px); z-index: 80; display: flex; animation: fade .2s; }
.modal-bg { align-items: center; justify-content: center; padding: 18px; }
.modal { background: var(--card); border-radius: 20px; width: min(560px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; box-shadow: var(--sh-lg); animation: pop .22s var(--ease); }
.modal.wide { width: min(880px, 100%); }
.modal-h, .drawer-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-h h3, .drawer-h h3 { margin: 0; font-size: 1.12rem; }
.modal-b, .drawer-b { padding: 20px 22px; overflow-y: auto; }
.modal-f, .drawer-f { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.drawer-bg { justify-content: flex-end; }
.drawer { background: var(--card); width: min(620px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--sh-lg); animation: slide .25s var(--ease); }
.drawer-b { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
#toasts { position: fixed; z-index: 100; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 24px)); }
.toast { pointer-events: auto; background: #15171b; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sh-lg); font-size: .93rem; display: flex; gap: 10px; align-items: center; animation: pop .25s var(--ease); width: 100%; }
.toast.bad { background: var(--bad); } .toast.ok .i { color: #5ee08f; }
.toast button { margin-left: auto; color: #fff; }

/* calculators (website + office) */
.calc { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 960px) { .calc { grid-template-columns: 1fr; } }
.calc-form { display: grid; gap: 14px; }
.calc-form .field.inline { flex-direction: row; align-items: center; justify-content: space-between; }
.calc-out { display: grid; gap: 18px; min-width: 0; }
.calc-total { background: #101216; color: #fff; border-radius: var(--r); padding: 22px 24px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.calc-total::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(12, 104, 157, .55), transparent 70%); }
.calc-total .lbl { color: rgba(255, 255, 255, .7); }
.calc-total .big { font: 800 clamp(1.7rem, 3.6vw, 2.5rem)/1.1 var(--display); letter-spacing: -.02em; }
.calc-total .sub { color: rgba(255, 255, 255, .72); font-size: .9rem; }
.sumcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sum { background: var(--bg-2); border-radius: 13px; padding: 12px 14px; }
.sum .l { font-size: .78rem; color: var(--muted); font-weight: 600; }
.sum .v { font: 800 1.2rem/1.25 var(--display); margin-top: 3px; }
.sum .v small { font: 500 .78rem var(--font); color: var(--muted); margin-left: 3px; }
.sum.hi { background: var(--red-l); }
.sum.hi .v { color: var(--red-d); }
[data-theme="dark"] .sum.hi .v { color: #ff9ea2; }
.calc-lines td:first-child { width: 55%; }
.calc-lines .grp td { background: var(--bg-2); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.rows-ed { display: grid; gap: 8px; }
.rows-ed .r { display: grid; grid-template-columns: 1fr 78px 78px 36px; gap: 6px; align-items: center; }
.rows-ed.app .r { grid-template-columns: 1fr 70px 56px 52px 36px; }
.rows-ed input { min-height: 38px; padding: .4em .6em; font-size: .9rem; }
.rows-ed .hd { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font: 600 11px var(--font); fill: var(--muted); }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .bar { fill: var(--red); } .chart .bar.b2 { fill: var(--ink-3); } .chart .bar.neg { fill: var(--bad); }
.chart .line { fill: none; stroke: var(--red); stroke-width: 2.5; }
.chart .area { fill: url(#gradRed); opacity: .35; }
.chart .zero { stroke: var(--ink-3); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--red)); margin-right: 6px; vertical-align: -1px; }
.gantt { display: grid; gap: 6px; font-size: .85rem; }
.gantt .g-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px; align-items: center; }
.gantt .g-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt .g-track { position: relative; height: 22px; background: var(--bg-2); border-radius: 6px; }
.gantt .g-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: color-mix(in srgb, var(--red) 28%, transparent); overflow: hidden; min-width: 4px; }
.gantt .g-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--red); }
.gantt .g-bar.done { background: var(--ok); }
.gantt .g-bar.done > i { background: var(--ok); }
.gantt .g-axis { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px; color: var(--muted); font-size: .72rem; }
.gantt .g-axis > div:last-child { display: flex; justify-content: space-between; }
.gantt .g-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.plan-svg { width: 100%; height: auto; background: repeating-linear-gradient(0deg, transparent 0 19px, var(--line-2) 19px 20px), repeating-linear-gradient(90deg, transparent 0 19px, var(--line-2) 19px 20px); border-radius: var(--r-sm); border: 1px solid var(--line); }
.plan-svg rect { fill: var(--card); stroke: var(--ink-2); stroke-width: 2.5; }
.plan-svg text { font: 700 11px var(--font); fill: var(--ink-2); }
.plan-svg text.a { font-weight: 500; fill: var(--muted); }

@media print { .no-print { display: none !important; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.install-app { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: flex; gap: 4px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; box-shadow: var(--sh-lg); }
body:has(.bottom-nav) .install-app { bottom: 80px; }
