/**
 * Orgs.ly Minimal Studio - V5
 * A professional, clean, high-whitespace design.
 * Focus: White, Shades of Gray, and Primary Primary (#164f59).
 */

:root {
    /* Color Palette */
    --primary: #164f59;
    --primary-light: #e8f3f5;
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --border-light: #e2e8f0;
    --border-dim: #f1f5f9;
    --secondary: #daac18;
    --secondary-light: rgba(218, 172, 24, 0.12);
    /* Back-compat names used across the theme */
    --secondary-gold: var(--secondary);
    --gold-light: var(--secondary-light);

    /* Text */
    --text-heading: #334155;
    --text-body: #475569;
    --text-muted: #64748b;

    /* Spacing & Radius */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Measurements */
    --sidebar-w-expanded: 260px;
    --sidebar-w-collapsed: 80px;
    --sidebar-w: var(--sidebar-w-expanded);
    --header-h: 70px;

    /* Focus rings */
    --focus-primary: rgba(22, 79, 89, 0.18);
    --focus-secondary: rgba(218, 172, 24, 0.25);
}

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

/* Base Reset & Typography */
/* V5 Typography Core: Total Lockdown */
html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif !important;
}

/* Specific Component Lockdown: DataTables, Select2, Modals, Forms */
.dataTables_wrapper,
.dataTables_wrapper *,
.select2-container,
.select2-container *,
.modal-content,
.modal-content *,
.form-control,
.form-control *,
.btn,
.table,
.table td,
.table th,
.nav-link,
.breadcrumb-chip span,
.user-name-label,
.user-role-label,
.org-name {
    font-family: 'Tajawal', sans-serif !important;
}

[class^="ph-"],
[class*=" ph-"],
.ph,
.ph-fill,
.ph-bold,
.ph-duotone,
[class^="fa-"],
.fa,
.fas,
.far,
.fab,
.glyphicon,
i {
    /* Font family managed by specific classes below */
}

.ph,
.ph-bold,
.ph-duotone,
.ph-fill {
    font-family: "Phosphor" !important;
}

.fa,
.fas,
.far,
.fab {
    font-family: "FontAwesome" !important;
}

/* Global Reset */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.6;
}

/* Layout System: Minimalist Columnar */
#wrapper {
    min-height: 100vh;
    background: var(--bg-main) !important;
    position: relative;
    width: 100%;
}

#page-wrapper {
    min-height: 100vh;
}

.modern-header-v5 {
    right: var(--sidebar-w);
    left: 0;
    width: auto !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed !important;
    top: 0;
    z-index: 1000;
}

#wrapper.collapsed-sidebar .modern-header-v5 {
    right: var(--sidebar-w-collapsed);
}

/* Header Content Alignment */
/* Keep legacy header layout intact; any V5 alignment should be applied surgically in `custom.css`. */

.main-content-area {
    padding: 10px 0 0 var(--space-md);
    /* Reduced top padding */
    max-width: 100%;
}

/* Navigation Sidebar (From 0) */
.modern-sidebar {
    width: var(--sidebar-w) !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    background: var(--primary) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
    z-index: 1050;
    padding: 20px 0 !important;
    overflow-y: auto;
    box-shadow: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group-header {
    display: none !important;
    /* Total suppression as requested */
}

.authority-badge {
    display: none !important;
    /* Badge removal as requested */
}

@media (max-width: 991px) {
    #page-wrapper {
        margin-right: 0 !important;
        padding-top: 70px;
    }

    .navbar.navbar-default.navbar-static-top {
        width: 100% !important;
        right: 0 !important;
        z-index: 1040 !important;
        position: fixed !important;
        top: 0 !important;
    }

    .navbar-default.sidebar {
        right: 0 !important;
        position: fixed !important;
        background: var(--primary) !important;
        /* Force background on mobile */
        width: 280px !important;
        /* Specific width for mobile */
        height: 100vh !important;
        transform: translateX(100%) !important;
        /* Off-screen right */
        visibility: visible !important;
        display: block !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1050 !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2) !important;
    }

    /* When Bootstrap collapse is "in" (toggled by hamburger) */
    .navbar-default.sidebar.in,
    .navbar-default.sidebar.show {
        transform: translateX(0) !important;
        /* Slide-in */
    }

    /* Ensure the toggle button is visible and properly styled */
    .navbar-toggle {
        display: block !important;
        border: none !important;
        background: transparent !important;
        margin: 15px !important;
        float: right !important;
    }

    .navbar-toggle i {
        color: var(--primary) !important;
        /* Darker color for visibility */
        font-size: 24px !important;
    }

    /* Ensure sidebar content is visible on mobile */
    .navbar-default.sidebar .navbar-collapse {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* Hide header logo area on mobile */
    .top-left-part {
        display: none !important;
    }

    /* Minimal padding for mobile content */
    #page-wrapper .container-fluid {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
}

