/* Base Styles for All Pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #8B0000;
    --dark-gray: #2c2c2c;
    --medium-gray: #666;
    --light-gray: #e0e0e0;
    --bg-gray: #f5f5f5;
    --white: #ffffff;
    --green: #4CAF50;
    --red: #f44336;
    --yellow: #FFC107;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gray);
    color: var(--dark-gray);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-red) 0%, #A52A2A 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-header h2 {
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    flex: 1;
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin: 5px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    border-left-color: white;
    color: white;
    font-weight: bold;
}

.nav-icon {
    font-size: 1.5em;
    width: 30px;
    text-align: center;
}

.nav-label {
    font-size: 1em;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 20px 0;
}

.version-info {
    text-align: center;
    padding: 12px;
    font-size: 0.75em;
    color: rgba(255,255,255,0.5);
    font-family: 'Courier New', monospace;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 1.8em;
    color: var(--dark-gray);
}

.top-bar-actions {
    display: flex;
    gap: 15px;
}

.btn-icon {
    background: var(--bg-gray);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.content-wrapper {
    flex: 1;
    padding: 30px;
    max-width: 1600px;
    width: 100%;
}

/* Common Components */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: #A52A2A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--dark-gray);
    color: white;
}

.btn-secondary:hover {
    background: var(--medium-gray);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }
    
    .nav-label {
        display: none;
    }
    
    .sidebar-header h2 {
        font-size: 1.5em;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    :root {
        --sidebar-width: 70px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

/* Main Footer */
.main-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    margin-top: auto;
    border-top: 3px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95em;
}

.footer-text {
    color: rgba(255, 255, 255, 0.9);
}

.footer-text strong {
    font-weight: 700;
    color: white;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.5);
}

.footer-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}
