:root {
    /* --- COLOR PALETTE (Fintech / SaaS Modern) --- */
    --primary-color: #0F172A;
    /* Deep Corporate Blue */
    --primary-light: #1E293B;
    /* Slate 800 */
    --primary-dark: #020617;
    /* Slate 950 */

    --accent-color: #3B82F6;
    /* Tech Blue */
    --accent-hover: #2563EB;
    /* Blue 600 */

    --success-color: #10B981;
    /* Emerald 500 */
    --danger-color: #EF4444;
    /* Red 500 */
    --warning-color: #F59E0B;
    /* Amber 500 */
    --info-color: #0EA5E9;
    /* Sky 500 */

    /* --- NEUTRALS --- */
    --text-main: #334155;
    /* Slate 700 */
    --text-muted: #64748B;
    /* Slate 500 */
    --text-light: #F8FAFC;
    /* Slate 50 */

    --bg-body: #F1F5F9;
    /* Slate 100 */
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    /* Slate 200 */

    /* --- TYPOGRAPHY --- */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* --- EFFECTS --- */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================= */
body {
    font-family: var(--font-body) !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.menu-title,
.brand-text {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
}

a {
    transition: var(--transition-fast);
    text-decoration: none !important;
}

/* =========================================
   SCROLLBAR (Modern & Thin)
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* =========================================
   PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(23, 48, 118, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   CARDS & CONTAINERS (Minimalist Tech)
   ========================================= */
.card,
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover,
.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
    /* Slate 300 */
    transform: translateY(-2px);
}

.card-header,
.dashboard-card-header {
    background-color: white !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.card-header h4,
.dashboard-card-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body,
.dashboard-card-body {
    padding: 1.5rem;
}

/* =========================================
   BUTTONS (Tech / SaaS Style)
   ========================================= */
.btn {
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    border: 1px solid transparent;
}

.btn:active {
    transform: scale(0.98);
}

/* Primary = Dark Blue */
.btn-primary,
.btn-pro-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-pro-primary:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    box-shadow: var(--shadow-md);
}

/* Success = Tech Blue (Pivot from Green to Blue for cleaner look, unless strictly semantic) */
.btn-success,
.btn-pro-success {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

.btn-success:hover,
.btn-pro-success:hover {
    background: #059669 !important;
    /* Emerald 600 */
    box-shadow: var(--shadow-md);
}

/* Secondary = Slate */
.btn-secondary,
.btn-pro-secondary {
    background: white !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

.btn-secondary:hover,
.btn-pro-secondary:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
    color: var(--primary-color) !important;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    background-color: #fcfcfc;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(23, 48, 118, 0.1);
}

/* Select2 Modernization */
.select2-container--default .select2-selection--single {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    height: 42px !important;
    background-color: #fcfcfc;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding-left: 1rem !important;
    color: var(--text-main) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

/* =========================================
   TABLES (Responsive & Clean)
   ========================================= */
.table {
    margin-bottom: 0;
    color: var(--text-main);
}

.table thead th {
    background-color: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    border-top: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(23, 48, 118, 0.02);
}

/* --- MOBILE CARD TABLE VIEW (The "Modern" Responsive Fix) --- */
@media screen and (max-width: 768px) {
    .table-responsive-card thead {
        display: none;
        /* Hide headers */
    }

    .table-responsive-card tbody tr {
        display: block;
        background: #fff;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid var(--border-color);
    }

    .table-responsive-card tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem 0;
        text-align: right;
        font-size: 0.95rem;
    }

    .table-responsive-card tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        text-align: left;
        margin-right: 1rem;
    }

    /* Actions row special handling */
    .table-responsive-card tbody td:last-child {
        justify-content: flex-end;
        padding-top: 1rem;
        border-top: 1px dashed var(--border-color);
        margin-top: 0.5rem;
    }
}

/* =========================================
   SIDEBAR (Modern & Dark)
   ========================================= */
.main-menu.menu-dark {
    background: #0F172A !important;
    /* Fallback */
    background: linear-gradient(180deg, #0F172A 0%, #020617 100%) !important;
    /* Premium Dark Gradient */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    height: 100vh !important;
    overflow-y: auto !important;
    position: fixed !important;
    top: 0;
    bottom: 0;
    padding-bottom: 60px;
}

/* Hide scrollbar for sidebar but keep functionality */
.main-menu::-webkit-scrollbar {
    width: 4px;
}

.main-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Sidebar Links */
.main-menu .navigation .nav-item a,
.main-menu .navigation .nav-item a span {
    color: #FFFFFF !important;
    /* Force Pure White */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Text shadow for readability */
    border-radius: 6px;
    margin: 4px 12px;
    padding: 10px 16px !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.main-menu .navigation .nav-item a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #F8FAFC !important;
    /* Slate 50 */
    transform: translateX(4px);
}

/* =========================================
   SIDEBAR ACTIVE STATE — FORCE BLUE (override framework green)
   ========================================= */

/* Todos los posibles selectores del framework para el activo */
.main-menu .navigation .nav-item.active>a,
.main-menu.menu-dark .navigation .nav-item.active>a,
.vertical-layout .main-menu .navigation .nav-item.active>a,
.vertical-menu .main-menu .navigation .nav-item.active>a,
.menu-expanded .main-menu .navigation .nav-item.active>a,
.menu-collapsed .main-menu .navigation .nav-item.active>a {
    background: #3B82F6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
    font-weight: 600;
}

/* Íconos dentro del activo */
.main-menu .navigation .nav-item.active>a i,
.main-menu.menu-dark .navigation .nav-item.active>a i {
    color: #ffffff !important;
}

/* Sub-ítems activos (dentro de ul.menu-content) */
.main-menu .navigation ul.menu-content li.active>a,
.main-menu.menu-dark .navigation ul.menu-content li.active>a {
    color: #3B82F6 !important;
    font-weight: 600;
    background: transparent !important;
}

/* Section Headers */
/* Section Headers */
/* Section Headers */
.navigation-header {
    color: #94A3B8 !important;
    /* Slate 400 - Much lighter for contrast */
    font-family: var(--font-heading) !important;
    /* Force Outfit font */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.2px;
    padding: 24px 28px 12px;
    margin-top: 10px;
    white-space: nowrap;
    /* Prevent ugly wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s;
}

/* Hide Section Headers when Sidebar is Collapsed */
body.menu-collapsed .main-menu .navigation-header,
body.vertical-menu.menu-collapsed .main-menu .navigation-header {
    display: none !important;
    opacity: 0;
}

/* Hide brand text in collapsed mode */
body.menu-collapsed .brand-text {
    display: none;
}

/* Mobile Specific Sidebar adjustments */
@media (max-width: 768px) {

    /* Sidebar angosto (iconos + texto) en móvil */
    .main-menu {
        width: 85px !important;
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 9999 !important;
        display: block !important;
        transform: none !important;
        opacity: 1 !important;
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.25);
        overflow: visible !important;
    }

    /* Ocultar footer del menú y flecha de submenú en móvil */
    .main-menu .navigation-header i.la,
    .main-menu .main-menu-footer {
        display: none !important;
    }

    /* Mostrar títulos del menú en móvil */
    .main-menu .navigation>li>a>span.menu-title {
        display: block !important;
        font-size: 0.65rem !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        margin-top: 4px !important;
        opacity: 0.9 !important;
    }

    /* Mostrar encabezados de sección en móvil centrados */
    .main-menu .navigation-header {
        padding: 15px 0 5px 0 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .main-menu .navigation-header span {
        display: block !important;
        font-size: 0.6rem !important;
        text-align: center !important;
        padding: 0 4px !important;
        color: rgba(255, 255, 255, 0.5) !important;
        letter-spacing: 0.5px !important;
    }

    /* Logo en móvil: mostrar pequeño y centrado arriba del sidebar */
    /* Anular d-none de Bootstrap que oculta .navigation-brand en xs/sm */
    .main-menu .navigation-brand.d-none {
        display: flex !important;
    }

    .navigation-brand {
        display: flex !important;
        justify-content: center;
        align-items: center;
        padding: 10px 4px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 6px;
    }

    .navigation-brand .brand-logo {
        width: 44px !important;
        height: 44px !important;
        object-fit: contain;
        border-radius: 8px;
    }

    /* Mostrar iconos y texto apilados */
    .main-menu .navigation>li>a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 4px !important;
        margin: 2px 4px !important;
    }

    .main-menu .navigation>li>a>i {
        font-size: 1.35rem !important;
        margin-right: 0 !important;
        margin-bottom: 2px !important;
        float: none !important;
    }

    /* Flecha indicadora de submenú — ocultar (no hay espacio) */
    .main-menu .navigation li.has-sub>a:not(.mm-next):after {
        display: none !important;
    }

    /* Submenús: flyout panel a la derecha del sidebar angosto */
    .main-menu .navigation>li>ul.menu-content {
        position: fixed !important;
        left: 85px !important;
        width: 200px !important;
        background: #0F172A !important;
        border-left: 3px solid #3B82F6;
        border-radius: 0 8px 8px 0;
        box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4) !important;
        z-index: 10000 !important;
        padding: 6px 0 !important;
    }

    /* Mostrar flyout cuando el padre tiene clase open (el JS hace slideDown) */
    .main-menu .navigation li:not(.open)>ul.menu-content {
        display: none;
    }

    /* Estilos de los ítems dentro del flyout */
    .main-menu .navigation ul.menu-content li a.menu-item {
        color: #CBD5E1 !important;
        padding: 10px 16px !important;
        font-size: 0.88rem !important;
        display: block !important;
        white-space: nowrap;
        transition: background 0.2s;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .main-menu .navigation ul.menu-content li a.menu-item:hover {
        background: rgba(59, 130, 246, 0.15) !important;
        color: #fff !important;
    }

    .main-menu .navigation ul.menu-content li.active>a {
        color: #3B82F6 !important;
        font-weight: 600;
    }

    /* El contenido principal deja espacio al sidebar angosto */
    .app-content,
    .content-wrapper,
    body.vertical-layout.vertical-menu.menu-expanded .content,
    body.vertical-layout.vertical-menu.menu-expanded .footer {
        margin-left: 10px;
    }

    /* Navbar desplazada por el sidebar angosto — anulando el framework */
    .header-navbar,
    body.vertical-layout.vertical-menu.menu-expanded .navbar .navbar-container {
        left: 85px !important;
        width: calc(100% - 85px) !important;
        margin-left: 0 !important;
    }

    /* Anular el navbar-header del framework que fuerza 260px */
    body.vertical-layout.vertical-menu.menu-expanded .navbar .navbar-header {
        width: 85px !important;
    }

    /* Remover overlay/backdrop en móvil */
    body.menu-open::before {
        display: none !important;
    }

    html body .content .content-wrapper {
        margin-left: 20px !important;
        padding: 1rem !important;
    }


}

/* =========================================
   HEADER / NAVBAR
   ========================================= */
.header-navbar {
    background: #fff;
    box-shadow: var(--shadow-sm);
    height: 70px;
    /* Taller navbar */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000 !important;
    /* Ensure Header is ABOVE sidebar overlay but BELOW sidebar itself? No, usually Sidebar is top. */
}

/* Sidebar is 9999, Overlay 9998. Header should be accessible. */

.navbar-container {
    padding: 0 2rem;
}

.user-name {
    font-family: var(--font-heading) !important;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.avatar img {
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: 2px solid #fff;
}

/* =========================================
   UTILITIES & COMPONENTS
   ========================================= */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

/* Status Badges */
.badge-status {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-block;
}

.badge-status.active {
    background-color: rgba(40, 199, 111, 0.15);
    color: #28c76f;
}

.badge-status.inactive {
    background-color: rgba(234, 84, 85, 0.15);
    color: #ea5455;
}

.badge-status:hover {
    transform: scale(1.05);
}

/* Action Buttons (Icon only) */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: var(--transition-fast);
    color: white;
    margin: 0 2px;
}

.btn-icon:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    color: white;
}

.btn-edit {
    background-color: var(--warning-color);
    box-shadow: 0 2px 5px rgba(255, 159, 67, 0.3);
}

.btn-delete {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(234, 84, 85, 0.3);
}

.btn-info {
    background-color: var(--info-color) !important;
    box-shadow: 0 2px 5px rgba(0, 207, 232, 0.3);
}

/* User Avatar (Table) */
.user-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   HEADER STYLES
   ========================================= */
@media (max-width: 768px) {
    .brand-logo-mobile {
        width: 110px;
        height: auto;
    }
}

.smaller-name {
    font-size: 14px;
}

.avatar-online img {
    border: 2px solid #28c76f;
    /* Online Green */
}

/* Fix for Sidebar Logo Overflow */
.brand-logo {
    max-width: 180px;
    /* Constrain width to fit sidebar */
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* =========================================
   AI STUDIO & POPUPS
   ========================================= */
.ai-popup-container {
    border-radius: 20px !important;
    font-family: var(--font-body);
    border-top: 5px solid var(--accent-color);
}

.ai-icon {
    color: var(--accent-color);
    text-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.ai-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-body li {
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 1rem;
    color: var(--text-main);
}

.ai-body li:last-child {
    border-bottom: none;
}

/* Badge Beta */
.badge-pill {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.main-menu .nav-item {
    margin-bottom: 2px;
    /* Fix for "muy pegado" */
}

.main-menu .nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

/* =========================================
   DASHBOARD SPECIFIC (Widgets)
   ========================================= */
.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-header img {
    max-width: 160px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease;
}

.brand-header img:hover {
    transform: scale(1.05);
}

.vigencia-badge {
    display: inline-flex;
    align-items: center;
    background-color: #EFF6FF;
    /* Blue 50 */
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid #DBEAFE;
    /* Blue 100 */
}

.offer-section h5 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.offer-section p,
.offer-section li {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.btn-action-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* =========================================
   MOBILE & RESPONSIVE UX (Figma Expert Level)
   ========================================= */

/* Mobile First Touch Targets */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        /* Slightly larger text for mobile readability */
    }

    /* Buttons Full Width on Mobile for easier thumbs interaction */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.8rem;
        /* Taller buttons */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Exceptions for small action buttons inside tables/cards */
    .btn-sm,
    .btn-icon,
    .btn-group .btn {
        width: auto;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0;
    }

    /* Form Inputs Taller */
    .form-control,
    .select2-container--default .select2-selection--single {
        height: 48px !important;
        /* Standard Mobile Input Height */
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 46px !important;
    }

    /* Spacing adjustments */
    .content-header {
        margin-top: 1rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center;
    }

    .content-header-title {
        font-size: 1.5rem;
    }

    /* Card Padding reduction on mobile to save space */
    .card-body,
    .dashboard-card-body {
        padding: 1rem;
    }

    /* Better Modal positioning */
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Glassmorphism & Modern Polish */
.card,
.modal-content {
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    /* Softer, modern shadow */
    border-radius: 16px !important;
    /* More rounded -> Modern Layout */
}

.modal-content {
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Floating Labels / Clean Forms */
.form-group label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Status Badges Polish */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 6px;
}

.badge-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.badge-info {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0284C7;
}

.badge-dark {
    background-color: rgba(15, 23, 42, 0.1);
    color: #0F172A;
}

.badge-secondary {
    background-color: #F1F5F9;
    color: #64748B;
}

/* Navigation Refinements */
.header-navbar {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #E2E8F0;
    -webkit-transform: translateZ(0);
    /* Hardware acceleration iOS fix */
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
}

/* Sidebar Toggle Animation */
.menu-toggle {
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-toggle:active {
    transform: scale(0.9);
}

/* Table Row Hover Effect - High End */
.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #F8FAFC !important;
    transform: scale(1.002);
    /* Subtle pop */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 1;
}

/* Custom Scrollbar for Cards with overflow */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}