/* ==========================================================================
   Vallibel Finance Examination App - Modern Glass Theme & Floating Sidebar
   Brand Colors: Crimson Red (#d92028), Dark Ruby (#b71c1c), Slate & Frosted Glass
   ========================================================================== */

:root {
    --vf-primary: #d92028;
    --vf-primary-dark: #b71c1c;
    --vf-primary-light: #ff4d5a;
    --vf-primary-glow: rgba(217, 32, 40, 0.28);
    --vf-primary-soft: rgba(217, 32, 40, 0.08);

    --vf-gradient: linear-gradient(135deg, #d92028 0%, #b71c1c 100%);
    --vf-gradient-hover: linear-gradient(135deg, #e52d27 0%, #991b1b 100%);
    --vf-gradient-header: linear-gradient(135deg, #881316 0%, #b71c1c 45%, #d92028 100%);

    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-bg-subtle: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(226, 232, 240, 0.9);
    --glass-border-subtle: rgba(226, 232, 240, 0.72);
    --glass-shadow: 0 12px 32px -18px rgba(15, 23, 42, 0.24), 0 1px 2px rgba(15, 23, 42, 0.04);
    --glass-shadow-lg: 0 20px 45px -24px rgba(15, 23, 42, 0.35), 0 3px 8px rgba(15, 23, 42, 0.05);

    --vf-ink: #1e293b;
    --vf-muted: #64748b;
    --vf-nav-hover: #fff5f5;
    --vf-nav-active: #feecee;
    --sidebar-width: 250px;
    --sidebar-gap: 1rem;
}

/* ==========================================================================
   Header Banner - Luxurious Vallibel Red Gradient Mesh
   ========================================================================== */
.vf-header-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 310px;
    background: var(--vf-gradient-header);
    background-size: 200% 200%;
    animation: vfHeaderFlow 14s ease infinite;
    z-index: 0;
    overflow: hidden;
}

.vf-header-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(217, 32, 40, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.vf-header-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes vfHeaderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   Floating Glass Sidebar
   ========================================================================== */
.sidenav.vf-floating-sidebar {
    position: fixed !important;
    top: var(--sidebar-gap) !important;
    left: var(--sidebar-gap) !important;
    bottom: var(--sidebar-gap) !important;
    height: calc(100vh - (var(--sidebar-gap) * 2)) !important;
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    margin: 0 !important;
    padding: 0.75rem 0 !important;
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
    backdrop-filter: blur(20px) saturate(190%) !important;
    border-radius: 1.125rem !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow-lg) !important;
    z-index: 1040 !important;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidenav Brand Header */
.vf-floating-sidebar .sidenav-header {
    padding: 0.55rem 1rem 0.7rem !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vf-brand-badge {
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.55rem;
    background: #fff8f8;
    border: 1px solid #fee2e2;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.vf-brand-logo {
    display: flex;
    width: 78px;
    height: 33px;
    align-items: center;
    justify-content: center;
    padding: 0.18rem;
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-radius: 0.45rem;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vf-brand-logo:hover {
    border-color: #fda4af;
    box-shadow: 0 4px 10px -7px rgba(185, 28, 28, 0.55);
}

.vf-brand-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 72px;
    max-height: 27px;
    object-fit: contain;
}

.vf-brand-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.vf-brand-badge .badge-text {
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--vf-ink);
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-brand-caption {
    display: block;
    margin-top: 0.14rem;
    color: var(--vf-muted);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Nav Menu Items */
.vf-floating-sidebar .navbar-collapse {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 0 0.65rem !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 32, 40, 0.2) transparent;
}

.vf-floating-sidebar .navbar-collapse::-webkit-scrollbar {
    width: 4px;
}

.vf-floating-sidebar .navbar-collapse::-webkit-scrollbar-thumb {
    background: rgba(217, 32, 40, 0.2);
    border-radius: 4px;
}

.vf-floating-sidebar .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.vf-menu-label {
    margin: 0.2rem 0.65rem 0.45rem;
    color: #94a3b8;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.vf-floating-sidebar .nav-link {
    display: flex !important;
    align-items: center !important;
    min-height: 42px;
    padding: 0.4rem 0.55rem !important;
    border-radius: 0.65rem !important;
    color: #526176 !important;
    font-size: 0.76rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.005em;
    text-decoration: none !important;
    position: relative;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    border: 1px solid transparent;
}

.vf-floating-sidebar .nav-link .icon {
    width: 29px;
    height: 29px;
    border-radius: 0.5rem;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    color: #64748b;
    font-size: 0.72rem;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* Hover state */
.vf-floating-sidebar .nav-link:hover:not(.active) {
    background: var(--vf-nav-hover) !important;
    color: var(--vf-primary) !important;
    transform: translateX(2px);
    border-color: #fee2e2;
}

.vf-floating-sidebar .nav-link:hover:not(.active) .icon {
    background: #fee2e2;
    color: var(--vf-primary);
    transform: scale(1.08);
}

/* Active item state */
.vf-floating-sidebar .nav-link.active {
    background: var(--vf-nav-active) !important;
    color: #a3141a !important;
    font-weight: 800 !important;
    box-shadow: inset 3px 0 0 var(--vf-primary), 0 4px 12px -10px rgba(217, 32, 40, 0.65) !important;
    border-color: #fecdd3 !important;
}

.vf-floating-sidebar .nav-link.active .icon {
    background: var(--vf-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 7px rgba(217, 32, 40, 0.2);
}

.vf-floating-sidebar .nav-link.active .nav-link-text {
    color: #a3141a !important;
}

.vf-floating-sidebar .nav-link:focus-visible,
.vf-glass-navbar a:focus-visible,
.vf-glass-navbar button:focus-visible {
    outline: 3px solid rgba(217, 32, 40, 0.26);
    outline-offset: 2px;
}

/* Main Content Adjustment for Floating Sidebar */
@media (min-width: 1200px) {
    body.g-sidenav-show .main-content {
        margin-left: calc(var(--sidebar-width) + (var(--sidebar-gap) * 2)) !important;
        padding-right: var(--sidebar-gap) !important;
        transition: margin-left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
}

@media (max-width: 1199.98px) {
    .sidenav.vf-floating-sidebar {
        transform: translateX(-120%) !important;
        top: 1rem !important;
        left: 1rem !important;
        bottom: 1rem !important;
        height: calc(100vh - 2rem) !important;
    }

    body.g-sidenav-pinned .sidenav.vf-floating-sidebar {
        transform: translateX(0) !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* ==========================================================================
   Top Navigation Bar - Modern Floating Glass Pill
   ========================================================================== */
.navbar-main.vf-glass-navbar {
    min-height: 62px;
    background: linear-gradient(105deg, rgba(255, 248, 248, 0.96), rgba(255, 237, 240, 0.94)) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    border: 1px solid rgba(254, 205, 211, 0.88) !important;
    border-radius: 0.9rem !important;
    box-shadow: 0 14px 30px -19px rgba(159, 18, 57, 0.36), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    margin-top: 1rem !important;
    margin-bottom: 1.2rem !important;
    padding: 0.55rem 0.85rem !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1020;
}

.vf-glass-navbar .breadcrumb-item a {
    color: #9f1239 !important;
    font-size: 0.67rem;
    font-weight: 700;
}

.vf-glass-navbar .breadcrumb-item a:hover {
    color: var(--vf-primary) !important;
}

.vf-glass-navbar .breadcrumb-item.active {
    color: #881337 !important;
    font-size: 0.67rem;
    font-weight: 700;
}

.vf-glass-navbar .breadcrumb-item + .breadcrumb-item::before {
    color: #fda4af;
}

.vf-page-title {
    color: #7f1d1d;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.vf-page-context {
    min-width: 0;
    flex: 1 1 auto;
}

.vf-topbar-actions {
    flex-shrink: 0;
    gap: 0.45rem;
}

.vf-user-chip {
    min-height: 36px;
    padding: 0.25rem 0.45rem 0.25rem 0.3rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #fecdd3;
    border-radius: 0.65rem;
}

.vf-user-avatar {
    width: 27px;
    height: 27px;
    background: var(--vf-gradient);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(217, 32, 40, 0.2);
}

.vf-user-name {
    max-width: 120px;
    overflow: hidden;
    color: #881337;
    font-size: 0.72rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-user-role {
    max-width: 88px;
    overflow: hidden;
    padding: 0.16rem 0.36rem;
    background: #fff7f7;
    border: 1px solid #fecdd3;
    border-radius: 0.35rem;
    color: #9f1239;
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-modern-logout {
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
    gap: 0.38rem;
    padding: 0.38rem 0.6rem;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 0.65rem;
    color: #b91c1c;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-modern-logout:hover {
    background: var(--vf-gradient);
    border-color: var(--vf-primary);
    box-shadow: 0 7px 13px -8px rgba(185, 28, 28, 0.65);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-modern-logout:active {
    transform: translateY(0);
}

.vf-mobile-toggle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #fecdd3;
    border-radius: 0.65rem;
    color: #9f1239;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.vf-mobile-toggle:hover {
    background: #fff5f5;
    border-color: #fecaca;
}

.vf-mobile-toggle .sidenav-toggler-inner {
    width: 17px;
}

.vf-mobile-toggle .sidenav-toggler-line {
    display: block;
    height: 2px;
    margin-bottom: 3px;
    background: currentColor;
    border-radius: 2px;
}

.vf-mobile-toggle .sidenav-toggler-line:last-child {
    margin-bottom: 0;
}

@media (hover: none) {
    .vf-floating-sidebar .nav-link:hover:not(.active),
    .btn-modern-logout:hover {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-main.vf-glass-navbar {
        min-height: 56px;
        margin: 0.75rem 0.5rem 1rem !important;
        padding: 0.45rem 0.55rem !important;
    }

    .vf-glass-navbar .breadcrumb-item.active {
        display: none;
    }

    .vf-page-title {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.84rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vf-topbar-actions {
        gap: 0.32rem;
        margin-left: 0.5rem;
    }

    .btn-modern-logout,
    .vf-mobile-toggle {
        min-width: 34px;
        min-height: 34px;
        width: 34px;
        height: 34px;
        padding: 0.3rem;
    }
}

/* ==========================================================================
   Universal Glassmorphism System for All Pages
   ========================================================================== */

/* Page Background Canvas with Subtle Ambient Depth */
body,
body.bg-gray-100,
body.g-sidenav-show {
    background-color: #f8fafc !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(217, 32, 40, 0.04) 0px, transparent 45%),
        radial-gradient(at 100% 15%, rgba(183, 28, 28, 0.03) 0px, transparent 40%),
        radial-gradient(at 75% 100%, rgba(15, 23, 42, 0.035) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
}

/* Global Card Glass Styling for Every Page */
.card,
.glass-panel,
.card.glass-card {
    background: rgba(255, 255, 255, 0.86) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.85) inset !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
    overflow: hidden;
}

.card:hover,
.glass-panel:hover {
    box-shadow: 0 22px 42px -8px rgba(0, 0, 0, 0.09), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
}

/* Card Headers */
.card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 1.15rem 1.5rem !important;
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

.card-header.bg-dark {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.98) 100%) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

.card-header.bg-dark h5,
.card-header.bg-dark h6,
.card-header.text-white h5,
.card-header.text-white h6 {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.card-header.bg-white {
    background: rgba(255, 255, 255, 0.65) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
}

/* ==========================================================================
   Modern Executive Glass Datatable & Table Theme
   ========================================================================== */
.table-responsive {
    background: transparent !important;
    border-radius: 1rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Clean up table base and remove clunky bootstrap borders */
.table,
.dataTable-table {
    background: transparent !important;
    color: #334155 !important;
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border: none !important;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border: none !important;
}

/* Executive Dark Slate Glass Table Header */
.table thead th,
.table thead.table-dark th,
.table-dark th,
.dataTable-table thead th {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #f8fafc !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    border: none !important;
    border-bottom: 2px solid #d92028 !important; /* Vallibel Crimson Brand Accent Line */
    padding: 0.95rem 1.25rem !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.table thead tr th:first-child {
    border-top-left-radius: 0.75rem !important;
}

.table thead tr th:last-child {
    border-top-right-radius: 0.75rem !important;
}

/* Subtle Hairline Dividers & Soft Row Heights */
.table tbody td,
.dataTable-table tbody td {
    border: none !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.75) !important;
    padding: 0.95rem 1.25rem !important;
    vertical-align: middle !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}

.table tbody tr:last-child td,
.dataTable-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Frosted Alternating Stripes */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(248, 250, 252, 0.5) !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: rgba(255, 255, 255, 0.72) !important;
}

/* Interactive Row Hover Effect */
.table tbody tr,
.dataTable-table tbody tr {
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.table tbody tr:hover > *,
.dataTable-table tbody tr:hover > * {
    background-color: rgba(217, 32, 40, 0.045) !important;
}

/* Table Item Typography */
.admin-list-table .item-title,
.question-pool-table .question-title {
    color: #0f172a !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin-bottom: 0.2rem !important;
}

.admin-list-table .item-subtitle,
.admin-list-table .item-meta {
    color: #64748b !important;
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

/* Table Codes / Monospace Pill Chips */
.table-code {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.22rem 0.55rem !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    border-radius: 0.5rem !important;
    background: rgba(241, 245, 249, 0.85) !important;
    color: #1e293b !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

/* Modern Pill Badges in Tables */
.table .badge,
.dataTable-table .badge {
    padding: 0.32rem 0.65rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #d92028 0%, #b71c1c 100%) !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

.badge.bg-info,
.badge.bg-gradient-info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
}

.badge.bg-warning,
.badge.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
}

.badge.bg-dark,
.badge.bg-gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
}

/* Modern Floating Table Search & Filter Toolbar */
.table-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.85rem !important;
    background: rgba(255, 255, 255, 0.65) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 1rem !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 1.15rem !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.03) !important;
}

.table-search {
    position: relative !important;
    width: min(100%, 24rem) !important;
}

.table-search .table-search-icon {
    position: absolute !important;
    left: 0.95rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #d92028 !important;
    font-size: 0.85rem !important;
    pointer-events: none !important;
}

.table-search .form-control {
    height: 38px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1.5px solid rgba(203, 213, 225, 0.8) !important;
    padding-left: 2.45rem !important;
    padding-right: 1rem !important;
    font-size: 0.84rem !important;
    color: #0f172a !important;
    transition: all 0.25s ease !important;
}

.table-search .form-control:focus {
    border-color: #d92028 !important;
    box-shadow: 0 0 0 3.5px rgba(217, 32, 40, 0.14) !important;
    background: #ffffff !important;
}

.filter-count {
    background: rgba(217, 32, 40, 0.08) !important;
    color: #d92028 !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    border: 1px solid rgba(217, 32, 40, 0.18) !important;
}

/* Glass Pagination Styling */
.pagination .page-link,
.my-pagination .page-link {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    color: #334155 !important;
    font-weight: 600 !important;
    border-radius: 0.6rem !important;
    margin: 0 3px !important;
    padding: 6px 12px !important;
    min-width: 36px !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease !important;
}

.pagination .page-link:hover,
.my-pagination .page-link:hover {
    background: rgba(217, 32, 40, 0.08) !important;
    color: #d92028 !important;
    border-color: rgba(217, 32, 40, 0.3) !important;
}

.pagination .page-item.active .page-link,
.my-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #d92028 0%, #b71c1c 100%) !important;
    border-color: #d92028 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(217, 32, 40, 0.35) !important;
}

/* Glass Form Inputs & Selects */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1.5px solid rgba(203, 213, 225, 0.75) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 0.75rem !important;
    padding: 0.55rem 0.95rem !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
    background: #ffffff !important;
    border-color: #d92028 !important;
    box-shadow: 0 0 0 3.5px rgba(217, 32, 40, 0.14) !important;
    color: #0f172a !important;
}

/* ==========================================================================
   Crystal Glass Modals & Dialog System (100% Contrast & Legibility)
   ========================================================================== */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
    backdrop-filter: blur(24px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden !important;
}

/* High-End Dark Slate Glass Header - Guarantees 100% Visible White Titles */
.modal-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.25rem 1.6rem !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Modal Title: Bold, crisp, illuminated white */
.modal-header .modal-title,
.modal-title,
.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h4,
.modal-header h5,
.modal-header h6 {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.modal-header .modal-title i,
.modal-header h5 i {
    color: #f87171 !important; /* Soft accent red icon */
}

/* High-contrast Close Button */
.modal-header .btn-close,
.modal-header .btn-close-white {
    filter: brightness(0) invert(1) !important;
    opacity: 0.85 !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    padding: 0.5rem !important;
    margin: -0.5rem -0.5rem -0.5rem auto !important;
}

.modal-header .btn-close:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

/* Modal Body: Crisp dark text on clean white glass */
.modal-body {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #1e293b !important;
    padding: 1.6rem 1.75rem !important;
}

.modal-body h1, .modal-body h2, .modal-body h3, 
.modal-body h4, .modal-body h5, .modal-body h6,
.modal-body label, .modal-body .form-label, .modal-body p {
    color: #1e293b !important;
}

/* Modal Footer */
.modal-footer {
    background: rgba(248, 250, 252, 0.92) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 1.1rem 1.6rem !important;
    border-bottom-left-radius: 1.5rem !important;
    border-bottom-right-radius: 1.5rem !important;
}

/* Glass Dropdowns */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.94) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 1rem !important;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem !important;
}

.dropdown-item {
    border-radius: 0.65rem !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background: rgba(217, 32, 40, 0.07) !important;
    color: #d92028 !important;
    transform: translateX(3px) !important;
}

/* ==========================================================================
   Standardized Action Buttons Across All Pages & Tables
   ========================================================================== */

/* Universal Button Base */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    text-align: center !important;
    vertical-align: middle !important;
    user-select: none !important;
    text-decoration: none !important;
    border-radius: 0.75rem !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.btn:hover {
    transform: translateY(-1.5px);
}

.btn:active {
    transform: translateY(0);
}

/* Table Actions Container */
.table-actions,
td .table-actions,
th .table-actions,
.action-buttons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    margin: 0 auto !important;
}

.table-actions form,
td .table-actions form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 1. STRICT UNIFORM TABLE ACTION BUTTON SIZING (32px Height, Equal Padding & Radii) */
td .btn,
th .btn,
.table .btn,
.table-actions .btn,
.table-actions button,
.table-actions a.btn,
.action-buttons .btn,
.btn-edit,
.btn-delete {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    border-radius: 8px !important;
    border: none !important;
    gap: 4px !important;
    line-height: 32px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 2. CARD HEADER ACTION BUTTONS (Strict 36px Height, Rounded Pills) */
.card-header .btn,
.card-header .btn-sm {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    gap: 6px !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* 3. MODAL ACTION BUTTONS (Strict 40px Height, 10px Radius) */
.modal-footer .btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    gap: 6px !important;
    line-height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.modal-footer .btn-secondary {
    background: rgba(241, 245, 249, 0.95) !important;
    color: #475569 !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
}

.modal-footer .btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* 4. REGULAR FORM BUTTONS (Forms outside tables/modals) */
.btn:not(.btn-sm):not(.btn-lg):not(.btn-icon-only):not(.btn-modern-logout):not(td .btn):not(th .btn):not(.table .btn):not(.card-header .btn):not(.modal-footer .btn) {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0.55rem 1.25rem !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.3px !important;
    border-radius: 0.75rem !important;
    gap: 0.45rem !important;
}

/* 5. LARGE BUTTONS (Login, Hero Actions) */
.btn-lg {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0.75rem 1.6rem !important;
    font-size: 0.96rem !important;
    border-radius: 0.85rem !important;
    gap: 0.55rem !important;
}

/* Preserve pill radius if .rounded-pill is explicitly added */
.btn.rounded-pill {
    border-radius: 9999px !important;
}

/* ==========================================================================
   Harmonious Executive Color Palette For Action Buttons
   ========================================================================== */

/* Edit / Update Actions: Vibrant Sapphire Blue */
.btn-edit,
.btn-warning,
td .btn-warning,
td .btn-primary,
.table-actions .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28) !important;
}

.btn-edit:hover,
.btn-warning:hover,
td .btn-warning:hover,
td .btn-primary:hover,
.table-actions .btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.42) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px) !important;
}

/* Delete / Remove Actions: Ruby Crimson Red */
.btn-delete,
.btn-danger,
td .btn-danger,
.btn-outline-danger,
td .btn-outline-danger,
.table-actions .btn-danger,
.table-actions .btn-outline-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.28) !important;
}

.btn-delete:hover,
.btn-danger:hover,
td .btn-danger:hover,
.btn-outline-danger:hover,
td .btn-outline-danger:hover,
.table-actions .btn-danger:hover,
.table-actions .btn-outline-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%) !important;
    box-shadow: 0 5px 14px rgba(239, 68, 68, 0.42) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px) !important;
}

