:root {
    --fp-primary: #2e5d3a;
    --fp-primary-dark: #234a2d;
    --fp-bg: #f6f7f5;
    --fp-surface: #ffffff;
    --fp-text: #1f2421;
    --fp-muted: #5f6b63;
    --fp-border: #d5dbd6;
    --fp-danger: #b3261e;
    --fp-danger-bg: #fdecea;
    --fp-success: #1e6b34;
    --fp-success-bg: #e6f4ea;
}

html, body {
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

h1:focus {
    outline: none;
}

/* --- /Account puslapiai (statiniai, be MudBlazor) --- */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--fp-bg);
    color: var(--fp-text);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-brand {
    color: var(--fp-primary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 20px;
}

.auth-card .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.auth-card label {
    font-size: 0.9rem;
    color: var(--fp-muted);
}

.auth-card input[type=text],
.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input:not([type]) {
    font: inherit;
    font-size: 1rem;
    padding: 12px;
    border: 1px solid var(--fp-border);
    border-radius: 6px;
    background: #fff;
}

.auth-card input:focus {
    outline: 2px solid var(--fp-primary);
    outline-offset: -1px;
}

.auth-card .check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--fp-text);
}

.auth-card .check input {
    width: 18px;
    height: 18px;
}

.btn-primary {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    background: var(--fp-primary);
    color: #fff;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--fp-primary-dark);
}

.auth-hint {
    margin: 20px 0 0;
    font-size: 0.875rem;
    color: var(--fp-muted);
}

.auth-card a {
    color: var(--fp-primary);
}

.alert {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert-danger {
    background: var(--fp-danger-bg);
    color: var(--fp-danger);
}

.alert-success {
    background: var(--fp-success-bg);
    color: var(--fp-success);
}

.validation-message {
    color: var(--fp-danger);
    font-size: 0.85rem;
}

.auth-card input.invalid {
    border-color: var(--fp-danger);
}

/* --- Blazor klaidų juosta --- */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: #ffe8a1;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    z-index: 2000;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    padding: 1rem;
    background: var(--fp-danger);
    color: #fff;
}

.blazor-error-boundary::after {
    content: "Įvyko klaida.";
}

/* --- Planų grafikai (SVG) --- */

.chart-wrap {
    width: 100%;
    overflow-x: auto;
}

.chart {
    width: 100%;
    min-width: 720px;
    height: auto;
    display: block;
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

.chart .grid {
    stroke: #d5dbd6;
    stroke-width: 1;
}

.chart .axis-label,
.chart .row-sub {
    font-size: 11px;
    fill: #5f6b63;
}

.chart .row-label {
    font-size: 12px;
    font-weight: 500;
    fill: #1f2421;
}

.chart .row-bg {
    fill: #f1f3f0;
}

.chart .bar {
    fill-opacity: 0.85;
    stroke: #fff;
    stroke-width: 0.5;
}

.chart .bar-label {
    font-size: 11px;
    fill: #fff;
    pointer-events: none;
}

.chart .cleaning {
    fill: #bdbdbd;
    fill-opacity: 0.6;
}

.chart .now {
    stroke: #c62828;
    stroke-width: 2;
    stroke-dasharray: 4 3;
}

.swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.cleaning-swatch {
    background: #bdbdbd;
}

/* --- Pamainų tinklelis --- */

.shift-grid {
    border-collapse: collapse;
    font-size: 0.85rem;
}

.shift-grid th {
    padding: 4px 6px;
    font-weight: 500;
    white-space: nowrap;
}

.shift-grid .shift-no {
    color: #5f6b63;
    font-weight: 400;
    font-size: 0.75rem;
}

.shift-grid .line-name {
    text-align: left;
}

.shift-grid td {
    width: 26px;
    height: 30px;
    text-align: center;
    border: 1px solid #fff;
    cursor: pointer;
    user-select: none;
}

.shift-grid td.on {
    background: #c8e6c9;
}

.shift-grid td.off {
    background: #bdbdbd;
    color: #424242;
    font-weight: 700;
}

.reversed-row td {
    opacity: 0.55;
    text-decoration: line-through;
}

/* --- Pamainos užduotis --- */

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 4px 0 8px;
}

.task-table th,
.task-table td {
    border-bottom: 1px solid #d5dbd6;
    padding: 5px 8px;
    text-align: left;
    vertical-align: top;
}

.task-table th {
    font-weight: 500;
    color: #5f6b63;
}

.task-table .num {
    text-align: right;
    white-space: nowrap;
}

.line-block {
    margin: 8px 0 12px;
}

.shift-task .muted {
    color: #5f6b63;
}

.signature {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 32px;
}

@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-snackbar-provider,
    .no-print,
    #blazor-error-ui,
    #components-reconnect-modal {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .mud-container {
        max-width: none !important;
        padding: 0 !important;
    }

    body {
        background: #fff !important;
    }

    .task-table {
        font-size: 10pt;
    }

    .line-block,
    .task-table tr {
        break-inside: avoid;
    }
}

/* --- Plano koregavimas tempiant --- */

.board {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-lane {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.board-lane-title {
    width: 110px;
    flex-shrink: 0;
    font-weight: 500;
    padding-top: 10px;
}

.board-zone {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 58px;
    padding: 6px;
    border-radius: 6px;
    background: #f1f3f0;
    border: 1px dashed #d5dbd6;
}

.board-card {
    background: #fff;
    border: 1px solid #d5dbd6;
    border-left: 5px solid #9e9e9e;
    border-radius: 4px;
    padding: 5px 8px;
    min-width: 150px;
    cursor: grab;
    font-size: 0.8rem;
    line-height: 1.3;
}

.board-card-title {
    font-weight: 500;
}

.board-card-sub {
    color: #5f6b63;
}

.board-card-problem {
    color: #c62828;
    font-weight: 500;
}

.help-list li {
    margin-bottom: 6px;
}
