/*
 * TikModul ERP — the visual language carried over from the legacy app
 * (planning/netlify_files/style.v518_3_31.css).
 *
 * The tokens, the navy sidebar, the red accent, the 18px cards and the
 * uppercase table headers are all the source's. Ported deliberately: people
 * have used this system daily for years, and a rewrite that looks like a
 * different product is one they have to learn again for nothing.
 */

:root {
    --navy: #162535;
    --navy-2: #1d3045;
    --accent: #d8172e;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #162535;
    --muted: #6b7b8c;
    --line: #d9e1e8;
    --green: #16a34a;
    --yellow: #d1a208;
    --red: #d8172e;

    --sidebar-width: 268px;
    --focus-ring: 0 0 0 3px rgba(216, 23, 46, 0.18);

    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 8px 24px rgba(15, 34, 58, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(216, 23, 46, 0.05), transparent 20%),
        radial-gradient(circle at bottom left, rgba(22, 37, 53, 0.06), transparent 25%),
        var(--bg);
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------- shell -- */

.layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100dvh;
    padding: 18px 14px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    background: linear-gradient(180deg, var(--navy), var(--navy-2));
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.brand {
    display: block;
    padding: 2px 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand img {
    display: block;
    width: 68px;
    max-width: 68px;
    height: auto;
    filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.16));
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin-top: 17px;
    flex: 1;
}

.menu-group {
    display: grid;
    align-content: start;
    gap: 5px;
}

.menu-group-label {
    padding: 0 12px 5px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition: 0.16s ease;
}

/* The marker on the active item, as the source drew it. */
.menu-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #fff;
    opacity: 0;
    transform: scaleY(0.4);
    transition: 0.16s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.menu-item.is-active {
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #fff;
}

.menu-item.is-active::after {
    opacity: 1;
    transform: scaleY(1);
}

.menu-item.is-pending {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-label {
    min-width: 0;
}

.menu-icon {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    opacity: 0.82;
}

.menu-item.is-active .menu-icon {
    opacity: 1;
}

.menu-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-count-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.menu-count-badge.is-danger {
    background: #e31837;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.16);
}

.sidebar-footer {
    margin-top: auto;
    padding: 13px 11px 4px;
    font-size: 10px;
    display: grid;
    gap: 10px;
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.sidebar-status .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}

.sidebar-account {
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.055);
}

.sidebar-account span {
    color: rgba(255, 255, 255, 0.55);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-account strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 11px;
}

.sidebar-logout {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
}

.content {
    flex: 1;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    padding: 24px 28px 38px;
}

/* --------------------------------------------------------------- topbar -- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.topbar-title img {
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    color: var(--navy);
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.user-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    display: grid;
    gap: 2px;
    text-align: right;
    min-width: 150px;
}

.user-box span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-box strong {
    font-size: 14px;
}

/* -------------------------------------------------------------- submenu -- */

.tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 20px;
    flex-wrap: wrap;
}

.tab {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.tab:hover {
    border-color: #b9c6d2;
    text-decoration: none;
}

.tab.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* --------------------------------------------------------- cards, panels -- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
}

.card span,
.card .card-label {
    color: var(--muted);
    font-size: 13px;
}

.card strong,
.card .card-value {
    display: block;
    font-size: 28px;
    margin-top: 8px;
    line-height: 1.15;
}

.card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 19px;
    color: var(--navy);
}

.panel > h2:first-child,
.panel > h3:first-child {
    margin-top: 0;
}

.content h2 {
    color: var(--navy);
    font-size: 20px;
}

.split-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    align-items: start;
}

/* --------------------------------------------------------------- tables -- */

.table-scroll,
.table-wrap {
    overflow-x: auto;
}

/*
 * A listing is a widget in its own right. Styling the table as the card means
 * every screen gets the same panel look without each template having to
 * remember to wrap itself in one.
 */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.panel .table,
.timesheet-scroll .table,
.table-scroll .table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.table th,
.table td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: top;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.table tfoot th {
    background: #f8fafc;
    color: var(--text);
    font-size: 13px;
    text-transform: none;
}

