:root, [data-theme="light"] {
    /* Color Palette - Executive Light Professional */
    --bg-color: #f1f5f9;        /* Soft Slate tint to highlight white cards */
    --surface-color: #ffffff;   /* Pure crisp white cards/panels */
    --card-bg: #ffffff;
    --text-primary: #0f172a;    /* Deep Ink Black Slate */
    --text-secondary: #475569;  /* Sharp Slate Gray */
    
    --primary-color: #2563eb;   /* Vibrant Royal Blue */
    --primary-hover: #1d4ed8;
    --sidebar-bg: #ffffff;      /* White sidebar */
    --sidebar-hover: #e2e8f0;   /* Light sidebar hover */
    --topnav-bg: #ffffff;
    --input-bg: #ffffff;
    --table-header-bg: #e0f2fe;
    --table-hover: rgba(56, 189, 248, 0.2);
    --modal-bg: #ffffff;
    --overlay-backdrop: rgba(255, 255, 255, 0.7);
    
    --border-color: #e2e8f0;    /* Light borders */
    
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;

    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 8px 10px -4px rgba(15, 23, 42, 0.06);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Color Palette - Sleek Dark Professional */
    --bg-color: #0b0f19;         /* Deep obsidian dark background */
    --surface-color: #111827;    /* Slate 900 panel */
    --card-bg: #1e293b;         /* Slate 800 cards */
    --text-primary: #ffffff;     /* Pure Crisp Bright White Text */
    --text-secondary: #e2e8f0;   /* Bright Readable Soft White Text */
    
    --primary-color: #38bdf8;    /* Bright electric cyan/blue */
    --primary-hover: #0284c7;
    --sidebar-bg: #0f172a;       /* Midnight navy sidebar */
    --sidebar-hover: #1e293b;    /* Dark hover accent */
    --topnav-bg: #0f172a;        /* Topbar matching navy */
    --input-bg: #1e293b;         /* Dark input fields */
    --table-header-bg: #075985;  /* Dark table headers */
    --table-hover: rgba(56, 189, 248, 0.2);
    --modal-bg: #111827;         /* Dark modal window */
    --overlay-backdrop: rgba(0, 0, 0, 0.7);
    
    --border-color: #1e293b;     /* Dark subtle border */
    
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #38bdf8;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 30px 0 rgba(0, 0, 0, 0.6);
}

/* Custom Executive Scrollbar Styling */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    background-clip: content-box;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Vercel / Apple Style Executive Ambient Cursor Spotlight */
#ambientCursorSpotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(37, 99, 235, 0.05) 45%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: 0;
    will-change: transform;
}

[data-theme="light"] #ambientCursorSpotlight {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.03) 45%, transparent 70%);
}

/* Card & Button Radial Spotlight Highlights on Hover */
.card, .stat-card, .recent-projects-section, .btn, .action-btn {
    position: relative;
}

.card::after, .stat-card::after, .recent-projects-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle 220px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.08), transparent 80%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Admin Master Live FX Toggle Button Styling */
#adminLiveFxBtn {
    height: 38px;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(56, 189, 248, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

#adminLiveFxBtn:hover {
    transform: scale(1.04);
}

/* Master Live FX Off Overrides - Hides Canvas, Orbs, and Spotlights for Plain View */
html.live-fx-off #globalBgCanvas,
html.live-fx-off .ambient-orb-wrapper,
html.live-fx-off #ambientCursorSpotlight,
html.live-fx-off #bgCanvas {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

html.live-fx-off .recent-projects-section,
html.live-fx-off .stat-card,
html.live-fx-off .page-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Global Live Professional Background Elements */
#globalBgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.ambient-orb-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(95px);
    opacity: 0.35;
    pointer-events: none;
    animation: floatGlow 18s ease-in-out infinite alternate;
}

.global-orb-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, #38bdf8 0%, #2563eb 100%);
}

.global-orb-2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, #818cf8 0%, #4f46e5 100%);
    animation-delay: -9s;
}

