/* ==================== UNIFIED CSS VARIABLES ==================== */
:root {
    /* Base Colors */
    --bg-color: #ffffff;
    --card-bg: #F0F8FF;
    
    /* Text Colors */
    --text-dark: #2d3436;
    --text-light: #7f8fa6;
    --text-white: #ffffff;
    
    /* Theme Colors - Dashboard (Blue) */
    --theme-dashboard-accent: #00d2ff;
    --theme-dashboard-accent-light: #33dfff;
    --theme-dashboard-purple: #a55eea;
    --theme-dashboard-orange: #ff9f43;
    --theme-dashboard-red: #ff4757;
    
    /* Theme Colors - Calculator (Green) */
    --theme-calculator-accent: #00a800;
    --theme-calculator-accent-light: #33cc33;
    --theme-calculator-green: #008000;
    --theme-calculator-green-light: #e8f7e8;
    --theme-calculator-green-dark: #1a1a2e;
    --theme-calculator-selected: #2e7d32;
    
    /* Theme Colors - CRM (Orange) */
    --theme-crm-accent: #ff9f43;
    --theme-crm-accent-light: #ffb74d;
    --theme-crm-orange: #ff8c00;
    --theme-crm-orange-light: #fff3e0;
    --theme-crm-orange-dark: #2e1a00;
    
    /* Theme Colors - Products (Lavender) */
    --theme-products-accent: #c8a2c8;
    --theme-products-accent-light: #d8b9d8;
    --theme-products-lilac: #b57edc;
    --theme-products-lavender-light: #fbeeff;
    --theme-products-lavender: #e6d4f7;
    --theme-products-lilac-dark: #2a1a2e;

    /* Theme Colors - Statistics (Yellow) */
    --theme-statistics-accent: #f1c40f;
    --theme-statistics-accent-light: #f7dc6f;
    --theme-statistics-yellow: #e67e22;
    --theme-statistics-yellow-light: #fef9e7;
    --theme-statistics-yellow-dark: #3d2e1a;

    /* Theme Colors - Data (Red) */
    --theme-data-accent: #e74c3c;
    --theme-data-accent-light: #ff6b5b;
    --theme-data-red: #c0392b;
    --theme-data-red-light: #fee7e7;
    --theme-data-red-dark: #2c1a1a;

    /* Theme Colors - Settings (Grey) */
    --theme-settings-accent: #95a5a6;
    --theme-settings-accent-light: #bdc3c7;
    --theme-settings-grey: #7f8c8d;
    --theme-settings-grey-light: #ecf0f1;
    --theme-settings-grey-dark: #2c3e50;
    
    /* Unified Glow Effects */
    --glow-box-blue: 0 0 17.25px rgba(0,210,255,0.345), 0 0 34.5px rgba(0,210,255,0.115);
    --glow-text-blue: 0 0 5.75px rgba(0,210,255,0.69);
    --glow-box-green: 0 0 17.25px rgba(0,168,0,0.345), 0 0 34.5px rgba(0,168,0,0.115);
    --glow-text-green: 0 0 5.75px rgba(0,168,0,0.69);
    --glow-box-orange: 0 0 17.25px rgba(255,159,67,0.345), 0 0 34.5px rgba(255,159,67,0.115);
    --glow-text-orange: 0 0 5.75px rgba(255,159,67,0.69);
    --glow-box-lavender: 0 0 17.25px rgba(200,162,200,0.345), 0 0 34.5px rgba(200,162,200,0.115);
    --glow-text-lavender: 0 0 5.75px rgba(200,162,200,0.69);
    --glow-box-yellow: 0 0 17.25px rgba(241,196,15,0.345), 0 0 34.5px rgba(241,196,15,0.115);
    --glow-text-yellow: 0 0 5.75px rgba(241,196,15,0.69);
    --glow-box-red: 0 0 17.25px rgba(231,76,60,0.345), 0 0 34.5px rgba(231,76,60,0.115);
    --glow-text-red: 0 0 5.75px rgba(231,76,60,0.69);
    --glow-box-grey: 0 0 17.25px rgba(149,165,166,0.345), 0 0 34.5px rgba(149,165,166,0.115);
    --glow-text-grey: 0 0 5.75px rgba(149,165,166,0.69);
    
    /* Unified Hover Effects (only glow, no movement) */
    --glow-box-hover-blue: 0 0 5.75px rgba(0,210,255,0.115), 0 0 11.5px rgba(0,210,255,0.04025);
    --glow-box-hover-green: 0 0 5.75px rgba(0,168,0,0.115), 0 0 11.5px rgba(0,168,0,0.04025);
    --glow-box-hover-orange: 0 0 5.75px rgba(255,159,67,0.115), 0 0 11.5px rgba(255,159,67,0.04025);
    --glow-box-hover-lavender: 0 0 5.75px rgba(200,162,200,0.115), 0 0 11.5px rgba(200,162,200,0.04025);
    --glow-box-hover-yellow: 0 0 5.75px rgba(241,196,15,0.115), 0 0 11.5px rgba(241,196,15,0.04025);
    --glow-box-hover-red: 0 0 5.75px rgba(231,76,60,0.115), 0 0 11.5px rgba(231,76,60,0.04025);
    --glow-box-hover-grey: 0 0 5.75px rgba(149,165,166,0.115), 0 0 11.5px rgba(149,165,166,0.04025);
    
    /* Unified Shadows */
    --shadow-light: rgba(255,255,255,0.9);
    --shadow-dark-blue: rgba(209,217,230,0.4);
    --shadow-dark-green: rgba(180,200,180,0.4);
    --shadow-dark-orange: rgba(230,200,180,0.4);
    --shadow-dark-lavender: rgba(200,180,200,0.3);
    --shadow-dark-yellow: rgba(241,196,15,0.2);
    --shadow-dark-red: rgba(231,76,60,0.2);
    --shadow-dark-grey: rgba(149,165,166,0.3);
    
    /* Border Radius */
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 5px;
    --radius-xs: 3px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s cubic-bezier(0.4,0.0,0.2,1);
    --transition-focus: 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    
    /* Blur Effects */
    --blur-amount: 7px;
    
    /* Z-index Layers */
    --z-sidebar: 10;
    --z-notification: 10000;
    --z-modal: 1000;
    --z-focus: 100;
    
    /* Focus Mode Variables */
    --focus-scale: 1.02;
    --shrink-scale: 0.8;
    --focus-glow-intensity: 0.4;
    --focus-transition: 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    
    /* Current Theme Variables (overridden by theme classes) */
    --theme-accent: var(--theme-dashboard-accent);
    --theme-accent-light: var(--theme-dashboard-accent-light);
    --theme-shadow-dark: var(--shadow-dark-blue);
    --theme-glow-box: var(--glow-box-blue);
    --theme-glow-text: var(--glow-text-blue);
    --theme-glow-box-hover: var(--glow-box-hover-blue);
    --theme-card-bg: var(--card-bg);
    --theme-card-border: rgba(255,255,255,0.9);
    --theme-sidebar-bg: linear-gradient(180deg, #D4EFF5 0%, #9AD3F5 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(174,214,241,0.3);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-dashboard-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-blue), inset -1px -1px 3px var(--shadow-light), 0 0 17.25px rgba(0,210,255,0.345);
}

/* ==================== FOCUS MODE ANIMATIONS ==================== */
@keyframes focusScaleIn {
    0% { transform: scale(1); box-shadow: var(--theme-glow-box-hover); z-index: 1; }
    100% { transform: scale(var(--focus-scale)); box-shadow: 0 0 34.5px color-mix(in srgb, var(--theme-accent) 40%, transparent), 0 0 69px color-mix(in srgb, var(--theme-accent) 20%, transparent); z-index: var(--z-focus); }
}
@keyframes focusScaleOut {
    0% { transform: scale(var(--focus-scale)); box-shadow: 0 0 34.5px color-mix(in srgb, var(--theme-accent) 40%, transparent); z-index: var(--z-focus); }
    100% { transform: scale(1); box-shadow: var(--theme-glow-box-hover); z-index: 1; }
}
@keyframes shrinkIn {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(var(--shrink-scale)); opacity: 0.7; }
}
@keyframes shrinkOut {
    0% { transform: scale(var(--shrink-scale)); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes subtlePulse {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(27px); }
    to { opacity: 1; transform: translateX(0); }
}

.focus-mode-active {
    animation: focusScaleIn var(--transition-focus) forwards !important;
    position: relative;
    z-index: var(--z-focus) !important;
    transition: all var(--transition-focus) !important;
    outline: none !important;
    border-color: transparent !important;
}
.focus-mode-active::before { display: none !important; }
.products-grid.focus-mode-active .product-detail-card.focus-mode-active,
.products-grid.focus-mode-active .product-categories-card.focus-mode-active,
.products-grid.focus-mode-active .search-calc-row.focus-mode-active {
    outline: none !important;
    border: none !important;
    border-style: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
}
.products-grid.focus-mode-active .product-detail-card.focus-mode-active *,
.products-grid.focus-mode-active .product-categories-card.focus-mode-active *,
.products-grid.focus-mode-active .search-calc-row.focus-mode-active * {
    border-color: transparent !important;
    outline: none !important;
}
.focus-mode-active .focus-animation {
    animation: subtlePulse 3s ease-in-out infinite;
}
.shrunk-mode {
    animation: shrinkIn var(--transition-focus) forwards !important;
    filter: grayscale(30%);
    opacity: 0.7;
    pointer-events: none;
    transition: all var(--transition-focus) !important;
}
.shrunk-mode:hover {
    transform: scale(var(--shrink-scale)) !important;
    cursor: default !important;
}
.app-container:has(.focus-mode-active) .content-container { overflow: visible; }
.exit-focus-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--theme-accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    z-index: calc(var(--z-focus) + 1);
    box-shadow: 0 2px 7px rgba(0,0,0,0.2);
    transition: all var(--transition-normal);
    opacity: 0;
    transform: scale(0.8);
}
.focus-mode-active .exit-focus-btn {
    opacity: 1;
    transform: scale(1);
    animation: fadeInScale 0.3s ease-out forwards;
}
.exit-focus-btn:hover {
    background: var(--theme-accent-light);
    transform: scale(1.1);
    box-shadow: 0 4px 11px rgba(0,0,0,0.3);
}
.focus-mode-active .enhanced-content { display: block !important; animation: fadeInUp 0.5s ease-out forwards; }
.enhanced-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 15px;
    margin-top: 15px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
    box-shadow: 0 4px 11px rgba(0,0,0,0.05);
    animation: slideInRight 0.5s ease-out forwards;
}
.enhanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.enhanced-item {
    background: color-mix(in srgb, var(--theme-accent) 5%, transparent);
    border-radius: var(--radius-sm);
    padding: 10px;
    border-left: 3px solid var(--theme-accent);
}
.enhanced-item-title {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.enhanced-item-value {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}
@media (max-width: 991px) {
    .focus-mode-active { transform: none !important; animation: none !important; }
    .focus-mode-active::before { display: none; }
    .shrunk-mode { display: none !important; }
}

/* ==================== BASE STYLES ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-size: 0.91rem;
}
.app-container {
    width: min(99.4vw, 1675px);
    height: min(95vh, 950px);
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;
    position: relative;
    min-height: 600px;
    transition: grid-template-columns 0.3s ease;
}

/* Sidebar collapsed state */
.app-container.sidebar-collapsed {
    grid-template-columns: 1fr 60px;
}

.app-container.products-active {
    margin-top: 3px;
}
.app-container.products-active,
.app-container.products-active .content-container,
.app-container.products-active .page {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ==================== UTILITY CLASSES ==================== */
.soft-card {
    background: var(--theme-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 5px 5px 11px var(--theme-shadow-dark), -5px -5px 11px var(--shadow-light);
    padding: 14px;
    transition: all var(--transition-normal);
    border: 1px solid var(--theme-card-border);
    position: relative;
    overflow: hidden;
}
.soft-card:hover {
    box-shadow: var(--theme-glow-box-hover);
    border-color: color-mix(in srgb, var(--theme-accent) 40%, transparent);
    z-index: 2;
}
.inset-input {
    background: var(--bg-color);
    box-shadow: inset 3px 3px 5px var(--theme-shadow-dark), inset -3px -3px 5px var(--shadow-light);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    width: 100%;
    outline: none;
    color: var(--text-dark);
    transition: var(--transition-normal);
    font-size: 0.91rem;
    font-family: inherit;
}
.inset-input:focus {
    box-shadow: var(--theme-input-focus);
}
.blurred {
    filter: blur(var(--blur-amount));
    user-select: none;
    cursor: default;
}
.hidden { display: none !important; }

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; color: var(--text-dark); line-height: 1.2; }
h2 { font-weight: 600; margin-bottom: 5px; font-size: 1.36rem; }
h3 { font-weight: 600; margin-bottom: 5px; font-size: 1.14rem; }
h4 { font-weight: 500; color: var(--text-light); font-size: 0.77rem; margin-bottom: 8px; }
h5 { font-weight: 600; font-size: 0.82rem; margin-bottom: 5px; }
h6 { font-weight: 500; font-size: 0.73rem; margin-bottom: 4px; }

/* ==================== CONTENT AREA ==================== */
.content-container { position: relative; height: 100%; overflow: hidden; }

/* ==================== PAGE VISIBILITY ==================== */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-color);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 10;
}