.is-numeric {
    text-align: right;
    white-space: nowrap;
}

.is-actions {
    text-align: right;
    white-space: nowrap;
}

.is-muted {
    color: var(--muted);
    font-size: 13px;
}

.is-cancelled {
    opacity: 0.55;
}

.is-cancelled td:first-child {
    text-decoration: line-through;
}

.is-warning {
    background: #fffbeb;
}

.is-negative {
    color: var(--red);
}

.is-positive {
    color: var(--green);
}

/* -------------------------------------------------------------- badges --- */

.badge,
.status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.badge--ok,
.status.green {
    background: #dcfce7;
    color: #166534;
}

.badge--warn,
.status.yellow {
    background: #fef3c7;
    color: #92400e;
}

.badge--danger,
.status.red {
    background: #fee2e2;
    color: #991b1b;
}

.status.blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.progress {
    height: 9px;
    width: 130px;
    background: #e7edf3;
    border-radius: 999px;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ef4257);
}

/* ------------------------------------------------------------- controls -- */

.button,
button[type="submit"],
.row-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    filter: brightness(1.06);
    text-decoration: none;
}

.button--small {
    padding: 7px 10px;
    font-size: 12px;
}

.button--ghost,
.button--secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.button--ghost:hover,
.button--secondary:hover {
    background: #f8fafc;
}

.button--danger {
    background: #fff7f7;
    color: var(--red);
    border: 1px solid #fecaca;
}

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.toolbar h2 {
    margin: 0;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.chip:hover {
    border-color: #b9c6d2;
    text-decoration: none;
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.chip b {
    font-weight: 800;
    opacity: 0.75;
}

/* ---------------------------------------------------------------- forms -- */

.form label,
.filters label,
.form-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="month"],
input[type="number"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(216, 23, 46, 0.12);
}

textarea {
    min-height: 84px;
    resize: vertical;
}

.input--narrow {
    max-width: 7rem;
}

.checkbox,
.form input[type="checkbox"] + label,
label > input[type="checkbox"] {
    width: auto;
}

.form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.form--narrow {
    max-width: 620px;
}

.form--inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.is-wide {
    grid-column: 1 / -1;
}

/* --------------------------------------------------------------- notes --- */

.note,
.hint {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.note--warning {
    color: #a35b00;
    background: #fff4e5;
    border-color: #fde3c0;
}

.flash {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

.flash--success {
    background: #dcfce7;
    color: #166534;
}

.flash--error {
    background: #fee2e2;
    color: #991b1b;
}

.empty {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    color: var(--muted);
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    font-size: 13px;
}

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

.pagination .is-disabled {
    color: #b6c2ce;
}

/* --------------------------------------------------------------- detail -- */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 20px;
    margin: 0 0 18px;
}

.detail-grid dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-grid dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.summary {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.summary > div {
    display: grid;
    justify-items: end;
    min-width: 9rem;
}

.summary span {
    color: var(--muted);
    font-size: 12px;
}

.summary strong {
    font-size: 18px;
}

.summary-final strong {
    color: var(--accent);
    font-size: 22px;
}

/* ------------------------------------------------------- module specifics - */

.task-list {
    display: grid;
    gap: 14px;
}

.task-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
}

.task-card header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.task-card-body {
    margin: 0 0 14px;
    white-space: pre-line;
}

.task-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.task-card--danger {
    border-left-color: var(--red);
}

.task-card--warning {
    border-left-color: var(--yellow);
}

.task-card--ok {
    border-left-color: var(--green);
}

.timesheet th,
.timesheet td {
    padding: 8px 6px;
    font-size: 13px;
    text-align: center;
}

.timesheet th:first-child,
.timesheet td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    min-width: 190px;
}

.timesheet thead th {
    background: #f8fafc;
}

.timesheet .is-weekend {
    background: #f8fafc;
}

.week-grid td,
.week-grid th {
    vertical-align: top;
}

.week-cell {
    min-width: 13rem;
}

.week-cell select,
.week-cell input {
    margin-bottom: 5px;
}

.week-cell-load {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
}

.week-chip {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px 7px;
    margin-bottom: 5px;
}

/* --------------------------------------------------------------- login --- */

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 34, 58, 0.12);
    padding: 32px;
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
}