.global-orb-3 {
    width: 320px;
    height: 320px;
    top: 40%;
    right: 25%;
    background: radial-gradient(circle, #34d399 0%, #059669 100%);
    opacity: 0.22;
    animation-delay: -5s;
}

.global-orb-4 {
    width: 360px;
    height: 360px;
    bottom: 20%;
    left: 20%;
    background: radial-gradient(circle, #f59e0b 0%, #d97706 100%);
    opacity: 0.18;
    animation-delay: -12s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(60px, 40px) scale(1.1);
    }
    100% {
        transform: translate(-40px, 60px) scale(0.95);
    }
}

.dashboard-container, .main-content, .top-nav, .sidebar {
    position: relative;
    z-index: 2;
}

.recent-projects-section, .stat-card, .page-header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, label {
    color: var(--text-secondary);
}

/* Top Loading Line (Left to Right Progress Bar) */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
    z-index: 99999;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.9), 0 0 6px rgba(52, 211, 153, 0.7);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.top-progress-bar.active {
    opacity: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.logo:hover i {
    transform: rotate(12deg) scale(1.1);
}

.live-dot-pulse {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.nav-links {
    list-style: none;
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
}

.nav-links li {
    margin-bottom: 8px;
    position: relative;
}

.nav-links li.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--primary-color);
    animation: activeGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes activeGlowPulse {
    0% {
        box-shadow: 0 0 6px var(--primary-color);
    }
    100% {
        box-shadow: 0 0 16px var(--primary-color);
    }
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: transform 0.25s ease, color 0.25s ease;
}

.nav-links a:hover i {
    transform: translateY(-2px) scale(1.15);
    color: var(--primary-color);
}

.nav-links a i.fa-shield-halved {
    animation: shieldBreathing 3s ease-in-out infinite alternate;
}

@keyframes shieldBreathing {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.3));
    }
    100% {
        transform: scale(1.12);
        filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
    }
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
}

.nav-links a:hover::after {
    left: 120%;
}

.nav-links a:hover, .nav-links li.active a {
    background-color: var(--sidebar-hover);
    color: var(--primary-color);
}

.nav-links li.active a {
    background-color: rgba(59, 130, 246, 0.1);
}

.badge {
    margin-left: auto;
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Submenu Styles */
.submenu {
    list-style: none;
    padding-left: 48px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.has-submenu.open .submenu {
    max-height: 200px;
    padding-bottom: 8px;
}

.has-submenu.open .submenu-icon {
    transform: rotate(180deg);
}

.submenu li a {
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dashboard Enhancements */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 16px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    gap: 12px;
}

.quick-action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.quick-action-card i {
    font-size: 2rem;
    opacity: 0.9;
}

.quick-action-card span {
    font-weight: 600;
    font-size: 1rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.submenu li a:hover {
    color: var(--primary-color);
    background: none;
}

.submenu-icon {
    transition: transform 0.3s ease;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--danger);
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.logout-link:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: block;
    position: relative;
    padding-bottom: 70px;
    min-width: 0; /* Prevents overflow */
    min-height: 100vh;
    transition: var(--transition);
}

/* Top Navigation - 100% Fixed Sticky Header Bar */
.top-nav {
    height: 70px;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 990;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

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

.menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transform: scale(1.08);
}

/* Slideable Sidebar & Main Content Alignment Transitions */
.sidebar {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.main-content {
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Collapsed Slide-Out State */
body.sidebar-collapsed .sidebar {
    transform: translateX(-260px) !important;
}

body.sidebar-collapsed .main-content {
    margin-left: 0 !important;
}

.search-bar-container {
    position: relative;
    display: inline-block;
}

.search-bar, 
.search-bar form, 
.search-bar-container form {
    display: flex;
    align-items: center;
    background-color: var(--surface-color) !important;
    background: var(--surface-color) !important;
    border: 1.5px solid var(--border-color);
    border-radius: 26px;
    height: 44px;
    padding: 0 18px;
    width: 380px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 20px rgba(37, 99, 235, 0.12);
    width: 420px;
}

.search-bar i, .search-bar button {
    color: var(--primary-color);
    font-size: 1rem;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    transition: transform 0.2s ease;
}

.search-bar:focus-within i, .search-bar:focus-within button {
    transform: scale(1.15);
}

.search-bar input,
.search-bar input:focus,
.search-bar input:active,
.search-bar input:hover,
.search-bar input:focus-visible {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    outline-style: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    color: var(--text-primary) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding-left: 10px !important;
}

.search-bar input:-webkit-autofill,
.search-bar input:-webkit-autofill:hover, 
.search-bar input:-webkit-autofill:focus,
.search-bar input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--surface-color) inset !important;
    box-shadow: 0 0 0px 1000px var(--surface-color) inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Instant Live Search Suggestions Dropdown */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 420px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.2);
    z-index: 99999;
    overflow: hidden;
    display: none;
    max-height: 380px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
    gap: 12px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-color);
}

