/* ============================================
   XRLAB - MODERN DESIGN SYSTEM
   Inspired by commercial showroom aesthetics
   ============================================ */

/* ========================
   CSS CUSTOM PROPERTIES
========================= */
:root {
    /* Dark Theme Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-card: #2a2a2a;
    --bg-card-hover: #333333;

    /* Accent Colors - Blue Family */
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-tertiary: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);

    /* Text Colors - Bright white for maximum readability */
    --text-primary: #ffffff;
    --text-secondary: #f3f4f6;
    --text-tertiary: #e5e7eb;
    --text-muted: #d1d5db;

    /* Border Colors */
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(59, 130, 246, 0.5);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);

    /* Spacing */
    --sidebar-width: 70px;
    --sidebar-expanded: 240px;
    --navbar-height: 52px;
    --header-height: 90px;
    --logo-width: var(--sidebar-expanded);
    --content-padding: 24px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ========================
   GLOBAL RESET & BASE
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    transition: font-size 0.2s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================
   TYPOGRAPHY
========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* ========================
   APP LAYOUT STRUCTURE
========================= */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

/* ========================
   TOP HEADER WITH LOGO
========================= */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    z-index: 1100;
}

.header-logo {
    width: var(--logo-width);
    min-width: var(--logo-width);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    border-right: 1px solid var(--border-subtle);
    padding: 12px;
}

.header-logo img {
    max-height: 72px;
    max-width: 160px;
    object-fit: contain;
}

@media (max-width: 768px) {
    :root {
        --logo-width: 180px;
    }

    .header-logo img {
        max-height: 64px;
        max-width: 120px;
    }
}

.header-navbars {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    width: 100%;
}

.header-navbar-primary {
    height: 45px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.header-navbar-secondary {
    height: 45px;
    background-color: var(--bg-tertiary);
}

.header-navbar .navbar-left,
.header-navbar .navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}


/* Social Media Links */
.social-media-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ========================
   SIDEBAR STYLES (Adjusted)
========================= */
.app-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

/* Collapsed sidebar is fully clickable */
.app-sidebar:not(.expanded) {
    cursor: pointer;
}

.app-sidebar:not(.expanded):hover {
    background-color: var(--bg-tertiary);
}

/* Sidebar toggle button - only visible when expanded */
.sidebar-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease 0.3s, background 0.2s ease, color 0.2s ease;
}

.app-sidebar.expanded .sidebar-toggle {
    opacity: 1;
    pointer-events: auto;
}

/* Hide instantly when closing */
.app-sidebar:not(.expanded) .sidebar-toggle {
    transition: none;
    opacity: 0;
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Sidebar expands on click (not hover) */
.app-sidebar.expanded {
    width: var(--sidebar-expanded);
    box-shadow: var(--shadow-lg);
    cursor: default;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
}

.app-navbar {
    position: sticky;
    top: 0;
    height: var(--navbar-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 var(--content-padding);
    z-index: 900;
}

.app-content {
    flex: 1;
    padding: var(--content-padding);
    background-color: var(--bg-primary);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Content container for very large screens */
@media (min-width: 1920px) {
    .app-main {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .app-content {
        max-width: 1600px;
    }
}

/* ========================
   SIDEBAR STYLES
========================= */
.sidebar-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px;
    flex-shrink: 0;
}

.sidebar-logo img {
    max-height: 36px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 56px 0 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 15px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.sidebar-nav-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background-color: var(--accent-primary);
    color: white;
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    background-color: var(--accent-secondary);
    border-radius: 0 4px 4px 0;
}

/* Icon container - centered in collapsed state */
.sidebar-nav-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-medium);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.sidebar-nav-item:hover .sidebar-nav-icon {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
    transform: scale(1.05);
}

.sidebar-nav-item.active .sidebar-nav-icon {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Label - slides in on expand */
.sidebar-nav-label {
    margin-left: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s,
        width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        margin 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-10px);
}

.app-sidebar.expanded .sidebar-nav-label {
    opacity: 1;
    width: auto;
    transform: translateX(0);
}

.sidebar-nav-item.active .sidebar-nav-label {
    color: white;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 8px 15px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 8px 0;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

/* ========================
   SIDEBAR ADMIN PANEL
========================= */
.sidebar-admin-section {
    position: relative;
}

.sidebar-admin-trigger {
    cursor: pointer;
}

.sidebar-admin-dropdown {
    position: fixed;
    bottom: 60px;
    left: var(--sidebar-width);
    width: 320px;
    max-height: 75vh;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    display: none;
    z-index: 1100;
    transition: left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Show dropdown on click via JavaScript */
.sidebar-admin-dropdown.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* When sidebar is expanded, adjust dropdown position */
.app-sidebar.expanded .sidebar-admin-dropdown.show {
    left: var(--sidebar-expanded);
}

.sidebar-admin-dropdown::-webkit-scrollbar {
    width: 6px;
}

.sidebar-admin-dropdown::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}

.admin-panel-header i {
    color: #ffffff;
    font-size: 1.1rem;
}

.admin-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.admin-dropdown-item,
a.admin-dropdown-item,
a.admin-dropdown-item:link,
a.admin-dropdown-item:visited {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: #ffffff !important;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.admin-dropdown-item:hover,
a.admin-dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-secondary) !important;
    padding-left: 24px;
}

.admin-dropdown-item i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    color: var(--accent-primary);
}

.admin-dropdown-item:hover i {
    color: var(--accent-secondary);
}

.admin-dropdown-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 8px 0;
}

/* Logout button in sidebar */
.sidebar-logout-btn {
    color: #ef4444 !important;
}

.sidebar-logout-btn i {
    color: #ef4444 !important;
}

.sidebar-logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* ========================
   NAVBAR STYLES
========================= */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.navbar-brand img {
    height: 28px;
}

.navbar-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 32px;
}

.navbar-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.navbar-nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-nav-link.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.navbar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.navbar-action-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-search {
    display: flex;
    align-items: center;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.navbar-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.navbar-search input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
}

.navbar-search input::placeholder {
    color: var(--text-tertiary);
}

.navbar-search i {
    color: var(--text-tertiary);
}

/* ========================
   TOP TOOLBAR (Accessibility)
========================= */
.top-toolbar {
    height: 36px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--content-padding);
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.toolbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toolbar-link:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* ========================
   MODERN CARDS
========================= */
.modern-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.modern-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.modern-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.modern-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.modern-card:hover .modern-card-image img {
    transform: scale(1.05);
}

.modern-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #ffffff !important;
}

.modern-card-body {
    padding: 20px;
}

.modern-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.modern-card-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.modern-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.modern-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.modern-card-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.modern-card-link i {
    transition: transform var(--transition-fast);
}

.modern-card:hover .modern-card-link i {
    transform: translateX(4px);
}

