/* Modern UI Design System */
:root {
    /* Color Palette */
    --primary: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --secondary: #64748b; /* Slate 500 */
    --success: #10b981; /* Emerald 500 */
    --danger: #ef4444; /* Red 500 */
    --warning: #f59e0b; /* Amber 500 */
    --info: #3b82f6; /* Blue 500 */
    
    /* Backgrounds */
    --bg-body: #f8fafc; /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-sidebar: #1e293b; /* Slate 800 */
    
    /* Text */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --text-light: #f1f5f9; /* Slate 100 */
    
    /* Decoration */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

a {
    text-decoration: none;
    transition: all 0.2s;
}

/* Layout Structure */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8; /* Slate 400 */
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

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

.nav-link i {
    width: 1.25rem;
    text-align: center;
}

.user-profile {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header/Top Bar (Mobile only essentially, or for breadcrumbs) */
.page-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

/* Components */
.card {
    background: var(--bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border-color: #e2e8f0;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}
