/* =========================================================
   Darba Grafiku sistēma — stils
   Tīrs, paša rakstīts CSS. Gaiši profesionāls dizains.
   ========================================================= */

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e4e8f0;
    --border-strong: #d2d8e3;
    --text: #1e2433;
    --text-soft: #5a6478;
    --muted: #8b94a7;

    --primary: #3a6df0;
    --primary-dark: #2c54c4;
    --primary-soft: #e8f0ff;
    --green: #1faa6b;
    --green-soft: #e3f7ee;
    --amber: #e0921a;
    --amber-soft: #fdf2dd;
    --red: #e0463e;
    --red-soft: #fde8e7;
    --purple: #7a5af0;
    --purple-soft: #ede9fd;

    /* Aliasi jaunajiem komponentiem */
    --success: #1faa6b;
    --warn: #e0921a;
    --danger: #e0463e;
    --card: #ffffff;

    --sidebar-w: 248px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(20,30,60,.06), 0 6px 24px rgba(20,30,60,.05);
    --shadow-lg: 0 10px 40px rgba(20,30,60,.16);
    --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
    --t: .18s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { line-height: 1.25; font-weight: 650; }
h2 { font-size: 1.15rem; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; border: 1px solid var(--border); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: #161c2d;
    color: #c5cdde;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    flex-shrink: 0;
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 24px; }
.sidebar__logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff; font-weight: 800; font-size: 1rem;
    display: grid; place-items: center; letter-spacing: .5px;
}
.sidebar__brandtext strong { display: block; color: #fff; font-size: .98rem; }
.sidebar__brandtext small { color: #7e889d; font-size: .76rem; }
.sidebar__nav { padding: 0 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.navlink {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    color: #b3bcd0; font-weight: 500; transition: var(--t);
}
.navlink:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.navlink.is-active { background: var(--primary); color: #fff; }
.navlink svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar__footer { padding: 16px 20px; color: #5f6982; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar__overlay { display: none; }

/* ---------- Topbar ---------- */
.topbar {
    height: 64px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 1.1rem; font-weight: 650; flex: 1; }
.topbar__menu { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.topbar__menu span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.topbar__user { display: flex; align-items: center; gap: 9px; font-weight: 550; color: var(--text-soft); }
.topbar__avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 700; }

/* ---------- Content ---------- */
.content { padding: 24px; max-width: 1400px; width: 100%; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card__header { margin-bottom: 16px; }
.card__header--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card h2 { margin-bottom: 4px; }

/* ---------- Dashboard ---------- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 16px; margin-bottom: 0; }
.stat-card__icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.stat-card__icon svg { width: 24px; height: 24px; }
.stat-card__icon--blue { background: var(--primary-soft); color: var(--primary); }
.stat-card__icon--green { background: var(--green-soft); color: var(--green); }
.stat-card__icon--amber { background: var(--amber-soft); color: var(--amber); }
.stat-card__icon--red { background: var(--red-soft); color: var(--red); }
.stat-card__value { display: block; font-size: 1.5rem; font-weight: 750; }
.stat-card__label { color: var(--muted); font-size: .82rem; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; }
.quick-action {
    display: flex; align-items: center; gap: 12px; padding: 18px;
    border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
    color: var(--text); font-weight: 600; transition: var(--t);
}
.quick-action:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; transform: translateY(-2px); }
.quick-action__plus { font-size: 1.3rem; width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
    transition: var(--t); white-space: nowrap; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: var(--surface); color: var(--text-soft); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn--danger:hover { background: var(--red); color: #fff; }
.btn--sm { padding: 6px 11px; font-size: .82rem; }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field__label { font-size: .82rem; font-weight: 600; color: var(--text-soft); }
.field input[type=text], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=time], .field input[type=search],
.field select, .input-search, .input-select,
input[type=text], input[type=time], input[type=number] {
    padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .9rem; background: var(--surface); color: var(--text); width: 100%;
    transition: var(--t);
}
.field input:focus, .field select:focus, input:focus, select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field--checkbox { flex-direction: row; align-items: center; gap: 9px; }
.field--checkbox input { width: 17px; height: 17px; accent-color: var(--primary); }
.field--inline { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 0 18px; }
.form-grid__full { grid-column: 1 / -1; margin-top: 8px; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 0 16px; margin-bottom: 14px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.input-search { max-width: 320px; }
.input-select { max-width: 180px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { text-align: left; padding: 12px 14px; background: var(--surface-2); color: var(--text-soft); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .muted { color: var(--muted); font-size: .85rem; }
.empty-row td { text-align: center; color: var(--muted); padding: 28px; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .76rem; font-weight: 650; }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--gray { background: var(--surface-2); color: var(--muted); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--red { background: var(--red-soft); color: var(--red); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 550; border: 1px solid transparent; }
.alert--success { background: var(--green-soft); color: var(--green); }
.alert--error { background: var(--red-soft); color: var(--red); }
.alert--info { background: var(--primary-soft); color: var(--primary-dark); }
.alert--warning { background: var(--amber-soft); color: var(--amber); }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #1c2438, #2c3a5e); padding: 20px; }
.login-card { background: var(--surface); border-radius: 18px; padding: 38px 34px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-card__brand { text-align: center; margin-bottom: 24px; }
.login-card__brand .sidebar__logo { margin: 0 auto 14px; width: 56px; height: 56px; font-size: 1.3rem; border-radius: 14px; }
.login-card__brand h1 { font-size: 1.4rem; }
.login-card__brand p { color: var(--muted); font-size: .9rem; }
.login-form { display: flex; flex-direction: column; gap: 4px; }
.login-hint { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 16px; }

/* ---------- Wizard ---------- */
.wizard__steps { display: flex; list-style: none; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; counter-reset: step; }
.wizard__steps li { flex: 1; min-width: 110px; padding: 12px 14px 12px 42px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .85rem; position: relative; counter-increment: step; }
.wizard__steps li::before { content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; color: var(--muted); border: 1px solid var(--border-strong); }
.wizard__steps li.is-active { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.wizard__steps li.is-active::before { background: var(--primary); color: #fff; border-color: var(--primary); }
.wizard__steps li.is-done::before { content: "✓"; background: var(--green); color: #fff; border-color: var(--green); }
.wizard__panel { display: none; animation: fade .2s ease; }
.wizard__panel.is-active { display: block; }
.wizard__nav { display: flex; justify-content: space-between; align-items: center; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 8px; }
.checklist__item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--t); }
.checklist__item:hover { border-color: var(--primary); background: var(--primary-soft); }
.checklist__item input { width: 17px; height: 17px; accent-color: var(--primary); }
.counter { padding: 4px 12px; background: var(--surface-2); border-radius: 20px; font-weight: 700; font-size: .82rem; color: var(--text-soft); }
.counter.is-over { background: var(--amber-soft); color: var(--amber); }

/* ---------- Calendar ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0; max-width: 520px; }
.calendar__dow { text-align: center; font-size: .76rem; font-weight: 700; color: var(--muted); padding: 4px; }
.calendar__day { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text); transition: var(--t); }
.calendar__day:hover { border-color: var(--primary); }
.calendar__day.is-empty { border: none; background: transparent; cursor: default; }
.calendar__day.is-weekend { color: var(--red); }
.calendar__day.is-selected { background: var(--amber); color: #fff; border-color: var(--amber); }

/* ---------- Legend ---------- */
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0; font-size: .82rem; color: var(--text-soft); }
.legend__item { display: flex; align-items: center; gap: 7px; }
.chip { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.chip--work { background: var(--primary-soft); border: 1px solid var(--primary); }
.chip--off { background: var(--surface-2); border: 1px solid var(--border-strong); }
.chip--vac { background: var(--purple-soft); border: 1px solid var(--purple); }
.chip--restrict { background: var(--amber-soft); border: 1px solid var(--amber); }
.chip--conflict { background: var(--red-soft); border: 1px solid var(--red); }

/* ---------- Schedule table ---------- */
.schedule-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.schedule-table { border-collapse: collapse; font-size: .8rem; white-space: nowrap; }
.schedule-table th, .schedule-table td { border: 1px solid var(--border); padding: 5px 6px; text-align: center; }
.schedule-table thead th { background: var(--surface-2); position: sticky; top: 0; font-weight: 650; }
.schedule-table .sch-name { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 600; min-width: 150px; z-index: 2; box-shadow: 1px 0 0 var(--border); }
.schedule-table thead .sch-name { z-index: 3; background: var(--surface-2); }
.schedule-table .sch-dayhead { min-width: 54px; }
.schedule-table .sch-dayhead small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.schedule-table .sch-dayhead.is-weekend { background: #fbeceb; color: var(--red); }
.sch-cell { cursor: pointer; transition: var(--t); position: relative; }
.sch-cell:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
.sch-work { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.sch-off { background: var(--surface); color: var(--muted); }
.sch-vacation { background: var(--purple-soft); color: var(--purple); font-weight: 700; }
.sch-restrict { background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.sch-cell.has-warn::after { content: "⚠"; position: absolute; top: 1px; right: 2px; font-size: .65rem; }
.sch-total { background: var(--surface-2); font-weight: 700; position: sticky; right: 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,26,42,.55); backdrop-filter: blur(2px); animation: fade .15s; }
.modal__dialog { position: relative; background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal__dialog--sm { max-width: 380px; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__close { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__body { padding: 20px 22px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }

/* ---------- Loading / spinner ---------- */
.loading { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--text-soft); font-weight: 600; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--text); color: #fff; padding: 13px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-weight: 550; animation: slidein .25s ease; max-width: 340px; }
.toast--success { background: var(--green); }
.toast--error { background: var(--red); }
.toast--info { background: var(--primary); }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

.muted { color: var(--muted); }

/* ---------- Warnings list ---------- */
.warnings-list { background: var(--amber-soft); border: 1px solid var(--amber); border-radius: var(--radius-sm); padding: 14px 16px 14px 18px; margin-bottom: 16px; }
.warnings-list h4 { color: var(--amber); margin-bottom: 8px; }
.warnings-list ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.warnings-list li { font-size: .86rem; color: #8a5a10; padding-left: 18px; position: relative; }
.warnings-list li::before { content: "•"; position: absolute; left: 4px; }
.warnings-ok { background: var(--green-soft); border: 1px solid var(--green); color: var(--green); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform var(--t); }
    .sidebar.is-open { transform: none; }
    .sidebar__overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; opacity: 0; pointer-events: none; transition: var(--t); }
    .sidebar__overlay.is-open { opacity: 1; pointer-events: auto; }
    .topbar__menu { display: flex; }
    .content { padding: 16px; }
    .actions-cell { flex-wrap: wrap; }
}

/* ---------- Print ---------- */
@media print {
    .sidebar, .topbar, .wizard, .btn, .legend, .btn-group, .toast-container { display: none !important; }
    .app-main, .content { padding: 0; }
    .card { box-shadow: none; border: none; }
    .schedule-scroll { overflow: visible; border: none; }
    .schedule-table { font-size: 7pt; }
    body { background: #fff; }
}

/* ============================================================
   UZLABOJUMI: pieejamība, maiņu pills, kvalitātes panelis,
   iepr. mēneša 5 dienas, tipizēti brīdinājumi, command center
   ============================================================ */

/* Hint teksts */
.hint { margin-top: 12px; font-size: .85rem; color: var(--muted); line-height: 1.5; }

/* Modāļa sadaļa (pieejamība darbinieka modālī) */
.modal__section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal__section-title { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.modal__body textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: inherit; font-size: .9rem; resize: vertical; }

/* Mazas pills (pieejamība tabulā, maiņu birkas) */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.pill--soft { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); margin-right: 3px; }
.pill--warn { background: var(--amber-soft); color: var(--amber); }
.pill--work { background: var(--primary-soft); color: var(--primary-dark); }
.pill--vac { background: var(--purple-soft); color: var(--purple); }
.pill--restrict { background: var(--amber-soft); color: var(--amber); }
.pill--off { background: var(--surface-2); color: var(--muted); }

.badge--violet { background: var(--purple-soft); color: var(--purple); }

/* Command Center kopsavilkums */
.cmd-summary { background: linear-gradient(135deg, #1c2440, #25305a); color: #eef2fb; border: none; }
.cmd-summary h2 { color: #fff; }
.cmd-summary .muted { color: #aeb8d4; }
.cmd-summary__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cmd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.cmd-stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 14px 16px; }
.cmd-stat__val { font-size: 1.6rem; font-weight: 750; line-height: 1; }
.cmd-stat__label { font-size: .76rem; color: #aeb8d4; margin-top: 6px; }
.cmd-stat.is-good .cmd-stat__val { color: #5fe0a3; }
.cmd-stat.is-warn .cmd-stat__val { color: #f5c365; }
.cmd-stat.is-bad .cmd-stat__val { color: #f5928c; }

/* Kvalitātes gredzens */
.quality { display: flex; align-items: center; gap: 14px; }
.quality__ring { width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--success) 0deg, rgba(255,255,255,.15) 0deg); display: grid; place-items: center; position: relative; }
.quality__ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #1c2440; }
.quality__ring span { position: relative; font-size: 1.7rem; font-weight: 800; color: #fff; }
.quality__label { font-size: .95rem; font-weight: 700; color: #eef2fb; max-width: 130px; }

/* Tipizēti brīdinājumi */
.warnings-list { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin: 14px 0; }
.warnings-list h4 { font-size: .9rem; margin-bottom: 10px; color: var(--text); }
.warnings-list ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.warn { display: flex; align-items: flex-start; gap: 9px; padding: 8px 11px; border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.45; border-left: 3px solid var(--border-strong); }
.warn__icon { flex: 0 0 auto; }
.warn--critical { background: var(--red-soft); color: #9c2f29; border-left-color: var(--danger); }
.warn--warning { background: var(--amber-soft); color: #8a5a10; border-left-color: var(--warn); }
.warn--info { background: var(--primary-soft); color: var(--primary-dark); border-left-color: var(--primary); }
.warnings-ok { background: var(--green-soft); color: var(--green); padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 650; margin: 14px 0; }

/* Iepriekšējā mēneša 5 dienas */
.prev5-wrap { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.prev5-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prev5-row__name { flex: 0 0 180px; font-weight: 600; font-size: .9rem; }
.prev5-row__blocks { display: flex; gap: 8px; flex-wrap: wrap; }
.prev5-block { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 70px; padding: 7px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: var(--t); font-family: inherit; }
.prev5-block:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.prev5-block__date { font-size: .72rem; color: var(--muted); font-weight: 600; }
.prev5-block__status { font-size: .8rem; font-weight: 650; }
.prev5-block.st-worked { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.prev5-block.st-off { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-soft); }
.prev5-block.st-vacation { background: var(--purple-soft); border-color: var(--purple); color: var(--purple); }
.prev5-block.st-unknown { background: var(--surface); border-color: var(--border-strong); color: var(--muted); border-style: dashed; }

/* Grafika tabula: pills + sticky kolonnas + papildu kopsavilkuma kolonnas */
.schedule-table .sch-cell { padding: 4px 3px; text-align: center; }
.schedule-table .sch-cell .pill { font-size: .68rem; padding: 2px 5px; }
.sch-cell.is-exception .pill--work { outline: 1.5px dashed var(--amber); }
.cell-warn { position: absolute; top: 0; right: 1px; font-size: .6rem; }
.schedule-table .sch-sum { background: var(--surface-2); font-size: .78rem; text-align: center; padding: 6px 8px; border-left: 1px solid var(--border); white-space: nowrap; }
.schedule-table .sch-sum.is-over { color: var(--amber); font-weight: 700; }
.schedule-table .sch-sum.is-under { color: var(--red); font-weight: 700; }
.schedule-table .sch-sum.is-ok { color: var(--green); font-weight: 700; }
.schedule-table .sch-sum.is-bad { color: var(--red); font-weight: 700; }
.schedule-table .sch-sum.is-vac { color: var(--purple); font-weight: 700; }
.schedule-table thead th.sch-name,
.schedule-table tbody td.sch-name { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.schedule-table thead th.sch-name { z-index: 3; background: var(--surface-2); }

/* Drukāšana: paslēpj vedni un pogas */
@media print {
    .sidebar, .topbar, .wizard, .btn-group, .legend, .cmd-summary__head .quality { display: none !important; }
    .schedule-scroll { overflow: visible !important; }
    .card { box-shadow: none !important; border: none !important; }
}

/* Grafika šūnu papildinformācija: maiņas stundas, atvaļinājuma apakšteksts */
.schedule-table .cell-hrs { display: block; font-size: .6rem; color: var(--muted); margin-top: 1px; }
.schedule-table .cell-sub { display: block; font-size: .58rem; color: var(--purple); margin-top: 1px; line-height: 1.1; }
.schedule-table .sch-vacation { background: var(--purple-soft); }
.schedule-table .sch-vacation.is-vac-weekend { background: repeating-linear-gradient(45deg, var(--purple-soft), var(--purple-soft) 4px, #e4dcfb 4px, #e4dcfb 8px); }
.schedule-table .sch-vacation .pill--vac { background: var(--purple); color: #fff; }

/* Scrollable brīdinājumu saraksts (kad daudz paziņojumu) */
.warnings-list ul { max-height: 220px; overflow-y: auto; padding-right: 6px; }
.warnings-list ul::-webkit-scrollbar { width: 8px; }
.warnings-list ul::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* Kopsavilkuma kolonnu pilnie nosaukumi — kompakti, lasāmi */
.schedule-table th.sch-sum { font-size: .64rem; font-weight: 650; line-height: 1.15; min-width: 64px; max-width: 78px; white-space: normal; vertical-align: bottom; padding: 6px 5px; color: var(--text-soft); }

/* Pielāgotā laika lauki šūnas modālī */
#cellCustomField { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 4px; }
#cellCustomHint { margin-top: 6px; }

/* Automātiskās saglabāšanas statuss (ierobežojumi) */
.save-status { font-size: .82rem; color: var(--muted); margin-top: 10px; transition: color .2s; }
.save-status.is-saved { color: var(--success); font-weight: 600; }


/* Drag & drop maiņu pārvilkšana fināla grafikā */
.schedule-table .sch-cell[draggable="true"] { cursor: grab; }
.schedule-table .sch-cell[draggable="true"]:active { cursor: grabbing; }
.schedule-table .sch-cell.is-dragging { opacity: .45; outline: 2px dashed var(--primary); outline-offset: -2px; }
.schedule-table .sch-cell.is-drag-over { outline: 2px solid var(--success); outline-offset: -2px; background: var(--green-soft); }

/* ---------- v8: jaudīgāks grafika ģeneratora UX ---------- */
.generator-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
    gap: 22px;
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(58,109,240,.20), transparent 32%),
        linear-gradient(135deg, #17213a, #263b78 58%, #3a6df0);
    color: #edf3ff;
    border: 0;
    overflow: hidden;
    position: relative;
}
.generator-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,.10);
    border-radius: 50%;
}
.generator-hero h2 { color: #fff; font-size: clamp(1.35rem, 2.2vw, 2rem); margin: 6px 0 8px; }
.generator-hero p { color: #cdd9ff; max-width: 760px; }
.eyebrow { color: #9ed0ff; text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .09em; }
.generator-hero__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; z-index: 1; }
.generator-hero__metrics div { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px; backdrop-filter: blur(12px); }
.generator-hero__metrics strong { display: block; font-size: 1.55rem; color: #fff; line-height: 1; }
.generator-hero__metrics span { display: block; color: #cdd9ff; font-size: .78rem; margin-top: 7px; }
.wizard { position: relative; }
.wizard__steps {
    position: sticky;
    top: 76px;
    z-index: 12;
    padding: 8px;
    background: rgba(244,246,251,.84);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(210,216,227,.65);
}
.wizard__steps li { box-shadow: 0 1px 0 rgba(255,255,255,.85) inset; }
.btn:disabled { opacity: .65; cursor: wait; }
.btn.is-loading { box-shadow: 0 0 0 4px var(--primary-soft); }
.generate-command { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.generation-panel {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fbff, #fff);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.generation-panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.generation-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.generation-steps span {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    background: var(--surface);
    font-weight: 700;
}
.generation-steps span.is-active { color: var(--primary-dark); background: var(--primary-soft); border-color: rgba(58,109,240,.35); }
.generation-steps span.is-done { color: var(--green); background: var(--green-soft); border-color: rgba(31,170,107,.28); }
.generation-panel p { color: var(--text-soft); font-size: .88rem; }
.schedule-scroll { max-height: 72vh; }
.schedule-table thead th { position: sticky; top: 0; z-index: 3; }
.schedule-table .sch-name { position: sticky; left: 0; z-index: 4; }
.schedule-table tbody .sch-name { z-index: 2; }
.sch-cell[draggable="true"] { cursor: grab; }
.sch-cell.is-drag-over { outline: 2px dashed var(--primary); outline-offset: -4px; background: var(--primary-soft); }
.sch-cell.is-dragging { opacity: .45; }

@media (max-width: 900px) {
    .generator-hero, .generate-command { grid-template-columns: 1fr; }
    .generator-hero__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wizard__steps { position: static; }
}
@media (max-width: 620px) {
    .generator-hero__metrics, .generation-steps { grid-template-columns: 1fr; }
}

/* ---------- v9: rlCode premium UI/UX polish ---------- */
:root {
    --bg: #eef3fb;
    --surface: #ffffff;
    --surface-2: #f7f9fd;
    --border: #dfe6f2;
    --border-strong: #c7d2e4;
    --text: #0f172a;
    --text-soft: #536079;
    --muted: #8791a6;
    --primary: #315cf6;
    --primary-dark: #1d3fc7;
    --primary-soft: #e9efff;
    --green: #0f9f6e;
    --green-soft: #e3f8ef;
    --amber: #d78612;
    --amber-soft: #fff3d9;
    --red: #df3d3d;
    --red-soft: #fde8e8;
    --purple: #6947e8;
    --purple-soft: #eee9ff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 8px 28px rgba(15, 23, 42, .07);
    --shadow-lg: 0 22px 70px rgba(15, 23, 42, .18);
}
body {
    background:
        radial-gradient(circle at 16% 0%, rgba(49, 92, 246, .12), transparent 34%),
        radial-gradient(circle at 92% 8%, rgba(15, 159, 110, .10), transparent 26%),
        linear-gradient(180deg, #f6f8fc 0%, var(--bg) 100%);
}
.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111a30 58%, #101827 100%);
    border-right: 1px solid rgba(255,255,255,.07);
}
.sidebar__brand { padding: 24px 20px 28px; }
.sidebar__logo {
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #635bff 48%, #22c55e 120%);
    box-shadow: 0 12px 32px rgba(49,92,246,.35);
}
.sidebar__brandtext strong { letter-spacing: -.02em; font-size: 1.05rem; }
.sidebar__brandtext small { color: #96a4bf; }
.navlink { border: 1px solid transparent; margin: 1px 0; }
.navlink:hover { background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.06); }
.navlink.is-active {
    background: linear-gradient(135deg, #315cf6, #244bd4);
    box-shadow: 0 10px 28px rgba(49,92,246,.30);
}
.topbar {
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}
.topbar__title { font-size: 1.15rem; letter-spacing: -.02em; }
.content { max-width: 1540px; padding: 26px clamp(18px, 2vw, 34px); }
.card {
    border-color: rgba(199,210,228,.82);
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
}
.card h2 { letter-spacing: -.025em; font-size: 1.22rem; }
.generator-hero {
    min-height: 188px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 14% 16%, rgba(125, 211, 252, .36), transparent 31%),
        radial-gradient(circle at 88% 26%, rgba(74, 222, 128, .22), transparent 29%),
        linear-gradient(135deg, #0f172a 0%, #172554 48%, #315cf6 100%);
    box-shadow: 0 24px 80px rgba(15,23,42,.25);
    padding: 28px;
}
.generator-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.65), transparent 78%);
}
.generator-hero__copy, .generator-hero__metrics { position: relative; z-index: 1; }
.generator-hero h2 { font-size: clamp(1.7rem, 2.6vw, 2.6rem); letter-spacing: -.05em; }
.generator-hero p { font-size: 1rem; line-height: 1.7; color: #dbe7ff; }
.eyebrow { color: #93c5fd; letter-spacing: .14em; }
.generator-hero__metrics div {
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 16px 38px rgba(0,0,0,.12);
}
.generator-hero__metrics strong { font-size: 1.85rem; letter-spacing: -.04em; }
.wizard__steps {
    gap: 10px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 16px 50px rgba(15,23,42,.08);
}
.wizard__steps li {
    border-radius: 14px;
    border: 1px solid rgba(199,210,228,.82);
    background: rgba(255,255,255,.78);
    color: #64748b;
    font-weight: 750;
}
.wizard__steps li.is-active {
    background: linear-gradient(135deg, #315cf6, #244bd4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(49,92,246,.25);
}
.wizard__steps li.is-done {
    background: linear-gradient(135deg, #e4f8ef, #f4fff9);
    color: #0f7d59;
    border-color: rgba(15,159,110,.20);
}
.btn {
    border-radius: 12px;
    font-weight: 750;
    box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
}
.btn--primary {
    background: linear-gradient(135deg, #315cf6, #244bd4);
    box-shadow: 0 12px 28px rgba(49,92,246,.26);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 38px rgba(49,92,246,.33); }
.btn--ghost { background: rgba(255,255,255,.74); }
.field input[type=text], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=time], .field input[type=search],
.field select, .input-search, .input-select,
input[type=text], input[type=time], input[type=number] {
    min-height: 42px;
    border-radius: 13px;
    background: #fff;
}
.field__label { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.calendar__day, .checklist__item, .prev5-block {
    border-radius: 14px;
}
.prev5-row {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 16px;
}
.prev5-block.st-worked { background: linear-gradient(180deg, #e9efff, #dfe8ff); }
.prev5-block.st-off { background: linear-gradient(180deg, #fff, #f2f6fb); }
.prev5-block.st-vacation { background: linear-gradient(180deg, #f1ecff, #e8ddff); }
.generate-command {
    grid-template-columns: minmax(270px, 390px) 1fr;
}
.generation-panel {
    background:
        radial-gradient(circle at top left, rgba(49,92,246,.09), transparent 35%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    border-radius: 20px;
}
.generation-steps span { border-radius: 12px; }
.cmd-summary {
    border: 0;
    color: #eff6ff;
    background:
        radial-gradient(circle at 90% 0%, rgba(34,197,94,.23), transparent 24%),
        linear-gradient(135deg, #0f172a, #18243d 58%, #233b78);
    box-shadow: 0 24px 80px rgba(15,23,42,.23);
}
.cmd-summary h2 { color: #fff; font-size: 1.55rem; }
.cmd-summary .muted { color: #bac7df; }
.legend {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
}
.schedule-scroll {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: auto;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.schedule-table th {
    background: linear-gradient(180deg, #f8fafc, #edf3fb);
    color: #46536a;
    font-weight: 800;
}
.schedule-table td { background: rgba(255,255,255,.98); }
.schedule-table .sch-name { font-weight: 800; color: #111827; }
.schedule-table .pill {
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: -.01em;
    box-shadow: 0 1px 0 rgba(255,255,255,.68) inset;
}
.schedule-table .pill--work { background: linear-gradient(135deg, #315cf6, #5b7cfa); color: #fff; }
.schedule-table .pill--off { background: #eef2f7; color: #5f6c80; }
.schedule-table .pill--restrict { background: var(--amber-soft); color: #9a5b05; }
.schedule-table .pill--vac { background: linear-gradient(135deg, #6947e8, #8b6df2); color: #fff; }
.warnings-ok {
    border: 1px solid rgba(15,159,110,.18);
    background: linear-gradient(135deg, #e3f8ef, #f4fff9);
}
.alert { border-radius: 14px; }
.modal__dialog { border-radius: 20px; box-shadow: var(--shadow-lg); }
@media (max-width: 900px) {
    .generator-hero, .generate-command { grid-template-columns: 1fr; }
    .generator-hero__metrics { grid-template-columns: 1fr; }
}

/* ---------- v10: profesionāla premium versija ---------- */
:root {
    --ink: #07111f;
    --blue-50: #eef4ff;
    --line-soft: rgba(148, 163, 184, .24);
    --glass: rgba(255, 255, 255, .78);
    --shadow-premium: 0 18px 60px rgba(15, 23, 42, .10);
    --shadow-floating: 0 24px 90px rgba(15, 23, 42, .18);
}
body {
    color: var(--ink);
    letter-spacing: -.006em;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(49, 92, 246, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 92, 246, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.28), transparent 48%);
    z-index: -1;
}
.topbar {
    min-height: 70px;
    height: auto;
    padding-block: 12px;
}
.topbar__heading {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.topbar__kicker {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.topbar__title {
    font-size: clamp(1.05rem, 1.25vw, 1.28rem);
    line-height: 1.15;
}
.topbar__avatar {
    border: 1px solid rgba(49, 92, 246, .14);
    box-shadow: 0 10px 24px rgba(49, 92, 246, .12);
}
.sidebar__footer small {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.sidebar__footer small::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34,197,94,.12);
}
.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 156px;
    padding: 28px;
    border: 0;
    color: #eff6ff;
    background:
        radial-gradient(circle at 8% 18%, rgba(96,165,250,.42), transparent 30%),
        radial-gradient(circle at 92% 6%, rgba(45,212,191,.25), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #172554 55%, #244bd4 100%);
    box-shadow: var(--shadow-floating);
    overflow: hidden;
    position: relative;
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.58), transparent 80%);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h2 {
    color: #fff;
    font-size: clamp(1.45rem, 2.2vw, 2.2rem);
    letter-spacing: -.045em;
    margin: 2px 0 8px;
}
.page-hero p {
    max-width: 760px;
    color: #dbe7ff;
    font-size: .98rem;
    line-height: 1.72;
}
.page-hero .btn--primary {
    background: #fff;
    color: #18306e;
    box-shadow: 0 18px 42px rgba(0,0,0,.18);
}
.page-hero--compact { min-height: 132px; }
.card {
    position: relative;
    overflow: clip;
    border-color: rgba(203, 213, 225, .72);
    box-shadow: var(--shadow-premium);
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
}
.card__header { gap: 6px; }
.card h2 + .muted,
.card__header .muted { max-width: 820px; }
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat-card {
    min-height: 112px;
    border: 1px solid rgba(203,213,225,.66);
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.93));
}
.stat-card__icon {
    border-radius: 17px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}
.stat-card__value {
    font-size: clamp(1.35rem, 2vw, 1.82rem);
    letter-spacing: -.045em;
}
.quick-action {
    border-style: solid;
    border-color: rgba(203,213,225,.76);
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.86));
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
}
.quick-action:hover {
    border-color: rgba(49,92,246,.36);
    box-shadow: 0 16px 38px rgba(49,92,246,.12);
}
.quick-action__plus {
    color: var(--primary);
    font-weight: 900;
    border: 1px solid var(--border);
    background: #fff;
}
.btn { min-height: 38px; }
.btn--sm { min-height: 32px; }
.btn--lg { min-height: 50px; }
.btn:focus-visible,
.navlink:focus-visible,
.calendar__day:focus-visible,
.prev5-block:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(49,92,246,.24);
    outline-offset: 2px;
}
.field input[type=text], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=time], .field input[type=search],
.field select, .input-search, .input-select,
input[type=text], input[type=time], input[type=number] {
    border-color: rgba(148,163,184,.46);
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}
.toolbar {
    padding: 12px;
    background: rgba(248,250,252,.72);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.table-wrap {
    border-radius: 16px;
    border-color: rgba(203,213,225,.82);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
}
.data-table th {
    background: linear-gradient(180deg, #f8fafc, #eef4fb);
    color: #475569;
    font-size: .72rem;
    letter-spacing: .075em;
}
.data-table td { height: 50px; }
.data-table tbody tr { transition: background .16s ease, transform .16s ease; }
.data-table tbody tr:hover { background: #f8fbff; }
.empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 38px 20px;
    text-align: center;
    color: var(--text-soft);
}
.empty-state strong {
    color: var(--text);
    font-size: 1.02rem;
}
.empty-state span { max-width: 480px; }
.badge {
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}
.badge--violet { background: var(--purple-soft); color: var(--purple); }
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 22px;
}
.pill--soft { background: #eef4ff; color: #315cf6; padding: 2px 8px; }
.pill--warn { background: var(--amber-soft); color: #935808; padding: 2px 8px; }
.generator-hero {
    border: 0;
    isolation: isolate;
}
.generator-hero__metrics div {
    backdrop-filter: blur(14px);
}
.wizard__steps {
    padding: 10px;
    border: 1px solid rgba(203,213,225,.72);
    backdrop-filter: blur(18px);
}
.wizard__steps li {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.checklist {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.checklist__item {
    min-height: 54px;
    border-color: rgba(203,213,225,.78);
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.checklist__item:hover {
    border-color: rgba(49,92,246,.36);
    transform: translateY(-1px);
}
.calendar {
    max-width: 580px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}
.calendar__day {
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(15,23,42,.035);
}
.calendar__day.is-selected {
    background: linear-gradient(135deg, var(--amber), #f59e0b);
    box-shadow: 0 10px 22px rgba(217,119,6,.18);
}
.prev5-wrap {
    gap: 12px;
}
.prev5-row {
    border-color: rgba(203,213,225,.76);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
    box-shadow: 0 10px 28px rgba(15,23,42,.045);
}
.prev5-row__name { color: var(--text); }
.prev5-block {
    min-width: 82px;
    min-height: 58px;
    border-width: 1px;
}
.prev5-block__date { letter-spacing: .04em; }
.legend {
    gap: 12px 18px;
}
.chip--prev {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border: 1px solid #94a3b8;
}
.schedule-scroll {
    max-height: 76vh;
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(226,232,240,.42), transparent 84px) left / 84px 100% no-repeat,
        #fff;
}
.schedule-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    font-size: .78rem;
}
.schedule-table th,
.schedule-table td {
    border-color: rgba(203,213,225,.72);
}
.schedule-table .sch-dayhead {
    min-width: 62px;
    height: 52px;
}
.schedule-table .sch-dayhead small {
    margin-top: 2px;
    font-weight: 800;
    letter-spacing: .02em;
}
.schedule-table .sch-prevhead {
    color: #8996aa;
    background:
        linear-gradient(180deg, #f1f5f9, #e8edf5);
    opacity: .86;
}
.schedule-table .sch-prevhead small { color: #a1abba; }
.schedule-table .sch-prevhead::after {
    content: "iepr.";
    display: block;
    margin-top: 2px;
    color: #a1abba;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.schedule-table .sch-prev-cell {
    background:
        linear-gradient(180deg, rgba(248,250,252,.82), rgba(241,245,249,.78));
    color: #94a3b8;
    opacity: .72;
    cursor: default;
    pointer-events: none;
}
.schedule-table .sch-prev-cell .cell-sub {
    color: #8b97a9;
    font-size: .55rem;
    white-space: normal;
}
.schedule-table .pill--prev {
    min-width: 30px;
    padding: 2px 8px;
    color: #64748b;
    background: #e2e8f0;
    border: 1px solid rgba(148,163,184,.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.schedule-table .pill--prev-worked { background: #dbe5ff; color: #425c9f; }
.schedule-table .pill--prev-off { background: #edf2f7; color: #64748b; }
.schedule-table .pill--prev-vacation { background: #e8ddff; color: #7152cc; }
.schedule-table .pill--prev-unknown { background: #f1f5f9; color: #94a3b8; border-style: dashed; }
.schedule-table .is-transition-edge {
    box-shadow: inset -10px 0 16px -16px rgba(15,23,42,.55);
}
.schedule-table .is-current-start {
    box-shadow: inset 10px 0 16px -16px rgba(15,23,42,.55);
}
.schedule-table .sch-cell {
    min-width: 62px;
    height: 54px;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.schedule-table .sch-cell:not(.sch-prev-cell):hover {
    box-shadow: inset 0 0 0 2px rgba(49,92,246,.22);
    background: #f8fbff;
}
.schedule-table .cell-hrs,
.schedule-table .cell-sub {
    font-weight: 750;
}
.schedule-table .sch-sum {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.warnings-list {
    border-radius: 16px;
    border: 1px solid rgba(217,119,6,.24);
    background: linear-gradient(180deg, #fffaf0, #fff7ed);
}
.warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
}
.warn__icon { width: 22px; text-align: center; }
.warnings-ok {
    padding: 14px 16px;
    border-radius: 16px;
    color: #0b7a55;
    font-weight: 800;
}
.cmd-stat {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
}
.quality__ring {
    box-shadow: inset 0 0 0 10px rgba(255,255,255,.09), 0 20px 46px rgba(0,0,0,.20);
}
.modal__dialog {
    border: 1px solid rgba(255,255,255,.82);
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.login-body {
    background:
        radial-gradient(circle at 18% 0%, rgba(59,130,246,.28), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(34,197,94,.18), transparent 28%),
        linear-gradient(135deg, #0f172a, #172554 58%, #244bd4);
}
.login-card {
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 0 30px 110px rgba(0,0,0,.28);
}
.login-card__brand h1 { letter-spacing: -.04em; }
@media (max-width: 900px) {
    .page-hero { align-items: flex-start; flex-direction: column; }
    .topbar__user { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media print {
    body { background: #fff !important; }
    body::before, .sidebar, .topbar, .wizard, .generator-hero, .btn-group, .legend, .hint, .page-hero { display: none !important; }
    .content { padding: 0; max-width: none; }
    .card { box-shadow: none; border: 0; padding: 0; }
    .schedule-scroll { max-height: none; overflow: visible; border: 0; }
    .schedule-table .sch-prevhead,
    .schedule-table .sch-prev-cell { opacity: .48; }
}
.topbar__title { flex: initial; }
.schedule-table .sch-prev-cell { pointer-events: auto; }

/* ---------- v11: profesionālāks grafika atspoguļojums ---------- */
.schedule-scroll {
    overflow: auto;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(248,250,252,.98), rgba(248,250,252,.86) 96px, transparent 160px) left top / 160px 100% no-repeat,
        linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.85),
        0 16px 36px rgba(15, 23, 42, .07);
}

.schedule-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .78rem;
    color: #334155;
}

.schedule-table th,
.schedule-table td {
    border-right: 1px solid rgba(203, 213, 225, .72);
    border-bottom: 1px solid rgba(203, 213, 225, .72);
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.schedule-table .sch-period {
    padding: 10px 12px;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.schedule-table .sch-period--prev {
    color: #8a96a8;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.schedule-table .sch-period--current {
    color: #3653a4;
    background: linear-gradient(180deg, #eef4ff, #e7f0ff);
}

.schedule-table .sch-period--summary {
    color: #4b5563;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.schedule-table .sch-name,
.schedule-table tbody .sch-name {
    position: sticky;
    left: 0;
    z-index: 6;
    min-width: 188px;
    max-width: 188px;
    padding: 0 14px;
    text-align: left;
    background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.98));
    box-shadow: 1px 0 0 rgba(203, 213, 225, .8);
}

.schedule-table thead .sch-name {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.schedule-table .sch-name__wrap {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.schedule-table .sch-name__main {
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
}

.schedule-table .sch-dayhead,
.schedule-table .sch-sum {
    min-width: 74px;
    height: 58px;
    padding: 7px 6px;
    background: linear-gradient(180deg, #f8fbff, #eef4ff);
    color: #24439f;
    font-weight: 800;
}

.schedule-table .sch-dayhead small,
.schedule-table .sch-sum small {
    display: block;
    margin-top: 3px;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #7b8aa4;
}

.schedule-table .sch-dayhead.is-weekend {
    background: linear-gradient(180deg, #fff6f3, #ffefea);
    color: #c2410c;
}

.schedule-table .sch-prevhead {
    background: linear-gradient(180deg, #f8fafc, #edf2f7);
    color: #7f8b9e;
}

.schedule-table .sch-prevhead small { color: #97a3b5; }

.schedule-table .sch-cell {
    position: relative;
    min-width: 74px;
    width: 74px;
    height: 64px;
    padding: 4px 6px;
    background: #fff;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.schedule-table .sch-cell:not(.sch-prev-cell):hover {
    background: #fbfdff;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .16);
}

.schedule-table .sch-work {
    background: linear-gradient(180deg, #f5f9ff, #ecf3ff);
}

.schedule-table .sch-off {
    background: linear-gradient(180deg, #fbfcfd, #f4f6f9);
}

.schedule-table .sch-vacation {
    background: linear-gradient(180deg, #faf7ff, #f3edff);
}

.schedule-table .sch-vacation.is-vac-weekend {
    background: linear-gradient(180deg, #f8f4ff, #efe7ff);
}

.schedule-table .sch-restrict {
    background: linear-gradient(180deg, #fcf8eb, #f6eed8);
}

.schedule-table .sch-prev-cell {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    opacity: .78;
    pointer-events: none;
}

.schedule-table .cell-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 54px;
}

.schedule-table .cell-stack--centered { text-align: center; }
.schedule-table .cell-stack--muted { color: #7b8798; }

.schedule-table .cell-main {
    font-size: .79rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.01em;
    color: #1d4ed8;
}

.schedule-table .cell-main--accent {
    color: #7c3aed;
    font-size: .7rem;
}

.schedule-table .cell-meta,
.schedule-table .cell-caption {
    font-size: .64rem;
    font-weight: 700;
    line-height: 1.1;
}

.schedule-table .cell-meta { color: #7c8aa5; }
.schedule-table .cell-caption { color: #8c98ab; }

.schedule-table .cell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    width: 23px;
    height: 23px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.schedule-table .cell-badge--off {
    background: #eef2f7;
    color: #7a8798;
}

.schedule-table .cell-badge--vac {
    background: linear-gradient(135deg, #7c5cf3, #906ef6);
    color: #fff;
}

.schedule-table .cell-badge--restrict {
    background: #f7e5ae;
    color: #b26a00;
}

.schedule-table .cell-badge--prev {
    background: #e8edf4;
    color: #708196;
    border: 1px solid rgba(148, 163, 184, .24);
}

.schedule-table .cell-badge--prev-worked {
    background: #dee8ff;
    color: #4764a7;
}

.schedule-table .cell-badge--prev-off {
    background: #edf2f7;
    color: #708196;
}

.schedule-table .cell-badge--prev-vacation {
    background: #ece3ff;
    color: #7850d1;
}

.schedule-table .cell-badge--prev-unknown {
    background: #f2f5f8;
    color: #9aa7b8;
}

.schedule-table .is-transition-edge {
    box-shadow: inset -14px 0 18px -18px rgba(15, 23, 42, .55);
}

.schedule-table .is-current-start {
    box-shadow: inset 14px 0 18px -18px rgba(37, 99, 235, .52);
}

.schedule-table .has-warn {
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .20);
}

.schedule-table .cell-warn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: .72rem;
    line-height: 1;
}

.schedule-table .is-exception::after {
    content: "Izņēmums";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #92400e;
    opacity: .78;
}

.schedule-table .sch-sum {
    min-width: 88px;
    width: 88px;
    background: linear-gradient(180deg, #fbfcfd, #f3f6fa);
    color: #475569;
    font-size: .68rem;
    line-height: 1.2;
    font-weight: 700;
    white-space: normal;
    padding: 8px 6px;
}

.schedule-table td.sch-sum {
    font-size: .76rem;
    height: 64px;
}

.schedule-table td.sch-sum strong {
    font-size: .84rem;
}

.schedule-table .sch-sum.is-over { color: #b45309; font-weight: 800; }
.schedule-table .sch-sum.is-under { color: #b91c1c; font-weight: 800; }
.schedule-table .sch-sum.is-ok { color: #047857; font-weight: 800; }
.schedule-table .sch-sum.is-bad { color: #b91c1c; font-weight: 800; }
.schedule-table .sch-sum.is-vac { color: #7c3aed; font-weight: 800; }

.schedule-table .sch-cell[draggable="true"] { cursor: grab; }
.schedule-table .sch-cell[draggable="true"]:active { cursor: grabbing; }
.schedule-table .sch-cell.is-dragging { opacity: .5; outline: 2px dashed rgba(37, 99, 235, .45); outline-offset: -2px; }
.schedule-table .sch-cell.is-drag-over { background: #edf8f1; outline: 2px solid rgba(5, 150, 105, .34); outline-offset: -2px; }

@media (max-width: 900px) {
    .schedule-table .sch-name,
    .schedule-table tbody .sch-name { min-width: 160px; max-width: 160px; }
    .schedule-table .sch-dayhead,
    .schedule-table .sch-cell { min-width: 68px; width: 68px; }
    .schedule-table .sch-sum { min-width: 82px; width: 82px; }
}

@media print {
    .schedule-scroll {
        border: 0;
        box-shadow: none;
        background: #fff;
    }
}

/* =========================================================
   v11 — profesionāls grafika režģis
   Saglabā esošo blīvo tabulas atspoguļojumu, bet padara to tīrāku,
   mierīgāku un premium līmeņa salasāmu.
   ========================================================= */
:root {
    --schedule-line: #dce5f2;
    --schedule-line-strong: #c8d4e6;
    --schedule-head: #f7f9fd;
    --schedule-head-2: #eef4ff;
    --schedule-work-bg: #eaf2ff;
    --schedule-work-bg-hover: #e2edff;
    --schedule-work-text: #064bd8;
    --schedule-off-bg: #fbfcfe;
    --schedule-restrict-bg: #fff2d8;
    --schedule-vac-bg: #ede8ff;
    --schedule-vac-bg-2: #e5ddff;
    --schedule-prev-bg: #f8fafc;
    --schedule-prev-line: #e7edf5;
}

.schedule-scroll {
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.98));
    box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
    overflow: auto;
    scrollbar-color: #aebbd0 #eef2f7;
    scrollbar-width: thin;
}
.schedule-scroll::-webkit-scrollbar { height: 12px; width: 12px; }
.schedule-scroll::-webkit-scrollbar-track { background: #eef2f7; border-radius: 999px; }
.schedule-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #b9c5d8, #95a4ba);
    border: 3px solid #eef2f7;
    border-radius: 999px;
}

.schedule-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: -.01em;
    color: #142033;
}
.schedule-table th,
.schedule-table td {
    border: 0 !important;
    border-right: 1px solid var(--schedule-line) !important;
    border-bottom: 1px solid var(--schedule-line) !important;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
}
.schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    background: linear-gradient(180deg, #ffffff, var(--schedule-head));
    color: #475569;
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 1px 0 rgba(203, 213, 225, .75), 0 8px 18px rgba(15, 23, 42, .05);
}
.schedule-table thead tr:first-child th {
    height: 34px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.schedule-table thead tr:nth-child(2) th { top: 34px; }
.schedule-table tbody tr { transition: background .16s ease; }
.schedule-table tbody tr:hover td:not(.sch-name) { filter: saturate(1.03); }
.schedule-table tbody tr:hover .sch-name { background: #f8fbff; }

.schedule-table .sch-name {
    position: sticky !important;
    left: 0;
    z-index: 7;
    width: 184px;
    min-width: 184px;
    max-width: 184px;
    height: 56px;
    padding: 0 14px !important;
    background: linear-gradient(90deg, #ffffff 0%, #fbfdff 84%, rgba(251,253,255,.92) 100%) !important;
    color: #111827;
    text-align: left;
    font-weight: 850;
    box-shadow: 12px 0 18px -20px rgba(15, 23, 42, .5), 1px 0 0 var(--schedule-line-strong);
}
.schedule-table thead .sch-name {
    z-index: 9;
    height: 86px;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
    vertical-align: middle;
    color: #334155;
}
.schedule-table .sch-name__wrap { display: grid; gap: 2px; min-width: 0; }
.schedule-table .sch-name__main {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -.02em;
}

.schedule-table .sch-period {
    padding: 0 12px !important;
    color: #334155;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border-bottom: 1px solid var(--schedule-line-strong) !important;
}
.schedule-table .sch-period--prev {
    color: #8793a5;
    background: linear-gradient(180deg, #fbfcfe, #f3f6fb);
}
.schedule-table .sch-period--current {
    color: #1d4ed8;
    background: linear-gradient(180deg, #ffffff, #eef5ff);
}
.schedule-table .sch-period--summary {
    color: #475569;
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.schedule-table .sch-dayhead {
    width: 78px;
    min-width: 78px;
    height: 52px;
    color: #253044;
    background: linear-gradient(180deg, #ffffff, #f6f9fe);
    font-size: 13px;
    line-height: 1.1;
}
.schedule-table .sch-dayhead small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #8190a5;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.schedule-table .sch-dayhead.is-weekend {
    color: #b42318;
    background: linear-gradient(180deg, #fffafa, #fff1f0);
}
.schedule-table .sch-dayhead.is-weekend small { color: #d15d56; }

.schedule-table .sch-cell {
    position: relative;
    width: 78px;
    min-width: 78px;
    height: 56px;
    padding: 0 !important;
    cursor: pointer;
    background: #fff;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease, filter .16s ease;
}
.schedule-table .sch-work {
    background:
        linear-gradient(180deg, rgba(242,247,255,.25), rgba(218,231,255,.72)),
        var(--schedule-work-bg);
}
.schedule-table .sch-work:hover { background: var(--schedule-work-bg-hover); }
.schedule-table .sch-off { background: var(--schedule-off-bg); color: #8492a8; }
.schedule-table .sch-restrict {
    background: linear-gradient(180deg, #fff8e9, var(--schedule-restrict-bg));
    color: #c97900;
}
.schedule-table .sch-vacation {
    background: linear-gradient(180deg, var(--schedule-vac-bg), var(--schedule-vac-bg-2));
    color: #6941d9;
}
.schedule-table .sch-vacation.is-vac-weekend {
    background:
        repeating-linear-gradient(45deg, rgba(123,92,240,.11), rgba(123,92,240,.11) 5px, rgba(255,255,255,.25) 5px, rgba(255,255,255,.25) 10px),
        linear-gradient(180deg, #eee9ff, #e4ddff);
}
.schedule-table .sch-cell:not(.sch-prev-cell):hover {
    box-shadow: inset 0 0 0 2px rgba(29, 78, 216, .27), 0 8px 18px rgba(15, 23, 42, .06);
    z-index: 4;
}
.schedule-table .sch-cell[draggable="true"] { cursor: grab; }
.schedule-table .sch-cell[draggable="true"]:active { cursor: grabbing; }
.schedule-table .sch-cell.is-dragging {
    opacity: .52;
    outline: 2px dashed #1d4ed8;
    outline-offset: -5px;
}
.schedule-table .sch-cell.is-drag-over {
    outline: 2px solid #16a34a;
    outline-offset: -5px;
    background: #e8f8ef !important;
}

.schedule-table .cell-stack {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 4px 4px;
    line-height: 1.1;
}
.schedule-table .cell-stack--work { gap: 5px; }
.schedule-table .cell-stack--centered { justify-content: center; }
.schedule-table .cell-stack--muted { color: #8290a6; }
.schedule-table .cell-main {
    display: block;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--schedule-work-text);
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: -.03em;
}
.schedule-table .cell-main--accent { color: #6941d9; }
.schedule-table .cell-meta {
    display: block;
    color: #637189;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: -.02em;
}
.schedule-table .cell-caption {
    display: block;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #77849a;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.schedule-table .cell-caption--vac { color: #6d47d9; }
.schedule-table .cell-badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 10px rgba(15,23,42,.05);
}
.schedule-table .cell-badge--off {
    color: #7b8aa3;
    background: #f3f6fb;
    border: 1px solid #e7edf5;
}
.schedule-table .cell-badge--restrict {
    color: #c97900;
    background: #fff4dc;
    border: 1px solid #f8d698;
}
.schedule-table .cell-badge--vac {
    color: #fff;
    background: linear-gradient(135deg, #6d4df4, #8a6af8);
    border: 1px solid rgba(255,255,255,.34);
    box-shadow: 0 6px 14px rgba(109, 77, 244, .22);
}
.schedule-table .cell-warn {
    position: absolute;
    top: 3px;
    right: 4px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fed7aa;
    font-size: 10px;
    line-height: 1;
}
.schedule-table .sch-cell.has-warn::after { content: none !important; }
.schedule-table .sch-cell.is-exception::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1.5px dashed rgba(217,119,6,.6);
    border-radius: 10px;
    pointer-events: none;
}

.schedule-table .sch-prevhead {
    width: 70px;
    min-width: 70px;
    color: #98a4b5;
    background:
        linear-gradient(90deg, rgba(248,250,252,.4), rgba(241,245,249,.75)),
        linear-gradient(180deg, #f9fbfd, #eef3f8);
    opacity: 1;
}
.schedule-table .sch-prevhead small { color: #a9b3c2; }
.schedule-table .sch-prevhead::after {
    content: "iepr.";
    display: block;
    margin-top: 3px;
    color: #b2bdcc;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.schedule-table .sch-prev-cell {
    width: 70px;
    min-width: 70px;
    cursor: default !important;
    pointer-events: none !important;
    color: #99a6b8;
    background:
        linear-gradient(180deg, rgba(250,252,255,.88), rgba(242,246,251,.86)),
        var(--schedule-prev-bg) !important;
    border-right-color: var(--schedule-prev-line) !important;
    opacity: .68;
    filter: grayscale(.15) saturate(.68);
}
.schedule-table .sch-prev-cell .cell-stack { padding-top: 4px; }
.schedule-table .sch-prev-cell .cell-caption {
    color: #95a1b2;
    font-size: 8.5px;
    max-width: 64px;
}
.schedule-table .cell-badge--prev {
    min-width: 21px;
    height: 21px;
    padding: 0 7px;
    color: #728098;
    background: #edf2f7;
    border: 1px solid #e1e8f1;
    box-shadow: none;
}
.schedule-table .cell-badge--prev-worked { background: #e7eefc; color: #61739d; }
.schedule-table .cell-badge--prev-off { background: #f1f5f9; color: #7d8aa0; }
.schedule-table .cell-badge--prev-vacation { background: #eee8ff; color: #8064d9; }
.schedule-table .cell-badge--prev-unknown {
    background: #f8fafc;
    color: #a7b0bf;
    border-style: dashed;
}
.schedule-table .is-transition-edge {
    box-shadow: inset -12px 0 18px -18px rgba(15,23,42,.62) !important;
}
.schedule-table .is-current-start {
    position: relative;
    box-shadow: inset 12px 0 18px -18px rgba(15,23,42,.62) !important;
}
.schedule-table .is-current-start::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    background: linear-gradient(180deg, rgba(29,78,216,.22), rgba(29,78,216,.46), rgba(29,78,216,.22));
    pointer-events: none;
}

.schedule-table .sch-sum {
    min-width: 82px;
    height: 56px;
    padding: 0 8px !important;
    background: linear-gradient(180deg, #f9fbfe, #f1f5f9) !important;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    border-left: 1px solid var(--schedule-line-strong) !important;
}
.schedule-table th.sch-sum {
    min-width: 86px;
    max-width: 96px;
    padding: 0 8px !important;
    color: #526176;
    font-size: 10px;
    line-height: 1.18;
    white-space: normal;
    vertical-align: middle;
}
.schedule-table .sch-sum strong {
    color: #111827;
    font-size: 12px;
}
.schedule-table .sch-sum.is-over { color: #b45309; }
.schedule-table .sch-sum.is-under { color: #dc2626; }
.schedule-table .sch-sum.is-ok { color: #15803d; }
.schedule-table .sch-sum.is-bad { color: #dc2626; }
.schedule-table .sch-sum.is-vac { color: #6d47d9; }

@media (max-width: 900px) {
    .schedule-table { font-size: 11px; }
    .schedule-table .sch-name { width: 150px; min-width: 150px; max-width: 150px; }
    .schedule-table .sch-dayhead,
    .schedule-table .sch-cell { width: 70px; min-width: 70px; }
    .schedule-table .sch-prevhead,
    .schedule-table .sch-prev-cell { width: 64px; min-width: 64px; }
}
@media print {
    .schedule-scroll { box-shadow: none; border-radius: 0; overflow: visible; }
    .schedule-table { font-size: 7pt; }
    .schedule-table .sch-dayhead,
    .schedule-table .sch-cell { width: 52px; min-width: 52px; height: 42px; }
    .schedule-table .sch-prevhead,
    .schedule-table .sch-prev-cell { width: 48px; min-width: 48px; opacity: .55; }
    .schedule-table .cell-main { font-size: 7pt; }
    .schedule-table .cell-meta,
    .schedule-table .cell-caption { font-size: 6pt; }
}

/* =========================================================
   v12 — mierīgāks, vieglāk caurskatāms grafika režģis
   Samazina pārmērīgu bold un kontrastu, saglabājot esošo tabulas loģiku.
   ========================================================= */
:root {
    --schedule-line: #e3e9f2;
    --schedule-line-strong: #d4deec;
    --schedule-head: #f8fafc;
    --schedule-head-2: #f2f6fc;
    --schedule-work-bg: #eef5ff;
    --schedule-work-bg-hover: #e8f1ff;
    --schedule-work-text: #1454c8;
    --schedule-off-bg: #fcfdff;
    --schedule-restrict-bg: #fff6e6;
    --schedule-vac-bg: #f0ecff;
    --schedule-vac-bg-2: #ebe5ff;
    --schedule-prev-bg: #f8fafc;
    --schedule-prev-line: #edf1f6;
}

.schedule-scroll {
    border-color: #dce5f1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}
.schedule-scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.schedule-scroll::-webkit-scrollbar-track { background: #f2f5f9; }
.schedule-scroll::-webkit-scrollbar-thumb {
    background: #b9c5d4;
    border: 2px solid #f2f5f9;
}

.schedule-table {
    font-size: 12px;
    letter-spacing: 0;
    color: #243044;
}
.schedule-table th,
.schedule-table td {
    border-right-color: var(--schedule-line) !important;
    border-bottom-color: var(--schedule-line) !important;
}
.schedule-table thead th {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #64748b;
    font-weight: 560;
    box-shadow: 0 1px 0 rgba(203, 213, 225, .55), 0 8px 18px rgba(15, 23, 42, .025);
}
.schedule-table thead tr:first-child th {
    height: 32px;
    font-size: 10.5px;
    font-weight: 560;
    text-transform: none;
    letter-spacing: .015em;
}
.schedule-table thead tr:nth-child(2) th { top: 32px; }
.schedule-table tbody tr:hover td:not(.sch-name) { filter: none; }
.schedule-table tbody tr:hover .sch-name { background: #fbfdff; }

.schedule-table .sch-name {
    width: 184px;
    min-width: 184px;
    max-width: 184px;
    height: 56px;
    padding: 0 14px !important;
    background: linear-gradient(90deg, #ffffff 0%, #fcfdff 88%, rgba(252,253,255,.94) 100%) !important;
    color: #1f2937;
    font-weight: 580;
    box-shadow: 10px 0 18px -22px rgba(15, 23, 42, .45), 1px 0 0 var(--schedule-line-strong);
}
.schedule-table thead .sch-name {
    height: 84px;
    color: #475569;
    font-weight: 560;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
}
.schedule-table .sch-name__main {
    font-weight: 580;
    letter-spacing: 0;
}

.schedule-table .sch-period {
    color: #64748b;
    font-weight: 560;
    background: linear-gradient(180deg, #fff, #f8fafc);
}
.schedule-table .sch-period--prev {
    color: #97a3b4;
    background: linear-gradient(180deg, #fbfcfe, #f6f8fb);
}
.schedule-table .sch-period--current {
    color: #3f6fd3;
    background: linear-gradient(180deg, #fff, #f3f7ff);
}
.schedule-table .sch-period--summary {
    color: #64748b;
    background: linear-gradient(180deg, #fff, #f7f9fc);
}

.schedule-table .sch-dayhead {
    width: 78px;
    min-width: 78px;
    height: 52px;
    color: #334155;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    font-size: 12.5px;
    font-weight: 560;
}
.schedule-table .sch-dayhead small {
    margin-top: 5px;
    font-size: 9.5px;
    font-weight: 520;
    color: #94a3b8;
    letter-spacing: .02em;
}
.schedule-table .sch-dayhead.is-weekend {
    color: #b43c34;
    background: linear-gradient(180deg, #fffdfd, #fff7f6);
}
.schedule-table .sch-dayhead.is-weekend small { color: #c77770; }

.schedule-table .sch-cell {
    width: 78px;
    min-width: 78px;
    height: 56px;
    background: #fff;
    transition: background .14s ease, box-shadow .14s ease;
}
.schedule-table .sch-work {
    background: linear-gradient(180deg, rgba(250,252,255,.7), rgba(230,239,255,.82));
}
.schedule-table .sch-work:hover { background: #eaf2ff; }
.schedule-table .sch-off {
    background: #fcfdff;
    color: #94a3b8;
}
.schedule-table .sch-restrict {
    background: linear-gradient(180deg, #fffaf0, #fff5e3);
    color: #b56b00;
}
.schedule-table .sch-vacation {
    background: linear-gradient(180deg, #f3efff, #ece7ff);
    color: #6d55d7;
}
.schedule-table .sch-vacation.is-vac-weekend {
    background:
        repeating-linear-gradient(45deg, rgba(123,92,240,.08), rgba(123,92,240,.08) 5px, rgba(255,255,255,.32) 5px, rgba(255,255,255,.32) 10px),
        linear-gradient(180deg, #f3efff, #eae5ff);
}
.schedule-table .sch-cell:not(.sch-prev-cell):hover {
    box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, .22);
    z-index: 4;
}
.schedule-table .sch-cell.is-dragging {
    opacity: .58;
    outline: 1.5px dashed rgba(37, 99, 235, .36);
    outline-offset: -4px;
}
.schedule-table .sch-cell.is-drag-over {
    outline: 1.5px solid rgba(5, 150, 105, .28);
    outline-offset: -4px;
    background: #eef9f3 !important;
}

.schedule-table .cell-stack {
    gap: 2px;
    padding: 6px 4px 4px;
    line-height: 1.14;
}
.schedule-table .cell-stack--work { gap: 4px; }
.schedule-table .cell-main {
    max-width: 72px;
    color: #1454c8;
    font-size: 11px;
    font-weight: 620;
    letter-spacing: -.015em;
}
.schedule-table .cell-main--accent { color: #6d55d7; }
.schedule-table .cell-meta {
    color: #64748b;
    font-size: 9.6px;
    font-weight: 500;
    letter-spacing: 0;
}
.schedule-table .cell-caption {
    max-width: 70px;
    color: #8a97aa;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
}
.schedule-table .cell-caption--vac { color: #7058d7; }
.schedule-table .cell-badge {
    min-width: 21px;
    height: 21px;
    padding: 0 7px;
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 2px 6px rgba(15,23,42,.035);
}
.schedule-table .cell-badge--off {
    color: #7f8fa6;
    background: #f4f7fb;
    border-color: #e8eef6;
}
.schedule-table .cell-badge--restrict {
    color: #b56b00;
    background: #fff5df;
    border-color: #f4d392;
}
.schedule-table .cell-badge--vac {
    color: #fff;
    background: #7a61e8;
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 3px 8px rgba(109, 77, 244, .15);
}
.schedule-table .cell-warn {
    width: 15px;
    height: 15px;
    background: #fff8ed;
    color: #a96100;
    border-color: #f4d0a1;
    font-size: 9px;
}
.schedule-table .sch-cell.is-exception::before {
    inset: 5px;
    border: 1px dashed rgba(217,119,6,.45);
    border-radius: 9px;
}

.schedule-table .sch-prevhead {
    width: 70px;
    min-width: 70px;
    color: #a1adbd;
    background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
    opacity: .78;
}
.schedule-table .sch-prevhead small { color: #b0bac8; }
.schedule-table .sch-prevhead::after {
    margin-top: 3px;
    color: #b9c2cf;
    font-size: 7.5px;
    font-weight: 520;
    letter-spacing: .06em;
}
.schedule-table .sch-prev-cell {
    width: 70px;
    min-width: 70px;
    color: #a4afbf;
    background: linear-gradient(180deg, rgba(252,253,255,.9), rgba(246,248,251,.9)) !important;
    border-right-color: var(--schedule-prev-line) !important;
    opacity: .58;
    filter: grayscale(.18) saturate(.55);
}
.schedule-table .sch-prev-cell .cell-caption {
    color: #a2adbd;
    font-size: 8.4px;
    font-weight: 480;
}
.schedule-table .cell-badge--prev {
    min-width: 20px;
    height: 20px;
    color: #7e8aa0;
    background: #f0f4f8;
    border-color: #e6ecf4;
    font-weight: 560;
}
.schedule-table .cell-badge--prev-worked { background: #edf3fe; color: #7585a2; }
.schedule-table .cell-badge--prev-off { background: #f4f7fb; color: #8b97a9; }
.schedule-table .cell-badge--prev-vacation { background: #f2edff; color: #8a72dc; }
.schedule-table .cell-badge--prev-unknown { background: #f9fafb; color: #b0b8c5; }
.schedule-table .is-transition-edge {
    box-shadow: inset -8px 0 16px -18px rgba(15,23,42,.42) !important;
}
.schedule-table .is-current-start {
    box-shadow: inset 8px 0 16px -18px rgba(15,23,42,.38) !important;
}
.schedule-table .is-current-start::before {
    width: 1px;
    background: linear-gradient(180deg, rgba(37,99,235,.08), rgba(37,99,235,.22), rgba(37,99,235,.08));
}

.schedule-table .sch-sum {
    min-width: 82px;
    height: 56px;
    background: linear-gradient(180deg, #fbfcfe, #f6f8fb) !important;
    color: #64748b;
    font-size: 10.6px;
    font-weight: 520;
}
.schedule-table th.sch-sum {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 520;
    line-height: 1.22;
}
.schedule-table td.sch-sum,
.schedule-table .sch-sum__value,
.schedule-table .sch-sum strong {
    color: inherit;
    font-size: 11px;
    font-weight: 560 !important;
}
.schedule-table .sch-sum.is-over { color: #a15c07; font-weight: 560; }
.schedule-table .sch-sum.is-under { color: #b64646; font-weight: 560; }
.schedule-table .sch-sum.is-ok { color: #2f7a4f; font-weight: 560; }
.schedule-table .sch-sum.is-bad { color: #b64646; font-weight: 560; }
.schedule-table .sch-sum.is-vac { color: #7658d7; font-weight: 560; }

.hint .hint-label {
    font-weight: 560;
    color: #64748b;
}

@media (max-width: 900px) {
    .schedule-table { font-size: 11px; }
    .schedule-table .sch-name { width: 152px; min-width: 152px; max-width: 152px; }
    .schedule-table .sch-dayhead,
    .schedule-table .sch-cell { width: 70px; min-width: 70px; }
    .schedule-table .sch-prevhead,
    .schedule-table .sch-prev-cell { width: 64px; min-width: 64px; }
}
@media print {
    .schedule-table .cell-main { font-weight: 560; }
    .schedule-table .cell-meta,
    .schedule-table .cell-caption { font-weight: 450; }
}

/* =========================================================
   v13 — komforta režīms: salabota pārejas galvene un noņemts smagais bold
   ========================================================= */
:root {
    --schedule-line: #e7edf5;
    --schedule-line-strong: #dbe4f0;
    --schedule-head: #fafcff;
    --schedule-head-2: #f6f9fd;
    --schedule-work-bg: #f2f7ff;
    --schedule-work-bg-hover: #eef5ff;
    --schedule-work-text: #1753bd;
    --schedule-off-bg: #fdfefe;
    --schedule-restrict-bg: #fff8e8;
    --schedule-vac-bg: #f4f0ff;
    --schedule-vac-bg-2: #eee9ff;
    --schedule-prev-bg: #fafbfc;
    --schedule-prev-line: #eef2f7;
}

body { font-weight: 400; }
h1, h2, h3 { font-weight: 560; letter-spacing: -.018em; }
strong, b { font-weight: 560; }
.topbar__title,
.topbar__user,
.field__label,
.alert,
.loading,
.toast,
.wizard__steps li,
.counter,
.calendar__dow,
.calendar__day,
.badge,
.pill,
.btn,
.data-table th,
.modal__section-title,
.prev5-row__name,
.prev5-block__date,
.prev5-block__status,
.save-status.is-saved,
.empty-state strong,
.generator-hero__metrics strong,
.cmd-stat__val,
.quality__ring span,
.quality__label,
.eyebrow,
.hint .hint-label {
    font-weight: 520 !important;
}
.sidebar__logo,
.topbar__avatar { font-weight: 560 !important; }

.schedule-scroll {
    border-color: #dfe8f3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}

.schedule-table {
    font-size: 12px;
    color: #253044;
    letter-spacing: 0;
}
.schedule-table th,
.schedule-table td {
    border-right-color: var(--schedule-line) !important;
    border-bottom-color: var(--schedule-line) !important;
}
.schedule-table thead th {
    background: linear-gradient(180deg, #ffffff, #fafcff);
    color: #64748b;
    font-weight: 500 !important;
    box-shadow: 0 1px 0 rgba(203, 213, 225, .44), 0 6px 14px rgba(15, 23, 42, .018);
}
.schedule-table thead tr:first-child th {
    height: 32px;
    font-size: 10.5px;
    font-weight: 500 !important;
    text-transform: none;
    letter-spacing: .01em;
}
.schedule-table thead tr:nth-child(2) th {
    top: 32px;
}

/* Kritiskais labojums: .is-current-start iepriekš pārslēdza 1. dienas galveni uz relative,
   tāpēc tā nolēca lejā un vizuāli salauza pāreju. Galvenē tā paliek sticky. */
.schedule-table thead .sch-dayhead.is-current-start {
    position: sticky !important;
    top: 32px !important;
    z-index: 7;
}
.schedule-table thead .sch-dayhead.is-current-start::before {
    content: none !important;
}
.schedule-table tbody .sch-cell.is-current-start {
    position: relative;
}

.schedule-table .sch-name {
    width: 184px;
    min-width: 184px;
    max-width: 184px;
    height: 56px;
    color: #253044;
    font-weight: 500 !important;
    background: linear-gradient(90deg, #ffffff 0%, #fcfdff 90%, rgba(252,253,255,.95) 100%) !important;
    box-shadow: 8px 0 16px -22px rgba(15, 23, 42, .38), 1px 0 0 var(--schedule-line-strong);
}
.schedule-table thead .sch-name {
    height: 84px;
    color: #526176;
    font-weight: 500 !important;
}
.schedule-table .sch-name__main {
    font-weight: 500 !important;
    letter-spacing: 0;
}

.schedule-table .sch-period {
    color: #7b8798;
    font-weight: 500 !important;
    background: linear-gradient(180deg, #ffffff, #fafcff);
}
.schedule-table .sch-period--prev {
    color: #a0aaba;
    background: linear-gradient(180deg, #fcfdff, #f8fafc);
}
.schedule-table .sch-period--current {
    color: #4b73c5;
    background: linear-gradient(180deg, #ffffff, #f6f9ff);
}
.schedule-table .sch-period--summary {
    color: #7b8798;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.schedule-table .sch-dayhead {
    width: 78px;
    min-width: 78px;
    height: 52px;
    color: #3f4b5f;
    background: linear-gradient(180deg, #ffffff, #fafcff);
    font-size: 12px;
    font-weight: 500 !important;
}
.schedule-table .sch-dayhead small {
    margin-top: 5px;
    color: #9aa7b8;
    font-size: 9px;
    font-weight: 450 !important;
    letter-spacing: .015em;
}
.schedule-table .sch-dayhead.is-weekend {
    color: #a9443d;
    background: linear-gradient(180deg, #fffefe, #fff9f8);
}
.schedule-table .sch-dayhead.is-weekend small { color: #bd746e; }

.schedule-table .sch-cell {
    width: 78px;
    min-width: 78px;
    height: 56px;
    background: #fff;
    transition: background .14s ease, box-shadow .14s ease;
}
.schedule-table .sch-work {
    background: linear-gradient(180deg, rgba(252,253,255,.85), rgba(235,243,255,.78));
}
.schedule-table .sch-work:hover { background: #eef5ff; }
.schedule-table .sch-off {
    background: #fdfefe;
    color: #98a5b6;
}
.schedule-table .sch-restrict {
    background: linear-gradient(180deg, #fffbf3, #fff7e7);
    color: #ad6a08;
}
.schedule-table .sch-vacation {
    background: linear-gradient(180deg, #f6f3ff, #eee9ff);
    color: #6f5bd0;
}
.schedule-table .sch-vacation.is-vac-weekend {
    background:
        repeating-linear-gradient(45deg, rgba(123,92,240,.065), rgba(123,92,240,.065) 5px, rgba(255,255,255,.36) 5px, rgba(255,255,255,.36) 10px),
        linear-gradient(180deg, #f6f3ff, #eee9ff);
}
.schedule-table .sch-cell:not(.sch-prev-cell):hover {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
    z-index: 4;
}
.schedule-table .sch-cell.is-dragging {
    opacity: .6;
    outline: 1px dashed rgba(37, 99, 235, .3);
    outline-offset: -4px;
}
.schedule-table .sch-cell.is-drag-over {
    outline: 1px solid rgba(5, 150, 105, .24);
    outline-offset: -4px;
    background: #f0faf5 !important;
}

.schedule-table .cell-stack {
    gap: 2px;
    padding: 6px 4px 4px;
    line-height: 1.14;
}
.schedule-table .cell-stack--work { gap: 4px; }
.schedule-table .cell-main {
    max-width: 72px;
    color: #1753bd;
    font-size: 11px;
    font-weight: 540 !important;
    letter-spacing: 0;
}
.schedule-table .cell-meta {
    color: #718096;
    font-size: 9.4px;
    font-weight: 430 !important;
    letter-spacing: 0;
}
.schedule-table .cell-caption {
    max-width: 70px;
    color: #909bad;
    font-size: 8.8px;
    font-weight: 430 !important;
    letter-spacing: 0;
}
.schedule-table .cell-caption--vac { color: #755fd1; }
.schedule-table .cell-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    font-size: 10px;
    font-weight: 520 !important;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 2px 5px rgba(15,23,42,.026);
}
.schedule-table .cell-badge--off {
    color: #8391a6;
    background: #f5f8fb;
    border-color: #e9eef5;
}
.schedule-table .cell-badge--restrict {
    color: #ad6a08;
    background: #fff6df;
    border-color: #f2d59c;
}
.schedule-table .cell-badge--vac {
    color: #fff;
    background: #7b65e5;
    border-color: rgba(255,255,255,.24);
    box-shadow: 0 2px 7px rgba(109, 77, 244, .12);
}

.schedule-table .sch-prevhead {
    width: 70px;
    min-width: 70px;
    color: #a6b0bf;
    background: linear-gradient(180deg, #fcfdff, #f8fafc);
    opacity: .7;
}
.schedule-table .sch-prevhead small { color: #b4bdca; }
.schedule-table .sch-prevhead::after {
    color: #c0c8d3;
    font-size: 7px;
    font-weight: 450 !important;
    letter-spacing: .05em;
}
.schedule-table .sch-prev-cell {
    width: 70px;
    min-width: 70px;
    color: #a8b2c0;
    background: linear-gradient(180deg, rgba(253,254,255,.92), rgba(248,250,252,.9)) !important;
    border-right-color: var(--schedule-prev-line) !important;
    opacity: .5;
    filter: grayscale(.18) saturate(.5);
}
.schedule-table .sch-prev-cell .cell-caption {
    color: #a7b1bf;
    font-size: 8px;
    font-weight: 420 !important;
}
.schedule-table .cell-badge--prev {
    min-width: 19px;
    height: 19px;
    color: #8794a8;
    background: #f3f6fa;
    border-color: #e8eef5;
    font-weight: 480 !important;
}
.schedule-table .cell-badge--prev-worked { background: #f0f5fe; color: #7d8ca8; }
.schedule-table .cell-badge--prev-off { background: #f6f8fb; color: #929dac; }
.schedule-table .cell-badge--prev-vacation { background: #f3efff; color: #8b78d9; }
.schedule-table .cell-badge--prev-unknown { background: #fbfcfd; color: #b5bdc9; }
.schedule-table .is-transition-edge {
    box-shadow: inset -6px 0 14px -18px rgba(15,23,42,.32) !important;
}
.schedule-table tbody .sch-cell.is-current-start {
    box-shadow: inset 6px 0 14px -18px rgba(15,23,42,.3) !important;
}
.schedule-table tbody .sch-cell.is-current-start::before {
    width: 1px;
    background: linear-gradient(180deg, rgba(37,99,235,.05), rgba(37,99,235,.16), rgba(37,99,235,.05));
}

.schedule-table .sch-sum {
    min-width: 82px;
    height: 56px;
    background: linear-gradient(180deg, #fcfdff, #f8fafc) !important;
    color: #69778b;
    font-size: 10.4px;
    font-weight: 450 !important;
}
.schedule-table th.sch-sum {
    color: #69778b;
    font-size: 9.3px;
    font-weight: 450 !important;
    line-height: 1.22;
}
.schedule-table td.sch-sum,
.schedule-table .sch-sum__value,
.schedule-table .sch-sum strong {
    color: inherit;
    font-size: 10.6px;
    font-weight: 500 !important;
}
.schedule-table .sch-sum.is-over,
.schedule-table .sch-sum.is-under,
.schedule-table .sch-sum.is-ok,
.schedule-table .sch-sum.is-bad,
.schedule-table .sch-sum.is-vac {
    font-weight: 500 !important;
}
.schedule-table .sch-sum.is-over { color: #9a610c; }
.schedule-table .sch-sum.is-under { color: #ad4b4b; }
.schedule-table .sch-sum.is-ok { color: #3a7655; }
.schedule-table .sch-sum.is-bad { color: #ad4b4b; }
.schedule-table .sch-sum.is-vac { color: #765fd3; }

.hint {
    color: #718096;
    font-weight: 400;
}
.hint .hint-label {
    color: #64748b;
    font-weight: 500 !important;
}

@media (max-width: 900px) {
    .schedule-table { font-size: 11px; }
    .schedule-table .sch-name { width: 152px; min-width: 152px; max-width: 152px; }
    .schedule-table .sch-dayhead,
    .schedule-table .sch-cell { width: 70px; min-width: 70px; }
    .schedule-table .sch-prevhead,
    .schedule-table .sch-prev-cell { width: 64px; min-width: 64px; }
    .schedule-table thead .sch-dayhead.is-current-start { top: 32px !important; }
}

/* v13 precizējums — galvenes un ķermeņa pārejas klases ir atdalītas */
.schedule-table thead .sch-dayhead.is-current-start-head {
    position: sticky !important;
    top: 32px !important;
    z-index: 7;
    box-shadow: inset 6px 0 14px -18px rgba(15,23,42,.26) !important;
}
.schedule-table thead .sch-dayhead.is-current-start-head::before {
    content: none !important;
}

/* =========================================================
   v14 — pārejas dienu statusu krāsojums
   Iepriekšējā mēneša 5 dienas izmanto tos pašus statusu signālus
   kā aktuālais grafiks, bet paliek vizuāli klusas un neaktīvas.
   ========================================================= */
.schedule-table .sch-prevhead {
    background: linear-gradient(180deg, #fbfcfe, #f6f8fb) !important;
    color: #99a5b6 !important;
    opacity: .84 !important;
}
.schedule-table .sch-prevhead small,
.schedule-table .sch-prevhead::after {
    color: #b0bac8 !important;
}

.schedule-table .sch-prev-cell {
    position: relative;
    opacity: .78 !important;
    filter: saturate(.72) brightness(1.015) !important;
    color: #7f8ca0 !important;
    border-color: #e7edf5 !important;
    pointer-events: none;
}
.schedule-table .sch-prev-cell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.34);
    pointer-events: none;
}
.schedule-table .sch-prev-cell > * {
    position: relative;
    z-index: 1;
}

.schedule-table .sch-prev-cell.st-worked {
    background: linear-gradient(180deg, #eef5ff, #e5effd) !important;
}
.schedule-table .sch-prev-cell.st-off {
    background: linear-gradient(180deg, #ffffff, #fbfcfe) !important;
}
.schedule-table .sch-prev-cell.st-vacation {
    background:
        repeating-linear-gradient(45deg, rgba(123,92,240,.08), rgba(123,92,240,.08) 5px, rgba(255,255,255,.42) 5px, rgba(255,255,255,.42) 10px),
        linear-gradient(180deg, #f5f1ff, #ede8ff) !important;
}
.schedule-table .sch-prev-cell.st-restrict {
    background: linear-gradient(180deg, #fffaf0, #fff4df) !important;
}
.schedule-table .sch-prev-cell.st-unknown {
    background: linear-gradient(180deg, #fcfdff, #f8fafc) !important;
}

.schedule-table .sch-prev-cell.st-worked .cell-badge--prev {
    background: #dfeafe !important;
    border-color: #d2def4 !important;
    color: #667898 !important;
}
.schedule-table .sch-prev-cell.st-off .cell-badge--prev {
    background: #f5f8fb !important;
    border-color: #e8eef5 !important;
    color: #8b97a9 !important;
}
.schedule-table .sch-prev-cell.st-vacation .cell-badge--prev {
    background: #e9e1ff !important;
    border-color: #ded3fb !important;
    color: #7d68cc !important;
}
.schedule-table .sch-prev-cell.st-restrict .cell-badge--prev {
    background: #fff1cd !important;
    border-color: #f1d49a !important;
    color: #a86a0b !important;
}
.schedule-table .sch-prev-cell.st-unknown .cell-badge--prev {
    background: #fafbfc !important;
    border-color: #edf1f6 !important;
    color: #b0b8c5 !important;
    border-style: dashed;
}
.schedule-table .sch-prev-cell .cell-caption {
    color: #8f9bad !important;
    font-weight: 400 !important;
}
.schedule-table .sch-prev-cell.st-vacation .cell-caption { color: #8976d5 !important; }
.schedule-table .sch-prev-cell.st-restrict .cell-caption { color: #a8701a !important; }

.schedule-table .sch-prev-cell.is-transition-edge {
    border-right-color: #d7e0ec !important;
    box-shadow: inset -12px 0 20px -22px rgba(15,23,42,.38) !important;
}
.schedule-table tbody .sch-cell.is-current-start {
    border-left-color: #d7e0ec !important;
    box-shadow: inset 12px 0 20px -22px rgba(15,23,42,.36) !important;
}

.prev5-block.st-restrict {
    background: linear-gradient(180deg, #fffaf0, #fff4df);
    border-color: #efcf8f;
    color: #a86a0b;
}


/* =========================================================
   v15 — Profesionālie skati ārpus grafika režģa
   Grafika .schedule-table dizains netiek pārrakstīts.
   ========================================================= */
.ui-icon,
.btn__icon,
.alert__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -3px;
}
.btn__icon { width: 15px; height: 15px; margin-right: 6px; }
.alert__icon { width: 17px; height: 17px; margin-right: 8px; }

.sidebar__brandtext strong,
.topbar__title,
.navlink,
.btn,
.badge,
.pill { font-weight: 520; }
.sidebar__brandtext small,
.topbar__kicker { font-weight: 430; }

body[data-page="dashboard"] .content,
body[data-page="employees"] .content,
body[data-page="archive"] .content,
body[data-page="settings"] .content {
    background:
        radial-gradient(circle at 0 0, rgba(58,109,240,.08), transparent 34%),
        radial-gradient(circle at 92% 8%, rgba(122,90,240,.055), transparent 32%),
        linear-gradient(180deg, #f7f9fd 0%, #f3f6fb 100%);
}

body[data-page="dashboard"] h1,
body[data-page="dashboard"] h2,
body[data-page="dashboard"] h3,
body[data-page="employees"] h1,
body[data-page="employees"] h2,
body[data-page="employees"] h3,
body[data-page="archive"] h1,
body[data-page="archive"] h2,
body[data-page="archive"] h3,
body[data-page="settings"] h1,
body[data-page="settings"] h2,
body[data-page="settings"] h3 {
    font-weight: 560;
    letter-spacing: -.025em;
}

.pro-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 26px;
    margin-bottom: 20px;
    border: 1px solid rgba(203,213,225,.72);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,251,255,.92)),
        radial-gradient(circle at 10% 0, rgba(58,109,240,.12), transparent 30%);
    box-shadow: 0 20px 70px rgba(15,23,42,.075);
    overflow: hidden;
}
.pro-hero::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(58,109,240,.28), transparent);
}
.pro-hero__icon,
.section-icon,
.metric-card__icon,
.action-tile__icon,
.empty-state__icon {
    display: inline-grid;
    place-items: center;
    color: #3a6df0;
    background: linear-gradient(180deg, #eef4ff, #e9f0ff);
    border: 1px solid rgba(58,109,240,.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.pro-hero__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
}
.pro-hero__icon .ui-icon { width: 25px; height: 25px; }
.pro-hero__content { max-width: 820px; }
.pro-hero__content h2 {
    margin: 5px 0 8px;
    font-size: clamp(1.35rem, 1vw + 1rem, 2rem);
    color: #142033;
}
.pro-hero__content p {
    color: #61708a;
    max-width: 76ch;
    line-height: 1.68;
    font-size: .96rem;
}
.pro-hero__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.metric-card {
    position: relative;
    min-height: 150px;
    padding: 18px;
    border: 1px solid rgba(203,213,225,.66);
    border-radius: 22px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 14px 50px rgba(15,23,42,.055);
    overflow: hidden;
}
.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(58,109,240,.42), transparent);
}
.metric-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    margin-bottom: 16px;
}
.metric-card__icon .ui-icon { width: 19px; height: 19px; }
.metric-card__label,
.metric-card__note {
    display: block;
    color: #6c7a92;
    font-size: .78rem;
    line-height: 1.35;
}
.metric-card__label {
    text-transform: uppercase;
    letter-spacing: .075em;
    font-weight: 520;
}
.metric-card__value {
    display: block;
    margin: 6px 0 4px;
    color: #142033;
    font-size: 2rem;
    line-height: 1;
    font-weight: 560;
    letter-spacing: -.045em;
}
.metric-card__value--text {
    font-size: 1.18rem;
    letter-spacing: -.02em;
    line-height: 1.25;
    word-break: break-word;
}
.metric-card--green::before { background: linear-gradient(90deg, rgba(31,170,107,.44), transparent); }
.metric-card--amber::before,
.metric-card--warn::before { background: linear-gradient(90deg, rgba(224,146,26,.44), transparent); }
.metric-card--violet::before { background: linear-gradient(90deg, rgba(122,90,240,.42), transparent); }
.metric-card--good::before { background: linear-gradient(90deg, rgba(31,170,107,.44), transparent); }
.metric-card--red::before { background: linear-gradient(90deg, rgba(224,70,62,.42), transparent); }
.metric-card--green .metric-card__icon,
.section-icon--green { color: #16885a; background: #e7f7ef; border-color: rgba(31,170,107,.16); }
.metric-card--amber .metric-card__icon,
.metric-card--warn .metric-card__icon,
.section-icon--amber { color: #b66e0e; background: #fff4dc; border-color: rgba(224,146,26,.18); }
.metric-card--violet .metric-card__icon,
.section-icon--violet { color: #6a50d7; background: #f0ecff; border-color: rgba(122,90,240,.16); }
.metric-card--red .metric-card__icon,
.section-icon--red { color: #c63d36; background: #fff0ef; border-color: rgba(224,70,62,.18); }

.pro-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .72fr);
    gap: 20px;
    margin-bottom: 20px;
}
.pro-layout--dashboard-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pro-card {
    padding: 22px;
    border: 1px solid rgba(203,213,225,.68);
    border-radius: 24px;
    background: rgba(255,255,255,.91);
    box-shadow: 0 16px 56px rgba(15,23,42,.06);
}
.pro-card__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.pro-card__header--split {
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.pro-card__titleline,
.modal-titleline,
.section-minihead,
.settings-group__intro {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.pro-card h3,
.pro-card h4,
.modal-titleline h3,
.section-minihead h4,
.settings-group__intro h4 {
    margin: 0 0 4px;
    color: #172033;
    font-weight: 560;
}
.pro-card p,
.modal-titleline p,
.section-minihead p,
.settings-group__intro p {
    color: #697790;
    margin: 0;
    line-height: 1.55;
    font-size: .9rem;
}
.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    flex: 0 0 auto;
}
.section-icon .ui-icon { width: 19px; height: 19px; }

.action-grid--polished {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.action-tile {
    min-height: 142px;
    padding: 16px;
    border: 1px solid rgba(203,213,225,.68);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    color: inherit;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.action-tile:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(58,109,240,.28);
    box-shadow: 0 16px 38px rgba(58,109,240,.09);
}
.action-tile__icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    margin-bottom: 14px;
}
.action-tile__title,
.action-tile__text {
    display: block;
}
.action-tile__title {
    color: #172033;
    font-weight: 540;
    margin-bottom: 5px;
}
.action-tile__text {
    color: #6b7890;
    font-size: .86rem;
    line-height: 1.48;
}
.readiness-list,
.detail-list {
    display: grid;
    gap: 10px;
}
.readiness-item,
.detail-list > div {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 13px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(203,213,225,.58);
}
.readiness-item span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #16885a;
    background: #e7f7ef;
}
.readiness-item span .ui-icon { width: 15px; height: 15px; }
.readiness-item.is-warn span { color: #b66e0e; background: #fff4dc; }
.readiness-item p,
.detail-list p { margin: 0; color: #1e293b; font-weight: 470; }
.detail-list > div { justify-content: space-between; }
.detail-list span { color: #748198; font-size: .84rem; }

.toolbar--soft {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.toolbar-search {
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(203,213,225,.78);
    border-radius: 14px;
    background: #fff;
    color: #8a96a8;
}
.toolbar-search .ui-icon { width: 16px; height: 16px; }
.toolbar-search .input-search {
    border: 0;
    background: transparent;
    padding-left: 0;
    min-width: 220px;
    box-shadow: none;
}
.toolbar-search .input-search:focus { outline: 0; box-shadow: none; }
.table-wrap--premium {
    border-radius: 18px;
    border: 1px solid rgba(203,213,225,.72);
    background: #fff;
    overflow: auto;
}
body[data-page="employees"] .data-table,
body[data-page="archive"] .data-table,
body[data-page="settings"] .data-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
body[data-page="employees"] .data-table th,
body[data-page="archive"] .data-table th,
body[data-page="settings"] .data-table th {
    background: #f8fafc;
    color: #61708a;
    font-size: .76rem;
    letter-spacing: .055em;
    text-transform: uppercase;
    font-weight: 520;
    border-bottom: 1px solid rgba(203,213,225,.74);
}
body[data-page="employees"] .data-table td,
body[data-page="archive"] .data-table td,
body[data-page="settings"] .data-table td {
    border-bottom: 1px solid rgba(226,232,240,.82);
    color: #273449;
    font-weight: 430;
}
body[data-page="employees"] .data-table tbody tr:hover,
body[data-page="archive"] .data-table tbody tr:hover,
body[data-page="settings"] .data-table tbody tr:hover { background: #f9fbff; }
.actions-head { text-align: right; }
.actions-cell--compact {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.person-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}
.person-avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #eef4ff, #e8efff);
    color: #3a6df0;
    border: 1px solid rgba(58,109,240,.16);
    font-weight: 520;
    letter-spacing: .02em;
}
.person-cell__text,
.period-cell > span:last-child { display: grid; gap: 2px; }
.person-name,
.period-cell__title {
    color: #172033;
    font-weight: 520;
}
.person-id,
.period-cell__key,
.muted-soft {
    color: #7d899b;
    font-size: .82rem;
    font-weight: 430;
}
.availability-stack,
.policy-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.soft-chip,
.policy-pill,
.status-dot,
.archive-warning-pill,
.settings-year-badge,
.archive-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 460;
    line-height: 1;
    border: 1px solid rgba(203,213,225,.72);
    background: #f8fafc;
    color: #58667d;
}
.soft-chip span {
    color: #7b88a0;
    font-size: .72rem;
}
.soft-chip--count { justify-content: center; min-width: 44px; }
.policy-pill.is-ok,
.status-dot.is-active,
.archive-warning-pill.is-clean {
    background: #eef9f4;
    color: #167c54;
    border-color: rgba(31,170,107,.18);
}
.policy-pill.is-muted,
.status-dot.is-inactive {
    background: #f3f6fa;
    color: #7d899b;
}
.status-dot > span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}
.archive-warning-pill.has-warnings {
    background: #fff6e7;
    color: #aa680f;
    border-color: rgba(224,146,26,.2);
}
.period-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 210px;
}
.period-cell__icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    color: #3a6df0;
    background: #eef4ff;
    border: 1px solid rgba(58,109,240,.14);
}
.period-cell__icon .ui-icon { width: 17px; height: 17px; }
.archive-hint {
    border-radius: 14px;
    min-height: 34px;
    background: #f8fbff;
}
.archive-hint .ui-icon { width: 15px; height: 15px; color: #16885a; }

.empty-state--polished {
    display: grid;
    place-items: center;
    gap: 9px;
    text-align: center;
    padding: 38px 20px;
    color: #6b7890;
}
.empty-state__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}
.empty-state__title {
    color: #172033;
    font-weight: 540;
    font-size: 1.02rem;
}

.modal__dialog--premium {
    border-radius: 24px;
    border: 1px solid rgba(203,213,225,.76);
    box-shadow: 0 30px 90px rgba(15,23,42,.22);
}
.modal__header--premium,
.modal__footer--premium {
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.modal__body--premium { background: #fbfdff; }
.modal__section--premium {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(203,213,225,.66);
    border-radius: 18px;
    background: #fff;
}
.form-grid--premium { gap: 14px; }
.switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.field--switch {
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid rgba(203,213,225,.72);
    border-radius: 16px;
    background: #fff;
}
.field--switch span { font-weight: 450; color: #344155; }
.field__hint,
.month-field__suffix { color: #8a96a8; font-size: .78rem; }

.settings-nav {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 8px;
    border: 1px solid rgba(203,213,225,.68);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
}
.settings-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 13px;
    color: #516078;
    font-weight: 460;
}
.settings-nav a:hover {
    text-decoration: none;
    background: #eef4ff;
    color: #315cf6;
}
.settings-nav .ui-icon { width: 16px; height: 16px; }
.settings-panel { margin-bottom: 20px; scroll-margin-top: 88px; }
.settings-form { display: grid; gap: 18px; }
.settings-group {
    padding: 18px;
    border: 1px solid rgba(203,213,225,.62);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}
.settings-group__intro { margin-bottom: 15px; }
.switch-grid--settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}
.settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.settings-year-badge {
    color: #315cf6;
    background: #eef4ff;
    border-color: rgba(58,109,240,.16);
}
.hours-grid--premium {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.month-field {
    padding: 12px;
    border: 1px solid rgba(203,213,225,.66);
    border-radius: 16px;
    background: #fff;
}
.month-field input { margin-top: 6px; }
.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(58,109,240,.12);
    border-radius: 16px;
    background: #f5f8ff;
    color: #5f6f8a;
}
.info-strip .ui-icon { width: 17px; height: 17px; color: #3a6df0; }
.info-strip p { margin: 0; line-height: 1.5; }
.shifts-table input,
.shifts-table select {
    min-width: 112px;
}
.shifts-table input[readonly] {
    max-width: 120px;
    background: #f8fafc;
    color: #64748b;
}
.center-cell { text-align: center; }
.alert--polished {
    display: flex;
    align-items: center;
    border-radius: 16px;
    margin-bottom: 18px;
}

body[data-page="settings"] input,
body[data-page="settings"] select,
body[data-page="settings"] textarea,
body[data-page="employees"] input,
body[data-page="employees"] select,
body[data-page="employees"] textarea {
    font-weight: 430;
}
body[data-page="settings"] .field__label,
body[data-page="employees"] .field__label {
    font-weight: 500;
    color: #516078;
}

@media (max-width: 1180px) {
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pro-layout,
    .pro-layout--dashboard-lower { grid-template-columns: 1fr; }
    .action-grid--polished { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hours-grid--premium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .pro-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .pro-hero__actions { justify-content: flex-start; }
    .pro-card__header--split { align-items: flex-start; flex-direction: column; }
    .overview-metrics,
    .action-grid--polished,
    .switch-grid,
    .switch-grid--settings,
    .hours-grid--premium { grid-template-columns: 1fr; }
    .toolbar-search { width: 100%; min-width: 0; }
    .toolbar-search .input-search { min-width: 0; width: 100%; }
}


/* =========================================================
   v16 — Premium forms, dropdowns, generator wizard and login
   Grafika tabulas dizains netiek mainīts.
   ========================================================= */

/* ---------- Custom dropdown system ---------- */
.custom-select {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-width: 132px;
    vertical-align: middle;
}
.select-native-hidden {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.custom-select__button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #cad4e6;
    border-radius: 13px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
    color: #1e293b;
    padding: 0 13px 0 14px;
    font: inherit;
    font-weight: 450;
    letter-spacing: .005em;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.78),
        0 1px 2px rgba(15,23,42,.035);
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.custom-select__button:hover {
    border-color: #9db4df;
    background: linear-gradient(180deg, #fff, #f5f8fe);
}
.custom-select__button:focus-visible,
.custom-select__button.is-focused,
.custom-select.is-open .custom-select__button {
    outline: none;
    border-color: rgba(58,109,240,.72);
    box-shadow:
        0 0 0 4px rgba(58,109,240,.12),
        inset 0 1px 0 rgba(255,255,255,.85);
}
.custom-select__button:disabled {
    cursor: not-allowed;
    opacity: .62;
    background: #f2f5f9;
}
.custom-select__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.custom-select__chevron {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #eef4ff;
    position: relative;
    transition: transform .16s ease, background .16s ease;
}
.custom-select__chevron::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 48%;
    width: 7px;
    height: 7px;
    border-right: 1.7px solid #5470a6;
    border-bottom: 1.7px solid #5470a6;
    transform: translate(-50%, -62%) rotate(45deg);
}
.custom-select.is-open .custom-select__chevron {
    transform: rotate(180deg);
    background: #e1eaff;
}
.custom-select-menu {
    position: fixed;
    z-index: 20000;
    overflow: auto;
    padding: 6px;
    border: 1px solid rgba(148,163,184,.38);
    border-radius: 15px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,251,255,.985));
    box-shadow:
        0 20px 60px rgba(15,23,42,.18),
        0 2px 10px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.85);
    backdrop-filter: blur(16px);
}
.custom-select-menu__option {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    text-align: left;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #253248;
    padding: 8px 11px;
    font: inherit;
    font-weight: 430;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, transform .14s ease;
}
.custom-select-menu__option:hover,
.custom-select-menu__option:focus-visible {
    outline: none;
    background: #eef4ff;
    color: #244fb8;
}
.custom-select-menu__option.is-selected {
    background: linear-gradient(135deg, #e9f0ff, #f2f6ff);
    color: #244fb8;
}
.custom-select-menu__option.is-selected::after {
    content: "✓";
    margin-left: auto;
    color: #3a6df0;
}
.custom-select-menu__option:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Settings selects/tables */
body[data-page="settings"] .custom-select__button,
body[data-page="generator"] .custom-select__button {
    min-height: 42px;
}
body[data-page="settings"] .shifts-table .custom-select {
    min-width: 152px;
}
body[data-page="settings"] .shifts-table td {
    overflow: visible;
}
body[data-page="settings"] .table-wrap--premium {
    overflow: auto;
}
body[data-page="settings"] .shifts-table input,
body[data-page="settings"] .shifts-table .custom-select__button {
    height: 42px;
}
body[data-page="settings"] .settings-panel {
    border: 1px solid rgba(196,207,226,.72);
    box-shadow: 0 18px 48px rgba(15,23,42,.055);
}
body[data-page="settings"] .settings-group {
    border: 1px solid rgba(214,222,235,.74);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
body[data-page="settings"] .settings-group__intro h4,
body[data-page="settings"] .pro-card__titleline h3 {
    font-weight: 560;
    letter-spacing: -.015em;
}
body[data-page="settings"] .settings-group__intro p,
body[data-page="settings"] .pro-card__titleline p {
    color: #6c7890;
}
body[data-page="settings"] .data-table th {
    font-weight: 520;
    letter-spacing: .055em;
}
body[data-page="settings"] .data-table td {
    vertical-align: middle;
}
body[data-page="settings"] .field__label {
    font-weight: 500;
    color: #526078;
}
body[data-page="settings"] input,
body[data-page="settings"] textarea {
    font-weight: 430;
}

/* ---------- Generator 1–7 professional wizard sections ---------- */
body[data-page="generator"] .wizard {
    margin-top: 18px;
}
body[data-page="generator"] .wizard__steps {
    display: grid;
    grid-template-columns: repeat(7, minmax(112px, 1fr));
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(198,209,228,.66);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 14px 40px rgba(15,23,42,.055), inset 0 1px 0 rgba(255,255,255,.86);
    backdrop-filter: blur(14px);
}
body[data-page="generator"] .wizard__steps li {
    min-width: 0;
    padding: 12px 12px 12px 42px;
    border-radius: 16px;
    border-color: transparent;
    background: transparent;
    color: #65718a;
    font-weight: 460;
    box-shadow: none;
}
body[data-page="generator"] .wizard__steps li::before {
    left: 12px;
    width: 22px;
    height: 22px;
    background: #edf3fb;
    color: #6f7e98;
    border-color: transparent;
    font-weight: 500;
}
body[data-page="generator"] .wizard__steps li.is-active {
    background: linear-gradient(135deg, #edf4ff, #f7faff);
    color: #2f5eca;
    border-color: rgba(58,109,240,.24);
    box-shadow: 0 8px 20px rgba(58,109,240,.08);
}
body[data-page="generator"] .wizard__steps li.is-active::before {
    background: #3a6df0;
    color: #fff;
}
body[data-page="generator"] .wizard__steps li.is-done {
    color: #25644e;
    background: #effaf5;
}
body[data-page="generator"] .wizard__steps li.is-done::before {
    background: #1faa6b;
    color: #fff;
}
body[data-page="generator"] .wizard-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(198,209,228,.72);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(58,109,240,.075), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,251,255,.95));
    box-shadow:
        0 22px 70px rgba(15,23,42,.07),
        inset 0 1px 0 rgba(255,255,255,.88);
}
body[data-page="generator"] .wizard-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(58,109,240,.055), transparent 34%);
    opacity: .6;
}
body[data-page="generator"] .wizard-card > * {
    position: relative;
    z-index: 1;
}
.wizard-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    max-width: 980px;
}
.wizard-panel-head .section-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    flex: 0 0 auto;
}
.wizard-panel-head__eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: #6a7892;
    font-size: .74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.wizard-panel-head h2 {
    margin: 0;
    font-size: clamp(1.22rem, 1.7vw, 1.58rem);
    font-weight: 560;
    letter-spacing: -.026em;
    color: #162033;
}
.wizard-panel-head p {
    margin-top: 6px;
    color: #68758d;
    line-height: 1.6;
    max-width: 780px;
}
body[data-page="generator"] .form-grid {
    gap: 14px;
}
body[data-page="generator"] .field {
    margin-bottom: 0;
}
body[data-page="generator"] .field:not(.field--checkbox) {
    padding: 12px;
    border: 1px solid rgba(214,222,235,.72);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.84);
}
body[data-page="generator"] .field__label {
    margin-bottom: 7px;
    color: #55627a;
    font-weight: 500;
    letter-spacing: .01em;
}
body[data-page="generator"] input:not([type="checkbox"]),
body[data-page="generator"] textarea {
    border-radius: 13px;
    font-weight: 430;
}
body[data-page="generator"] .field--checkbox {
    min-height: 68px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(214,222,235,.72);
    border-radius: 18px;
    background: rgba(255,255,255,.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.84);
}
body[data-page="generator"] .field--checkbox span {
    font-weight: 460;
    color: #2d374b;
}
body[data-page="generator"] .field--checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #3a6df0;
}
body[data-page="generator"] .hint,
.panel-note {
    border: 1px solid rgba(58,109,240,.13);
    border-radius: 16px;
    background: linear-gradient(180deg, #f6f9ff, #f9fbff);
    color: #61708a;
    padding: 12px 14px;
    line-height: 1.58;
}
.panel-note {
    margin: 0 0 16px;
}
.panel-note--policy {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}
.panel-note--policy svg {
    width: 20px;
    height: 20px;
    color: #d18418;
    flex: 0 0 auto;
    margin-top: 1px;
}
.panel-note--policy em {
    font-style: normal;
    font-weight: 560;
    color: #9a5b05;
}
body[data-page="generator"] .checklist {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
body[data-page="generator"] .checklist__item {
    min-height: 62px;
    border-radius: 18px;
    border-color: rgba(208,218,234,.82);
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,250,255,.9));
    font-weight: 470;
    color: #243044;
}
body[data-page="generator"] .checklist__item:hover {
    border-color: rgba(58,109,240,.36);
    background: #f5f8ff;
    transform: translateY(-1px);
}
body[data-page="generator"] .checklist__item input {
    width: 18px;
    height: 18px;
}
body[data-page="generator"] .table-wrap:not(.schedule-scroll) {
    border-radius: 18px;
    border: 1px solid rgba(205,216,232,.82);
    background: #fff;
    box-shadow: 0 12px 34px rgba(15,23,42,.045);
}
body[data-page="generator"] .data-table th {
    background: #f7faff;
    color: #53617a;
    font-weight: 520;
    letter-spacing: .055em;
}
body[data-page="generator"] .data-table td {
    color: #243044;
    font-weight: 430;
}
body[data-page="generator"] .field--inline {
    display: grid;
    grid-template-columns: minmax(120px, 190px) minmax(220px, 360px) auto;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
}
body[data-page="generator"] .field--inline .field__label {
    margin: 0;
}
body[data-page="generator"] .counter {
    border-radius: 999px;
    background: #edf4ff;
    border: 1px solid rgba(58,109,240,.18);
    color: #315fc9;
    padding: 7px 11px;
    font-weight: 500;
}
body[data-page="generator"] .calendar {
    max-width: 620px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(205,216,232,.82);
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 14px 40px rgba(15,23,42,.045);
}
body[data-page="generator"] .calendar__dow {
    font-weight: 520;
}
body[data-page="generator"] .calendar__day {
    border-radius: 14px;
    font-weight: 460;
}
body[data-page="generator"] .save-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: #f5f8fc;
    padding: 7px 12px;
}
body[data-page="generator"] #addVacation,
body[data-page="generator"] #savePrevMonth {
    margin-top: 14px;
}
body[data-page="generator"] .prev5-wrap {
    padding: 14px;
    border: 1px solid rgba(205,216,232,.82);
    border-radius: 20px;
    background: rgba(255,255,255,.72);
}
body[data-page="generator"] .prev5-row__name {
    font-weight: 500;
}
body[data-page="generator"] .prev5-block {
    border-radius: 15px;
    font-weight: 450;
}
body[data-page="generator"] .generate-command {
    grid-template-columns: minmax(280px, 400px) 1fr;
    gap: 20px;
}
body[data-page="generator"] .generation-panel {
    border-radius: 22px;
    border: 1px solid rgba(58,109,240,.16);
    background:
        radial-gradient(circle at top right, rgba(58,109,240,.12), transparent 34%),
        linear-gradient(180deg, #fff, #f7faff);
}
body[data-page="generator"] .generation-panel__head strong {
    font-weight: 560;
}
body[data-page="generator"] .generation-steps span {
    font-weight: 470;
}
body[data-page="generator"] .wizard__nav {
    margin-top: 18px;
}

/* ---------- Stronger premium login ---------- */
.login-body--premium {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(circle at 10% 10%, rgba(78,121,255,.34), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(31,170,107,.20), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(122,90,240,.28), transparent 35%),
        linear-gradient(135deg, #0d1324, #13213f 54%, #1d3b81);
}
.login-shell {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(340px, .82fr);
    gap: 24px;
    align-items: stretch;
}
.login-showcase,
.login-card--premium {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 30px;
    box-shadow: 0 34px 120px rgba(0,0,0,.30);
    backdrop-filter: blur(20px);
}
.login-showcase {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 42px;
    overflow: hidden;
    position: relative;
    color: #fff;
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.16), transparent 28%),
        linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.055));
}
.login-showcase::before {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,.12);
    pointer-events: none;
}
.login-showcase::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -90px;
    top: -70px;
    border-radius: 50%;
    background: conic-gradient(from 120deg, rgba(58,109,240,.9), rgba(31,170,107,.68), rgba(122,90,240,.82), rgba(58,109,240,.9));
    filter: blur(2px);
    opacity: .44;
}
.login-showcase > * {
    position: relative;
    z-index: 1;
}
.login-showcase__badge {
    width: fit-content;
    margin-bottom: auto;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    padding: 8px 12px;
    color: #dce8ff;
    font-size: .82rem;
    font-weight: 480;
}
.login-showcase h1 {
    max-width: 620px;
    font-size: clamp(2rem, 4.4vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.06em;
    font-weight: 560;
}
.login-showcase p {
    max-width: 560px;
    margin-top: 18px;
    color: #cfdbf2;
    font-size: 1.02rem;
    line-height: 1.75;
}
.login-showcase__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.login-showcase__grid span {
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #eaf1ff;
    padding: 9px 12px;
    font-size: .84rem;
    font-weight: 430;
}
.login-card--premium {
    max-width: none;
    width: 100%;
    padding: 36px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,255,.93));
    color: #142033;
}
.login-card--premium .login-card__brand {
    text-align: left;
}
.login-card--premium .login-card__brand .sidebar__logo {
    margin: 0 0 18px;
    box-shadow: 0 16px 42px rgba(58,109,240,.28);
}
.login-card--premium .login-card__brand h1 {
    font-size: 1.65rem;
    font-weight: 560;
    letter-spacing: -.035em;
}
.login-card--premium .login-card__brand p {
    max-width: 360px;
    color: #66738c;
    line-height: 1.6;
}
.login-form--premium {
    gap: 14px;
}
.field--with-icon {
    position: relative;
}
.field--with-icon input {
    padding-left: 44px;
}
.field__control-icon {
    position: absolute;
    left: 14px;
    bottom: 13px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    opacity: .68;
    font-size: .95rem;
}
.btn--login {
    min-height: 48px;
    margin-top: 4px;
    border-radius: 15px;
    font-weight: 560;
    box-shadow: 0 16px 34px rgba(58,109,240,.24);
}
.login-hint--premium {
    border-top: 1px solid rgba(203,213,225,.64);
    padding-top: 16px;
}
@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-showcase {
        min-height: auto;
    }
}
@media (max-width: 980px) {
    body[data-page="generator"] .wizard__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body[data-page="generator"] .generate-command,
    body[data-page="generator"] .field--inline {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
@media (max-width: 620px) {
    .login-body--premium {
        padding: 16px;
    }
    .login-showcase,
    .login-card--premium {
        border-radius: 24px;
        padding: 24px;
    }
    body[data-page="generator"] .wizard__steps {
        grid-template-columns: 1fr;
    }
}

.field__control-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- v17 refined login experience ---------- */
.login-body--v17 {
    min-height: 100vh;
    padding: clamp(18px, 3.2vw, 42px);
    display: grid;
    place-items: center;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 8%, rgba(87,124,255,.34), transparent 30%),
        radial-gradient(circle at 84% 12%, rgba(45,188,133,.18), transparent 28%),
        radial-gradient(circle at 52% 100%, rgba(126,96,255,.20), transparent 36%),
        linear-gradient(135deg, #0b1223 0%, #13213f 48%, #183b54 100%);
}
.login-body--v17::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}
.auth-layout {
    position: relative;
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 1.08fr) minmax(360px, .84fr);
    gap: clamp(20px, 3vw, 30px);
    align-items: stretch;
}
.auth-brand-panel,
.auth-card {
    border-radius: 32px;
    box-shadow: 0 34px 110px rgba(0,0,0,.30);
}
.auth-brand-panel {
    min-height: 580px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.15);
    background:
        radial-gradient(circle at 80% 20%, rgba(63,214,170,.22), transparent 30%),
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.14), transparent 32%),
        linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
    color: #fff;
    backdrop-filter: blur(20px);
    overflow: hidden;
}
.auth-brand-panel__inner {
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(24px, 3vw, 38px);
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,.12);
    overflow: hidden;
}
.auth-brand-panel__inner::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -120px;
    top: -80px;
    border-radius: 999px;
    background: conic-gradient(from 130deg, rgba(79,111,255,.92), rgba(37,186,139,.72), rgba(126,96,255,.74), rgba(79,111,255,.92));
    opacity: .42;
    filter: blur(3px);
}
.auth-brand-panel__inner > * { position: relative; z-index: 1; }
.auth-brand-pill {
    align-self: flex-start;
    margin-bottom: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #dce8ff;
    font-size: .84rem;
    font-weight: 450;
}
.auth-brand-pill__mark,
.auth-logo {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #4a66ff, #33a98d);
    box-shadow: 0 18px 42px rgba(69,105,255,.27);
}
.auth-brand-pill__mark { width: 28px; height: 28px; border-radius: 10px; }
.auth-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: #83b8ff;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .74rem;
    font-weight: 520;
}
.auth-brand-panel h1 {
    max-width: 660px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.05rem, 4vw, 3.7rem);
    line-height: 1.04;
    letter-spacing: -.055em;
    font-weight: 540;
}
.auth-brand-panel p {
    max-width: 570px;
    margin: 20px 0 0;
    color: #d2def2;
    font-size: 1.01rem;
    line-height: 1.78;
    font-weight: 380;
}
.auth-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}
.auth-feature-row span {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.075);
    color: #edf4ff;
    font-size: .84rem;
    font-weight: 420;
}
.auth-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 4vw, 42px);
    border: 1px solid rgba(255,255,255,.76);
    background:
        radial-gradient(circle at 92% 6%, rgba(74,102,255,.08), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.95));
    color: #172033;
}
.auth-card__top { margin-bottom: 28px; }
.auth-logo {
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 18px;
    font-size: 1.35rem;
    font-weight: 540;
    letter-spacing: -.04em;
}
.auth-card h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.14;
    letter-spacing: -.035em;
    font-weight: 560;
}
.auth-card p {
    max-width: 390px;
    margin: 10px 0 0;
    color: #66738c;
    line-height: 1.65;
    font-weight: 390;
}
.auth-form {
    display: grid;
    gap: 17px;
}
.auth-field {
    display: grid;
    gap: 8px;
}
.auth-field__label {
    color: #526078;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 520;
}
.auth-field__control {
    position: relative;
    display: block;
}
.auth-field__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    color: #75839b;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: color .18s ease, transform .18s ease;
}
.auth-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    border-radius: 16px;
    border: 1px solid #cfd7e5;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: .96rem;
    font-weight: 420;
    letter-spacing: .01em;
    outline: none;
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 24px rgba(15,23,42,.035);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-field input::placeholder { color: #9aa6b9; }
.auth-field input:focus {
    border-color: rgba(58,109,240,.74);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(58,109,240,.11), 0 16px 34px rgba(58,109,240,.09);
}
.auth-field__control:focus-within .auth-field__icon {
    color: #315cf6;
    transform: translateY(-50%) scale(1.03);
}
.auth-submit {
    width: 100%;
    height: 54px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #315cf6, #244bd4);
    color: #fff;
    font: inherit;
    font-size: .96rem;
    font-weight: 540;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(49,92,246,.26);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(49,92,246,.30);
    filter: saturate(1.04);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit svg,
.auth-alert svg,
.auth-note svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -6px 0 20px;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(224,70,62,.18);
    background: linear-gradient(180deg, #fff5f5, #fffafa);
    color: #b42318;
    font-size: .91rem;
    line-height: 1.5;
}
.auth-alert svg { flex: 0 0 18px; margin-top: 1px; }
.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(203,213,225,.66);
    color: #738097;
    font-size: .84rem;
    line-height: 1.55;
}
.auth-note svg {
    flex: 0 0 18px;
    margin-top: 1px;
    color: #1faa6b;
}
@media (max-width: 980px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand-panel { min-height: 390px; }
}
@media (max-width: 620px) {
    .login-body--v17 { padding: 14px; }
    .auth-brand-panel { display: none; }
    .auth-card { border-radius: 24px; padding: 26px; }
    .auth-logo { width: 52px; height: 52px; border-radius: 16px; }
}

/* =========================================================
   v20 — Publiskās vadītāja pārskatīšanas saites
   ========================================================= */
.review-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .26);
    background: rgba(248, 250, 252, .86);
    color: #64748b;
    font-size: .76rem;
    font-weight: 520;
    white-space: nowrap;
}
.review-status-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
}
.review-status-chip.is-pending { background: #f8fafc; color: #64748b; border-color: rgba(148,163,184,.30); }
.review-status-chip.is-approved { background: #edfdf5; color: #12835b; border-color: rgba(31,170,107,.22); }
.review-status-chip.is-changes { background: #fff7ed; color: #b66a08; border-color: rgba(224,146,26,.25); }
.review-status-chip.is-none { background: #f8fafc; color: #94a3b8; border-color: rgba(203,213,225,.45); }

.share-admin-panel { margin: 20px 0; }
.share-admin-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.share-link-field input[readonly] {
    cursor: text;
    background: linear-gradient(180deg, #fff, #f8fbff);
    color: #274066;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86rem;
}
.share-admin-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 13px;
    padding: 12px 14px;
    border-radius: 15px;
    background: rgba(248,250,252,.72);
    border: 1px solid rgba(226,232,240,.72);
    color: #64748b;
    font-size: .86rem;
}

.share-public-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(58, 109, 240, .16), transparent 32%),
        radial-gradient(circle at 92% 8%, rgba(31, 170, 107, .12), transparent 30%),
        linear-gradient(180deg, #f6f8fc 0%, #edf3fb 100%);
    color: #172033;
}
.share-public-shell {
    width: min(1580px, calc(100% - 44px));
    margin: 0 auto;
    padding: 34px 0 44px;
}
.share-public-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(203,213,225,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 18px 60px rgba(30, 41, 59, .08);
    backdrop-filter: blur(14px);
}
.share-public-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4f78e8;
    font-size: .72rem;
    font-weight: 540;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.share-public-header h1,
.share-schedule-card__head h2,
.share-review-panel h2,
.share-public-card h1 {
    margin: 5px 0 6px;
    color: #172033;
    font-weight: 610;
    letter-spacing: -.035em;
}
.share-public-header p,
.share-review-panel p,
.share-public-card p {
    max-width: 760px;
    color: #65728a;
    line-height: 1.65;
}
.share-review-status {
    min-width: 220px;
    padding: 13px 15px;
    border-radius: 18px;
    border: 1px solid rgba(203,213,225,.72);
    background: #fff;
    box-shadow: 0 10px 28px rgba(30,41,59,.06);
}
.share-review-status span,
.share-review-status small { display: block; }
.share-review-status span { font-weight: 560; color: #24324a; }
.share-review-status small { margin-top: 3px; color: #8a96aa; font-size: .76rem; }
.share-review-status.is-approved { border-color: rgba(31,170,107,.22); background: #f2fff8; }
.share-review-status.is-changes { border-color: rgba(224,146,26,.24); background: #fff8ed; }

.share-public-card {
    border: 1px solid rgba(203,213,225,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 60px rgba(30, 41, 59, .08);
    overflow: hidden;
}
.share-public-card--center {
    width: min(560px, 100%);
    margin: 12vh auto 0;
    padding: 34px;
    text-align: center;
}
.share-public-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    color: #fff;
    background: linear-gradient(135deg, #4e6cff, #2ead8a);
    font-size: 1.2rem;
    font-weight: 620;
}
.share-review-panel {
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(340px, 1fr);
    gap: 24px;
    margin-bottom: 18px;
    padding: 22px 24px;
}
.share-review-last {
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,.86);
}
.share-review-last span {
    display: block;
    color: #7b879a;
    font-size: .76rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.share-review-last p { margin: 0; color: #334155; }
.share-review-form {
    display: grid;
    gap: 13px;
}
.share-review-field {
    display: grid;
    gap: 7px;
}
.share-review-field span {
    color: #526079;
    font-size: .76rem;
    font-weight: 560;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.share-review-field input,
.share-review-field textarea {
    width: 100%;
    border: 1px solid #d4dce8;
    border-radius: 15px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    color: #172033;
    padding: 12px 14px;
    font: inherit;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 1px 2px rgba(15,23,42,.03);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.share-review-field textarea { resize: vertical; min-height: 92px; }
.share-review-field input:focus,
.share-review-field textarea:focus {
    border-color: rgba(58,109,240,.72);
    box-shadow: 0 0 0 4px rgba(58,109,240,.10);
    background: #fff;
}
.share-review-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.share-schedule-card { padding: 0; }
.share-schedule-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 22px;
    border-bottom: 1px solid rgba(226,232,240,.82);
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.share-readonly-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(58,109,240,.18);
    background: #edf4ff;
    color: #3a61c8;
    font-size: .78rem;
    font-weight: 540;
}
.share-schedule-card .schedule-scroll {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}
.share-schedule-card .schedule-table {
    margin: 0;
}

@media (max-width: 860px) {
    .share-public-shell { width: min(100% - 24px, 1580px); padding-top: 18px; }
    .share-public-header,
    .share-review-panel { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
    .share-admin-grid { grid-template-columns: 1fr; }
    .share-review-actions { justify-content: stretch; }
    .share-review-actions .btn { width: 100%; justify-content: center; }
}


/* =========================================================
   v21 — Sakārtota vadītāja saite, arhīva darbības un publiskais lēmuma bloks
   ========================================================= */
body[data-page="archive"] .archive-library .table-wrap--premium {
    overflow-x: auto;
    overflow-y: hidden;
}
body[data-page="archive"] .archive-table {
    min-width: 1180px;
    table-layout: auto;
}
body[data-page="archive"] .archive-table th,
body[data-page="archive"] .archive-table td {
    vertical-align: middle;
}
body[data-page="archive"] .archive-table th:last-child,
body[data-page="archive"] .archive-table td:last-child {
    text-align: right;
    width: 430px;
}
.archive-table .review-status-chip,
.archive-table .archive-warning-pill,
.archive-table .soft-chip {
    min-height: 30px;
}
.archive-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: nowrap;
    min-width: 420px;
}
.archive-actions .btn {
    min-height: 32px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: none;
}
.archive-actions .btn--primary {
    box-shadow: 0 10px 22px rgba(49, 92, 246, .15);
}
.archive-actions .btn--danger {
    background: #fff1f1;
    color: #d52525;
    border-color: rgba(224, 70, 62, .16);
}
.share-admin-panel--refined {
    margin: 20px 0 22px;
    border-radius: 24px;
    overflow: hidden;
}
.share-admin-head {
    align-items: flex-start;
}
.share-admin-card {
    display: grid;
    gap: 14px;
    padding: 18px 20px 21px;
    border-top: 1px solid rgba(226, 232, 240, .72);
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.86));
}
.share-admin-url {
    display: grid;
    gap: 8px;
}
.share-admin-url__label {
    color: #526079;
    font-size: .74rem;
    font-weight: 560;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.share-admin-url__box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px;
    align-items: center;
    padding: 7px;
    border: 1px solid rgba(203, 213, 225, .88);
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 26px rgba(30,41,59,.04);
}
.share-admin-url__box input[readonly] {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: #24324a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86rem;
    padding: 0 8px;
    outline: none;
    box-shadow: none;
}
.share-admin-url__box .btn {
    min-height: 38px;
    border-radius: 13px;
}
.share-admin-url__box .btn.is-copied {
    background: #16a36d;
    border-color: #16a36d;
    color: #fff;
}
.share-admin-panel--refined .share-admin-meta {
    margin-top: 0;
    padding: 13px 14px;
    border-radius: 17px;
    background: #f8fafc;
    border-color: rgba(226,232,240,.9);
}
.share-public-header,
.share-review-panel,
.share-schedule-card {
    box-shadow: 0 18px 50px rgba(30, 41, 59, .075);
}
.share-review-panel {
    grid-template-columns: minmax(320px, .72fr) minmax(420px, 1fr);
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}
.share-review-panel__copy {
    padding: 24px 26px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border-right: 1px solid rgba(226,232,240,.86);
}
.share-review-form {
    padding: 24px 26px;
    background: #fff;
    align-content: center;
}
.share-review-field textarea {
    min-height: 118px;
    line-height: 1.55;
}
.share-review-actions {
    margin-top: 2px;
    justify-content: flex-start;
}
.share-review-actions .btn {
    min-height: 42px;
    border-radius: 14px;
    font-weight: 520;
}
.share-review-actions .btn--ghost {
    background: #fff;
}
.share-review-last {
    margin-top: 16px;
    background: #fff;
}
.share-schedule-card__head {
    padding: 20px 24px;
}
@media (max-width: 940px) {
    .share-admin-url__box { grid-template-columns: 1fr; }
    .share-admin-url__box input[readonly] {
        min-height: 38px;
        padding: 0 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .share-admin-url__box .btn { width: 100%; justify-content: center; }
    .share-review-panel { grid-template-columns: 1fr; }
    .share-review-panel__copy { border-right: 0; border-bottom: 1px solid rgba(226,232,240,.86); }
}

/* =========================================================
   v22 — profesionālāki kopīgošanas teksti un publiskā stundu bilance
   ========================================================= */
.share-public-header p,
.share-review-panel p,
.share-public-card p {
    color: #64748b;
}
.share-review-status span {
    font-weight: 520;
}
.share-review-panel__copy h2,
.share-schedule-card__head h2 {
    font-weight: 560;
}
.share-review-field span {
    font-weight: 520;
}
.share-review-actions .btn {
    font-weight: 500;
}
.share-hour-summary {
    margin: 0;
    padding: 22px 24px 24px;
    border-top: 1px solid rgba(226, 232, 240, .86);
    background:
        radial-gradient(circle at 95% 0%, rgba(58, 109, 240, .08), transparent 28%),
        linear-gradient(180deg, #ffffff, #f8fbff);
}
.share-hour-summary__headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.share-hour-summary__headline h3 {
    margin: 5px 0 4px;
    color: #172033;
    font-size: 1.08rem;
    font-weight: 560;
    letter-spacing: -.02em;
}
.share-hour-summary__headline p {
    margin: 0;
    max-width: 720px;
    color: #64748b;
    line-height: 1.6;
}
.share-balance-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    color: #334155;
    font-size: .88rem;
    font-weight: 540;
    white-space: nowrap;
}
.share-balance-pill--ok { color: #12835b; background: #effdf6; border-color: rgba(31,170,107,.22); }
.share-balance-pill--under { color: #b66a08; background: #fff7ed; border-color: rgba(224,146,26,.25); }
.share-balance-pill--over { color: #b42318; background: #fff1f1; border-color: rgba(224,70,62,.20); }
.share-hour-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.share-hour-metrics div {
    min-height: 76px;
    padding: 14px 15px;
    border: 1px solid rgba(203, 213, 225, .72);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 26px rgba(30, 41, 59, .045);
}
.share-hour-metrics span {
    display: block;
    margin-bottom: 6px;
    color: #7b879a;
    font-size: .74rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.share-hour-metrics strong {
    display: block;
    color: #1f2d44;
    font-size: 1.22rem;
    font-weight: 560;
    letter-spacing: -.02em;
}
.share-hour-rows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 9px;
}
.share-hour-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, .86);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: #334155;
}
.share-hour-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.share-hour-row small {
    color: #7b879a;
    white-space: nowrap;
}
.share-hour-row strong {
    min-width: 74px;
    text-align: right;
    color: #526079;
    font-size: .82rem;
    font-weight: 540;
    white-space: nowrap;
}
.share-hour-row--ok strong { color: #12835b; }
.share-hour-row--under strong { color: #b66a08; }
.share-hour-row--over strong { color: #b42318; }
@media (max-width: 760px) {
    .share-hour-summary__headline { flex-direction: column; align-items: stretch; }
    .share-balance-pill { align-self: flex-start; }
    .share-hour-metrics { grid-template-columns: 1fr; }
    .share-hour-row { grid-template-columns: 1fr; align-items: start; }
    .share-hour-row strong { text-align: left; }
}

/* =========================================================
   v23 — Arhīva tabulas darbību kolonnas izlīdzinājums
   ========================================================= */
body[data-page="archive"] .archive-library .table-wrap--premium {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 20px;
}
body[data-page="archive"] .archive-table {
    width: 100%;
    min-width: 1420px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}
body[data-page="archive"] .archive-table .archive-col--period { width: 300px; }
body[data-page="archive"] .archive-table .archive-col--saved { width: 185px; }
body[data-page="archive"] .archive-table .archive-col--employees { width: 118px; }
body[data-page="archive"] .archive-table .archive-col--notes { width: 150px; }
body[data-page="archive"] .archive-table .archive-col--review { width: 205px; }
body[data-page="archive"] .archive-table .archive-col--actions { width: 462px; }
body[data-page="archive"] .archive-table th,
body[data-page="archive"] .archive-table td {
    box-sizing: border-box;
    vertical-align: middle;
}
body[data-page="archive"] .archive-table th:last-child,
body[data-page="archive"] .archive-table td:last-child {
    width: auto;
}
body[data-page="archive"] .archive-table th.actions-head {
    text-align: right;
    padding-right: 16px;
}
body[data-page="archive"] .archive-table .archive-actions-cell {
    display: table-cell;
    text-align: right;
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
    overflow: visible;
}
body[data-page="archive"] .archive-table .archive-actions-cell::before {
    content: "";
    display: none;
}
body[data-page="archive"] .archive-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    width: auto;
    white-space: nowrap;
}
body[data-page="archive"] .archive-actions .btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 7px 11px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}
body[data-page="archive"] .archive-actions .btn__icon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
}
body[data-page="archive"] .archive-actions .btn--primary {
    box-shadow: 0 8px 18px rgba(49, 92, 246, .14);
}
body[data-page="archive"] .archive-actions .btn--danger {
    background: #fff1f1;
    color: #d52525;
    border-color: rgba(224, 70, 62, .16);
}
body[data-page="archive"] .archive-table .review-status-chip {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body[data-page="archive"] .archive-table tbody tr:hover .archive-actions-cell {
    background: #f9fbff;
}
@media (max-width: 900px) {
    body[data-page="archive"] .archive-table { min-width: 1370px; }
    body[data-page="archive"] .archive-table .archive-col--actions { width: 430px; }
    body[data-page="archive"] .archive-actions .btn { padding-inline: 10px; }
}

/* =========================================================
   v24 — Publiskā kopīgošanas grafika stundu bilance tabulā
   ========================================================= */
.share-schedule-card .schedule-scroll {
    max-height: 74vh;
    overflow: auto;
    background: #fff;
}
.share-schedule-table {
    width: max-content;
    min-width: 100%;
}
.share-schedule-table .sch-period--summary {
    background: linear-gradient(180deg, #f7fafc, #eef4fb);
    color: #4b5b74;
}
.share-schedule-table .share-sum-head {
    min-width: 86px;
    width: 86px;
    max-width: 96px;
    color: #5d6a80;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    font-weight: 520;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.share-schedule-table .share-sum {
    min-width: 86px;
    width: 86px;
    padding: 7px 8px;
    background: linear-gradient(180deg, #fbfdff, #f6f9fd);
    color: #334155;
    font-size: .78rem;
    font-weight: 500;
    border-left: 1px solid rgba(203, 213, 225, .74);
}
.share-schedule-table .share-sum.is-ok {
    color: #12835b;
    background: linear-gradient(180deg, #f9fffc, #f0fbf5);
}
.share-schedule-table .share-sum.is-under {
    color: #b66a08;
    background: linear-gradient(180deg, #fffdf8, #fff7ed);
}
.share-schedule-table .share-sum.is-over {
    color: #b42318;
    background: linear-gradient(180deg, #fffafa, #fff1f1);
}
.share-inline-balance {
    display: grid;
    gap: 1px;
    justify-items: center;
    line-height: 1.15;
}
.share-inline-balance strong {
    font-size: .82rem;
    font-weight: 560;
    letter-spacing: -.01em;
}
.share-inline-balance small {
    color: currentColor;
    opacity: .72;
    font-size: .62rem;
    font-weight: 500;
    white-space: nowrap;
}
.share-total-row td {
    border-top: 1px solid rgba(148, 163, 184, .32) !important;
}
.share-total-row .sch-name {
    background: #f8fafc !important;
}
.share-total-row .share-sum {
    background: #f8fafc;
}
.share-total-row--ok .share-sum.is-ok { background: #effdf6; }
.share-total-row--under .share-sum.is-under { background: #fff7ed; }
.share-total-row--over .share-sum.is-over { background: #fff1f1; }
.share-total-note {
    min-width: 420px;
    padding: 10px 14px !important;
    text-align: left !important;
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    color: #526079;
    white-space: normal !important;
}
.share-total-note span {
    display: block;
    color: #1f2d44;
    font-size: .86rem;
    font-weight: 560;
    letter-spacing: -.01em;
}
.share-total-note small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.35;
}
@media (max-width: 760px) {
    .share-schedule-table .share-sum,
    .share-schedule-table .share-sum-head {
        min-width: 78px;
        width: 78px;
    }
    .share-total-note { min-width: 300px; }
}


/* =========================================================
   v25 — Manuāli iekrāsota grafika rūtiņa
   ========================================================= */
.chip--manual-highlight {
    border-color: rgba(150, 96, 45, .42);
    background: linear-gradient(135deg, #b98958, #7a4a25);
}
.field--highlight-toggle {
    margin-top: 4px;
}
.field--soft-check {
    align-items: flex-start !important;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(150, 96, 45, .20);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffbf7, #f8f0e7);
}
.field--soft-check input {
    margin-top: 3px;
    accent-color: #8a562c;
}
.field--soft-check span {
    display: grid;
    gap: 3px;
    color: #4b3a2c;
}
.field--soft-check strong {
    font-size: .9rem;
    font-weight: 540;
    letter-spacing: -.01em;
}
.field--soft-check small {
    color: #7a6756;
    font-size: .78rem;
    line-height: 1.35;
}
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) {
    background:
        linear-gradient(135deg, rgba(180, 126, 72, .24), rgba(126, 78, 37, .16)),
        #fbf3ea !important;
    color: #4b3320;
    box-shadow:
        inset 0 0 0 1px rgba(126, 78, 37, .22),
        inset 0 3px 0 rgba(126, 78, 37, .34) !important;
}
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell)::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #8a562c;
    box-shadow: 0 0 0 3px rgba(138, 86, 44, .10);
    pointer-events: none;
}
.schedule-table .sch-cell.is-manual-highlight.has-warn::after {
    content: "" !important;
}
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) .cell-main,
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) .cell-meta,
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) .cell-caption {
    color: #4b3320 !important;
}
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) .cell-badge {
    border-color: rgba(126, 78, 37, .24);
    background: rgba(255, 255, 255, .58);
    color: #6f4421;
}
.schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell):hover {
    box-shadow:
        inset 0 0 0 2px rgba(126, 78, 37, .30),
        inset 0 3px 0 rgba(126, 78, 37, .38) !important;
}
.share-schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell),
body[data-page="archive"] .schedule-table .sch-cell.is-manual-highlight:not(.sch-prev-cell) {
    background:
        linear-gradient(135deg, rgba(180, 126, 72, .24), rgba(126, 78, 37, .16)),
        #fbf3ea !important;
}


/* ---------- v27: manuāli koriģējams atvaļinājuma laiks ---------- */
.vacation-editor {
    display: none;
    padding: 14px;
    border: 1px solid rgba(124, 90, 240, .18);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(246, 243, 255, .92), rgba(255, 255, 255, .96));
}
.vacation-editor > .field__label {
    margin-bottom: 10px;
    color: #5844b5;
}
#cellModal .modal__dialog.is-vacation-mode {
    max-width: 640px;
}
#cellModal .modal__dialog.is-vacation-mode .vacation-editor {
    display: block;
}
.vacation-editor__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.vacation-editor .hint {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(124, 90, 240, .14);
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    color: #667085;
}
@media (max-width: 720px) {
    .vacation-editor__grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- v31 layout refinements ---------- */
body[data-page="generator"] .wizard + .result-area {
    margin-top: 32px;
}
body[data-page="generator"] .wizard__panel[data-panel="7"] .wizard__nav {
    margin-top: 22px;
    margin-bottom: 30px;
}
body[data-page="generator"] .schedule-result-card {
    overflow: hidden;
}
body[data-page="generator"] .schedule-result-card .legend {
    margin-bottom: 14px;
}
body[data-page="generator"] .schedule-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 12px 15px;
    border-radius: 16px;
    border: 1px solid rgba(203,213,225,.74);
    background: linear-gradient(180deg, #f9fbff, #f4f8ff);
    color: #5b6a83;
    line-height: 1.45;
}
body[data-page="generator"] .schedule-note .hint-label {
    color: #31466b;
    font-weight: 520;
}
body[data-page="generator"] .schedule-scroll {
    margin-top: 0;
}

body[data-page="employees"] .table-wrap--premium {
    overflow-x: auto;
    overflow-y: hidden;
}
body[data-page="employees"] .people-table {
    min-width: 1180px;
    table-layout: fixed;
}
body[data-page="employees"] .people-col--person { width: 29%; }
body[data-page="employees"] .people-col--availability { width: 16%; }
body[data-page="employees"] .people-col--policy { width: 32%; }
body[data-page="employees"] .people-col--status { width: 11%; }
body[data-page="employees"] .people-col--actions { width: 12%; min-width: 190px; }
body[data-page="employees"] .people-table th,
body[data-page="employees"] .people-table td {
    vertical-align: middle;
}
body[data-page="employees"] .people-table .actions-head {
    text-align: right;
    padding-right: 18px;
}
body[data-page="employees"] .people-table .actions-cell--compact {
    display: table-cell;
    text-align: right;
    min-width: 190px;
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
}
body[data-page="employees"] .employee-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 156px;
}
body[data-page="employees"] .employee-actions .btn {
    min-height: 34px;
    padding-inline: 13px;
    white-space: nowrap;
}
body[data-page="employees"] .employee-actions .btn--danger {
    min-width: 58px;
}
body[data-page="employees"] .people-table .status-dot {
    white-space: nowrap;
}
body[data-page="employees"] .people-table .policy-list {
    max-width: 100%;
}
@media (max-width: 920px) {
    body[data-page="generator"] .schedule-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    body[data-page="employees"] .people-table {
        min-width: 1080px;
    }
}

/* ---------- v32: lietotāju tiesības un slodzes ---------- */
.topbar__user { gap: 9px; }
.topbar__user > span:last-child { display: grid; line-height: 1.1; }
.topbar__user-name { font-size: .86rem; color: var(--text); }
.topbar__user small { margin-top: 2px; color: var(--muted); font-size: .68rem; letter-spacing: .02em; }

.people-table .people-col--workload { width: 150px; }
.workload-pill,
.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.26);
    background: #f8fafc;
    color: #475569;
    font-size: .78rem;
    font-weight: 560;
    white-space: nowrap;
}
.workload-pill--full { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.workload-pill--part { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.workload-pill--half { background: #fff7ed; border-color: #fed7aa; color: #b45309; }
.role-pill--admin { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.role-pill--planner { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.role-pill--manager { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.role-pill--viewer { background: #f8fafc; border-color: #dbe3ee; color: #475569; }
.role-pill--employee { background: #fff7ed; border-color: #fed7aa; color: #b45309; }
.users-table th,
.users-table td { white-space: nowrap; }
.users-table td:first-child { min-width: 230px; }
@media (max-width: 980px) {
    .users-table,
    .people-table { min-width: 980px; }
}

/* v33 — workflow, role dashboards and activity feed */
.workflow-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #d6e0ef;
    background: #f8fafc;
    color: #516179;
    font-size: .78rem;
    font-weight: 520;
    white-space: nowrap;
}
.workflow-status-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
}
.workflow-status-chip.is-draft { background: #f8fafc; color: #64748b; border-color: #dbe3ee; }
.workflow-status-chip.is-review { background: #eff6ff; color: #315fd6; border-color: #c9dcff; }
.workflow-status-chip.is-changes { background: #fff7ed; color: #b25f08; border-color: #fed7aa; }
.workflow-status-chip.is-approved { background: #ecfdf5; color: #087a55; border-color: #b8ead5; }
.workflow-status-chip.is-published { background: #eefcf3; color: #04764e; border-color: #a8e5c5; }
.workflow-status-chip.is-archived { background: #f5f3ff; color: #6951c9; border-color: #dcd6ff; }
.btn--success { background: linear-gradient(135deg, #14a66a, #0f8d59); color: #fff; border-color: transparent; box-shadow: 0 10px 22px rgba(20,166,106,.20); }
.btn--success:hover { text-decoration: none; filter: brightness(.98); }
.dashboard-list { display: grid; gap: 10px; }
.dashboard-list__item {
    display: grid;
    grid-template-columns: 42px minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(204,214,229,.78);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f9fbff);
    color: var(--text);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-list__item:hover { text-decoration: none; transform: translateY(-1px); border-color: rgba(58,109,240,.34); box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.dashboard-list__icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: #eef4ff; color: #315cf6; }
.dashboard-list__icon .ui-icon { width: 18px; height: 18px; }
.dashboard-list__main { display: grid; gap: 2px; min-width: 0; }
.dashboard-list__main strong { font-weight: 620; color: #162033; }
.dashboard-list__main small, .dashboard-list__meta { color: #66748a; font-size: .82rem; }
.dashboard-list__meta { white-space: nowrap; }
.activity-feed { display: grid; gap: 10px; }
.activity-feed__item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(220,226,236,.76); }
.activity-feed__item:last-child { border-bottom: 0; }
.activity-feed__icon { width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: #eefcf3; color: #0f8d59; flex: 0 0 auto; }
.activity-feed__icon .ui-icon { width: 16px; height: 16px; }
.activity-feed__item strong { display: block; font-weight: 580; color: #172033; }
.activity-feed__item small { display: block; margin-top: 2px; color: #75839a; font-size: .82rem; }
.empty-state--compact { padding: 18px; border-radius: 16px; border: 1px dashed #ccd6e6; background: #fbfdff; color: #64748b; }
@media (max-width: 860px) {
    .dashboard-list__item { grid-template-columns: 38px 1fr; }
    .dashboard-list__item .workflow-status-chip, .dashboard-list__meta { grid-column: 2; justify-self: start; }
}

/* v34 — configurable shift groups */
.shifts-table th:nth-child(2),
.shifts-table td:nth-child(2) { min-width: 150px; }
.shifts-table .shift-group-select { min-width: 150px; }
.people-col--group { width: 150px; }
.soft-chip--group {
    background: #f4f7fb;
    color: #445065;
    border-color: rgba(148,163,184,.26);
}
.soft-chip--group span {
    color: #64748b;
    background: rgba(148,163,184,.14);
}
@media (max-width: 980px) {
    .people-table { min-width: 980px; }
    .shifts-table { min-width: 1180px; }
}

/* v36 — generator availability table: complete, stable information layout */
body[data-page="generator"] .table-wrap--availability {
    overflow-x: auto;
}
body[data-page="generator"] .availability-table {
    min-width: 1440px;
    table-layout: auto;
}
body[data-page="generator"] .availability-col--employee { width: 280px; }
body[data-page="generator"] .availability-col--workload { width: 170px; }
body[data-page="generator"] .availability-col--department { width: 180px; }
body[data-page="generator"] .availability-col--profile { width: 220px; }
body[data-page="generator"] .availability-col--group { width: 180px; }
body[data-page="generator"] .availability-col--target { width: 120px; }
body[data-page="generator"] .availability-col--time { width: 150px; }
body[data-page="generator"] .availability-col--flag { width: 150px; }
body[data-page="generator"] .availability-table th,
body[data-page="generator"] .availability-table td {
    white-space: nowrap;
    vertical-align: middle;
}
body[data-page="generator"] .availability-table td:first-child {
    white-space: normal;
    color: #0f1b2d;
    font-weight: 500;
}
body[data-page="generator"] .availability-target,
body[data-page="generator"] .availability-time {
    font-variant-numeric: tabular-nums;
    color: #1e3a5f;
    font-weight: 560;
}
body[data-page="generator"] .availability-table .soft-chip--group {
    max-width: none;
    white-space: normal;
    line-height: 1.25;
    justify-content: center;
}
body[data-page="generator"] .form-grid--generator {
    align-items: end;
}
body[data-page="generator"] .generator-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 16px;
    margin-top: 18px;
}
body[data-page="generator"] .panel-note--support,
body[data-page="generator"] .generator-readiness {
    min-height: 100%;
    padding: 18px 20px;
    border: 1px solid rgba(188, 200, 218, .7);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250,252,255,.96), rgba(244,248,253,.96));
}
body[data-page="generator"] .panel-note--support strong {
    display: block;
    margin-bottom: 8px;
    color: #0f1b2d;
    font-size: .98rem;
    font-weight: 600;
}
body[data-page="generator"] .panel-note--support p {
    margin: 0;
    color: #5b6a82;
}
body[data-page="generator"] .generator-readiness__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
body[data-page="generator"] .generator-readiness__head strong {
    color: #0f1b2d;
    font-size: .98rem;
    font-weight: 600;
}
body[data-page="generator"] .generator-readiness__list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #4e5f78;
}
body[data-page="generator"] .generator-readiness__list li::marker { color: #93a4bb; }
body[data-page="generator"] .generator-readiness__list .is-ok { color: #167c54; }
body[data-page="generator"] .generator-readiness__list .is-warn { color: #a15c07; }
body[data-page="generator"] .generator-readiness__list .is-info { color: #5b6a82; }
body[data-page="generator"] .btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: .88rem;
}
@media (max-width: 1200px) {
    body[data-page="generator"] .generator-support-grid { grid-template-columns: 1fr; }
}

/* v37-v41: commercial structure, reports and print polish */
.people-col--department { width: 150px; }
.people-col--profile { width: 180px; }
.structure-table input,
.structure-table select,
.shifts-table input,
.shifts-table select {
    width: 100%;
    min-width: 92px;
}
.structure-table th,
.structure-table td {
    white-space: nowrap;
}
.inline-fields {
    display: grid;
    grid-template-columns: minmax(58px, 1fr) minmax(58px, 1fr);
    gap: .45rem;
    align-items: center;
}
.report-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line, #dbe4f3);
}
.report-head h3 {
    margin: 0 0 .3rem;
    font-size: 1.25rem;
}
.report-head p,
.report-footer {
    margin: 0;
    color: var(--muted, #62708a);
}
.report-head__meta {
    text-align: right;
    color: var(--muted, #62708a);
    font-size: .85rem;
}
.report-head__meta strong {
    display: block;
    color: var(--ink, #0f1b2d);
    font-size: .98rem;
    margin-top: .25rem;
}
.reports-table small {
    display: block;
    margin-top: .15rem;
}
.report-footer {
    margin-top: 1rem;
    font-size: .9rem;
}

@media print {
    body {
        background: #fff !important;
        color: #111827 !important;
    }
    .sidebar,
    .topbar,
    .no-print,
    .pro-hero__actions,
    .settings-nav,
    .btn,
    .sidebar__overlay {
        display: none !important;
    }
    .app-shell,
    .app-main,
    .content {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .pro-hero,
    .pro-card,
    .metric-card,
    .card {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        background: #fff !important;
        break-inside: avoid;
    }
    .overview-metrics {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: .6rem !important;
    }
    .table-wrap {
        overflow: visible !important;
    }
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10px !important;
    }
    th, td {
        border: 1px solid #d1d5db !important;
        padding: 5px !important;
    }
}


/* v42 — availability overview polish: stable columns and clean labels */
body[data-page="generator"] .table-wrap--availability {
    overflow-x: auto;
    padding-bottom: 2px;
}
body[data-page="generator"] .availability-table {
    min-width: 1520px;
    table-layout: fixed;
}
body[data-page="generator"] .availability-col--employee { width: 260px; }
body[data-page="generator"] .availability-col--workload { width: 150px; }
body[data-page="generator"] .availability-col--department { width: 180px; }
body[data-page="generator"] .availability-col--profile { width: 220px; }
body[data-page="generator"] .availability-col--group { width: 180px; }
body[data-page="generator"] .availability-col--target { width: 110px; }
body[data-page="generator"] .availability-col--time { width: 150px; }
body[data-page="generator"] .availability-col--flag { width: 135px; }
body[data-page="generator"] .availability-table th,
body[data-page="generator"] .availability-table td {
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
body[data-page="generator"] .availability-table th {
    white-space: nowrap;
    letter-spacing: .035em;
}
body[data-page="generator"] .availability-table td:first-child {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
body[data-page="generator"] .availability-table .soft-chip--group {
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body[data-page="generator"] .availability-table .soft-chip--group span {
    display: none;
}
