/* === BVLOG.Web - Shared Grid & Layout Styles === */

/* === Page layout: fixed header, scrollable grid === */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100%; /* fill article area — footer is outside in MainLayout */
    overflow: hidden;
}

.page-header {
    flex-shrink: 0;
    padding-bottom: 4px;
}

.page-grid {
    flex: 1;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-height: 0;
}

/* === Page title === */
.page-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    padding: 6px 14px;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', sans-serif;
}

/* === Sticky table headers === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

    .data-table thead th {
        position: sticky;
        z-index: 5;
        padding: 6px 8px;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        border: 1px solid rgba(255,255,255,0.2);
        text-align: center;
    }

    .data-table thead tr:first-child th {
        top: 0;
    }

    .data-table thead tr:nth-child(2) th {
        top: 28px;
    }

    .data-table tbody td {
        padding: 4px 8px;
        white-space: nowrap;
        border: 1px solid #e5e7eb;
        background: white;
    }

    .data-table tbody tr:nth-child(even) td {
        background: #f8fafc;
    }

    .data-table tbody tr:nth-child(odd) td {
        background: white;
    }

    .data-table tbody tr:hover td {
        background: #e0f2fe;
    }

    /* Single-row header (Vouchers) */
    .data-table thead.single-header th {
        background: #374151;
        color: white;
        text-align: center;
        top: 0;
    }

/* === Header group colors === */
.hg-info {
    background: #3b82f6 !important;
    color: white !important;
}

.hg-init {
    background: #6b7280 !important;
    color: white !important;
}

.hg-in {
    background: #16a34a !important;
    color: white !important;
}

.hg-out {
    background: #dc2626 !important;
    color: white !important;
}

.hg-last {
    background: #1d4ed8 !important;
    color: white !important;
}

.hg-unit {
    background: #16a34a !important;
    color: white !important;
}

.hg-spec {
    background: #d97706 !important;
    color: white !important;
}

.hg-class {
    background: #7c3aed !important;
    color: white !important;
}

/* === Common cell styles === */
.n {
    text-align: right;
}

.c {
    text-align: center;
}

.bold {
    font-weight: 600;
}

.green {
    color: #16a34a;
}

.red {
    color: #dc2626;
}

.blue {
    color: #1d4ed8;
}

.empty-msg {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* === Filter bar === */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .filter-group label {
        font-size: 10px;
        font-weight: 600;
        color: #555;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.filter-input {
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.filter-disabled {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
}

/* === Stats bar === */
.stats-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    align-items: center;
    flex-shrink: 0;
}

.stats-bar-orange {
    background: #fff7ed;
    border-color: #fed7aa;
}

.stats-bar-green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* === Alert === */
.alert-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 6px;
    border: 1px solid #fecaca;
    flex-shrink: 0;
}

/* === Badges === */
.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-done {
    background: #dcfce7;
    color: #166534;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* === Footer (legacy — hidden, now in MainLayout) === */
.bv-footer {
    display: none;
}
