/* ===== VARIABLES ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e9ecef;
}





/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.menu-toggle {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    margin-right: 1rem;
}

.menu-toggle span {
    display: block;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    color: white;
}

.sidebar-header small {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--secondary-color);
}

.nav-item i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item span {
    font-weight: 500;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.system-status {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: #c0392b;
    color: white;
}

.content-wrapper {
    padding: 1.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
    
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .content-wrapper {
        padding: 2rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar-nav .nav-item {
        padding: 0.875rem 2rem;
    }
    
    .content-wrapper {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .content-wrapper {
        padding: 2.5rem;
    }
}

/* Mobile landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .nav-item {
        padding: 0.5rem 1.5rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .menu-toggle span {
        height: 2px;
    }
}

/* Dark mode support */
/*@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --border-color: #404040;
    }
}*/

/* Print styles */
@media print {
    .sidebar,
    .content-header,
    .mobile-header {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
}