/* Sovereign Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 25, 28, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Unified Workspace Spacing */
@media (min-width: 992px) {
    #page-wrapper .container-fluid {
        padding-top: 15px !important;
        /* Reduced top padding */
        padding-right: 10% !important;
        padding-left: 10% !important;
    }
}

.white-box {
    margin-bottom: 0px !important;
    /* Total removal of bottom gaps */
    padding: 20px !important;
}

.footer {
    display: none !important;
    /* Suppressing empty footer to remove bottom padding */
}

#page-wrapper {
    padding-bottom: 0 !important;
}

/* Collapsed Sidebar State Configuration */
#wrapper.collapsed-sidebar {
    --sidebar-w: var(--sidebar-w-collapsed);
}

#wrapper.collapsed-sidebar .modern-sidebar {
    width: var(--sidebar-w) !important;
}

#wrapper.collapsed-sidebar .sidebar-brand span,
#wrapper.collapsed-sidebar .nav-link span,
#wrapper.collapsed-sidebar .nav-small-cap {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: all 0.2s;
}

#wrapper.collapsed-sidebar .nav-link {
    justify-content: center;
    padding: 8px 0 !important;
}

#wrapper.collapsed-sidebar .nav-link i,
#wrapper.collapsed-sidebar .nav-link [class^="ph-"] {
    margin: 0 !important;
    font-size: 22px;
}

#wrapper.collapsed-sidebar .sidebar-brand {
    justify-content: center;
    padding: 10px 0;
}

/* Sidebar Toggle Button (Floating Circular) */
.sidebar-collapse-btn {
    position: fixed;
    top: 35px;
    right: calc(var(--sidebar-w) - 15px);
    width: 30px;
    height: 30px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary);
    font-size: 14px;
}

.sidebar-collapse-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

#wrapper.collapsed-sidebar .sidebar-collapse-btn {
    transform: rotate(180deg);
}

/* Hide toggle on mobile */
@media (max-width: 991px) {
    .sidebar-collapse-btn {
        display: none;
    }
}

.header-action-btn {
    position: relative;
    z-index: 1100 !important;
    cursor: pointer;
    pointer-events: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-brand {
    padding: 25px var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.sidebar-logo-area img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.authority-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.authority-badge i {
    font-size: 14px;
    color: var(--secondary-gold);
}

.brand-logo-v5 {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s;
}

.nav-group-header {
    padding: 20px 25px 8px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-nav {
    padding: 10px 0 40px;
}

.nav-item {
    margin: 2px var(--space-sm);
}

#wrapper.collapsed-sidebar .nav-item {
    margin: 1px 0 !important;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    text-align: right;
}

.nav-link i,
.nav-link ph-house,
.nav-link [class^="ph-"] {
    width: 20px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 12px;
    /* RTL Spacing */
    transition: color 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.nav-link:hover i {
    color: #ffffff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-weight: 700;
    border-right: 3px solid var(--secondary-gold);
}

.nav-link.active i {
    color: #ffffff;
}

/* Hierarchical Sidebar (V20) */
.nav-item.has-sub {
    position: relative;
}

.nav-item.has-sub>.nav-link::after {
    content: "\e963";
    /* Phosphor light/bold chevron-left */
    font-family: 'Phosphor-Bold' !important;
    /* Fallback or use standard i tag if needed, but styling after is cleaner */
    font-family: "phosphor" !important;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 14px;
    opacity: 0.5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}

/* For RTL the chevron should be on the left (since nav-link is right-aligned) */
#wrapper[dir="rtl"] .nav-item.has-sub>.nav-link::after {
    left: 20px;
    right: auto;
}

.nav-item.has-sub.open>.nav-link::after {
    transform: translateY(-50%) rotate(-90deg);
    opacity: 1;
}

.nav-sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.15) !important;
}

.nav-item.open>.nav-sub-menu {
    max-height: 1200px !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 8px 0 !important;
}

.nav-sub-menu .nav-item {
    margin: 0 !important;
}

.nav-sub-menu .nav-link {
    padding: 10px 45px 10px 20px !important;
    font-size: 13px !important;
    opacity: 0.7;
}

.nav-sub-menu .nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08) !important;
}

.nav-sub-menu .nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Vertical Guide Line */
.nav-sub-menu::before {
    content: '';
    position: absolute;
    right: 28px;
    /* Alignment with parent icons */
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

#wrapper.collapsed-sidebar .nav-item.has-sub>.nav-link::after {
    display: none;
}

#wrapper.collapsed-sidebar .nav-sub-menu {
    display: none !important;
}

.nav-small-cap {
    padding: var(--space-md) var(--space-lg) var(--space-xs);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

/* Main Content Wrapper */
#page-wrapper {
    width: 100%;
    padding-right: var(--sidebar-w) !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    min-height: 100vh;
    background: var(--bg-main) !important;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimal Header (Action Bar) */
.modern-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    height: 70px !important;
    padding: 0 var(--space-xl) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-action-btn {
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--primary);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-action-btn:hover {
    background: rgba(22, 79, 89, 0.05);
}

#toggle-sidebar {
    display: none;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 16px;
    border-radius: 40px;
    transition: background 0.2s;
    border: 1px solid transparent;
}