/* Save / View / Add Actions: Emerald Green */
.btn-success,
td .btn-success,
.table-actions .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.28) !important;
}

.btn-success:hover,
td .btn-success:hover,
.table-actions .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.42) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px) !important;
}

/* Primary / Brand Red Gradient (Buttons outside tables, e.g. Form Submit) */
.btn-primary:not(td .btn):not(.table-actions .btn),
.btn-vf {
    background: linear-gradient(135deg, #d92028 0%, #b71c1c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(217, 32, 40, 0.28) !important;
}

.btn-primary:not(td .btn):not(.table-actions .btn):hover,
.btn-vf:hover {
    background: linear-gradient(135deg, #e52d27 0%, #991b1b 100%) !important;
    box-shadow: 0 6px 18px rgba(217, 32, 40, 0.45) !important;
    color: #ffffff !important;
}

/* Info / Cyan / Blue */
.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
}

/* Dark / Slate */
.btn-dark {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25) !important;
}

.btn-dark:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
}

/* Secondary */
.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    color: #ffffff !important;
}

/* Outline Secondary */
.btn-outline-secondary {
    background: rgba(100, 116, 139, 0.08) !important;
    color: #475569 !important;
    border: 1.5px solid rgba(100, 116, 139, 0.3) !important;
}

.btn-outline-secondary:hover {
    background: #475569 !important;
    color: #ffffff !important;
}

