/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* Every selector that reaches into MudBlazor markup needs ::deep: scoped CSS only tags this component's own elements,
   so the old rules (.kazi-google-nav .mud-nav-link ...) never matched anything.
   Colours come from the theme palette variables, so light and dark both work with no overrides. */

[b-l88rrxn4ll] .kz-nav-menu { padding: 8px 8px 16px; }

/* ---- active branch, one quiet line (the app bar hides it on narrow screens) */
.kz-branch[b-l88rrxn4ll] {
    display: flex; align-items: center; gap: 8px;
    margin: 4px 8px 12px; padding: 8px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    color: var(--mud-palette-text-secondary);
    font-size: .8125rem;
}
.kz-branch .kz-truncate[b-l88rrxn4ll] { flex: 1; min-width: 0; }
.kz-truncate[b-l88rrxn4ll] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- section labels */
.kz-nav-label[b-l88rrxn4ll] {
    padding: 16px 16px 6px;
    font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* ---- rows: pill shaped, at least 40px; a long label wraps instead of being cut off (a fixed height clipped it) */
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link {
    min-height: 40px; height: auto;
    margin: 1px 0;
    padding: 8px 16px;
    line-height: 1.25;
    border-radius: 20px;
    font-size: .875rem; font-weight: 500;
    color: var(--mud-palette-text-primary);
    transition: background-color .15s ease, color .15s ease;
}
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link .mud-nav-link-text { white-space: normal; overflow-wrap: anywhere; }
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link:hover { background-color: var(--mud-palette-action-default-hover); }
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link .mud-nav-link-icon { color: var(--mud-palette-text-secondary); }

/* ---- the page you are on (Gmail style tint) */
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(26, 115, 232, .12);                                   /* fallback */
    background-color: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent);
    color: var(--mud-palette-primary);
    font-weight: 600;
}
[b-l88rrxn4ll] .kz-nav-menu .mud-nav-link.active .mud-nav-link-icon { color: var(--mud-palette-primary); }

/* ---- nesting: ONE step per level, taken from the group container only (links keep the same padding at every level) */
[b-l88rrxn4ll] .kz-nav-menu .mud-collapse-container { padding-left: 14px; }
[b-l88rrxn4ll] .kz-nav-menu .mud-collapse-container .mud-nav-link { padding-left: 16px; }

@media (prefers-reduced-motion: reduce) {
    [b-l88rrxn4ll] .kz-nav-menu .mud-nav-link { transition: none; }
}

.kz-nav-view[b-l88rrxn4ll] { padding: 8px 16px 16px; border-top: 1px solid var(--mud-palette-lines-default); margin-top: 8px; }
/* /Components/Pages/Shared/Accounting/KaziProcessingDesk.razor.rz.scp.css */
/* Shell styles for the voucher desks. Every colour comes from the MudBlazor theme so light and dark both work. */
.kazi-accounting-scope[b-8ofwuvfp48] {
    font-family: 'Google Sans', 'Roboto', 'Segoe UI', system-ui, sans-serif !important;
}

.kazi-clean-card[b-8ofwuvfp48] {
    background-color: var(--mud-palette-surface) !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    border-radius: 4px !important;
}

/* Table look for the registry tables on a desk. ::deep is needed because the rows are made by MudBlazor, not by this component. */
.kazi-registry-table[b-8ofwuvfp48]  .mud-table-head {
    background-color: var(--mud-palette-background-gray) !important;
    border-bottom: 2px solid var(--mud-palette-lines-default) !important;
}

    .kazi-registry-table[b-8ofwuvfp48]  .mud-table-head .mud-table-cell {
        font-weight: 600 !important;
        color: var(--mud-palette-text-secondary) !important;
        text-transform: uppercase;
        font-size: 0.75rem !important;
        letter-spacing: 0.5px;
        padding: 12px 16px !important;
    }

.kazi-registry-table[b-8ofwuvfp48]  .mud-table-body .mud-table-cell {
    border-bottom: 1px solid var(--mud-palette-lines-default) !important;
    padding: 14px 16px !important;
    font-size: 0.875rem !important;
    color: var(--mud-palette-text-primary);
}