@media (max-width: 480px) {
    .profile-pill {
        padding: 4px 4px 4px 12px;
        gap: 8px;
    }

    .profile-pill span {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px !important;
    }

    .profile-pill img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Touch Tactile Feedback */
@media (hover: none) {

    .stat-card-v5:active,
    .command-tile:active,
    .btn-v5-premium:active,
    .action-pill:active {
        transform: scale(0.96) !important;
        transition: transform 0.1s !important;
    }
}

/* Mobile Logo in Header */
.mobile-logo-v5 {
    display: none;
}

@media (max-width: 991px) {
    .mobile-logo-v5 {
        display: flex;
        align-items: center;
        margin-right: 10px;
    }

    .mobile-logo-v5 img {
        height: 45px;
        width: auto;
        object-fit: contain;
    }
}

.profile-pill:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-light);
}

/* Premium Dropdown */
.dropdown-premium {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-light) !important;
    border-top: 4px solid var(--primary) !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 8px !important;
    margin-top: 15px !important;
    min-width: 260px !important;
    background: #fff !important;
}

.dropdown-user-summary {
    padding: 16px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    text-align: right;
}

.dropdown-user-summary .user-role {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.dropdown-user-summary .user-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
    margin-top: 2px;
}

.dropdown-premium li a {
    padding: 12px 16px !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-body) !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: all 0.2s !important;
}

.dropdown-premium li a:hover {
    background: var(--bg-main) !important;
    color: var(--primary) !important;
}

.dropdown-premium li a i {
    font-size: 18px;
    color: var(--text-muted);
}

/* Content Area Spacing */
.container-fluid {
    padding: var(--space-xl) !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Global Responsive Stat Grid */
.stat-grid,
.stat-grid-v5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {

    .stat-grid,
    .stat-grid-v5 {
        grid-template-columns: 1fr;
    }
}

/* Global Rapid Action Toolbar (Pill System) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.action-pill {
    background: #fff;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-heading);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.action-pill:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    background: var(--bg-main);
}

.pill-icon-box {
    width: 42px;
    height: 42px;
    background: rgba(22, 79, 89, 0.05);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.action-pill:hover .pill-icon-box {
    background: var(--primary);
    color: #fff;
    transform: rotate(-10deg) scale(1.1);
}

.premium-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.premium-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Profile System (Studio V5) */
.profile-hero {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #0d353b 100%);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-align: center;
}

.cardx::before {
    display: none;
}

.profile-hero::after {
    display: none;
}

.profile-avatar-large {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Studio V5 Button System */
.pill-btn-v5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 100px;
    font-weight: 800;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: none;
    white-space: nowrap;
}

.pill-btn-v5.gold {
    background: var(--secondary-gold);
    background: linear-gradient(135deg, #c5a022 0%, #a6841a 100%);
    color: #fff !important;
}

.pill-btn-v5.primary {
    background: var(--primary);
    color: #fff !important;
}

.pill-btn-v5:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 25px rgba(22, 79, 89, 0.15);
}

.pill-btn-v5.gold:hover {
    box-shadow: 0 12px 30px rgba(197, 160, 34, 0.3);
}

.pill-btn-v5 i {
    font-size: 1.2em;
}

@media (max-width: 991px) {
    .pill-btn-v5 {
        width: 100%;
        padding: 12px 20px !important;
        height: auto !important;
    }
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-nav-tabs {
    display: flex;
    gap: 30px;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 2px;
}

.profile-nav-link {
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none !important;
    position: relative;
    transition: color 0.2s;
}

.profile-nav-link.active {
    color: var(--primary);
}

.profile-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

/* High-Fidelity Profile Sections (V19) */
.settings-block {
    margin-bottom: var(--space-xl);
}

.settings-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--space-lg);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.settings-block-header i {
    font-size: 20px;
    color: var(--primary);
}

.settings-block-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
}

.input-group-v5 {
    position: relative;
    margin-bottom: 20px;
}

.input-group-v5 i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    /* RTL placement */
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-group-v5 input {
    width: 100%;
    height: 52px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0 48px 0 16px;
    /* Space for icon on the right */
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group-v5 input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(22, 79, 89, 0.04), 0 0 0 4px rgba(22, 79, 89, 0.05);
    outline: none;
}

.input-group-v5 input:focus+i {
    color: var(--primary);
}

.btn-v5-premium {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    height: 54px;
    padding: 0 30px;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(22, 79, 89, 0.1);
    width: 100%;
}

.btn-v5-premium:hover {
    background: #0d353b;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(22, 79, 89, 0.15);
}

.btn-v5-premium i {
    font-size: 18px;
}