.products-grid.focus-mode-active .page,
.products-grid.focus-mode-active .content-container,
.products-grid.focus-mode-active .products-page { background: transparent !important; }

/* ==================== HEADER STYLES ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.avatar {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    background: url('https://i.pravatar.cc/150?img=32') center/cover;
    border: 2px solid white;
    box-shadow: 3px 3px 9px var(--theme-shadow-dark);
}

/* ==================== SEARCH SECTION ==================== */
.search-section { width: 100%; min-height: 100px; max-height: 120px; display: flex; flex-direction: column; justify-content: center; }
.search-container { position: relative; margin-top: 5px; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 0.91rem; z-index: 1; }
.search-input { padding-left: 44px; font-size: 0.91rem; height: 42px; }

/* ==================== SIDEBAR ==================== */
.sidebar {
    background: var(--theme-sidebar-bg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: var(--theme-sidebar-shadow);
    z-index: var(--z-sidebar);
    border: 1px solid var(--theme-sidebar-border);
    height: 100%;
    transition: width 0.3s ease, padding 0.3s ease;
    position: relative;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    width: 100%;
    transition: width 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    cursor: pointer;
}

.logo {
    color: var(--text-white);
    font-size: clamp(1.82rem, 3.64vw, 2.27rem);
    text-shadow: 0 0 7px rgba(255,255,255,0.8);
    line-height: 1;
    padding: 0 9px;
}

.logo-subtitle {
    color: white;
    font-size: calc(0.68rem - 1.5px);
    font-weight: 400;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-top: 12px;
    margin-bottom: 20px;
    text-shadow: 0 0 7px rgba(255,255,255,0.9), 0 0 14px var(--theme-accent);
    white-space: nowrap;
    transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

/* Sidebar collapsed styles */
.sidebar-collapsed .sidebar {
    padding: 20px 0;
}

.sidebar-collapsed .logo-container {
    transform: scale(0.8);
    margin-bottom: 5px;
}

.sidebar-collapsed .logo-subtitle {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.sidebar-collapsed .nav-item {
    width: 40px;
    height: 40px;
}

.sidebar-collapsed .nav-item .nav-label {
    display: none;
}

.sidebar-collapsed .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Navigation container */
.nav-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
    width: 100%;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Nav spacer */
.nav-spacer {
    width: 100%;
    height: 40px;
    margin: 4px 0;
    flex-shrink: 0;
}
.sidebar-collapsed .nav-spacer {
    height: 40px;
}

/* Nav item hover effects */
.nav-item:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}
.nav-item:hover .nav-label {
    color: white;
}

/* Tooltip base styles (for collapsed sidebar) – entry delay 1.85s, exit instant */
.sidebar-collapsed .nav-item {
    position: relative;
}
.sidebar-collapsed .nav-item::after,
.sidebar-collapsed .nav-item::before {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0s 0s; /* exit instant */
}
.sidebar-collapsed .nav-item:hover::after,
.sidebar-collapsed .nav-item:hover::before {
    transition: opacity 0s 1.85s; /* entry delay 1.85s */
    opacity: 1;
}
.sidebar-collapsed .nav-item::after {
    content: attr(data-title);
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid var(--theme-accent);
    z-index: 1000;
}
.sidebar-collapsed .nav-item::before {
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--theme-accent);
    z-index: 1001;
}

/* Sidebar toggle wrapper */
.sidebar-toggle-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 4px 0;
    padding: 2px 0;
    position: relative;
}

