:root {
    --sidebar-width: 240px;
    --brand-color: #4f46e5;
    --brand-dark: #3730a3;
}

body {
    background: #f4f6fb;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Login page ---------- */
.login-page { background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%); }
.login-card { width: 100%; max-width: 400px; border-radius: 16px; }
.login-logo { font-size: 2.5rem; }

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

.sidebar {
    width: var(--sidebar-width);
    background: #1e1b4b;
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: transform .25s ease;
}
.sidebar-brand {
    padding: 1.25rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon { font-size: 1.4rem; }
.sidebar-nav { padding: .75rem 0; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    padding: .65rem 1.25rem;
    font-size: .92rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active {
    background: rgba(255,255,255,.09);
    color: #fff;
    border-left-color: #818cf8;
    font-weight: 600;
}

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

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.page-content { padding: 1.25rem; flex: 1; }

/* ---------- Dashboard cards ---------- */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    border: 1px solid #eef0f5;
    box-shadow: 0 2px 6px rgba(16,24,40,.04);
    height: 100%;
}
.stat-card .stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-card .stat-label { color: #6b7280; font-size: .82rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute; left: .55rem; top: .25rem; bottom: .25rem;
    width: 2px; background: #e5e7eb;
}
.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-item::before {
    content: '';
    position: absolute; left: -1.53rem; top: .2rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--brand-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--brand-color);
}

/* ---------- Misc ---------- */
.card { border-radius: 14px; border: 1px solid #eef0f5; }
.table thead th { font-size: .78rem; text-transform: uppercase; color: #6b7280; border-bottom-width: 1px; }
.badge-status { font-weight: 500; }
.cursor-pointer { cursor: pointer; }

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