/* SmartAccountsi stiilis tööriistariba */
.erp-toolbar { margin-bottom: 1.5rem; border-radius: .75rem; overflow: hidden;
  background: linear-gradient(135deg, #3d7fa6 0%, #5b9cc0 100%); color: #fff;
  box-shadow: 0 4px 14px rgba(30, 70, 100, .18); }
.erp-toolbar-head { display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.erp-toolbar-head > div:first-child { padding: 1rem 1.25rem; align-self: center; }
.erp-toolbar-title { font-size: 1.45rem; font-weight: 600; letter-spacing: .2px; line-height: 1.2; }
.erp-toolbar-sub { font-size: .85rem; opacity: .9; margin-top: .25rem; }
.erp-toolbar-buttons { display: flex; flex-wrap: wrap; align-items: stretch; }
.erp-toolbar-buttons form { display: flex; margin: 0; }
.erp-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  min-width: 92px; padding: .7rem .8rem; border: 0; color: #fff !important; font-size: .78rem; font-weight: 500;
  text-decoration: none !important; cursor: pointer; transition: filter .15s, transform .15s; line-height: 1.15;
  text-align: center; }
.erp-tile:hover { filter: brightness(1.08); }
.erp-tile:active { transform: translateY(1px); }
.erp-tile .material-symbols-outlined { font-size: 26px; }
.erp-blue { background: #4a90c9; } .erp-green { background: #3f9e7a; } .erp-orange { background: #f0a030; }
.erp-red { background: #e27045; } .erp-teal { background: #3fb3b0; } .erp-purple { background: #7b6cc4; }
.erp-lime { background: #8ab04a; } .erp-gray { background: #7c8c99; }
.erp-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: rgba(255,255,255,.22); margin-left: .5rem; vertical-align: middle; }
/* olekumärgid loendites */
.erp-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.erp-pill-draft { background: #fdf0d5; color: #9a6400; } .erp-pill-ok { background: #dcf3e6; color: #1d7a45; }
.erp-pill-info { background: #ddebf7; color: #2a6496; } .erp-pill-bad { background: #fde2dc; color: #a33a1c; }
.erp-pill-gray { background: #eceff1; color: #546e7a; }
/* Avaleht */
.erp-dash-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.erp-quick { display: flex; flex-wrap: wrap; gap: 0; border-radius: .75rem; overflow: hidden; width: fit-content;
  box-shadow: 0 4px 14px rgba(30,70,100,.15); margin-bottom: 1.5rem; }
.erp-quick .erp-tile { min-width: 120px; padding: 1rem; }
.erp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.erp-card { display: flex; gap: .9rem; align-items: center; padding: 1rem; border-radius: .75rem;
  border: 1px solid rgba(120,140,160,.25); background: var(--color-base-50, #fff); text-decoration: none !important;
  color: inherit !important; transition: box-shadow .15s, transform .15s; }
.dark .erp-card { background: rgba(255,255,255,.03); }
.erp-card:hover { box-shadow: 0 6px 18px rgba(30,70,100,.15); transform: translateY(-1px); }
.erp-card-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; color: #fff; flex: none; }
.erp-card-label { display: block; font-size: .8rem; opacity: .7; }
.erp-card-value { display: block; font-size: 1.35rem; font-weight: 600; }
.erp-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; }
.erp-list { border: 1px solid rgba(120,140,160,.25); border-radius: .75rem; overflow: hidden; }
.erp-list-head { display: flex; justify-content: space-between; padding: .75rem 1rem; font-weight: 600;
  background: rgba(74,144,201,.08); }
.erp-list-row { display: grid; grid-template-columns: 9rem 1fr auto; gap: .75rem; padding: .55rem 1rem;
  border-top: 1px solid rgba(120,140,160,.15); text-decoration: none !important; color: inherit !important; }
.erp-list-row:hover { background: rgba(74,144,201,.06); }
.erp-list-row em { font-style: normal; opacity: .75; white-space: nowrap; }
.erp-list-empty { padding: 1rem; opacity: .6; }
/* Loendid: nimeveerg laiem, et tekst ei murduks */
#result_list td.field-name, #result_list th.column-name { min-width: 22rem; }
#result_list td.field-stock_display { font-weight: 600; }
/* Üldotsing päises */
#erp-gsearch { position: relative; display: flex; align-items: center; gap: .4rem; width: 26rem; max-width: 40vw;
  padding: .3rem .6rem; border-radius: .6rem; border: 1px solid rgba(120,140,160,.4); background: rgba(74,144,201,.06); }
#erp-gsearch .material-symbols-outlined { font-size: 20px; opacity: .7; }
#erp-gq { flex: 1; border: 0; outline: none; background: transparent; color: inherit; font-size: .9rem; padding: .25rem 0; }
.erp-gkbd { font-size: .7rem; padding: 0 .35rem; border-radius: .3rem; border: 1px solid rgba(120,140,160,.5); opacity: .7; }
#erp-gresults { position: absolute; right: 0; top: calc(100% + 6px); width: 34rem; max-width: 90vw; max-height: 70vh;
  overflow: auto; z-index: 100; border-radius: .7rem; background: #fff; color: #1f2937;
  box-shadow: 0 16px 40px rgba(0,0,0,.22); border: 1px solid rgba(120,140,160,.3); }
.dark #erp-gresults { background: #1f2937; color: #e5e7eb; }
.erp-gtitle { display: flex; align-items: center; gap: .35rem; padding: .5rem .8rem .25rem; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .4px; opacity: .6; }
.erp-gtitle .material-symbols-outlined { font-size: 16px !important; }
#erp-gresults a { display: block; padding: .45rem .9rem; text-decoration: none; color: inherit; }
#erp-gresults a small { display: block; opacity: .65; font-size: .78rem; }
#erp-gresults a:hover, #erp-gresults a.sel { background: rgba(74,144,201,.12); }
#erp-gresults a.erp-gall { border-top: 1px solid rgba(120,140,160,.25); color: #2a6496; font-weight: 600; text-align: right; }
.erp-gempty { padding: .9rem; opacity: .7; }
/* otsingulehe tulemused */
.erp-sgroup { margin-bottom: 1.5rem; border: 1px solid rgba(120,140,160,.25); border-radius: .75rem; overflow: hidden; }
.erp-sgroup h2 { display: flex; align-items: center; gap: .4rem; margin: 0; padding: .7rem 1rem; font-weight: 600;
  background: rgba(74,144,201,.08); }
.erp-sgroup a { display: block; padding: .55rem 1rem; border-top: 1px solid rgba(120,140,160,.15); text-decoration: none; color: inherit; }
.erp-sgroup a:hover { background: rgba(74,144,201,.07); }
.erp-sgroup small { display: block; opacity: .65; }
td.field-link a { color: #2a6496; font-weight: 600; text-decoration: underline; }
.dark td.field-link a { color: #9cc6e8; }
/* --- Müügiülevaade (graafikud) --- */
.erp-viz { --s1: #2a78d6; --s3: #1baf7a; --prev: #c9c8c2; --grid: rgba(120,140,160,.18);
  --ink2: #52514e; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dark .erp-viz { --s1: #3987e5; --s3: #199e70; --prev: #4a4944; --ink2: #c3c2b7; }
@media (max-width: 1200px) { .erp-viz { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .erp-viz { grid-template-columns: 1fr; } }
.erp-viz-card { border: 1px solid rgba(120,140,160,.22); border-radius: .75rem; padding: 1rem 1.1rem; min-width: 0; }
.dark .erp-viz-card { background: rgba(255,255,255,.02); }
.erp-viz-wide { grid-column: span 3; }
@media (max-width: 1200px) { .erp-viz-wide { grid-column: span 2; } }
@media (max-width: 760px) { .erp-viz-wide { grid-column: span 1; } }
.erp-viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.erp-viz-head h2 { font-size: 1rem; font-weight: 600; margin: 0; }
.erp-viz-head p { font-size: .8rem; color: var(--ink2); margin: .15rem 0 0; }
.erp-legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--ink2); }
.erp-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.erp-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.s1, .bar.s1 { background: var(--s1); } .bar.s3 { background: var(--s3); } .sw.prev, .bar.prev { background: var(--prev); }
.erp-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 220px; align-items: end;
  border-bottom: 1px solid var(--grid); background: repeating-linear-gradient(to top, transparent 0, transparent 54px, var(--grid) 54px, var(--grid) 55px); }
.erp-cols.small { height: 150px; background: none; }
.erp-col { display: flex; flex-direction: column; height: 100%; cursor: default; }
.erp-col:hover .bar { filter: brightness(1.08); }
.erp-col:hover { background: rgba(120,140,160,.07); border-radius: 4px 4px 0 0; }
.erp-col-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 12%; }
.erp-col-bars .bar { flex: 1; max-width: 26px; border-radius: 4px 4px 0 0; min-height: 0; }
.erp-col-bars .bar.prev { max-width: 14px; }
.erp-col-label { text-align: center; font-size: .72rem; color: var(--ink2); padding-top: .35rem; transform: translateY(1.3rem); height: 0; }
.erp-cols { margin-bottom: 1.6rem; }
.erp-hbar { display: grid; grid-template-columns: minmax(0, 42%) 1fr auto; gap: .6rem; align-items: center;
  padding: .32rem .2rem; font-size: .83rem; border-radius: .35rem; color: inherit; }
a.erp-hbar:hover { background: rgba(120,140,160,.08); }
.erp-hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erp-hbar .track { height: 10px; }
.erp-hbar .bar { display: block; height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; }
.erp-hbar .val { color: var(--ink2); font-variant-numeric: tabular-nums; min-width: 3.5rem; text-align: right; }
.erp-viz-empty { font-size: .85rem; opacity: .65; }
#erp-tip { position: fixed; z-index: 1000; pointer-events: none; padding: .45rem .65rem; border-radius: .5rem;
  background: #1f2937; color: #f3f4f6; font-size: .8rem; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
#erp-tip span { opacity: .75; }
/* Toodete liitmine */
.erp-merge h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: .5rem; }
.erp-merge .erp-sug-help { font-size: .88rem; opacity: .85; margin-bottom: 1rem; max-width: 62rem; }
.erp-mtable { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .6rem 0; }
.erp-mtable th { text-align: left; font-size: .75rem; text-transform: uppercase; opacity: .7; padding: .5rem .4rem;
  border-bottom: 1px solid rgba(120,140,160,.35); }
.erp-mtable td { padding: .4rem; border-bottom: 1px solid rgba(120,140,160,.15); vertical-align: middle; }
.erp-mtable .n { text-align: right; } .erp-mtable .small { font-size: .82rem; opacity: .8; }
.erp-mtable tr.good td { background: rgba(27,175,122,.07); }
.erp-mtable input.tgt, .erp-mbar input { border: 1px solid rgba(120,140,160,.45); border-radius: .4rem;
  padding: .35rem .5rem; background: transparent; width: 9rem; }
.erp-mbar { display: flex; gap: 1rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: .8rem 0; }
.erp-mbar a { margin-left: .6rem; }
.erp-btn { min-height: auto !important; padding: .55rem 1.1rem !important; border-radius: .5rem !important;
  flex-direction: row !important; gap: .4rem; }
.erp-dash-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.erp-dash-top .erp-dash-title { margin-bottom: 0; }
.erp-sync { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; padding: .35rem .7rem;
  border-radius: 999px; border: 1px solid rgba(120,140,160,.3); color: inherit; opacity: .85; }
.erp-sync .material-symbols-outlined { font-size: 18px; }
.erp-sync.ok .material-symbols-outlined { color: #1d7a45; }
.erp-sync.err { border-color: rgba(192,57,43,.5); color: #c0392b; opacity: 1; }
.erp-testmode { display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-radius: .7rem;
  background: #fff4e0; color: #8a4b00; margin-bottom: 1rem; font-size: .9rem; }
.dark .erp-testmode { background: rgba(230,126,34,.18); color: #f5c58a; }
/* Nimekirja otsingu soovitused */
.erp-ls { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; min-width: 100%; width: 34rem; max-width: 90vw;
  max-height: 420px; overflow: auto; border-radius: .6rem; background: #fff; color: #1f2937;
  box-shadow: 0 12px 30px rgba(0,0,0,.2); border: 1px solid rgba(120,140,160,.3); }
.dark .erp-ls { background: #1f2937; color: #e5e7eb; }
.erp-ls a { display: block; padding: .5rem .8rem; border-bottom: 1px solid rgba(120,140,160,.15); color: inherit; }
.erp-ls a:hover, .erp-ls a.sel { background: rgba(74,144,201,.13); }
.erp-ls a strong { display: block; font-weight: 600; font-size: .9rem; }
.erp-ls a small { display: block; opacity: .7; font-size: .78rem; }
.erp-ls-empty { padding: .7rem .9rem; opacity: .7; font-size: .85rem; }
.erp-margin { border-collapse: collapse; font-size: .88rem; }
.erp-margin th { font-size: .72rem; text-transform: uppercase; opacity: .65; text-align: left; padding: .15rem .9rem .3rem 0; }
.erp-margin td { padding: .25rem .9rem .25rem 0; }
/* Terve rida avab kirje */
#result_list tbody tr.erp-rowlink { cursor: pointer; }
#result_list tbody tr.erp-rowlink:hover td { background: rgba(74,144,201,.07); }

/* Kiirfilter dokumentide nimekirjade kohal (SmartAccountsi stiilis) */
.erp-qf { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 1rem; padding: .7rem .8rem;
  border: 1px solid #dbe5ec; border-radius: .6rem; background: #f6f9fb; }
.erp-qf.active { border-color: #9cc3dd; background: #eef6fb; }
.erp-qf input[type=text], .erp-qf input[type=date], .erp-qf select { height: 2.25rem; padding: 0 .6rem;
  border: 1px solid #cfd8df; border-radius: .4rem; background: #fff; font-size: .85rem; color: inherit; min-width: 0; }
.erp-qf input:focus, .erp-qf select:focus { outline: 2px solid #8bbbe0; outline-offset: -1px; border-color: #6aa5d2; }
.erp-qf input[type=text]:not(:placeholder-shown), .erp-qf select.set { border-color: #4a90c9; background: #f3f9fe; }
.erp-qf .w-partner { width: 11rem; } .erp-qf .w-num { width: 7rem; } .erp-qf .w-obj { width: 7.5rem; }
.erp-qf .w-line { width: 8rem; } .erp-qf .w-state { width: 8.5rem; } .erp-qf .w-df { width: 7.8rem; }
.erp-qf .w-author { width: 7rem; }
.erp-qf input[type=date] { width: 8.8rem; }
.erp-qf-dates { position: relative; display: inline-flex; align-items: center; gap: .3rem; }
.erp-qf-dates .dash { color: #7c8c99; }
.erp-qf-cal, .erp-qf-reset { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: .4rem; border: 1px solid transparent; background: none; color: #4b6475; cursor: pointer; }
.erp-qf-cal:hover, .erp-qf-reset:hover { background: #e3edf4; color: #2a6496; }
.erp-qf-menu { position: absolute; top: 2.6rem; left: 0; z-index: 60; min-width: 13rem; background: #fff;
  border: 1px solid #cfd8df; border-radius: .4rem; box-shadow: 0 8px 22px rgba(30, 60, 90, .18); padding-bottom: .3rem;
  font-size: .85rem; }
.erp-qf-menu .h { background: #6fa1bd; color: #fff; padding: .45rem .75rem; font-weight: 600; border-radius: .4rem .4rem 0 0; }
.erp-qf-menu a { display: block; padding: .3rem .75rem; color: #2a6496 !important; cursor: pointer; text-decoration: none; }
.erp-qf-menu a:hover { background: #eef6fb; }
.erp-qf-menu hr { margin: .25rem 0; border: 0; border-top: 1px solid #e3e9ee; }
.erp-qf-go { height: 2.25rem; padding: 0 1.2rem; border: 0; border-radius: .4rem; background: #4a90c9; color: #fff;
  font-weight: 600; font-size: .8rem; letter-spacing: .4px; text-transform: uppercase; cursor: pointer; }
.erp-qf-go:hover { background: #3d7fb3; }
@media (max-width: 700px) { .erp-qf > * { flex: 1 1 45%; } .erp-qf .erp-qf-dates { flex-basis: 100%; } }
.dark .erp-qf { background: rgba(255,255,255,.03); border-color: #334155; }
.dark .erp-qf input, .dark .erp-qf select, .dark .erp-qf-menu { background: #1e293b; border-color: #475569; }
.erp-mirror { display: flex; gap: .7rem; align-items: flex-start; margin: 0 0 1rem; padding: .7rem .9rem; border-radius: .6rem;
  background: #eef6fb; border: 1px solid #c9e0ef; color: #24506e; font-size: .85rem; line-height: 1.45; }
.erp-mirror.off { background: #f4f5f6; border-color: #dde1e4; color: #546e7a; }
.erp-mirror a { text-decoration: underline; }
.dark .erp-mirror { background: rgba(74,144,201,.12); border-color: #335; color: #cfe3f2; }

/* Ostuarvete sisselugemine */
.erp-muted { color: #7c8c99; font-size: .8rem; }
.erp-late { color: #c0392b; font-weight: 600; }
.erp-ck-err { color: #c0392b; } .erp-ck-warn { color: #c47f00; } .erp-ck-info { color: #2a6496; } .erp-ck-ok { color: #1d7a45; }
#result_list .material-symbols-outlined.erp-ck-err, #result_list .material-symbols-outlined.erp-ck-warn,
#result_list .material-symbols-outlined.erp-ck-info { font-size: 15px; vertical-align: -3px; }
.erp-scan-top { margin-bottom: 1rem; }
.erp-scan-steps { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: #667085; margin-bottom: .8rem; }
.erp-scan-steps span { background: #fff; border: 1px solid #e4e7ec; border-radius: 999px; padding: .2rem .75rem; }
.erp-scan-steps b { color: #0f766e; }
.erp-scan-drop { display: block; border: 2px dashed #c9cfd8; border-radius: 1rem; padding: 1.5rem 1rem; text-align: center;
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: .8rem; }
.erp-scan-drop .material-symbols-outlined { font-size: 36px; color: #0f766e; }
.erp-scan-drop .t { font-weight: 600; margin-top: .2rem; } .erp-scan-drop .s { font-size: .8rem; color: #7c8c99; }
.erp-scan-drop.drag, .erp-scan-drop.busy { border-color: #0f766e; background: #ecfdf5; }
.erp-scan-kpi { display: flex; flex-wrap: wrap; gap: .5rem; }
.erp-scan-kpi > div, .erp-scan-kpi > a { display: block; color: inherit !important; text-decoration: none !important; background: #fff; border: 1px solid #e4e7ec; border-radius: .75rem; padding: .45rem 1rem; min-width: 7rem; }
.erp-scan-kpi small { display: block; font-size: .75rem; color: #667085; } .erp-scan-kpi b { font-size: 1.25rem; }
.erp-scan-kpi .ok small { color: #1d7a45; } .erp-scan-kpi .warn small { color: #9a6700; } .erp-scan-kpi .err small { color: #c0392b; }
.erp-scan-kpi .run { border-color: #9cc3dd; background: #eef6fb; }
.erp-scan-kpi > a:hover { border-color: #9cc3dd; }
.erp-scan-kpi > a.on { border-color: #4a90c9; box-shadow: inset 0 -3px 0 #4a90c9; }
.erp-scan-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.erp-scan-head .nm { font-size: 1.1rem; } .erp-scan-head .sp { flex: 1; } .erp-scan-head form { margin: 0; }
.erp-scan-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: #ddebf7; color: #2a6496; }
.erp-scan-badge.success { background: #dcf3e6; color: #1d7a45; } .erp-scan-badge.warning { background: #fdf0d5; color: #9a6400; }
.erp-scan-badge.danger { background: #fde2dc; color: #a33a1c; } .erp-scan-badge.gray { background: #eceff1; color: #546e7a; }
.erp-scan-btn { display: inline-flex; align-items: center; gap: .35rem; height: 2.25rem; padding: 0 .9rem; border-radius: .45rem;
  border: 1px solid #4a90c9; background: #4a90c9; color: #fff !important; font-size: .85rem; font-weight: 600; cursor: pointer; }
.erp-scan-btn .material-symbols-outlined { font-size: 18px; }
.erp-scan-btn.green { background: #3f9e7a; border-color: #3f9e7a; }
.erp-scan-btn.ghost { background: #fff; color: #2a6496 !important; border-color: #cfd8df; }
.erp-scan-btn.sm { height: 1.9rem; font-size: .8rem; margin: .4rem 0; }
.erp-scan-btn:disabled { opacity: .45; cursor: not-allowed; }
.erp-scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(24rem, 34rem); gap: 1rem; }
.erp-scan-grid > .erp-scan-pdf { order: 2; } .erp-scan-grid > .erp-scan-main { order: 1; }
.erp-scan-grid.nopdf { grid-template-columns: minmax(0, 1fr) !important; } .erp-scan-grid.nopdf > .erp-scan-pdf { display: none; }
/* kirjeldus: fookuses laieneb, et kogu tekst oleks näha */
.erp-scan-lines td:nth-child(2) { position: relative; }
.erp-scan-lines .w-desc:focus { position: absolute; left: 2px; top: 2px; width: min(38rem, 70vw); z-index: 5;
  box-shadow: 0 6px 18px rgba(30,60,90,.18); }
@media (max-width: 1800px) { .erp-scan-grid { grid-template-columns: 1fr; } .erp-scan-grid > .erp-scan-pdf { order: 0; }
  .erp-scan-pdf iframe { height: 60vh; position: static; } }
.erp-scan-pdf iframe { width: 100%; height: 80vh; border: 1px solid #e4e7ec; border-radius: .75rem; background: #fff;
  position: sticky; top: 1rem; }
.erp-scan-card { background: #fff; border: 1px solid #e4e7ec; border-radius: .75rem; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.erp-scan-card h3 { font-weight: 600; margin: .4rem 0 .5rem; }
.erp-scan-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.erp-scan-checks { list-style: none; margin: 0; padding: 0; }
.erp-scan-checks li { display: flex; gap: .5rem; padding: .15rem 0; font-size: .875rem; }
.erp-scan-checks li.ok { color: #667085; } .erp-scan-checks .material-symbols-outlined { font-size: 18px; }
.erp-scan-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.erp-scan-row label { display: flex; flex-direction: column; } .erp-scan-row small { color: #7c8c99; font-size: .72rem; }
.erp-scan-row .w2 { grid-column: span 2; } .erp-scan-row .w3 { grid-column: span 3; } .erp-scan-row .w4 { grid-column: span 4; }
.erp-scan-row .w5 { grid-column: span 5; } .erp-scan-row .w6 { grid-column: span 6; }
.erp-scan-row .chk { flex-direction: row; align-items: center; gap: .4rem; font-size: .85rem; padding-top: 1rem; }
@media (max-width: 800px) { .erp-scan-row > * { grid-column: span 12 !important; } }
.erp-scan input:not([type=checkbox]), .erp-scan select { height: 2rem; padding: 0 .45rem; border: 1px solid #cfd8df; border-radius: .35rem;
  font-size: .82rem; background: #fff; color: inherit; width: 100%; min-width: 0; }
.erp-scan fieldset:disabled input, .erp-scan fieldset:disabled select { background: #f6f8fa; }
.erp-scan input.n { text-align: right; }
.erp-scan-tablewrap { overflow-x: auto; }
.erp-scan-lines { width: 100%; min-width: 940px; border-collapse: collapse; font-size: .8rem; }
.erp-scan-lines td:nth-child(1) { width: 5.5rem; } .erp-scan-lines td:nth-child(3), .erp-scan-lines td:nth-child(5),
.erp-scan-lines td:nth-child(7) { width: 4.8rem; } .erp-scan-lines td:nth-child(4) { width: 4.6rem; }
.erp-scan-lines td:nth-child(6), .erp-scan-lines td:nth-child(8) { width: 3.6rem; }
.erp-scan-lines td:nth-child(9) { width: 6.5rem; } .erp-scan-lines td:nth-child(10) { width: 9.5rem; }
.erp-scan-lines td:nth-child(11) { width: 3.6rem; } .erp-scan-lines td:nth-child(12) { width: 1.8rem; }
.erp-scan-lines td .erp-hint { max-width: 13rem; color: #1d6a8c; }
.erp-scan-lines th { text-align: left; font-weight: 500; color: #7c8c99; padding: .2rem; white-space: nowrap; }
.erp-scan-lines td { padding: 2px; vertical-align: top; }
.erp-scan-lines .w-code { min-width: 5rem; } .erp-scan-lines .w-desc { min-width: 12rem; } .erp-scan-lines .w-unit { width: 4.4rem; }
.erp-scan-lines input.n { min-width: 3.6rem; } .erp-scan-lines input.s { min-width: 3.4rem; width: 3.4rem; }
.erp-scan-lines .w-sku { min-width: 6rem; } .erp-scan-lines select.erp-kind { min-width: 5.5rem; }
.erp-scan-lines th.erp, .erp-scan-lines td.erp { background: #f3f8fc; }
.erp-scan-lines td .nm { max-width: 11rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; }
.erp-scan-lines tr.nomatch td.erp { background: #fff3e0; } .erp-scan-lines tr.nomatch .erp-sku { border-color: #f0a030; }
.erp-scan-lines td.c { text-align: center; padding-top: .45rem; }
.erp-scan-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.erp-scan .small { font-size: .75rem; }
.erp-scan-errbox { border-color: #f2b8a8 !important; background: #fff1ed !important; color: #a33a1c !important; }
.dark .erp-scan-card, .dark .erp-scan-drop, .dark .erp-scan-kpi > div, .dark .erp-scan-steps span { background: #1e293b; border-color: #334155; }
.dark .erp-scan input, .dark .erp-scan select { background: #0f172a; border-color: #475569; }
.dark .erp-scan-lines th.erp, .dark .erp-scan-lines td.erp { background: rgba(74,144,201,.1); }

/* PDF veerg nimekirjades */
.erp-pdf-th { font-size: 18px; vertical-align: middle; color: #7c8c99; }
.erp-pdf-link { display: inline-flex; padding: 2px; border-radius: 6px; color: #c0392b !important; }
.erp-pdf-link + .erp-pdf-link { color: #1d7a45 !important; margin-left: 2px; }
.erp-pdf-link:hover { background: #fde2dc; }
.erp-pdf-link .material-symbols-outlined { font-size: 20px; }

/* E-kirja saatmise hüpikaken */
dialog.erp-modal { border: 0; padding: 0; border-radius: .9rem; width: min(52rem, 94vw); max-height: 92vh;
  box-shadow: 0 24px 60px rgba(20, 40, 60, .35); background: #fff; color: inherit; }
dialog.erp-modal::backdrop { background: rgba(20, 35, 50, .45); }
.erp-modal-load { padding: 2rem; text-align: center; color: #667085; }
.erp-mail-head { display: flex; align-items: stretch; background: linear-gradient(135deg, #3d7fa6 0%, #5b9cc0 100%); color: #fff; }
.erp-mail-head .t { flex: 1; padding: 1rem 1.25rem; font-size: 1.35rem; font-weight: 600; align-self: center; }
.erp-mail-head .erp-tile { border-radius: 0; }
.erp-mail-x { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 3rem; cursor: pointer; }
.erp-mail-x:hover { background: rgba(255,255,255,.28); }
.erp-mail-body { padding: .8rem 1.25rem 1rem; overflow-y: auto; max-height: calc(92vh - 5rem); }
.erp-mail .row { display: grid; grid-template-columns: 9.5rem 1fr; gap: .75rem; align-items: start; padding: .45rem 0; }
.erp-mail .row.hl { background: #eaf3f5; margin: 0 -1.25rem; padding: .6rem 1.25rem; }
.erp-mail .row > label { padding-top: .45rem; font-size: .88rem; color: #344054; }
.erp-mail .v { min-width: 0; font-size: .88rem; } .erp-mail .v.to { display: flex; gap: .4rem; }
.erp-mail input:not([type=checkbox]), .erp-mail select, .erp-mail textarea { width: 100%; border: 1px solid #cfd8df;
  border-radius: .4rem; padding: .45rem .6rem; font-size: .88rem; background: #fff; color: inherit; font-family: inherit; }
.erp-mail .v.to select { width: 13rem; flex: none; }
.erp-mail textarea { min-height: 15rem; line-height: 1.5; resize: vertical; }
.erp-mail .chk { display: flex; align-items: center; gap: .4rem; padding: .2rem 0; font-size: .88rem; cursor: pointer; }
.erp-mail .chk .material-symbols-outlined { font-size: 17px; color: #667085; }
.erp-mail .v:not(.to) > div.v { padding-top: .45rem; }
@media (max-width: 640px) { .erp-mail .row { grid-template-columns: 1fr; gap: .2rem; } .erp-mail .v.to { flex-direction: column; }
  .erp-mail .v.to select { width: 100%; } }
.dark dialog.erp-modal { background: #1e293b; } .dark .erp-mail .row.hl { background: rgba(74,144,201,.12); }
.dark .erp-mail input, .dark .erp-mail select, .dark .erp-mail textarea { background: #0f172a; border-color: #475569; }

/* Dokumendi päis (uus): pealkiri vasakul, toimingud paremal; üks esmane nupp, muud rahulikud */
.erp-dochead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem;
  margin-bottom: 1.25rem; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid #e4e7ec; border-radius: .9rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.erp-dochead-main { min-width: 0; flex: 1 1 22rem; }
.erp-dochead-kicker { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #3d7fa6; }
.erp-dochead-title { font-size: 1.6rem; font-weight: 650; line-height: 1.2; margin: .15rem 0 .35rem; color: #101828; }
.erp-dochead-meta { display: flex; flex-wrap: wrap; gap: .25rem 0; font-size: .85rem; color: #667085; }
.erp-dochead-meta span:not(:last-child)::after { content: "·"; margin: 0 .55rem; color: #c0c7d0; }
.erp-dochead-meta span.first { color: #344054; font-weight: 600; }
.erp-dochead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.erp-dochead-actions form { margin: 0; display: contents; }
.erp-btn { display: inline-flex; align-items: center; gap: .4rem; height: 2.4rem; padding: 0 .9rem; border-radius: .55rem;
  border: 1px solid #d0d5dd; background: #fff; color: #344054 !important; font-size: .875rem; font-weight: 550;
  text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.erp-btn .material-symbols-outlined { font-size: 19px; color: #667085; }
.erp-btn:hover { background: #f5f8fa; border-color: #b8c2cc; }
.erp-btn.primary { background: #2f6f9a; border-color: #2f6f9a; color: #fff !important; }
.erp-btn.primary .material-symbols-outlined { color: #fff; }
.erp-btn.primary:hover { background: #255d82; }
.erp-btn.save { background: #1f8a5b; border-color: #1f8a5b; } .erp-btn.save:hover { background: #18734b; }
.erp-btn.icon { padding: 0; width: 2.4rem; justify-content: center; }
.erp-split { display: inline-flex; }
.erp-split > .erp-btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.erp-split { gap: 0 !important; } .erp-split > .erp-dd { margin: 0 !important; display: flex; }
.erp-split .erp-dd > summary.erp-btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px;
  padding: 0; width: 2.2rem; justify-content: center; }
.erp-dd { position: relative; }
.erp-dd > summary { list-style: none; } .erp-dd > summary::-webkit-details-marker { display: none; }
.erp-dd[open] > summary { background: #eef4f8; border-color: #9cc3dd; }
.erp-dd-menu { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 80; min-width: 14rem; padding: .35rem;
  background: #fff; border: 1px solid #e4e7ec; border-radius: .65rem; box-shadow: 0 12px 28px rgba(16, 24, 40, .14); }
.erp-dd-menu.right { left: auto; right: 0; }
.erp-dd-menu a, .erp-dd-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .65rem;
  border: 0; background: none; border-radius: .45rem; font-size: .875rem; color: #344054 !important; text-align: left;
  text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.erp-dd-menu a:hover, .erp-dd-menu button:hover { background: #f2f6f9; }
.erp-dd-menu .material-symbols-outlined { font-size: 19px; color: #667085; }
.erp-dd-menu button.danger, .erp-dd-menu button.danger .material-symbols-outlined { color: #b42318 !important; }
.erp-dd-menu form { margin: 0; }
@media (max-width: 700px) { .erp-dochead { align-items: flex-start; } .erp-dochead-actions { width: 100%; } }
.dark .erp-dochead, .dark .erp-btn, .dark .erp-dd-menu { background: #1e293b; border-color: #334155; }
.dark .erp-dochead-title { color: #f1f5f9; } .dark .erp-btn, .dark .erp-dd-menu a, .dark .erp-dd-menu button { color: #e2e8f0 !important; }
.dark .erp-btn:hover, .dark .erp-dd-menu a:hover, .dark .erp-dd-menu button:hover { background: #273449; }
.dark .erp-btn.primary { background: #2f6f9a; } .dark .erp-btn.save { background: #1f8a5b; }

/* Päis v2: kerge toonitud taust, vasak servajoon oleku järgi, olekumärk, kliendi saldo */
.erp-dochead { position: relative; background: linear-gradient(180deg, #f3f8fb 0%, #ffffff 70%); border-color: #d9e3ea;
  border-left: 4px solid #8fb3cc; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.erp-dochead.tone-ok { border-left-color: #2e9e6a; } .erp-dochead.tone-warn { border-left-color: #e0a030; }
.erp-dochead.tone-bad { border-left-color: #d0533a; } .erp-dochead.tone-info { border-left-color: #3d7fa6; }
.erp-chip { display: inline-block; vertical-align: middle; margin-left: .5rem; padding: .18rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: #e6eef4; color: #2f5f80; }
.erp-chip.ok { background: #dcf3e6; color: #146b4b; } .erp-chip.warn { background: #fdf0d5; color: #8a5a00; }
.erp-chip.bad { background: #fde2dc; color: #a33a1c; } .erp-chip.info { background: #ddebf7; color: #2a6496; }
.erp-btn { background: #f8fafc; border-color: #cdd6df; }
.erp-btn:hover { background: #eef3f7; }
.erp-dochead-aside { display: block; min-width: 13.5rem; padding: .55rem .85rem; border-radius: .65rem; background: #fff;
  border: 1px solid #d9e3ea; text-decoration: none !important; color: #344054 !important; align-self: stretch; }
.erp-dochead-aside:hover { border-color: #9cc3dd; }
.erp-dochead-aside .lbl { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #667085; }
.erp-dochead-aside .val { font-size: 1.35rem; font-weight: 700; line-height: 1.25; color: #101828; }
.erp-dochead-aside.bad .val { color: #c0392b; } .erp-dochead-aside.ok .val { color: #1d7a45; }
.erp-dochead-aside .ln { display: flex; justify-content: space-between; gap: .8rem; font-size: .78rem; color: #667085; }
.erp-dochead-aside .ln b { font-weight: 600; color: #344054; } .erp-dochead-aside .ln.bad b { color: #c0392b; }
.erp-dochead-aside .ln.warn b { color: #b26b00; }
.erp-dochead-aside .bar { height: 4px; border-radius: 4px; background: #e6ebf0; margin-top: .35rem; overflow: hidden; }
.erp-dochead-aside .bar i { display: block; height: 100%; background: #3d7fa6; }
.erp-dochead-aside.bad .bar i { background: #d0533a; }
.dark .erp-dochead { background: linear-gradient(180deg, #1f2b3b 0%, #1e293b 70%); }
.dark .erp-dochead-aside { background: #0f172a; border-color: #334155; color: #e2e8f0 !important; }
.dark .erp-dochead-aside .val { color: #f1f5f9; }
.erp-dochead.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .9rem 1.5rem; }
.erp-dochead.has-aside .erp-dochead-aside { align-self: start; }
.erp-dochead.has-aside .erp-dochead-actions { grid-column: 1 / -1; padding-top: .8rem; border-top: 1px solid #e3eaf0; }
@media (max-width: 700px) { .erp-dochead.has-aside { grid-template-columns: 1fr; } }
.erp-dochead.has-aside .erp-btn.save { margin-left: auto; }

/* Tegevuskalender: tahvel ja kalender */
.tk-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem;
  padding: 1rem 1.25rem; background: linear-gradient(180deg, #f3f8fb 0%, #fff 70%); border: 1px solid #d9e3ea;
  border-left: 4px solid #3b6d11; border-radius: .9rem; }
.tk-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tk-tabs { display: inline-flex; border: 1px solid #cdd6df; border-radius: .55rem; overflow: hidden; background: #f8fafc; }
.tk-tabs a { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem; font-size: .85rem; font-weight: 550;
  color: #344054 !important; text-decoration: none !important; }
.tk-tabs a + a { border-left: 1px solid #cdd6df; } .tk-tabs a .material-symbols-outlined { font-size: 18px; color: #667085; }
.tk-tabs a.on { background: #2f6f9a; color: #fff !important; } .tk-tabs a.on .material-symbols-outlined { color: #fff; }
.tk-who select { height: 2.4rem; border: 1px solid #cdd6df; border-radius: .55rem; padding: 0 .6rem; background: #fff; font-size: .85rem; }
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; align-items: start; }
@media (max-width: 1100px) { .tk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tk-board { grid-template-columns: 1fr; } }
.tk-col { border-radius: .8rem; padding: .6rem; min-height: 14rem; transition: box-shadow .12s; }
.tk-col.ph-new { background: #fbeae9; } .tk-col.ph-in_progress { background: #dceefb; }
.tk-col.ph-on_hold { background: #fdf3d9; } .tk-col.ph-done { background: #e7f5ea; }
.tk-col.over { box-shadow: inset 0 0 0 2px #2f6f9a; }
.tk-col-h { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .3rem .55rem;
  display: flex; justify-content: space-between; color: #344054; }
.tk-col-h span { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .55rem; font-size: .75rem; line-height: 1.5rem; }
.tk-col-b { display: flex; flex-direction: column; gap: .5rem; min-height: 3rem; }
.tk-empty { border: 2px dashed rgba(0,0,0,.12); border-radius: .6rem; padding: 1rem; text-align: center; color: #98a2b3; font-size: .8rem; }
.tk-card { display: block; background: #fff; border-radius: .6rem; padding: .6rem .7rem; border-left: 4px solid #98a2b3;
  box-shadow: 0 1px 2px rgba(16,24,40,.08); text-decoration: none !important; color: #1d2939 !important; cursor: grab; }
.tk-col.ph-new .tk-card { border-left-color: #a32d2d; } .tk-col.ph-in_progress .tk-card { border-left-color: #185fa5; }
.tk-col.ph-on_hold .tk-card { border-left-color: #9a7615; } .tk-col.ph-done .tk-card { border-left-color: #1e7d3a; opacity: .85; }
.tk-card.dragging { opacity: .4; } .tk-card:hover { box-shadow: 0 4px 12px rgba(16,24,40,.14); }
.tk-card-t { display: flex; gap: .35rem; font-weight: 600; font-size: .88rem; line-height: 1.3; }
.tk-card-t .material-symbols-outlined { font-size: 17px; color: #667085; margin-top: 1px; }
.tk-cust { display: inline-flex; align-items: center; gap: .25rem; margin: .35rem 0 .1rem; padding: .1rem .5rem; border-radius: .4rem;
  background: #eaf2ff; color: #0a4bb0; font-size: .75rem; font-weight: 600; }
.tk-cust .material-symbols-outlined { font-size: 14px; }
.tk-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .75rem; color: #667085; margin-top: .25rem; }
.tk-card.late .tk-due { color: #c0392b; font-weight: 700; }
.tk-calnav { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .6rem; }
.tk-chk { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; margin-left: .5rem; }
.tk-legend { margin-left: auto; font-size: .78rem; color: #667085; display: inline-flex; gap: .7rem; align-items: center; }
.tk-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .25rem; vertical-align: -1px; }
.lg-task { background: #2f6f9a; } .lg-wo { background: #8e44ad; } .lg-maint { background: #e0a030; }
.tk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #e4e7ec; border-radius: .8rem;
  overflow: hidden; background: #e4e7ec; gap: 1px; }
.tk-wd { background: #f2f4f7; text-align: center; font-size: .75rem; font-weight: 700; color: #475467; padding: .4rem; }
.tk-day { background: #fff; min-height: 7.2rem; padding: .3rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tk-day.other { background: #fafbfc; } .tk-day.other .tk-day-h span { color: #c0c7d0; }
.tk-day.today { background: #fff8f0; } .tk-day.today .tk-day-h span { background: #f57415; color: #fff; }
.tk-day.over { box-shadow: inset 0 0 0 2px #2f6f9a; }
.tk-day-h { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 600; color: #344054; }
.tk-day-h span { display: inline-flex; width: 1.5rem; height: 1.5rem; align-items: center; justify-content: center; border-radius: 999px; }
.tk-add { opacity: 0; color: #2f6f9a !important; font-weight: 700; font-size: 1rem; text-decoration: none !important; padding: 0 .3rem; }
.tk-day:hover .tk-add { opacity: 1; }
.tk-ev { display: block; font-size: .72rem; line-height: 1.25; padding: .18rem .35rem; border-radius: .3rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; color: #fff !important; background: #2f6f9a; }
.tk-ev small { opacity: .85; } .tk-ev.task { cursor: grab; }
.tk-ev.ph-done { background: #8fb79b; text-decoration: line-through !important; } .tk-ev.ph-on_hold { background: #c49a2c; }
.tk-ev.late { background: #c0392b; } .tk-ev.wo { background: #8e44ad; } .tk-ev.maint { background: #e0a030; }
.tk-nodate { margin-top: 1rem; background: #f6f7f9; border-radius: .8rem; padding: .6rem; }
.tk-nodate-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; }
.dark .tk-day, .dark .tk-card { background: #1e293b; color: #e2e8f0 !important; } .dark .tk-wd { background: #273449; }

/* v28: linnukese väljad – abitekst ühel real linnukese kõrval */
.field-split_backorder .grow > .flex { flex-direction: row !important; align-items: center; gap: .5rem; }
.field-split_backorder .grow > .flex > div { margin: 0 !important; }
.field-split_backorder .grow > .flex > div > div { margin: 0; font-size: .8rem; color: #b54708; }
.field-split_backorder > div { flex: 1 1 auto; width: 100%; }
.field-split_backorder .grow > .flex > div > div { white-space: nowrap; }

/* erpix: logo külgmenüüs ja sisselogimisel */
.erpix-brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; }
.erpix-brand-logo { height: 32px; width: auto; }
.erpix-brand-sub { font-size: 11px; line-height: 1.2; color: #667085; white-space: nowrap; overflow: hidden;
                   text-overflow: ellipsis; max-width: 210px; padding-left: 1px; }
.dark .erpix-brand-sub { color: #98a2b3; }
.erpix-login-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e4e7ec; text-align: center; }
.dark .erpix-login-head { border-color: #283241; }
.erpix-login-head img { height: 64px; width: auto; margin: 0 auto; }
.erpix-login-sub { margin-top: .75rem; color: #667085; font-size: .9rem; }

.erp-lists { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
@container (max-width: 520px) { .erp-list-row { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
  .erp-list-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 640px) { #erp-gsearch { min-width: 0; flex: 1 1 auto; } #erp-gsearch input { width: 100% !important; min-width: 0; }
  #erp-gsearch .erp-gkbd { display: none; } }

/* ===== Avaleht v35 – hele „Apple“ stiil: õhk, pehmed varjud, gradiendiga ikoonid ===== */
.erp-dash { --ap-bg: #f5f5f7; --ap-card: #fff; --ap-ink: #1d1d1f; --ap-ink2: #6e6e73; --ap-ink3: #86868b;
  --ap-sep: rgba(60, 60, 67, .12); --ap-shadow: 0 1px 1px rgba(0, 0, 0, .02), 0 8px 24px -6px rgba(0, 0, 0, .07);
  --ap-shadow-h: 0 2px 4px rgba(0, 0, 0, .03), 0 18px 40px -10px rgba(0, 0, 0, .14);
  container-type: inline-size; background: var(--ap-bg); margin: -4px -4px 0; padding: 22px; border-radius: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; color: var(--ap-ink); }
.dark .erp-dash { --ap-bg: #000; --ap-card: #1c1c1e; --ap-ink: #f5f5f7; --ap-ink2: #a1a1a6; --ap-ink3: #8e8e93;
  --ap-sep: rgba(255, 255, 255, .1); --ap-shadow: none; --ap-shadow-h: 0 0 0 1px rgba(255, 255, 255, .12); }

/* hero */
.dx-hero { position: relative; overflow: hidden; margin: 0 0 18px; padding: 34px 36px 30px; border-radius: 26px;
  background: radial-gradient(55% 130% at 100% 0%, rgba(255, 149, 0, .20), transparent 62%),
              radial-gradient(45% 110% at 0% 100%, rgba(0, 122, 255, .13), transparent 60%),
              radial-gradient(40% 90% at 62% 120%, rgba(175, 82, 222, .12), transparent 60%), var(--ap-card);
  box-shadow: var(--ap-shadow); }
.dark .dx-hero { background: radial-gradient(55% 130% at 100% 0%, rgba(255, 149, 0, .22), transparent 62%),
  radial-gradient(45% 110% at 0% 100%, rgba(10, 132, 255, .18), transparent 60%), var(--ap-card); }
.dx-hero-art { position: absolute; right: 40px; top: 50%; width: 120px; height: 120px; transform: translateY(-50%) rotate(-6deg);
  filter: drop-shadow(0 18px 24px rgba(242, 107, 15, .25)); animation: dxfloat 6s ease-in-out infinite; }
@keyframes dxfloat { 0%, 100% { transform: translateY(-50%) rotate(-6deg); } 50% { transform: translateY(calc(-50% - 6px)) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .dx-hero-art { animation: none; } }
@container (max-width: 700px) { .dx-hero-art { width: 54px; height: 54px; right: 18px; top: 26px; transform: none; animation: none; }
  .dx-hero { padding: 24px 20px 22px; } }
.dx-hero-main { position: relative; z-index: 1; max-width: calc(100% - 170px); }
@container (max-width: 700px) { .dx-hero-main { max-width: 100%; } }
.dx-date { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ap-ink3); margin-bottom: 6px; }
.dx-title { font-size: 40px; line-height: 1.08; font-weight: 700; letter-spacing: -.028em; margin: 0 0 18px; color: var(--ap-ink); }
@container (max-width: 700px) { .dx-title { font-size: 28px; } }
.dx-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.dx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, .72); color: var(--ap-ink) !important; text-decoration: none !important;
  border: 1px solid rgba(0, 0, 0, .06); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: transform .15s, background .15s; }
.dark .dx-chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); }
a.dx-chip:hover { transform: translateY(-1px); background: #fff; }
.dark a.dx-chip:hover { background: rgba(255, 255, 255, .14); }
.dx-chip .material-symbols-outlined { font-size: 17px; }
.dx-chip.warn { color: #c93400 !important; background: rgba(255, 149, 0, .13); border-color: rgba(255, 149, 0, .25); }
.dx-chip.ok { color: #248a3d !important; background: rgba(52, 199, 89, .13); border-color: rgba(52, 199, 89, .25); }
.dx-chip.err { color: #d70015 !important; background: rgba(255, 59, 48, .1); border-color: rgba(255, 59, 48, .22); }
.dx-chip.test { color: #a05a00 !important; background: rgba(255, 204, 0, .2); border-color: rgba(255, 204, 0, .35); }
.dark .dx-chip.warn { color: #ffb340 !important; } .dark .dx-chip.ok { color: #30d158 !important; }
.dark .dx-chip.err { color: #ff6961 !important; } .dark .dx-chip.test { color: #ffd60a !important; }

/* värvid: --c (põhitoon), --g1 → --g2 (ikooni gradient), --soft (pehme taust) */
.q-orange, .t-orange { --c: #f26b0f; --g1: #ffb340; --g2: #ff7a00; --soft: rgba(255, 149, 0, .12); }
.q-violet, .t-violet { --c: #8e44ff; --g1: #c77dff; --g2: #8e44ff; --soft: rgba(175, 82, 222, .12); }
.q-indigo { --c: #4f5bd5; --g1: #8a96ff; --g2: #4f5bd5; --soft: rgba(88, 86, 214, .12); }
.q-blue, .t-blue { --c: #007aff; --g1: #5ac8fa; --g2: #007aff; --soft: rgba(0, 122, 255, .1); }
.q-green, .t-green, .t-ok { --c: #248a3d; --g1: #5be07a; --g2: #28b446; --soft: rgba(52, 199, 89, .13); }
.q-teal, .t-teal { --c: #00a7a0; --g1: #5ee0d6; --g2: #00a7a0; --soft: rgba(48, 176, 199, .13); }
.q-amber, .t-amber { --c: #c27a00; --g1: #ffd24d; --g2: #ffa000; --soft: rgba(255, 204, 0, .18); }
.q-rose, .t-red { --c: #e0263f; --g1: #ff7a90; --g2: #ff2d55; --soft: rgba(255, 45, 85, .1); }
.q-slate { --c: #636b7a; --g1: #a7afbd; --g2: #636b7a; --soft: rgba(142, 142, 147, .14); }

/* kiirlingid – iOS-i rakenduseikoonid */
.erp-qlinks { display: flex; gap: 14px; margin: 0 0 18px; }
.erp-qlinks > .erp-qlink { flex: 1 1 0; min-width: 0; }
@container (max-width: 940px) { .erp-qlinks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 420px) { .erp-qlinks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.erp-qlink { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; min-height: 124px;
  padding: 18px 8px 16px; border-radius: 22px; background: var(--ap-card); border: 0; box-shadow: var(--ap-shadow);
  color: var(--ap-ink) !important; text-decoration: none !important; text-align: center;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.erp-qlink:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--ap-shadow-h); }
.erp-qlink:active { transform: scale(.98); }
.erp-qlink:focus-visible { outline: 3px solid rgba(0, 122, 255, .5); outline-offset: 2px; }
.erp-qlink-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: #fff;
  background: linear-gradient(180deg, var(--g1), var(--g2));
  box-shadow: 0 6px 14px -4px var(--soft), inset 0 1px 0 rgba(255, 255, 255, .35); }
.erp-qlink-ic .material-symbols-outlined { font-size: 28px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.erp-qlink-t { font-size: 13px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
@container (max-width: 420px) { .erp-qlink { min-height: 100px; padding: 14px 4px; } .erp-qlink-ic { width: 46px; height: 46px; border-radius: 13px; }
  .erp-qlink-t { font-size: 12px; } }

/* KPI */
.dx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 0 0 18px; }
.dx-kpi { display: flex; flex-direction: column; gap: 3px; padding: 20px 22px 18px; border-radius: 22px; background: var(--ap-card);
  box-shadow: var(--ap-shadow); color: var(--ap-ink) !important; text-decoration: none !important;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.dx-kpi:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow-h); }
.dx-kpi-top { display: flex; align-items: center; gap: 10px; }
.dx-kpi-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff;
  background: linear-gradient(180deg, var(--g1), var(--g2)); }
.dx-kpi-ic .material-symbols-outlined { font-size: 18px; font-variation-settings: "FILL" 1, "wght" 500; }
.dx-kpi-label { font-size: 14px; font-weight: 600; color: var(--ap-ink2); flex: 1; min-width: 0; }
.dx-kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin-top: 12px; line-height: 1.05;
  font-variant-numeric: tabular-nums; color: var(--ap-ink); }
.dx-kpi-sub, .dx-kpi-foot { font-size: 13px; color: var(--ap-ink3); }
.dx-trend { display: inline-flex; align-items: center; gap: 1px; padding: 3px 9px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.dx-trend .material-symbols-outlined { font-size: 15px; }
.dx-trend.up { background: rgba(52, 199, 89, .14); color: #248a3d; } .dx-trend.down { background: rgba(255, 59, 48, .11); color: #d70015; }
.dark .dx-trend.up { color: #30d158; } .dark .dx-trend.down { color: #ff6961; }
.dx-spark { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin-top: 14px; }
.dx-spark i { flex: 1; min-height: 3px; border-radius: 4px; background: var(--soft); }
.dx-spark i:last-child { background: linear-gradient(180deg, var(--g1), var(--g2)); }
.dx-progress { height: 8px; border-radius: 99px; background: rgba(120, 120, 128, .14); overflow: hidden; margin-top: 16px; }
.dx-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--g1), var(--g2)); }

/* paneelid – iOS „seaded“ loendi stiil */
.dx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 0 0 18px; }
@container (max-width: 860px) { .dx-split { grid-template-columns: 1fr; } }
.dx-panel { border-radius: 22px; background: var(--ap-card); box-shadow: var(--ap-shadow); padding: 18px 8px 10px; min-width: 0; }
.dx-panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 14px 8px; }
.dx-panel-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ap-ink); }
.dx-panel-head h2 .material-symbols-outlined { display: none; }
.dx-panel-head a { font-size: 14px; font-weight: 500; color: #007aff; }
.dark .dx-panel-head a { color: #0a84ff; }
.dx-att, .dx-task { position: relative; display: flex; align-items: center; gap: 13px; padding: 10px 14px; border-radius: 14px;
  color: var(--ap-ink) !important; text-decoration: none !important; transition: background .12s; }
.dx-att:hover, .dx-task:hover { background: rgba(120, 120, 128, .08); }
.dx-att + .dx-att::before, .dx-task + .dx-task::before { content: ""; position: absolute; left: 57px; right: 14px; top: 0;
  border-top: 1px solid var(--ap-sep); }
.dx-att-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; flex: none;
  background: linear-gradient(180deg, var(--g1), var(--g2)); }
.dx-att-ic .material-symbols-outlined { font-size: 18px; font-variation-settings: "FILL" 1, "wght" 500; }
.dx-att-l { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.dx-att-n { min-width: 28px; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--c);
  font-weight: 700; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.dx-att-go { color: #c7c7cc; font-size: 22px; margin-left: -4px; }
.dx-okrow { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 6px; margin-top: 4px; border-top: 1px solid var(--ap-sep); }
.dx-okrow:empty { display: none; }
.dx-okrow > span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--ap-ink2);
  background: rgba(120, 120, 128, .1); padding: 4px 10px 4px 7px; border-radius: 999px; }
.dx-okrow .material-symbols-outlined { font-size: 14px; color: #34c759; }
.dx-task-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: rgba(0, 122, 255, .1); color: #007aff; }
.dx-task-ic .material-symbols-outlined { font-size: 18px; font-variation-settings: "FILL" 1; }
.dx-task.late .dx-task-ic { background: rgba(255, 59, 48, .1); color: #ff3b30; }
.dx-task + .dx-task::before { left: 61px; }
.dx-task-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dx-task-b b { font-weight: 600; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-task-b small { font-size: 13px; color: var(--ap-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-task-when { font-size: 12px; font-weight: 600; color: var(--ap-ink2); background: rgba(120, 120, 128, .12); padding: 3px 10px; border-radius: 999px; }
.dx-task.late .dx-task-when { background: rgba(255, 59, 48, .1); color: #ff3b30; }
.dx-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 10px; color: var(--ap-ink2);
  font-size: 15px; text-align: center; }
.dx-empty .material-symbols-outlined { font-size: 40px; color: #ff9f0a; font-variation-settings: "FILL" 1; }
.dx-empty a { font-size: 14px; font-weight: 600; color: #007aff; }

/* graafikud ja loendid samas keeles */
.erp-dash .erp-viz { gap: 14px; }
.erp-dash .erp-viz-card, .erp-dash .erp-list { border: 0 !important; border-radius: 22px !important; background: var(--ap-card);
  box-shadow: var(--ap-shadow); padding: 20px 22px; }
.erp-dash .erp-viz-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ap-ink); }
.erp-dash .erp-viz-head p { color: var(--ap-ink3); font-size: 13px; }
.erp-dash .erp-viz { --s1: #007aff; --s3: #34c759; --prev: #d1d1d6; }
.dark .erp-dash .erp-viz { --s1: #0a84ff; --s3: #30d158; --prev: #3a3a3c; }
.erp-dash .erp-col-bars .bar { border-radius: 6px 6px 2px 2px; }
.erp-dash .erp-hbar .bar { border-radius: 99px; }
.erp-dash .erp-lists { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.erp-dash .erp-list { padding: 8px 8px 10px; }
.erp-dash .erp-list-head { padding: 12px 14px 8px; border: 0; background: none; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.erp-dash .erp-list-head a { font-size: 14px; font-weight: 500; color: #007aff; }
.erp-dash .erp-list-head .material-symbols-outlined { display: none; }
.erp-dash .erp-list-row { border-radius: 12px; border: 0; padding: 9px 14px; }
.erp-dash .erp-list-row:hover { background: rgba(120, 120, 128, .08); }
@container (max-width: 520px) { .erp-dash .erp-list-row { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
  .erp-dash .erp-list-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@container (max-width: 520px) { .erp-dash { padding: 12px; border-radius: 20px; } }
