/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1a1d23;
    --sidebar-accent: #3b82f6;
    --topbar-height: 56px;
    --text-muted-light: #6b7280;
}

/* ── Base ──────────────────────────────────────────────────────── */
html, body { height: 100%; font-size: 14px; }
body { margin: 0; background: #f0f2f5; color: #1f2937; }

/* ── Login Page ────────────────────────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, #1a1d23 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.login-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sidebar-accent);
    text-align: center;
    margin-bottom: 0.25rem;
}

/* ── Admin Layout ──────────────────────────────────────────────── */
.admin-page { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: width 0.25s ease;
    overflow: hidden;
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-link span { display: none; }
.sidebar.collapsed .sidebar-nav a,
.sidebar.collapsed .sidebar-footer button { justify-content: center; padding: 0.75rem; }

.sidebar-brand {
    padding: 1.2rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.avatar {
    width: 36px; height: 36px;
    background: var(--sidebar-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    font-size: .9rem;
}

.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: rgba(59,130,246,0.15); color: var(--sidebar-accent); border-left: 3px solid var(--sidebar-accent); }
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; }

.sidebar-footer {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}
.main-content.expanded { margin-left: 64px; }

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle { color: #374151; padding: 0; }

.content-area { flex: 1; }

/* ── Cards ─────────────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.07); border-radius: 12px; }
.card-header { background: #fff; border-bottom: 1px solid #f3f4f6; font-weight: 600; border-radius: 12px 12px 0 0 !important; }

/* ── Tables ────────────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table thead th { font-weight: 600; background: #f9fafb; color: #374151; border-bottom: 2px solid #e5e7eb; }
.table tbody tr:hover { background: #f9fafb; }

/* ── Badges & Status ───────────────────────────────────────────── */
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-manager { background: #dbeafe; color: #1e40af; }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert { border-radius: 8px; border: none; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-primary { background: var(--sidebar-accent); border-color: var(--sidebar-accent); }
.btn-primary:hover { background: #2563eb; border-color: #2563eb; }
.btn-sm { font-size: .8rem; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