/* Toggle button styled like nav items */
.sidebar-toggle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #5a6c7d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-normal);
    box-shadow: none;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: var(--theme-accent);
}

/* Tooltip for sidebar toggle (collapsed state) – entry delay 1.85s, exit instant */
.sidebar-collapsed .sidebar-toggle-wrapper {
    position: relative;
}
.sidebar-collapsed .sidebar-toggle-wrapper::after,
.sidebar-collapsed .sidebar-toggle-wrapper::before {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0s 0s; /* exit instant */
}
.sidebar-collapsed .sidebar-toggle-wrapper:hover::after,
.sidebar-collapsed .sidebar-toggle-wrapper:hover::before {
    transition: opacity 0s 1.85s; /* entry delay 1.85s */
    opacity: 1;
}
.sidebar-collapsed .sidebar-toggle-wrapper::after {
    content: 'Extend';
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: normal; /* allow wrapping */
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid var(--theme-accent);
    z-index: 1000;
}
.sidebar-collapsed .sidebar-toggle-wrapper::before {
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--theme-accent);
    z-index: 1001;
}

/* Tooltip for sidebar toggle (expanded state) – now also on left side, with arrow */
:not(.sidebar-collapsed) .sidebar-toggle-wrapper {
    position: relative;
}
:not(.sidebar-collapsed) .sidebar-toggle-wrapper::after,
:not(.sidebar-collapsed) .sidebar-toggle-wrapper::before {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0s 0s; /* exit instant */
}
:not(.sidebar-collapsed) .sidebar-toggle-wrapper:hover::after,
:not(.sidebar-collapsed) .sidebar-toggle-wrapper:hover::before {
    transition: opacity 0s 1.85s; /* entry delay 1.85s */
    opacity: 1;
}
:not(.sidebar-collapsed) .sidebar-toggle-wrapper::after {
    content: 'Reduce';
    right: 50px; /* position to the left of the icon */
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: normal;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid var(--theme-accent);
    z-index: 1000;
}
:not(.sidebar-collapsed) .sidebar-toggle-wrapper::before {
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--theme-accent);
    z-index: 1001;
}