.suggestion-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.2);
    white-space: nowrap;
}
    padding-left: 8px;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
    opacity: 0.75;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

/* Header Dropdowns & Notification Center */
.notification-badge-counter {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    border: 2px solid var(--surface-color);
    line-height: 1;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.user-profile-trigger:hover {
    background: var(--bg-color);
    border-color: var(--border-color);
}

.user-profile-trigger img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.user-role-badge {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dropdown-arrow-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.2);
    z-index: 99999;
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Notification Dropdown */
.notification-menu {
    width: 340px;
    overflow: hidden;
}

.dropdown-header-bar {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-body-content {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--bg-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.notification-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--primary-color);
    margin-top: 4px;
    font-weight: 500;
}

.dropdown-footer-link {
    display: block;
    padding: 12px;
    text-align: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    transition: background 0.2s;
}

.dropdown-footer-link:hover {
    background: rgba(37, 99, 235, 0.15);
}

/* User Menu */
.user-menu {
    width: 240px;
    overflow: hidden;
    padding: 8px 0;
}

.dropdown-user-card {
    padding: 12px 18px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-user-card img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.user-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-card-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.dropdown-menu-list {
    padding: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item i {
    font-size: 0.95rem;
    color: var(--text-secondary);
    width: 18px;
    text-align: center;
}

.dropdown-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger i {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Content Wrapper */
.content-wrapper {
    padding: 32px;
    flex: 1;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface-color) !important;
    padding: 20px 22px !important;
    border-radius: 14px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.stat-card::before {
    display: none !important;
}

.stat-card:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-3px) !important;
    border-color: var(--border-color) !important;
}

.stat-icon-wrapper, .stat-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    border: none !important;
    flex-shrink: 0 !important;
    transition: transform 0.25s ease !important;
}

.stat-card:hover .stat-icon-wrapper, .stat-card:hover .stat-icon {
    transform: scale(1.08) !important;
}

.stat-details {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    text-align: left !important;
}

.stat-details h3, .stat-title {
    font-size: 0.775rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin: 0 0 2px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: none !important;
}

.stat-details h2, .stat-number {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.1 !important;
    text-shadow: none !important;
}

.stat-trend, .trend {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: var(--bg-color) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid var(--border-color) !important;
    width: fit-content !important;
}

/* Subtle Pastel Soft Accent Variants for Icon Badges & Icons */
.stat-indigo .stat-icon-wrapper {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #4f46e5 !important;
}
.stat-indigo .stat-icon-wrapper i {
    color: #4f46e5 !important;
}

.stat-blue .stat-icon-wrapper {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
}
.stat-blue .stat-icon-wrapper i {
    color: #2563eb !important;
}

.stat-emerald .stat-icon-wrapper {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}
.stat-emerald .stat-icon-wrapper i {
    color: #059669 !important;
}

.stat-amber .stat-icon-wrapper {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
}
.stat-amber .stat-icon-wrapper i {
    color: #d97706 !important;
}

.stat-rose .stat-icon-wrapper {
    background: rgba(244, 63, 94, 0.12) !important;
    color: #e11d48 !important;
}
.stat-rose .stat-icon-wrapper i {
    color: #e11d48 !important;
}

/* Recent Projects Section */
.recent-projects-section {
    background-color: var(--surface-color);
    border-radius: 16px;
    box-sizing: border-box;
    max-width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none !important; /* Force remove underline for anchor tags */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Table *//* Table Container - Strictly No Horizontal Scroll */
.table-container {
    width: 100%;
    overflow: visible !important; 
}

/* Global Table Wrap Fix - Brutal Sledgehammer to guarantee no overflow on ANY table */
table, th, td, .data-table, .data-table th, .data-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-wrap: break-word !important;
}

/* Data Table - Strictly Fit to Card */
.data-table {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed !important; 
}

.data-table {
    border: 1px solid rgba(0, 0, 0, 0.25); /* Outer border */
}

.data-table th, .data-table td {
    padding: 10px 8px; 
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(0, 0, 0, 0.25); /* Vertical line */
}

.data-table th:last-child, .data-table td:last-child {
    border-right: none; /* Remove extra border on the far right edge */
}


.data-table th:last-child { width: 60px; text-align: center; }
.data-table td:last-child { text-align: center; }

.data-table td:last-child {
    white-space: normal;
}

.data-table th {
    background-color: var(--table-header-bg);
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table th.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.data-table th.sortable-header:hover {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.data-table th.sortable-header:hover .sort-icon {
    opacity: 0.9 !important;
    color: var(--primary-color);
}

.data-table td {
    font-size: 0.95rem;
    color: var(--text-primary) !important;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.in-progress {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.action-btn:hover { color: var(--primary-color); }
.action-btn.danger:hover { color: var(--danger); }

/* Responsive Design */
@media (max-width: 1024px) {
    .search-bar { width: 200px; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-btn, .close-btn {
        display: block;
    }
    
    .search-bar {
        display: none;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .user-info {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .section-header .btn {
        width: 100%;
        text-align: center;
    }

    .top-nav {
        padding: 0 16px;
    }
}
/* Modern Card Gallery Section */
.personalities-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 24px;
    margin-top: 32px;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
    .personalities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .personalities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.personality-card {
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.personality-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.personality-card:hover .card-image-container img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Full Preview Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--modal-bg);
    color: var(--text-primary);
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    height: 400px;
    position: relative;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.modal-body {
    padding: 32px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Global Form Inputs & Dark Mode Overrides */
::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7;
}

[data-theme="dark"] ::placeholder {
    color: #94a3b8 !important;
    opacity: 0.85;
}

.custom-form,
.recent-projects-section,
.form-container,
.card {
    background-color: var(--surface-color) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.custom-form label,
.form-group label {
    color: var(--text-primary) !important;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="url"],
input[type="email"],
textarea,
select {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Theme Toggle Button Style */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--sidebar-hover);
    transform: rotate(15deg) scale(1.05);
}

.view-btn {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
}

.view-btn:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* ==========================================================================
   DYNAMIC VISUAL EFFECTS & ANIMATIONS
   ========================================================================== */

/* 1. Page Content Entrance Animation */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modern Horizontal Dual-Tone Stat Cards */
.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent), transparent);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--card-glow, rgba(59, 130, 246, 0.1));
    filter: blur(20px);
    pointer-events: none;
    transition: all 0.35s ease;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px -8px var(--card-shadow, rgba(59, 130, 246, 0.25));
    border-color: var(--card-accent, var(--primary-color));
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    background: linear-gradient(135deg, var(--card-accent), var(--card-accent-dark, var(--card-accent)));
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 8px 18px var(--card-shadow, rgba(0, 0, 0, 0.15));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover .stat-icon-wrapper {
    transform: scale(1.12) rotate(6deg);
}

.stat-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-title {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-number {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--card-accent);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Color Variants */
.stat-indigo {
    --card-accent: #4f46e5;
    --card-accent-dark: #3730a3;
    --card-glow: rgba(79, 70, 229, 0.15);
    --card-shadow: rgba(79, 70, 229, 0.28);
}

.stat-blue {
    --card-accent: #2563eb;
    --card-accent-dark: #1d4ed8;
    --card-glow: rgba(37, 99, 235, 0.15);
    --card-shadow: rgba(37, 99, 235, 0.28);
}

.stat-emerald {
    --card-accent: #059669;
    --card-accent-dark: #047857;
    --card-glow: rgba(5, 150, 105, 0.15);
    --card-shadow: rgba(5, 150, 105, 0.28);
}

.stat-amber {
    --card-accent: #d97706;
    --card-accent-dark: #b45309;
    --card-glow: rgba(217, 119, 6, 0.15);
    --card-shadow: rgba(217, 119, 6, 0.28);
}

.stat-rose {
    --card-accent: #db2777;
    --card-accent-dark: #be185d;
    --card-glow: rgba(219, 39, 119, 0.15);
    --card-shadow: rgba(219, 39, 119, 0.28);
}

/* 3. Quick Action Cards Shimmer Pass */
.quick-action-card {
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}

.quick-action-card:hover::before {
    left: 140%;
}

.quick-action-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.quick-action-card:hover i {
    transform: scale(1.2);
}

.quick-action-card i {
    transition: transform 0.3s ease;
}

/* 4. Button Glow & Hover Lift */
.btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
}

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

/* 5. Action Icons Micro-Interaction */
.action-btn {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn:hover {
    transform: scale(1.2) rotate(6deg);
}

/* 6. Table Row Hover Highlight */
.data-table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: var(--table-hover);
}

/* 7. Modal Pop Entrance */
.modal-overlay.active .modal-content {
    animation: modalPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
/* Unified Single Split CSV Controller */
.split-btn-group {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
    padding: 3px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-btn-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
}

.split-btn-segment {
    background: transparent;
    color: #ffffff !important;
    border: none;
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
}

.split-btn-segment:hover {
    background: rgba(255, 255, 255, 0.22);
}

.split-btn-segment:active {
    transform: scale(0.96);
}

.split-btn-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 2px;
}

/* Educational Timeline Styling */
.edu-timeline {
    position: relative;
    padding-left: 10px;
}

.edu-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 20px;
    width: 3px;
    background: linear-gradient(180deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 36px;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -4px;
    top: 4px;
    font-size: 1.1rem;
    z-index: 2;
}

.timeline-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-content:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.timeline-degree {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.timeline-year {
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-location {
    font-size: 0.925rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-bullets li {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Professional Executive View Styling */
.pro-header-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%), var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.pro-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.pro-avatar-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.pro-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pro-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.pro-verify-chip {
    font-size: 0.775rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 20px;
}

.pro-credentials {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 4px 0 10px 0;
}

.pro-badges-flex {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pro-meta-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--table-header-bg);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 8px;
}

.pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.pro-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--pro-card-accent, var(--primary-color));
}

.pro-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--pro-card-accent, var(--primary-color));
}

.pro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pro-tag {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--pro-card-accent, var(--primary-color));
    background: var(--pro-card-bg, rgba(37, 99, 235, 0.1));
    padding: 4px 10px;
    border-radius: 16px;
}

.pro-year-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pro-degree-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.pro-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--pro-card-bg, rgba(37, 99, 235, 0.1));
    color: var(--pro-card-accent, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pro-degree-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.pro-inst-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.pro-desc-box {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: auto;
    border: 1px solid var(--border-color);
}

.pro-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pro-bullets li {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pro-bullets li i {
    color: var(--pro-card-accent, var(--primary-color));
    font-size: 0.75rem;
    margin-top: 4px;
}

.pro-bullets li:last-child {
    margin-bottom: 0;
}

/* Badge Color Themes */
.badge-gold {
    --pro-card-accent: #d97706;
    --pro-card-bg: rgba(217, 119, 6, 0.12);
}

.badge-purple {
    --pro-card-accent: #8b5cf6;
    --pro-card-bg: rgba(139, 92, 246, 0.12);
}

.badge-emerald {
    --pro-card-accent: #10b981;
    --pro-card-bg: rgba(16, 185, 129, 0.12);
}

.badge-teal {
    --pro-card-accent: #06b6d4;
    --pro-card-bg: rgba(6, 182, 212, 0.12);
}

.badge-indigo {
    --pro-card-accent: #4f46e5;
    --pro-card-bg: rgba(79, 70, 229, 0.12);
}

.badge-blue {
    --pro-card-accent: #2563eb;
    --pro-card-bg: rgba(37, 99, 235, 0.12);
}

/* Official CV Document Sheet Styling */
.cv-document-sheet {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.cv-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.cv-sheet-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.cv-sheet-title {
    flex-grow: 1;
}

.cv-doc-heading {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0 0 4px 0;
}

.cv-doc-subheading {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.cv-doc-meta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.cv-sheet-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #10b981;
    border-radius: 12px;
    padding: 8px 16px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cv-sheet-seal i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.cv-section {
    margin-bottom: 32px;
}

.cv-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.cv-section-title i {
    color: var(--primary-color);
}

.cv-summary-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-color);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 0;
}

.cv-sheet-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 36px;
}

/* Printable PDF Styling */
@media print {
    .top-nav, .sidebar, .no-print, .menu-btn, .view-toggle-group, .page-header, header, nav, .cv-actions-bar {
        display: none !important;
    }

    body, .main-content, .content-wrapper {
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    #eduProSection {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cv-document-sheet {
        box-shadow: none !important;
        border: none !important;
        padding: 10px !important;
        background: #ffffff !important;
    }

    .pro-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    .pro-desc-box {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
    }
}

/* ==========================================================================
   Modern Executive Action Toolbar & Segmented Controls System
   ========================================================================== */
.modern-toolbar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-left: auto !important;
}

.btn-add-action, a.btn-add-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 40px !important;
    padding: 0 20px !important;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border-radius: 10px !important;
    border: none !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    font-family: inherit !important;
}