.pill-btn-v5.gold {
    background: linear-gradient(135deg, #c5a022 0%, #ab8b1d 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 34, 0.3);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.pill-btn-v5.gold:hover {
    background: linear-gradient(135deg, #ab8b1d 0%, #8e7318 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(197, 160, 34, 0.45);
}

.pill-btn-v5.gold:active {
    transform: translateY(0) scale(0.98);
}

/* Bulk Execution Action Button */
.execute-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #0d353b 100%);
    color: #fff;
    border: none;
    height: 42px;
    width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(22, 79, 89, 0.2);
    position: relative;
    overflow: hidden;
}

.execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 79, 89, 0.3);
    filter: brightness(1.1);
}

.execute-btn:active {
    transform: translateY(0) scale(0.95);
}

.execute-btn i {
    font-size: 18px;
    transition: transform 0.2s;
}

.execute-btn:hover i {
    transform: translateX(2px);
}

/* Executive Workspace (V20) */
.profile-workspace-v2 {
    display: flex;
    gap: 30px;
    margin-top: var(--space-xl);
}

.settings-nav-rail {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-rail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
}

.nav-rail-item i {
    font-size: 20px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-rail-item:hover {
    background: rgba(22, 79, 89, 0.03);
    color: var(--primary);
}

.nav-rail-item.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-color: rgba(22, 79, 89, 0.05);
}

.nav-rail-item.active i {
    color: var(--primary);
}

.glass-hero-v2 {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #0d353b 100%);
    border-radius: 20px;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.glass-hero-v2-identity {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 2;
}

.hero-avatar-v2 {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.hero-avatar-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text-fields h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-text-fields p {
    margin: 5px 0 0;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.8;
}

@media (max-width: 991px) {
    .profile-workspace-v2 {
        flex-direction: column;
    }

    .settings-nav-rail {
        flex: none;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .nav-rail-item {
        white-space: nowrap;
    }
}

.card-header-v5 .title-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
}

.card-header-v5 .title-info p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Suppression of decorative subtitles/descriptions across various sections */
.header-v5 p,
.card-header-v5 .title-info p,
.hero-text-fields p,
.command-tile .tile-info p,
.minimal-dashboard h1+p,
.settings-block-header p {
    display: none !important;
}

/* Redefine white-box as an alias for transition period if needed */
.white-box {
    composes: premium-card;
    margin-bottom: var(--space-xl) !important;
}

/* Search bar removed */

.bg-title {
    margin-bottom: var(--space-lg) !important;
    padding: 0 !important;
    background: transparent !important;
}

.page-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--text-heading) !important;
    margin: 0;
}

@media (max-width: 991px) {
    .page-title {
        font-size: 22px !important;
    }

    .minimal-dashboard h1 {
        font-size: 24px !important;
    }
}

/* Component: Clean Card Tiles */
.clean-tile {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: border-color 0.2s;
}

.clean-tile:hover {
    border-color: var(--primary);
}

.stat-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-box {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-box .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-box .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

/* Buttons & Forms */
.btn-minimal {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text-body);
}

.btn-minimal:hover {
    background: var(--border-dim);
}

.btn-minimal-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-minimal-primary:hover {
    background: #0d353b;
    border-color: #0d353b;
}

/* Custom Overrides */
.white-box {
    background: var(--surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-md) !important;
    margin-bottom: var(--space-md) !important;
    box-shadow: none !important;
}

/* Responsive & Mobile Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.sidebar-overlay.active {
    width: 100%;
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Layout Utilities & Sticky Actions */
.mobile-sticky-bar {
    display: none;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 991px) {
    #page-wrapper {
        padding-right: 0 !important;
    }

    .container-fluid {
        padding: 14px !important;
    }

    .modern-header {
        padding: 0 14px !important;
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid var(--border-light);
    }

    .modern-sidebar {
        right: -300px !important;
        backdrop-filter: blur(20px);
        background: rgba(22, 79, 89, 0.95) !important;
    }

    .modern-sidebar.show {
        right: 0 !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15) !important;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    #toggle-sidebar {
        display: flex !important;
    }
}

/* Phase 3 Mobile Utilities */
.v5-scroll-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 20px;
    gap: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
}

.v5-scroll-rail::-webkit-scrollbar {
    display: none;
}

.v5-scroll-rail>* {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

/* Sticky Column Management */
.v5-table-wrapper {
    position: relative;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px;
    border-radius: 0;
}

.v5-table-sticky th:nth-child(1),
.v5-table-sticky td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.v5-table-sticky th:nth-child(2),
.v5-table-sticky td:nth-child(2) {
    position: sticky;
    left: 45px;
    /* Adjust according to checkbox width */
    z-index: 5;
    background: #fff;
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.05);
}

.v5-table-sticky th:nth-child(1),
.v5-table-sticky th:nth-child(2) {
    z-index: 10;
}

/* Phase 3.2: Modern Spacing & Selection */
.v5-dashboard-section {
    margin-bottom: 40px !important;
}