/* Theme-specific hover for toggle */
.dashboard-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(0,210,255,0.5), 0 0 31.4px rgba(0,210,255,0.2); }
.calculator-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(0,168,0,0.5), 0 0 31.4px rgba(0,168,0,0.2); }
.crm-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(255,159,67,0.5), 0 0 31.4px rgba(255,159,67,0.2); }
.products-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(200,162,200,0.5), 0 0 31.4px rgba(200,162,200,0.2); }
.statistics-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(241,196,15,0.5), 0 0 31.4px rgba(241,196,15,0.2); }
.data-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(231,76,60,0.5), 0 0 31.4px rgba(231,76,60,0.2); }
.settings-active .sidebar-toggle:hover { box-shadow: 0 0 15.7px rgba(149,165,166,0.5), 0 0 31.4px rgba(149,165,166,0.2); }

/* Nav items – removed borders/outlines */
.nav-item {
    margin: 0;
    width: 59px;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: #5a6c7d;
    position: relative;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: none;
    outline: none;
}
.nav-item i { 
    font-size: 1.09rem; 
    margin-bottom: 2px;
    border: none;
    outline: none;
}
.nav-item .nav-label { 
    font-size: 0.5rem; 
    font-weight: 500; 
    letter-spacing: 0.5px; 
    color: #5a6c7d; 
}

