/* ============================================================= */
/* еБиблиотека 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: transparent !important;
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--premium-text-light) !important;
    border-bottom: none !important;
    white-space: nowrap;
    padding: 8px 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: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(72, 127, 255, 0.08);
}

.table tbody td {
    border: 2px solid transparent !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: 2px solid transparent !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);
}

/* 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: 2px solid transparent !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;
}

.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: 2px solid transparent !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;
}

footer {
    background-color: transparent !important;
    border-top: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* ======================== Class Cards ======================== */

.cards-row .card,
.class-card.card {
    border-radius: var(--premium-radius-lg) !important;
    border: 2px solid transparent !important;
    box-shadow: var(--premium-shadow-card);
    transition: var(--premium-transition);
}

.cards-row .card:hover,
.class-card.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--premium-shadow-lg);
}

.cards-row .card-header,
.class-card .card-header {
    border-radius: var(--premium-radius-lg) var(--premium-radius-lg) 60% 60% / 0% 0% 50% 50% !important;
}

.cards-row .card-title,
.class-card .card-title {
    font-family: "Nunito", sans-serif !important;
}

/* ======================== Book Info Card ======================== */

.card.book-info {
    border-radius: var(--premium-radius-lg) !important;
    border: 2px solid transparent !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 ======================== */

.suggestions {
    border-radius: var(--premium-radius-md);
    border: 1px solid var(--premium-border-color);
    box-shadow: var(--premium-shadow-md);
    background-color: #fff;
}

.suggestions li:hover {
    background-color: rgba(var(--premium-primary-rgb), 0.06);
}

/* ======================== 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;
}

/* ======================== Book/Loan Cards — Hover Lift ======================== */

.col-xxl-3 > .card.p-16,
.col-lg-4 > .card.p-16,
.col-sm-6 > .card.p-16 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid var(--premium-border-color) !important;
}

.col-xxl-3 > .card.p-16:hover,
.col-lg-4 > .card.p-16:hover,
.col-sm-6 > .card.p-16:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(72, 127, 255, 0.1) !important;
    border-color: rgba(72, 127, 255, 0.15) !important;
}

/* Book cover images */
.card.p-16 .rounded-8.border.border-gray-100 {
    border-radius: 12px !important;
    transition: transform 0.3s ease;
}

.card.p-16:hover .rounded-8.border.border-gray-100 {
    transform: scale(1.02);
}

/* Genre badge — gradient */
.bg-success-50.text-success-600.rounded-pill {
    background: linear-gradient(135deg, rgba(39, 206, 167, 0.12) 0%, rgba(34, 197, 94, 0.12) 100%) !important;
    color: #0b9444 !important;
    font-weight: 600 !important;
}

/* Status badges on loan cards */
.bg-warning-50.text-warning-600 {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.12) 0%, rgba(254, 202, 87, 0.12) 100%) !important;
}

.bg-success-50.text-success-600:not(.rounded-pill) {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(39, 206, 167, 0.12) 100%) !important;
}

/* ======================== 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 ======================== */

.cards-row .card,
.class-card.card {
    border-top: 3px solid transparent !important;
    position: relative;
    overflow: visible !important;
}

.cards-row .card::before,
.class-card.card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--premium-gradient-primary);
    border-radius: var(--premium-radius-lg) var(--premium-radius-lg) 0 0;
}

/* ======================== 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: 2px solid transparent !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: 2px solid transparent !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: 2px solid transparent !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: 2px solid transparent !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;
}


/* ============================================================================
   GENERIC PAGE COMPONENTS — Reusable across all table pages
   ============================================================================ */

/* --- Page Stats Grid --- */
.page-stats {
    display: grid;
    grid-template-columns: repeat(5, 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:nth-child(5) { animation-delay: 0.28s; }

.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;
}

/* --- 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;
}

/* --- 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: dotPulseOrange 2s ease-in-out infinite;
}

.status-dot--danger {
    background: #EA5455;
    animation: dotPulseRed 1.5s ease-in-out infinite;
}

.status-dot--info {
    background: #487FFF;
}

@keyframes dotPulseOrange {
    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 dotPulseRed {
    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 --- */
.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--email {
    color: #F59E0B;
    background: rgba(245,158,11,0.08);
}

.action-btn--email:hover {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245,158,11,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;
}

.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;
}

/* --- Premium Pagination (SA) --- */
.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;
}

/* --- 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;
    }
}

/* ==================== Export Premium Dropdown ==================== */
.export-dropdown .dropdown-toggle::after {
    display: none;
}
.export-dropdown {
    position: relative;
}
.export-dropdown__menu.dropdown-menu {
    min-width: 290px;
    padding: 8px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(99, 102, 241, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: exportDropdownIn 0.18s ease-out;
    overflow: hidden;
    inset: auto !important;
    transform: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
}
@keyframes exportDropdownIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.export-dropdown__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    color: inherit !important;
}
.export-dropdown__item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.04));
    transform: translateX(4px);
}
.export-dropdown__item:active {
    transform: translateX(2px) scale(0.99);
}
.export-dropdown__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.export-dropdown__item:hover .export-dropdown__icon {
    transform: scale(1.08);
}
.export-dropdown__icon--excel {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}
.export-dropdown__icon--csv {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}
.export-dropdown__title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.3;
}
.export-dropdown__desc {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 2px;
}
.export-dropdown__divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.12), transparent);
    margin: 4px 12px;
}
.export-dropdown__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    margin-left: 8px;
    vertical-align: middle;
}