.login-card img {
    max-width: 210px;
    margin: 0 auto 8px;
}

/* -------------------------------------------------------------- mobile --- */

/* ------------------------------------------------------------- mobile -- */

/*
 * On a phone the sidebar becomes a drawer and four shortcuts move to a fixed
 * bar at the bottom, which is where a thumb is. The markup is the same markup
 * — the drawer holds the very menu the desktop shows — so every link works
 * with the stylesheet alone; the controller only adds the sliding.
 *
 * Ported from the source's `.mobile-bottom-nav` / `.mobile-nav-backdrop`.
 */

.menu-toggle,
.menu-close,
.menu-backdrop,
.tabbar {
    display: none;
}

@media (max-width: 980px) {
    /* Thumb reach: the bar is fixed, so the page has to end above it. */
    :root {
        --tabbar-height: 64px;
    }

    .sidebar {
        position: fixed;
        z-index: 60;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        min-width: 0;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 0 0 40px rgba(15, 34, 58, 0.35);
    }

    body.is-menu-open .sidebar {
        transform: translateX(0);
    }

    .menu-backdrop {
        display: block;
        position: fixed;
        z-index: 55;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(15, 34, 58, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    body.is-menu-open .menu-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .menu-close {
        display: block;
        position: absolute;
        top: 10px;
        right: 12px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: none;
        border: 1px solid var(--hairline);
        border-radius: 12px;
        background: #fff;
        color: var(--navy);
        cursor: pointer;
    }

    .menu-toggle .menu-icon svg {
        width: 22px;
        height: 22px;
    }

    .layout {
        display: block;
    }

    .content {
        width: 100%;
        min-width: 0;
        padding: 14px 14px calc(var(--tabbar-height) + 20px + env(safe-area-inset-bottom));
    }

    .topbar {
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
    }

    .topbar-title h1 {
        font-size: 19px;
    }

    /* The subtitle is the first thing to go: the heading already says it. */
    .topbar-title p,
    .user-box {
        display: none;
    }

    .topbar-search {
        order: 3;
        flex: 1 1 100%;
    }

    .tabbar {
        display: flex;
        position: fixed;
        z-index: 50;
        right: 0;
        bottom: 0;
        left: 0;
        height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff;
        border-top: 1px solid var(--hairline);
        box-shadow: 0 -6px 18px rgba(15, 34, 58, 0.06);
    }

    .tabbar-item {
        position: relative;
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        background: none;
        color: var(--muted);
        text-decoration: none;
        cursor: pointer;
        /* A tap target under ~44px is one people miss. */
        min-width: 44px;
    }

    .tabbar-item .menu-icon svg {
        width: 22px;
        height: 22px;
    }

    .tabbar-item small {
        max-width: 100%;
        overflow: hidden;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tabbar-item.is-active {
        color: var(--red);
        background: #fff1f3;
    }

    .tabbar-item.is-active::before {
        content: "";
        position: absolute;
        top: 0;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: var(--red);
    }

    .tabbar-count {
        position: absolute;
        top: 6px;
        left: 50%;
        margin-left: 4px;
        min-width: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--navy);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }

    .tabbar-count.is-danger {
        background: var(--red);
    }
}

/* A table is the one thing that cannot be made narrow; let it scroll. */
@media (max-width: 700px) {
    .table-scroll,
    .table-wrap {
        overflow-x: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-wrap: wrap;
    }
}

/* --------------------------------------------------- remaining specifics -- */

code {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 1px 5px;
    font-size: 0.9em;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-header h2 {
    margin: 0;
}

.detail-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form,
.month-nav {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.stat {
    color: var(--muted);
    font-size: 13px;
}

.legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.line-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.notes {
    display: grid;
    gap: 12px;
}

/* An archive or delete block, kept visually apart from ordinary actions. */
.danger-zone {
    border: 1px solid #fecaca;
    background: #fff7f7;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-top: 20px;
}

.danger-zone h3 {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--red);
}

/* ------------------------------------------------------------ timesheet -- */

.timesheet-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.timesheet-name {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    min-width: 200px;
}

.timesheet thead .timesheet-name {
    background: #f8fafc;
}

.timesheet-day {
    min-width: 34px;
    padding: 8px 4px;
    text-align: center;
    font-size: 11px;
}

.timesheet-cell {
    text-align: center;
    padding: 6px 4px;
    font-size: 13px;
}

.timesheet-cell a {
    display: block;
    border-radius: 6px;
    padding: 3px 2px;
    color: var(--text);
    font-weight: 600;
}

.timesheet-cell a:hover {
    background: #eef2f7;
    text-decoration: none;
}

.timesheet-cell.is-outside {
    background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 4px, #eef2f7 4px, #eef2f7 8px);
}

.timesheet .is-weekend {
    background: #f8fafc;
}

.is-final {
    font-weight: 800;
}

/* ---------------------------------------------------------------- login -- */

.login {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-logo {
    display: block;
    max-width: 210px;
    margin: 0 auto 6px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.remember input {
    width: auto;
}

/* ----------------------------------------------- pagrindinis (dashboard) -- */

.dd-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    border-radius: 20px;
    padding: 26px 28px;
    margin-bottom: 20px;
    box-shadow: 0 14px 34px rgba(15, 34, 58, 0.18);
}

.dd-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
}

.dd-hero h2 {
    margin: 8px 0 0;
    font-size: 28px;
    color: #fff;
}

.dd-hero p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.dd-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.dd-quick-actions .button--ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.dd-quick-actions .button--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

.dd-hero-health {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 16px 20px;
}

.dd-hero-health span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dd-hero-health > div > strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

.dd-hero-health small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.dd-health-ring {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    text-align: center;
}

.dd-health-ring strong {
    font-size: 26px;
    line-height: 1;
}

.dd-health-ring span {
    font-size: 8px;
    line-height: 1.25;
}

.dd-hero-health.is-ok .dd-health-ring { border-color: #4ade80; }
.dd-hero-health.is-warning .dd-health-ring { border-color: #fbbf24; }
.dd-hero-health.is-danger .dd-health-ring { border-color: #fb7185; }

.dd-alert-list {
    display: grid;
    gap: 10px;
}

.dd-alert {
    display: block;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
}

.dd-alert:hover {
    background: #fbfdff;
    text-decoration: none;
}

.dd-alert span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.dd-alert.is-danger { border-left-color: var(--red); }
.dd-alert.is-warning { border-left-color: var(--yellow); }

.dd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dd-kpi {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 3px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
}

.dd-kpi span {
    color: var(--muted);
    font-size: 13px;
}

.dd-kpi strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    line-height: 1.1;
}

.dd-kpi small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.dd-kpi-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: #f1f5f9;
    font-size: 18px;
    color: var(--navy);
}

.dd-kpi.is-navy { border-top-color: var(--navy); }
.dd-kpi.is-blue { border-top-color: #1d4ed8; }
.dd-kpi.is-green { border-top-color: var(--green); }
.dd-kpi.is-warning { border-top-color: var(--yellow); }
.dd-kpi.is-danger { border-top-color: var(--red); }

.dd-kpi.is-danger .dd-kpi-icon { background: #fee2e2; color: #991b1b; }
.dd-kpi.is-warning .dd-kpi-icon { background: #fef3c7; color: #92400e; }
.dd-kpi.is-green .dd-kpi-icon { background: #dcfce7; color: #166534; }

.dd-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
}

.dd-project {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: #fff;
    display: grid;
    gap: 12px;
    align-content: start;
}

.dd-project header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.dd-project-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dd-project-progress .progress {
    flex: 1;
    width: auto;
}

.dd-project-progress b {
    font-size: 13px;
    min-width: 38px;
    text-align: right;
}

.dd-project-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
}

.dd-project-facts dt {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dd-project-facts dd {
    margin: 2px 0 0;
    font-weight: 600;
    font-size: 14px;
}

.dd-project footer {
    display: flex;
    justify-content: flex-end;
}

.progress-with-label {
    position: relative;
    min-width: 120px;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-with-label .progress {
    flex: 1;
    width: auto;
}

.progress-with-label b {
    font-size: 12px;
    font-weight: 800;
    min-width: 34px;
    text-align: right;
}

/* --------------------------------------------------------------- modals -- */

.modal {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(760px, 94vw);
    width: 100%;
}

.modal::backdrop {
    background: rgba(15, 34, 58, 0.45);
    backdrop-filter: blur(2px);
}

.modal-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 34, 58, 0.28);
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    margin: 0;
    font-size: 19px;
    color: var(--navy);
}

.modal-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: var(--text);
}

.modal-form {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 20px 22px 22px;
}

.offer-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.offer-template-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: linear-gradient(135deg, #ffffff, #f6f8fb);
    display: grid;
    gap: 12px;
    align-content: start;
}

.offer-template-card h3 {
    margin: 0;
    font-size: 15px;
    color: var(--navy);
}

/* A catalogue picture, in the box the source drew for it. */
.addon-media {
    width: 82px;
    height: 68px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 10px;
    text-align: center;
    overflow: hidden;
}

.addon-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: #fff;
}

.print-table .pic {
    width: 70px;
    height: 55px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
}

/* ------------------------------------------------ darbo valandos (hours) -- */

/* The section's navigator, ported from `.hours-month-navigator`: one control
   strip above the page carrying the period and the two views. */
.hours-month-navigator {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(15, 34, 58, .035);
}

.hours-month-navigator label {
    display: grid;
    gap: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hours-month-navigator input {
    width: 170px;
    height: 36px;
    padding: 5px 9px;
    border: 1px solid #d6dfe8;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font: 600 12px inherit;
}

.hours-month-arrow {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d6dfe8;
    border-radius: 9px;
    background: #fff;
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
}

.hours-month-arrow:hover {
    border-color: var(--navy);
}

.hours-view-toggle {
    display: flex;
    gap: 5px;
    margin-left: auto;
    padding: 3px;
    border-radius: 11px;
    background: #edf2f6;
}

.hours-view-toggle a {
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.hours-view-toggle a.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 3px 10px rgba(15, 34, 58, .08);
}

/* The strip of statuses under a panel header: how the day stands, at a glance,
   before reading a single row. */
.mini-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0 14px;
}

.mini-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* One booked job inside a day-control cell. */
.work-pill {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.3fr) 64px auto;
    gap: 8px;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
}

.work-pill:last-child {
    border-bottom: 0;
}

.work-pill span {
    color: var(--muted);
    font-size: 12px;
}

.work-pill b {
    font-size: 13px;
}

.work-pill.absence-pill {
    padding: 7px 9px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fff7ed;
}

.work-pill.absence-pill strong {
    color: #9a3412;
}

@media (max-width: 900px) {
    .hours-view-toggle {
        order: 2;
        width: 100%;
        margin-left: 0;
    }

    .hours-view-toggle a {
        flex: 1;
        text-align: center;
    }

    .hours-month-navigator label {
        flex: 1;
        min-width: 130px;
    }

    .hours-month-navigator input {
        width: 100%;
    }
}

/* ------------------------------------------------------- užduočių centras -- */

/* Ported from `.task-center-*`. The section is a board, not a table: each task
   is a card whose left edge carries how its deadline reads today. */
.task-center-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 26px 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #142a44 0%, #203e5e 68%, #274a69 100%);
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 34, 58, .17);
    overflow: hidden;
}

.task-center-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -135px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.task-center-hero > div {
    position: relative;
    z-index: 1;
}

.task-center-hero > div:first-child {
    max-width: 850px;
}

.task-center-hero span {
    display: block;
    margin-bottom: 7px;
    color: #ffb7c2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.task-center-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.05;
    font-weight: 800;
}

.task-center-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1.65;
}