.v5-command-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v5-command-stack .command-tile,
.v5-command-stack .action-pill {
    width: 100% !important;
    flex: none !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-align: right !important;
    /* Support RTL */
    min-height: auto !important;
}

.v5-command-stack .tile-icon,
.v5-command-stack .pill-icon-box {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    font-size: 18px !important;
}

.global-selection-alert {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Phase 3.5: Omni-Console Architecture (Built From Zero) */
.omni-console-v5 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 15px !important;
    background: #ffffff;
    border-bottom: 2px solid var(--border-dim);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 100;
}

.omni-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Desktop Console Components */
.omni-search {
    position: relative;
    flex: 2;
    min-width: 280px;
}

.omni-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
    z-index: 5;
}

.omni-search input {
    width: 100%;
    padding: 10px 45px 10px 15px !important;
    border-radius: 14px !important;
    border: 1.5px solid #f1f5f9 !important;
    background: #f8fafc !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.omni-search input:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(22, 79, 89, 0.08) !important;
    outline: none;
}

.omni-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(22, 79, 89, 0.1);
}

.omni-actions select {
    background: transparent;
    border: none;
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
    padding: 4px 10px;
    outline: none;
    cursor: pointer;
}

.omni-btn-execute {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.omni-btn-execute:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(22, 79, 89, 0.3);
}

/* Mobile Interaction Palette (The thumb-zone command center) */
.mobile-action-palette {
    display: none;
    /* Controlled by JS Selection */
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: rgba(22, 79, 89, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px;
    z-index: 2000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: palettePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes palettePop {
    from {
        bottom: -100px;
        opacity: 0;
    }

    to {
        bottom: 25px;
        opacity: 1;
    }
}

.palette-info {
    display: flex;
    flex-direction: column;
    color: #fff;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.palette-info span:first-child {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 0.7;
}

.palette-info span:last-child {
    font-size: 16px;
    font-weight: 900;
}

.palette-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.palette-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none !important;
    transition: transform 0.2s;
}

.palette-btn i {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.palette-btn span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .omni-console-v5 {
        flex-direction: column;
        padding: 15px !important;
    }

    .omni-actions {
        display: none;
    }

    /* Moved to Bottom Palette */

    .omni-search {
        width: 100% !important;
        min-width: auto;
    }

    .mobile-action-palette.active {
        display: block;
    }

    /* Compact Table Matrix for Mobile (V25) */
    .table-v5 thead th {
        padding: 8px 6px !important;
        font-size: 10px !important;
    }

    .table-v5 tbody td {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }

    .badge-v5 {
        padding: 2px 6px;
        font-size: 9px;
    }

    .status-pill-v5 {
        padding: 2px 8px;
        gap: 5px;
    }

    .indicator-dot {
        width: 6px;
        height: 6px;
    }
}

.mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    z-index: 1040;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
    align-items: center;
    justify-content: center;
}

.has-sticky-bar {
    padding-bottom: 100px !important;
}

.mobile-only {
    display: block !important;
}

.desktop-only {
    display: none !important;
}


