:root {
    --bndn-navy: #0f294a;
    --bndn-blue: #1d6fe2;
    --bndn-blue-soft: #eaf2ff;
    --bndn-green: #10b981;
    --bndn-orange: #f59e0b;
    --bndn-bg: #f4f7fb;
    --bndn-border: #e2e8f0;
    --bndn-text: #1e293b;
    --bndn-muted: #64748b;
}

body {
    background-color: var(--bndn-bg);
    color: var(--bndn-text);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    min-height: 100vh;
}

/* Navbar công khai */
.bndn-navbar {
    background: linear-gradient(135deg, var(--bndn-navy) 0%, #153e75 100%);
    box-shadow: 0 2px 12px rgba(15, 41, 74, 0.14);
}
.bndn-navbar .nav-link {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
}
.bndn-navbar .nav-link:hover,
.bndn-navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

/* Hero banner */
.bndn-hero {
    background: linear-gradient(135deg, var(--bndn-navy) 0%, var(--bndn-blue) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(15, 41, 74, 0.16);
}

/* Cards */
.card-clean {
    background: #fff;
    border: 1px solid var(--bndn-border);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 41, 74, 0.04);
}
.kpi-card {
    background: #fff;
    border: 1px solid var(--bndn-border);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 41, 74, 0.08);
}
.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.kpi-label {
    font-size: 0.8rem;
    color: var(--bndn-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bndn-navy);
    line-height: 1.25;
}

/* Lịch tháng công khai */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}
.calendar-dow {
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--bndn-navy);
    padding: 0.45rem 0;
    background: var(--bndn-blue-soft);
    border-radius: 8px;
}
.calendar-cell {
    background: #fff;
    border: 1px solid var(--bndn-border);
    border-radius: 10px;
    min-height: 92px;
    padding: 0.45rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.calendar-cell:hover {
    border-color: var(--bndn-blue);
    background: #f8fbff;
}
.calendar-cell.is-today {
    border: 2px solid var(--bndn-blue);
    background: #f0f6ff;
}
.calendar-cell.is-empty {
    background: transparent;
    border: 1px dashed #e2e8f0;
    cursor: default;
}
.calendar-pill {
    display: block;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Admin Sidebar */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: var(--bndn-navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.78);
    padding: 0.62rem 1rem;
    border-radius: 10px;
    margin: 2px 10px;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(29, 111, 226, 0.35);
    color: #fff;
    font-weight: 600;
}
.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--bndn-border);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Ma trận đăng ký cuộn ngang trên mobile với cột tên cố định */
.matrix-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--bndn-border);
    background: #fff;
}
.matrix-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.matrix-table th,
.matrix-table td {
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid var(--bndn-border);
    border-right: 1px solid #edf2f7;
    padding: 0.5rem 0.6rem;
}
.matrix-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    min-width: 185px;
    max-width: 230px;
    white-space: normal;
    box-shadow: 2px 0 6px rgba(15, 41, 74, 0.06);
}
.matrix-table thead .sticky-col {
    z-index: 8;
    background: #f8fafc;
}
.matrix-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}
.matrix-att-btn {
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 5px;
}

/* Member chips */
.member-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: var(--bndn-navy);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .admin-sidebar.desktop-only {
        display: none;
    }
    .calendar-cell {
        min-height: 70px;
        padding: 0.3rem;
    }
    .calendar-pill {
        font-size: 0.65rem;
    }
}

@media print {
    .no-print, .admin-sidebar, .admin-topbar, .bndn-navbar {
        display: none !important;
    }
    body {
        background: #fff !important;
    }
    .card-clean {
        border: none !important;
        box-shadow: none !important;
    }
}