/* ========================
   CARD GRID
========================= */
.modern-card-slider-image {
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modern-card-slider-image img {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.modern-card:hover .modern-card-slider-image img {
    transform: scale(1.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ========================
   HERO SECTION
========================= */
/* Hero wrapper to constrain width like app-content */
.app-main>.hero-section,
.app-main>.slider-wrapper,
.app-main>.video-container {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
    width: 100%;
    box-sizing: border-box;
}

.hero-section {
    position: relative;
    height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 32px;
}

.hero-carousel {
    height: 100%;
}

.hero-slide {
    position: relative;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.hero-dot.active {
    background-color: var(--accent-primary) !important;
    width: 28px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Bootstrap Carousel Indicators - Dark Theme */
.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators button,
.carousel-indicators [data-bs-target] {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: none !important;
    margin: 0 6px !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
}

.carousel-indicators button.active,
.carousel-indicators [data-bs-target].active,
.carousel-indicators .active {
    background-color: var(--accent-primary) !important;
    width: 28px !important;
    border-radius: 6px !important;
    box-shadow: 0 0 10px var(--accent-glow) !important;
}

/* ========================
   FILTER SECTION
========================= */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-toggle-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-toggle-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.filter-search {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0 16px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.filter-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px;
    font-size: 0.9rem;
    outline: none;
}

.filter-search input::placeholder {
    color: var(--text-tertiary);
}

.filter-search i {
    color: var(--text-tertiary);
}

.filter-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.filter-count span {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Filter Dropdowns */
.filter-dropdowns {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 16px;
    width: 100%;
}

.filter-dropdowns.show {
    display: flex;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-dropdown-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-dropdown-btn.has-selection {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.filter-dropdown-menu.show {
    display: block;
}

.filter-dropdown-header {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.filter-option:hover {
    background-color: var(--bg-tertiary);
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
}

.filter-option label {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-clear-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.filter-clear-btn.highlighted {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #dc3545;
}

/* ========================
   PAGINATION
========================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.disabled) {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.pagination-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================
   BUTTONS
========================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* ========================
   FORM ELEMENTS
========================= */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* ========================
   FOOTER
========================= */
.app-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 24px var(--content-padding);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* ========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================
   THEME SYSTEM - 4 Premium Themes
========================= */

/* Theme 1: Dark Mode (Default - Existing) */
/* Already defined in :root */

/* Theme 2: Premium Light Mode - Elegant & Warm */
body.theme-light {
    --bg-primary: #fafaf9;
    --bg-secondary: #f5f5f4;
    --bg-tertiary: #e7e5e4;
    --bg-card: #ffffff;
    --bg-card-hover: #fafaf9;

    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-tertiary: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.15);

    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-tertiary: #78716c;
    --text-muted: #a8a29e;

    --border-subtle: rgba(28, 25, 23, 0.08);
    --border-medium: rgba(28, 25, 23, 0.12);
    --border-accent: rgba(37, 99, 235, 0.3);

    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08), 0 2px 4px rgba(28, 25, 23, 0.04);
    --shadow-lg: 0 12px 40px rgba(28, 25, 23, 0.12), 0 4px 12px rgba(28, 25, 23, 0.06);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);
}

body.theme-light .app-sidebar {
    box-shadow: 1px 0 12px rgba(28, 25, 23, 0.06);
}

body.theme-light .sidebar-logo img {
    filter: brightness(0) saturate(100%);
}

body.theme-light .toolbar-link img {
    filter: brightness(0) saturate(100%) opacity(0.6);
}

body.theme-light .modern-card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
}

body.theme-light .modern-card:hover {
    box-shadow: var(--shadow-md);
}

/* Theme 3: Midnight Purple - Luxurious & Creative */
body.theme-midnight {
    --bg-primary: #0f0a1a;
    --bg-secondary: #1a1225;
    --bg-tertiary: #251a33;
    --bg-card: #1e1529;
    --bg-card-hover: #2a1f3d;

    --accent-primary: #a78bfa;
    --accent-secondary: #c4b5fd;
    --accent-tertiary: #8b5cf6;
    --accent-glow: rgba(167, 139, 250, 0.25);

    --text-primary: #faf5ff;
    --text-secondary: #e9d5ff;
    --text-tertiary: #d8b4fe;
    --text-muted: #c084fc;

    --border-subtle: rgba(167, 139, 250, 0.12);
    --border-medium: rgba(167, 139, 250, 0.18);
    --border-accent: rgba(167, 139, 250, 0.4);

    --shadow-sm: 0 2px 8px rgba(15, 10, 26, 0.5);
    --shadow-md: 0 4px 20px rgba(15, 10, 26, 0.6);
    --shadow-lg: 0 8px 40px rgba(15, 10, 26, 0.7);
    --shadow-glow: 0 0 30px rgba(167, 139, 250, 0.2);
}

body.theme-midnight .app-sidebar {
    background: linear-gradient(180deg, #1a1225 0%, #0f0a1a 100%);
}

body.theme-midnight .sidebar-nav-item.active .sidebar-nav-icon,
body.theme-midnight .sidebar-nav-item:hover .sidebar-nav-icon {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(139, 92, 246, 0.15));
    border-color: var(--accent-primary);
}

body.theme-midnight .modern-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(37, 26, 51, 0.5) 100%);
}

body.theme-midnight .hero-section::before {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
}

/* Theme 4: Forest Emerald - Natural & Calming */
body.theme-forest {
    --bg-primary: #0a1410;
    --bg-secondary: #0f1f18;
    --bg-tertiary: #162921;
    --bg-card: #132319;
    --bg-card-hover: #1a3025;

    --accent-primary: #10b981;
    --accent-secondary: #34d399;
    --accent-tertiary: #059669;
    --accent-glow: rgba(16, 185, 129, 0.25);

    --text-primary: #ecfdf5;
    --text-secondary: #a7f3d0;
    --text-tertiary: #6ee7b7;
    --text-muted: #34d399;

    --border-subtle: rgba(16, 185, 129, 0.12);
    --border-medium: rgba(16, 185, 129, 0.18);
    --border-accent: rgba(16, 185, 129, 0.4);

    --shadow-sm: 0 2px 8px rgba(10, 20, 16, 0.5);
    --shadow-md: 0 4px 20px rgba(10, 20, 16, 0.6);
    --shadow-lg: 0 8px 40px rgba(10, 20, 16, 0.7);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.2);
}

body.theme-forest .app-sidebar {
    background: linear-gradient(180deg, #0f1f18 0%, #0a1410 100%);
}

body.theme-forest .sidebar-nav-item.active .sidebar-nav-icon,
body.theme-forest .sidebar-nav-item:hover .sidebar-nav-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
    border-color: var(--accent-primary);
}

body.theme-forest .modern-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(22, 41, 33, 0.5) 100%);
}

body.theme-forest .hero-section::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

/* Legacy contrast-mode support (maps to light theme) */
body.contrast-mode {
    --bg-primary: #fafaf9;
    --bg-secondary: #f5f5f4;
    --bg-tertiary: #e7e5e4;
    --bg-card: #ffffff;
    --bg-card-hover: #fafaf9;
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-tertiary: #78716c;
    --border-subtle: rgba(28, 25, 23, 0.08);
    --border-medium: rgba(28, 25, 23, 0.12);
}

/* ========================
   THEME SWITCHER UI
========================= */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.theme-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.theme-btn .theme-icon {
    font-size: 14px;
}

.theme-btn .theme-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.theme-btn[data-theme="dark"] .theme-color {
    background: #1a1a1a;
    border-color: #3b82f6;
}

.theme-btn[data-theme="light"] .theme-color {
    background: #fafaf9;
    border-color: #2563eb;
}

.theme-btn[data-theme="midnight"] .theme-color {
    background: #0f0a1a;
    border-color: #a78bfa;
}

.theme-btn[data-theme="forest"] .theme-color {
    background: #0a1410;
    border-color: #10b981;
}

/* Theme tooltip */
.theme-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
}

.theme-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-sidebar,
.app-navbar,
.app-content,
.app-footer,
.modern-card,
.filter-section,
.top-toolbar {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================
   LIGHT MODE - Additional Premium Styling
========================= */
body.theme-light .top-toolbar {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(28, 25, 23, 0.06);
    box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
}

body.theme-light .top-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(28, 25, 23, 0.08);
    box-shadow: 0 2px 8px rgba(28, 25, 23, 0.05);
}

body.theme-light .header-logo {
    background-color: var(--bg-tertiary);
    border-right: 1px solid rgba(28, 25, 23, 0.08);
}

body.theme-light .header-logo img {
    filter: brightness(0) saturate(100%);
}

body.theme-light .header-navbar-primary {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(28, 25, 23, 0.06);
}

body.theme-light .header-navbar-secondary {
    background-color: var(--bg-tertiary);
}

body.theme-light .social-link {
    background-color: rgba(28, 25, 23, 0.05);
    color: var(--text-secondary);
}

body.theme-light .social-link:hover {
    background-color: var(--accent-primary);
    color: #ffffff;
}

body.theme-light .app-footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(28, 25, 23, 0.06);
}