/* Sticks just under the app bar (the bar is 64px tall) */
.kazi-sticky-sidebar[b-8ofwuvfp48] {
    position: sticky !important;
    top: calc(var(--mud-appbar-height, 64px) + 24px);
    z-index: 10;
}

.kazi-bg-light[b-8ofwuvfp48] {
    background-color: var(--mud-palette-background-gray) !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    color: var(--mud-palette-text-primary);
}

.kazi-equilibrium-banner[b-8ofwuvfp48] {
    border-radius: 4px;
    border: 1px dashed var(--mud-palette-lines-default);
    background-color: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-primary);
}

/* ---------- command bar ---------- */
.kd-bar[b-8ofwuvfp48] {
    position: sticky;
    top: var(--mud-appbar-height, 64px);
    z-index: 20; /* top:0 would slide under the fixed app bar */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    box-shadow: 0 1px 3px color-mix(in srgb, #000 22%, transparent);
}

.kd-bar-left[b-8ofwuvfp48] {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.kd-titleblock[b-8ofwuvfp48] {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.kd-crumb[b-8ofwuvfp48] {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kd-crumb-sep[b-8ofwuvfp48] {
    margin: 0 2px;
    color: var(--mud-palette-text-disabled);
}

.kd-title[b-8ofwuvfp48] {
    color: var(--mud-palette-text-primary);
    font-weight: 600 !important;
}

.kd-bar-actions[b-8ofwuvfp48] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- status stepper ---------- */
.kd-steps[b-8ofwuvfp48] {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0 6px;
    overflow-x: auto;
}

.kd-step[b-8ofwuvfp48] {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.kd-dot[b-8ofwuvfp48] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-text-disabled);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.kd-step.kd-done[b-8ofwuvfp48] {
    color: var(--mud-palette-success);
}

    .kd-step.kd-done .kd-dot[b-8ofwuvfp48] {
        background: var(--mud-palette-success);
        border-color: var(--mud-palette-success);
        color: var(--mud-palette-success-text, #fff);
    }

.kd-step.kd-current[b-8ofwuvfp48] {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

    .kd-step.kd-current .kd-dot[b-8ofwuvfp48] {
        border-color: var(--mud-palette-primary);
        color: var(--mud-palette-primary);
    }

.kd-step-line[b-8ofwuvfp48] {
    flex: 1 1 24px;
    height: 2px;
    background: var(--mud-palette-lines-default);
    min-width: 16px;
    max-width: 120px;
}

/* reviewer notes: a warm tint that works on both surfaces */
.kd-notes[b-8ofwuvfp48] {
    background: color-mix(in srgb, var(--mud-palette-warning) 12%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-warning) 55%, transparent) !important;
    color: var(--mud-palette-text-primary);
}

@media (max-width: 600px) {
    .kd-bar[b-8ofwuvfp48] {
        padding: 8px 12px;
    }

    .kd-bar-actions[b-8ofwuvfp48] {
        width: 100%;
        justify-content: flex-start;
    }

    .kd-step-label[b-8ofwuvfp48] {
        display: none;
    }

    .kd-step.kd-current .kd-step-label[b-8ofwuvfp48] {
        display: inline;
    }

    .kazi-sticky-sidebar[b-8ofwuvfp48] {
        position: static !important;
    }
}

/ /* ===== kz-line-card (v2: also wide lot field, helper text, dropdown text) : REPLACES the earlier "kz-line-grid" / "kz-line-card" block at the end of KaziProcessingDesk.razor.css (delete that block, paste this) =====
   One card per entry line (item, warehouse, lot, quantity, price, ...). Fields wrap by the room the card actually has, so nothing is ever
   squeezed or cut off, from a phone to a wide monitor. Container-based (auto-fit), not tied to the screen width, so it also behaves when the
   desk sits beside the totals sidebar. ::deep: the lines are written in each desk but displayed inside the shell (see earlier note).
   No colours of its own: theme variables only. */
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 8px 12px 12px;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-no {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 16px;
    align-items: start;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-item,
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-wide {
    grid-column: span 2;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f {
    min-width: 0;
}

/* what is typed stays fully readable: text boxes, number boxes AND the closed dropdowns (their text sits in an input too) */
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card input,
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card .mud-input-slot,
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card .mud-select-input {
    font-size: 1rem;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card input {
    text-overflow: ellipsis;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card .mud-input-helper-text {
    white-space: normal;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-card .kz-num input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* read-only figures (single units, subtotal) */
.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-read {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-value {
    font-size: 1.05rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-sub {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

.kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-check {
    display: flex;
    align-items: center;
    min-height: 40px;
}

@media (max-width: 600px) {
    .kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-item,
    .kazi-accounting-scope[b-8ofwuvfp48]  .kz-f-wide {
        grid-column: 1 / -1;
    }

    .kazi-accounting-scope[b-8ofwuvfp48]  .kz-line-fields {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* ---------- phones: a short command bar. It stays pinned (Save and Confirm are always in reach) but takes a third of the height it did ---------- */
@media (max-width: 600px) {
    .kd-bar[b-8ofwuvfp48] {
        top: var(--mud-appbar-height, 56px);
        gap: 6px;
        padding: 6px 8px;
    }

    .kd-bar-left[b-8ofwuvfp48] { gap: 6px; flex: 1 1 100%; }
    .kd-crumb[b-8ofwuvfp48] { display: none; }
    .kd-view-switch[b-8ofwuvfp48] { display: none; }

    .kd-bar-actions[b-8ofwuvfp48] { gap: 6px; flex-wrap: nowrap; }

    .kd-bar-actions[b-8ofwuvfp48]  .mud-button-root {
        flex: 1 1 0;
        min-width: 0;
        padding: 4px 8px;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .kd-bar-actions[b-8ofwuvfp48]  .mud-button-icon-start { display: none; }
}
/* /Components/Pages/Shared/Accounting/KaziVoucherRegistry.razor.rz.scp.css */
.kazi-accounting-scope[b-i5zyqcputl] { font-family: 'Google Sans', 'Roboto', 'Segoe UI', system-ui, sans-serif !important; }
.kazi-clean-card[b-i5zyqcputl] {
    background-color: var(--mud-palette-surface) !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    border-radius: 4px !important;
}

.kr-head[b-i5zyqcputl] { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.kr-head-text[b-i5zyqcputl] { display: flex; flex-direction: column; min-width: 0; }

/* ::deep: the table is drawn by MudBlazor, so a plain selector never reaches its cells */
.kazi-registry-table[b-i5zyqcputl]  .mud-table-head { background-color: var(--mud-palette-background-gray) !important; border-bottom: 2px solid var(--mud-palette-lines-default) !important; }
.kazi-registry-table[b-i5zyqcputl]  .mud-table-head .mud-table-cell {
    font-weight: 600 !important; color: var(--mud-palette-text-secondary) !important; text-transform: uppercase;
    font-size: 0.75rem !important; letter-spacing: 0.5px; padding: 12px 16px !important;
}
.kazi-registry-table[b-i5zyqcputl]  .mud-table-body .mud-table-cell {
    border-bottom: 1px solid var(--mud-palette-lines-default) !important; padding: 14px 16px !important;
    font-size: 0.875rem !important; color: var(--mud-palette-text-primary);
}
.kazi-registry-table[b-i5zyqcputl]  .mud-table-body .mud-table-row { cursor: pointer; }

.kazi-sticky-sidebar[b-i5zyqcputl] { position: sticky !important; top: calc(var(--mud-appbar-height, 64px) + 16px); z-index: 10; }
.kazi-bg-light[b-i5zyqcputl] {
    background-color: var(--mud-palette-background-gray) !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    color: var(--mud-palette-text-primary);
}
.kazi-equilibrium-banner[b-i5zyqcputl] {
    border-radius: 4px; border: 1px dashed var(--mud-palette-lines-default);
    background-color: var(--mud-palette-background-gray); color: var(--mud-palette-text-primary);
}

@media (max-width: 600px) {
    .kazi-sticky-sidebar[b-i5zyqcputl] { position: static !important; }
    .kazi-registry-table[b-i5zyqcputl]  .mud-table-body .mud-table-cell { padding: 10px 12px !important; }
}
