@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary: #64748b;
    /* Slate 500 */
    --success: #10b981;
    /* Emerald 500 */
    --danger: #ef4444;
    /* Red 500 */
    --warning: #f59e0b;
    /* Amber 500 */
    --info: #3b82f6;
    /* Blue 500 */
    --background: #f8fafc;
    /* Slate 50 */
    --surface: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border: #e2e8f0;
    /* Slate 200 */

    /* Spacing & Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius: 0.75rem;
    --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);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
}

#sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    /* Slate 800 */
    color: white;
    min-height: 100vh;
    transition: all 0.3s;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

#sidebar .sidebar-header {
    padding: 24px;
    background: #0f172a;
    /* Slate 900 */
    border-bottom: 1px solid #334155;
}

#sidebar .sidebar-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    color: #f8fafc;
}

#sidebar ul.components {
    padding: 16px 0;
    list-style: none;
    margin: 0;
}

#sidebar ul li a {
    padding: 14px 24px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #cbd5e1;
    /* Slate 300 */
    text-decoration: none;
    transition: all 0.2s;
    gap: 12px;
}

#sidebar ul li a:hover {
    background: #334155;
    color: white;
    padding-left: 28px;
}

#sidebar ul li.active>a {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 30px;
    box-sizing: border-box;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-main);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select.form-control {
    height: auto;
    min-height: 48px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.05em;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

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

.text-right {
    text-align: right;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
    }
}