@media (max-width: 480px) {
    .stat-grid-v5 {
        gap: 10px;
    }

    .stat-card-v5 {
        padding: 12px;
        gap: 10px;
    }

    .stat-card-v5 .icon-box {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-card-v5 .stat-value {
        font-size: 20px;
    }
}

/* Login Workspace (V21) */
.login-workspace {
    width: 100%;
    min-height: 100vh;
    background: var(--primary);
    background: linear-gradient(135deg, #164f59 0%, #0d1e21 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-workspace::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-brand {
    text-align: center;
    margin-bottom: 35px;
}

.login-brand img {
    width: 200px;
    height: auto;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard V5 (Executive Command Center) */
.minimal-dashboard {
    padding: 10px 0;
}

.stat-grid-v5 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 1600px) {
    .stat-grid-v5 {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1400px) {
    .stat-grid-v5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card-v5 {
    background: #ffffff;
    border-radius: 18px;
    padding: 15px 20px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    z-index: 1;
}

.stat-card-v5::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.stat-card-v5:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(22, 79, 89, 0.12);
    border-color: var(--primary-light);
}

.stat-card-v5 .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 0;
    background: var(--primary-light);
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px -3px rgba(22, 79, 89, 0.08);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .stat-card-v5 {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
    }

    .stat-card-v5 .stat-info-v5 {
        text-align: right;
        width: 100%;
    }
}

.stat-card-v5:hover .icon-box {
    transform: scale(1.1) rotate(-5deg);
}

.stat-card-v5.primary .icon-box {
    background: rgba(22, 79, 89, 0.1);
    color: #164f59;
}

.stat-card-v5.info .icon-box {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.stat-card-v5.success .icon-box {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-card-v5.danger .icon-box {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-card-v5.gold .icon-box {
    background: var(--gold-light);
    color: var(--secondary-gold);
}

.stat-card-v5.gold:hover {
    border-color: var(--secondary-gold);
}

.stat-card-v5 .stat-info-v5 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.stat-card-v5 .stat-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-card-v5 .stat-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.stat-card-v5 .stat-footer {
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

/* Command Center Tiles */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.command-tile {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-light);
    display: flex;
    gap: 20px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-tile:hover {
    border-color: var(--primary);
    background: var(--bg-main);
    transform: scale(1.02);
}

.command-tile .tile-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-main);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.3s;
}

.command-tile:hover .tile-icon {
    background: var(--primary);
    color: #fff;
}

.command-tile .tile-info h5 {
    margin: 0 0 4px 0;
    font-weight: 900;
    color: var(--text-heading);
    font-size: 16px;
}

.command-tile .tile-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .stat-grid-v5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stat-grid-v5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modern Premium Preloader */
.preloader {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: fixed;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    visibility: visible;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modern-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spinner-spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

@keyframes spinner-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Rapid Actions Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-pill {
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-pill .pill-icon-box {
    width: 36px;
    height: 36px;
    background: var(--bg-main);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    transition: all 0.3s;
}

.action-pill span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
}

.action-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.action-pill:hover .pill-icon-box {
    background: var(--primary);
    color: #fff;
}

/* Gold Variant */
.action-pill.gold .pill-icon-box {
    background: var(--gold-light);
    color: var(--secondary-gold);
}

.action-pill.gold:hover {
    border-color: var(--secondary-gold);
}

.action-pill.gold:hover .pill-icon-box {
    background: var(--secondary-gold);
    color: #fff;
}

/* Executive Knowledge Grid (V25) */
.table-v5-wrapper {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Intelligent Scroll Shadows for Tables */
.table-responsive {
    background: linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to right, rgba(255, 255, 255, 0), #fff 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
    border-radius: 12px;
}

.table-v5 {
    width: 100% !important;
    margin-bottom: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table-v5 thead tr {
    background: #f8fafc;
}

.table-v5 thead th {
    padding: 14px 12px !important;
    color: var(--text-muted) !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-light) !important;
    white-space: nowrap;
    text-align: center !important;
}

/* Phase 3.7: Clean Table Matrix (Remove sorting clutter) */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
    display: none !important;
}

/* Single Modern Indicator */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: var(--primary) !important;
    background: rgba(22, 79, 89, 0.04) !important;
}

table.dataTable thead th.sorting_asc::after {
    content: '↑';
    position: absolute;
    left: 8px;
    font-weight: 900;
}

table.dataTable thead th.sorting_desc::after {
    content: '↓';
    position: absolute;
    left: 8px;
    font-weight: 900;
}

.table-v5 tbody td {
    padding: 12px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border-dim) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-heading);
    text-align: center !important;
    transition: all 0.2s;
}

.table-v5 tbody tr:hover td {
    background: rgba(22, 79, 89, 0.03);
    color: var(--primary);
}

/* Phase 3.6: Table Intelligence & Fidelity */
.v5-table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background: rgba(248, 250, 252, 0.95) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-v5 tr.row-selected td {
    background: rgba(22, 79, 89, 0.05) !important;
    border-bottom: 1.5px solid var(--primary-light) !important;
}

/* Status Indicator Dot System */
.status-pill-v5 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid var(--border-dim);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    background: #cbd5e1;
}

.indicator-dot.active {
    background: #22c55e;
}

.indicator-dot.blocked {
    background: #ef4444;
}

.indicator-dot.pending {
    background: #f59e0b;
}

.indicator-dot.pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Row Action Components */
.action-stack {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-pill-v5 {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
    text-decoration: none !important;
}

.action-pill-v5 i {
    font-size: 16px;
}

.action-pill-v5.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.action-pill-v5.primary:hover {
    background: var(--primary);
    color: #fff;
}

.action-pill-v5.warning {
    background: #fffbeb;
    color: #d97706;
}

.action-pill-v5.warning:hover {
    background: #fbbf24;
    color: #fff;
}

.action-pill-v5.danger {
    background: #fef2f2;
    color: #ef4444;
}

.action-pill-v5.danger:hover {
    background: #ef4444;
    color: #fff;
}

.action-pill-v5.info {
    background: #f0f9ff;
    color: #0ea5e9;
}

.action-pill-v5.info:hover {
    background: #0ea5e9;
    color: #fff;
}

.action-pill-v5:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Data Badge System */
.badge-v5 {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    white-space: nowrap;
}

.badge-v5.secondary {
    background: var(--border-dim);
    color: var(--text-muted);
}

.badge-v5.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-v5.success {
    background: #ecfdf5;
    color: #10b981;
}

.badge-v5.warning {
    background: #fffbe9;
    color: #b45309;
}

.badge-v5.danger {
    background: #fef2f2;
    color: #ef4444;
}

.badge-v5.info {
    background: #f0f9ff;
    color: #0ea5e9;
}

.badge-v5.gold {
    background: var(--gold-light);
    color: var(--secondary-gold);
}

/* Numerical Metadata Badges (Poppins Forced) */
.id-badge {
    font-family: 'Poppins', sans-serif !important;
    background: #334155;
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.paper-badge {
    font-family: 'Poppins', sans-serif !important;
    background: #fff;
    border: 1.5px solid var(--border-light);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.member-count {
    font-family: 'Poppins', sans-serif !important;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 12px;
}

.phone-badge {
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px;
    color: var(--text-heading);
    font-weight: 700;
}

/* Twin-Card Modern Layout */
.twin-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

.twin-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 12px 30px rgba(22, 79, 89, 0.05);
}

.card-header-v5 {
    background: rgba(22, 79, 89, 0.02);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-v5 i {
    font-size: 22px;
    color: var(--primary);
}

.card-header-v5 h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
}

/* Filter Controls */
.filter-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.reset-filters {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.reset-filters:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: var(--primary-light);
}

/* Legacy Search Hub replaced by Phase 3.5 Omni-Search */


/* Executive Matrix Multi-Checkbox Filter (V25 Final) */
.filter-row {
    background: rgba(22, 79, 89, 0.04);
}

.filter-row th {
    padding: 6px 4px !important;
    border-bottom: 2.5px solid var(--border-light) !important;
    vertical-align: middle !important;
    position: relative;
    text-align: center !important;
}

/* Floating Filter Matrix Button */
.matrix-filter-btn {
    width: 100%;
    height: 30px;
    background: #fff;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
}

.matrix-filter-btn:hover {
    border-color: var(--primary);
    background: rgba(22, 79, 89, 0.02);
    color: var(--primary);
}

.matrix-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Floating Filter Menu Workspace */
.floating-filter-menu {
    position: absolute;
    top: 100%;
    right: 4px;
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    display: none;
    text-align: right;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease-out;
    min-width: 220px;
    /* Enforced Minimum Width */
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-search-wrapper {
    padding: 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.menu-search-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1.5px solid var(--border-light);
    font-size: 11px;
    font-weight: 700;
}

.menu-options-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 8px 0;
}

.menu-options-list::-webkit-scrollbar {
    width: 5px;
}

.menu-options-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.filter-option {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.filter-option:hover {
    background: #f1f5f9;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.filter-option span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
}

.menu-footer {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
}

.menu-action-btn {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-action-btn:hover {
    text-decoration: underline;
}

/* Phase 3.8: Executive Detail Hub (V25) */
.authority-tag-v5 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-main);
    border: 1.5px solid var(--primary-light);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.executive-avatar-v5 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a5e6a 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    margin: 0 auto 20px;
    box-shadow: 0 15px 35px rgba(22, 79, 89, 0.2);
    border: 4px solid #fff;
}

.registration-shield-v5 {
    background: #fff;
    border: 2px solid var(--border-light);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.shield-header {
    background: #f8fafc;
    padding: 10px 15px;
    border-bottom: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.shield-body {
    padding: 15px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
}

.shield-data-point {
    text-align: center;
}

.shield-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.shield-value {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

.shield-divider {
    width: 2px;
    height: 30px;
    background: var(--border-light);
}

.pulse-success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 991px) {
    .executive-avatar-v5 {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .registration-shield-v5 {
        margin-top: 15px;
    }
}

/* Special High-Density Inputs for Names/IDs */
.matrix-text-input {
    width: 100%;
    height: 30px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s;
}

.matrix-text-input:focus {
    border-color: var(--primary);
}

/* V5 Global Console: Command Header */
.modern-header-v5 {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light) !important;
    height: var(--header-h);
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.header-console-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    height: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-breadcrumb-v5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.breadcrumb-chip {
    padding: 6px 14px;
    background: var(--bg-main);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.breadcrumb-chip.home {
    color: var(--primary);
}

.breadcrumb-chip.current {
    color: var(--text-heading);
    background: #fff;
    border: 1px solid var(--border-dim);
}

.breadcrumb-chip span {
    line-height: 1;
}

.header-breadcrumb-v5 .separator {
    font-size: 10px;
    opacity: 0.3;
}

/* Organization Pulse Indicator */
.org-pulse-badge {
    padding: 8px 16px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-pulse-badge .pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: org-pulse 1.5s infinite;
}

@keyframes org-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.org-pulse-badge .org-name {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Profile Pill V5 */
.profile-pill-v5 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px !important;
    border-radius: 30px;
    transition: all 0.3s;
    text-decoration: none !important;
}

.profile-pill-v5:hover {
    background: rgba(0, 0, 0, 0.02);
}

.user-name-label {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: var(--text-heading);
    line-height: 1.1;
}

.user-role-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.profile-image-wrapper img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Identity Hub Dropdown */
.dropdown-premium-v5 {
    margin-top: 15px !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
    padding: 10px 0 !important;
    min-width: 240px !important;
    overflow: hidden;
}

.dropdown-identity-hub {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 8px;
}

.hub-role {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
}

.hub-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-heading);
    margin-top: 4px;
}

.dropdown-premium-v5 li a {
    padding: 12px 25px !important;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.dropdown-premium-v5 li a i {
    font-size: 20px;
    color: var(--text-muted);
}

.dropdown-premium-v5 li a:hover {
    background: var(--bg-main) !important;
}

.dropdown-premium-v5 li a:hover i {
    color: var(--primary);
}

.logout-link {
    color: #ef4444 !important;
}

.logout-link i {
    color: #ef4444 !important;
}

/* Tablet/Mobile Adjustments */
.mobile-logo-v5 {
    display: none;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin-left: 15px;
}

.mobile-logo-v5 img {
    height: 32px;
    width: auto;
}

@media (max-width: 991px) {
    .mobile-logo-v5 {
        display: flex;
    }

    .header-breadcrumb-v5 {
        display: none !important;
    }

    .org-pulse-badge {
        display: none !important;
    }

    .user-info-v5 {
        display: none !important;
    }

    .header-left {
        gap: 10px;
    }

    .header-right {
        gap: 10px;
    }

    .profile-image-wrapper img {
        width: 32px;
        height: 32px;
    }
}

#wrapper {
    position: relative !important;
    min-height: 100vh !important;
}

.navbar-default.sidebar {
    background: var(--primary) !important;
    border: none !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    /* Stretches to bottom of #wrapper */
    width: var(--sidebar-w) !important;
    right: 0 !important;
    z-index: 10;
    margin: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-nav.navbar-collapse {
    padding: 0 !important;
    margin-top: 0 !important;
    /* Removed huge gap below logo */
}

#side-menu {
    padding: 15px 0 !important;
}

#side-menu li {
    margin-bottom: 0 !important;
    padding: 0 !important;
    /* Flush with sidebar edges */
}

#side-menu li a {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 15px 20px !important;
    border-radius: 0 !important;
    /* No rounded corners for flush look */
    font-size: 14px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

#side-menu li a i {
    font-size: 18px !important;
    width: 24px !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

#side-menu li a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

#side-menu li a:hover i {
    color: var(--secondary-gold) !important;
}

#side-menu li a.active {
    background: rgba(255, 255, 255, 0.15) !important;
    /* Subtle highlight instead of white card */
    color: #ffffff !important;
    border-right: 4px solid var(--secondary-gold) !important;
    /* Right border for RTL active state */
}

#side-menu li a.active i {
    color: var(--secondary-gold) !important;
}

/* Submenu Styling */
.nav-second-level {
    background: rgba(0, 0, 0, 0.15) !important;
    margin: 5px 0 10px 0 !important;
    padding: 10px 0 !important;
    border-radius: var(--radius-md) !important;
}

.nav-second-level li {
    margin-bottom: 2px !important;
    padding: 0 10px !important;
}

.nav-second-level li a {
    padding: 8px 15px 8px 45px !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 400 !important;
}

.nav-second-level li a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Scrollbar refinement */
.slimScrollDiv,
.slimscrollsidebar {
    background: transparent !important;
}

/* Global Scrollbar (Main Content) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Specific Scrollbar (Dark Theme) */
.navbar-default.sidebar ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.navbar-default.sidebar ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--primary);
}

