:root {
    --color-bg: #0A0A0A;
    --color-surface: #141414;
    --color-surface-elevated: #1A1A1A;
    --color-border: #252525;
    --color-border-hover: #353535;
    --color-text-primary: #EBEBEB;
    --color-text-secondary: #A0A0A0;
    --color-text-tertiary: #6B6B6B;
    --color-accent: #3B82F6;
    --color-accent-hover: #2563EB;
    --color-accent-light: rgba(59, 130, 246, 0.1);
    --color-success: #10B981;
    --color-danger: #EF4444;
    --color-warning: #F59E0B;
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 240px;
    --max-content-width: 1200px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo {
    padding: 40px 24px 24px;
    border-bottom: 1px solid var(--color-border);
}

.logo h1 {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.nav-links {
    flex: 1;
    padding: 20px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-link:hover {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
}

.nav-link.active {
    background: var(--color-accent);
    color: white;
}

.nav-link svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper {
    width: 100%;
    max-width: var(--max-content-width);
}

.page-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    animation: fadeInUp 0.6s var(--transition-slow) backwards;
    gap: 24px;
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.page-subtitle {
    font-size: 15px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
    animation: fadeInUp 0.6s var(--transition-slow) backwards;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-hover);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-family: var(--font-sans);
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Quick Actions */
.quick-actions {
    animation: fadeInUp 0.6s var(--transition-slow) backwards;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-size: 15px;
    font-weight: 500;
    border: none;
}

.action-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    background: var(--color-surface-elevated);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-border-hover);
    background: var(--color-surface);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
}

/* Input Fields */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-sans);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    color: var(--color-text-primary);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
    background: var(--color-surface);
}

.input-field::placeholder {
    color: var(--color-text-tertiary);
}

textarea.input-field {
    resize: vertical;
    min-height: 100px;
}

select.input-field {
    cursor: pointer;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    animation: modalIn 0.3s 0.1s forwards;
    border: 1px solid var(--color-border);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
}

.modal-body {
    padding: 28px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utilities */
.text-danger {
    color: var(--color-danger);
}

.text-success {
    color: var(--color-success);
}

.text-muted {
    color: var(--color-text-secondary);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 24px 16px;
        width: calc(100% - 200px);
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px 16px;
    }
    
    .nav-link {
        flex-direction: column;
        min-width: 80px;
        padding: 8px;
        font-size: 12px;
        gap: 6px;
    }
    
    .logo {
        padding: 20px 16px 16px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
}