/* Outline Light */
.btn-outline-light {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
}

.btn-outline-light:hover {
    background: #ffffff !important;
    color: #0f172a !important;
}


/* Custom modern scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

::-webkit-scrollbar-thumb {
    background: rgba(217, 32, 40, 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 32, 40, 0.5);
}

/* ==========================================================================
   Modern Toast Notification System (Glassmorphic)
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: calc(100vw - 2.5rem);
    pointer-events: none;
}

.vf-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.1rem 1.1rem 1.1rem;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin-top 0.3s ease;
}

.vf-toast.vf-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.vf-toast.vf-toast-hiding {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
}

/* Toast Left Accent Bar */
.vf-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.vf-toast-success::before { background: #10b981; }
.vf-toast-error::before { background: #d92028; }
.vf-toast-warning::before { background: #f59e0b; }
.vf-toast-info::before { background: #3b82f6; }

/* Toast Icon Badge */
.vf-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.85rem;
    flex-shrink: 0;
    font-size: 1rem;
}

.vf-toast-success .vf-toast-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.vf-toast-error .vf-toast-icon {
    background: rgba(217, 32, 40, 0.12);
    color: #d92028;
}

.vf-toast-warning .vf-toast-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.vf-toast-info .vf-toast-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

/* Toast Body */
.vf-toast-body {
    flex: 1;
    min-width: 0;
    padding-right: 0.5rem;
}

.vf-toast-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
}

.vf-toast-message {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

/* Toast Close Button */
.vf-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    font-size: 1.1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vf-toast-close:hover {
    color: #334155;
    background: rgba(0, 0, 0, 0.05);
}

/* Toast Progress Countdown */
.vf-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    transition: width linear;
}

.vf-toast-success .vf-toast-progress { background: #10b981; }
.vf-toast-error .vf-toast-progress { background: #d92028; }
.vf-toast-warning .vf-toast-progress { background: #f59e0b; }
.vf-toast-info .vf-toast-progress { background: #3b82f6; }

/* Backdrop overlay for mobile drawer */
.vf-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.g-sidenav-pinned .vf-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Glassmorphic Fallback for In-Page Alerts */
.alert {
    border-radius: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
    padding: 0.95rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.92) 0%, rgba(5, 150, 105, 0.92) 100%) !important;
    color: #ffffff !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(217, 32, 40, 0.92) 0%, rgba(183, 28, 28, 0.92) 100%) !important;
    color: #ffffff !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.92) 0%, rgba(217, 119, 6, 0.92) 100%) !important;
    color: #ffffff !important;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: #1e40af !important;
}

/* ==========================================================================
   Compact Data Table System
   Shared by question, staff, paper, result, and administration lists.
   ========================================================================== */
.table-responsive,
.dataTable-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.45) !important;
    overflow-x: auto !important;
    scrollbar-color: #cbd5e1 transparent;
}

.table-responsive > .table,
.dataTable-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: #475569 !important;
}

.table thead th,
.table thead.table-dark th,
.table-dark th,
.dataTable-table thead th {
    background: #f8fafc !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.075em !important;
    line-height: 1.25 !important;
    padding: 0.72rem 0.95rem !important;
    text-transform: uppercase !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.table thead tr th:first-child {
    border-top-left-radius: 0.82rem !important;
}

.table thead tr th:last-child {
    border-top-right-radius: 0.82rem !important;
}

.table tbody td,
.dataTable-table tbody td {
    background: #ffffff !important;
    border: 0 !important;
    border-bottom: 1px solid #eef2f6 !important;
    color: #475569 !important;
    font-size: 0.78rem !important;
    line-height: 1.42 !important;
    padding: 0.78rem 0.95rem !important;
    vertical-align: middle !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #ffffff !important;
    color: #475569 !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #fcfdff !important;
}

.table tbody tr,
.dataTable-table tbody tr {
    transition: background-color 0.18s ease, box-shadow 0.18s ease !important;
}

.table tbody tr:hover > *,
.table tbody tr:focus-within > *,
.dataTable-table tbody tr:hover > *,
.dataTable-table tbody tr:focus-within > * {
    background-color: #fff7f7 !important;
}

.table tbody tr:hover > td:first-child,
.table tbody tr:focus-within > td:first-child,
.dataTable-table tbody tr:hover > td:first-child,
.dataTable-table tbody tr:focus-within > td:first-child {
    box-shadow: inset 3px 0 0 var(--vf-primary) !important;
}

.table tbody tr:last-child td,
.dataTable-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.table-responsive .item-title {
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.35;
    margin-bottom: 0.18rem;
}

.table-responsive .item-subtitle,
.table-responsive .item-meta {
    color: #64748b;
    font-size: 0.69rem;
    line-height: 1.4;
}

.table-responsive .item-meta,
.table-chip-list {
    gap: 0.28rem;
}

.table-code {
    padding: 0.22rem 0.42rem !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.35rem !important;
    color: #475569 !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
}

.table .badge,
.dataTable-table .badge {
    padding: 0.22rem 0.45rem !important;
    border: 0 !important;
    border-radius: 0.35rem !important;
    box-shadow: none !important;
    font-size: 0.61rem !important;
    font-weight: 750 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
}

.table-metric {
    min-width: 4.15rem;
    padding: 0.36rem 0.42rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.table-metric strong {
    color: #1e293b;
    font-size: 0.88rem;
}

.table-metric span {
    color: #64748b;
    font-size: 0.58rem;
}

.table-scroll-list {
    gap: 0.28rem;
    max-height: 6.5rem;
    padding: 0.32rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.table-actions,
td .table-actions,
th .table-actions,
.action-buttons {
    gap: 0.35rem !important;
}

td .btn,
th .btn,
.table .btn,
.table-actions .btn,
.table-actions button,
.table-actions a.btn,
.action-buttons .btn,
.btn-edit,
.btn-delete {
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    padding: 0 0.6rem !important;
    border-radius: 0.42rem !important;
    font-size: 0.67rem !important;
    line-height: 29px !important;
}

.table-toolbar,
.dataTable-top {
    min-height: 48px;
    padding: 0.48rem 0.6rem !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.72rem !important;
    box-shadow: none !important;
    gap: 0.65rem !important;
    margin-bottom: 0.75rem !important;
}

.table-search {
    width: min(100%, 21rem) !important;
}

.table-search .table-search-icon {
    left: 0.75rem !important;
    color: #94a3b8 !important;
    font-size: 0.72rem !important;
}

.table-search .form-control {
    height: 34px !important;
    padding-left: 2.1rem !important;
    padding-right: 0.7rem !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ed !important;
    border-radius: 0.48rem !important;
    box-shadow: none !important;
    color: #334155 !important;
    font-size: 0.72rem !important;
}

.table-search .form-control::placeholder {
    color: #94a3b8;
}

.table-search .form-control:focus {
    border-color: #fda4af !important;
    box-shadow: 0 0 0 3px rgba(217, 32, 40, 0.1) !important;
}

.filter-count {
    padding: 0.26rem 0.48rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.35rem !important;
    color: #64748b !important;
    font-size: 0.64rem !important;
    font-weight: 750 !important;
}

.vf-table-pagination,
.dataTable-bottom {
    min-height: 52px;
    padding: 0.55rem 0.7rem !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.72rem;
}

.vf-table-pagination .results-summary {
    color: #64748b;
    font-size: 0.7rem !important;
}

.vf-table-pagination .results-summary strong {
    color: #334155;
    font-weight: 800;
}

.vf-table-pagination .btn {
    min-height: 30px !important;
    padding: 0 0.6rem !important;
    border-radius: 0.42rem !important;
    font-size: 0.66rem !important;
}

.pagination,
.my-pagination {
    align-items: center;
    gap: 0.25rem !important;
}

.pagination .page-link,
.my-pagination .page-link {
    min-width: 29px !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 0.32rem 0.46rem !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ed !important;
    border-radius: 0.4rem !important;
    box-shadow: none !important;
    color: #64748b !important;
    font-size: 0.67rem !important;
    font-weight: 750 !important;
    line-height: 1 !important;
}

.pagination .page-link:hover,
.my-pagination .page-link:hover {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #be123c !important;
}

.pagination .page-item.active .page-link,
.my-pagination .page-item.active .page-link {
    background: var(--vf-gradient) !important;
    border-color: var(--vf-primary) !important;
    box-shadow: 0 4px 9px -6px rgba(185, 28, 28, 0.75) !important;
    color: #ffffff !important;
}

.pagination .page-item.disabled .page-link,
.my-pagination .page-item.disabled .page-link {
    background: #f8fafc !important;
    border-color: #eef2f6 !important;
    color: #cbd5e1 !important;
}

@media (max-width: 767.98px) {
    .table-responsive.table-card-mobile {
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .table-card-mobile > .table {
        border-collapse: separate !important;
        border-spacing: 0 0.55rem !important;
    }

    .table-card-mobile > .table tbody tr {
        border: 1px solid #e2e8f0 !important;
        border-radius: 0.72rem !important;
        box-shadow: 0 8px 18px -17px rgba(15, 23, 42, 0.44) !important;
    }

    .table-card-mobile > .table tbody td {
        grid-template-columns: minmax(5.8rem, 35%) minmax(0, 1fr) !important;
        gap: 0.55rem !important;
        min-height: 2.15rem !important;
        padding: 0.56rem 0.68rem !important;
        background: #ffffff !important;
        color: #475569 !important;
        font-size: 0.74rem !important;
    }

    .table-card-mobile > .table tbody td::before {
        color: #9f1239 !important;
        font-size: 0.59rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.055em !important;
        line-height: 1.35 !important;
    }

    .table-card-mobile > .table tbody tr:hover > td,
    .table-card-mobile > .table tbody tr:focus-within > td {
        background: #fff7f7 !important;
    }

    .table-card-mobile > .table tbody tr:hover > td:first-child,
    .table-card-mobile > .table tbody tr:focus-within > td:first-child {
        box-shadow: inset 3px 0 0 var(--vf-primary) !important;
    }

    .table-card-mobile .table-actions {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .table-toolbar,
    .vf-table-pagination {
        align-items: stretch !important;
        padding: 0.55rem !important;
    }

    .filter-count {
        align-self: flex-start;
    }

    .vf-table-pagination .pagination,
    .dataTable-bottom .pagination {
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .pagination .page-link,
    .my-pagination .page-link {
        min-width: 27px !important;
        min-height: 27px !important;
        padding: 0.28rem 0.36rem !important;
        font-size: 0.63rem !important;
    }
}