body.theme-light .toolbar-btn,
body.theme-light .toolbar-link {
    color: var(--text-secondary);
}

body.theme-light .toolbar-btn:hover,
body.theme-light .toolbar-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

body.theme-light .theme-switcher {
    background: #ffffff;
    border-color: rgba(28, 25, 23, 0.1);
    box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06);
}

body.theme-light .filter-section {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .filter-toggle-btn {
    background-color: var(--bg-tertiary);
    border-color: rgba(28, 25, 23, 0.1);
}

body.theme-light .filter-toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    border-color: transparent;
}

body.theme-light .btn-primary {
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

body.theme-light .btn-primary:hover {
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.25);
}

body.theme-light .form-control,
body.theme-light .form-select {
    background-color: #ffffff;
    border-color: rgba(28, 25, 23, 0.15);
}

body.theme-light .form-control:focus,
body.theme-light .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.theme-light .hero-section {
    box-shadow: 0 4px 24px rgba(28, 25, 23, 0.08);
}

body.theme-light .breadcrumb-container {
    background-color: transparent;
}

/* Light mode DataTables */
body.theme-light .dataTables_wrapper {
    color: var(--text-secondary) !important;
}

body.theme-light table.dataTable thead th,
body.theme-light table.dataTable thead td {
    background-color: var(--bg-tertiary) !important;
    border-bottom: 2px solid rgba(28, 25, 23, 0.1) !important;
}

body.theme-light table.dataTable tbody tr {
    background-color: #ffffff !important;
}

body.theme-light table.dataTable tbody tr:hover {
    background-color: var(--bg-secondary) !important;
}

body.theme-light .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #ffffff !important;
    border: 1px solid rgba(28, 25, 23, 0.15) !important;
}

body.theme-light .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-tertiary) !important;
}

body.theme-light .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
}

/* Light mode Modals */
body.theme-light .modal-content {
    background-color: #ffffff;
    box-shadow: 0 20px 60px rgba(28, 25, 23, 0.15);
}

body.theme-light .modal-header {
    border-bottom-color: rgba(28, 25, 23, 0.08);
}

body.theme-light .modal-footer {
    border-top-color: rgba(28, 25, 23, 0.08);
}

/* Light mode dropdowns */
body.theme-light .dropdown-menu {
    background-color: #ffffff;
    border-color: rgba(28, 25, 23, 0.1);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
}

body.theme-light .dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

/* Light mode admin sidebar dropdown */
body.theme-light .sidebar-admin-dropdown {
    background-color: #ffffff;
    box-shadow: 0 8px 32px rgba(28, 25, 23, 0.15);
    border-color: rgba(28, 25, 23, 0.1);
}

body.theme-light .admin-section-header {
    color: #57534e;
    opacity: 1;
}

body.theme-light .admin-dropdown-item,
body.theme-light a.admin-dropdown-item,
body.theme-light a.admin-dropdown-item:link,
body.theme-light a.admin-dropdown-item:visited {
    color: #000000 !important;
}

body.theme-light .admin-dropdown-item:hover,
body.theme-light a.admin-dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary) !important;
}

body.theme-light .admin-panel-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: #ffffff;
}

body.theme-light .admin-panel-header i {
    color: #ffffff;
}

/* Light mode badges and tags */
body.theme-light .badge-category {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
}

body.theme-light .modern-card-tag {
    background-color: #e7e5e4;
    color: #000000;
}

/* Hero/Slider text - always white on dark overlay */
body.theme-light .hero-title,
body.theme-light .hero-overlay h1,
body.theme-light .hero-overlay h2,
body.theme-light .hero-overlay p,
body.theme-light .hero-overlay span {
    color: #ffffff !important;
}

body.theme-light .hero-overlay {
    color: #ffffff;
}