/* Reduce spacing on smaller heights */
@media (max-height: 700px) {
    .nav-container {
        gap: 6px;
    }
    .nav-item {
        width: 50px;
        height: 44px;
    }
    .nav-item i {
        font-size: 1rem;
        margin-bottom: 1px;
    }
    .nav-item .nav-label {
        font-size: 0.45rem;
    }
    .sidebar-toggle-wrapper {
        margin: 2px 0;
    }
    .sidebar-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-height: 600px) {
    .nav-container {
        gap: 4px;
    }
    .nav-item {
        width: 45px;
        height: 38px;
    }
    .nav-item i {
        font-size: 0.9rem;
    }
    .nav-item .nav-label {
        font-size: 0.4rem;
    }
    .sidebar-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Theme-specific hover for nav items */
.dashboard-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(0,210,255,0.5), 0 0 31.4px rgba(0,210,255,0.2); }
.calculator-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(0,168,0,0.5), 0 0 31.4px rgba(0,168,0,0.2); }
.crm-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(255,159,67,0.5), 0 0 31.4px rgba(255,159,67,0.2); }
.products-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(200,162,200,0.5), 0 0 31.4px rgba(200,162,200,0.2); }
.statistics-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(241,196,15,0.5), 0 0 31.4px rgba(241,196,15,0.2); }
.data-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(231,76,60,0.5), 0 0 31.4px rgba(231,76,60,0.2); }
.settings-active .nav-item:hover { box-shadow: 0 0 15.7px rgba(149,165,166,0.5), 0 0 31.4px rgba(149,165,166,0.2); }

.nav-item.active {
    background: var(--text-white);
    color: var(--theme-nav-active-color);
    box-shadow: 0 0 21px color-mix(in srgb, var(--theme-accent) 46%, transparent), inset 0 0 10.5px color-mix(in srgb, var(--theme-accent) 11.5%, transparent);
}
.nav-item.active .nav-label { color: var(--text-dark); }

/* ==================== THEME SWITCHING ==================== */
/* Dashboard (default) – already set in :root */

