/* ============================================================= */
/* еБиблиотека Premium UI — Design System Override               */
/* Вчитува се ПОСЛЕ main.css и style.css                          */
/* ============================================================= */

/* ======================== CSS Variables ======================== */
:root {
    /* Premium Color Palette */
    --premium-primary: #487FFF;
    --premium-primary-rgb: 72, 127, 255;
    --premium-primary-dark: #3a6de0;
    --premium-purple: #6142FF;
    --premium-purple-rgb: 97, 66, 255;
    --premium-teal: #27CEA7;
    --premium-orange: #FF9F43;

    /* Backgrounds */
    --premium-body-bg: #F4F7FE;
    --premium-card-bg: #ffffff;
    --premium-sidebar-bg: #ffffff;

    /* Text */
    --premium-text-primary: #1B2559;
    --premium-text-secondary: #707EAE;
    --premium-text-light: #A3AED0;

    /* Borders & Radius */
    --premium-radius-sm: 8px;
    --premium-radius-md: 12px;
    --premium-radius-lg: 16px;
    --premium-radius-xl: 24px;
    --premium-radius-pill: 50px;
    --premium-border-color: #E9EDF7;

    /* Shadows */
    --premium-shadow-sm: 0 2px 8px rgba(var(--premium-primary-rgb), 0.06);
    --premium-shadow-md: 0 4px 16px rgba(var(--premium-primary-rgb), 0.1);
    --premium-shadow-lg: 0 8px 32px rgba(var(--premium-primary-rgb), 0.12);
    --premium-shadow-xl: 0 16px 48px rgba(var(--premium-primary-rgb), 0.15);
    --premium-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(var(--premium-primary-rgb), 0.06);

    /* Transitions */
    --premium-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --premium-transition-fast: all 0.15s ease;

    /* Gradients */
    --premium-gradient-primary: linear-gradient(135deg, #487FFF 0%, #6142FF 100%);
    --premium-gradient-success: linear-gradient(135deg, #22C55E 0%, #27CEA7 100%);
    --premium-gradient-danger: linear-gradient(135deg, #EA5455 0%, #FF6B6B 100%);
    --premium-gradient-warning: linear-gradient(135deg, #FF9F43 0%, #FECA57 100%);
    --premium-gradient-info: linear-gradient(135deg, #00CFE8 0%, #487FFF 100%);
    --premium-gradient-subtle: linear-gradient(135deg, #F4F7FE 0%, #EEF2FF 100%);
}

/* ======================== Global Overrides ======================== */

body {
    background-color: var(--premium-body-bg) !important;
    color: var(--premium-text-primary);
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ======================== Typography ======================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Nunito", "Roboto", sans-serif !important;
    color: var(--premium-text-primary);
    text-transform: none !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1:after, h2:after, h3:after {
    display: none !important;
}

h1, .h1 { font-weight: 800; }
h2, .h2 { font-weight: 700; }

/* ======================== Links ======================== */

a {
    color: var(--premium-primary);
    transition: var(--premium-transition-fast);
}

a:hover {
    color: var(--premium-primary-dark);
}

/* ======================== Buttons ======================== */

.btn {
    border-radius: var(--premium-radius-md) !important;
    font-family: "Nunito", "Roboto", sans-serif;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    padding: 10px 24px;
    transition: var(--premium-transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-main,
.btn-primary {
    background: var(--premium-gradient-primary) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(var(--premium-primary-rgb), 0.3);
}

.btn-main:hover,
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(var(--premium-primary-rgb), 0.4) !important;
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
}

.btn-success {
    background: var(--premium-gradient-success) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
}

.btn-danger {
    background: var(--premium-gradient-danger) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(234, 84, 85, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(234, 84, 85, 0.4) !important;
}

.btn-warning {
    background: var(--premium-gradient-warning) !important;
    border: none !important;
    color: #1B2559 !important;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4) !important;
}

.btn-info {
    background: var(--premium-gradient-info) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 207, 232, 0.3);
}

.btn-info:hover {
    box-shadow: 0 6px 20px rgba(0, 207, 232, 0.4) !important;
}

.btn-outline-main,
.btn-outline-primary {
    background: transparent !important;
    border: none !important;
    box-shadow: inset 0 0 0 2px var(--premium-primary) !important;
    color: var(--premium-primary) !important;
}

.btn-outline-main:hover,
.btn-outline-primary:hover {
    background: var(--premium-primary) !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 2px var(--premium-primary), 0 4px 12px rgba(var(--premium-primary-rgb), 0.3) !important;
}

/* Table buttons (smaller) */
table .btn,
.table .btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--premium-radius-sm) !important;
}

/* ======================== Cards ======================== */

.card {
    border-radius: var(--premium-radius-lg) !important;
    border: 1px solid var(--premium-border-color) !important;
    box-shadow: var(--premium-shadow-card);
    transition: var(--premium-transition);
    overflow: hidden;
    background: var(--premium-card-bg);
}

.card:hover {
    box-shadow: var(--premium-shadow-md);
}

.card-header {
    border-bottom: 1px solid var(--premium-border-color);
    background: transparent;
}

.card-footer {
    border-top: 1px solid var(--premium-border-color);
    background: transparent;
}

/* ======================== Forms ======================== */

.form-control,
.form-select {
    border-radius: var(--premium-radius-md) !important;
    border: 1.5px solid var(--premium-border-color);
    padding: 10px 16px;
    height: auto;
    min-height: 44px;
    font-size: 14px;
    color: var(--premium-text-primary);
    background-color: #FAFBFF;
    transition: var(--premium-transition);
}

/* Preserve left padding for icon-prefixed inputs (early declaration) */
.form-control.ps-40 {
    padding-left: 40px !important;
    padding-inline-start: 40px !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--premium-primary) !important;
    box-shadow: 0 0 0 4px rgba(var(--premium-primary-rgb), 0.1) !important;
    background-color: #fff;
}

.form-control::placeholder {
    color: var(--premium-text-light);
}

.form-label {
    font-family: "Nunito", sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--premium-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-check-input:checked {
    background-color: var(--premium-primary);
    border-color: var(--premium-primary);
}

/* ======================== Tables — Modern Separated Rows ======================== */

.table {
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
}

.table > :not(caption) > * > * {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: none !important;
    border-top: none !important;
}

.table thead th {
    background-color: rgba(72, 127, 255, 0.04) !important;
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--premium-text-secondary) !important;
    border-bottom: 2px solid rgba(72, 127, 255, 0.08) !important;
    white-space: nowrap;
    padding: 12px 16px;
}

.table thead tr:first-child th:first-child {
    border-top-left-radius: var(--premium-radius-md);
}

.table thead tr:first-child th:last-child {
    border-top-right-radius: var(--premium-radius-md);
}

.table tbody tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.table tbody tr:hover {
    background-color: rgba(72, 127, 255, 0.02) !important;
}

.table tbody td {
    border: none !important;
    background: inherit;
}

.table tbody td:first-child {
    border-radius: 12px 0 0 12px !important;
}

.table tbody td:last-child {
    border-radius: 0 12px 12px 0 !important;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Table responsive wrapper */
.table-responsive {
    border-radius: var(--premium-radius-lg);
    overflow: hidden;
}

/* ======================== Pagination ======================== */

.page-item .page-link {
    border: none;
    color: var(--premium-text-secondary);
    border-radius: var(--premium-radius-sm) !important;
    margin: 0 2px;
    padding: 8px 14px;
    font-weight: 600;
    transition: var(--premium-transition-fast);
}

.page-item .page-link:hover {
    background-color: rgba(var(--premium-primary-rgb), 0.1);
    color: var(--premium-primary);
}

.page-item.active .page-link {
    background: var(--premium-gradient-primary) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(var(--premium-primary-rgb), 0.3);
}

.page-item:first-child .page-link {
    border-top-left-radius: var(--premium-radius-sm) !important;
    border-bottom-left-radius: var(--premium-radius-sm) !important;
}

.page-item:last-child .page-link {
    border-top-right-radius: var(--premium-radius-sm) !important;
    border-bottom-right-radius: var(--premium-radius-sm) !important;
}

/* ======================== Badges ======================== */

.badge {
    border-radius: var(--premium-radius-pill);
    font-weight: 600;
    font-size: 12px;
    padding: 5px 12px;
    letter-spacing: 0.02em;
}

/* ======================== Modals — Gradient Header ======================== */

.modal-content {
    border-radius: var(--premium-radius-xl) !important;
    border: none !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 10px 24px rgba(72, 127, 255, 0.1);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 100%) !important;
    border-bottom: none !important;
    padding: 20px 24px !important;
}

.modal-header .modal-title,
.modal-header h2,
.modal-header h5 {
    color: #fff !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--premium-border-color);
    padding: 16px 24px;
    background: #FAFBFF;
}

.modal-footer .btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ======================== Alerts ======================== */

.alert {
    border-radius: var(--premium-radius-md);
    border: none;
    font-weight: 500;
}

.alert-info {
    background-color: rgba(var(--premium-primary-rgb), 0.08);
    color: var(--premium-primary);
}

/* ======================== Dropdowns ======================== */

.dropdown-menu {
    border-radius: var(--premium-radius-lg) !important;
    border: 1px solid var(--premium-border-color);
    box-shadow: var(--premium-shadow-lg);
    padding: 8px;
}

.dropdown-menu.show {
    animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown inner card — subtle entrance */
.dropdown-menu.show .card {
    animation: dropdownCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownCardIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification dropdown — larger, with subtle backdrop */
.dropdown-menu--lg {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.97) !important;
}

.dropdown-item {
    border-radius: var(--premium-radius-sm);
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
    background-color: rgba(var(--premium-primary-rgb), 0.06);
    color: var(--premium-primary);
    transform: translateX(2px);
}

/* Profile dropdown — smaller text */
.dropdown-menu--lg .card-body h4 {
    font-size: 15px !important;
    font-weight: 700 !important;
}

.dropdown-menu--lg .card-body .text-13 {
    font-size: 12px !important;
}

.dropdown-menu--lg .card-body ul a {
    font-size: 13px !important;
    padding: 10px 16px !important;
    text-transform: none !important;
}

.dropdown-menu--lg .card-body ul a .text-2xl {
    font-size: 18px !important;
}

.dropdown-menu--lg .card-body ul a .text {
    text-transform: none !important;
}

/* Language/profile dropdown toggle buttons — smooth icon rotation */
.dropdown-btn,
[data-bs-toggle="dropdown"] {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dropdown-btn:hover,
[data-bs-toggle="dropdown"]:hover {
    transform: translateY(-1px);
}

/* Notification items inside dropdown — staggered feel */
.dropdown-menu .card {
    transition: all 0.2s ease;
}

/* Auth page language dropdown (login page) */
.auth-right .dropdown-menu {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.auth-right .dropdown-menu.show {
    animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ======================== List Groups ======================== */

.list-group {
    border-radius: var(--premium-radius-lg) !important;
    overflow: hidden;
}

.list-group-item {
    border-color: var(--premium-border-color);
    padding: 14px 20px;
    transition: var(--premium-transition-fast);
}

.list-group-item:hover {
    background-color: #F8FAFF;
}

/* ======================== Premium Breadcrumbs ======================== */

.breadcrumb-with-buttons {
    position: relative;
}

.breadcrumb-with-buttons .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

/* ======================== Page Heading ======================== */

.page-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    margin: 8px 0 0 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.page-heading__sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--premium-text-secondary, #707EAE);
    margin-top: 2px;
    letter-spacing: 0;
}

.breadcrumb-with-buttons .breadcrumb ul {
    background: linear-gradient(135deg, rgba(var(--premium-primary-rgb), 0.04) 0%, rgba(var(--premium-primary-rgb), 0.01) 100%);
    padding: 10px 20px;
    border-radius: var(--premium-radius-pill);
    border: 1px solid rgba(var(--premium-primary-rgb), 0.08);
    transition: var(--premium-transition-fast);
}

.breadcrumb-with-buttons .breadcrumb ul:hover {
    border-color: rgba(var(--premium-primary-rgb), 0.15);
    box-shadow: 0 2px 8px rgba(var(--premium-primary-rgb), 0.06);
}

.breadcrumb-with-buttons .breadcrumb ul li a {
    color: var(--premium-text-secondary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.25s ease;
}

.breadcrumb-with-buttons .breadcrumb ul li a:hover {
    color: var(--premium-primary);
}

.breadcrumb-with-buttons .breadcrumb ul li span[class*="text-gray-500"] {
    color: var(--premium-text-light) !important;
    font-size: 12px;
}

.breadcrumb-with-buttons .breadcrumb ul li:last-child span {
    color: var(--premium-primary) !important;
    font-weight: 600;
    font-size: 14px;
}

/* Multi-level breadcrumb: intermediate links */
.breadcrumb-with-buttons .breadcrumb ul li a[class*="text-gray-200"] {
    color: var(--premium-text-secondary) !important;
}

.breadcrumb-with-buttons .breadcrumb ul li a[class*="text-gray-200"]:hover {
    color: var(--premium-primary) !important;
}

/* ======================== Premium Top Action Buttons ======================== */

.breadcrumb-with-buttons > .flex-align {
    gap: 10px;
}

.breadcrumb-with-buttons .btn.rounded-pill {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumb-with-buttons .btn.btn-main.rounded-pill {
    background: var(--premium-gradient-primary) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(var(--premium-primary-rgb), 0.3);
}

.breadcrumb-with-buttons .btn.btn-main.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--premium-primary-rgb), 0.4);
}

.breadcrumb-with-buttons .btn.btn-main.rounded-pill:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--premium-primary-rgb), 0.25);
}

.breadcrumb-with-buttons .btn.btn-outline-main.rounded-pill {
    background: rgba(var(--premium-primary-rgb), 0.06) !important;
    color: var(--premium-primary) !important;
    border: 1px solid rgba(var(--premium-primary-rgb), 0.15) !important;
    box-shadow: 0 1px 4px rgba(var(--premium-primary-rgb), 0.06);
}

.breadcrumb-with-buttons .btn.btn-outline-main.rounded-pill:hover {
    background: rgba(var(--premium-primary-rgb), 0.12) !important;
    border-color: rgba(var(--premium-primary-rgb), 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(var(--premium-primary-rgb), 0.15);
}

.breadcrumb-with-buttons .btn.btn-outline-main.rounded-pill:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(var(--premium-primary-rgb), 0.08);
}

.breadcrumb-with-buttons .btn .ph {
    font-size: 18px;
}

/* Breadcrumb item legacy fallback */
.breadcrumb-item a {
    color: var(--premium-text-secondary);
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--premium-text-primary);
    font-weight: 600;
}

/* ======================== Scrollbar ======================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D5DBE7;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A3AED0;
}

/* ======================== Login / Auth — Animated Gradient ======================== */

section.auth {
    overflow-x: hidden;
    max-width: 100vw;
}

.auth-left {
    background: linear-gradient(-45deg, #487FFF, #6142FF, #27CEA7, #487FFF) !important;
    background-size: 400% 400% !important;
    animation: authGradientShift 12s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes authGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating geometric shapes */
.auth-left::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: rgba(255, 255, 255, 0.07);
    animation: authBlobFloat 8s ease-in-out infinite;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 200px;
    height: 200px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: rgba(255, 255, 255, 0.05);
    animation: authBlobFloat 6s ease-in-out infinite reverse;
}

@keyframes authBlobFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(5deg); }
    66% { transform: translate(-10px, 15px) rotate(-3deg); }
}

.auth-left img {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    animation: premiumFloatSoft 4s ease-in-out infinite;
}

.auth-right {
    background: #fff;
    position: relative;
}

.auth-right__inner {
    max-width: 420px !important;
}

.auth-right h2 {
    font-size: 28px !important;
    font-weight: 800 !important;
    padding-bottom: 0 !important;
    margin-bottom: 8px !important;
}

.auth-right h2:after {
    display: none !important;
}

.auth-right .auth-right__logo {
    max-width: none !important;
    margin: 0 auto !important;
    border-bottom: none !important;
    padding: 10px 0 !important;
}

.auth-right .auth-right__logo img {
    max-height: 60px;
    margin: 0 auto;
    display: block;
}

/* Login button — glow effect */
.auth-right .btn-main,
.auth-right .btn-primary {
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 20px rgba(72, 127, 255, 0.35) !important;
}

.auth-right .btn-main:hover,
.auth-right .btn-primary:hover {
    box-shadow: 0 8px 32px rgba(72, 127, 255, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* ======================== Sidebar Premium — DARK THEME ======================== */

.sidebar {
    background: linear-gradient(180deg, #1B2559 0%, #111C44 100%) !important;
    border-right: none !important;
    box-shadow: 4px 0 24px rgba(17, 28, 68, 0.3);
}

/* Sidebar logo — white island */
.sidebar__logo {
    padding: 20px 16px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}

.sidebar__logo img {
    max-height: 45px;
    transition: var(--premium-transition);
    filter: brightness(0) invert(1);
}

.sidebar__logo .text-logo p,
.sidebar__logo .text-logo {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar close button (mobile) */
.sidebar-close-btn {
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-close-btn:hover {
    color: #fff !important;
    background: var(--premium-primary) !important;
    border-color: var(--premium-primary) !important;
}

/* Sidebar scrollbar — dark theme */
.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Menu links — light text on dark */
.sidebar-menu__link {
    border-radius: var(--premium-radius-md) !important;
    padding: 11px 16px !important;
    font-weight: 500;
    transition: var(--premium-transition) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    margin-bottom: 2px;
}

.sidebar-menu__link:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    transform: translateX(2px);
}

.sidebar-menu__link .icon {
    font-size: 20px !important;
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--premium-transition);
    color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu__link:hover .icon {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-menu__link .text {
    color: inherit !important;
}

/* Active state — gradient highlight */
.sidebar-menu__item.activePage .sidebar-menu__link {
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(72, 127, 255, 0.4);
    font-weight: 600;
}

.sidebar-menu__item.activePage .sidebar-menu__link .icon {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-menu__item:has(.sidebar-submenu__item.activePage) .sidebar-menu__link {
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(72, 127, 255, 0.4);
}

/* Section separators — subtle on dark */
.sidebar-menu__item .text-gray-300.text-sm,
.sidebar-menu__item span.text-sm.text-uppercase {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 10px !important;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.28) !important;
    padding-top: 20px !important;
    margin-top: 8px;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Sidebar bottom CTA box — glass on dark */
.sidebar .bg-main-50,
.sidebar .p-20.pt-20.mb-50 .bg-main-50 {
    background: linear-gradient(135deg, rgba(72, 127, 255, 0.12) 0%, rgba(97, 66, 255, 0.12) 100%) !important;
    border-radius: var(--premium-radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar .bg-main-50 h5,
.sidebar .bg-main-50 p,
.sidebar .p-20.pt-20.mb-50 h5,
.sidebar .p-20.pt-20.mb-50 p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.sidebar .bg-main-50 .btn-main,
.sidebar .p-20.pt-20.mb-50 .btn-main {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    backdrop-filter: blur(8px);
}

.sidebar .bg-main-50 .btn-main:hover,
.sidebar .p-20.pt-20.mb-50 .btn-main:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Certificate icon in CTA box */
.sidebar .border-primary-50,
.sidebar .translate-n74 {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Sidebar submenu links */
.sidebar-submenu__link {
    color: rgba(255, 255, 255, 0.45) !important;
}

.sidebar-submenu__link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-submenu__item.activePage .sidebar-submenu__link {
    color: #fff !important;
}

/* ======================== Top Navbar — Glassmorphism ======================== */

.top-navbar {
    padding: 10px 24px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(72, 127, 255, 0.06) !important;
    border-radius: 0 0 16px 16px;
    margin: 0 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-navbar .dropdown-btn,
.top-navbar .toggle-btn {
    border-radius: var(--premium-radius-md) !important;
    transition: var(--premium-transition);
    width: 42px !important;
    height: 42px !important;
    align-items: center;
    justify-content: center;
    background: rgba(72, 127, 255, 0.06) !important;
}

.top-navbar .dropdown-btn:hover,
.top-navbar .toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.12);
    background: rgba(72, 127, 255, 0.1) !important;
}

/* User profile button in navbar */
.top-navbar .users.arrow-down-icon {
    border-radius: var(--premium-radius-pill) !important;
    border: 2px solid rgba(72, 127, 255, 0.15) !important;
    transition: var(--premium-transition);
    background: rgba(72, 127, 255, 0.03) !important;
}

.top-navbar .users.arrow-down-icon:hover {
    border-color: var(--premium-primary) !important;
    box-shadow: 0 4px 16px rgba(72, 127, 255, 0.15);
}

.top-navbar .users.arrow-down-icon img {
    width: 36px !important;
    height: 36px !important;
    border: 2px solid rgba(72, 127, 255, 0.1);
}

/* Navbar notification icon hover glow */
.top-navbar .notification-dropdown .dropdown-btn:hover {
    background: rgba(72, 127, 255, 0.12) !important;
}

/* Navbar alarm count */
.alarm-notify {
    background: linear-gradient(135deg, #EA5455 0%, #FF6B6B 100%) !important;
    box-shadow: 0 2px 8px rgba(234, 84, 85, 0.4);
}

/* ======================== Dashboard Body ======================== */

.dashboard-body {
    padding: 24px !important;
}

/* ======================== Stat Cards ======================== */

.card.bg-main-600,
.card.bg-primary-600 {
    background: var(--premium-gradient-primary) !important;
    border: none !important;
}

/* ======================== Footer — Ultra Premium ======================== */

.dashboard-footer {
    position: relative;
    background: linear-gradient(180deg, rgba(248,250,255,0) 0%, rgba(248,250,255,0.6) 100%) !important;
    border-top: none !important;
    padding: 0 24px 20px !important;
    margin-top: 32px !important;
}

/* Gradient divider line at top */
.dashboard-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(72,127,255,0.08) 15%,
        rgba(72,127,255,0.18) 35%,
        rgba(97,66,255,0.18) 50%,
        rgba(39,206,167,0.18) 65%,
        rgba(39,206,167,0.08) 85%,
        transparent 100%);
}

.dashboard-footer .flex-between {
    padding-top: 20px;
    align-items: center;
}

/* Copyright text */
.dashboard-footer p.text-gray-300 {
    color: #A3AED0 !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0.1px;
    line-height: 1.6;
    margin: 0;
}

/* "еБиблиотека" brand name in footer */
.dashboard-footer p.text-gray-300 .text-main {
    background: linear-gradient(135deg, #487FFF 0%, #27CEA7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

/* "Овозможено од" italic text */
.dashboard-footer p.text-gray-300 em {
    font-style: normal;
    opacity: 0.7;
}

/* Social Icons Container */
.dashboard-footer .social-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Individual social icon links */
.dashboard-footer .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(72,127,255,0.06);
    color: #707EAE;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

.dashboard-footer .social-icons a:hover {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(72,127,255,0.3);
    border-color: transparent;
}

.dashboard-footer .social-icons a:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(72,127,255,0.2);
}

footer {
    background-color: transparent !important;
    border-top: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* ======================== Class Cards (Legacy — removed, see Classes Page section below) ======================== */

/* ======================== Book Info Card ======================== */

.card.book-info {
    border-radius: var(--premium-radius-lg) !important;
    border: none !important;
    box-shadow: var(--premium-shadow-md);
}

.card.book-info .cover {
    border-radius: var(--premium-radius-lg) var(--premium-radius-lg) 0 0;
    overflow: hidden;
}

/* ======================== Suggestions Dropdown ======================== */

/* ---- Autocomplete Suggestions Dropdown ---- */
.ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1060;
    background: #fff;
    border: 1px solid var(--premium-border-color);
    border-radius: var(--premium-radius-md);
    box-shadow: var(--premium-shadow-lg);
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--premium-primary-rgb), 0.2) transparent;
}
.ac-dropdown::-webkit-scrollbar { width: 5px; }
.ac-dropdown::-webkit-scrollbar-thumb { background: rgba(var(--premium-primary-rgb), 0.2); border-radius: 10px; }
.ac-dropdown::-webkit-scrollbar-track { background: transparent; }

.ac-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--premium-radius-sm);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-size: 13.5px;
    color: #1B2559;
    line-height: 1.35;
}
.ac-dropdown__item:hover,
.ac-dropdown__item--active {
    background: rgba(var(--premium-primary-rgb), 0.07);
}
.ac-dropdown__item:active {
    transform: scale(0.985);
}
.ac-dropdown__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    color: #fff;
}
.ac-dropdown__icon--book {
    background: linear-gradient(135deg, #487FFF, #6142FF);
}
.ac-dropdown__icon--user {
    background: linear-gradient(135deg, #27CEA7, #15803d);
}
.ac-dropdown__text {
    flex: 1;
    min-width: 0;
}
.ac-dropdown__title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-dropdown__sub {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-dropdown__empty {
    padding: 16px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.ac-dropdown__empty i {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}
.ac-dropdown__loading {
    padding: 14px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.ac-dropdown__loading .ac-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(var(--premium-primary-rgb), 0.2);
    border-top-color: var(--premium-primary);
    border-radius: 50%;
    animation: acSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes acSpin { to { transform: rotate(360deg); } }

/* ======================== Box / Container ======================== */

.box {
    background-color: var(--premium-card-bg);
    padding: 20px;
    border-radius: var(--premium-radius-lg);
    box-shadow: var(--premium-shadow-card);
}

/* ======================== Notification Dropdown ======================== */

.notification-dropdown .card {
    border-radius: var(--premium-radius-lg) !important;
    box-shadow: var(--premium-shadow-xl) !important;
}

.notification-dropdown .bg-main-600 {
    background: var(--premium-gradient-primary) !important;
    border-radius: var(--premium-radius-lg) var(--premium-radius-lg) 0 0;
}

/* ======================== Premium Utility Classes ======================== */

.premium-card {
    background: var(--premium-card-bg);
    border-radius: var(--premium-radius-lg);
    border: 1px solid var(--premium-border-color);
    box-shadow: var(--premium-shadow-card);
    transition: var(--premium-transition);
}

.premium-card:hover {
    box-shadow: var(--premium-shadow-md);
    transform: translateY(-2px);
}

.premium-shadow {
    box-shadow: var(--premium-shadow-md);
}

.premium-shadow-lg {
    box-shadow: var(--premium-shadow-lg);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.gradient-primary {
    background: var(--premium-gradient-primary);
}

.gradient-text {
    background: var(--premium-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: var(--premium-transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--premium-shadow-lg);
}

/* ======================== Top Lists (Rankings) ======================== */

.top-list {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
}

.top-list:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(72, 127, 255, 0.08) !important;
    border-color: rgba(72, 127, 255, 0.1) !important;
}

/* Rank number badges */
.top-list .icon.d-flex.w-44.h-44.fw-bold,
.top-list .w-44.h-44.rounded-circle.flex-center.fw-bold {
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.3);
}

/* Loan count badges */
.top-list .bg-teal-50.text-teal-600,
.top-list .bg-main-50.text-main-600 {
    background: rgba(72, 127, 255, 0.08) !important;
    color: var(--premium-primary) !important;
    font-weight: 700 !important;
}

/* ======================== ULTRA PREMIUM — Dashboard Book/Loan Cards ======================== */

/* --- Section Container --- */
.dashboard-section {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.dashboard-section > .card-body {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 24px rgba(0, 0, 0, 0.03) !important;
    padding: 28px !important;
    border: 1px solid rgba(72, 127, 255, 0.05) !important;
}

/* --- Section Header --- */
.dashboard-section .section-header {
    margin-bottom: 24px !important;
}

.dashboard-section .section-header h4 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--premium-text-primary) !important;
    position: relative !important;
    padding-left: 16px !important;
    margin-bottom: 0 !important;
}

.dashboard-section .section-header h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(180deg, #487FFF 0%, #27CEA7 100%);
}

/* --- Individual Card --- */
.dashboard-item-card {
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(72, 127, 255, 0.06) !important;
    padding: 20px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    animation: dashCardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #487FFF, #6142FF, #27CEA7);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px 16px 0 0;
}

.dashboard-item-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 48px rgba(72, 127, 255, 0.1),
                0 8px 16px rgba(0, 0, 0, 0.03),
                0 0 0 1px rgba(72, 127, 255, 0.12) !important;
}

.dashboard-item-card:hover::before {
    opacity: 1;
}

/* Stagger animation */
.dashboard-section .row > div:nth-child(1) .dashboard-item-card { animation-delay: 0s; }
.dashboard-section .row > div:nth-child(2) .dashboard-item-card { animation-delay: 0.07s; }
.dashboard-section .row > div:nth-child(3) .dashboard-item-card { animation-delay: 0.14s; }
.dashboard-section .row > div:nth-child(4) .dashboard-item-card { animation-delay: 0.21s; }

@keyframes dashCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Book Cover --- */
.dashboard-item-card .flex-shrink-0 {
    width: 85px !important;
    height: 115px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dashboard-item-card:hover .flex-shrink-0 {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transform: scale(1.04) rotate(-1deg);
}

.dashboard-item-card .flex-shrink-0 img {
    border: none !important;
    border-radius: 12px !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dashboard-item-card:hover .flex-shrink-0 img {
    transform: scale(1.08) !important;
}

/* --- Genre Badge (solid gradient — book cards) --- */
.dashboard-item-card .d-inline-block.rounded-pill.bg-success-50 {
    background: linear-gradient(135deg, #27CEA7 0%, #22C55E 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 4px 12px !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(39, 206, 167, 0.3) !important;
}

/* --- Status Badge: Returned (loan cards) --- */
.dashboard-item-card .d-inline-flex.bg-success-50.text-success-600 {
    background: linear-gradient(135deg, rgba(39, 206, 167, 0.15) 0%, rgba(34, 197, 94, 0.15) 100%) !important;
    color: #0b9444 !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
}

/* --- Status Badge: Borrowed (loan cards) --- */
.dashboard-item-card .d-inline-flex.bg-warning-50.text-warning-600 {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.15) 0%, rgba(254, 202, 87, 0.15) 100%) !important;
    color: #d48806 !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
}

/* --- Title --- */
.dashboard-item-card h6 {
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

.dashboard-item-card h6 a {
    color: var(--premium-text-primary) !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
}

.dashboard-item-card h6 a:hover {
    color: var(--premium-primary) !important;
}

/* --- Author --- */
.dashboard-item-card p.text-13 {
    color: var(--premium-text-light) !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
}

/* --- Footer (ISBN + Date) — Gradient Separator --- */
.dashboard-item-card .d-flex.border-top.border-gray-100 {
    border-top: none !important;
    position: relative !important;
    padding-top: 10px !important;
    margin-top: 10px !important;
}

.dashboard-item-card .d-flex.border-top.border-gray-100::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(72, 127, 255, 0.12) 20%, rgba(72, 127, 255, 0.12) 80%, transparent 100%);
}

.dashboard-item-card .text-gray-400.text-12 i {
    font-size: 14px !important;
    color: var(--premium-primary) !important;
    opacity: 0.5;
}

.dashboard-item-card .text-danger-600.text-12 {
    font-weight: 600 !important;
}

.dashboard-item-card .text-danger-600.text-12 i {
    opacity: 0.7;
}

/* --- User Avatar (Loan cards) --- */
.dashboard-item-card .w-24.h-24.rounded-circle {
    width: 28px !important;
    height: 28px !important;
    border: 2px solid rgba(72, 127, 255, 0.15) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.dashboard-item-card:hover .w-24.h-24.rounded-circle {
    border-color: rgba(72, 127, 255, 0.35) !important;
    box-shadow: 0 3px 10px rgba(72, 127, 255, 0.12) !important;
}

.dashboard-item-card .fw-medium.text-gray-700 {
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* ======================== Quick Actions Panel ======================== */

.quick-actions {
    margin-top: 24px;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(72, 127, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: quickActionSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(72, 127, 255, 0.04) 0%, rgba(39, 206, 167, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.35s;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(72, 127, 255, 0.12);
    border-color: rgba(72, 127, 255, 0.12);
}

.quick-action-card:hover::before {
    opacity: 1;
}

.quick-action-card__icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    transition: all 0.35s;
}

.quick-action-card:hover .quick-action-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.quick-action-card__icon--blue {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.3);
}

.quick-action-card__icon--green {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    box-shadow: 0 4px 12px rgba(39, 206, 167, 0.3);
}

.quick-action-card__icon--purple {
    background: linear-gradient(135deg, #6142FF, #A855F7);
    box-shadow: 0 4px 12px rgba(97, 66, 255, 0.3);
}

.quick-action-card__icon--orange {
    background: linear-gradient(135deg, #FF9F43, #FECA57);
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
}

.quick-action-card__text h6 {
    font-size: 14px;
    font-weight: 700;
    color: #1B2559;
    margin-bottom: 2px;
}

.quick-action-card__text span {
    font-size: 12px;
    color: #A3AED0;
}

@keyframes quickActionSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-actions .col-sm-6:nth-child(1) .quick-action-card { animation-delay: 0s; }
.quick-actions .col-sm-6:nth-child(2) .quick-action-card { animation-delay: 0.08s; }
.quick-actions .col-sm-6:nth-child(3) .quick-action-card { animation-delay: 0.16s; }
.quick-actions .col-sm-6:nth-child(4) .quick-action-card { animation-delay: 0.24s; }

/* ======================== Empty States — Premium ======================== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state__icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(72, 127, 255, 0.08) 0%, rgba(39, 206, 167, 0.08) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #A3AED0;
    margin-bottom: 20px;
    animation: emptyStateFloat 3s ease-in-out infinite;
}

@keyframes emptyStateFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.empty-state__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 8px;
}

.empty-state__text {
    font-size: 13px;
    color: #A3AED0;
    margin-bottom: 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ======================== Top Lists — Premium Redesign ======================== */

.top-list {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(72, 127, 255, 0.06) !important;
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%) !important;
}

.top-list:hover {
    transform: translateX(6px) !important;
    box-shadow: 0 4px 16px rgba(72, 127, 255, 0.1) !important;
    border-color: rgba(72, 127, 255, 0.12) !important;
}

/* Rank Badges — Gold, Silver, Bronze for Top 3 */
.top-list .rank-badge {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 800 !important;
    font-size: 16px !important;
    transition: all 0.3s;
}

.top-list:nth-child(1) .rank-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35) !important;
}

.top-list:nth-child(2) .rank-badge {
    background: linear-gradient(135deg, #C0C0C0 0%, #9CA3AF 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.35) !important;
}

.top-list:nth-child(3) .rank-badge {
    background: linear-gradient(135deg, #CD7F32 0%, #B45309 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.35) !important;
}

.top-list:nth-child(n+4) .rank-badge {
    background: rgba(72, 127, 255, 0.08) !important;
    color: #487FFF !important;
    box-shadow: none !important;
}

/* Loan count pill hover effect */
.top-list .rounded-pill {
    font-weight: 700 !important;
    transition: all 0.3s !important;
}

.top-list:hover .rounded-pill.bg-teal-50,
.top-list:hover .rounded-pill.bg-main-50 {
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.25) !important;
}

/* ======================== Greeting Date Subtitle ======================== */

.greeting-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 8px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.greeting-date i {
    font-size: 14px;
    margin-right: 4px;
    opacity: 0.7;
}

/* ======================== Chart Cards — Enhanced ======================== */

.card-header h4,
.card-header h5 {
    font-weight: 700 !important;
    font-size: 16px !important;
}

.card-header .w-8.h-8.rounded-circle {
    width: 10px !important;
    height: 10px !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* ======================== Class Cards — Gradient Top Border (Legacy — removed) ======================== */

/* ======================== Forms — Enhanced ======================== */

.form-control,
.form-select {
    border: 1.5px solid var(--premium-border-color) !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 12px 16px !important;
    font-size: 14px;
    min-height: 46px;
    background-color: #FAFBFF !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Preserve left padding for icon-prefixed inputs */
.form-control.ps-40 {
    padding-left: 40px !important;
    padding-inline-start: 40px !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--premium-primary) !important;
    box-shadow: 0 0 0 4px rgba(72, 127, 255, 0.1) !important;
    background-color: #fff !important;
}

.form-label {
    font-weight: 600 !important;
    color: var(--premium-text-primary) !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
}

/* ======================== Page Load Animation ======================== */

.main-content {
    animation: pageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-body {
    animation: pageSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card stagger animation */
.row > [class*="col-"]:nth-child(1) > .card { animation-delay: 0s; }
.row > [class*="col-"]:nth-child(2) > .card { animation-delay: 0.05s; }
.row > [class*="col-"]:nth-child(3) > .card { animation-delay: 0.1s; }
.row > [class*="col-"]:nth-child(4) > .card { animation-delay: 0.15s; }

.row > [class*="col-"] > .card {
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================== Animations ======================== */

@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-20px, -20px);
    }
}

@keyframes premiumPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ======================== Responsive Premium ======================== */

@media (max-width: 1199px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar.active,
    .sidebar.show {
        transform: translateX(0) !important;
    }

    .top-navbar {
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 768px) {
    .dashboard-body {
        padding: 16px !important;
    }

    .top-navbar {
        padding: 10px 16px !important;
    }

    .modal-content {
        border-radius: var(--premium-radius-lg) !important;
        margin: 8px;
    }

    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.3rem; }

    .grettings-box-two__content h2 {
        font-size: 20px !important;
    }

    /* Disable hover lift on mobile */
    .col-sm-6 > .card:hover,
    .col-6 > .card:hover {
        transform: none;
    }

    .card h4.mb-2 {
        font-size: 22px !important;
    }
}

/* ======================== Print Overrides ======================== */

@media print {
    body {
        background: #fff !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .btn {
        box-shadow: none !important;
    }
}

/* ======================== Color Overrides for Legacy ======================== */

span.primary-color {
    color: var(--premium-primary) !important;
}

.text-main-600 {
    color: var(--premium-primary) !important;
}

.bg-main-600 {
    background-color: var(--premium-primary) !important;
}

.bg-main-50 {
    background-color: rgba(var(--premium-primary-rgb), 0.06) !important;
}

/* Badge overrides */
.list-group-item h5 .badge.rounded-pill,
.popular-book .badge.rounded-pill {
    background: var(--premium-gradient-primary) !important;
    border-radius: var(--premium-radius-pill) !important;
}

/* Activation badge (green dot) */
.activation-badge {
    background: var(--premium-teal) !important;
    border: 2px solid #fff;
    border-radius: 50%;
}

/* ======================== Dashboard Greeting Box — Gradient Hero ======================== */

/* Parent card of greeting box — remove white bg/border */
.card:has(.grettings-box-two) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
}

.grettings-box-two {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 50%, #27CEA7 100%) !important;
    border-radius: var(--premium-radius-xl) !important;
    overflow: hidden;
    position: relative;
    border: none !important;
    box-shadow: none !important;
}

/* Floating decorative circles */
.grettings-box-two::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.grettings-box-two::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 30%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.grettings-box-two .card-body {
    background: transparent !important;
}

.grettings-box-two__content {
    padding: 36px 32px !important;
}

.grettings-box-two__content h2 {
    font-weight: 800 !important;
    color: #fff !important;
    font-size: 26px !important;
}

.grettings-box-two__content p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.grettings-box-two__content .btn-main {
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.grettings-box-two__content .btn-main:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Greeting illustration — subtle float animation */
.grettings-box-two img:not(.position-absolute) {
    animation: premiumFloatSoft 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

@keyframes premiumFloatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* SA greeting box override */
.grettings-box {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 50%, #27CEA7 100%) !important;
    border-radius: var(--premium-radius-xl) !important;
    position: relative;
    border: none !important;
}

.grettings-box::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

/* ======================== Dashboard Stat Cards — Gradient Icons ======================== */

.card .flex-shrink-0.w-48.h-48.flex-center {
    width: 54px !important;
    height: 54px !important;
    font-size: 24px;
    border-radius: 14px !important;
}

.card .flex-shrink-0.w-48.h-48.flex-center.rounded-circle {
    border-radius: 14px !important;
}

/* Blue gradient — Books / Библиотеки */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-main-600 {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 100%) !important;
    box-shadow: 0 6px 16px rgba(72, 127, 255, 0.35);
}

/* Teal gradient — Users / Ученици */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-main-two-600 {
    background: linear-gradient(135deg, #27CEA7 0%, #22C55E 100%) !important;
    box-shadow: 0 6px 16px rgba(39, 206, 167, 0.35);
}

/* Purple gradient — Loans / Позајмици */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-purple-600 {
    background: linear-gradient(135deg, #6142FF 0%, #A855F7 100%) !important;
    box-shadow: 0 6px 16px rgba(97, 66, 255, 0.35);
}

/* Orange gradient — Classes / Одделенија */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-warning-600 {
    background: linear-gradient(135deg, #FF9F43 0%, #FECA57 100%) !important;
    box-shadow: 0 6px 16px rgba(255, 159, 67, 0.35);
}

/* Danger gradient — Expired */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-danger-600 {
    background: linear-gradient(135deg, #EA5455 0%, #FF6B6B 100%) !important;
    box-shadow: 0 6px 16px rgba(234, 84, 85, 0.35);
}

/* Teal/Money gradient */
.card .flex-shrink-0.w-48.h-48.flex-center.bg-teal-600 {
    background: linear-gradient(135deg, #27CEA7 0%, #00CFE8 100%) !important;
    box-shadow: 0 6px 16px rgba(39, 206, 167, 0.35);
}

/* Stat card value (number) */
.card h4.mb-2 {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--premium-text-primary);
}

/* Stat card label */
/* Stat card labels only — not inside dropdowns */
.dashboard-body .card .text-gray-300 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--premium-text-light) !important;
}

/* Reset for dropdown menu items that have text-gray-300 */
.dropdown-menu .card .text-gray-300 {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: inherit !important;
}

/* Stat cards hover lift */
.col-sm-6 > .card,
.col-6 > .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.col-sm-6 > .card:hover,
.col-6 > .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(72, 127, 255, 0.12) !important;
}

/* ======================== Chart Card Enhancements ======================== */

/* Allow chart tooltips to overflow card boundaries */
.card:has(.apexcharts-canvas) {
    overflow: visible !important;
}

.tooltip-style {
    border-radius: var(--premium-radius-md);
}

/* ======================== SweetAlert2 Premium ======================== */

.swal2-popup {
    border-radius: var(--premium-radius-xl) !important;
    font-family: "Nunito", "Roboto", sans-serif !important;
}

.swal2-title {
    font-family: "Nunito", "Roboto", sans-serif !important;
    font-weight: 700 !important;
    color: var(--premium-text-primary) !important;
}

.swal2-confirm {
    background: var(--premium-gradient-primary) !important;
    border-radius: var(--premium-radius-md) !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(var(--premium-primary-rgb), 0.3) !important;
}

.swal2-cancel {
    border-radius: var(--premium-radius-md) !important;
    font-weight: 600 !important;
}

/* ======================== Select2 Premium ======================== */

.select2-container--default .select2-selection--single {
    border-radius: var(--premium-radius-md) !important;
    border: 1.5px solid var(--premium-border-color) !important;
    height: 44px !important;
    padding: 6px 12px;
    background-color: #FAFBFF;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--premium-primary) !important;
    box-shadow: 0 0 0 4px rgba(var(--premium-primary-rgb), 0.1);
}

.select2-dropdown {
    border-radius: var(--premium-radius-md) !important;
    border: 1px solid var(--premium-border-color) !important;
    box-shadow: var(--premium-shadow-lg);
}

.select2-results__option--highlighted {
    background-color: rgba(var(--premium-primary-rgb), 0.08) !important;
    color: var(--premium-primary) !important;
}

.select2-results__option--selected {
    background-color: rgba(var(--premium-primary-rgb), 0.12) !important;
}

/* ======================== File Upload Premium ======================== */

.file-upload .upload-area {
    border-radius: var(--premium-radius-lg);
    border: 2px dashed var(--premium-border-color);
    background: var(--premium-gradient-subtle);
    transition: var(--premium-transition);
}

.file-upload .upload-area:hover {
    border-color: var(--premium-primary);
    background: rgba(var(--premium-primary-rgb), 0.04);
}

/* ======================== Toast / Notification ======================== */

.toast {
    border-radius: var(--premium-radius-md) !important;
    box-shadow: var(--premium-shadow-lg);
    border: none;
}

/* ======================== Tabs Premium ======================== */

.nav-tabs {
    border-bottom: 2px solid var(--premium-border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--premium-text-secondary);
    font-weight: 600;
    padding: 12px 20px;
    position: relative;
    transition: var(--premium-transition);
}

.nav-tabs .nav-link.active {
    color: var(--premium-primary);
    background: transparent;
    border: none;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--premium-gradient-primary);
    border-radius: 3px 3px 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--premium-primary);
}

/* ======================== Preloader Premium ======================== */

.preloader {
    background: var(--premium-body-bg) !important;
}

.loader {
    border-color: rgba(var(--premium-primary-rgb), 0.15) !important;
    border-top-color: var(--premium-primary) !important;
}

/* ======================== Loans Page — Premium Redesign ======================== */

/* --- Stat Cards Grid --- */
.loans-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.loans-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(72,127,255,0.06);
    border: 1px solid rgba(72,127,255,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dashCardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loans-stat-card:nth-child(1) { animation-delay: 0s; }
.loans-stat-card:nth-child(2) { animation-delay: 0.07s; }
.loans-stat-card:nth-child(3) { animation-delay: 0.14s; }
.loans-stat-card:nth-child(4) { animation-delay: 0.21s; }

.loans-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(72,127,255,0.12);
}

.loans-stat-card__icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    transition: all 0.3s;
}

.loans-stat-card:hover .loans-stat-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.loans-stat-card__icon--total {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72,127,255,0.3);
}

.loans-stat-card__icon--active {
    background: linear-gradient(135deg, #FF9F43, #FECA57);
    box-shadow: 0 4px 12px rgba(255,159,67,0.3);
}

.loans-stat-card__icon--returned {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

.loans-stat-card__icon--overdue {
    background: linear-gradient(135deg, #EA5455, #FF6B6B);
    box-shadow: 0 4px 12px rgba(234,84,85,0.3);
}

.loans-stat-card__info h4 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #1B2559 !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.loans-stat-card__info span {
    font-size: 12px;
    color: #A3AED0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* --- Book Cover / Avatar --- */
.loan-book-avatar {
    width: 40px;
    height: 52px;
    min-width: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    font-family: "Nunito", sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.loan-book-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- User Profile Image / Avatar --- */
.loan-user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    font-family: "Nunito", sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
}

.loan-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Book Info (title + ISBN underneath) --- */
.loan-book-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.loan-book-info .loan-book-isbn {
    font-size: 11px;
    color: #A3AED0;
    font-weight: 500;
}

/* --- Cell Text (dates, class) --- */
.loan-cell-text {
    font-size: 14px;
    font-weight: 500;
    color: #8893a7;
    white-space: nowrap;
}

.loan-cell-text--overdue {
    color: #EA5455;
    font-weight: 700;
}

/* --- Overdue Row Accent --- */
.loan-row--overdue {
    background: linear-gradient(90deg, rgba(234,84,85,0.05) 0%, transparent 100%) !important;
}

.loan-row--overdue:hover {
    background: linear-gradient(90deg, rgba(234,84,85,0.08) 0%, rgba(234,84,85,0.02) 100%) !important;
}

.loan-row--overdue td:first-child {
    position: relative;
}

.loan-row--overdue td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: linear-gradient(180deg, #EA5455, #FF6B6B);
    border-radius: 0 3px 3px 0;
}

/* --- Status Badges with Animated Dot --- */
.loan-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.loan-status-badge--active {
    background: linear-gradient(135deg, rgba(255,159,67,0.12) 0%, rgba(254,202,87,0.12) 100%);
    color: #d48806;
}

.loan-status-badge--returned {
    background: linear-gradient(135deg, rgba(39,206,167,0.12) 0%, rgba(34,197,94,0.12) 100%);
    color: #0b9444;
}

.loan-status-badge--overdue {
    background: linear-gradient(135deg, rgba(234,84,85,0.12) 0%, rgba(255,107,107,0.12) 100%);
    color: #EA5455;
}

.loan-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.loan-status-dot--active {
    background: #FF9F43;
    animation: loanDotPulseOrange 2s ease-in-out infinite;
}

.loan-status-dot--returned {
    background: #22C55E;
}

.loan-status-dot--overdue {
    background: #EA5455;
    animation: loanDotPulseRed 1.5s ease-in-out infinite;
}

@keyframes loanDotPulseOrange {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,159,67,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(255,159,67,0.2); }
}

@keyframes loanDotPulseRed {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(234,84,85,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(234,84,85,0.2); }
}

/* --- Action Buttons --- */
.loan-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.loan-action-btn--return {
    color: #22C55E;
    background: rgba(34,197,94,0.08);
}

.loan-action-btn--return:hover {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

.loan-action-btn--view {
    color: #487FFF;
    background: rgba(72,127,255,0.08);
}

.loan-action-btn--view:hover {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72,127,255,0.3);
}

/* --- Loans Empty State --- */
.loans-empty-state {
    text-align: center;
    padding: 60px 24px;
}

.loans-empty-state__icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(72,127,255,0.08) 0%, rgba(39,206,167,0.08) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #A3AED0;
    margin-bottom: 20px;
    animation: emptyStateFloat 3s ease-in-out infinite;
}

.loans-empty-state__title {
    font-size: 16px;
    font-weight: 700;
    color: #1B2559;
    margin-bottom: 8px;
}

.loans-empty-state__text {
    font-size: 13px;
    color: #A3AED0;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Filter Card --- */
.loans-filter-card {
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 2px 8px rgba(72,127,255,0.04) !important;
}

.loans-filter-card .card-body {
    padding: 16px 20px !important;
}

/* --- Premium Pagination --- */
.premium-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-pagination .page-item {
    margin: 0;
}

ul.premium-pagination .page-item .page-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1.5px solid transparent !important;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    line-height: 1;
}

ul.premium-pagination .page-item .page-link:hover {
    background: rgba(72,127,255,0.06);
    border-color: rgba(72,127,255,0.15) !important;
    color: var(--premium-primary);
}

ul.premium-pagination .page-item .page-link:focus {
    box-shadow: none;
}

ul.premium-pagination .page-item.active .page-link {
    background: var(--premium-gradient-primary) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(72,127,255,0.25);
}

ul.premium-pagination .page-item:first-child .page-link,
ul.premium-pagination .page-item:last-child .page-link {
    font-size: 18px;
    background: rgba(72,127,255,0.04);
    border-color: rgba(72,127,255,0.1) !important;
}

ul.premium-pagination .page-item:first-child .page-link:hover,
ul.premium-pagination .page-item:last-child .page-link:hover {
    background: rgba(72,127,255,0.1);
    border-color: rgba(72,127,255,0.2) !important;
    color: var(--premium-primary);
}

ul.premium-pagination .page-item.disabled .page-link {
    color: #D5DBE7;
    background: transparent;
    border-color: transparent !important;
    cursor: default;
    opacity: 0.5;
}

/* Pagination info text */
.pagination-info {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.pagination-info strong {
    color: var(--premium-text-primary);
    font-weight: 700;
}

/* --- Loans Responsive --- */
@media (max-width: 991px) {
    .loans-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .loans-stats {
        grid-template-columns: 1fr;
    }

    .loan-book-avatar {
        display: none;
    }

    .loan-user-avatar {
        display: none;
    }
}


/* ============================================================================
   GENERIC PAGE COMPONENTS — Reusable across all table pages
   (Aliases of loan-specific classes for unified design system)
   ============================================================================ */

/* --- Page Stats Grid --- */
.page-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(72,127,255,0.06);
    border: 1px solid rgba(72,127,255,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dashCardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.07s; }
.stat-card:nth-child(3) { animation-delay: 0.14s; }
.stat-card:nth-child(4) { animation-delay: 0.21s; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(72,127,255,0.12);
}

.stat-card__icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    transition: all 0.3s;
}

.stat-card:hover .stat-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-card__icon--blue {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72,127,255,0.3);
}

.stat-card__icon--green {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

.stat-card__icon--orange {
    background: linear-gradient(135deg, #FF9F43, #FECA57);
    box-shadow: 0 4px 12px rgba(255,159,67,0.3);
}

.stat-card__icon--red {
    background: linear-gradient(135deg, #EA5455, #FF6B6B);
    box-shadow: 0 4px 12px rgba(234,84,85,0.3);
}

.stat-card__icon--purple {
    background: linear-gradient(135deg, #6142FF, #A855F7);
    box-shadow: 0 4px 12px rgba(97,66,255,0.3);
}

.stat-card__icon--teal {
    background: linear-gradient(135deg, #27CEA7, #00CFE8);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

.stat-card__info h4 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #1B2559 !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.stat-card__info span {
    font-size: 12px;
    color: #A3AED0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* --- Filter Card --- */
.filter-card {
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 2px 8px rgba(72,127,255,0.04) !important;
}

.filter-card .card-body {
    padding: 16px 20px !important;
}

/* --- Item Avatar (Book Cover) --- */
.item-avatar {
    width: 40px;
    height: 52px;
    min-width: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-avatar--placeholder {
    background: linear-gradient(145deg, #EEF2FF 0%, #C7D2FE 100%);
    color: #6366F1;
    font-size: 20px;
    border: none;
    box-shadow: 0 3px 12px rgba(99,102,241,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
    position: relative;
    overflow: visible;
}

.item-avatar--placeholder::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 7px;
    border: 1.5px solid rgba(99,102,241,0.18);
    pointer-events: none;
}

.item-avatar--placeholder i {
    filter: drop-shadow(0 2px 4px rgba(99,102,241,0.3));
}

/* Large placeholder for hero/detail views */
.cover-placeholder-lg {
    background: linear-gradient(145deg, #EEF2FF 0%, #C7D2FE 100%);
    color: #6366F1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.7);
    position: relative;
}

.cover-placeholder-lg::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid rgba(99,102,241,0.18);
    pointer-events: none;
}

.cover-placeholder-lg i {
    font-size: 48px;
    filter: drop-shadow(0 3px 6px rgba(99,102,241,0.3));
}

/* --- Book Placeholder (emerald variant) --- */
.item-avatar--placeholder-book {
    background: linear-gradient(145deg, #ECFDF5 0%, #A7F3D0 100%);
    color: #059669;
    font-size: 20px;
    border: none;
    box-shadow: 0 3px 12px rgba(5,150,105,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
    position: relative;
    overflow: visible;
}

.item-avatar--placeholder-book::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 7px;
    border: 1.5px solid rgba(5,150,105,0.18);
    pointer-events: none;
}

.item-avatar--placeholder-book i {
    filter: drop-shadow(0 2px 4px rgba(5,150,105,0.3));
}

/* Large book placeholder for hero/detail views */
.cover-placeholder-lg-book {
    background: linear-gradient(145deg, #ECFDF5 0%, #A7F3D0 100%);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 280px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(5,150,105,0.12), inset 0 1px 2px rgba(255,255,255,0.7);
    position: relative;
}

.cover-placeholder-lg-book::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid rgba(5,150,105,0.18);
    pointer-events: none;
}

.cover-placeholder-lg-book i {
    font-size: 56px;
    filter: drop-shadow(0 3px 6px rgba(5,150,105,0.3));
}

/* Medium book placeholder for dashboard cards */
.cover-placeholder-md-book {
    background: linear-gradient(145deg, #ECFDF5 0%, #A7F3D0 100%);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    position: relative;
    font-size: 28px;
}

.cover-placeholder-md-book::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1.5px solid rgba(5,150,105,0.18);
    pointer-events: none;
}

.cover-placeholder-md-book i {
    filter: drop-shadow(0 2px 4px rgba(5,150,105,0.3));
}

/* --- User Avatar Small --- */
.user-avatar-sm {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ======================== User Avatar Placeholder ======================== */
/* Base */
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.avatar-placeholder::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.08);
    pointer-events: none;
}

.avatar-placeholder i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

/* Sizes */
.avatar-placeholder--xs { width: 24px; height: 24px; font-size: 13px; }
.avatar-placeholder--sm { width: 32px; height: 32px; font-size: 16px; }
.avatar-placeholder--md { width: 40px; height: 40px; font-size: 19px; }
.avatar-placeholder--lg {
    width: 80px; height: 80px; font-size: 32px;
    border: 3px solid #fff;
}
.avatar-placeholder--xl {
    width: 120px; height: 120px; font-size: 48px;
    border: 5px solid #fff;
}

/* Role: Admin (red/rose) */
.avatar-placeholder--admin {
    background: linear-gradient(145deg, #FFF1F2 0%, #FECDD3 100%);
    color: #E11D48;
    box-shadow: 0 3px 12px rgba(225,29,72,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
}
.avatar-placeholder--admin::before { border-color: rgba(225,29,72,0.18); }
.avatar-placeholder--admin i { filter: drop-shadow(0 2px 4px rgba(225,29,72,0.3)); }

/* Role: Librarian (teal) */
.avatar-placeholder--librarian {
    background: linear-gradient(145deg, #ECFEFF 0%, #A5F3FC 100%);
    color: #0891B2;
    box-shadow: 0 3px 12px rgba(8,145,178,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
}
.avatar-placeholder--librarian::before { border-color: rgba(8,145,178,0.18); }
.avatar-placeholder--librarian i { filter: drop-shadow(0 2px 4px rgba(8,145,178,0.3)); }

/* Role: Teacher (amber) */
.avatar-placeholder--teacher {
    background: linear-gradient(145deg, #FFF7ED 0%, #FED7AA 100%);
    color: #EA580C;
    box-shadow: 0 3px 12px rgba(234,88,12,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
}
.avatar-placeholder--teacher::before { border-color: rgba(234,88,12,0.18); }
.avatar-placeholder--teacher i { filter: drop-shadow(0 2px 4px rgba(234,88,12,0.3)); }

/* Role: Student (blue) */
.avatar-placeholder--student {
    background: linear-gradient(145deg, #EFF6FF 0%, #BFDBFE 100%);
    color: #2563EB;
    box-shadow: 0 3px 12px rgba(37,99,235,0.15), inset 0 1px 2px rgba(255,255,255,0.7);
}
.avatar-placeholder--student::before { border-color: rgba(37,99,235,0.18); }
.avatar-placeholder--student i { filter: drop-shadow(0 2px 4px rgba(37,99,235,0.3)); }

/* Context: Student Card (class_teacher, classes/view) */
.student-card-premium__body .avatar-placeholder {
    margin-bottom: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.student-card-premium:hover .student-card-premium__body .avatar-placeholder {
    transform: scale(1.05);
}

/* Context: Profile Hero */
.premium-profile-hero__avatar .avatar-placeholder {
    box-shadow: 0 8px 32px rgba(72,127,255,0.25), 0 0 0 3px rgba(72,127,255,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.premium-profile-hero__avatar .avatar-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(72,127,255,0.35), 0 0 0 4px rgba(72,127,255,0.18);
}

/* Context: Class Card Teacher */
.class-card__teacher-avatar-wrap .avatar-placeholder {
    width: 42px;
    height: 42px;
    font-size: 17px;
    border: 2.5px solid var(--grade-color, #487FFF);
    padding: 2px;
}

/* --- Cell Text --- */
.cell-text {
    font-size: 14px;
    font-weight: 500;
    color: #8893a7;
    white-space: nowrap;
}

.cell-text--danger {
    color: #EA5455;
    font-weight: 700;
}

.cell-text--success {
    color: #22C55E;
    font-weight: 600;
}

/* --- Status Badge --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge--success {
    background: linear-gradient(135deg, rgba(39,206,167,0.12) 0%, rgba(34,197,94,0.12) 100%);
    color: #0b9444;
}

.status-badge--warning {
    background: linear-gradient(135deg, rgba(255,159,67,0.12) 0%, rgba(254,202,87,0.12) 100%);
    color: #d48806;
}

.status-badge--danger {
    background: linear-gradient(135deg, rgba(234,84,85,0.12) 0%, rgba(255,107,107,0.12) 100%);
    color: #EA5455;
}

.status-badge--info {
    background: linear-gradient(135deg, rgba(72,127,255,0.12) 0%, rgba(97,66,255,0.12) 100%);
    color: #487FFF;
}

.status-badge--purple {
    background: linear-gradient(135deg, rgba(97,66,255,0.12) 0%, rgba(168,85,247,0.12) 100%);
    color: #6142FF;
}

.status-badge--dark {
    background: linear-gradient(135deg, rgba(30,30,30,0.08) 0%, rgba(60,60,60,0.08) 100%);
    color: #555;
}

/* --- Status Dot --- */
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot--success {
    background: #22C55E;
}

.status-dot--warning {
    background: #FF9F43;
    animation: loanDotPulseOrange 2s ease-in-out infinite;
}

.status-dot--danger {
    background: #EA5455;
    animation: loanDotPulseRed 1.5s ease-in-out infinite;
}

.status-dot--info {
    background: #487FFF;
}

/* --- Action Buttons --- */
.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.action-btn--view {
    color: #487FFF;
    background: rgba(72,127,255,0.08);
}

.action-btn--view:hover {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72,127,255,0.3);
}

.action-btn--edit {
    color: #27CEA7;
    background: rgba(39,206,167,0.08);
}

.action-btn--edit:hover {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

.action-btn--delete {
    color: #EA5455;
    background: rgba(234,84,85,0.08);
}

.action-btn--delete:hover {
    background: linear-gradient(135deg, #EA5455, #FF6B6B);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234,84,85,0.3);
}

.action-btn--download {
    color: #487FFF;
    background: rgba(72,127,255,0.08);
}

.action-btn--download:hover {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72,127,255,0.3);
}

.action-btn--qr {
    color: #6142FF;
    background: rgba(97,66,255,0.08);
}

.action-btn--qr:hover {
    background: linear-gradient(135deg, #6142FF, #A855F7);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(97,66,255,0.3);
}

.action-btn--copy {
    color: #00CFE8;
    background: rgba(0,207,232,0.08);
}

.action-btn--copy:hover {
    background: linear-gradient(135deg, #00CFE8, #27CEA7);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,207,232,0.3);
}

.action-btn--return {
    color: #22C55E;
    background: rgba(34,197,94,0.08);
}

.action-btn--return:hover {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,206,167,0.3);
}

/* --- Page Empty State --- */
.page-empty-state {
    text-align: center;
    padding: 60px 24px;
}

.page-empty-state__icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(72,127,255,0.08) 0%, rgba(39,206,167,0.08) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #A3AED0;
    margin-bottom: 20px;
    animation: emptyStateFloat 3s ease-in-out infinite;
}

.page-empty-state__title {
    font-size: 16px;
    font-weight: 700;
    color: #1B2559;
    margin-bottom: 8px;
}

.page-empty-state__text {
    font-size: 13px;
    color: #A3AED0;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Generic Responsive --- */
@media (max-width: 991px) {
    .page-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .page-stats {
        grid-template-columns: 1fr;
    }

    .item-avatar,
    .user-avatar-sm {
        display: none;
    }
}

/* ======================== Premium Modal Overrides ======================== */
/* Input fields: ensure text doesn't overlap with left icons */
.premium-modal__input.form-control {
    padding-left: 46px !important;
    padding-inline-start: 46px !important;
}

/* Cancel button: make it clearly visible and readable */
.premium-modal__btn-cancel.btn {
    color: #1B2559 !important;
    background: #fff !important;
    background-color: #fff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    padding: 9px 20px !important;
    font-size: 14px !important;
    min-height: auto !important;
}

.premium-modal__btn-cancel.btn:hover {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1B2559 !important;
}

/* Submit button override to keep gradient */
.premium-modal__btn-submit.btn {
    background: linear-gradient(135deg, #487FFF 0%, #6142FF 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(72, 127, 255, 0.3) !important;
    padding: 9px 24px !important;
    font-size: 14px !important;
    min-height: auto !important;
}

.premium-modal__btn-submit.btn:hover {
    box-shadow: 0 6px 20px rgba(72, 127, 255, 0.4) !important;
    color: #fff !important;
}

/* Return button override */
.premium-modal__btn-return.btn {
    background: linear-gradient(135deg, #27CEA7 0%, #1ba97f 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(39, 206, 167, 0.3) !important;
    padding: 9px 24px !important;
    font-size: 14px !important;
    min-height: auto !important;
}

.premium-modal__btn-return.btn:hover {
    box-shadow: 0 6px 20px rgba(39, 206, 167, 0.4) !important;
    color: #fff !important;
}

/* ======================== Classes Page — Premium Redesign ======================== */

/* --- Section Headers --- */
.classes-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
}

.classes-section-header__accent {
    width: 4px;
    height: 28px;
    border-radius: 2px;
    background: var(--premium-gradient-primary);
    flex-shrink: 0;
}

.classes-section-header--district .classes-section-header__accent {
    background: linear-gradient(135deg, #FF9F43, #FECA57);
}

.classes-section-header__content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.classes-section-header__content h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1B2559;
    display: flex;
    align-items: center;
    gap: 8px;
}

.classes-section-header__content h5 i {
    font-size: 20px;
    color: #487FFF;
}

.classes-section-header--district .classes-section-header__content h5 i {
    color: #FF9F43;
}

.classes-section-header__count {
    font-size: 12px;
    font-weight: 600;
    color: #A3AED0;
    background: rgba(72, 127, 255, 0.06);
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

/* --- Class Card — Ultra Premium --- */
.class-card {
    --grade-color: #487FFF;
    --grade-gradient: linear-gradient(135deg, #487FFF, #6142FF);
    --grade-shadow: rgba(72,127,255,0.18);
    --grade-bg: rgba(72,127,255,0.03);
    border-radius: 20px !important;
    border: 1px solid rgba(233, 237, 247, 0.8) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 8px 24px rgba(72,127,255,0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, var(--grade-bg) 100%) !important;
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Decorative gradient blob */
.class-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--grade-gradient);
    opacity: 0.06;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

/* Gradient top accent */
.class-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grade-gradient);
    border-radius: 20px 20px 0 0;
    transition: height 0.3s ease;
    z-index: 1;
}

.class-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px var(--grade-shadow), 0 8px 20px rgba(0,0,0,0.04);
    border-color: transparent !important;
}

.class-card:hover::before {
    width: 160px;
    height: 160px;
    opacity: 0.10;
    top: -50px;
    right: -50px;
}

.class-card:hover::after {
    height: 4px;
}

/* Stagger animation delays */
.row > div:nth-child(4n+1) > .class-card { animation-delay: 0s; }
.row > div:nth-child(4n+2) > .class-card { animation-delay: 0.06s; }
.row > div:nth-child(4n+3) > .class-card { animation-delay: 0.12s; }
.row > div:nth-child(4n+4) > .class-card { animation-delay: 0.18s; }

/* Card Header */
.class-card__header {
    padding: 24px 24px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.class-card__grade-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.class-card__grade-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: var(--grade-gradient);
    box-shadow: 0 4px 14px var(--grade-shadow);
    flex-shrink: 0;
}

.class-card__grade {
    font-family: "Nunito", sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--grade-color);
    letter-spacing: -0.02em;
}

.class-card__badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.class-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.class-card__badge--students {
    background: linear-gradient(135deg, rgba(72,127,255,0.08), rgba(97,66,255,0.08));
    color: var(--grade-color);
    box-shadow: 0 2px 8px rgba(72,127,255,0.06);
}

.class-card__badge--students i {
    font-size: 14px;
}

.class-card__badge--combined {
    background: linear-gradient(135deg, rgba(255,159,67,0.12), rgba(254,202,87,0.12));
    color: #e68a00;
    padding: 5px 8px;
    box-shadow: 0 2px 8px rgba(255,159,67,0.08);
}

/* Gradient Divider */
.class-card__divider {
    height: 1px;
    margin: 0 24px;
    background: linear-gradient(90deg, transparent, #E9EDF7 30%, #E9EDF7 70%, transparent);
}

/* Card Body */
.class-card__body {
    padding: 14px 24px 18px;
    position: relative;
    z-index: 1;
}

.class-card__teacher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.class-card__teacher-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.class-card__teacher-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--grade-color);
    padding: 2px;
}

.class-card__teacher-status {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22C55E;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.2);
}

.class-card__teacher-avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ECF1F9, #E2E8F0);
    color: #A3AED0;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px dashed #D0D5DD;
}

.class-card__teacher-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    line-height: 1.3;
}

.class-card__teacher-name:hover {
    color: var(--grade-color);
}

.class-card__teacher-role {
    font-size: 11.5px;
    color: #A3AED0;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
    margin-top: 2px;
}

.class-card__teacher-role i {
    font-size: 12px;
}

.class-card__teacher--empty {
    opacity: 0.55;
}

.class-card__teacher--empty .class-card__teacher-name {
    color: #A3AED0;
    font-weight: 600;
}

/* Card Footer */
.class-card__footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(233, 237, 247, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, transparent, rgba(248,250,255,0.8));
}

.class-card__action {
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: "Nunito", sans-serif;
    text-decoration: none;
}

.class-card__action--view {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--grade-color);
    background: linear-gradient(135deg, rgba(72,127,255,0.06), rgba(97,66,255,0.06));
}

.class-card__action--view:hover {
    background: var(--grade-gradient);
    color: #fff;
    box-shadow: 0 6px 20px var(--grade-shadow);
    transform: translateY(-2px);
}

.class-card__action--edit,
.class-card__action--delete {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.class-card__action--edit {
    background: rgba(39, 206, 167, 0.08);
    color: #27CEA7;
}

.class-card__action--edit:hover {
    background: linear-gradient(135deg, #27CEA7, #22C55E);
    color: #fff;
    box-shadow: 0 6px 20px rgba(39,206,167,0.3);
    transform: translateY(-2px);
}

.class-card__action--delete {
    background: rgba(234, 84, 85, 0.08);
    color: #EA5455;
}

.class-card__action--delete:hover {
    background: linear-gradient(135deg, #EA5455, #FF6B6B);
    color: #fff;
    box-shadow: 0 6px 20px rgba(234,84,85,0.3);
    transform: translateY(-2px);
}

/* --- Grade Color Variants (CSS Custom Properties) --- */
.class-card--grade-1 { --grade-color: #ff6e84; --grade-gradient: linear-gradient(135deg, #ff6e84, #ff9eb0); --grade-shadow: rgba(255,110,132,0.18); --grade-bg: rgba(255,110,132,0.03); }
.class-card--grade-2 { --grade-color: #e68a00; --grade-gradient: linear-gradient(135deg, #FF9F43, #FECA57); --grade-shadow: rgba(255,159,67,0.18); --grade-bg: rgba(255,159,67,0.03); }
.class-card--grade-3 { --grade-color: #6142FF; --grade-gradient: linear-gradient(135deg, #6142FF, #A855F7); --grade-shadow: rgba(97,66,255,0.18); --grade-bg: rgba(97,66,255,0.03); }
.class-card--grade-4 { --grade-color: #16a34a; --grade-gradient: linear-gradient(135deg, #22C55E, #4ADE80); --grade-shadow: rgba(34,197,94,0.18); --grade-bg: rgba(34,197,94,0.03); }
.class-card--grade-5 { --grade-color: #EA5455; --grade-gradient: linear-gradient(135deg, #EA5455, #FF6B6B); --grade-shadow: rgba(234,84,85,0.18); --grade-bg: rgba(234,84,85,0.03); }
.class-card--grade-6 { --grade-color: #3B82F6; --grade-gradient: linear-gradient(135deg, #3B82F6, #60A5FA); --grade-shadow: rgba(59,130,246,0.18); --grade-bg: rgba(59,130,246,0.03); }
.class-card--grade-7 { --grade-color: #27CEA7; --grade-gradient: linear-gradient(135deg, #27CEA7, #22C55E); --grade-shadow: rgba(39,206,167,0.18); --grade-bg: rgba(39,206,167,0.03); }
.class-card--grade-8 { --grade-color: #14b8a6; --grade-gradient: linear-gradient(135deg, #14b8a6, #2dd4bf); --grade-shadow: rgba(20,184,166,0.18); --grade-bg: rgba(20,184,166,0.03); }
.class-card--grade-9 { --grade-color: #487FFF; --grade-gradient: linear-gradient(135deg, #487FFF, #6142FF); --grade-shadow: rgba(72,127,255,0.18); --grade-bg: rgba(72,127,255,0.03); }

/* --- Section Divider --- */
.classes-section {
    margin-bottom: 32px;
}

.classes-section:last-child {
    margin-bottom: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .class-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 8px 24px rgba(72,127,255,0.05);
    }

    .class-card__grade {
        font-size: 22px;
    }

    .class-card__grade-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 10px;
    }

    .class-card__header,
    .class-card__footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .class-card__divider {
        margin: 0 20px;
    }

    .class-card__body {
        padding: 12px 20px 16px;
    }

    .classes-section-header__content h5 {
        font-size: 14px;
    }
}

/* ======================== Class View — Info Header ======================== */
.class-info-header {
    background: linear-gradient(145deg, #ffffff, rgba(72,127,255,0.03));
    border-radius: 20px;
    border: 1px solid rgba(233, 237, 247, 0.8);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 8px 24px rgba(72,127,255,0.05);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.class-info-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #487FFF, #6142FF, #27CEA7);
    border-radius: 20px 20px 0 0;
}

.class-info-header__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 14px rgba(72,127,255,0.3);
    flex-shrink: 0;
}

.class-info-header__content {
    flex: 1;
}

.class-info-header__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 6px;
    font-family: "Nunito", sans-serif;
}

.class-info-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.class-info-header__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #A3AED0;
    font-weight: 600;
}

.class-info-header__meta-item i {
    font-size: 16px;
    color: #487FFF;
}

/* ======================== Student Cards — Ultra Premium ======================== */
.student-card-premium {
    border-radius: 20px !important;
    border: 1px solid rgba(233, 237, 247, 0.8) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 8px 24px rgba(72,127,255,0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, rgba(72,127,255,0.02) 100%) !important;
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    text-align: center;
}

.student-card-premium::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #487FFF, #27CEA7);
    opacity: 0.05;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

.student-card-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #487FFF, #6142FF, #27CEA7);
    border-radius: 20px 20px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.student-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(72,127,255,0.15), 0 8px 20px rgba(0,0,0,0.04);
    border-color: transparent !important;
}

.student-card-premium:hover::before {
    width: 140px;
    height: 140px;
    opacity: 0.08;
}

.student-card-premium:hover::after {
    opacity: 1;
}

.student-card-premium__body {
    padding: 28px 20px 22px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.student-card-premium__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(72,127,255,0.15);
    margin-bottom: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.student-card-premium:hover .student-card-premium__avatar {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(72,127,255,0.2);
}

.student-card-premium__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
    transition: color 0.2s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-card-premium__name:hover {
    color: #487FFF;
}

.student-card-premium__username {
    font-size: 12px;
    color: #A3AED0;
    margin-bottom: 14px;
}

.student-card-premium__stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.student-card-premium__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.student-card-premium__stat--total {
    background: linear-gradient(135deg, rgba(72,127,255,0.08), rgba(97,66,255,0.06));
    color: #487FFF;
}

.student-card-premium__stat--active {
    background: linear-gradient(135deg, rgba(39,206,167,0.08), rgba(34,197,94,0.06));
    color: #27CEA7;
}

.student-card-premium__stat i {
    font-size: 14px;
}

.student-card-premium__grade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(97,66,255,0.08), rgba(168,85,247,0.06));
    color: #6142FF;
    margin-bottom: 14px;
}

.student-card-premium__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #487FFF;
    background: linear-gradient(135deg, rgba(72,127,255,0.06), rgba(97,66,255,0.06));
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: "Nunito", sans-serif;
    border: none;
    width: 100%;
}

.student-card-premium__btn:hover {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    color: #fff;
    box-shadow: 0 6px 20px rgba(72,127,255,0.25);
    transform: translateY(-2px);
}

/* Stagger delays for 5-column grid */
.student-grid .col:nth-child(5n+1) .student-card-premium { animation-delay: 0s; }
.student-grid .col:nth-child(5n+2) .student-card-premium { animation-delay: 0.05s; }
.student-grid .col:nth-child(5n+3) .student-card-premium { animation-delay: 0.10s; }
.student-grid .col:nth-child(5n+4) .student-card-premium { animation-delay: 0.15s; }
.student-grid .col:nth-child(5n+5) .student-card-premium { animation-delay: 0.20s; }

@media (max-width: 768px) {
    .class-info-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .class-info-header__meta {
        justify-content: center;
    }
    .student-card-premium:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 8px 24px rgba(72,127,255,0.05);
    }
}

/* ======================== Stats Page — Premium Redesign ======================== */

/* Chart card header */
.stats-chart-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stats-chart-card__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: all 0.3s;
}

.stats-chart-card:hover .stats-chart-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.stats-chart-card__icon--books {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72,127,255,0.25);
}

.stats-chart-card__icon--users {
    background: linear-gradient(135deg, #22C55E, #27CEA7);
    box-shadow: 0 4px 12px rgba(39,206,167,0.25);
}

.stats-chart-card__header h5 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--premium-text-primary) !important;
    margin-bottom: 0 !important;
}

.stats-chart-card__subtitle {
    font-size: 12px;
    color: #A3AED0;
    font-weight: 500;
    margin-top: 2px;
    display: block;
}

/* Top list section header */
.stats-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-section-header__icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
}

.stats-section-header__icon--books {
    background: linear-gradient(135deg, #27CEA7, #00CFE8);
    box-shadow: 0 4px 12px rgba(39,206,167,0.25);
}

.stats-section-header__icon--users {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72,127,255,0.25);
}

.stats-section-header__title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--premium-text-primary) !important;
    margin-bottom: 0 !important;
}

.stats-section-header__link {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.stats-section-header__link:hover {
    transform: translateX(2px);
}

/* Stagger animation for top-list items */
.top-list:nth-child(1) { animation: dashCardSlideIn 0.4s 0.05s both; }
.top-list:nth-child(2) { animation: dashCardSlideIn 0.4s 0.1s both; }
.top-list:nth-child(3) { animation: dashCardSlideIn 0.4s 0.15s both; }
.top-list:nth-child(4) { animation: dashCardSlideIn 0.4s 0.2s both; }
.top-list:nth-child(5) { animation: dashCardSlideIn 0.4s 0.25s both; }

/* ======================== Settings Page — Premium Redesign ======================== */

/* Settings page header */
.settings-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    animation: dashCardSlideIn 0.5s both;
}

.settings-page-header__icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 16px rgba(72,127,255,0.3);
}

.settings-page-header__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 2px;
}

.settings-page-header__subtitle {
    font-size: 13px;
    color: #A3AED0;
    font-weight: 500;
}

/* Premium settings nav tabs */
.settings-nav {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: #f4f7fe;
    border-radius: 14px;
    margin-bottom: 24px;
    overflow-x: auto;
    animation: dashCardSlideIn 0.5s 0.05s both;
}

.settings-nav__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #68769F;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
}

.settings-nav__item i {
    font-size: 18px;
    transition: transform 0.25s;
}

.settings-nav__item:hover {
    color: #487FFF;
    background: rgba(72,127,255,0.06);
}

.settings-nav__item.active,
.settings-nav .nav-link.active.settings-nav__item {
    color: #fff !important;
    background: linear-gradient(135deg, #487FFF, #6142FF) !important;
    box-shadow: 0 4px 14px rgba(72,127,255,0.3);
}

.settings-nav__item.active i {
    transform: scale(1.1);
}

.settings-nav__item--danger.active,
.settings-nav .nav-link.active.settings-nav__item--danger {
    background: linear-gradient(135deg, #EA5455, #d63031) !important;
    box-shadow: 0 4px 14px rgba(234,84,85,0.3);
}

/* Override Bootstrap default nav-link styles in settings nav */
.settings-nav.nav .nav-link.settings-nav__item {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #68769F;
    margin: 0;
}

.settings-nav.nav .nav-link.settings-nav__item:hover {
    color: #487FFF;
    background: rgba(72,127,255,0.06);
}

/* Settings form wrapper — transparent, sections are the cards */
.settings-form-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Settings section groups — card-like containers */
.settings-section {
    margin-bottom: 20px;
    padding: 24px;
    background: #fff;
    border: 2px solid #eef1f6;
    border-radius: 16px;
    animation: dashCardSlideIn 0.4s both;
    transition: border-color 0.25s;
}

.settings-section:hover {
    border-color: #dde3f0;
}

.settings-section:last-child {
    margin-bottom: 0;
}

/* Stagger sections */
.settings-section:nth-child(1) { animation-delay: 0.05s; }
.settings-section:nth-child(2) { animation-delay: 0.1s; }
.settings-section:nth-child(3) { animation-delay: 0.15s; }
.settings-section:nth-child(4) { animation-delay: 0.2s; }
.settings-section:nth-child(5) { animation-delay: 0.25s; }
.settings-section:nth-child(6) { animation-delay: 0.3s; }

.settings-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f4f7fe;
}

.settings-section__icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    flex-shrink: 0;
}

.settings-section__icon--blue {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 3px 10px rgba(72,127,255,0.25);
}

.settings-section__icon--green {
    background: linear-gradient(135deg, #22C55E, #27CEA7);
    box-shadow: 0 3px 10px rgba(39,206,167,0.25);
}

.settings-section__icon--purple {
    background: linear-gradient(135deg, #6142FF, #A855F7);
    box-shadow: 0 3px 10px rgba(97,66,255,0.25);
}

.settings-section__icon--orange {
    background: linear-gradient(135deg, #FF9F43, #F59E0B);
    box-shadow: 0 3px 10px rgba(255,159,67,0.25);
}

.settings-section__icon--red {
    background: linear-gradient(135deg, #EA5455, #d63031);
    box-shadow: 0 3px 10px rgba(234,84,85,0.25);
}

.settings-section__icon--teal {
    background: linear-gradient(135deg, #00CFE8, #27CEA7);
    box-shadow: 0 3px 10px rgba(0,207,232,0.25);
}

.settings-section__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 1px;
}

.settings-section__desc {
    font-size: 12px;
    color: #A3AED0;
    font-weight: 500;
}

/* Settings field hint */
.settings-field-hint {
    font-size: 12px;
    color: #A3AED0;
    margin-top: 4px;
    line-height: 1.4;
}

.settings-field-hint i {
    font-size: 13px;
    vertical-align: -1px;
    margin-right: 2px;
}

/* Settings readonly badge */
.settings-readonly-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #A3AED0;
    background: #f4f7fe;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
}

/* QR toggle premium */
.settings-toggle-card {
    padding: 20px;
    border-radius: 14px;
    border: 2px solid #f0f3fa;
    background: linear-gradient(135deg, #fafbff 0%, #f4f7fe 100%);
    transition: all 0.3s;
}

.settings-toggle-card:hover {
    border-color: rgba(72,127,255,0.2);
    box-shadow: 0 4px 16px rgba(72,127,255,0.06);
}

.settings-toggle-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-toggle-card__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 3px 10px rgba(72,127,255,0.25);
}

.settings-toggle-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 2px;
}

.settings-toggle-card__desc {
    font-size: 12px;
    color: #A3AED0;
    line-height: 1.4;
}

/* Theme color picker */
.settings-theme-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.settings-theme-swatch {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-theme-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.settings-theme-swatch.active {
    border-color: var(--premium-text-primary, #1B2559);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transform: scale(1.12);
}

.settings-theme-swatch.active::after {
    content: '\2713';
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.settings-theme-swatch__label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #68769F;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.settings-theme-swatch:hover .settings-theme-swatch__label,
.settings-theme-swatch.active .settings-theme-swatch__label {
    opacity: 1;
}

/* Social media icons in settings */
.settings-social-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.settings-social-icon--facebook { background: linear-gradient(135deg, #1877F2, #0d65d9); }
.settings-social-icon--instagram { background: linear-gradient(135deg, #E4405F, #C13584); }
.settings-social-icon--x { background: linear-gradient(135deg, #14171A, #333); }
.settings-social-icon--tiktok { background: linear-gradient(135deg, #000000, #25F4EE); }
.settings-social-icon--youtube { background: linear-gradient(135deg, #FF0000, #cc0000); }
.settings-social-icon--linkedin { background: linear-gradient(135deg, #0A66C2, #004182); }

.settings-social-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.settings-social-field .form-control {
    flex: 1;
}

/* Admin tool cards */
.settings-tool-card {
    border-radius: 16px;
    border: 2px solid #eef1f6;
    background: #fff;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.settings-tool-card:hover {
    border-color: rgba(72,127,255,0.15);
    box-shadow: 0 8px 28px rgba(72,127,255,0.08);
}

.settings-tool-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 2px solid #f4f7fe;
}

.settings-tool-card__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: all 0.3s;
}

.settings-tool-card:hover .settings-tool-card__icon {
    transform: scale(1.08) rotate(-3deg);
}

.settings-tool-card__icon--bell {
    background: linear-gradient(135deg, #487FFF, #6142FF);
    box-shadow: 0 4px 12px rgba(72,127,255,0.25);
}

.settings-tool-card__icon--reset {
    background: linear-gradient(135deg, #00CFE8, #27CEA7);
    box-shadow: 0 4px 12px rgba(0,207,232,0.25);
}

.settings-tool-card__icon--danger {
    background: linear-gradient(135deg, #EA5455, #d63031);
    box-shadow: 0 4px 12px rgba(234,84,85,0.25);
}

.settings-tool-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--premium-text-primary, #1B2559);
    margin-bottom: 1px;
}

.settings-tool-card__subtitle {
    font-size: 12px;
    color: #A3AED0;
    font-weight: 500;
}

.settings-tool-card__body {
    padding: 24px;
}

/* Danger zone card */
.settings-tool-card--danger {
    border-color: rgba(234,84,85,0.2);
}

.settings-tool-card--danger:hover {
    border-color: rgba(234,84,85,0.3);
    box-shadow: 0 8px 28px rgba(234,84,85,0.08);
}

/* Save bar */
.settings-save-bar {
    padding: 20px 0 0;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.settings-save-bar .btn {
    padding: 10px 28px;
    font-weight: 700;
    font-size: 14px;
}

/* Settings tab content animation */
.settings-tab-content > .tab-pane {
    animation: dashCardSlideIn 0.35s both;
}

/* Commission list */
.settings-commission-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Commission field — wrapper with icon inside input */
.settings-commission-field {
    position: relative;
}

/* Icon/number inside the input — left side */
.settings-commission-field__icon,
.settings-commission-field__num {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    margin: 10px 0;
    height: 26px;
    z-index: 2;
    width: 26px;
    min-width: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #487FFF, #6142FF);
    pointer-events: none;
}

/* President icon — gold */
.settings-commission-field--president .settings-commission-field__icon {
    background: linear-gradient(135deg, #FF9F43, #F59E0B);
    font-size: 14px;
}

/* Input with left padding for the icon */
.settings-commission-field .form-control {
    padding-left: 52px !important;
    font-weight: 500;
    border: 1.5px solid #eef1f6;
    border-radius: 10px;
    transition: all 0.2s;
}

.settings-commission-field .form-control:hover {
    border-color: rgba(72,127,255,0.2);
    box-shadow: 0 2px 8px rgba(72,127,255,0.06);
}

.settings-commission-field .form-control:focus {
    border-color: rgba(72,127,255,0.4);
    box-shadow: 0 0 0 3px rgba(72,127,255,0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .settings-nav {
        gap: 4px;
        padding: 4px;
    }
    .settings-nav__item {
        padding: 8px 12px;
        font-size: 13px;
    }
    .settings-nav__item span {
        display: none;
    }
    .settings-nav__item i {
        font-size: 20px;
    }
    .settings-page-header__title {
        font-size: 18px;
    }
    .settings-theme-grid {
        gap: 8px;
    }
    .settings-theme-swatch {
        width: 38px;
        height: 38px;
    }
    .settings-social-field {
        flex-direction: column;
        gap: 8px;
    }
    .settings-social-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* ======================== Premium Alerts ======================== */

.premium-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1.5px solid;
}

.premium-alert--danger {
    background: linear-gradient(135deg, rgba(234,84,85,0.04), rgba(234,84,85,0.08));
    border-color: rgba(234,84,85,0.15);
}

.premium-alert__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.premium-alert--danger .premium-alert__icon {
    background: linear-gradient(135deg, #EA5455, #FF6B6B);
    color: #fff;
    box-shadow: 0 4px 12px rgba(234,84,85,0.25);
}

.premium-alert__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.premium-alert__title {
    font-size: 14px;
    font-weight: 700;
    color: #c0392b;
}

.premium-alert__text {
    font-size: 13px;
    font-weight: 500;
    color: #e74c3c;
}

/* ======================== Invoices Page ======================== */

/* Invoice number icon */
.invoice-number-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #487FFF;
    background: rgba(72, 127, 255, 0.08);
}

/* ======================== Activity Page ======================== */

/* Loading state */
.activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.activity-loading__spinner {
    margin-bottom: 20px;
}

.activity-loading__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--premium-text-primary) !important;
    margin-bottom: 4px !important;
}

.activity-loading__text {
    font-size: 13px;
    color: #A3AED0;
    font-weight: 500;
    margin: 0;
}

/* Card entrance animation */
@keyframes activityCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-card-animate {
    animation: activityCardSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Badges in chart card header */
.activity-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    font-family: "Nunito", "Roboto", sans-serif;
    white-space: nowrap;
}

.activity-badge--primary {
    background: rgba(72, 127, 255, 0.08);
    color: #487FFF;
}

.activity-badge--subtle {
    background: rgba(163, 174, 208, 0.1);
    color: #707EAE;
}

/* Empty state inside chart */
.activity-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #A3AED0;
    gap: 8px;
}

.activity-chart-empty i {
    font-size: 36px;
    opacity: 0.5;
}

.activity-chart-empty span {
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .activity-badges {
        flex-wrap: wrap;
        gap: 6px;
    }
    .stats-chart-card__header {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ======================== Archived Page ======================== */

/* Avatar icon in archived table */
.archived-avatar-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #EA5455;
    background: rgba(234, 84, 85, 0.08);
}

/* Archived badge on profile */
.archived-profile-badge {
    z-index: 1;
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    font-family: "Nunito", "Roboto", sans-serif;
    color: #EA5455;
    background: rgba(234, 84, 85, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(234, 84, 85, 0.2);
}

/* Status badge danger variant */
.status-badge--danger {
    background: rgba(234, 84, 85, 0.06);
    color: #EA5455;
}

.status-dot--danger {
    background: #EA5455;
    animation: statusPulse 2s infinite;
}

/* ======================== Textbooks Module ======================== */

/* Standalone ISBN badge (used in textbooks index table) */
.loan-book-isbn {
    display: block;
    font-size: 11px;
    color: #A3AED0;
    font-weight: 500;
    margin-top: 2px;
}

/* Textbook cover in view hero */
.textbook-hero-cover {
    width: 120px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--premium-body-bg, #F4F7FE);
    border: 1px solid var(--premium-border-color, #E9EDF7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.textbook-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Wizard premium step-list override */
.step-list {
    border-radius: var(--premium-radius-lg, 16px);
    box-shadow: var(--premium-shadow-card);
    border: 1px solid var(--premium-border-color, #E9EDF7);
}

/* Cell text color variants */
.cell-text--success {
    color: #22C55E;
    font-weight: 700;
}

.cell-text--danger {
    color: #EA5455;
    font-weight: 700;
}