/* Midnight theme - Additional refinements */
body.theme-midnight .top-toolbar {
    background: linear-gradient(180deg, #1a1225 0%, #251a33 100%);
}

body.theme-midnight .top-header {
    background: linear-gradient(180deg, #1a1225 0%, #251a33 100%);
}

body.theme-midnight .header-logo {
    background: rgba(26, 18, 37, 0.8);
}

body.theme-midnight .header-navbar-secondary {
    background: linear-gradient(180deg, #251a33 0%, #1a1225 100%);
}

body.theme-midnight .social-link:hover {
    background-color: var(--accent-primary);
}

body.theme-midnight .theme-switcher {
    background: rgba(37, 26, 51, 0.8);
    border-color: rgba(167, 139, 250, 0.15);
}

body.theme-midnight .btn-primary {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    border-color: transparent;
}

body.theme-midnight .filter-toggle-btn.active {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

/* Forest theme - Additional refinements */
body.theme-forest .top-toolbar {
    background: linear-gradient(180deg, #0f1f18 0%, #162921 100%);
}

body.theme-forest .top-header {
    background: linear-gradient(180deg, #0f1f18 0%, #162921 100%);
}

body.theme-forest .header-logo {
    background: rgba(15, 31, 24, 0.8);
}

body.theme-forest .header-navbar-secondary {
    background: linear-gradient(180deg, #162921 0%, #0f1f18 100%);
}

body.theme-forest .social-link:hover {
    background-color: var(--accent-primary);
}

body.theme-forest .theme-switcher {
    background: rgba(22, 41, 33, 0.8);
    border-color: rgba(16, 185, 129, 0.15);
}

body.theme-forest .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
}

body.theme-forest .filter-toggle-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Theme switcher responsive */
@media (max-width: 768px) {
    .theme-switcher {
        padding: 3px;
        gap: 2px;
    }

    .theme-btn {
        width: 28px;
        height: 28px;
    }

    .theme-btn .theme-icon {
        font-size: 12px;
    }

    .theme-btn .theme-color {
        width: 12px;
        height: 12px;
    }

    .theme-btn::after {
        display: none;
    }
}

/* ========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-expanded);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-sidebar .sidebar-nav-label,
    .app-sidebar.open .sidebar-nav-label {
        opacity: 1;
        width: auto;
        transform: translateX(0);
    }

    /* Hide toggle button on mobile - use mobile menu instead */
    .sidebar-toggle {
        display: none;
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .sidebar-admin-dropdown {
        left: var(--sidebar-expanded);
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        max-height: 70vh;
        width: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --content-padding: 16px;
        --navbar-height: 56px;
    }

    .navbar-nav-list {
        display: none;
    }

    .hero-section {
        height: 300px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-overlay {
        padding: 24px;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        min-width: 100%;
    }
}

/* ========================
   UTILITY CLASSES
========================= */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mt-5 {
    margin-top: 48px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.mb-5 {
    margin-bottom: 48px;
}

.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

/* No Results State */
.no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.no-results i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.no-results h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-tertiary);
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================
   ADMIN BAR
========================= */
.admin-bar {
    background-color: var(--bg-tertiary);
    padding: 8px var(--content-padding);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.admin-dropdown {
    position: relative;
}

.admin-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-dropdown-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.admin-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}

.admin-dropdown-menu.show {
    display: block;
}

/* ========================
   PAGE HEADER
========================= */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================
   BREADCRUMB
========================= */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.breadcrumb-item {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--accent-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-separator {
    color: var(--text-tertiary);
}

/* ========================
   DROPDOWN OVERRIDES
========================= */
.dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.section-title .view-all {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   LEGACY VIEW STYLING OVERRIDES
   For existing views to work with dark theme
   ============================================ */

/* Details Page Container */
.details-container {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.details-header h2 {
    color: var(--text-primary) !important;
}

.details-header p {
    color: var(--text-secondary) !important;
}

/* Fancy Cards (Details, MakerSpace, etc.) */
.fancy-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
}

.fancy-card-header {
    background-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    padding: 1rem 1.5rem;
}

.fancy-card-header h3 {
    color: var(--bg-primary) !important;
}

.fancy-card-body {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    padding: 1.5rem;
}

.fancy-card-body p,
.fancy-card-body li,
.fancy-card-body span {
    color: var(--text-secondary) !important;
}

.fancy-card-body strong {
    color: var(--text-primary) !important;
}

.fancy-card-body a {
    color: var(--accent-primary) !important;
}

.fancy-card-footer {
    background-color: var(--bg-tertiary) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 0.75rem 1.5rem;
}

/* Tags */
.tag-badge {
    background-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Description containers */
.kurze-beschreibung-container,
.lange-beschreibung-container {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.kurze-beschreibung,
.lange-beschreibung {
    color: var(--text-secondary) !important;
}

.kurze-beschreibung h6,
.lange-beschreibung h6 {
    color: var(--text-primary) !important;
}

/* Accordion */
.fancy-accordion .accordion-item {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.5rem;
}

.fancy-accordion .accordion-header {
    background-color: var(--bg-tertiary) !important;
}

.fancy-accordion .accordion-button {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: none !important;
}

.fancy-accordion .accordion-button:not(.collapsed) {
    background-color: var(--bg-card) !important;
    color: var(--accent-primary) !important;
}

.fancy-accordion .accordion-body {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

/* Carousel */
.carousel-inner img {
    border-radius: var(--radius-md);
}

.thumbnail {
    border-color: var(--border-subtle) !important;
    background-color: var(--bg-tertiary) !important;
    border-radius: var(--radius-md);
}

.thumbnail:hover {
    border-color: var(--accent-primary) !important;
}

/* Buttons */
.btn-back,
.btn-success {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.btn-back:hover,
.btn-success:hover {
    background-color: var(--accent-tertiary) !important;
    border-color: var(--accent-tertiary) !important;
}

.btn-outline-primary {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--accent-tertiary) !important;
    border-color: var(--accent-tertiary) !important;
}

.btn-custom {
    border-radius: var(--radius-md) !important;
}

/* Toggle link */
.toggle-link {
    color: var(--accent-primary) !important;
}

.toggle-link:hover {
    color: var(--accent-secondary) !important;
}

/* Contact/Team Cards */
.contact-item {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-accent);
}

.contact-item h5,
.contact-item h6 {
    color: var(--text-primary) !important;
}

.contact-item p {
    color: var(--text-secondary) !important;
}

/* Event Cards */
.event-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-accent);
}

/* Portal Cards */
.portal-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    padding: 2rem;
    transition: all var(--transition-normal);
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.portal-card h3,
.portal-card h4,
.portal-card h5 {
    color: var(--text-primary) !important;
}

.portal-card p {
    color: var(--text-secondary) !important;
}

/* Skills Cards */
.skill-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-accent);
}

/* Form Controls */
.form-control {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md);
}

.form-control:focus {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    color: var(--text-primary) !important;
}

.form-control::placeholder {
    color: var(--text-tertiary) !important;
}

.form-label {
    color: var(--text-secondary) !important;
}

/* Tables */
.table {
    color: var(--text-primary) !important;
}

.table thead th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

.table tbody td {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-subtle) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-secondary) !important;
}

/* DataTables */
.dataTables_wrapper {
    color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

/* Cards (Bootstrap) */
.card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
}

.card-header {
    background-color: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.card-body {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

.card-footer {
    background-color: var(--bg-tertiary) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

.card-title {
    color: var(--text-primary) !important;
}

.card-text {
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
}

.alert-success {
    background-color: rgba(144, 188, 20, 0.15) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.15) !important;
    border-color: #0dcaf0 !important;
    color: #0dcaf0 !important;
}

/* Modals */
.modal-content {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg);
}

.modal-header {
    background-color: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.modal-title {
    color: var(--text-primary) !important;
}

.modal-body {
    color: var(--text-secondary) !important;
}

.modal-footer {
    background-color: var(--bg-tertiary) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

.btn-close {
    filter: invert(1);
}

/* Lists */
.list-group-item {
    background-color: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

.list-group-item:hover {
    background-color: var(--bg-tertiary) !important;
}

/* Text utilities override */
.text-dark {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-tertiary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Background utilities */
.bg-light {
    background-color: var(--bg-tertiary) !important;
}

.bg-white {
    background-color: var(--bg-card) !important;
}

/* Border utilities */
.border {
    border-color: var(--border-subtle) !important;
}

.border-bottom {
    border-bottom-color: var(--border-subtle) !important;
}

.border-top {
    border-top-color: var(--border-subtle) !important;
}

/* HR elements */
hr {
    border-color: var(--border-subtle);
    opacity: 1;
}

/* Container overrides */
.container {
    max-width: 100%;
    padding-bottom: 2rem;
}

/* Main content area spacing */
main {
    color: var(--text-primary);
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
    color: var(--text-primary);
}

main p {
    color: var(--text-secondary);
}

/* Video Section */
.video-player {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* MakerSpace specific */
.makerspace-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-normal);
}

.makerspace-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-accent);
}

/* XR Dropdown styling */
.xr-dropdown-container {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
}

.xr-dropdown-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    transition: all var(--transition-fast);
}

.xr-dropdown-card:hover {
    background-color: var(--accent-primary) !important;
}

.xr-card-title {
    color: var(--text-primary) !important;
}

.xr-dropdown-card:hover .xr-card-title {
    color: var(--bg-primary) !important;
}

.xr-badge {
    background-color: var(--accent-primary) !important;
}

/* Icon styling */
i.bi,
i.fa,
i.fas,
i.far,
i.fab {
    color: inherit;
}

/* ============================================
   ADMIN AREA SPECIFIC OVERRIDES
   ============================================ */

/* Admin Page Headers */
.container h3,
.container-fluid h3 {
    color: var(--text-primary);
}

/* Admin Tables */
.table-dark,
.table-dark thead,
.table-dark thead th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

.table-dark tbody td {
    background-color: var(--bg-card) !important;
}

.table-hover tbody tr:hover {
    background-color: var(--bg-card-hover) !important;
}

/* DataTables specific overrides */
table.dataTable {
    border-collapse: collapse !important;
}

table.dataTable thead th,
table.dataTable thead td {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

table.dataTable tbody tr {
    background-color: var(--bg-card) !important;
}

table.dataTable tbody tr:hover {
    background-color: var(--bg-card-hover) !important;
}

table.dataTable tbody td {
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background-color: var(--bg-secondary) !important;
}

table.dataTable.stripe tbody tr.even,
table.dataTable.display tbody tr.even {
    background-color: var(--bg-card) !important;
}

/* DataTables sorting icons */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    opacity: 0.5;
}

/* Admin Action Buttons */
.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #bb2d3b !important;
}

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

.btn-info {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Bootstrap buttons with dark theme */
.btn-primary {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

.btn-primary:hover {
    background-color: var(--accent-tertiary) !important;
    border-color: var(--accent-tertiary) !important;
}

.btn-outline-success {
    color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

.btn-outline-success:hover {
    background-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

.btn-outline-primary {
    color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

/* Toggle Switches */
.form-check-input:checked {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

.form-switch .form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-subtle);
}

/* Select Dropdowns */
select.form-control,
select.form-select {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

select.form-control option,
select.form-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Input file */
.form-control[type="file"] {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.form-control[type="file"]::file-selector-button {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: var(--radius-sm);
}

/* CKEditor overrides */
.ck.ck-editor__main>.ck-editor__editable {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

.ck.ck-toolbar {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-subtle) !important;
}

.ck.ck-button {
    color: var(--text-primary) !important;
}

.ck.ck-button:hover {
    background-color: var(--bg-tertiary) !important;
}

/* Image previews */
.img-thumbnail {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-subtle) !important;
}

/* Validation messages */
.field-validation-error {
    color: #dc3545 !important;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

/* Status badges */
.badge {
    font-weight: 500;
}

.badge.bg-success {
    background-color: var(--accent-primary) !important;
}

.badge.bg-secondary {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* Toastr notifications */
.toast {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.toast-success {
    background-color: rgba(144, 188, 20, 0.9) !important;
}

.toast-error {
    background-color: rgba(220, 53, 69, 0.9) !important;
}

.toast-info {
    background-color: rgba(13, 202, 240, 0.9) !important;
}

.toast-warning {
    background-color: rgba(255, 193, 7, 0.9) !important;
    color: #000 !important;
}

/* SweetAlert2 dark theme */
.swal2-popup {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background-color: var(--accent-primary) !important;
}

.swal2-cancel {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Progress bars */
.progress {
    background-color: var(--bg-tertiary) !important;
}

.progress-bar {
    background-color: var(--accent-primary) !important;
}

/* Tabs/Nav tabs */
.nav-tabs {
    border-bottom-color: var(--border-subtle) !important;
}

.nav-tabs .nav-link {
    color: var(--text-secondary) !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link:hover {
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--bg-card) !important;
    border-color: var(--border-subtle) var(--border-subtle) var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Pills */
.nav-pills .nav-link {
    color: var(--text-secondary) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

/* Offcanvas */
.offcanvas {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.offcanvas-header {
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* Spinner */
.spinner-border {
    color: var(--accent-primary) !important;
}

/* Empty states */
.empty-state {
    color: var(--text-tertiary);
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

/* Container backgrounds */
.container,
.container-fluid {
    background-color: transparent;
}

/* Shadow overrides */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Text selection */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* Focus states */
*:focus {
    outline-color: var(--accent-primary);
}

/* Print styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }

    .app-sidebar,
    .top-toolbar,
    .app-footer {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }
}

/* ========================
   BRIGHT WHITE TEXT OVERRIDES
   No gray on gray - all text should be readable
========================= */
body,
p,
span,
div,
label,
.form-label,
.form-check-label,
td,
th,
li,
.card-text,
.text-muted,
.text-secondary {
    color: var(--text-primary) !important;
}

/* Specific overrides for secondary text that should still be visible */
.text-muted,
.form-text,
small,
.small,
figcaption,
.caption {
    color: var(--text-secondary) !important;
}

/* Ensure links are visible */
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.sidebar-nav-item) {
    color: var(--accent-primary);
}

a:not(.btn):not(.nav-link):not(.navbar-brand):not(.sidebar-nav-item):hover {
    color: var(--accent-secondary);
}

/* Form placeholders should be visible but subtle */
::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

/* Table text */
table,
.table {
    color: var(--text-primary);
}

.table td,
.table th {
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

/* Badge text */
.badge {
    color: white !important;
}

/* Dropdown items */
.dropdown-item {
    color: var(--text-primary) !important;
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   ENHANCED PORTFOLIO SECTIONS
   Premium animations and effects
   ============================================ */

/* Intro Text Section */
.portfolio-intro {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.portfolio-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
}

.portfolio-intro-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-intro-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Stats Section */
.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, var(--accent-primary));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
    border-color: var(--border-accent);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--stat-color, var(--accent-primary));
    transition: all var(--transition-normal);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Feature Cards Section */
.portfolio-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--feature-color, var(--accent-primary));
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    transform-origin: bottom;
}

.feature-card:hover {
    transform: translateY(-6px) translateX(4px);
    box-shadow: var(--shadow-lg), -4px 4px 20px var(--accent-glow);
    border-color: var(--border-accent);
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--feature-color, var(--accent-primary)), var(--accent-tertiary));
    color: white;
    margin-bottom: 1.25rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-subtitle {
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.feature-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.feature-link i {
    transition: transform var(--transition-fast);
}

.feature-card:hover .feature-link {
    color: var(--accent-secondary);
}

.feature-card:hover .feature-link i {
    transform: translateX(4px);
}

/* CTA Section */
.portfolio-cta {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 3rem 0;
}

.portfolio-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: ctaShine 8s linear infinite;
}

@keyframes ctaShine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portfolio-cta-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: ctaFloat 3s ease-in-out infinite;
}

@keyframes ctaFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.portfolio-cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
}

.portfolio-cta-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.portfolio-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--accent-primary);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.portfolio-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: var(--accent-tertiary);
}

.portfolio-cta-btn i {
    transition: transform var(--transition-fast);
}

.portfolio-cta-btn:hover i {
    transform: translateX(4px);
}

/* Partners Section */
.portfolio-partners {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
}

.partners-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.partner-logo {
    max-height: 50px;
    max-width: 120px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all var(--transition-normal);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.section-divider-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced Project Cards */
.modern-card-enhanced {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.modern-card-enhanced:hover {
    transform: translateY(-8px) rotateX(2deg);
}

.modern-card-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.modern-card-enhanced:hover::after {
    opacity: 1;
}

/* Animated Counter */
.counter-animate {
    display: inline-block;
}

/* Highlight Carousel Section Title */
.highlights-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.highlights-section-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.highlights-section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .portfolio-intro {
        padding: 2rem 1.5rem;
    }

    .portfolio-intro-title {
        font-size: 1.75rem;
    }

    .portfolio-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .portfolio-features {
        grid-template-columns: 1fr;
    }

    .portfolio-cta {
        padding: 2rem 1.5rem;
    }

    .portfolio-cta-title {
        font-size: 1.5rem;
    }
}

/* Animation for elements entering viewport */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ============================================
   ENHANCED HIGHLIGHTS SECTIONS
   Premium carousel design for KIBar & Projects
   ============================================ */

.highlights-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 2rem 0 3rem 0;
}

.highlights-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.highlights-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-accent), transparent);
}

/* Header */
.highlights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.highlights-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.highlights-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--highlight-accent), color-mix(in srgb, var(--highlight-accent) 70%, black));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--highlight-accent) 40%, transparent);
}

.highlights-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.highlights-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0.25rem 0 0 0;
}

.highlights-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.highlights-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.highlights-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.highlights-nav-btn:hover {
    background: var(--highlight-accent);
    color: white;
}

.highlights-counter {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}

.highlights-counter span {
    color: var(--highlight-accent);
}

.highlights-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid var(--highlight-accent);
    border-radius: var(--radius-md);
    color: var(--highlight-accent);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.highlights-view-all:hover {
    background: var(--highlight-accent);
    color: white;
}

.highlights-view-all i {
    transition: transform var(--transition-fast);
}

.highlights-view-all:hover i {
    transform: translateX(4px);
}

/* Carousel */
.highlights-carousel {
    position: relative;
}

.highlights-carousel .carousel-inner {
    overflow: visible;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 992px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* Highlight Card */
.highlight-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
}

.highlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--highlight-accent), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 1;
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 30px color-mix(in srgb, var(--highlight-accent) 15%, transparent);
    border-color: transparent;
}