/* Calculator */
.app-container.calculator-active {
    --theme-accent: var(--theme-calculator-accent);
    --theme-accent-light: var(--theme-calculator-accent-light);
    --theme-shadow-dark: var(--shadow-dark-green);
    --theme-glow-box: var(--glow-box-green);
    --theme-glow-text: var(--glow-text-green);
    --theme-glow-box-hover: var(--glow-box-hover-green);
    --theme-card-bg: var(--theme-calculator-green-light);
    --theme-card-border: rgba(0,168,0,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #C4E5D3 0%, #8AD5A5 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(138,213,165,0.3);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-calculator-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-green), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(0,168,0,0.345);
}

/* CRM */
.app-container.crm-active {
    --theme-accent: var(--theme-crm-accent);
    --theme-accent-light: var(--theme-crm-accent-light);
    --theme-shadow-dark: var(--shadow-dark-orange);
    --theme-glow-box: var(--glow-box-orange);
    --theme-glow-text: var(--glow-text-orange);
    --theme-glow-box-hover: var(--glow-box-hover-orange);
    --theme-card-bg: var(--theme-crm-orange-light);
    --theme-card-border: rgba(255,159,67,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #FFE0B2 0%, #FFB74D 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(255,183,77,0.3);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-crm-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-orange), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(255,159,67,0.345);
}

/* Products */
.app-container.products-active {
    --theme-accent: var(--theme-products-accent);
    --theme-accent-light: var(--theme-products-accent-light);
    --theme-shadow-dark: var(--shadow-dark-lavender);
    --theme-glow-box: var(--glow-box-lavender);
    --theme-glow-text: var(--glow-text-lavender);
    --theme-glow-box-hover: var(--glow-box-hover-lavender);
    --theme-card-bg: var(--theme-products-lavender-light);
    --theme-card-border: rgba(200,162,200,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #E6D4F7 0%, #C8A2C8 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(200,162,200,0.3);
    --theme-sidebar-border: transparent !important;
    --theme-nav-active-color: var(--theme-products-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-lavender), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(200,162,200,0.345);
}
.app-container.products-active .sidebar { border: none !important; box-shadow: none !important; }

/* Statistics – Yellow */
.app-container.statistics-active {
    --theme-accent: var(--theme-statistics-accent);
    --theme-accent-light: var(--theme-statistics-accent-light);
    --theme-shadow-dark: var(--shadow-dark-yellow);
    --theme-glow-box: var(--glow-box-yellow);
    --theme-glow-text: var(--glow-text-yellow);
    --theme-glow-box-hover: var(--glow-box-hover-yellow);
    --theme-card-bg: var(--theme-statistics-yellow-light);
    --theme-card-border: rgba(241,196,15,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #FEF5E7 0%, #F9E79F 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(241,196,15,0.25);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-statistics-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-yellow), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(241,196,15,0.345);
}
.app-container.statistics-active .sidebar { border: none !important; box-shadow: none !important; }

/* Data – Red */
.app-container.data-active {
    --theme-accent: var(--theme-data-accent);
    --theme-accent-light: var(--theme-data-accent-light);
    --theme-shadow-dark: var(--shadow-dark-red);
    --theme-glow-box: var(--glow-box-red);
    --theme-glow-text: var(--glow-text-red);
    --theme-glow-box-hover: var(--glow-box-hover-red);
    --theme-card-bg: var(--theme-data-red-light);
    --theme-card-border: rgba(231,76,60,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #FADBD8 0%, #E74C3C 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(231,76,60,0.25);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-data-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-red), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(231,76,60,0.345);
}
.app-container.data-active .sidebar { border: none !important; box-shadow: none !important; }

/* Settings – Grey */
.app-container.settings-active {
    --theme-accent: var(--theme-settings-accent);
    --theme-accent-light: var(--theme-settings-accent-light);
    --theme-shadow-dark: var(--shadow-dark-grey);
    --theme-glow-box: var(--glow-box-grey);
    --theme-glow-text: var(--glow-text-grey);
    --theme-glow-box-hover: var(--glow-box-hover-grey);
    --theme-card-bg: var(--theme-settings-grey-light);
    --theme-card-border: rgba(149,165,166,0.1);
    --theme-sidebar-bg: linear-gradient(180deg, #E0E0E0 0%, #B0BEC5 100%);
    --theme-sidebar-shadow: -7px 7px 18px rgba(149,165,166,0.25);
    --theme-sidebar-border: transparent;
    --theme-nav-active-color: var(--theme-settings-accent);
    --theme-input-focus: inset 1px 1px 3px var(--shadow-dark-grey), inset -1px -1px 3px var(--shadow-light), 0 0 15.7px rgba(149,165,166,0.345);
}
.app-container.settings-active .sidebar { border: none !important; box-shadow: none !important; }

/* ==================== CUSTOM SCROLLBARS ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: color-mix(in srgb, var(--theme-card-bg) 50%, transparent); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--theme-accent) 0%, color-mix(in srgb, var(--theme-accent) 50%, #000) 100%); border-radius: 5px; border: 2px solid rgba(255,255,255,0.8); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--theme-accent-light) 0%, color-mix(in srgb, var(--theme-accent) 70%, #000) 100%); }
* { scrollbar-width: thin; scrollbar-color: var(--theme-accent) color-mix(in srgb, var(--theme-card-bg) 50%, transparent); }

/* ==================== COMMON ACTION BUTTONS ==================== */
/* Filled buttons */
.add-price-btn,
.crm-manual-search-btn,
.crm-add-cancel-btn,
.unblur-button {
    background: var(--theme-accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
    font-family: inherit;
    line-height: 1;
}

.add-price-btn:hover,
.crm-manual-search-btn:hover,
.crm-add-cancel-btn:hover,
.unblur-button:hover {
    background: var(--theme-accent-light);
    box-shadow: var(--theme-glow-box-hover);
}

/* Outline buttons */
.unfocus-button,
.task-back-btn,
.clear-result-btn {
    background: transparent;
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
    border-radius: 30px;
    padding: 8px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.unfocus-button:hover,
.task-back-btn:hover,
.clear-result-btn:hover {
    background: var(--theme-accent);
    color: white;
    box-shadow: var(--theme-glow-box-hover);
}

.unfocus-button i,
.task-back-btn i,
.clear-result-btn i {
    font-size: 1rem;
}

/* Compact variant for small screens */
@media (max-width: 767px) {
    .add-price-btn,
    .crm-manual-search-btn,
    .crm-add-cancel-btn,
    .unblur-button {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .unfocus-button,
    .task-back-btn,
    .clear-result-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* ==================== NOTIFICATION BELL & DROPDOWN ==================== */
.notification-bell-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 4px 0;
    padding: 2px 0;
    position: relative;
}

.notification-bell {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #5a6c7d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    position: relative;
}

.notification-bell:hover {
    background: rgba(255,255,255,0.2);
    color: var(--theme-accent);
}

/* Shake animation – triggers when a new notification arrives */
@keyframes shake-bell {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    70% { transform: rotate(2deg); }
    80% { transform: rotate(-2deg); }
    90% { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}
.notification-bell.shake {
    animation: shake-bell 0.6s ease-in-out !important;
}

/* Pulse animation for persistent unread reminder */
@keyframes bell-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.notification-bell.pulse {
    animation: bell-pulse 1.5s infinite;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: white;
    color: var(--theme-accent);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1px solid var(--theme-accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-badge.hidden {
    display: none;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 22vh;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    height: 490px;
    max-height: 490px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid var(--theme-accent);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 700px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        left: 10px;
        transform: none;
        height: 400px;
        top: 22vh;
    }
}

.notification-dropdown.visible {
    display: flex;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.notification-clear-all {
    background: var(--theme-accent-light);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    margin-right: 15px;
    transition: all var(--transition-normal);
    font-family: inherit;
    line-height: 1;
}
.notification-clear-all i {
    font-size: 0.9rem;
}
.notification-clear-all:hover {
    background: var(--theme-accent);
    box-shadow: var(--theme-glow-box-hover);
}

.notification-close {
    background: var(--theme-accent);
    color: white;
    border: 2px solid var(--theme-accent);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
    font-family: inherit;
    line-height: 1;
}
.notification-close:hover {
    background: var(--theme-accent-light);
    border-color: var(--theme-accent-light);
    box-shadow: var(--theme-glow-box-hover);
}
.notification-close i {
    font-size: inherit;
}

.notification-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    gap: 16px;
    flex-wrap: wrap;
}

.notif-cat-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.notif-cat-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid color-mix(in srgb, var(--theme-accent) 25%, transparent);
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}
.notif-cat-btn:hover {
    background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}
.notif-cat-btn.active {
    background: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
}
.notif-cat-btn i {
    font-size: 0.78rem;
}

.notif-view-filters {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    border-radius: 10px;
    padding: 3px;
    width: fit-content;
}

.notif-view-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1;
}
.notif-view-btn.active {
    background: var(--theme-accent);
    color: white;
}

.notification-item[data-category="calc"] i {
    color: #00a800;
}
.notification-item[data-category="crm"] i {
    color: #ff9f43;
}
.notification-item[data-category="system"] i,
.notification-item[data-category="products"] i {
    color: var(--theme-accent);
}

.notification-list {
    overflow-y: auto;
    flex: 1;
    padding: 10px 0;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}
.notification-item.unread {
    font-weight: 600;
}
.notification-item:hover {
    background: #f5f5f5;
}

.notification-item i {
    width: 24px;
    text-align: center;
    color: var(--theme-accent);
    font-size: 1.1rem;
}

.notification-item .notification-message {
    flex: 1;
    color: var(--text-dark);
}

.notification-item .notification-time {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
}

.notification-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    font-size: 1rem;
}

/* Sidebar collapsed adjustments */
.sidebar-collapsed .notification-bell-wrapper {
    transform: scale(0.8);
}

/* Theme-specific hover for notification bell */
.dashboard-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(0,210,255,0.5), 0 0 31.4px rgba(0,210,255,0.2); }
.calculator-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(0,168,0,0.5), 0 0 31.4px rgba(0,168,0,0.2); }
.crm-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(255,159,67,0.5), 0 0 31.4px rgba(255,159,67,0.2); }
.products-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(200,162,200,0.5), 0 0 31.4px rgba(200,162,200,0.2); }
.statistics-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(241,196,15,0.5), 0 0 31.4px rgba(241,196,15,0.2); }
.data-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(231,76,60,0.5), 0 0 31.4px rgba(231,76,60,0.2); }
.settings-active .notification-bell:hover { box-shadow: 0 0 15.7px rgba(149,165,166,0.5), 0 0 31.4px rgba(149,165,166,0.2); }

/* ==================== LOGO POPUP ==================== */
.logo-popup {
    display: none;
    position: absolute;
    top: 22vh;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 2px solid var(--theme-accent);
    z-index: 10001;
    flex-direction: column;
    overflow: hidden;
}

.logo-popup.visible {
    display: flex;
}

.logo-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.logo-popup-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--theme-accent);
}

