:root {
    --bgcolor: #1a1a1a;
    --bgcolor-light: #ffffff;
    --fgcolor: #2a2a2a;
    --fgcolor-light: #f5f5f5;
    --txtcolor: #e0e0e0;
    --txtcolor-light: #333;
    --subcolor: #888;
    --subcolor-light: #666;
    --acccolor: #4285f4;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bgcolor);
    color: var(--txtcolor);
    line-height: 1.6;
    transition: all 0.3s ease;
    padding: 100px 20px 20px 85px;
}

body.light-mode {
    background: var(--bgcolor-light);
    color: var(--txtcolor-light);
}

.container {
    max-width: 1400px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--acccolor);
    margin-bottom: 10px;
}

.header-left .subtitle {
    color: var(--subcolor);
    font-weight: 300;
}

body.light-mode .header-left .subtitle {
    color: var(--subcolor-light);
}

.header-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.control-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-info {
    color: var(--txtcolor);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

body.light-mode .user-info {
    background: var(--fgcolor-light);
    border: 1px solid var(--txtcolor);
    color: var(--txtcolor-light);
}

.user-info span:first-child {
    font-weight: 500;
}

.user-info span:last-child {
    color: var(--subcolor);
    font-size: 12px;
}

body.light-mode .user-info span:last-child {
    color: var(--subcolor-light);
}

.btn {
    background: var(--acccolor);
    border: 1px solid var(--acccolor);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #3367d6;
    border-color: #3367d6;
}

.btn-download {
    background: linear-gradient(135deg, var(--acccolor), #34a853);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-download:hover {
    background: linear-gradient(135deg, #3367d6, #2e7d32);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

.btn-download::before {
    content: "📥 ";
    margin-right: 6px;
}

.logout-btn {
    background: #f44336;
    border: 1px solid #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.logout-btn:hover {
    background: #d32f2f;
    border-color: #d32f2f;
}

.theme-toggle, .refresh-status {
    background: var(--txtcolor-light);
    border: 1px solid #555;
    color: var(--txtcolor);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

body.light-mode .theme-toggle,
body.light-mode .refresh-status {
    background: var(--fgcolor-light);
    border: 1px solid #ddd;
    color: var(--txtcolor-light);
}

.theme-toggle:hover {
    background: #444;
    border-color: var(--subcolor-light);
}

body.light-mode .theme-toggle:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.refresh-status {
    cursor: pointer;
    user-select: none;
}

.refresh-status.active {
    background: var(--acccolor);
    border-color: var(--acccolor);
    color: white;
}

.refresh-status:hover {
    background: #444;
    border-color: var(--subcolor-light);
}

.refresh-status.active:hover {
    background: #3367d6;
}

body.light-mode .refresh-status:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--txtcolor-light);
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
}

body.light-mode .filters {
    border-bottom: 1px solid #eee;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.filter-group label {
    font-size: 12px;
    color: var(--subcolor);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-mode .filter-group label {
    color: var(--subcolor-light);
}

select {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    background: var(--txtcolor-light);
    color: var(--txtcolor);
    min-width: 150px;
}

body.light-mode select {
    border: 1px solid #ddd;
    background: white;
    color: var(--txtcolor-light);
}

select:focus {
    outline: none;
    border-color: var(--acccolor);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

.stat {
    text-align: center;
    padding: 20px;
    border: 1px solid var(--txtcolor-light);
    border-radius: 8px;
    background: var(--fgcolor);
    transition: all 0.3s ease;
}

body.light-mode .stat {
    border: 1px solid #eee;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

body.light-mode .stat:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 300;
    color: var(--acccolor);
    display: block;
}

.stat-label {
    color: var(--subcolor);
    font-size: 14px;
    margin-top: 5px;
}

body.light-mode .stat-label {
    color: var(--subcolor-light);
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--txtcolor);
}

body.light-mode .section h2 {
    color: var(--txtcolor-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--fgcolor);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

body.light-mode table {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--txtcolor-light);
}

body.light-mode th,
body.light-mode td {
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 600;
    color: #ccc;
    background: var(--txtcolor-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-mode th {
    color: var(--subcolor-light);
    background: #fafafa;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background: var(--txtcolor-light);
}

body.light-mode tbody tr:hover {
    background: #f9f9f9;
}

.device-row {
    cursor: pointer;
}

.device-details {
    display: none;
    background: #222;
    padding: 20px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid var(--acccolor);
}

body.light-mode .device-details {
    background: #f9f9f9;
}

.device-details.show {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: var(--txtcolor-light);
    padding: 12px;
    border-radius: 6px;
}

body.light-mode .detail-item {
    background: #f0f0f0;
}

.detail-label {
    font-size: 11px;
    color: var(--subcolor);
    text-transform: uppercase;
    margin-bottom: 4px;
}

body.light-mode .detail-label {
    color: var(--subcolor-light);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--txtcolor);
}

body.light-mode .detail-value {
    color: var(--txtcolor-light);
}

.measurements-table {
    font-size: 12px;
    margin-top: 15px;
    background: var(--txtcolor-light);
    border-radius: 4px;
    overflow: hidden;
}

body.light-mode .measurements-table {
    background: white;
    border: 1px solid #eee;
}

.measurements-table th,
.measurements-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #444;
}

body.light-mode .measurements-table th,
body.light-mode .measurements-table td {
    border-bottom: 1px solid #eee;
}

.measurements-table th {
    background: #444;
    color: #bbb;
    font-size: 10px;
    font-weight: 600;
}

body.light-mode .measurements-table th {
    background: #fafafa;
    color: var(--subcolor-light);
}

.measurements-table tr:hover {
    background: #3a3a3a;
}

body.light-mode .measurements-table tr:hover {
    background: var(--fgcolor-light);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online { background: #4caf50; }
.status-warning { background: #ff9800; }
.status-offline { background: #f44336; }

/* Signal strength styling */
.signal-bar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.signal-strength {
    font-weight: 500;
}

.signal-excellent { color: #4caf50; }
.signal-good { color: #8bc34a; }
.signal-fair { color: #ff9800; }
.signal-poor { color: #f44336; }

/* Efficiency badges */
.efficiency-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.efficiency-excellent { background: #4caf50; color: white; }
.efficiency-good { background: #8bc34a; color: white; }
.efficiency-fair { background: #ff9800; color: white; }
.efficiency-poor { background: #f44336; color: white; }

/* Protocol badges */
.protocol-badge {
    background: var(--acccolor);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* Channel info */
.channel-info {
    color: var(--subcolor);
    font-size: 11px;
}

body.light-mode .channel-info {
    color: var(--subcolor-light);
}

/* Data amount styling */
.data-amount {
    color: var(--subcolor);
    font-size: 11px;
}

body.light-mode .data-amount {
    color: var(--subcolor-light);
}

.packet-loss-good { color: #4caf50; font-weight: 500; }
.packet-loss-warning { color: #ff9800; font-weight: 500; }
.packet-loss-bad { color: #f44336; font-weight: 500; }

.chart-container {
    height: 300px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--txtcolor-light);
    border-radius: 8px;
    background: var(--fgcolor);
    width: 100%;
}

body.light-mode .chart-container {
    border: 1px solid #eee;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loading {
    text-align: center;
    color: var(--subcolor-light);
    padding: 40px;
    font-style: italic;
}

body.light-mode .loading {
    color: var(--subcolor);
}

/* Responsive columns - hide less important data on smaller screens */
@media (max-width: 1200px) {
    .hide-on-medium {
        display: none;
    }
    
    .container {
        
    }
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
    
    body {
        padding: 20px 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .header-left {
        order: 2;
        margin-bottom: 20px;
    }
    
    .header-controls {
        order: 1;
        align-items: center;
        width: 100%;
        max-width: 400px;
    }
    
    .header-left h1 { 
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .header-left .subtitle {
        font-size: 14px;
    }
    
    .control-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .user-info {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .theme-toggle, .btn, .refresh-status, .logout-btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation for smooth transitions */
.device-details {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Focus styles for accessibility */
button:focus,
select:focus {
    outline: 2px solid var(--acccolor);
    outline-offset: 2px;
}

/* Loading spinner animation */
.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid var(--subcolor-light);
    border-radius: 50%;
    border-top-color: var(--acccolor);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state styles */
.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Success state styles */
.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 20px;
    left: 10%;
    z-index: 1000;
    width: 80%;
    padding: 12px 20px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
}

body.light-mode .top-nav {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.nav-logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--acccolor);
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: #3367d6;
    transform: scale(1.05);
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Round Button Base */
.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--txtcolor-light);
    background: var(--fgcolor);
    color: var(--txtcolor);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

body.light-mode .nav-btn {
    border: 2px solid #ddd;
    background: var(--fgcolor-light);
    color: var(--txtcolor-light);
}

.nav-btn:hover {
    transform: scale(1.1);
    border-color: var(--acccolor);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Theme Toggle */
.theme-btn {
    font-size: 18px;
}

body.light-mode .theme-btn::before {
    content: "";
    background-image: url("../assets/moon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height:20px;
    display: inline-block;
}

.theme-btn::before {
    content: "";
    background-image: url("../assets/sun-white.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height:20px;
    display: inline-block;
}

/* Auto/Manual Toggle */
/* Auto/Manual Toggle Button Fixes */
.refresh-btn {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.refresh-btn.auto {
    background: var(--acccolor) !important;
    border-color: var(--acccolor) !important;
    color: white !important;
    animation: pulse 2s infinite;
}

.refresh-btn.auto::before {
    content: "AUTO";
}

.refresh-btn:not(.auto)::before {
    content: "MAN";
}

/* Pulse animation for active auto-refresh */
@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); 
    }
}

/* Tooltip updates */
.refresh-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--txtcolor-light);
    color: var(--txtcolor);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    opacity: 0;
    animation: tooltipFade 0.3s ease forwards;
}
}

/* Logout Button */
.lofOff-btn {
    background: red;
    border-color: transparent;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.logOff-btn::before {
    content: "";
    background-image: url("../assets/on-red.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height:20px;
    display: inline-block;
}

/* Notifications Button */
.notification-btn {
    font-size: 18px;
}

.notification-btn::before {
    content: "";
    background-image: url("../assets/bell-white.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height:20px;
    display: inline-block;
}

body.light-mode .notification-btn::before {
    background-image: url('../assets/bell-black.svg');
}

/* Tooltip System */
.nav-btn[data-tooltip] {
    position: relative;
}

.nav-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--txtcolor-light);
    color: var(--txtcolor);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    opacity: 0;
    animation: tooltipFade 0.3s ease forwards;
}

body.light-mode .nav-btn[data-tooltip]:hover::after {
    background: var(--subcolor-light);
    color: white;
}

@keyframes tooltipFade {
    to {
        opacity: 1;
        bottom: -35px;
    }
}

/* Active states with pulse animation */
.nav-btn.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
}

/* Demo Content */
.demo-content {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.demo-section {
    background: var(--fgcolor);
    border: 1px solid var(--txtcolor-light);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

body.light-mode .demo-section {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.demo-section h2 {
    color: var(--acccolor);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 300;
}

.demo-section p {
    color: var(--subcolor);
    line-height: 1.6;
}

body.light-mode .demo-section p {
    color: var(--subcolor-light);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-controls {
        gap: 12px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-logo {
        font-size: 20px;
    }
    
    .refresh-btn {
        font-size: 8px;
    }
}

/* Notification Badge */
.nav-btn.has-notification::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #f44336;
    border-radius: 50%;
    border: 2px solid var(--bgcolor);
}

body.light-mode .nav-btn.has-notification::after {
    border-color: white;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 64px;
    background: var(--fgcolor);
    border-right: 1px solid var(--txtcolor-light);
    transition: width 0.2s ease;
    overflow: hidden;
    z-index: 1000;
}

body.light-mode .sidebar {
    background: var(--fgcolor-light);
    border-right: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.sidebar.expanded {
    width: 256px;
}

.sidebar:hover {
    overflow-y: auto;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--subcolor);
    border-radius: 3px;
}

body.light-mode .sidebar::-webkit-scrollbar-thumb {
    background: var(--subcolor-light);
}

/* Header */
.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
}

.hamburger {
    min-width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--txtcolor);
    font-size: 18px;
}

body.light-mode .hamburger {
    color: var(--txtcolor-light);
}

.hamburger:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

body.light-mode .hamburger:hover {
    background: rgba(0,0,0,0.04);
}

.logo {
    display: flex;
    align-items: center;
    padding-left: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar.expanded .logo {
    opacity: 1;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--acccolor);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

/* Navigation */
.nav {
    padding: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    margin-bottom: 4px;
    color: var(--txtcolor);
    text-decoration: none;
    border-radius: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

body.light-mode .nav-item {
    color: var(--txtcolor-light);
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
}

body.light-mode .nav-item:hover {
    background: rgba(0,0,0,0.04);
}

.nav-item.active {
    background: rgba(66, 133, 244, 0.12);
    color: var(--acccolor);
}

body.light-mode .nav-item.active {
    background: #e8f0fe;
    color: var(--acccolor);
}

.sidebar svg {
    height: 24px;
    width: 24px;
    fill: var(--txtcolor);
}

body.light-mode .sidebar svg {
    fill: var(--txtcolor-light);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    font-size: 18px;
    transition: margin-right 0.2s ease;
}

.sidebar.expanded .nav-icon {
    margin-right: 20px;
}

.nav-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.sidebar.expanded .nav-text {
    opacity: 1;
}

/* Submenus */
.nav-item.expandable::after {
    content: '›';
    margin-left: auto;
    font-size: 16px;
    transform: rotate(0deg);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.sidebar.expanded .nav-item.expandable::after {
    opacity: 1;
}

.nav-item.expandable.expanded::after {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 8px;
}

.submenu.expanded {
    max-height: 400px;
}

.submenu-item {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 12px 0 44px;
    margin-bottom: 2px;
    color: var(--subcolor);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 13px;
}

body.light-mode .submenu-item {
    color: var(--subcolor-light);
}

.submenu-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--txtcolor);
}

body.light-mode .submenu-item:hover {
    background: rgba(0,0,0,0.04);
    color: var(--txtcolor-light);
}

.submenu-item.active {
    color: var(--acccolor);
}

/* Tooltip */
.nav-item {
    position: relative;
}

.nav-item::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 72px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--txtcolor-light);
    color: var(--txtcolor);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1001;
}

body.light-mode .nav-item::before {
    background: var(--txtcolor-light);
    color: white;
}

.sidebar:not(.expanded) .nav-item:hover::before {
    opacity: 1;
}

/* Main content */
.main-content {
    margin-left: 64px;
    padding: 20px;
    transition: margin-left 0.2s ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 256px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--txtcolor-light);
    margin-bottom: 30px;
}

body.light-mode .top-bar {
    border-bottom: 1px solid #dadce0;
}

.page-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--txtcolor);
}

body.light-mode .page-title {
    color: var(--txtcolor-light);
}

.theme-toggle {
    background: var(--txtcolor-light);
    border: 1px solid var(--subcolor);
    color: var(--txtcolor);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

body.light-mode .theme-toggle {
    background: var(--fgcolor-light);
    border: 1px solid #dadce0;
    color: var(--txtcolor-light);
}

.content-card {
    background: var(--fgcolor);
    border: 1px solid var(--txtcolor-light);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

body.light-mode .content-card {
    background: white;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.expanded {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.3);
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
        background: var(--fgcolor);
        border-radius: 50%;
    }
}