.highlight-card:hover::before {
    opacity: 1;
}

/* Card Image */
.highlight-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.highlight-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.highlight-card:hover .highlight-card-image img {
    transform: scale(1.08);
}

.highlight-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.highlight-card:hover .highlight-card-overlay {
    opacity: 1;
}

.highlight-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--highlight-accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-card-badge-status {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
}

/* Card Content */
.highlight-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.highlight-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.highlight-card-tag {
    padding: 0.25rem 0.625rem;
    background: color-mix(in srgb, var(--highlight-accent) 15%, transparent);
    color: var(--highlight-accent);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.highlight-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.highlight-card-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--highlight-accent);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.highlight-card-action i {
    transition: transform var(--transition-fast);
}

.highlight-card:hover .highlight-card-action {
    color: var(--text-primary);
}

.highlight-card:hover .highlight-card-action i {
    transform: translateX(4px);
    color: var(--highlight-accent);
}

/* Progress Dots */
.highlights-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.highlights-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border-subtle);
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.highlights-progress-dot:hover {
    background: var(--text-tertiary);
}

.highlights-progress-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--highlight-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .highlights-section {
        padding: 1.25rem;
    }

    .highlights-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .highlights-actions {
        width: 100%;
        justify-content: space-between;
    }

    .highlights-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .highlights-title {
        font-size: 1.25rem;
    }

    .highlight-card-image {
        height: 150px;
    }
}