.logo-popup-close {
    background: var(--theme-accent);
    color: white;
    border: 2px solid var(--theme-accent);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
    font-family: inherit;
    line-height: 1;
}
.logo-popup-close:hover {
    background: var(--theme-accent-light);
    border-color: var(--theme-accent-light);
    box-shadow: var(--theme-glow-box-hover);
}
.logo-popup-close i {
    font-size: inherit;
}

.logo-popup-content {
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
}

.logo-popup-image {
    float: right;
    width: 45%;
    margin: 0 0 2.5pt 2.5pt;
    text-align: center;
}
.logo-popup-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.logo-popup-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 15px;
}
.logo-popup-text p:last-child {
    margin-bottom: 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
/* Tablet font reductions */
@media (max-width: 991px) and (min-width: 768px) {
    body { font-size: 12.7px; }
    h2 { font-size: 1.18rem; }
    h3 { font-size: 1.0rem; }
    h4 { font-size: 0.73rem; }
    .soft-card { padding: 12px; }
}
@media (max-width: 767px) {
    body { font-size: 11.8px; }
    h2 { font-size: 1.09rem; }
    h3 { font-size: 0.91rem; }
    h4 { font-size: 0.68rem; }
    .soft-card { padding: 11px; }
}
@media (max-width: 479px) {
    body { font-size: 10.9px; }
    h2 { font-size: 1.0rem; }
    h3 { font-size: 0.86rem; }
    h4 { font-size: 0.64rem; }
    .soft-card { padding: 10px; }
}

/* Original responsive layouts preserved */
@media (max-width: 991px) and (min-width: 768px) {
    body { overflow: auto; padding: 8px; }
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 70px;
        height: auto;
        min-height: 100vh;
        width: 100%;
        max-width: none;
    }
    .app-container.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
    .content-container { order: 1; height: calc(100vh - 80px); }
    .sidebar { order: 2; flex-direction: row; height: 70px; padding: 8px; justify-content: space-around; }
    .sidebar-toggle-wrapper { display: none; }
    .logo-container { flex-direction: row; margin-bottom: 0; margin-right: auto; }
    .logo { font-size: 1.82rem; padding-left: 18px; }
    .logo-subtitle { margin-top: 0; margin-left: 7px; margin-bottom: 0; font-size: calc(0.64rem - 1.5px); }
    .nav-container { flex-direction: row; justify-content: flex-end; flex: 1; gap: 12px; }
    .nav-item { width: 45px; height: 45px; margin: 0 4px; }
    .nav-item .nav-label { display: none; }
    .nav-item.settings { margin-top: 0; }
    .nav-spacer { display: none; }
}
@media (max-width: 767px) {
    body { overflow: auto; padding: 5px; height: auto; }
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 60px;
        height: auto;
        min-height: 100vh;
        width: 100%;
        padding: 5px;
        gap: 8px;
    }
    .app-container.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
    .content-container { height: auto; order: 1; }
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        border-radius: 10px 10px 0 0;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 5px;
        z-index: var(--z-sidebar);
        order: 2;
    }
    .sidebar-toggle-wrapper { display: none; }
    .logo-container { display: none; }
    .nav-container { flex-direction: row; justify-content: space-around; width: 100%; gap: 10px; }
    .nav-item { width: 40px; height: 40px; margin: 0 2px; }
    .nav-item i { font-size: 0.91rem; margin-bottom: 0; }
    .nav-item .nav-label { display: none; }
    .page { position: relative; height: auto; overflow: visible; padding: 8px; }
    h2 { font-size: 1.18rem; }
    h3 { font-size: 1.0rem; }
    .nav-spacer { display: none; }
}
@media (max-width: 479px) {
    .app-container { padding: 5px; }
    .soft-card { padding: 10px; }
    .nav-item { width: 36px; height: 36px; }
    .nav-item i { font-size: 0.82rem; }
}
@media (max-height: 600px) and (orientation: landscape) {
    .app-container {
        grid-template-columns: 1fr 73px;
        grid-template-rows: 1fr;
        height: 100vh;
    }
    .app-container.sidebar-collapsed {
        grid-template-columns: 1fr 60px;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: 100%;
        flex-direction: column;
        justify-content: flex-start;
        padding: 12px 0;
        border-radius: var(--radius-lg);
    }
    .sidebar-toggle-wrapper { display: flex; }
    .logo-container { display: flex; margin-bottom: 15px; }
    .logo { font-size: 1.82rem; }
    .logo-subtitle { font-size: calc(0.64rem - 1.5px); margin-top: 10px; margin-bottom: 15px; }
    .nav-container { flex-direction: column; justify-content: center; gap: 12px; }
    .nav-item { width: 45px; height: 45px; margin: 4px 0; }
    .nav-item .nav-label { display: block; font-size: 0.45rem; }
    .content-container { height: 100%; }
    .nav-spacer { display: block; height: 30px; }
}
@media screen and (min-width: 1700px) {
    .app-container { height: 77vh; }
    .logo { font-size: 2.73rem; }
    .logo-subtitle { font-size: calc(0.77rem - 1.5px); margin-top: 15px; margin-bottom: 25px; }
}

