/* Доповнення стилів панелі Кристини поверх admin.css (той самий палітра-набір). */

.kpi__sub { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.kpi__ic.r { background: var(--red-50); color: var(--red); }
.kpi__ic.b { background: var(--blue-50); color: var(--blue); }
.kpi__ic.g { background: var(--green-50); color: var(--green-d); }
.kpi__ic.a { background: var(--amber-50); color: var(--amber); }
.kpi__ic.v { background: #F3ECFE; color: var(--violet); }

.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

.lastrun-bar {
  margin: 14px 0 4px; padding: 10px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-1);
}
.lastrun-bar svg { vertical-align: -3px; color: var(--green); }
.lastrun-bar b { color: var(--ink); }

.empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; color: var(--muted-2); font-size: 13.5px;
}
.empty svg { color: var(--green); }

.flash {
  display: flex; align-items: center; gap: 8px; padding: 11px 15px; margin-bottom: 14px;
  border-radius: var(--r); font-size: 13.5px; font-weight: 500;
}
.flash--ok  { background: var(--green-50); color: var(--green-d); box-shadow: inset 0 0 0 1px var(--green-100); }
.flash--err { background: var(--red-50); color: #B91C1C; box-shadow: inset 0 0 0 1px #FECACA; }

/* Ручний запуск */
.rungrid { padding: 12px 18px 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rungrid--full { grid-template-columns: repeat(3, 1fr); }
.runbtn-form { margin: 0; }
.runbtn {
  width: 100%; display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); cursor: pointer; transition: .12s; font-family: var(--font);
}
.runbtn:hover { border-color: var(--green); box-shadow: var(--sh-2); transform: translateY(-1px); }
.runbtn__ic { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-d); border-radius: 9px; }
.runbtn__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.runbtn__main b { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runbtn__main span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runbtn__go, .runbtn > svg:last-child { color: var(--muted-2); }

@media (max-width: 900px) { .rungrid, .rungrid--full, .grid-2 { grid-template-columns: 1fr; } }

.tag--red { background: var(--red-50) !important; color: #B91C1C !important; box-shadow: inset 0 0 0 1px #FECACA !important; }
.seg__n { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 3px; font-size: 11px;
  background: var(--line); border-radius: 8px; color: var(--muted); }
.suplink { color: var(--ink); text-decoration: none; }
.suplink:hover { color: var(--green-d); }
.suplink + .suplink::before { content: ', '; color: var(--muted-2); }

/* Список помилок */
.errlist { display: flex; flex-direction: column; }
.errrow { display: flex; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.errrow:first-child { border-top: none; }
.errrow__sev { width: 4px; flex: 0 0 4px; border-radius: 4px; background: var(--muted-3); }
.errrow__sev.high { background: var(--red); }
.errrow__sev.med  { background: var(--amber); }
.errrow__sev.low  { background: var(--muted-3); }
.errrow__body { flex: 1; min-width: 0; }
.errrow__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.errrow__src { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--green-d); }
.errrow__src svg { color: var(--muted-2); }
.errrow__class { font-size: 13.5px; font-weight: 700; color: var(--ink); font-family: var(--font-h); }
.errrow__badge { font-size: 11px; background: var(--red-50); color: #B91C1C; padding: 1px 7px; border-radius: 8px; font-weight: 700; }
.errrow__msg { font-size: 13px; color: var(--muted); }
.errrow__orders { margin-top: 6px; font-size: 12px; color: var(--muted-2); }
.errrow__orders .po { margin-right: 4px; }
.errrow__det { margin-top: 8px; }
.errrow__det summary { font-size: 12px; color: var(--blue); cursor: pointer; }
.errrow__det pre, .run-out pre {
  margin-top: 8px; padding: 12px; background: var(--navy); color: #D1D5DB;
  border-radius: var(--r-sm); font-size: 11.5px; line-height: 1.5; overflow: auto; max-height: 320px;
  white-space: pre-wrap; word-break: break-word;
}
.run-out summary { font-size: 12px; color: var(--blue); cursor: pointer; }
.po { font-family: var(--font-h); font-weight: 700; font-size: 13px; color: var(--ink); }

/* Користувачі */
.userlist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.userrow { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.userrow__av { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-d); font-weight: 700; font-size: 14px; }
.userrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.userrow__main b { font-size: 13.5px; color: var(--ink); }
.userrow__main span { font-size: 12px; color: var(--muted-2); }
.role { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.role--admin { background: var(--green-50); color: var(--green-d); }
.role--op { background: var(--blue-50); color: var(--blue); }
.role--warn { background: var(--amber-50); color: #92400E; }
.iconbtn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--muted-2); }
.iconbtn:hover { color: var(--red); border-color: #FECACA; background: var(--red-50); }

.kv { display: flex; flex-direction: column; }
.kv__row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv__row span { color: var(--muted); }
.kv__row b { color: var(--ink); }

.set-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-h); font-size: 16px; font-weight: 800; }
.set-h .ic, .sec-head h2 .ic { color: var(--green-d); }
.set-p { font-size: 12.5px; color: var(--muted); margin: 4px 0 16px; }
.set-h3 { font-size: 13.5px; font-weight: 700; margin: 4px 0 12px; display: flex; align-items: center; gap: 6px; }
.sep-line { height: 1px; background: var(--line); margin: 18px 0; }
.adduser { display: flex; flex-direction: column; gap: 12px; }

/* Логін */
.loginbody { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(900px 500px at 70% -10%, var(--green-50), transparent), var(--bg); }
.loginbox { width: 380px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 32px 30px; box-shadow: var(--sh-3); }
.loginbox__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.loginbox__brand .sidebar__logo { width: 44px; height: 44px; }
.loginbox__brand b { display: block; font-family: var(--font-h); font-size: 18px; }
.loginbox__brand span { font-size: 12px; color: var(--muted-2); }
.loginbox h1 { font-family: var(--font-h); font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.loginbox__sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.loginbox form { display: flex; flex-direction: column; gap: 14px; }