/* ============================================
   THEME FIXES FOR PORTFOLIO & ADMIN VIEWS
   Ensuring consistent styling across all 4 themes
   ============================================ */

/* Feature icons - Always white on gradient background (all themes) */
.feature-icon,
.preview-card-feature .feature-icon,
.preview-feature-icon {
    color: white !important;
}

/* Stat icons - Use accent color from theme */
.stat-icon i,
.preview-card-stat .stat-icon i,
.preview-stat-icon i {
    color: inherit;
}

/* CTA section - Always white text on gradient */
.portfolio-cta,
.portfolio-cta-title,
.portfolio-cta-subtitle,
.portfolio-cta-icon,
.preview-card-cta,
.preview-card-cta .cta-icon,
.preview-card-cta .cta-title,
.preview-card-cta .cta-subtitle,
.preview-cta,
.preview-cta-icon,
.preview-cta-title,
.preview-cta-subtitle {
    color: white;
}

/* Highlights section icons - Always white */
.highlights-icon i,
.highlight-card-badge i {
    color: white !important;
}

/* ============================================
   LIGHT MODE - Portfolio & Admin Specific Fixes
   ============================================ */

body.theme-light .stat-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .stat-card:hover {
    box-shadow: var(--shadow-lg);
}

body.theme-light .feature-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .feature-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Light mode portfolio intro */
body.theme-light .portfolio-intro {
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
}

