/* assets/css/style.css */

:root {
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #64748b;
    /* Slate 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --danger-color: #ef4444;
    /* Red 500 */
    --warning-color: #f59e0b;
    /* Amber 500 */
    --info-color: #3b82f6;
    /* Blue 500 */

    --bg-body: #f3f4f6;
    /* Gray 100 */
    --bg-card: #ffffff;
    --text-main: #111827;
    /* Gray 900 */
    --text-muted: #6b7280;
    /* Gray 500 */

    --sidebar-bg: #1e293b;
    /* Slate 800 */
    --sidebar-text: #e2e8f0;
    /* Slate 200 */
    --sidebar-hover: #334155;
    /* Slate 700 */
    --sidebar-active: #4f46e5;
    /* Indigo 600 */

    --border-radius: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-family);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* --- Layout --- */

.wrapper {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    border-radius: var(--border-radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    transform: translateX(3px);
}

.nav-link.active {
    background-color: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    opacity: 0.9;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* --- Components --- */

/* Cards */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: 0.75rem;
    /* 12px */
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Tables */
.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Status Badges */
.badge {
    padding: 0.35em 0.8em;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.bg-success {
    background-color: #dcfce7 !important;
    color: #166534;
}

.bg-danger {
    background-color: #fee2e2 !important;
    color: #991b1b;
}

.bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e;
}

.bg-info {
    background-color: #dbeafe !important;
    color: #1e40af;
}

/* Dashboard Stat Cards */
.stat-card {
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 4rem;
    opacity: 0.3;
}

.stat-card .stat-count {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Login Page Specific */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
}

.login-card h4 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
        top: 60px;
        /* Below header */
        height: calc(100vh - 60px);
    }

    .sidebar.active {
        margin-left: 0;
        box-shadow: var(--shadow-md);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 80px;
        /* 60px header + 20px padding */
    }

    /* Mobile Header */
    .mobile-header {
        height: 60px;
        z-index: 1020;
    }

    /* Backdrop */
    .sidebar-backdrop {
        display: none;
        top: 60px;
        /* Below header */
        height: calc(100vh - 60px);
    }

    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }
}

/* Hide mobile header on desktop */
@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }

    .sidebar-backdrop {
        display: none !important;
    }
}