.task-center-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    min-width: max-content;
}

.task-center-hero-actions a {
    border-radius: 12px;
    padding: 11px 15px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.task-center-hero-actions a.secondary {
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

.task-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 18px;
}

.task-stat-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #e0e7ee;
    border-radius: 17px;
    background: #fff;
    color: #65778b;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 34, 58, .055);
    transition: .16s ease;
}

.task-stat-card:hover {
    transform: translateY(-2px);
    border-color: #bfcbd7;
    box-shadow: 0 13px 30px rgba(15, 34, 58, .09);
}

.task-stat-card.active {
    border-color: #213d5b;
    box-shadow: 0 0 0 2px rgba(33, 61, 91, .11), 0 13px 30px rgba(15, 34, 58, .09);
}

.task-stat-card span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.task-stat-card strong {
    color: #18314c;
    font-size: 26px;
    font-weight: 800;
}

.task-stat-card small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
}

.task-stat-card.is-danger strong { color: #d8172e; }
.task-stat-card.is-warning strong { color: #a56c00; }
.task-stat-card.is-green strong { color: #15854c; }
.task-stat-card.is-blue strong { color: #176aa6; }

.task-center-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(170px, .75fr) minmax(150px, .65fr) auto auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #dfe7ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 34, 58, .045);
}

.task-center-toolbar label {
    display: grid;
    gap: 5px;
    color: #6a7b8e;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.task-center-toolbar input,
.task-center-toolbar select {
    height: 43px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid #d5dfe8;
    border-radius: 11px;
    background: #f9fbfc;
    color: #1e344d;
    font-size: 12px;
}

.task-center-search {
    grid-column: 1 / -1;
}

.task-toolbar-button {
    display: inline-flex;
    align-items: center;
    height: 43px;
    padding: 0 13px;
    border: 0;
    border-radius: 11px;
    background: #edf3f7;
    color: #29445f;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.task-toolbar-button.active {
    background: #213d5b;
    color: #fff;
}

.task-toolbar-button.secondary {
    background: #fff0f2;
    color: #c51c34;
}

.task-center-result-count {
    margin-bottom: 12px;
    padding: 0 3px;
    color: #718196;
    font-size: 10px;
    font-weight: 700;
}

.task-center-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.task-center-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #dee6ed;
    border-left: 4px solid #96a8ba;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fbfcfd);
    box-shadow: 0 9px 26px rgba(15, 34, 58, .055);
    transition: .18s ease;
}

.task-center-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 34, 58, .09);
}

.task-center-card.is-danger { border-left-color: var(--accent); }
.task-center-card.is-warning { border-left-color: #d99a19; }
.task-center-card.is-ok { border-left-color: #269360; }

.task-center-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-center-card-project {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.task-center-card-project > span {
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.task-center-card-project strong {
    color: #18314c;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.task-center-card-project small {
    color: #7a899a;
    font-size: 9px;
    overflow-wrap: anywhere;
}

.task-center-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.task-center-card-body {
    min-height: 48px;
    color: #263c54;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.task-center-card-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.task-center-card-meta > div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 11px;
    background: #f2f6f9;
}

.task-center-card-meta span {
    display: block;
    color: #7a8999;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.task-center-card-meta strong {
    display: block;
    margin-top: 2px;
    color: #294159;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-center-card-meta strong.is-unassigned {
    color: #c47e00;
}

.task-center-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.task-center-card footer a,
.task-center-card footer button {
    border: 0;
    border-radius: 10px;
    padding: 8px 11px;
    background: #203c5a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.task-center-card footer a.secondary,
.task-center-card footer button.secondary {
    background: #edf3f7;
    color: #2c465f;
}

.task-center-card footer button.success {
    background: #18834d;
}

.task-priority,
.task-due {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.task-priority.is-danger,
.task-due.is-danger { background: #fff0f2; color: #c91d35; }

.task-priority.is-warning,
.task-due.is-warning { background: #fff5dc; color: #936100; }

.task-priority.is-neutral,
.task-due.is-muted { background: #eef3f7; color: #60748a; }

.task-due.is-ok { background: #eaf8f0; color: #157746; }

.task-center-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 240px;
    padding: 30px;
    border: 1px dashed #cfd9e2;
    border-radius: 18px;
    background: #fafcfd;
    color: #718196;
    text-align: center;
}

.task-center-empty strong { color: #294159; }
.task-center-empty p { margin: 0; font-size: 11px; }

@media (max-width: 1180px) {
    .task-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .task-center-toolbar { grid-template-columns: minmax(230px, 1fr) 1fr 1fr; }
    .task-center-list { grid-template-columns: 1fr; }
    .task-center-card-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .task-center-hero { flex-direction: column; align-items: flex-start; padding: 21px; }
    .task-center-hero-actions { justify-content: flex-start; min-width: 0; width: 100%; }
    .task-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .task-center-toolbar { grid-template-columns: 1fr; padding: 11px; }
    .task-center-search { grid-column: auto; }
    .task-center-card header { flex-direction: column; }
    .task-center-card-badges { justify-content: flex-start; }
}

/* --------------------------------------------- komerciniai nustatymai (2) -- */

/* The section header the source puts above each commercial-settings tab. */
.commercial-settings-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid rgba(216, 23, 46, .12);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(216, 23, 46, .08), rgba(22, 37, 53, .04));
}

.commercial-settings-hero h3 {
    margin: 0 0 8px;
    color: var(--navy);
}

.commercial-settings-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.commercial-settings-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.commercial-settings-flow span {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* A wide grid scrolls inside its own frame; the page never moves sideways. */
.matrix-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    margin-bottom: 20px;
}

.matrix-table {
    min-width: 900px;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.matrix-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fbff;
    color: var(--navy);
    white-space: nowrap;
}

.matrix-table td:first-child {
    min-width: 240px;
}

.matrix-table input[type="number"] {
    min-width: 92px;
    padding: 8px;
    text-align: right;
}

/* Sales people, as the offer's cover page prints them. */
.sales-manager-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.sales-manager-photo-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(22, 37, 53, .05);
}

.sales-manager-photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border: 1px solid #e3e8f2;
    border-radius: 20px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.sales-manager-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sales-manager-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 10px;
}

.sales-manager-form-grid label,
.sales-manager-photo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.sales-manager-form-grid input,
.sales-manager-photo-field input {
    width: 100%;
}

@media (max-width: 760px) {
    .sales-manager-form-grid { grid-template-columns: 1fr; }
    .sales-manager-photo-card { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- projekto kortelė -- */

/* The card's header, ported from `.project-hero`: what the object is, and the
   two things a production manager does to it. */
.project-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    box-shadow: 0 8px 24px rgba(15, 34, 58, .05);
}

.project-hero h2 {
    margin: 8px 0 6px;
    font-size: 24px;
}

.project-hero p {
    margin: 0;
    color: var(--muted);
}

.project-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.link-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.link-btn:hover {
    color: var(--accent);
}

@media (max-width: 980px) {
    .project-hero {
        flex-direction: column;
    }

    .project-hero-actions {
        justify-content: flex-start;
    }
}

/* -------------------------------------------------------------- rūšiavimas -- */

.sort-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.sort-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.sort-toolbar select {
    height: 36px;
    min-width: 200px;
    padding: 0 10px;
    border: 1px solid #d6dfe8;
    border-radius: 9px;
    background: #f9fbfc;
    font-size: 12px;
}

/* --------------------------------------------------------- globali paieška -- */

.topbar-search {
    margin-left: auto;
    margin-right: 14px;
}

.topbar-search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.topbar-search-trigger:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.topbar-search-trigger kbd {
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
}

.global-search-dialog {
    width: min(680px, 92vw);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 34, 58, .22);
}

.global-search-dialog::backdrop {
    background: rgba(15, 34, 58, .38);
}

.global-search-dialog form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.global-search-dialog input[type="search"] {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d6dfe8;
    border-radius: 11px;
    background: #f9fbfc;
    font-size: 13px;
}

.global-search-list {
    max-height: min(590px, 70vh);
    overflow-y: auto;
    padding: 8px;
    overscroll-behavior: contain;
}

.global-search-category {
    padding: 10px 10px 5px;
    color: #8a97a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.global-search-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #223950;
    text-decoration: none;
}

.global-search-result:hover,
.global-search-result:focus-visible {
    border-color: #dbe4ec;
    background: #f4f7fa;
}

.global-search-result strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.global-search-result span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7c8998;
    font-size: 10px;
}

.global-search-badge {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 999px;
    background: #edf2f6;
    color: #607186;
    font-size: 9px;
    font-weight: 700;
}

.global-search-empty {
    display: grid;
    place-items: center;
    padding: 50px 20px;
    color: #8290a0;
    text-align: center;
}

.global-search-empty strong {
    color: #30465e;
    font-size: 13px;
    font-weight: 700;
}

.global-search-empty p {
    max-width: 430px;
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .topbar-search-trigger span { display: none; }
}

/* ------------------------------------------------------------- nuotraukos -- */

.visual-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f9fbfc;
}

.visual-field > div > label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .visual-field { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- pakeitimų centras -- */

.change-centre {
    position: relative;
    margin-right: 12px;
}

.change-button {
    display: grid;
    place-items: center;
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f8fafc;
    cursor: pointer;
}

.change-button:hover {
    border-color: var(--navy);
}

.change-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

/* Something moved since you arrived. */
.change-button.has-changes .change-live-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(216, 23, 46, .14);
}

.change-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.change-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(360px, 88vw);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 34, 58, .18);
    overflow: hidden;
}

.change-centre-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}

.change-centre-head small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.change-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.change-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
}

.change-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 11px;
}