.btn-add-action:hover, a.btn-add-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.csv-segmented-group {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-sm) !important;
    box-sizing: border-box !important;
}

.csv-seg-btn, button.csv-seg-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 100% !important;
    padding: 0 16px !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    border: none !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.csv-seg-btn.csv-import {
    border-right: 1px solid var(--border-color) !important;
}

.csv-seg-btn.csv-import:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}

.csv-seg-btn.csv-export:hover {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.btn-clear-danger, a.btn-clear-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 40px !important;
    padding: 0 16px !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.btn-clear-danger i, a.btn-clear-danger i {
    font-size: 0.95rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-clear-danger:hover, a.btn-clear-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.segmented-view-switcher {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 3px;
    gap: 3px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.view-seg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    padding: 0 16px;
    border-radius: 9px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    background: transparent;
}

.view-seg-btn.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.view-seg-btn:not(.active):hover {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-primary);
}

/* ==========================================================================
   Mobile View Alignment & Responsiveness (Applies ONLY to Mobile <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Enable Horizontal Scroll on Mobile Tables */
    .table-container {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px; /* Space for scrollbar */
    }
    table, th, td, .data-table, .data-table th, .data-table td {
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-wrap: normal !important;
    }
    .data-table {
        table-layout: auto !important; 
    }

    .content-wrapper {
        padding: 20px 16px !important;
    }

    .top-nav {
        padding: 0 12px !important;
        gap: 12px !important;
    }
    
    .nav-left {
        flex: 1 !important;
        gap: 10px !important;
        min-width: 0 !important; /* Prevent flex blowout */
    }
    
    .nav-right {
        flex-shrink: 0 !important;
        gap: 12px !important;
    }

    .search-bar-container {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .search-bar {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 12px !important;
    }

    .search-bar:focus-within {
        width: 100% !important;
    }
    
    .search-bar input {
        font-size: 0.85rem !important;
    }

    .user-info-text {
        display: none !important; /* Hide username/role on mobile */
    }
    
    .user-profile-trigger img {
        width: 36px !important;
        height: 36px !important;
    }
    
    .user-profile-trigger {
        padding: 2px !important;
        background: transparent !important;
        border: none !important;
    }

    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .modern-toolbar {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        margin-left: 0 !important;
    }

    .btn-add-action, .btn-clear-danger, .csv-segmented-group {
        width: 100% !important;
        justify-content: center !important;
    }

    .segmented-view-switcher {
        width: 100% !important;
        height: auto !important;
        flex-wrap: wrap !important;
        padding: 4px !important;
    }

    .view-seg-btn {
        flex: 1 1 auto !important;
        padding: 10px 12px !important;
        justify-content: center !important;
    }

    .pro-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .apple-glass-card {
        padding: 32px 24px !important;
        border-radius: 24px !important;
    }
}

/* Global Alert Popup Alignment */
.alert {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    line-height: 1.4 !important;
}
.alert i {
    font-size: 1.15rem !important;
}

/* View Record Modal Styles */
.view-record-header { margin-bottom: 20px; }
.view-record-title { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin: 0 0 5px 0; }
.view-record-owner { font-size: 0.9rem; color: var(--text-secondary); display: inline-block; background: var(--bg-hover); padding: 3px 8px; border-radius: 4px; }
.view-record-grid { display: flex; flex-direction: column; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.view-record-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); transition: background-color 0.2s ease; gap: 15px; }
.view-record-item:last-child { border-bottom: none; }
.view-record-item:hover { background-color: var(--bg-hover); }
.view-record-item.full-width { flex-direction: column; justify-content: flex-start; }
.view-record-label { font-size: 0.75rem; font-weight: 700; color: var(--primary-color); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0; display: flex; align-items: center; gap: 6px; flex: 0 0 35%; max-width: 250px; }
.view-record-item.full-width .view-record-label { margin-bottom: 10px; max-width: none; flex: none; }
.view-record-value { font-size: 1rem; color: var(--text-primary); word-break: break-word; font-weight: 500; line-height: 1.5; flex: 1 1 auto; text-align: right; }
.view-record-item.full-width .view-record-value { text-align: left; }
.view-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-color); text-decoration: none; font-weight: 600; padding: 6px 12px; background: rgba(37,99,235,0.1); border-radius: 6px; transition: background 0.2s ease; }
.view-link:hover { text-decoration: none; background: rgba(37,99,235,0.2); }