/* ==================== UTILITY CLASSES ==================== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-025 { gap: 0.25rem; }
.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }
.mt-025 { margin-top: 0.25rem; }
.mt-1 { margin-top: 1rem; }
.mb-025 { margin-bottom: 0.25rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mr-1 { margin-right: 1rem; }
.p-05 { padding: 0.5rem; }
.p-1 { padding: 1rem; }
.pt-0 { padding-top: 0; }
.border-none { border: none; }
.flex-1 { flex: 1; }
.fw-500 { font-weight: 500; }
.w-100 { width: 100%; }
.minh-0 { min-height: 0; }
.overflow-y-auto { overflow-y: auto; }
.pos-relative { position: relative; }
.bg-white { background: white; }
.rounded-1 { border-radius: 0.5rem; }
.text-light { color: var(--text-light); }
.fw-600 { font-weight: 600; }
.fs-small { font-size: 0.75rem; }
.opacity-30 { opacity: 0.3; }
.border-left-red { border-left: 3px solid #f44336; }
.border-left-orange { border-left: 3px solid #ff9800; }

/* Icon positioned absolutely inside search container */
.search-icon-abs {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.95rem;
    z-index: 2;
}
.logo-img {
    width: 50px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    transition: all var(--transition-normal);
}

/* Adjust for collapsed sidebar */
.sidebar-collapsed .logo-img {
    width: 36px;
}

/* Adjust for tablet/mobile if needed */
@media (max-width: 991px) and (min-width: 768px) {
    .logo-img {
        width: 40px;
    }
}
@media (max-width: 767px) {
    .logo-img {
        width: 32px;
    }
}