.change-row:hover {
    background: #f4f7fa;
}

.change-dot {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.change-row strong {
    display: block;
    font-size: 12px;
}

.change-row small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.change-empty {
    padding: 28px 18px;
    color: var(--muted);
    text-align: center;
}

.change-empty strong {
    display: block;
    color: #30465e;
    font-size: 13px;
}

.change-empty p {
    margin: 6px 0 0;
    font-size: 11px;
}

.change-actions {
    padding: 10px 14px;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------- pasiūlymo konfigūratorius -- */

.offer-studio {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.offer-studio-side {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 16px;
}

.offer-studio-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.spec-section {
    margin: 18px 0 8px;
    color: var(--navy);
    font-size: 13px;
}

.spec-section:first-of-type {
    margin-top: 4px;
}

.spec-lines {
    display: grid;
    gap: 8px;
}

.spec-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid transparent;
    border-radius: 13px;
    background: #fff;
}

/* A line somebody can decide about reads differently from one that is simply
   part of the house. */
.spec-line.is-choosable {
    border-left-color: #cbd5e1;
    background: #fbfcfd;
}

.spec-line.is-chosen {
    border-left-color: #269360;
    background: #f2fbf6;
}

.spec-line strong {
    font-size: 13px;
}

.spec-choice {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.spec-choice select {
    width: 100%;
    max-width: 460px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d6dfe8;
    border-radius: 9px;
    background: #fff;
    font-size: 12px;
}

.spec-line-side {
    display: grid;
    justify-items: end;
    gap: 6px;
    white-space: nowrap;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.addon-pick {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 74px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.addon-pick.is-chosen {
    border-color: #269360;
    background: #f2fbf6;
}

.addon-pick strong {
    display: block;
    font-size: 12px;
}

.addon-pick small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.addon-pick em {
    display: block;
    margin-top: 3px;
    color: var(--navy);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.addon-pick input[type="number"] {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #d6dfe8;
    border-radius: 9px;
    text-align: right;
}

@media (max-width: 1100px) {
    .offer-studio { grid-template-columns: 1fr; }
    .offer-studio-side { position: static; }
}
