:root {
    --app-bg: #f4f7f4;
    --surface: #ffffff;
    --surface-muted: #f8faf7;
    --ink: #14251f;
    --muted: #65746e;
    --border: #dce5de;
    --accent: #0d6b53;
    --accent-strong: #084536;
    --accent-soft: #e5f4ed;
    --navy: #102a3a;
    --warning: #b7791f;
    --danger: #b42318;
    --success: #16794c;
    --sidebar-bg: linear-gradient(180deg, #0b2c35 0%, #09251f 55%, #051816 100%);
    --radius: 8px;
    --shadow-soft: 0 16px 42px rgba(18, 38, 32, 0.08);
    --shadow-card: 0 24px 60px rgba(18, 38, 32, 0.12);
}

html, body {
    font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--app-bg);
    color: var(--ink);
}

a, .btn-link {
    color: var(--accent);
}

.btn-primary {
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.6rem;
    padding-bottom: 2.5rem;
    max-width: 1460px;
}

.top-row form {
    display: inline;
}

.login-shell {
    min-height: calc(100vh - 8rem);
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.login-panel {
    width: min(520px, 100%);
    background: linear-gradient(180deg, #fff 0%, #f9fcfa 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow-card);
}

.request-form {
    max-width: 820px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.requester-banner {
    background: var(--accent-soft);
    border: 1px solid #bfe4d2;
    border-radius: var(--radius);
    color: var(--accent-strong);
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
}

.requester-banner strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.liquidation-form {
    max-width: 1180px;
    overflow: hidden;
}

.correction-feedback {
    background: #fff8eb;
    border: 1px solid #efd095;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.correction-feedback-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.correction-feedback-heading strong {
    display: block;
    font-size: 1.05rem;
    margin-top: 0.15rem;
}

.correction-feedback-message {
    background: var(--surface);
    border: 1px solid #efdcb8;
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.correction-feedback-message span,
.correction-feedback-guidance {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.correction-feedback-message p,
.correction-feedback-guidance {
    margin: 0.3rem 0 0;
}

.correction-feedback-message p {
    color: var(--ink);
    font-weight: 700;
}

.liquidation-feedback-cell {
    display: block;
    max-width: 24rem;
    white-space: normal;
}

.liquidation-reconciliation {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.liquidation-total {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.liquidation-total span {
    color: var(--muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.liquidation-total strong {
    display: block;
    font-size: 1.2rem;
    margin-top: 0.3rem;
}

.liquidation-total-over {
    background: #fff4f2;
    border-color: #efb8b2;
    border-top-color: var(--danger);
    color: var(--danger);
}

.liquidation-lines-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.liquidation-lines-header {
    align-items: center;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.liquidation-lines-header h2 {
    font-size: 1rem;
    margin: 0;
}

.liquidation-lines-header p {
    color: var(--muted);
    margin: 0.2rem 0 0;
}

.liquidation-lines-desktop {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.liquidation-lines-grid {
    min-width: 860px;
}

.liquidation-lines-grid .rz-cell-data {
    overflow: visible;
}

.liquidation-lines-grid .rz-dropdown,
.liquidation-lines-grid .rz-datepicker,
.liquidation-lines-grid .rz-spinner,
.liquidation-lines-grid .rz-textbox {
    min-width: 0;
}

.liquidation-lines-cards {
    display: none;
}

.liquidation-lines-footer {
    border-top: 1px solid var(--border);
    padding: 0.8rem 1rem;
}

.liquidation-line-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(18, 38, 32, 0.07);
    padding: 0.9rem;
}

.liquidation-line-card-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
}

.liquidation-line-card-fields {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.liquidation-line-card-fields label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.liquidation-line-card-fields label > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.liquidation-line-card-fields .liquidation-line-description {
    grid-column: 1 / -1;
}

@media (max-width: 1100px) {
    .liquidation-lines-desktop {
        display: none;
    }

    .liquidation-lines-cards {
        display: grid;
        gap: 0.85rem;
        padding: 0.9rem;
    }
}

@media (max-width: 640px) {
    .liquidation-reconciliation,
    .liquidation-line-card-fields {
        grid-template-columns: 1fr;
    }

    .liquidation-line-card-fields .liquidation-line-description {
        grid-column: auto;
    }

    .liquidation-lines-header,
    .correction-feedback-heading {
        align-items: stretch;
        flex-direction: column;
    }
}

.cashier-queue-grid {
    min-width: 1360px;
}

.cashier-queue-cards {
    display: none;
}

.cashier-queue-table {
    max-width: 100%;
    overflow-x: auto;
}

.request-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.request-card-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.request-card-header div {
    display: grid;
    gap: 0.25rem;
}

.request-card-header span:not(.status-chip) {
    color: var(--muted);
}

.request-card-body {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-card-body div {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.6rem 0.7rem;
}

.request-card-body span {
    color: var(--muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.request-card-body strong {
    display: block;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.cashier-queue-grid .rz-cell-data {
    overflow: visible;
}

.grid-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-width: max-content;
}

.cashier-detail-panel {
    margin-bottom: 1rem;
}

.cashier-detail-actions {
    box-shadow: none;
    margin-top: 1rem;
}

/* Cashier queue: show cards on laptop/tablet, table only on wide desktop */
@media (max-width: 1200px) {
    .cashier-queue-table {
        display: none;
    }

    .cashier-queue-cards {
        display: grid;
        gap: 1rem;
    }

    .cashier-detail-actions {
        align-items: stretch !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cashier-detail-actions .rz-form-field,
    .cashier-detail-actions .rz-dropdown,
    .cashier-detail-actions .rz-textbox {
        width: 100% !important;
    }
}

@media (max-width: 1100px) {
    html,
    body {
        overflow-x: hidden;
    }
}

@media (max-width: 640px) {
    .request-card-body,
    .print-grid {
        grid-template-columns: 1fr;
    }

    .cashier-detail-actions {
        grid-template-columns: 1fr;
    }
}

.print-toolbar {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.print-document {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    color: #111827;
    margin: 0 auto 2rem;
    max-width: 1100px;
    padding: 2rem;
}

.print-document h1 {
    font-size: 1.65rem;
    margin-bottom: 0.25rem;
}

.print-document h2 {
    border-bottom: 1px solid #d1d5db;
    font-size: 1rem;
    margin: 1.4rem 0 0.75rem;
    padding-bottom: 0.4rem;
}

.print-meta {
    color: #4b5563;
    font-size: 0.9rem;
}

.print-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-field {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
}

.print-label {
    color: #6b7280;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.print-value {
    display: block;
    font-weight: 800;
    margin-top: 0.2rem;
}

.print-table {
    border-collapse: collapse;
    font-size: 0.84rem;
    width: 100%;
}

.print-table th,
.print-table td {
    border: 1px solid #d1d5db;
    padding: 0.45rem 0.55rem;
    vertical-align: top;
}

.print-table th {
    background: #f3f4f6;
    font-weight: 850;
    text-transform: uppercase;
}

.signature-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2.5rem;
}

.signature-line {
    border-top: 1px solid #111827;
    padding-top: 0.45rem;
    text-align: center;
}

.signature-block {
    display: grid;
    gap: 0.35rem;
    text-align: center;
}

.signature-block .signature-line {
    margin-top: 1.5rem;
}

.text-end {
    text-align: right;
}

@media print {
    body {
        background: #fff !important;
    }

    .sidebar,
    .top-row,
    .print-toolbar,
    #blazor-error-ui {
        display: none !important;
    }

    .page,
    main,
    article.content {
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .print-document {
        border: 0;
        box-shadow: none;
        margin: 0;
        max-width: none;
        padding: 0.25in;
    }
}

.master-form {
    flex-wrap: wrap;
}

.rz-card h3 {
    margin: 0;
}

h1:focus {
    outline: none;
}

h1, h2, h3 {
    color: var(--ink);
    font-weight: 850;
    letter-spacing: 0;
}

.page-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    margin: 0;
}

.page-header p {
    color: var(--muted);
    margin: 0.35rem 0 0;
    max-width: 680px;
}

.page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

/* 2-column metric grid on mid-range screens */
@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem;
    position: relative;
}

.metric-card::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 1.1rem;
    position: absolute;
    right: 1.1rem;
    top: 0;
}

.metric-label {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric-value {
    color: var(--ink);
    display: block;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.1;
    margin-top: 0.45rem;
}

.metric-note {
    color: var(--muted);
    display: block;
    font-size: 0.84rem;
    margin-top: 0.45rem;
}

.data-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem;
}

.panel-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

.panel-header p {
    color: var(--muted);
    margin: 0.2rem 0 0;
}

.action-strip {
    align-items: end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.finance-alert {
    background: #fff8eb;
    border: 1px solid #f3d49b;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    color: #6b470b;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.status-chip {
    align-items: center;
    background: #eef4f0;
    border: 1px solid #d8e4dc;
    border-radius: 999px;
    color: #365046;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 850;
    line-height: 1;
    min-height: 1.65rem;
    padding: 0.35rem 0.7rem;
    text-transform: capitalize;
}

.status-submitted,
.status-held,
.status-pending {
    background: #fff7e6;
    border-color: #f3d59a;
    color: #7a4f08;
}

.status-approved,
.status-released,
.status-replenished,
.status-completed {
    background: #e4f6ed;
    border-color: #b8e6ce;
    color: var(--success);
}

.status-rejected,
.status-returned,
.status-returned-for-correction {
    background: #fff0ee;
    border-color: #f5c5bf;
    color: var(--danger);
}


/* Accounting liquidation review */
.accounting-review-workspace {
    border-left: 3px solid var(--navy);
    overflow: visible;
}

.accounting-review-summary {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
}

.accounting-review-details,
.accounting-review-totals {
    display: grid;
    gap: 0.75rem;
}

.accounting-review-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-review-details > div,
.accounting-review-totals > div {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 0;
    padding: 0.8rem 0.9rem;
}

.accounting-review-details span,
.accounting-review-totals span,
.accounting-decision-record > span {
    color: var(--muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.accounting-review-details strong,
.accounting-review-totals strong {
    display: block;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.accounting-review-totals > div {
    border-left: 3px solid var(--accent);
}

.accounting-review-totals .review-total-alert {
    background: #fff4f2;
    border-color: #efb8b2;
    border-left-color: var(--danger);
    color: var(--danger);
}

.accounting-review-lines {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 1rem;
    overflow: hidden;
}

.accounting-request-context {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    margin-top: 1rem;
    overflow: hidden;
}

.accounting-request-context-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-request-context-grid > div {
    border-right: 1px solid var(--border);
    min-width: 0;
    padding: 0.85rem 1rem;
}

.accounting-request-context-grid > div:nth-child(3) {
    border-right: 0;
}

.accounting-request-context-grid span {
    color: var(--muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.accounting-request-context-grid strong {
    display: block;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.accounting-request-context-grid .accounting-request-purpose {
    border-right: 0;
    border-top: 1px solid var(--border);
    grid-column: 1 / -1;
}

.accounting-review-section-heading {
    align-items: center;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
}

.accounting-review-section-heading h3 {
    font-size: 0.95rem;
    margin: 0;
}

.accounting-review-section-heading span {
    color: var(--muted);
    font-size: 0.8rem;
}

.accounting-review-lines-table {
    overflow-x: auto;
}

.accounting-review-lines table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.accounting-review-lines th,
.accounting-review-lines td {
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0.8rem;
    text-align: left;
}

.accounting-review-lines th {
    background: #fbfcfb;
    font-size: 0.76rem;
}

.accounting-review-lines tbody tr:last-child td {
    border-bottom: 0;
}

.accounting-review-decision {
    align-items: end;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 1fr) auto;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.accounting-feedback-field {
    width: 100%;
}

.review-feedback-note {
    color: var(--muted);
    font-size: 0.78rem;
    margin: 0.35rem 0 0;
}

.accounting-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.accounting-decision-record {
    background: var(--surface-muted);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
}

.accounting-decision-record strong {
    display: block;
    margin-top: 0.4rem;
}

.accounting-docs-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.25rem;
}

.accounting-docs-section-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .accounting-review-summary,
    .accounting-review-decision {
        grid-template-columns: 1fr;
    }

    .accounting-review-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-request-context-grid {
        grid-template-columns: 1fr;
    }

    .accounting-request-context-grid > div,
    .accounting-request-context-grid > div:nth-child(3) {
        border-bottom: 1px solid var(--border);
        border-right: 0;
    }

    .accounting-request-context-grid .accounting-request-purpose {
        border-bottom: 0;
        border-top: 0;
        grid-column: auto;
    }

    .accounting-review-actions {
        justify-content: flex-start;
    }

    .accounting-docs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .accounting-review-details {
        grid-template-columns: 1fr;
    }

    .accounting-review-lines-table {
        overflow: visible;
    }

    .accounting-review-lines table,
    .accounting-review-lines tbody,
    .accounting-review-lines tr,
    .accounting-review-lines td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .accounting-review-lines thead {
        display: none;
    }

    .accounting-review-lines tr {
        border-bottom: 1px solid var(--border);
        padding: 0.55rem 0;
    }

    .accounting-review-lines tbody tr:last-child {
        border-bottom: 0;
    }

    .accounting-review-lines td {
        border: 0;
        display: grid;
        gap: 0.75rem;
        grid-template-columns: 7rem minmax(0, 1fr);
        padding: 0.4rem 0.8rem;
        text-align: left;
    }

    .accounting-review-lines td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .accounting-review-lines td.text-end {
        text-align: left !important;
    }

    .accounting-review-actions .rz-button {
        flex: 1 1 100%;
    }
}

/* Proof attachments panel */
.proof-section {
    border-left: 3px solid var(--accent);
}

.proof-panel {
    margin-top: 1.25rem;
}

.proof-panel-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.proof-panel-title {
    align-items: center;
    color: var(--ink);
    display: flex;
    font-size: 0.88rem;
    font-weight: 800;
    gap: 0.4rem;
}

.proof-count {
    color: var(--muted);
    font-size: 0.78rem;
}

.proof-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.proof-thumb {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 0.3rem;
    overflow: hidden;
    padding: 0.5rem;
    text-align: center;
    width: 140px;
}

.proof-thumb-img {
    border-radius: 5px;
    height: 80px;
    object-fit: cover;
    transition: opacity 0.15s;
    width: 100%;
}

.proof-thumb-img:hover {
    opacity: 0.85;
}

.proof-thumb-doc {
    align-items: center;
    background: #f3f4f6;
    border-radius: 5px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    font-weight: 800;
    gap: 0.3rem;
    height: 80px;
    justify-content: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.15s;
}

.proof-thumb-doc:hover {
    background: #e5e7eb;
    color: var(--ink);
}

.proof-thumb-name {
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proof-thumb-size {
    color: var(--muted);
    font-size: 0.65rem;
}

.proof-thumb-actions {
    display: grid;
    gap: 0.35rem;
}

.proof-thumb-actions a {
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.4rem 0.5rem;
    text-decoration: none;
}

.proof-action-view {
    background: var(--accent);
    color: #fff;
}

.proof-action-view:hover {
    background: var(--accent-strong);
    color: #fff;
}

.proof-action-download {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
}

.proof-action-download:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.proof-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: border-color 0.15s, background 0.15s;
}

.proof-upload-area:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.proof-upload-actions {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-upload-option {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 0.6rem;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.proof-upload-option:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.proof-upload-option.is-disabled {
    cursor: wait;
    opacity: 0.65;
}

.proof-camera-option {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.proof-camera-option:hover {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
}

.camera-capture-backdrop {
    align-items: center;
    background: rgba(17, 24, 39, 0.82);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1100;
}

.camera-capture-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    width: min(680px, 100%);
}

.camera-capture-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1rem 0.85rem;
}

.camera-capture-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

.camera-capture-header p {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

.camera-icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.camera-preview {
    aspect-ratio: 4 / 3;
    background: #111827;
    display: grid;
    overflow: hidden;
    place-items: center;
    position: relative;
}

.camera-preview video {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.camera-error {
    background: rgba(127, 29, 29, 0.92);
    color: #fff;
    font-size: 0.85rem;
    inset: auto 1rem 1rem;
    padding: 0.75rem;
    position: absolute;
    text-align: center;
}

.camera-capture-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0.85rem 1rem 1rem;
}

.camera-primary-button,
.camera-secondary-button {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 800;
    gap: 0.4rem;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
}

.camera-primary-button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
}

.camera-primary-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.camera-secondary-button {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink);
}

.proof-upload-hint {
    color: var(--muted);
    font-size: 0.74rem;
    margin: 0.6rem 0 0;
    text-align: center;
}

.proof-hint {
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0.75rem 0 0;
}

@media (max-width: 520px) {
    .proof-upload-actions {
        grid-template-columns: 1fr;
    }

    .camera-capture-backdrop {
        padding: 0;
    }

    .camera-capture-dialog {
        border-radius: 0;
        height: 100vh;
        max-height: none;
        width: 100%;
    }

    .camera-preview {
        aspect-ratio: auto;
        height: calc(100vh - 154px);
    }

    .camera-capture-actions > button {
        flex: 1 1 0;
    }
}

@media (max-width: 640px) {
    .proof-gallery {
        gap: 0.5rem;
    }

    .proof-thumb {
        width: 90px;
    }

    .proof-thumb-img {
        height: 64px;
    }
}

.empty-state {
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    padding: 1rem;
    text-align: center;
}

.home-hero {
    background: linear-gradient(135deg, #fff 0%, #ecf7f1 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.home-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0;
}

.home-hero p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
    max-width: 680px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.rz-card,
.rz-datatable,
.rz-tabs {
    border-radius: var(--radius) !important;
}

.rz-data-grid,
.rz-datatable {
    border: 1px solid var(--border) !important;
}

.rz-grid-table thead th {
    background: #f5f8f5 !important;
    color: #31463d !important;
    font-size: 0.76rem !important;
    font-weight: 850 !important;
    text-transform: uppercase;
}

.rz-button.rz-primary {
    background-color: var(--accent) !important;
}

.rz-button {
    border-radius: 7px !important;
    font-weight: 750 !important;
}

@media (max-width: 900px) {
    /* page header wraps instead of blocks, keeps actions inline */
    .page-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .page-header h1 {
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding-top: 1.1rem;
        padding-bottom: 1.5rem;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .action-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .data-panel {
        padding: 0.75rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
.replenishment-selection-table { overflow-x: auto; }
.replenishment-selection-cards { display: none; }
.replenishment-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
}
.replenishment-review-list { display: grid; gap: 14px; }
.replenishment-review-card {
    border: 1px solid #d8e0dc;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.replenishment-review-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    background: #f5f8f6;
    cursor: pointer;
}
.replenishment-review-card > summary div { display: grid; gap: 3px; }
.replenishment-review-card > h3,
.replenishment-review-card > .finance-alert { margin: 18px; }
.replenishment-particulars-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 18px 18px;
}
.replenishment-particular { display: grid; gap: 4px; min-width: 0; }
.replenishment-particular span {
    color: #65736d;
    font-size: .78rem;
    text-transform: uppercase;
}
.replenishment-particular strong { overflow-wrap: anywhere; }
.review-span-2 { grid-column: span 2; }
.replenishment-review-card .accounting-docs-grid { padding: 0 18px 18px; }
.replenishment-reviewed-control {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 18px 18px;
    font-weight: 700;
}
.replenishment-review-actions {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: end;
    gap: 20px;
    margin-top: 20px;
}
.replenishment-transaction-card {
    border: 1px solid #d8e0dc;
    border-radius: 8px;
    padding: 12px;
    display: grid;
    gap: 8px;
}
.replenishment-transaction-card > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
@media (max-width: 900px) {
    .replenishment-selection-table { display: none; }
    .replenishment-selection-cards { display: grid; gap: 12px; }
    .replenishment-review-grid { grid-template-columns: 1fr; }
    .replenishment-particulars-grid { grid-template-columns: 1fr; }
    .review-span-2 { grid-column: auto; }
    .replenishment-review-actions { grid-template-columns: 1fr; }
    .replenishment-review-card > summary { align-items: flex-start; }
}

/* History filter bar (View History) */
.history-bar {
    margin-bottom: 0.85rem;
}

.history-bar-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.history-range-chip {
    background: var(--accent-soft, #e7f4ee);
    border-radius: 999px;
    color: var(--accent, #157a55);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
}

.history-total {
    color: var(--muted, #64748b);
    font-size: 0.8rem;
    font-weight: 600;
}

.history-filter-panel {
    background: var(--surface-muted, #f6f8f7);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.7rem;
    padding: 0.9rem 1rem;
}

.history-filter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.history-search-box {
    flex: 1;
    min-width: 220px;
}

@media (max-width: 640px) {
    .history-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Request status timeline */
.request-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0.75rem 0 1rem;
}

.timeline-step {
    align-items: flex-start;
    display: flex;
    flex: 1;
    gap: 0.55rem;
    min-width: 150px;
    padding-right: 0.75rem;
    position: relative;
}

.timeline-step:not(:last-child)::after {
    background: var(--border, #e2e8f0);
    content: "";
    height: 2px;
    left: 1.6rem;
    position: absolute;
    right: 0.4rem;
    top: 0.65rem;
}

.timeline-step--done:not(:last-child)::after {
    background: var(--accent, #157a55);
}

.timeline-marker {
    align-items: center;
    background: #fff;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 999px;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    height: 1.4rem;
    justify-content: center;
    position: relative;
    width: 1.4rem;
    z-index: 1;
}

.timeline-step--done .timeline-marker {
    background: var(--accent, #157a55);
    border-color: var(--accent, #157a55);
}

.timeline-step--current .timeline-marker {
    border-color: var(--accent, #157a55);
    box-shadow: 0 0 0 4px rgba(21, 122, 85, 0.15);
}

.timeline-step--stopped .timeline-marker {
    background: #dc2626;
    border-color: #dc2626;
}

.timeline-step-body {
    display: grid;
    gap: 0.1rem;
    padding-top: 0.05rem;
}

.timeline-step-body strong {
    font-size: 0.82rem;
}

.timeline-step--pending .timeline-step-body strong {
    color: var(--muted, #64748b);
    font-weight: 600;
}

.timeline-step--current .timeline-step-body strong {
    color: var(--accent, #157a55);
}

.timeline-step--stopped .timeline-step-body strong {
    color: #dc2626;
}

.timeline-step-body span {
    color: var(--muted, #64748b);
    font-size: 0.72rem;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .request-timeline {
        flex-direction: column;
        gap: 0.65rem;
    }

    .timeline-step:not(:last-child)::after {
        display: none;
    }
}

/* Clickable metric cards (dashboard drill-down) */
.metric-card--clickable {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.metric-card--clickable:hover {
    border-color: var(--accent, #157a55);
    box-shadow: 0 10px 28px rgba(13, 49, 38, 0.12);
    transform: translateY(-2px);
}

.metric-card--active {
    border-color: var(--accent, #157a55);
    box-shadow: inset 0 0 0 1px var(--accent, #157a55);
}

.metric-card--active .metric-label {
    color: var(--accent, #157a55);
}

/* Liquidation monitoring dashboard */
.monitor-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.monitor-card-overdue .metric-value {
    color: #dc2626;
}

.monitor-days {
    font-weight: 700;
}

.monitor-days--overdue {
    background: #fee2e2;
    border-radius: 999px;
    color: #dc2626;
    font-weight: 900;
    padding: 0.2rem 0.6rem;
}

.monitor-stage {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.3rem 0.7rem;
    white-space: nowrap;
}

.monitor-stage--awaitingliquidation {
    background: #e0f2fe;
    color: #0369a1;
}

.monitor-stage--overdue {
    background: #fee2e2;
    color: #dc2626;
}

.monitor-stage--underreview {
    background: #fef9c3;
    color: #a16207;
}

.monitor-stage--needscorrection {
    background: #ffedd5;
    color: #c2410c;
}

.monitor-stage--cleared {
    background: #dcfce7;
    color: #15803d;
}

.monitor-stage--rejected {
    background: #f3f4f6;
    color: #4b5563;
}