.navbar-default.sidebar ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Branding area in sidebar (Visible on Mobile only as requested) */
.sidebar-logo-area {
    display: none !important;
    /* Hidden by default on desktop */
    padding: 25px 15px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-logo-area img {
    max-width: 85% !important;
    /* Fits sidebar width with breathing room */
    height: auto !important;
    max-height: 80px !important;
}

@media (max-width: 991px) {
    .sidebar-logo-area {
        display: block !important;
    }
}

/* Dashboard Statistics Modernization (Panel-Danger Override) */
.panel-danger {
    background: var(--surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    margin-bottom: 25px !important;
}

.panel-danger:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(22, 79, 89, 0.08) !important;
}

.panel-danger>.panel-heading {
    background: var(--primary) !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.panel-danger>.panel-heading .panel-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    margin: 0 !important;
    font-family: 'Tajawal', sans-serif !important;
}

.panel-danger>.panel-heading .panel-title font {
    color: #ffffff !important;
}

.panel-danger .two-part {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 25px 20px !important;
    margin: 0 !important;
}

.panel-danger .two-part li {
    padding: 0 !important;
}

.panel-danger .two-part li i {
    font-size: 32px !important;
    background: rgba(22, 79, 89, 0.05) !important;
    color: var(--primary) !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.panel-danger:hover .two-part li i {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.panel-danger .counter {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--text-heading) !important;
    font-family: 'Tajawal', sans-serif !important;
    display: block !important;
}

.panel-danger .text-right {
    flex-grow: 1;
}

/* Responsive adjustments for stats */
@media (max-width: 768px) {
    .panel-danger .counter {
        font-size: 24px !important;
    }

    .panel-danger .two-part li i {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
}