body.theme-light .portfolio-intro-title {
    background: linear-gradient(135deg, #1c1917, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light mode highlights section */
body.theme-light .highlights-section {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .highlights-icon {
    box-shadow: var(--shadow-sm);
}

body.theme-light .highlight-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .highlight-card:hover {
    box-shadow: var(--shadow-lg);
}

body.theme-light .highlight-card-tag {
    background: #e7e5e4;
    color: #44403c;
}

/* Light mode section divider */
body.theme-light .section-divider {
    background: linear-gradient(90deg, transparent, #d6d3d1, transparent);
}

body.theme-light .section-divider-text {
    background: #fafaf9;
    color: #78716c;
}

/* Light mode partners section */
body.theme-light .portfolio-partners {
    background: #f5f5f4;
}

body.theme-light .partners-title {
    color: #44403c;
}

body.theme-light .partner-logo {
    filter: grayscale(20%);
}

body.theme-light .partner-logo:hover {
    filter: grayscale(0%);
}

/* ============================================
   LIGHT MODE - Admin Views Fixes
   ============================================ */

/* Admin cards - Project & MakerSpace */
body.theme-light .admin-project-card,
body.theme-light .admin-makerspace-card,
body.theme-light .admin-preview-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .admin-project-card:hover,
body.theme-light .admin-makerspace-card:hover,
body.theme-light .admin-preview-card:hover {
    box-shadow: var(--shadow-lg);
}

body.theme-light .admin-card-controls,
body.theme-light .admin-controls-header {
    background: #f5f5f4;
}

body.theme-light .admin-card-image {
    background: #e7e5e4;
}

body.theme-light .admin-card-title {
    color: #1c1917;
}

body.theme-light .admin-card-description {
    color: #44403c;
}

body.theme-light .admin-card-tag {
    background: #e7e5e4;
    color: #44403c;
}

body.theme-light .admin-toggle-cell {
    border-color: #e7e5e4;
}

body.theme-light .admin-toggle-cell:hover {
    background: #f5f5f4;
}

body.theme-light .admin-toggle-cell.active {
    background: rgba(16, 185, 129, 0.1);
}

body.theme-light .admin-toggle-icon {
    color: #78716c;
}

body.theme-light .admin-toggle-cell.active .admin-toggle-icon {
    color: #10b981;
}

body.theme-light .admin-toggle-label {
    color: #78716c;
}

/* Admin toolbar & search */
body.theme-light .admin-toolbar .admin-search {
    background: #ffffff;
    border-color: #e7e5e4;
}

body.theme-light .admin-toolbar .admin-search input {
    color: #1c1917;
}

body.theme-light .admin-count {
    background: #f5f5f4;
    color: #44403c;
}

/* Admin PortfolioSection preview cards */
body.theme-light .preview-card-stat,
body.theme-light .preview-card-feature,
body.theme-light .preview-card-partner {
    background: #ffffff;
    border-color: #e7e5e4;
}

body.theme-light .preview-card-stat .stat-value,
body.theme-light .preview-card-stat .stat-label,
body.theme-light .preview-card-feature .feature-title,
body.theme-light .preview-card-feature .feature-content {
    color: #1c1917;
}

body.theme-light .preview-card-feature .feature-subtitle {
    color: var(--accent-primary);
}

body.theme-light .preview-card-intro {
    background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
}

body.theme-light .preview-card-intro .intro-subtitle {
    color: #44403c;
}

body.theme-light .preview-card-partner .partner-placeholder {
    background: #e7e5e4;
    color: #78716c;
}

/* Section type header in admin */
body.theme-light .section-type-header {
    background: #f5f5f4;
    border-color: #e7e5e4;
}

body.theme-light .section-type-header h5 {
    color: #1c1917;
}

body.theme-light .section-type-count {
    background: #e7e5e4;
    color: #44403c;
}

/* Admin preview grid */
body.theme-light .admin-preview-grid {
    background: #fafaf9;
}

/* Card action bar - always dark for contrast */
.card-actions-bar {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%) !important;
}

.card-actions-bar .card-toggle-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.card-actions-bar .card-toggle-wrapper {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   MIDNIGHT PURPLE THEME - Admin Fixes
   ============================================ */

body.theme-midnight .admin-project-card,
body.theme-midnight .admin-makerspace-card,
body.theme-midnight .admin-preview-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(37, 26, 51, 0.5));
    border-color: rgba(167, 139, 250, 0.15);
}

body.theme-midnight .admin-card-controls,
body.theme-midnight .admin-controls-header {
    background: rgba(26, 18, 37, 0.8);
    border-color: rgba(167, 139, 250, 0.1);
}

body.theme-midnight .section-type-header {
    background: rgba(26, 18, 37, 0.8);
    border-color: rgba(167, 139, 250, 0.1);
}

body.theme-midnight .section-type-header .type-icon {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

body.theme-midnight .admin-card-order {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

body.theme-midnight .admin-toggle-cell.active {
    background: rgba(167, 139, 250, 0.15);
}

body.theme-midnight .admin-toggle-cell.active .admin-toggle-icon {
    color: #a78bfa;
}

body.theme-midnight .stat-card,
body.theme-midnight .feature-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(37, 26, 51, 0.5));
    border-color: rgba(167, 139, 250, 0.15);
}

body.theme-midnight .highlights-section {
    background: linear-gradient(145deg, var(--bg-secondary), rgba(37, 26, 51, 0.3));
    border-color: rgba(167, 139, 250, 0.15);
}

body.theme-midnight .highlight-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(37, 26, 51, 0.5));
}

/* ============================================
   FOREST EMERALD THEME - Admin Fixes
   ============================================ */

body.theme-forest .admin-project-card,
body.theme-forest .admin-makerspace-card,
body.theme-forest .admin-preview-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(22, 41, 33, 0.5));
    border-color: rgba(16, 185, 129, 0.15);
}

body.theme-forest .admin-card-controls,
body.theme-forest .admin-controls-header {
    background: rgba(15, 31, 24, 0.8);
    border-color: rgba(16, 185, 129, 0.1);
}

body.theme-forest .section-type-header {
    background: rgba(15, 31, 24, 0.8);
    border-color: rgba(16, 185, 129, 0.1);
}

body.theme-forest .section-type-header .type-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

body.theme-forest .admin-card-order {
    background: linear-gradient(135deg, #10b981, #059669);
}

body.theme-forest .stat-card,
body.theme-forest .feature-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(22, 41, 33, 0.5));
    border-color: rgba(16, 185, 129, 0.15);
}

