:root {
    --primary: #4e54c8;
    --primary-dark: #3b3fa0;
    --sidebar-bg: #1e2139;
    --sidebar-hover: #2b2f52;
}

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

/* ---------- Auth pages ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
}
.auth-card .card-header {
    background: var(--primary);
    color: #fff;
    padding: 2rem 2rem 1rem;
    border: none;
}

/* ---------- Sidebar layout ---------- */
.wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: #cfd2e3;
    flex-shrink: 0;
    min-height: 100vh;
    position: sticky;
    top: 0;
}
.sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .nav-link {
    color: #cfd2e3;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
}
.main-content { flex-grow: 1; padding: 1.75rem; }

.topbar {
    background: #fff;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 1.25rem;
    color: #fff;
}
.stat-card.blue   { background: linear-gradient(135deg,#4e54c8,#8f94fb); }
.stat-card.green  { background: linear-gradient(135deg,#11998e,#38ef7d); }
.stat-card.orange { background: linear-gradient(135deg,#f7971e,#ffd200); color:#3a2b00; }
.stat-card.red    { background: linear-gradient(135deg,#eb3349,#f45c43); }

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }

#clockWidget {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .25s ease; height: 100%; }
    .sidebar.show { left: 0; }
    .main-content { padding: 1rem; }
}
