﻿:root {
    --bg: #16181d;
    --surface: #1f232b;
    --surface-2: #262c36;
    --surface-3: #2d3440;
    --border: #343b47;
    --text: #f3f4f6;
    --text-soft: #c3c8d0;
    --text-muted: #8f98a8;
    --primary: #d29a45;
    --primary-hover: #e0aa58;
    --secondary: #5fa8d3;
    --secondary-hover: #76b8df;
    --success: #3fb950;
    --warning: #f0b429;
    --danger: #e5534b;
    --info: #58a6ff;
    --neutral: #9aa4b2;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    --input-height: 42px;
    --transition: 180ms ease;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition);
}

    a:hover {
        color: var(--secondary-hover);
        text-decoration: underline;
    }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.app-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
}

.panel-heading {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.panel-subheading {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.panel-divider {
    border-top: 1px solid var(--border);
    margin: 1.25rem 0 1rem;
}

.panel-grid {
    display: grid;
    gap: 1rem;
}

    .panel-grid.two {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .panel-grid.three {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

.summary-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.summary-label {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.summary-value {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
}

.buyer-email-value {
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

    .summary-value.money {
        color: var(--primary);
    }

.actions-list {
    display: grid;
    gap: 0.75rem;
    padding-left: 1rem;
    margin: 0;
}

    .actions-list li {
        color: var(--text-soft);
    }

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    overflow: hidden;
}

    .data-table thead th {
        background: var(--surface-3);
        color: var(--text-soft);
        text-align: left;
        font-weight: 600;
        padding: 0.85rem 0.75rem;
        border-bottom: 1px solid var(--border);
    }

    .data-table tbody td {
        padding: 0.85rem 0.75rem;
        border-bottom: 1px solid var(--border);
        color: var(--text);
        vertical-align: top;
    }

    .data-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.03);
    }

    .data-table.compact thead th,
    .data-table.compact tbody td {
        padding: 0.55rem 0.6rem;
    }

.form-stack {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 0.5rem;
}

    .form-row.two {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

.form-label,
label {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control-dark,
input,
select,
textarea {
    width: 100%;
    min-height: var(--input-height);
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

    input:focus,
    select:focus,
    textarea:focus,
    .form-control-dark:focus {
        outline: none;
        border-color: var(--secondary);
        box-shadow: 0 0 0 3px rgba(95, 168, 211, 0.18);
        background: var(--surface-3);
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
    }

input[type="checkbox"],
.form-check-input {
    width: 1.05rem;
    min-height: 1.05rem;
    height: 1.05rem;
    padding: 0;
    border-radius: 4px;
    vertical-align: middle;
}

.validation-message,
.field-validation-error {
    color: var(--danger);
    font-size: 0.88rem;
}

.validation-summary-errors,
.alert-danger {
    background: rgba(229, 83, 75, 0.12);
    color: #ffb3ad;
    border: 1px solid rgba(229, 83, 75, 0.35);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(63, 185, 80, 0.12);
    color: #b7f0c1;
    border: 1px solid rgba(63, 185, 80, 0.35);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.alert-warning {
    background: rgba(240, 180, 41, 0.12);
    color: #ffe2a0;
    border: 1px solid rgba(240, 180, 41, 0.35);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(88, 166, 255, 0.12);
    color: #c7e0ff;
    border: 1px solid rgba(88, 166, 255, 0.35);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-neutral,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

    button:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-danger:hover,
    .btn-neutral:hover {
        transform: translateY(-1px);
        text-decoration: none;
    }

.btn-primary,
button {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

    .btn-primary:hover,
    button:hover {
        background: var(--primary-hover);
        color: #111;
    }

.btn-secondary {
    background: var(--secondary);
    color: #0f1720;
    border-color: var(--secondary);
}

    .btn-secondary:hover {
        background: var(--secondary-hover);
        color: #0f1720;
    }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-neutral {
    background: transparent;
    color: var(--text-soft);
    border-color: var(--border);
}

    .btn-neutral:hover {
        background: var(--surface-2);
        color: var(--text);
    }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge-success {
    background: rgba(63, 185, 80, 0.14);
    color: #9ae6a6;
    border: 1px solid rgba(63, 185, 80, 0.35);
}

.badge-warning {
    background: rgba(240, 180, 41, 0.14);
    color: #ffd57d;
    border: 1px solid rgba(240, 180, 41, 0.35);
}

.badge-danger {
    background: rgba(229, 83, 75, 0.14);
    color: #ffb3ad;
    border: 1px solid rgba(229, 83, 75, 0.35);
}

.badge-info {
    background: rgba(88, 166, 255, 0.14);
    color: #b7d6ff;
    border: 1px solid rgba(88, 166, 255, 0.35);
}

.badge-neutral {
    background: rgba(154, 164, 178, 0.12);
    color: #d3dae5;
    border: 1px solid rgba(154, 164, 178, 0.3);
}

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.kpi-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.kpi-title {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.kpi-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.money-positive {
    color: var(--success);
}

.money-accent {
    color: var(--primary);
}

.print-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.print-top-section {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.print-summary-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.print-summary-grid.compact-four {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.print-summary-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    min-width: 0;
}

.print-summary-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.18rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.print-summary-value {
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.print-summary-value.is-money {
    color: var(--primary);
}

.print-summary-value.is-positive {
    color: var(--success);
}

.print-note-block {
    margin-top: 0.2rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-line;
}

.print-list-panel {
    margin-top: 1rem;
}

.print-list-panel .panel-heading {
    margin-bottom: 0.5rem;
}

.branded-print-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.branded-print-company,
.branded-print-document {
    display: grid;
    gap: 0.35rem;
}

.branded-print-company-brand {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.branded-print-company-copy {
    display: grid;
    gap: 0.35rem;
}

.branded-print-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
}

.branded-print-company-name,
.branded-print-document-title {
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.15;
}

.branded-print-company-contact,
.branded-print-document-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.branded-print-company-note,
.branded-print-document-note,
.branded-print-footer {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.branded-print-document {
    justify-items: end;
    text-align: right;
}

.branded-print-document-note {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.branded-print-footer {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .app-page {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.45rem;
    }

    .data-table {
        font-size: 0.95rem;
    }

    .branded-print-document {
        justify-items: start;
        text-align: left;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .app-topbar,
    .app-nav,
    .app-current-context,
    .app-user-chip,
    .app-menu-shell {
        display: none !important;
    }

    .app-main {
        padding-top: 0 !important;
    }

    .app-page,
    .panel,
    .print-surface {
        background: #fff;
        color: #000;
        border: none;
        box-shadow: none;
    }

    .btn-row,
    button {
        display: none !important;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .branded-print-header,
    .branded-print-footer {
        border-color: #cfcfcf;
    }

    .branded-print-header {
        gap: 0.45rem;
        padding-bottom: 0.35rem;
        margin-bottom: 0.45rem;
    }

    .branded-print-company-name,
    .branded-print-document-title,
    .branded-print-company-contact,
    .branded-print-document-subtitle,
    .branded-print-company-note,
    .branded-print-document-note,
    .branded-print-footer {
        color: #000;
    }

    .branded-print-document-note {
        background: #fff;
        border-color: #cfcfcf;
    }

    .branded-print-company-name,
    .branded-print-document-title {
        font-size: 0.95rem;
        line-height: 1.1;
    }

    .branded-print-company-contact,
    .branded-print-document-subtitle,
    .branded-print-company-note,
    .branded-print-footer {
        font-size: 0.68rem;
        line-height: 1.28;
    }

    .print-surface {
        padding: 0 !important;
    }

    .print-top-section {
        gap: 0.45rem;
        margin-bottom: 0.55rem;
        page-break-inside: avoid;
    }

    .print-summary-grid,
    .print-summary-grid.compact-four {
        gap: 0.3rem;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .print-summary-card {
        padding: 0.28rem 0.38rem;
        border-color: #d9d9d9;
        background: #fff;
        break-inside: avoid;
    }

    .print-summary-label {
        color: #555;
        font-size: 0.58rem;
        margin-bottom: 0.08rem;
    }

    .print-summary-value {
        color: #000;
        font-size: 0.8rem;
        line-height: 1.18;
    }

    .print-summary-value.is-money,
    .print-summary-value.is-positive {
        color: #000;
    }

    .print-note-block {
        margin-top: 0.2rem;
        padding: 0.28rem 0.38rem;
        border-color: #d9d9d9;
        background: #fff;
        color: #000;
        font-size: 0.68rem;
        line-height: 1.28;
    }

    .print-list-panel {
        margin-top: 0.4rem;
    }

    .print-list-panel .panel-heading {
        margin-bottom: 0.2rem;
        font-size: 0.82rem;
    }

    .panel-heading {
        font-size: 0.82rem;
        margin-bottom: 0.3rem;
    }

    .data-table {
        margin-top: 0.2rem;
        font-size: 0.72rem;
    }

    .data-table thead th,
    .data-table tbody td,
    .data-table tfoot th,
    .data-table tfoot td {
        padding: 0.18rem 0.28rem;
        color: #000;
    }
}

.clerk-page {
    max-width: 980px;
}

.clerk-panel {
    padding: 1.5rem;
}

.clerk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 1rem;
}

.clerk-field {
    display: grid;
    gap: 0.5rem;
}

.clerk-input {
    min-height: 62px !important;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: left;
    background: var(--surface-3);
}

.clerk-helper {
    min-height: 24px;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.clerk-ok {
    color: #9ae6a6;
}

.clerk-error {
    color: #ffb3ad;
}

.clerk-info {
    color: #b7d6ff;
}

.clerk-submit {
    min-width: 180px;
    min-height: 50px;
    font-size: 1rem;
}

.clerk-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 1rem;
    align-items: start;
}

.clerk-action {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    margin-top: 0.25rem;
}

.clerk-field .field-validation-error {
    display: block;
    min-height: 20px;
    margin-top: 0.35rem;
}

.clerk-field .clerk-helper {
    min-height: 22px;
}

@media (max-width: 900px) {
    .clerk-entry-grid {
        grid-template-columns: 1fr;
    }

    .clerk-action {
        margin-top: 0;
    }
}

@media (max-width: 900px) {
    .clerk-grid {
        grid-template-columns: 1fr;
    }
}

.table-scroll {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

    .table-scroll .data-table {
        margin-top: 0;
    }

    .table-scroll thead th {
        position: sticky;
        top: 0;
        background: var(--surface-3);
        z-index: 2;
    }

.app-shell {
    min-height: 100vh;
    background: var(--bg);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(22, 24, 29, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.app-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

    .app-brand:hover {
        color: var(--text);
        text-decoration: none;
    }

.app-brand-logo-shell {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.app-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-brand-mark {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(210, 154, 69, 0.18);
}

.brand-image-preview {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-2);
}

.brand-image-preview.is-empty {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.brand-image-preview-img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.app-nav-auth {
    justify-content: flex-end;
    gap: 0.9rem;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

    .app-nav-link:hover {
        background: var(--surface-2);
        border-color: var(--border);
        color: var(--text);
        text-decoration: none;
    }

.app-nav-link.active {
    background: rgba(210, 154, 69, 0.14);
    border-color: rgba(210, 154, 69, 0.32);
    color: #f3d3a0;
}

.app-nav-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: transparent;
}

    .app-nav-link.is-disabled:hover {
        background: transparent;
        border-color: transparent;
        color: var(--text-soft);
        text-decoration: none;
    }

.app-main {
    padding-top: 0.5rem;
}

.app-current-context {
    display: grid;
    gap: 0.18rem;
    padding: 0.55rem 0.85rem;
    min-width: 220px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.app-current-context-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-current-context-value {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}

.app-current-context.is-empty .app-current-context-value {
    color: var(--warning);
}

.app-user-chip {
    display: grid;
    gap: 0.18rem;
    min-width: 180px;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.app-user-chip-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-user-chip-value {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-menu-shell {
    position: relative;
}

.app-menu-shell summary {
    list-style: none;
}

.app-menu-shell summary::-webkit-details-marker {
    display: none;
}

.app-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 42px;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    cursor: pointer;
    user-select: none;
}

.app-menu-trigger:hover {
    background: var(--surface-3);
}

.app-menu-trigger-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-menu-trigger-current {
    color: var(--text);
    font-weight: 700;
}

.app-menu-shell[open] .app-menu-trigger {
    border-color: rgba(210, 154, 69, 0.38);
    box-shadow: 0 0 0 3px rgba(210, 154, 69, 0.12);
}

.app-menu-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(31, 35, 43, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.app-menu-section {
    display: grid;
    gap: 0.35rem;
}

.app-menu-section + .app-menu-section {
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-menu-section-title {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.app-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 38px;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.app-menu-link:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
    text-decoration: none;
}

.app-menu-link.active {
    background: rgba(210, 154, 69, 0.14);
    border-color: rgba(210, 154, 69, 0.32);
    color: #f3d3a0;
}

.app-menu-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.app-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(87, 188, 255, 0.18);
    border: 1px solid rgba(87, 188, 255, 0.35);
    color: #d5f0ff;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.app-menu-form {
    margin: 0;
}

.app-menu-button {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    color: var(--text-soft);
    border: 1px solid transparent;
    min-height: 38px;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
}

.app-menu-button:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
    transform: none;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(8, 10, 14, 0.7);
    backdrop-filter: blur(6px);
}

.app-modal-card {
    width: min(520px, 100%);
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.app-modal-kicker {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-modal-number {
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 0.95;
    font-weight: 800;
    color: var(--primary);
}

.app-modal-copy {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.55;
}

.audit-details summary {
    color: var(--secondary);
    cursor: pointer;
    font-weight: 700;
}

.audit-detail-list {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.audit-detail-line {
    display: grid;
    gap: 0.12rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.audit-detail-label {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.audit-detail-value {
    color: var(--text);
    font-size: 0.88rem;
    word-break: break-word;
}

@media (max-width: 768px) {
    .app-topbar-inner {
        padding: 0.9rem 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .app-nav {
        width: 100%;
    }

    .app-nav-link {
        flex: 1 1 auto;
    }

    .app-nav-auth {
        flex-direction: column;
        align-items: stretch;
    }

    .app-current-context {
        min-width: 0;
    }

    .app-user-chip {
        min-width: 0;
    }

    .app-menu-shell,
    .app-menu-trigger,
    .app-menu-panel {
        width: 100%;
    }

    .app-menu-panel {
        position: static;
        margin-top: 0.55rem;
        max-height: min(70vh, 560px);
    }
}

/* =========================
   LABEL PRINT STYLES
   ========================= */

.label-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.label-card {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    page-break-inside: avoid;
    break-inside: avoid;
}

.label-lot {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
}

.label-qr {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0;
}

.label-title {
    font-weight: 700;
    text-align: center;
}

.label-seller {
    text-align: center;
    font-size: 0.9rem;
}

/* PRINT MODE */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .label-sheet {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35in;
    }

    .label-card {
        border: 1px solid #000;
        border-radius: 0;
        box-shadow: none;
        min-height: 2.5in;
    }

    .kpi-link {
        display: block;
        text-decoration: none;
        transition: transform var(--transition), border-color var(--transition), background var(--transition);
    }

        .kpi-link:hover {
            text-decoration: none;
            transform: translateY(-2px);
            border-color: rgba(210, 154, 69, 0.35);
            background: var(--surface-3);
        }

        .kpi-link .kpi-title,
        .kpi-link .kpi-number {
            text-decoration: none;
        }
}

.clickable-row {
    cursor: pointer;
}

    .clickable-row:hover td {
        background: var(--surface-3);
    }

@media print {
    .table-scroll {
        overflow: visible !important;
        max-height: none !important;
    }

    .data-table {
        width: 100%;
    }
}

@media print {

    /* Remove scroll clipping */
    .table-scroll {
        overflow: visible !important;
        max-height: none !important;
    }

    /* Remove unnecessary UI */
    .btn-row,
    .no-print,
    button {
        display: none !important;
    }

    /* Make panels print clean */
    .panel {
        box-shadow: none;
        border: none;
        page-break-inside: auto;
        break-inside: auto;
    }

    .print-surface {
        border: none !important;
        page-break-inside: auto;
        break-inside: auto;
    }

    .branded-print-header,
    .branded-print-document-note,
    .branded-print-footer,
    .print-summary-card,
    .print-note-block {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Prevent row splitting */
    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    body {
        background: #fff;
        color: #000;
    }
}

@media print {
    .print-only {
        display: block !important;
        margin-bottom: 1rem;
    }
}

.settlement-header {
    align-items: start;
    gap: 1rem;
}

.settlement-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    min-width: 420px;
}

.settlement-top-actions {
    justify-content: flex-end;
}

.settlement-payment-form {
    display: grid;
    grid-template-columns: auto 160px auto;
    align-items: end;
    gap: 0.75rem;
}

    .settlement-payment-form .form-control-dark {
        min-width: 160px;
    }

.seller-settlement-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.seller-settlement-summary-card {
    min-height: 0;
}

@media print {
    .seller-settlement-summary-grid,
    .seller-settlement-summary-grid.compact-four {
        gap: 0.22rem;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        margin-bottom: 0.2rem;
    }

    .seller-settlement-summary-card {
        padding: 0.22rem 0.3rem;
    }

    .seller-settlement-summary-card .print-summary-label {
        font-size: 0.54rem;
        margin-bottom: 0.04rem;
    }

    .seller-settlement-summary-card .print-summary-value {
        font-size: 0.74rem;
        line-height: 1.1;
    }
}

@media (max-width: 900px) {
    .settlement-actions {
        width: 100%;
        min-width: 0;
        align-items: stretch;
    }

    .settlement-top-actions {
        justify-content: flex-start;
    }

    .settlement-payment-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.app-nav-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
}

/* =========================
   AUCTION WORKFLOW DASHBOARD
   ========================= */

.auction-dashboard {
    display: grid;
    gap: 1.35rem;
}

.auction-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.auction-dashboard-hero .panel {
    margin: 0;
}

.auction-hero-copy {
    display: grid;
    gap: 1rem;
}

.auction-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.auction-hero-meta .badge {
    padding-inline: 0.85rem;
}

.auction-hero-copy .panel-subheading {
    margin: 0;
    max-width: 52rem;
}

.auction-current-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.auction-status-card {
    display: grid;
    gap: 0.9rem;
}

.auction-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.auction-status-grid .summary-card {
    min-height: 0;
}

.workflow-board {
    display: grid;
    gap: 1.1rem;
}

.workflow-lanes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.workflow-lane {
    display: grid;
    gap: 0.9rem;
}

.workflow-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(17, 24, 39, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 1.15rem 1.15rem 1.2rem;
    display: grid;
    gap: 1rem;
}

.workflow-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workflow-card-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(210, 154, 69, 0.16);
    border: 1px solid rgba(210, 154, 69, 0.32);
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.workflow-card-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
}

.workflow-card-copy {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.workflow-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.workflow-link {
    display: block;
    padding: 0.9rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(30, 41, 59, 0.64);
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.workflow-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.25);
}

.workflow-link-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.workflow-link-title::after {
    content: "›";
    color: var(--accent);
    font-size: 1.05rem;
    line-height: 1;
}

.workflow-link-copy {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.workflow-callout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.workflow-callout-card {
    padding: 1rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(210, 154, 69, 0.24);
    background: rgba(148, 163, 184, 0.06);
}

.workflow-callout-card h4 {
    margin: 0 0 0.35rem;
    font-size: 0.97rem;
    color: var(--text-primary);
}

.workflow-callout-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.workflow-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.workflow-tools a {
    color: var(--accent-soft);
}

/* =========================
   OPERATIONS WORKSPACE PAGES
   ========================= */

.ops-page {
    display: grid;
    gap: 1.25rem;
}

.ops-nav-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.ops-nav-strip .btn-neutral,
.ops-nav-strip .btn-secondary {
    min-height: 42px;
}

.ops-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.ops-workspace.ops-workspace-single {
    grid-template-columns: minmax(0, 1fr);
}

.ops-main-column,
.ops-side-column {
    display: grid;
    gap: 1rem;
}

.ops-side-column {
    position: sticky;
    top: 1rem;
}

.ops-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(17, 24, 39, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 1.15rem;
    display: grid;
    gap: 1rem;
}

.ops-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ops-card-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ops-card-copy {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.ops-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.ops-entry-grid.compact-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-highlight-value input,
.ops-highlight-value .form-control-dark,
.ops-highlight-value .clerk-input {
    min-height: 62px;
    font-size: 1.55rem;
    font-weight: 800;
}

.ops-highlight-value {
    display: grid;
    gap: 0.35rem;
}

.ops-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ops-side-stack {
    display: grid;
    gap: 0.85rem;
}

.ops-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.ops-stat-grid .summary-card {
    min-height: 0;
}

.ops-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.16);
}

.ops-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.ops-section-list {
    display: grid;
    gap: 0.75rem;
}

.ops-section-list .panel,
.ops-section-list .summary-card {
    margin: 0;
}

.ops-table-panel .table-scroll {
    margin-top: 0.2rem;
}

.ops-muted-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.35);
    font-size: 0.83rem;
}

.ops-row-list {
    display: grid;
    gap: 0.75rem;
}

.ops-row-card {
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(30, 41, 59, 0.58);
}

.ops-row-card .form-label {
    margin-bottom: 0.35rem;
}

.ops-row-card .btn-row {
    justify-content: flex-end;
}

/* =========================
   COMPACT DASHBOARD
   ========================= */

.compact-dashboard {
    gap: 1rem;
}

.compact-section-panel {
    display: grid;
    gap: 0.9rem;
}

.compact-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.compact-section-heading {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary);
}

.compact-section-copy {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.compact-overview-panel {
    display: grid;
    gap: 0.9rem;
}

.compact-overview-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr 0.8fr 1fr;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.compact-overview-block,
.compact-overview-action {
    padding: 1rem 1.1rem;
    background: rgba(30, 41, 59, 0.42);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.compact-overview-grid > :last-child {
    border-right: none;
}

.compact-overview-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compact-overview-value {
    margin-top: 0.45rem;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.compact-overview-copy {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.compact-current-button {
    width: 100%;
}

.compact-kpi-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.75rem;
}

.compact-kpi-card {
    display: block;
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.48);
    text-decoration: none;
}

.compact-kpi-card:hover {
    text-decoration: none;
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.08);
}

.compact-kpi-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.35;
}

.compact-kpi-value {
    margin-top: 0.45rem;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.compact-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.compact-action-grid.six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-action-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 150px;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(17, 24, 39, 0.78));
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.compact-action-card.small {
    min-height: 118px;
}

.compact-action-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.32);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(17, 24, 39, 0.82));
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.22);
}

.compact-action-title {
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
}

.compact-action-copy {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.compact-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.compact-tool-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.compact-tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.48);
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

.compact-tool-button:hover {
    text-decoration: none;
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(37, 99, 235, 0.08);
}

.compact-protected-panel {
    padding: 0;
    overflow: hidden;
}

.compact-protected-panel summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.compact-protected-panel summary::-webkit-details-marker {
    display: none;
}

.compact-protected-body {
    padding: 0 1.1rem 1.1rem;
}

.grouped-sale-page .ops-workspace {
    align-items: stretch;
}

.grouped-lot-card,
.grouped-side-card {
    height: 100%;
}

.grouped-lot-scroll {
    max-height: clamp(320px, calc(100vh - 360px), 540px);
    overflow: auto;
    padding-right: 0.35rem;
}

.grouped-sale-page .ops-row-card {
    padding: 0.75rem 0.85rem;
}

.grouped-sale-page .ops-row-card .grouped-row-status {
    margin-top: 0.45rem !important;
}

.grouped-sale-page .ops-card .summary-card {
    min-height: 0;
}

@media (max-width: 1120px) {
    .auction-dashboard-hero,
    .ops-workspace,
    .workflow-callout-grid {
        grid-template-columns: 1fr;
    }

    .compact-action-grid.six,
    .compact-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ops-side-column {
        position: static;
    }

    .grouped-lot-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 980px) {
    .workflow-lanes,
    .auction-status-grid,
    .ops-entry-grid,
    .ops-entry-grid.compact-two {
        grid-template-columns: 1fr;
    }

    .compact-overview-grid,
    .compact-two-column,
    .compact-action-grid,
    .compact-action-grid.six,
    .compact-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-overview-block,
    .compact-overview-action {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    .compact-overview-grid > :nth-last-child(-n + 2) {
        border-bottom: none;
    }
}

@media (max-width: 720px) {
    .workflow-link-grid,
    .ops-stat-grid,
    .compact-action-grid,
    .compact-action-grid.six,
    .compact-kpi-grid,
    .compact-overview-grid,
    .compact-two-column,
    .compact-tool-row {
        grid-template-columns: 1fr;
    }

    .compact-overview-grid > :last-child {
        border-bottom: none;
    }
}

/* =========================
   MOCKUP DASHBOARD
   ========================= */

.app-page.auction-dashboard.dashboard-mock {
    max-width: 1520px;
    padding-top: 0.7rem;
    padding-bottom: 1.25rem;
}

.dashboard-mock {
    display: grid;
    gap: 0.75rem;
}

.dashboard-section,
.dashboard-tools-section,
.dashboard-protected-details {
    background: linear-gradient(180deg, rgba(27, 31, 40, 0.98), rgba(24, 28, 36, 0.98));
    border: 1px solid rgba(91, 101, 118, 0.48);
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
    padding: 1.05rem 1.2rem;
}

.dashboard-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #f6f7fb;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8cbcff;
    flex: 0 0 auto;
}

.dashboard-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-icon.is-gold {
    color: #d6a23f;
}

.dashboard-icon.is-blue {
    color: #81b3ff;
}

.dashboard-icon.is-green {
    color: #56d275;
}

.dashboard-icon.small {
    width: 1.35rem;
    height: 1.35rem;
}

.dashboard-icon.medium {
    width: 1.8rem;
    height: 1.8rem;
}

.dashboard-icon.large {
    width: 2.45rem;
    height: 2.45rem;
}

.dashboard-button-icon {
    width: 1.2rem;
    height: 1.2rem;
    color: #fff8ef;
}

.dashboard-overview {
    gap: 0.7rem;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr 0.9fr 1fr;
    gap: 0;
    border: 1px solid rgba(91, 101, 118, 0.32);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30, 36, 47, 0.85), rgba(27, 32, 41, 0.78));
}

.dashboard-overview-stat,
.dashboard-overview-action {
    min-height: 164px;
    padding: 1.2rem 1.35rem;
    border-right: 1px solid rgba(91, 101, 118, 0.28);
}

.dashboard-overview-grid > :last-child {
    border-right: none;
}

.dashboard-overview-label {
    color: #c6cedb;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-overview-title {
    margin-top: 0.9rem;
    color: #f9fbff;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.15;
}

.dashboard-overview-copy {
    margin-top: 0.75rem;
    color: #c4cad5;
    font-size: 0.93rem;
    line-height: 1.55;
}

.dashboard-overview-with-icon {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.dashboard-overview-icon {
    padding-top: 0.1rem;
}

.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.52rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: #bdddff;
    background: rgba(26, 41, 63, 0.68);
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: #56d275;
    box-shadow: 0 0 0 4px rgba(86, 210, 117, 0.16);
    flex: 0 0 auto;
}

.dashboard-overview-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
}

.dashboard-current-button {
    width: 100%;
    min-height: 4.1rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(240, 184, 66, 0.58);
    background: linear-gradient(180deg, #d8a63f, #c8932c);
    color: #fff8ef;
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dashboard-current-button:hover {
    background: linear-gradient(180deg, #e0ad47, #cf9931);
    color: #fff8ef;
}

.dashboard-current-button.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.dashboard-overview-action-copy {
    max-width: 16rem;
}

.dashboard-status-action-form {
    width: 100%;
    margin: 0;
}

.dashboard-status-action-button {
    width: 100%;
    min-height: 3.2rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(95, 168, 211, 0.44);
    background: rgba(33, 48, 67, 0.92);
    color: #d7efff;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.dashboard-status-action-button:hover {
    background: rgba(40, 58, 81, 0.98);
    border-color: rgba(118, 184, 223, 0.6);
    color: #eef9ff;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.6rem;
}

.dashboard-kpi-card {
    display: block;
    padding: 0.8rem 0.9rem 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(91, 101, 118, 0.34);
    background: linear-gradient(180deg, rgba(29, 35, 45, 0.9), rgba(24, 29, 37, 0.88));
    text-decoration: none;
}

.dashboard-kpi-card:hover {
    text-decoration: none;
    border-color: rgba(129, 179, 255, 0.42);
    background: linear-gradient(180deg, rgba(33, 41, 53, 0.94), rgba(25, 31, 40, 0.92));
}

.dashboard-kpi-head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 2.2rem;
}

.dashboard-kpi-label {
    color: #d4d9e2;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.25;
}

.dashboard-kpi-value {
    margin-top: 0.85rem;
    color: #7ab5ff;
    font-size: 2.05rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-kpi-value.is-gold {
    color: #dcb04c;
}

.dashboard-kpi-value.is-green {
    color: #59d26f;
}

.dashboard-action-grid {
    display: grid;
    gap: 0.65rem;
}

.dashboard-action-grid-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-action-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-action-card {
    min-height: 132px;
    padding: 1rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(91, 101, 118, 0.34);
    background: linear-gradient(180deg, rgba(28, 34, 43, 0.95), rgba(24, 29, 37, 0.92));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.dashboard-action-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(129, 179, 255, 0.42);
    background: linear-gradient(180deg, rgba(31, 38, 50, 0.98), rgba(26, 31, 39, 0.96));
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.dashboard-action-card-small {
    min-height: 120px;
    padding-inline: 0.8rem;
}

.dashboard-action-title {
    margin-top: 0.85rem;
    color: #f8faff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.dashboard-action-copy {
    margin-top: 0.55rem;
    color: #c8ced8;
    font-size: 0.92rem;
    line-height: 1.5;
    max-width: 12rem;
}

.dashboard-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-tools-section {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 2.1fr);
    gap: 0.8rem;
    align-items: center;
}

.dashboard-tools-copy {
    margin-top: 0.35rem;
    color: #c4cad5;
    font-size: 0.92rem;
    line-height: 1.5;
}

.dashboard-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-tool-button {
    min-height: 58px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(91, 101, 118, 0.34);
    background: linear-gradient(180deg, rgba(28, 34, 43, 0.9), rgba(24, 29, 37, 0.88));
    color: #f8faff;
    font-size: 0.98rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    text-align: center;
}

.dashboard-tool-button:hover {
    text-decoration: none;
    border-color: rgba(129, 179, 255, 0.42);
    background: linear-gradient(180deg, rgba(31, 38, 50, 0.98), rgba(26, 31, 39, 0.96));
}

.dashboard-protected-details {
    padding: 1rem 1.2rem;
}

.dashboard-protected-body {
    padding: 0;
}

.dashboard-protected-note {
    color: #c4cad5;
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
}

@media (max-width: 1360px) {
    .dashboard-action-grid-six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-action-grid-five,
    .dashboard-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dashboard-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .dashboard-overview-grid,
    .dashboard-two-column,
    .dashboard-tools-section {
        grid-template-columns: 1fr;
    }

    .dashboard-overview-stat,
    .dashboard-overview-action {
        min-height: 0;
        border-right: none;
        border-bottom: 1px solid rgba(91, 101, 118, 0.28);
    }

    .dashboard-overview-grid > :last-child {
        border-bottom: none;
    }
}

@media (max-width: 820px) {
    .dashboard-action-grid-six,
    .dashboard-action-grid-five,
    .dashboard-kpi-grid,
    .dashboard-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dashboard-action-grid-six,
    .dashboard-action-grid-five,
    .dashboard-kpi-grid,
    .dashboard-tools-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section,
    .dashboard-tools-section,
    .dashboard-protected-details {
        padding: 0.95rem 1rem;
    }

    .dashboard-protected-body {
        padding: 0;
    }
}