body.theme-forest .highlights-section {
    background: linear-gradient(145deg, var(--bg-secondary), rgba(22, 41, 33, 0.3));
    border-color: rgba(16, 185, 129, 0.15);
}

body.theme-forest .highlight-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(22, 41, 33, 0.5));
}

/* ============================================
   DARK THEME (Default) - Ensure consistency
   ============================================ */

body:not(.theme-light):not(.theme-midnight):not(.theme-forest) .admin-project-card,
body:not(.theme-light):not(.theme-midnight):not(.theme-forest) .admin-makerspace-card,
body:not(.theme-light):not(.theme-midnight):not(.theme-forest) .admin-preview-card {
    background: var(--bg-card);
    border-color: var(--border-subtle);
}

body:not(.theme-light):not(.theme-midnight):not(.theme-forest) .section-type-header .type-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ============================================
   SORTABLE / DRAG-AND-DROP FIXES
   ============================================ */

/* Drag handle styling */
.drag-handle,
.handle {
    cursor: grab !important;
    user-select: none;
    touch-action: none;
}

.drag-handle:active,
.handle:active {
    cursor: grabbing !important;
}

/* Sortable item being dragged */
.sortable-row.ui-sortable-helper {
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

/* Sortable placeholder styling */
.sortable-placeholder,
.ui-sortable-placeholder {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 2px dashed var(--accent-primary) !important;
    border-radius: var(--radius-lg) !important;
    visibility: visible !important;
    min-height: 180px !important;
}

/* Admin preview cards sortable */
.admin-preview-grid.ui-sortable .admin-preview-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-preview-grid.ui-sortable .admin-preview-card.ui-sortable-helper {
    transition: none;
}

/* ============================================
   COMPREHENSIVE LIGHT MODE ICON FIXES
   All icons that should remain white on colored backgrounds
   ============================================ */

/* Feature icons - Always white on gradient (all themes) */
.feature-icon i,
.feature-icon,
.preview-card-feature .feature-icon i,
body.theme-light .feature-icon,
body.theme-light .feature-icon i,
body.theme-light .preview-card-feature .feature-icon,
body.theme-light .preview-card-feature .feature-icon i {
    color: white !important;
}

/* Highlights section icons - Always white on colored background */
.highlights-icon,
.highlights-icon i,
body.theme-light .highlights-icon,
body.theme-light .highlights-icon i {
    color: white !important;
}

/* CTA section - Always white */
.portfolio-cta-icon,
.portfolio-cta-icon i,
.cta-icon,
.cta-icon i,
body.theme-light .portfolio-cta-icon,
body.theme-light .portfolio-cta-icon i,
body.theme-light .cta-icon,
body.theme-light .cta-icon i,
body.theme-light .preview-card-cta .cta-icon,
body.theme-light .preview-card-cta .cta-icon i {
    color: white !important;
}

/* Section type header icons - Always white */
.section-type-header .type-icon,
.section-type-header .type-icon i,
body.theme-light .section-type-header .type-icon,
body.theme-light .section-type-header .type-icon i {
    color: white !important;
}

/* Admin panel icons - Always white */
.admin-panel-header i,
body.theme-light .admin-panel-header i {
    color: white !important;
}

/* Sidebar nav icons on colored backgrounds */
.sidebar-nav-item.active .sidebar-nav-icon i,
body.theme-light .sidebar-nav-item.active .sidebar-nav-icon i {
    color: white !important;
}

/* Badge icons */
.highlight-card-badge i,
.modern-card-badge i,
body.theme-light .highlight-card-badge i,
body.theme-light .modern-card-badge i {
    color: inherit;
}

/* Navigation buttons icons */
.highlights-nav-btn i,
body.theme-light .highlights-nav-btn i {
    color: inherit;
}

/* Order badge in admin */
.order-badge,
body.theme-light .order-badge {
    color: white !important;
}

/* Light mode specific overrides for stat icons - use accent color */
body.theme-light .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
}

body.theme-light .stat-icon i {
    color: var(--stat-color, var(--accent-primary)) !important;
}

/* Light mode card action buttons */
body.theme-light .card-action-btn i {
    color: white !important;
}

/* Light mode toggle active icons in admin */
body.theme-light .admin-toggle-cell.active .admin-toggle-icon,
body.theme-light .admin-toggle-cell.active .admin-toggle-icon i {
    color: white !important;
}

/* Light mode portfolio cards text */
body.theme-light .highlight-card-title {
    color: #1c1917;
}

body.theme-light .highlight-card-desc {
    color: #44403c;
}

body.theme-light .highlight-card-action {
    color: var(--accent-primary);
}

/* Light mode highlights header */
body.theme-light .highlights-title {
    color: #1c1917;
}

body.theme-light .highlights-subtitle {
    color: #57534e;
}

body.theme-light .highlights-counter {
    color: #78716c;
}

/* Light mode feature cards */
body.theme-light .feature-title {
    color: #1c1917;
}

body.theme-light .feature-subtitle {
    color: var(--accent-primary);
}

body.theme-light .feature-content {
    color: #44403c;
}

/* Light mode stat cards */
body.theme-light .stat-value {
    color: #1c1917;
}

body.theme-light .stat-label {
    color: #57534e;
}

/* Light mode filter section */
body.theme-light .filter-section {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .filter-toggle-btn {
    background: #f5f5f4;
    color: #44403c;
    border-color: #e7e5e4;
}

body.theme-light .filter-toggle-btn.active {
    background: var(--accent-primary);
    color: white;
}

body.theme-light .filter-search {
    background: #f5f5f4;
    border-color: #e7e5e4;
}

body.theme-light .filter-search input {
    color: #1c1917;
}

body.theme-light .filter-search i {
    color: #78716c;
}

body.theme-light .filter-dropdown-btn {
    background: #f5f5f4;
    color: #44403c;
    border-color: #e7e5e4;
}

body.theme-light .filter-dropdown-menu {
    background: #ffffff;
    border-color: #e7e5e4;
    box-shadow: var(--shadow-lg);
}

/* Light mode modern cards */
body.theme-light .modern-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .modern-card:hover {
    box-shadow: var(--shadow-lg);
}

body.theme-light .modern-card-title {
    color: #1c1917;
}

body.theme-light .modern-card-description {
    color: #44403c;
}

body.theme-light .modern-card-tag {
    background: #e7e5e4;
    color: #44403c;
}

/* Light mode no results */
body.theme-light .no-results {
    background: #f5f5f4;
    color: #44403c;
}

body.theme-light .no-results i {
    color: #a8a29e;
}

/* Light mode pagination */
body.theme-light .pagination-btn {
    background: #ffffff;
    color: #44403c;
    border-color: #e7e5e4;
}

body.theme-light .pagination-btn:hover,
body.theme-light .pagination-btn.active {
    background: var(--accent-primary);
    color: white;
}