/* Clickable Row Styles */
.clickable-row { cursor: pointer; transition: background-color 0.2s ease; }
.clickable-row:hover { background-color: var(--bg-hover) !important; }

/* Invoice Document Styles */
.document-container { background: #fff; color: #333; max-width: 900px; margin: 0 auto; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); overflow: hidden; font-family: 'Inter', sans-serif; }
.doc-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 40px; border-bottom: 2px solid #f1f5f9; background: #fafafa; }
.doc-logo-area { display: flex; align-items: center; gap: 20px; }
.doc-logo-circle { width: 60px; height: 60px; background: var(--primary-color); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.doc-org-info h2 { margin: 0; font-size: 1.5rem; font-weight: 700; color: #1e293b; }
.doc-org-info p { margin: 5px 0 0; color: #64748b; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.doc-meta { text-align: right; }
.doc-meta-item { margin-bottom: 8px; }
.doc-meta-item:last-child { margin-bottom: 0; }
.meta-label { display: block; font-size: 0.75rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.meta-value { font-size: 1rem; font-weight: 600; color: #334155; }
.doc-title-bar { background: var(--primary-color); padding: 15px 40px; color: #fff; }
.doc-title-bar h3 { margin: 0; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.5px; }
.doc-body { padding: 40px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th, .doc-table td { padding: 16px 20px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.doc-table tr:last-child th, .doc-table tr:last-child td { border-bottom: none; }
.doc-field-label { width: 35%; font-weight: 600; color: #475569; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; background: #f8fafc; }
.doc-field-value { color: #1e293b; font-size: 1.05rem; line-height: 1.6; }
.doc-footer { background: #f1f5f9; padding: 20px 40px; text-align: center; color: #64748b; font-size: 0.85rem; border-top: 1px solid #e2e8f0; }
@media print {
  body { background: #fff !important; margin: 0; padding: 0; }
  .sidebar, .top-nav, .no-print, .action-bar, .modal-overlay, #globalViewModal { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; width: 100% !important; background: #fff !important; }
  .document-container { box-shadow: none !important; border: 1px solid #cbd5e1 !important; margin: 20px auto !important; width: 95% !important; max-width: 100% !important; }
}

/* Back Button Styles */
.btn-back { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 20px; font-weight: 600; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.btn-back:hover { background: var(--bg-hover); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); border-color: var(--primary-color); color: var(--primary-color); }

/* Viewer Role Restrictions */
body.role-viewer .btn-add-action, body.role-viewer .csv-segmented-group, body.role-viewer .btn-clear-danger, body.role-viewer .delete-personality { display: none !important; }


body.role-viewer a[href^='edit_'], body.role-viewer a[href^='delete_'], body.role-viewer a[href^='clear_'] { display: none !important; }

/* Generic Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    /* Invoice/Document View Responsive Fixes */
    .document-container {
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .doc-header, .doc-body, .doc-footer, .doc-title-bar {
        padding: 16px !important;
    }
    .doc-org-info h2 {
        font-size: 1.2rem !important;
    }
    .doc-logo-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    .doc-table th, .doc-table td {
        padding: 12px 10px !important;
    }
    .doc-table {
        table-layout: fixed !important;
        width: 100% !important;
    }
    .doc-table th, .doc-table td {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .doc-table a {
        word-wrap: break-word !important;
        word-break: break-all !important;
        display: inline-block;
        max-width: 100%;
    }
    .main-content {
        padding: 0 !important;
    }
    .view-content-wrapper {
        padding: 10px 0 !important;
    }
    .document-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }
    .doc-table td a {
        word-break: break-all;
    }
    .doc-field-label {
        width: 40%;
        font-size: 0.8rem !important;
    }
    .doc-field-value {
        font-size: 0.9rem !important;
    }
}

/* Theme Toggle Transition Effect */
.theme-transitioning, .theme-transitioning *, .theme-transitioning *:before, .theme-transitioning *:after {
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
/* Advanced Theme View Transition API */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }
.theme-toggle-btn i {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
/* Mobile Search Dropdown Alignment Fix */
@media (max-width: 768px) {
    .search-suggestions-dropdown {
        position: fixed !important;
        top: 65px !important;
        left: 16px !important;
        right: 16px !important;
        min-width: 0 !important;
        width: calc(100% - 32px) !important;
        box-sizing: border-box !important;
    }
}
/* Zebra Striping for Tables */
.data-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .data-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}
.data-table tbody tr:hover {
    background-color: var(--table-hover) !important;
}

/* Stat Purple */
.stat-purple { border-top: 4px solid #a855f7; }
.stat-purple .stat-icon-wrapper { background: rgba(168, 85, 247, 0.1); }
.stat-purple .stat-icon-wrapper i { color: #a855f7; }

/* Table Action Dropdowns - Horizontal Bubble Style */
.dropdown-action { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.dropdown-action .action-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin: 0; transition: background-color 0.2s ease, color 0.2s ease; background-color: transparent; padding: 0; }
.dropdown-action .action-btn:hover { background-color: rgba(0,0,0,0.08); color: var(--primary-color); transform: none; }
[data-theme="dark"] .dropdown-action .action-btn:hover { background-color: rgba(255,255,255,0.1); }
.dropdown-menu { position: absolute; right: 0; top: 100%; margin-top: 8px; background: white; min-width: auto; border-radius: 30px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.04); z-index: 100000; display: flex; flex-direction: row; padding: 4px 6px; gap: 4px; opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.95); transform-origin: top right; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dropdown-action .dropdown-item { padding: 10px; color: #475569; text-decoration: none !important; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.2s ease; border-radius: 50%; width: 38px; height: 38px; }
.dropdown-action .dropdown-item i { text-align: center; color: #64748b; margin: 0; width: auto; }
.dropdown-action .dropdown-item:hover { background-color: #f1f5f9; color: var(--primary-color); transform: translateY(-2px); }
.dropdown-action .dropdown-item:hover i { color: var(--primary-color); }
.dropdown-action .dropdown-item.danger { color: #ef4444; }
.dropdown-action .dropdown-item.danger i { color: #ef4444; }
.dropdown-action .dropdown-item.danger:hover { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; }
.dropdown-action .dropdown-item.danger:hover i { color: #dc2626; }

@media screen {
    .print-header { display: none !important; }
}



/* Viewer Role Restrictions */
body.role-viewer .btn-add-action,
body.role-viewer .csv-import,
body.role-viewer .clear-all-btn,
body.role-viewer .dropdown-item[title='Edit'],
body.role-viewer .dropdown-item[title='Delete'],
body.role-viewer .dropdown-item.danger {
    display: none !important;
}


/* Additional Viewer Role Restrictions for Video Classes */
body.role-viewer .edit-personality,
body.role-viewer .delete-personality,
body.role-viewer a[href^='add_video_class.php'] {
    display: none !important;
}



/* Emergency Mobile Overflow Fix */
.custom-form *, .content-wrapper, .recent-projects-section, .main-content { box-sizing: border-box !important; }


/* Constant Back Button Design */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}
.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-4px);
}

/* Premium File Input Styling */
input[type="file"] {
    padding: 8px;
    background: var(--surface-color);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
input[type="file"]:hover {
    background: rgba(37, 99, 235, 0.03);
}
input[type="file"]::-webkit-file-upload-button {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    margin-right: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37,99,235,0.2);
}
input[type="file"]::file-selector-button {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    margin-right: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37,99,235,0.2);
}
input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37,99,235,0.3);
}
input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37,99,235,0.3);
}
