/* =====================================================================
   He thong Quan ly Thu vien - CSS dung chung
   ===================================================================== */

:root {
    --qltv-primary: #2f5d8a;
    --qltv-sidebar-bg: #0a58ca;
    --qltv-sidebar-active: #2f5d8a;
    --qltv-header-height: 64px;

    /* Ghi de bien CSS bo-goc cua Bootstrap 5.3 de dong bo border-radius con 3px cho
       toan bo card/box/modal/alert/input/button... (khong dong den --bs-border-radius-pill
       vi cac badge/nut "rounded-pill" va avatar "rounded-circle" can giu nguyen hinh tron). */
    --bs-border-radius: 3px;
    --bs-border-radius-sm: 3px;
    --bs-border-radius-lg: 3px;
    --bs-border-radius-xl: 3px;
    --bs-border-radius-2xl: 3px;
}

body {
    background-color: #f4f6f9;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.trang-dang-nhap {
    background: linear-gradient(135deg, #1f2937 0%, #2f5d8a 100%);
}

.trang-dang-nhap-hinh {
    background: linear-gradient(135deg, #1f2937 0%, #2f5d8a 100%);
    position: relative;
    overflow: hidden;
}
.trang-dang-nhap-hinh::before,
.trang-dang-nhap-hinh::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.trang-dang-nhap-hinh::before { width: 420px; height: 420px; top: -120px; left: -120px; }
.trang-dang-nhap-hinh::after { width: 320px; height: 320px; bottom: -100px; right: -80px; }
.trang-dang-nhap-hinh > div { position: relative; z-index: 1; }

.letter-spacing { letter-spacing: 6px; }

/* ---- Layout chinh (sau khi dang nhap) ---- */
.qltv-wrapper { display: flex; min-height: 100vh; }

.qltv-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--qltv-sidebar-bg);
    color: #d1d5db;
    overflow: hidden;
    transition: margin-left .25s ease, width .25s ease, min-width .25s ease;
}
.qltv-sidebar .logo {
    height: var(--qltv-header-height);
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.qltv-sidebar .nav-link { color: #d1d5db; padding: .55rem 1.25rem; border-radius: 0; white-space: nowrap; }
.qltv-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.qltv-sidebar .nav-link.active { background: var(--qltv-sidebar-active); color: #fff; font-weight: 600; }
.qltv-sidebar .nav-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem .25rem;
    font-size: .72rem;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.qltv-sidebar .nav-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .15);
}

.qltv-content { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.qltv-content > main { flex: 1; }
.qltv-topbar { background: #fff; border-bottom: 1px solid #e5e7eb; height: var(--qltv-header-height); }
.qltv-footer { background: #fff; border-top: 1px solid #e5e7eb; }

@media (max-width: 991.98px) {
    .qltv-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1040; margin-left: -260px; }
    .qltv-sidebar.mo { margin-left: 0; }
}

/* Nut hamburger tren desktop (#oToggleSidebarDesktop trong topbar.php): an/hien hoan
   toan sidebar bang cach thu chieu rong ve 0 (khac co che ".mo" cua mobile o tren,
   vi tren desktop sidebar nam trong luong flex binh thuong chu khong o vi tri fixed). */
@media (min-width: 992px) {
    .qltv-sidebar.thu-gon { width: 0; min-width: 0; border: none; }
}

.card-thong-ke { border: none; border-radius: 3px; color: #fff; }
.card-thong-ke .icon { font-size: 2.2rem; opacity: .85; }

.table-responsive { border-radius: 3px; }
.badge-trang-thai { font-weight: 500; }
