body {
    background-color: #f5f7fb;
    color: #1f2937;
}

.app-body {
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: #111827;
    color: #ffffff;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    padding: 0.5rem 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    margin-bottom: 0.35rem;
    padding: 0.75rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-main {
    flex: 1;
    min-width: 0;
}

.navbar {
    min-height: 72px;
}

main {
    padding-bottom: 3rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.page-subtitle {
    color: #6b7280;
    max-width: 60rem;
    margin-bottom: 0;
}

.section-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.section-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

.section-card .card-body {
    padding: 1.25rem;
}

.section-card .card-body.p-0,
.section-card .card-body.border-bottom {
    padding: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-heading .section-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.metric-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    height: 100%;
}

.metric-card .card-body,
.metric-box {
    padding: 1.1rem 1.25rem;
}

.metric-label {
    color: #6b7280;
    font-size: 0.83rem;
    margin-bottom: 0.35rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.metric-note,
.action-note {
    color: #6b7280;
    font-size: 0.83rem;
}

.workflow-badge,
.status-badge {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.7rem;
}

.table td,
.table th {
    vertical-align: middle;
    padding: 0.85rem 1rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.card {
    border-radius: 0.85rem;
}

.table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table-responsive {
    scrollbar-width: thin;
}

.table-soft tbody tr:nth-child(even) {
    background: rgba(249, 250, 251, 0.75);
}

.empty-state {
    padding: 2.75rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

.empty-state-title {
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.empty-state-copy {
    max-width: 34rem;
    margin: 0 auto;
}

.dense-note,
.text-wrap-clean {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.quick-actions-blocked {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.form-help {
    color: #6b7280;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.sticky-action-bar {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
}

.report-section {
    break-inside: avoid;
}

.report-value {
    font-weight: 600;
}

.report-note {
    color: #6b7280;
    font-size: 0.83rem;
}

.alert {
    border-radius: 0.9rem;
}

.btn {
    border-radius: 0.7rem;
}

.btn-sm {
    border-radius: 0.6rem;
}

.btn[disabled],
.btn.disabled {
    cursor: not-allowed;
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .page-header,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-actions,
    .quick-actions {
        justify-content: stretch;
    }

    .page-header-actions > *,
    .quick-actions > * {
        flex: 1 1 auto;
    }

    .metric-value {
        font-size: 1.7rem;
    }
}

@media print {
    body {
        background: #fff !important;
        font-size: 11pt;
    }

    .app-sidebar,
    .navbar,
    .report-toolbar,
    .btn,
    .alert,
    .quick-actions,
    .page-header-actions {
        display: none !important;
    }

    .app-main,
    main {
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .section-card,
    .metric-card,
    .card {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
    }

    .report-section,
    .card,
    table,
    tr,
    td,
    th {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .table td,
    .table th {
        padding: 0.45rem 0.55rem;
    }

    .card-header {
        padding: 0.75rem 1rem !important;
    }

    .card-body {
        padding: 0.9rem 1rem !important;
    }
}
