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

:root {
    /* Color Palette - Premium Blue */
    --color-primary: #0ea5e9;
    /* Sky 500 */
    --color-primary-dark: #0284c7;
    /* Sky 600 */
    --color-secondary: #1e3a8a;
    /* Blue 900 */
    --color-accent: #1d4ed8;
    /* Blue 700 */
    --color-bg-dark: #0b1726;
    /* Custom Dark */
    --color-bg-light: #f1f5f9;
    /* Slate 100 */
    --color-card-bg: #ffffff;
    --color-text-main: #0f172a;
    /* Slate 900 */
    --color-text-muted: #64748b;
    /* Slate 500 */
    --color-border: #e2e8f0;
    /* Slate 200 */

    /* Effects */
    --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;
    --radius-xl: 1rem;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

/* Components */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 1px 2px 0 rgba(14, 165, 233, 0.5);
}

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

.btn-secondary {
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-success {
    background: #22c55e;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.5);
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.btn-warning {
    background: #fbbf24;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(251, 191, 36, 0.5);
}

.btn-warning:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: var(--color-text-main);
}

input:focus,
select:focus {
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-secondary) 100%);
}

.login-container {
    background: rgba(255, 255, 255, 1);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease-out;
}

.login-container h1 {
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.login-container button {
    width: 100%;
    margin-top: 1rem;
}

/* Dashboard */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-bg-light);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--color-bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar .brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    color: var(--color-primary);
    letter-spacing: -0.025em;
}

.sidebar nav {
    padding: 1rem;
    flex: 1;
}

.sidebar nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar nav ul li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar nav ul li a.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
}

.sidebar nav ul li.separator {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sidebar nav ul li.logout {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar nav ul li.logout a {
    color: #f87171;
}

.sidebar nav ul li.logout a:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

/* Page Headers */
.content-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-secondary);
    border: none;
    padding: 0;
}

/* Cards */
.card {
    background: var(--color-card-bg);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--color-text-main);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

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

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-main);
    font-size: 0.875rem;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .main-content {
        padding: 1.5rem;
    }
}