:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1a2330;
  --muted: #5b6b7c;
  --line: #d8dfe6;
  --brand: #0f4c81;
  --brand-2: #0b3a63;
  --ok: #1e7d3c;
  --ok-bg: #e5f4e9;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --na: #6b7280;
  --na-bg: #eef1f4;
  --info-bg: #e8f1fb;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
h1 { font-size: 1.45rem; margin: .8rem 0 .5rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
h3 { font-size: 1.02rem; margin: 1rem 0 .4rem; }
code { background: #eef1f4; padding: 1px 4px; border-radius: 3px; }
code.wrap { word-break: break-all; display: inline-block; }

.topbar { background: #fff; border-bottom: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); position: sticky; top: 0; z-index: 40; }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .logo { display: block; }
.logo-metrum { height: 26px; width: auto; }
.logo-beyron { height: 17px; width: auto; opacity: .92; }
.brand-title { font-weight: 700; font-size: .95rem; color: var(--brand-2); border-left: 1px solid var(--line); padding-left: 12px; }
.nav a { color: var(--muted); text-decoration: none; margin-right: 12px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a.on, .nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.userbox { margin-left: auto; font-size: .88rem; color: var(--muted); }
.userbox a { color: var(--brand); }
.role { opacity: .85; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 12px 16px 40px; }
.foot { max-width: 1280px; margin: 0 auto; padding: 14px 16px 30px; color: var(--muted); font-size: .82rem; }

.muted { color: var(--muted); }
.note { background: var(--info-bg); border-left: 4px solid var(--brand); padding: 8px 12px; border-radius: 4px; }
.flash { padding: 10px 14px; border-radius: 6px; margin: 10px 0; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--bad-bg); color: var(--bad); }
.flash.info { background: var(--info-bg); color: var(--brand-2); }

.cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.card.stat { min-width: 130px; text-align: center; }
.card.stat .num { font-size: 1.8rem; font-weight: 700; }
.card.stat.ok .num { color: var(--ok); }
.card.stat.bad .num { color: var(--bad); }
.card.stat .lbl { color: var(--muted); font-size: .85rem; }

.sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.sess { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.sess:hover { border-color: var(--brand); box-shadow: 0 1px 6px rgba(15, 76, 129, .18); }
.sess-head { font-weight: 600; margin-bottom: 8px; }
.sess-code { color: var(--brand); font-weight: 700; }
.bar { height: 8px; background: #e5eaef; border-radius: 4px; overflow: hidden; }
.bar-in { height: 100%; background: var(--brand); }
.sess-meta { font-size: .82rem; color: var(--muted); margin-top: 6px; }

.table { width: 100%; border-collapse: collapse; background: var(--card); margin: 8px 0 16px; }
.table th, .table td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.table th { background: #eef2f6; font-weight: 600; }
.table.slim { max-width: 760px; }
.table .center, td.center { text-align: center; }
.nowrap { white-space: nowrap; }

.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--na-bg); color: var(--na); font-size: .8rem; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

.crumbs { display: flex; justify-content: space-between; margin: 8px 0; }
.crumb-nav a { margin-left: 14px; }

.items .c-num { width: 54px; white-space: nowrap; }
.items .c-ts { width: 120px; }
.items .c-status { width: 190px; }
.items .c-com { width: 30%; }
.it-title { font-weight: 600; }
.it-more summary { cursor: pointer; color: var(--brand); font-size: .85rem; margin-top: 3px; }
.it-steps, .it-exp { font-size: .88rem; margin: 6px 0; }
.it-meta { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.st-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.st-btn { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 4px 8px; cursor: pointer; font-size: .82rem; }
.st-btn:disabled { cursor: not-allowed; opacity: .55; }
.st-btn.st-ok.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-btn.st-bad.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.st-btn.st-na.on { background: var(--na); border-color: var(--na); color: #fff; }
.st-btn.st-clear.on { background: #cfd6dd; }
.cls-wrap { display: block; margin-top: 6px; font-size: .82rem; }
.cls-wrap[hidden] { display: none; }
.cls-sel { width: 100%; margin-top: 2px; }

/* v1.2: cikli */
.runs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 18px; align-items: flex-start; }
.run-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--card); text-decoration: none; color: var(--ink); min-width: 200px; }
.run-card.on { border-color: var(--brand); box-shadow: 0 1px 6px rgba(15, 76, 129, .25); }
.run-card .run-name { font-weight: 700; }
.run-card .run-meta { font-size: .78rem; color: var(--muted); }
.run-dot { width: 12px; height: 12px; border-radius: 50%; background: #d3a10a; }
.run-card.st-green .run-dot { background: var(--ok); }
.run-card.st-red .run-dot { background: var(--bad); }
.run-card.st-green { background: #f2faf4; }
.run-card.st-red { background: #fdf3f2; }
.run-new { align-self: stretch; }
.run-new summary { list-style: none; }
.run-new-form { margin-top: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.run-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-badge { background: var(--info-bg); color: var(--brand-2); border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 600; }
.ts-tag { color: var(--muted); font-weight: 400; font-size: .82rem; }
.sess.sess-green { border-left: 5px solid var(--ok); }
.sess.sess-red { border-left: 5px solid var(--bad); }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; }
.chk-row { display: flex; gap: 14px; margin: 8px 0; flex-wrap: wrap; }

/* v1.2: scenāriju tabula ar apakšpārbaudēm atsevišķā vērtējuma kolonnā */
.items2 .c-num { width: 52px; text-align: center; }
.items2 .c-verd { width: 210px; }
.items2 .c-cls { width: 150px; }
.items2 .c-note { width: 24%; }
.items2 thead th { position: sticky; top: 51px; z-index: 20; }
.items2 .c-cls select { width: 100%; font: inherit; font-size: .82rem; padding: 3px 4px; border: 1px solid var(--line); border-radius: 4px; }
.cls-hint { font-size: .75rem; color: var(--bad); margin-top: 4px; }
.cls-legend { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 6px; margin: 8px 0; }
.cls-legend summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--brand-2); }
.cls-legend ul { margin: 4px 0 8px; padding-left: 18px; }
.cls-legend li { margin: 4px 0; font-size: .9rem; }
tr.saved-flash td { animation: savedflash .9s ease-out; }
@keyframes savedflash { 0% { background: var(--ok-bg); } 100% { background: transparent; } }
.bar-in.bar-red { background: var(--bad); }
.bar-in.bar-green { background: var(--ok); }
.totop { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: none; align-items: center; justify-content: center; text-decoration: none; font-size: 1.2rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); z-index: 50; }
.totop.show { display: flex; }
.row-off td { opacity: .5; background: #f6f6f6; }
.sub-row td { border-top: 1px dashed var(--line); font-size: .9rem; }
.add-row td { background: #fafbfc; }
.add-sub-form { width: 100%; }
.add-sub-form .grow { flex: 1 1 auto; font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; }
.num-in { width: 70px; font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; }
.rep-logos { display: flex; justify-content: center; gap: 34px; align-items: center; margin-bottom: 10px; }
.rep-logos img.rep-metrum { height: 30px; width: auto; }
.rep-logos img.rep-beyron { height: 20px; width: auto; }
.items2 tbody.item { border-top: 3px solid var(--brand); }
.items2 tr.it-head td { background: #e8eef4; }
.items2 tr.sub td { border-top: 1px dashed var(--line); }
.items2 tr.sub .sub-text { font-size: .88rem; }
.items2 tr.it-att td { background: #fafbfc; }
.sub-letter { color: var(--brand); font-weight: 700; }
.sub-btns { display: flex; gap: 3px; flex-wrap: wrap; }
.sb { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 2px 8px; cursor: pointer; font-size: .78rem; }
.sb:disabled { cursor: not-allowed; opacity: .55; }
.sb.sb-ja.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.sb.sb-ne.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.sb.sb-na.on { background: var(--na); border-color: var(--na); color: #fff; }
.sb.sb-clear.on { background: #cfd6dd; }
.sub-note { width: 100%; font: inherit; font-size: .8rem; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; }
.sub.saving { opacity: .6; }
.sub.save-err td { outline: 2px solid var(--bad); }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att-wrap { position: relative; display: inline-flex; align-items: flex-start; gap: 3px; }
.att img { height: 64px; border-radius: 4px; border: 1px solid var(--line); display: block; }
.att-file { font-size: .82rem; }
.att-delete { border: 1px solid #d8a7a3; background: #fff; color: var(--bad); border-radius: 999px; width: 22px; height: 22px; line-height: 18px; padding: 0; cursor: pointer; font-size: 1rem; font-weight: 700; }
.att-delete:hover { background: var(--bad-bg); border-color: var(--bad); }
.att-delete:disabled { opacity: .5; cursor: wait; }
.att-add { cursor: pointer; }
.rep-atts { display: flex; flex-wrap: wrap; gap: 14px; }
.rep-att { margin: 0; max-width: 320px; }
.rep-att img { max-width: 320px; max-height: 240px; border: 1px solid var(--line); border-radius: 4px; }
.rep-att figcaption { font-size: .75rem; color: var(--muted); }
.rep-att-block { page-break-inside: avoid; }
.rep-scope { text-align: center; font-size: 1.05rem; }
.sub-progress { font-size: .8rem; color: var(--muted); margin-bottom: 5px; }
.derive { margin-top: 6px; }
.rep-subs { font-size: .8rem; color: #333; }
.rep-subs .s-ja { color: var(--ok); }
.rep-subs .s-ne { color: var(--bad); font-weight: 700; }
.rep-subs .s-na { color: var(--na); }
.rep-subs .s-open { color: #9aa5b0; }

.com-txt { width: 100%; resize: vertical; font: inherit; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 7px 14px; cursor: pointer; text-decoration: none; font: inherit; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.small { padding: 3px 10px; font-size: .82rem; margin-top: 5px; }
.save-state { font-size: .78rem; color: var(--muted); }
.save-state.saved { color: var(--ok); }
.save-state.err { color: var(--bad); }
tr.item.dirty { outline: 2px solid #f0c36d; }

.record { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 10px; margin: 10px 0 16px; }
.record summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.record-form label { display: block; margin: 8px 0 2px; font-size: .88rem; }
.record-form input, .record-form textarea { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid2.tops { align-items: start; gap: 14px; }
.rowline { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

.login-card { max-width: 430px; margin: 8vh auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; }
.login-card label { display: block; margin: 12px 0 4px; }
.login-card input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.login-card .btn { margin-top: 14px; width: 100%; }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.inline-form label { font-size: .85rem; display: flex; flex-direction: column; gap: 3px; }
.inline-form input, .inline-form select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; }
.cell-form { display: flex; gap: 6px; align-items: center; }
.actions .btn { margin: 2px 2px; }
.totp-secret code { font-size: 1.05rem; letter-spacing: 1px; }

.audit .details { font-size: .8rem; word-break: break-all; }
.pager { margin: 10px 0; }
.pg { display: inline-block; padding: 3px 9px; border: 1px solid var(--line); border-radius: 4px; margin-right: 4px; text-decoration: none; }
.pg.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.toolbar { display: flex; gap: 10px; margin: 10px 0; }
.report { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 26px; }
.rep-head h1 { text-align: center; }
.rep-sub { text-align: center; color: var(--muted); }
.rep-meta { margin: 12px auto; }
.rep-rec { background: #f6f8fa; border-left: 3px solid var(--brand); padding: 6px 10px; font-size: .88rem; }
.verdict { font-weight: 700; padding: 10px 14px; border-radius: 6px; }
.verdict.v-ok { background: var(--ok-bg); color: var(--ok); }
.verdict.v-bad { background: var(--bad-bg); color: var(--bad); }
.st-ok { color: var(--ok); font-weight: 600; }
.st-bad { color: var(--bad); font-weight: 700; }
.st-na { color: var(--na); }
.st-open { color: #9aa5b0; }
.rep-sign { display: flex; gap: 60px; margin-top: 34px; }
.sig { margin-top: 28px; }

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .items .c-ts { display: none; }
  .rep-sign { flex-direction: column; gap: 20px; }
}

@media print {
  body { background: #fff; font-size: 11px; }
  .topbar, .foot, .toolbar, .no-print, .crumbs { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .report { border: none; padding: 0; }
  .table th, .table td { padding: 3px 5px; }
  .rep-session { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* v1.3: formu izkārtojums kartēs */
.card form > label { display: block; margin: 10px 0 3px; font-size: .9rem; font-weight: 500; }
.card form input[type="text"], .card form input[type="email"], .card form input[type="password"],
.card form input[type="number"], .card form select, .card form textarea {
  width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; margin-top: 2px;
}
.card form textarea { resize: vertical; }
.card form .chk, .chk-row .chk { display: inline-flex; font-weight: 400; }
.card form .chk input, .chk-row .chk input { width: auto; }
.chk-row > label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chk-row .num-in, .card form input.num-in { width: 74px; }
.card form .rowline label { display: inline-block; }

/* ===== v1.4.0 — Nodevumi ===== */
.dl-badge{display:inline-block;padding:1px 7px;border-radius:10px;font-size:.78rem;font-weight:600;text-decoration:none;margin-left:4px;border:1px solid transparent;vertical-align:1px}
.dl-badge.dl-ok{background:#e7f6ea;color:#1c7a33;border-color:#bfe5c8}
.dl-badge.dl-ok:hover{background:#d7efdc}
.dl-badge.dl-wait{background:#fdf3dc;color:#8a6100;border-color:#f0dfae}
.dl-badge.dl-wait:hover{background:#f8ead0}
.dl-badge.dl-na{background:#eef0f2;color:#667;border-color:#dde1e5}
.deliv-summary{display:flex;align-items:center;gap:12px;margin:10px 0 16px}
.grp-head{margin:22px 0 8px}
.deliv-table td{vertical-align:top}
.c-dstat{width:220px}
.deliv-file{margin-top:4px;font-size:.85rem;word-break:break-all}
.deliv-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 6px}
.deliv-form .grow{flex:1;min-width:140px}
.dl-links{font-size:.78rem;margin-top:3px}
.pill.warn{background:#fdf3dc;color:#8a6100}
.small{font-size:.78rem}
.btn.ghost{background:transparent;border:1px solid #ccd2d8;color:#556}
.btn.danger{background:#fff;color:var(--bad);border-color:#d8a7a3}
.btn.danger:hover{background:var(--bad-bg);border-color:var(--bad)}
.deliv-file{display:flex;align-items:center;justify-content:space-between;gap:6px}
.deliv-delete-form{display:inline;margin:0}
.deliv-delete-form .btn.small{margin-top:0}
/* Akta melnraksts */
body.print-doc{background:#fff}
.report{max-width:900px;margin:0 auto;padding:24px 28px;font-size:.95rem}
.report-tools{display:flex;gap:10px;align-items:center;margin-bottom:18px;flex-wrap:wrap}
.report-brand{display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid #000;padding-bottom:8px;margin-bottom:18px}
.r-logo-metrum{height:30px}.r-logo-beyron{height:20px}
.r-title{text-align:center;font-size:1.35rem;margin:6px 0 2px}
.r-sub{text-align:center;color:#667;margin:0 0 14px}
.r-line{margin:0 0 14px}
.r-req{width:100%;border-collapse:collapse;margin:0 0 14px}
.r-req td{border:1px solid #ccc;padding:5px 8px;vertical-align:top}
.r-req td:first-child{width:130px;font-weight:600;background:#f5f6f7}
.r-annex th,.r-annex td{font-size:.88rem}
.r-missing{border:1px dashed #d3a12a;background:#fdf8ec;padding:10px 14px;border-radius:8px;margin:14px 0}
.r-missing h2{margin-top:0}
.r-sign{width:100%;margin-top:26px;border-collapse:collapse}
.r-sign td{width:50%;vertical-align:top;padding:10px}
.r-sigline{margin-top:34px}
@media print{.no-print{display:none!important}.report{padding:0}.r-missing{page-break-inside:avoid}}

/* ===== v1.5.0 — Nodevumi (apakšdokumenti, tīrāka tabula) ===== */
.deliv-table .c-dst{width:190px}
.deliv-table .c-dfl{width:270px}
.deliv-child td{background:#fafbfc}
.deliv-child .deliv-title{font-weight:400}
.child-arrow{color:#98a2ad;font-weight:400}
.deliv-parent td{background:#f2f4f6;border-top:2px solid #d8dde2}
.note-inp{width:100%;max-width:520px;font-size:.82rem;padding:3px 7px;margin-top:4px;border:1px solid #d8dde2;border-radius:6px;background:#fffdf5}
.note-inp:focus{background:#fff}
.deliv-stform{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:6px}
.deliv-upform{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:6px}
.file-inp{max-width:180px;font-size:.78rem}
.deliv-table tr:target td{background:#fff7d6;transition:background .3s}
.deliv-table tr:target .deliv-title strong{text-decoration:underline}
.grp-head .pill{vertical-align:2px;margin-left:8px}

/* ===== v1.5.1 — Nodevumu kopsavilkuma panelis ===== */
.deliv-hero{display:flex;gap:26px;align-items:center;flex-wrap:wrap;margin:12px 0 20px;padding:16px 20px;border-radius:12px;background:linear-gradient(135deg,#eef8ef 0%,#e2f2e4 100%);border:1px solid #bfe0c6}
.deliv-hero.hero-done{background:linear-gradient(135deg,#dff3e2 0%,#cdeAD3 100%);border-color:#9fd4ab}
.hero-main{flex:1;min-width:230px}
.hero-num{font-size:2.1rem;font-weight:700;color:#166427;line-height:1.1}
.hero-of{font-size:1.15rem;font-weight:600;color:#4c8a5b}
.hero-cap{color:#33613e;font-size:.9rem;margin:2px 0 8px}
.hero-bar{height:10px;border-radius:6px;background:#ffffff;border:1px solid #bfe0c6;overflow:hidden}
.hero-fill{height:100%;background:linear-gradient(90deg,#2f9e4a,#1c7a33);border-radius:6px;transition:width .3s}
.hero-side{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.hero-chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:inline-block;padding:3px 11px;border-radius:12px;font-size:.83rem;font-weight:600;border:1px solid transparent}
.chip-ok{background:#1c7a33;color:#fff}
.chip-wait{background:#fdf3dc;color:#8a6100;border-color:#f0dfae}
.chip-na{background:#eef0f2;color:#667;border-color:#dde1e5}
.chip-mid{background:#e7f6ea;color:#1c7a33;border-color:#bfe5c8}
.btn.act-green{background:#1c7a33;border-color:#166427;color:#fff;font-weight:600}
.btn.act-green:hover{background:#166427}
.deliv-done td{background:#f1f9f2}
.deliv-child.deliv-done td{background:#edf7ef}
.deliv-done .pill.ok{box-shadow:0 0 0 2px #d8efdc}

/* ===== v1.6.0 — statusu pogas un krāsas (Iesniegts/Projekts/Nav/N-A) ===== */
.dst-btns{display:flex;gap:4px;flex-wrap:wrap}
.dst-btn{padding:4px 9px;border-radius:8px;border:1px solid #ccd2d8;background:#fff;color:#556;font-size:.8rem;font-weight:600;cursor:pointer}
.dst-btn:hover{background:#f2f4f6}
.dst-btn.dst-ok.on{background:#1c7a33;border-color:#166427;color:#fff}
.dst-btn.dst-draft.on{background:#e0a800;border-color:#b98a00;color:#fff}
.dst-btn.dst-miss.on{background:#c62828;border-color:#a32020;color:#fff}
.dst-btn.dst-na.on{background:#2f9e4a;border-color:#1c7a33;color:#fff}
.inc-wrap{display:inline-block;margin-top:7px}
.deliv-draft td{background:#fdf6dd}
.deliv-child.deliv-draft td{background:#fbf2d2}
.deliv-missing td{background:#fdecec}
.deliv-child.deliv-missing td{background:#fbe3e3}
.deliv-table tr:target td{background:#fff3bf!important}
.chip-draft{background:#e0a800;color:#fff}
.chip-miss{background:#c62828;color:#fff}
.chip-naok{background:#e7f6ea;color:#1c7a33;border-color:#bfe5c8}
.pill.bad{background:#fdecec;color:#a32020}
.st-pill{font-weight:600}
.note-state{margin-left:6px}
.dl-badge.dl-draft{background:#fdf3dc;color:#8a6100;border-color:#e7c96a}
.dl-badge.dl-draft:hover{background:#f8ead0}
.dl-badge.dl-miss{background:#fdecec;color:#a32020;border-color:#efb9b9}
.dl-badge.dl-miss:hover{background:#fbe0e0}

/* v1.6.1 — METRUM galvenais logo, Beyron kā apakšuzņēmējs */
.brand-with{font-size:.62rem;color:#8a94a0;margin:0 2px 0 6px;white-space:nowrap;align-self:center}

/* ===== v1.7.0 — filtri un testu saites ===== */
.chip.flt{cursor:pointer;border:1px solid transparent;font:inherit;font-size:.83rem;font-weight:600}
.chip.flt:hover{filter:brightness(1.08)}
.chip.flt.flt-on{outline:2px solid #0f4c81;outline-offset:1px}
.chip.chip-all{background:#fff;color:#556;border-color:#ccd2d8;cursor:pointer;font:inherit;font-size:.83rem;font-weight:600}
.chip.chip-all:hover{background:#f2f4f6}
.run-pick{margin:0 0 14px;font-size:.85rem;color:#667}
.run-chip{display:inline-block;margin-left:6px;padding:3px 10px;border-radius:12px;border:1px solid #ccd2d8;background:#fff;color:#0f4c81;text-decoration:none;font-weight:600;font-size:.8rem}
.run-chip:hover{background:#eef2f6}
.run-chip.on{background:#0f4c81;border-color:#0b3a63;color:#fff}
.sc-link{display:inline-block;margin-right:5px;padding:1px 6px;border-radius:6px;background:#eef2f6;color:#0f4c81;text-decoration:none;font-weight:600;font-size:.78rem}
.sc-link:hover{background:#dce6f0;text-decoration:underline}
.sc-plain{display:inline-block;margin-right:5px;color:#8a94a0;font-size:.78rem}
/* scenārija izcelšana, atverot no nodevumiem */
tbody.item:target tr.it-head td{background:#fff3bf}
tbody.item:target{outline:2px solid #e0a800}
.deliv-locked{font-size:.82rem;color:#7a828b;background:#f2f4f6;border:1px dashed #ccd2d8;border-radius:6px;padding:3px 8px;display:inline-block}


/* CE-RIGHTS-SCENARIO-20260820-02 */
.scenario-edit { display:inline-block; margin-left:.35rem; vertical-align:top; }
.scenario-edit > summary { list-style:none; cursor:pointer; display:inline-block; }
.scenario-edit > summary::-webkit-details-marker { display:none; }
.scenario-edit[open] { display:block; margin:.45rem 0 0; min-width:min(680px, 72vw); }
.scenario-edit-form { display:grid; gap:.45rem; padding:.65rem; margin-top:.35rem; background:var(--card, #fff); border:1px solid #d7dce2; border-radius:8px; box-shadow:0 3px 12px rgba(0,0,0,.08); }
.scenario-edit-form label { display:grid; gap:.2rem; font-weight:600; }
.scenario-edit-form input, .scenario-edit-form textarea { width:100%; min-width:0; font-weight:400; }
.sub-edit[open] { min-width:min(560px, 64vw); }
