@font-face { font-family: Metropolis; src: url(/fonts/Metropolis-Regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Metropolis; src: url(/fonts/Metropolis-Medium.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Metropolis; src: url(/fonts/Metropolis-SemiBold.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Metropolis; src: url(/fonts/Metropolis-Bold.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Peidetud on peidetud.
 * `hidden` on brauseri enda peitmisviis, aga selle vaikimisi `display: none`
 * kaotab igale klassile, mis ise display'd määrab (meil näiteks `display: flex`
 * menüüdel ja otsingukastil). Siis jääks menüü püsivalt lahti. See rida ütleb
 * ühe korra ja lõplikult: kui element on peidetud, siis teda ei joonistata. */
[hidden] { display: none !important; }

:root {
  --canvas: #F4F4F6; --surface: #FFFFFF; --surface-2: #FAFAFA; --surface-3: #F1F1F4;
  --line: #E6E6EA; --line-2: #EFEFF2; --line-3: #F4F4F6; --line-strong: #D8D8DE;
  --ink: #121214; --ink-2: #3A3A40; --muted: #6E6E76; --faint: #9A9AA2;
  --brand: #0A0A0A; --neon: #D9FF2E;
  --ok: #16794A; --ok-bg: #ECF5F0; --ok-line: #CBE0D4;
  --info: #2B5CA8; --info-bg: #EDF3FA; --info-line: #CFDEEF;
  --warn: #8A5A12; --warn-bg: #FDF6EC; --warn-line: #E3CFA8;
  --bad: #A62B2B; --bad-bg: #FBECEC; --bad-line: #F0D2D2;
  --int: #334A5E; --int-bg: #F7F9FB; --int-line: #D5DEE7;
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 10px; --r-xl: 14px;
  --sh-pop: 0 8px 28px rgba(16, 16, 20, 0.12), 0 1px 2px rgba(16, 16, 20, 0.06);
  --sh-bar: 0 1px 0 rgba(16, 16, 20, 0.05);
  --t-fast: 100ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --t: 150ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --t-slow: 250ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --row-h: 34px;
}
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "ss01"; }
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
button, select, input, textarea, a, summary { transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform var(--t-fast), opacity var(--t); }
button { cursor: pointer; font-family: inherit; }
button:hover { filter: brightness(0.975); border-color: #C9C9D0; }
button:active { filter: brightness(0.94); transform: translateY(0.5px); }
button:disabled { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
input:focus, select:focus, textarea:focus { border-color: #B4B4BC; box-shadow: 0 0 0 3px rgba(18, 18, 20, 0.06); }
input::placeholder, textarea::placeholder { color: #A6A6AE; }
::selection { background: var(--neon); color: #0A0A0A; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* rows, cards, reveal-on-hover actions */
.row { transition: background-color var(--t); }
.row:hover { background: #F3F4F6; }
.card { transition: box-shadow var(--t), transform var(--t-fast), border-color var(--t); }
a.card:hover, .liftable:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(16, 16, 20, 0.07); }
.reveal { opacity: 0; transition: opacity var(--t); }
.row:hover .reveal, .row:focus-within .reveal, .liftable:hover .reveal { opacity: 1; }

/* small shared pieces */
.lbl { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #3A3A40; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-xs); background: var(--surface); font-size: 10px; font-weight: 600; color: var(--faint); font-family: inherit; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }
.skel { background: linear-gradient(90deg, #EFEFF2 25%, #F7F7F9 37%, #EFEFF2 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-xs); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D4D4DA; border: 3px solid transparent; border-radius: 99px; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B8B8C0; border: 3px solid transparent; background-clip: content-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.bleed { margin-left: -32px; margin-right: -32px; }
/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .appbar { gap: 12px !important; padding-left: 20px !important; padding-right: 20px !important; }
  .page, .subwrap, .bar { padding-left: 20px !important; padding-right: 20px !important; }
  .bleed { margin-left: -20px !important; margin-right: -20px !important; }
}
@media (max-width: 900px) {
  .appbar { flex-wrap: wrap !important; row-gap: 10px !important; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { flex-shrink: 0; }
  .appsearch { flex: 0 0 auto !important; }
  .subnav { overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex-shrink: 0; white-space: nowrap; }
  .page, .subwrap, .bar { padding-left: 16px !important; padding-right: 16px !important; }
  .bleed { margin-left: -16px !important; margin-right: -16px !important; }
  .bar { gap: 8px !important; }
  .hide-md { display: none !important; }
  .cols2 { grid-template-columns: 1fr !important; }
}
/* navigation */
.mainnav a { border-radius: 8px; }
.mainnav a:hover { background: #F1F1F4; color: #121214; }
.subnav a:hover { color: #121214; }
.appsearch:hover { background: #EFEFF2; border-color: #D8D8DE; }
.appbar { box-shadow: var(--sh-bar); }
/* chips / segmented controls */
.chip { transition: background-color var(--t), border-color var(--t), color var(--t); }
.chip:hover { border-color: #C2C2CA; }
/* inline add buttons inside tables */
.addbtn:hover { background: #F6F7F9; color: #121214; }
/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 24px; text-align: center; }
.empty b { font-size: 14px; font-weight: 600; }
.empty span { font-size: 13px; color: var(--muted); max-width: 380px; line-height: 20px; }
/* focus ring inside dense tables stays inside the cell */
.t a:focus-visible, .t button:focus-visible { outline-offset: -2px; }
@media (max-width: 860px) {
  .pipe { scrollbar-width: none; }
  .pipe::-webkit-scrollbar { display: none; }
  .pipe > a { min-width: 124px !important; flex: 0 0 auto !important; }
}
@media (max-width: 640px) {
  .appbar { padding-left: 14px !important; padding-right: 14px !important; }
  .page, .subwrap, .bar { padding-left: 14px !important; padding-right: 14px !important; }
  .bleed { margin-left: -14px !important; margin-right: -14px !important; }
  .hide-sm { display: none !important; }
  .stack-sm { flex-direction: column !important; align-items: stretch !important; }
  h1 { font-size: 20px !important; }
  .appbar { position: static !important; }
}

select { -webkit-appearance: none; appearance: none; font-family: Metropolis, system-ui, sans-serif; font-weight: 500; font-size: 13px; color: #121214; line-height: normal; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236E6E76' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; padding-right: 30px !important; }
select:hover { border-color: #C9C9D0; }
@media (max-width: 1300px) { .appsearch { width: auto !important; } .searchlabel { display: none !important; } }

body { font-family: Metropolis, system-ui, sans-serif; color: #121214; }
button, input, select, textarea { font-family: Metropolis, system-ui, sans-serif; }
.palwrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 11vh 20px 20px; }
.palbackdrop { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(12, 12, 16, 0.26); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: default; }
.palbox { position: relative; width: 100%; max-width: 660px; max-height: 70vh; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #DEDEE4; border-radius: 14px; box-shadow: 0 24px 64px rgba(12, 12, 16, 0.22), 0 2px 6px rgba(12, 12, 16, 0.08); overflow: hidden; }
.palhead { display: flex; align-items: center; gap: 11px; padding: 0 16px; height: 54px; border-bottom: 1px solid #EFEFF2; flex-shrink: 0; }
.palinput { flex: 1 1 auto; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 17px; color: #121214; }
.palinput::placeholder { color: #A6A6AE; }
.palbody { overflow-y: auto; padding: 6px 0 8px; }
.palgrp { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px 4px; font-size: 10px; line-height: 15px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #9A9AA2; }
.palcount { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }
.palrow { display: flex; align-items: center; gap: 11px; padding: 7px 16px; text-decoration: none; color: inherit; }
.palrow:hover, .palrow:focus-visible { background: #F4F4F6; }
.palbadge { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.palmain { flex: 1 1 auto; min-width: 0; }
.paltitle { display: block; font-size: 13px; font-weight: 500; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palsub { display: block; font-size: 11px; line-height: 16px; color: #6E6E76; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palmeta { flex-shrink: 0; font-size: 11px; color: #9A9AA2; }
.palempty { padding: 26px 20px 30px; text-align: center; font-size: 13px; line-height: 20px; color: #6E6E76; }
.palfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-top: 1px solid #EFEFF2; background: #FAFAFA; font-size: 11px; color: #9A9AA2; flex-shrink: 0; }
@media (max-width: 640px) { .palwrap { padding: 6vh 12px 12px; } .palbox { max-height: 80vh; } .palinput { font-size: 16px; } }
.notifwrap { position: fixed; inset: 0; z-index: 85; }
.notifback { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }
.notifbox { position: absolute; top: 56px; right: 24px; width: 352px; max-width: calc(100vw - 28px); max-height: 70vh; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #DEDEE4; border-radius: 12px; box-shadow: 0 18px 44px rgba(12, 12, 16, 0.18), 0 2px 5px rgba(12, 12, 16, 0.07); overflow: hidden; }
.notifhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #EFEFF2; }
.notifhead b { font-size: 14px; font-weight: 600; }
.notifhead button { padding: 0; border: 0; background: transparent; font-family: inherit; font-size: 12px; color: #6E6E76; cursor: pointer; }
.notifhead button:hover { color: #121214; }
.notiflist { overflow-y: auto; }
.notifrow { display: flex; gap: 10px; padding: 11px 15px; border-bottom: 1px solid #F4F4F6; text-decoration: none; color: inherit; }
.notifrow:hover { background: #F4F4F6; }
.notifdot { width: 7px; height: 7px; margin-top: 6px; flex-shrink: 0; border-radius: 999px; }
.notiftitle { display: block; font-size: 13px; line-height: 19px; }
.notifsub { display: block; font-size: 12px; line-height: 17px; color: #6E6E76; margin-top: 1px; }
.notiftime { display: block; font-size: 11px; color: #9A9AA2; margin-top: 3px; }
.notiffoot { padding: 10px 15px; border-top: 1px solid #EFEFF2; background: #FAFAFA; }
.notiffoot a { font-size: 12px; color: #3A3A40; text-decoration: none; }
.notiffoot a:hover { color: #121214; text-decoration: underline; }
@media (max-width: 640px) { .notifbox { top: 52px; right: 10px; left: 10px; width: auto; } }

/* ---------------------------------------------------------- otsingupalett */
.palwrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 11vh 20px 20px; }
.palbackdrop { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(12, 12, 16, 0.26); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: default; }
.palbox { position: relative; width: 100%; max-width: 660px; max-height: 70vh; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #DEDEE4; border-radius: 14px; box-shadow: 0 24px 64px rgba(12, 12, 16, 0.22), 0 2px 6px rgba(12, 12, 16, 0.08); overflow: hidden; }
.palhead { display: flex; align-items: center; gap: 11px; padding: 0 16px; height: 54px; border-bottom: 1px solid #EFEFF2; flex-shrink: 0; }
.palinput { flex: 1 1 auto; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 17px; color: #121214; }
.palinput::placeholder { color: #A6A6AE; }
.palbody { overflow-y: auto; padding: 6px 0 8px; }
.palgrp { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px 4px; font-size: 10px; line-height: 15px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #9A9AA2; }
.palcount { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }
.palrow { display: flex; align-items: center; gap: 11px; padding: 7px 16px; text-decoration: none; color: inherit; }
.palrow:hover, .palrow.on { background: #F4F4F6; }
.palbadge { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.palmain { flex: 1 1 auto; min-width: 0; }
.paltitle { display: block; font-size: 13px; font-weight: 500; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palsub { display: block; font-size: 11px; line-height: 16px; color: #6E6E76; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palmeta { flex-shrink: 0; font-size: 11px; color: #9A9AA2; }
.palempty { padding: 26px 20px 30px; text-align: center; font-size: 13px; line-height: 20px; color: #6E6E76; }
.palfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-top: 1px solid #EFEFF2; background: #FAFAFA; font-size: 11px; color: #9A9AA2; flex-shrink: 0; }
@media (max-width: 640px) { .palwrap { padding: 6vh 12px 12px; } .palbox { max-height: 80vh; } .palinput { font-size: 16px; } }

/* ------------------------------------------------------------- teavitused */
.notifwrap { position: fixed; inset: 0; z-index: 85; }
.notifback { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }
.notifbox { position: absolute; top: 56px; right: 24px; width: 352px; max-width: calc(100vw - 28px); max-height: 70vh; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid #DEDEE4; border-radius: 12px; box-shadow: 0 18px 44px rgba(12, 12, 16, 0.18), 0 2px 5px rgba(12, 12, 16, 0.07); overflow: hidden; }
.notifhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #EFEFF2; }
.notifhead b { font-size: 14px; font-weight: 600; }
.notifhead button { padding: 0; border: 0; background: transparent; font-family: inherit; font-size: 12px; color: #6E6E76; cursor: pointer; }
.notifhead button:hover { color: #121214; }
.notiflist { overflow-y: auto; }
.notifrow { display: flex; gap: 10px; padding: 11px 15px; border-bottom: 1px solid #F4F4F6; text-decoration: none; color: inherit; }
.notifrow:hover { background: #F4F4F6; }
.notifdot { width: 7px; height: 7px; margin-top: 6px; flex-shrink: 0; border-radius: 999px; }
.notiftitle { display: block; font-size: 13px; line-height: 19px; }
.notifsub { display: block; font-size: 12px; line-height: 17px; color: #6E6E76; margin-top: 1px; }
.notiftime { display: block; font-size: 11px; color: #9A9AA2; margin-top: 3px; }
.notiffoot { padding: 10px 15px; border-top: 1px solid #EFEFF2; background: #FAFAFA; }
.notiffoot a { font-size: 12px; color: #3A3A40; text-decoration: none; }
@media (max-width: 640px) { .notifbox { top: 52px; right: 10px; left: 10px; width: auto; } }

/* ----------------------------------------------------------------- tabel */
.t { border-collapse: collapse; width: 100%; }
.t th, .t td { text-align: left; padding: 7px 12px; border-bottom: 1px solid #EFEFF2; font-size: 13px; line-height: 18px; vertical-align: middle; }
.t th { padding: 8px 12px; font-size: 9.5px; line-height: 15px; font-weight: 600; letter-spacing: 0.5px; color: #6E6E76; text-transform: uppercase; border-bottom: 1px solid #D8D8D8; white-space: nowrap; }
.t .num, .t th.num { text-align: right; white-space: nowrap; }
.t tbody tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------- pakkumise tabel */
.t.pak th, .t.pak td { padding: 5px 10px; font-size: 12px; line-height: 16px; }
.t.pak th { padding: 6px 10px; font-size: 9.5px; }
/* Nimi ja kirjeldus algavad samast joonest: haardepide istub vasakul veerisel,
 * mitte nime ees — muidu on nimi kirjeldusest paar pikslit paremal. */
.t.pak .name { position: relative; padding-left: 26px; }
.t.pak .name b { display: inline-block; padding: 0 4px; margin-left: -4px; font-weight: 600; border: 1px solid transparent; border-radius: 4px; }
.t.pak .name b[contenteditable]:hover { border-color: #E6E6EA; background: #FAFAFA; }
.t.pak .rowdesc { margin-top: 1px; margin-left: -4px; padding: 0 22px 0 4px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; line-height: 15px; min-height: 15px; color: #6E6E76; }
.t.pak .rowdesc:hover { border-color: #E6E6EA; background: #FAFAFA; color: #5A5A5A; }
.t.pak .name b[contenteditable]:focus, .t.pak .rowdesc[contenteditable]:focus,
.t.pak [contenteditable]:focus { outline: 2px solid #0A0A0A; outline-offset: 2px; border-radius: 4px; }
.t.pak .grip { position: absolute; left: 8px; top: 7px; color: #C9C9D0; cursor: grab; font-size: 11px; }
.t.pak .smmeta { display: none; }
.t.pak .rowact { position: absolute; right: 4px; top: 3px; display: flex; align-items: center; gap: 4px; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #FFFFFF 22%); padding-left: 18px; }
.t.pak .row:hover .rowact { background: linear-gradient(90deg, rgba(243,244,246,0) 0%, #F3F4F6 22%); }
.t.pak .rowact button { width: 22px; height: 22px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #E6E6EA; border-radius: 6px; background: #FFFFFF; font-family: inherit; font-size: 12px; line-height: 1; color: #6E6E76; cursor: pointer; }
.t.pak .rowact button:hover { border-color: #C9C9D0; color: #121214; }
.t.pak .rowact button.del:hover { border-color: #F0D2D2; background: #FBECEC; color: #A62B2B; }
.t.pak .intg { background: #F7F9FB; }
.t.pak .grp .intg { background: #EDF1F5; }
.t.pak .int1 { border-left: 10px solid #F4F4F6; }
.t.pak .pct { display: inline-block; margin-left: 9px; padding: 1px 5px; border-radius: 4px; background: #E2E9F0; color: #44596B; font-size: 10px; font-weight: 600; letter-spacing: 0.2px; vertical-align: 1px; }
.t.pak .band { padding: 0; background: #F4F4F6; border-bottom: 0; }
.t.pak .bandin { padding: 5px 9px; background: #EDF1F5; border-top-left-radius: 10px; border-bottom: 1px solid #D5DEE7; font-size: 10px; line-height: 15px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600; color: #5A6A7A; }
.t.pak .bandempty { padding: 0; height: 22px; background: #F4F4F6; border-bottom: 0; }
.t.pak .bandinl { padding: 5px 9px; background: #EBEBED; border-top-right-radius: 10px; border-bottom: 1px solid #D4D4D8; font-size: 10px; line-height: 15px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600; color: #5A5A60; }
.t.pak .grp td { padding: 7px 10px; background: #EBEBED; font-weight: 700; font-size: 12px; line-height: 18px; letter-spacing: 0.4px; text-transform: uppercase; color: #26262A; border-top: 1px solid #D4D4D8; }
.t.pak .grp td.num { font-size: 13px; letter-spacing: 0; }
.t.pak .addrow td { padding: 3px 10px 7px; border-bottom: 0; }
.t.pak .addbtn { padding: 3px 7px; border: 0; border-radius: 5px; background: transparent; font-family: inherit; font-size: 11px; color: #6E6E76; cursor: pointer; }
.t.pak .addbtn:hover { background: #F6F7F9; color: #121214; }
.t.pak .supsel { width: 100%; height: 24px; padding: 0 4px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-family: inherit; font-size: 11.5px; font-weight: 600; color: #334A5E; }
.t.pak .supsel:hover { border-color: #D5DEE7; background: #FFFFFF; }
.t.pak .note { display: block; margin-top: 1px; padding: 0 4px; border: 1px solid transparent; border-radius: 4px; font-size: 10.5px; line-height: 15px; min-height: 15px; color: #6E6E76; }
.t.pak .note:hover { border-color: #D5DEE7; background: #FFFFFF; }
.t.pak tfoot td { border-bottom: 0; padding-top: 7px; }
.t.pak tfoot tr:first-child td { border-top: 1px solid #D8D8DE; }
@media (max-width: 640px) {
  .t.pak .smmeta { display: block; font-size: 11px; color: #6E6E76; margin-top: 2px; font-variant-numeric: tabular-nums; }
  .t.pak .c-kogus, .t.pak .c-uhik, .t.pak .c-hind { display: none; }
}

/* ------------------------------------------------- kliendi jagatud vaade */
.t.pub th, .t.pub td { padding: 10px 14px; font-size: 13px; line-height: 19px; }
.t.pub .grp td { padding: 8px 14px; background: #F4F4F6; font-weight: 700; font-size: 11px; line-height: 17px; letter-spacing: 0.4px; text-transform: uppercase; color: #3A3A40; }
.t.pub .rowdesc { margin-top: 2px; font-size: 12px; line-height: 17px; color: #6E6E76; }
.t.pub .cnote { margin-top: 7px; padding: 8px 11px; border-left: 2px solid #D8D8DE; background: #FAFAFA; border-radius: 0 6px 6px 0; font-size: 12px; line-height: 18px; color: #3A3A40; }
.t.pub .cnote-mark { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #9A9AA2; margin-bottom: 2px; }
.t.pub .pubact { width: 110px; text-align: right; }
.t.pub .notebtn { opacity: 0; padding: 4px 9px; border: 1px solid #E6E6EA; border-radius: 7px; background: #FFFFFF; font-family: inherit; font-size: 11px; color: #3A3A40; cursor: pointer; transition: opacity var(--t); }
.t.pub .row:hover .notebtn, .t.pub .notebtn:focus { opacity: 1; }
.t.pub tfoot td { border-bottom: 0; }
.t.pub tfoot tr:first-child td { border-top: 1px solid #D8D8DE; }
/* ------------------------------------------------------------------ trükk
 * Pakkumine peab paberil ja PDF-is välja nägema nagu dokument, mitte nagu
 * veebileht, mis juhtus printerisse sattuma: päris A4 veerised, mustvalge
 * tekst, ilma varjude ja ümarnurkadeta, tabeli päis kordub igal leheküljel
 * ja ükski rida ei murdu kahe lehekülje vahelt pooleks.
 */
@page {
  size: A4;
  margin: 16mm 14mm 18mm;
}

@media print {
  html, body { background: #FFFFFF !important; }
  body.pubpage { padding: 0 !important; font-size: 10pt; line-height: 15pt; color: #000000; }
  body.pubpage > div { max-width: none !important; gap: 0 !important; }

  /* ekraani tarbeks mõeldu ei kuulu paberile */
  .noprint, .notebtn, .pubact, form, button { display: none !important; }

  /* kaart muutub lihtsalt leheküljeks */
  body.pubpage > div > div,
  body.pubpage section {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    overflow: visible !important;
  }
  body.pubpage > div > div > div[style*="padding: 32px"] { padding: 0 0 10mm !important; }
  body.pubpage h1 { font-size: 17pt; line-height: 22pt; }

  /* tabel: päis kordub, read ei murdu */
  .t.pub { min-width: 0 !important; width: 100% !important; font-size: 9.5pt; }
  .t.pub thead { display: table-header-group; }
  .t.pub tfoot { display: table-row-group; }
  .t.pub tr, .t.pub td, .t.pub th { break-inside: avoid; page-break-inside: avoid; }
  .t.pub tr.grp { break-after: avoid; page-break-after: avoid; background: #F2F2F4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .t.pub tfoot tr:last-child td { border-top: 1.2pt solid #000000; }

  /* lingid paberil ilma veebiaadressita — see on pakkumine, mitte väljatrükk */
  a { color: inherit !important; text-decoration: none !important; }
  a[href]::after { content: none !important; }

  /* jalus jääb viimase lehekülje lõppu, mitte keset tabelit */
  body.pubpage > div > p:last-child { margin-top: 8mm !important; break-inside: avoid; }
}
@media (max-width: 640px) { .t.pub .notebtn { opacity: 1; } }
.masonry section { break-inside: avoid; -webkit-column-break-inside: avoid; }
@media (max-width: 900px) { .masonry { column-width: auto !important; columns: 1 !important; } }
details > summary::-webkit-details-marker { display: none; }

/* --------------------------------------------------- Äriregistri valikukast */
.arbox {
  position: absolute;
  z-index: 40;
  margin-top: 6px;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 48px);
  background: #FFFFFF;
  border: 1px solid #E6E6EA;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(10, 10, 10, 0.12);
  overflow: hidden;
}
.arnote { margin: 0; padding: 12px 14px; font-size: 12px; line-height: 17px; color: #6E6E76; }
.arrow {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #EFEFF2;
  background: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.arrow:last-child { border-bottom: 0; }
.arrow:hover { background: #FAFAFA; }
.arrow b { display: block; font-size: 13px; font-weight: 500; }
.arrow span { display: block; font-size: 11px; color: #6E6E76; }

/* ------------------------------------------------------------------ kalender */
.calhead { display: grid; grid-template-columns: repeat(7, 1fr); background: #FAFAFA; border-bottom: 1px solid var(--line); }
.calhd { padding: 8px 10px; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calday { min-width: 0; min-height: 112px; padding: 7px 8px 9px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; }
.calday:nth-child(7n) { border-right: 0; }
.calday.out { background: #FBFBFC; }
.calday.out .caldnum { color: #C4C4CC; }
.calday.hasev { background: #FCFFF0; }
.caldnum { align-self: flex-start; font-size: 12px; font-weight: 500; color: var(--ink-2); line-height: 18px; }
.caldnum.today { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-weight: 600; }
.calitems { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calchip { max-width: 100%; display: flex; align-items: center; gap: 5px; padding: 2px 6px; border: 1px solid; border-radius: var(--r-sm); font-size: 11px; line-height: 16px; text-decoration: none; min-width: 0; }
.calchip b, .calchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }
.calchip b { font-weight: 600; }
.calchip:hover { filter: brightness(0.97); }
.calmore { font-size: 11px; color: var(--muted); text-decoration: none; padding: 0 6px; }
@media (max-width: 900px) {
  .calday { min-height: 78px; padding: 5px 5px 7px; }
  .calchip { font-size: 10px; padding: 1px 4px; }
}

/* tabelisisene sisendväli – malliread ja muud risttabelid */
.tinp { box-sizing: border-box; width: 100%; height: 28px; padding: 0 7px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; font-family: inherit; font-size: 12px; color: var(--ink); }
.tinp:hover { border-color: var(--line); background: #FFFFFF; }
.tinp:focus { border-color: #B4B4BC; background: #FFFFFF; outline: none; box-shadow: 0 0 0 3px rgba(18, 18, 20, 0.06); }
.tinp.num { text-align: right; font-variant-numeric: tabular-nums; }
select.tinp { border-color: var(--line); background: #FFFFFF; }

/* ----------------------------------------------- väikesed tegevusnupud reas */
.iconbtn {
  width: 26px; height: 26px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--faint);
  font-family: inherit; font-size: 15px; line-height: 1; text-decoration: none;
  cursor: pointer;
}
.iconbtn:hover { border-color: var(--line); background: #FFFFFF; color: var(--ink-2); }
.iconbtn.danger:hover { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.rowacts { display: inline-flex; align-items: center; gap: 2px; }

/* salvestamise märguanne */
.saved {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(8px);
  z-index: 80; display: flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  background: #121214; color: #FFFFFF; font-size: 13px;
  box-shadow: 0 6px 22px rgba(16, 16, 20, 0.22);
  opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t);
}
.saved.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.saved .dot { background: #D9FF2E; }
.saved.bad { background: #A62B2B; }
.saved.bad .dot { background: #FFFFFF; }

/* tühi kuluväli ütleb, kuhu klikkida */
.costcell:empty::before { content: attr(data-ph); color: #B4B4BC; font-weight: 400; }
.costcell:focus:empty::before { content: ''; }
tr.grp td:first-child { position: relative; }
tr.grp .rowacts { margin-left: 8px; vertical-align: middle; }

/* ridade lohistamine pakkumises */
tr[data-line] { cursor: default; }
tr[data-line].dragging { opacity: 0.35; }
tr[data-line].dropabove td { box-shadow: inset 0 2px 0 0 var(--brand); }
tr[data-line].dropbelow td, tr.grp.dropbelow td { box-shadow: inset 0 -2px 0 0 var(--brand); }
.grip { cursor: grab; }
.grip:active { cursor: grabbing; }

/* projektitahvli lohistamine: kaart ühest etapist teise */
.bcard { cursor: grab; }
.bcard:active { cursor: grabbing; }
.bcard.dragging { opacity: 0.35; }
.bcol { transition: outline-color 0.12s ease; outline: 2px dashed transparent; outline-offset: -2px; border-radius: 10px; }
.bcol.dropin { outline-color: var(--brand); }

/* ------------------------------------------------- kiirlisamise aken */
dialog.qadd { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-pop); color: var(--ink); font-family: inherit; }
dialog.qadd::backdrop { background: rgba(16, 16, 20, 0.35); }
dialog.qadd form { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
dialog.qadd h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.3px; }
.qhint { margin: -6px 0 0; font-size: 12px; line-height: 17px; color: var(--muted); }
.qrow { display: flex; gap: 8px; }
.qrow input { flex: 1 1 auto; min-width: 0; }
dialog.qadd input { box-sizing: border-box; width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r); background: #FFFFFF; font-family: inherit; font-size: 13px; }
.qlookup, .qcancel, .qsave { height: 36px; padding: 0 14px; border-radius: var(--r); font-family: inherit; font-size: 13px; cursor: pointer; }
.qlookup, .qcancel { border: 1px solid var(--line); background: #FFFFFF; color: var(--ink-2); }
.qsave { border: 1px solid var(--brand); background: var(--brand); color: #FFFFFF; font-weight: 500; }
.qresults { max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); font-size: 12px; color: var(--muted); }
.qresults:not(:empty) { padding: 0; }
.qhit { display: block; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line-2); background: #FFFFFF; font-family: inherit; text-align: left; cursor: pointer; }
.qhit:last-child { border-bottom: 0; }
.qhit:hover { background: var(--surface-2); }
.qhit b { display: block; font-size: 13px; font-weight: 500; }
.qhit i { font-style: normal; color: var(--bad); }
.qhit span { display: block; font-size: 11px; color: var(--muted); }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.qgrid label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qgrid label.wide { grid-column: span 2; }
.qgrid span { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-2); }
.qbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line-2); margin-top: 2px; }
.qerr { margin-right: auto; font-size: 12px; color: var(--bad); }
@media (max-width: 520px) { .qgrid { grid-template-columns: 1fr; } .qgrid label.wide { grid-column: span 1; } }

/* to-do: muudetavad pealkirjad */
.tedit, .cedit { padding: 1px 5px; margin-left: -5px; border: 1px solid transparent; border-radius: var(--r-xs); }
.tedit:hover, .cedit:hover { border-color: var(--line); background: #FFFFFF; }
.tedit:focus, .cedit:focus { outline: 2px solid var(--brand); outline-offset: 1px; background: #FFFFFF; }
.fedit { padding: 1px 5px; margin-left: -5px; border: 1px solid transparent; border-radius: var(--r-xs); }
.fedit:hover { border-color: var(--line); background: #FFFFFF; }
.fedit:focus { outline: 2px solid var(--brand); outline-offset: 1px; background: #FFFFFF; }

/* ------------------------------------------------------- faili üleslaadimine
 * Brauseri enda „Choose File / No file chosen" on igas süsteemis isemoodi ja
 * alati võõras. Peidame selle ära ja näitame sildi, mis räägib eesti keeles ja
 * näeb välja nagu ülejäänud HUB. Nupp teeb täpselt sedasama, mis enne. */
.updrop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 9px; transition: border-color 0.12s ease, background 0.12s ease; }
.updrop.over { border-color: var(--brand); background: var(--surface-2); }
.upfile { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.upfile input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upbtn { flex-shrink: 0; height: 32px; display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: #FFFFFF; font-size: 12px; color: var(--ink-2); }
.upfile:hover .upbtn { border-color: var(--ink-2); }
.upname { min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upname.chosen { color: var(--ink); font-weight: 500; }
.upnote { flex: 1 1 160px; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 12px; }
.upgo { height: 32px; padding: 0 13px; background: var(--brand); color: #FFFFFF; border: 1px solid var(--brand); border-radius: 7px; font-family: inherit; font-size: 12px; cursor: pointer; }

/* kalender: päevale lisamine ja ajatelje read */
.calday { position: relative; }
.caladd {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-xs);
  background: #FFFFFF; color: var(--muted); font-family: inherit; font-size: 13px; line-height: 1;
  opacity: 0; transition: opacity var(--t); cursor: pointer;
}
.calday:hover .caladd, .caladd:focus-visible { opacity: 1; }
.caladd:hover { border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.agitem { display: flex; align-items: flex-start; gap: 9px; text-decoration: none; color: inherit; }
.agtext { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.agtitle { font-size: 13px; line-height: 18px; }
.agmeta { font-size: 11px; line-height: 15px; color: var(--faint); }
.agwho { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 999px; background: #EBEBEF; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; }
.calnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.calnav .btns { display: flex; align-items: center; gap: 6px; }
.calnav a { height: 30px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r); background: #FFFFFF; font-size: 12px; color: var(--ink-2); text-decoration: none; }
.calnav a:hover { border-color: var(--line-strong); }
.calnav b { font-size: 14px; font-weight: 600; }

/* projekti meeskonna valik */
.pchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: #FFFFFF; font-size: 12px; cursor: pointer; user-select: none; }
.pchip:hover { border-color: var(--line-strong); }
.pchip.on, .pchip:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.pchip input { position: absolute; opacity: 0; width: 0; height: 0; }
.pchip .av { width: 20px; height: 20px; border-radius: 999px; background: #EBEBEF; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }

/* ------------------------------------------------------- päise rippmenüüd */
.menuwrap { position: relative; display: inline-flex; }
.newbtn { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; background: var(--brand); color: #FFFFFF; border: 1px solid var(--brand); border-radius: var(--r); font-family: inherit; font-size: 13px; font-weight: 500; }
.avbtn { width: 32px; height: 32px; border: 0; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-family: inherit; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.menupop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px;
  padding: 5px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-pop);
  display: flex; flex-direction: column;
}
.menupop.right { left: auto; right: 0; }
.menupop a { padding: 8px 11px; border-radius: var(--r-sm); font-size: 13px; color: var(--ink); text-decoration: none; }
.menupop a:hover { background: var(--surface-3); }
.menupop a.danger { color: var(--bad); }
.menupop a.danger:hover { background: var(--bad-bg); }
.menuhead { padding: 8px 11px 9px; margin-bottom: 3px; border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 500; display: flex; flex-direction: column; gap: 1px; }
.menuhead i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); }
tr.clickrow { cursor: pointer; }

/* ------------------------------------------------- andmeplokk kliendikaardil */
.facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: 11px 24px; }
.facts > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.facts dt { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 13px; line-height: 19px; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }
