body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f2f4f8;
}

.auth-page {
    background: radial-gradient(circle at top, #dbeafe 0%, #f8fafc 45%, #eef2ff 100%);
    min-height: 100vh;
}

.dashboard-hero {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: #fff;
    padding: 22px 24px;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(30, 41, 59, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-hero .hero-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.dashboard-hero .hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
}

.dashboard-hero .hero-meta {
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.16);
    padding: 8px 14px;
    border-radius: 12px;
    text-align: right;
    min-width: 140px;
}

.dashboard-hero .hero-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

.dashboard-hero .hero-meta-date {
    font-size: 1rem;
    font-weight: 700;
}

:root {
    --brand-900: #0b1f3a;
    --brand-700: #173a6b;
    --brand-500: #2f6fed;
    --brand-300: #7aa7ff;
    --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--brand-900), var(--brand-700));
    box-shadow: 8px 0 24px rgba(2, 6, 23, 0.2);
}

.sidebar .brand {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar .user-card {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link {
    color: #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
    box-shadow: 0 6px 16px rgba(47, 111, 237, 0.35);
}

.content {
    flex: 1;
    padding: 28px 32px;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.stat-card {
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.12), rgba(122, 167, 255, 0.12));
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.stat-card--primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(147, 197, 253, 0.2));
}

.stat-card--info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(125, 211, 252, 0.2));
}

.stat-card--violet {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(216, 180, 254, 0.22));
}

.stat-card--orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(253, 186, 116, 0.22));
}

.stat-card .stat-label {
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-card .stat-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(47, 111, 237, 0.15);
    color: var(--brand-500);
    font-weight: 700;
}

.stat-card--info .stat-badge {
    background: rgba(14, 165, 233, 0.18);
    color: #0ea5e9;
}

.stat-card--violet .stat-badge {
    background: rgba(168, 85, 247, 0.18);
    color: #7c3aed;
}

.stat-card--orange .stat-badge {
    background: rgba(249, 115, 22, 0.2);
    color: #ea580c;
}

.chart-card {
    min-height: 100%;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.chart-note {
    font-size: 0.85rem;
    color: #64748b;
}

.chart-fallback {
    display: grid;
    gap: 0.6rem;
}

.pie-fallback {
    justify-items: center;
    margin-top: 0.5rem;
}

.pie-ring {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 0 14px #f8fafc;
}

.pie-ring::after {
    content: "";
    position: absolute;
    inset: 36px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(15, 23, 42, 0.08);
}

.pie-center {
    margin-top: -118px;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
}

.pie-center small {
    display: block;
    font-weight: 500;
    color: #64748b;
    font-size: 0.8rem;
}

.pie-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
    font-size: 0.85rem;
    color: #334155;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.weekly-fallback {
    gap: 0.5rem;
}

.weekly-row {
    display: grid;
    grid-template-columns: 90px 1fr 32px;
    align-items: center;
    gap: 10px;
}

.weekly-label {
    font-size: 0.8rem;
    color: #64748b;
}

.weekly-bars {
    display: grid;
    gap: 4px;
}

.weekly-bar {
    height: 8px;
    border-radius: 999px;
    display: block;
}

.weekly-bar--pp {
    background: rgba(54, 162, 235, 0.7);
}

.weekly-bar--cdr {
    background: rgba(255, 99, 132, 0.7);
}

.weekly-total {
    font-size: 0.8rem;
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

.list-group-item {
    border: none;
    padding: 0.5rem 0;
}

.card-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #0f172a;
}

.table-sm td, .table-sm th {
    padding: 0.55rem;
}

.table thead th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand-500);
    border-color: var(--brand-500);
    box-shadow: 0 6px 12px rgba(47, 111, 237, 0.25);
}

.btn-outline-primary {
    border-color: var(--brand-500);
    color: var(--brand-500);
}

.alert-info {
    border: none;
    background: rgba(47, 111, 237, 0.1);
    color: #1e3a8a;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-card {
    width: min(420px, 92vw);
    border-radius: 18px;
}

.auth-shell {
    width: min(960px, 96vw);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.auth-shell--single {
    width: min(420px, 92vw);
    grid-template-columns: 1fr;
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.7;
}

.orb-1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0));
    top: -60px;
    left: -40px;
}

.orb-2 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at top, rgba(168, 85, 247, 0.45), rgba(168, 85, 247, 0));
    bottom: -120px;
    right: -80px;
}

.orb-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at top, rgba(14, 165, 233, 0.35), rgba(14, 165, 233, 0));
    top: 40%;
    right: 20%;
}

.auth-panel {
    background: linear-gradient(140deg, #1d4ed8, #7c3aed);
    color: #fff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.28);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 420px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

.auth-message {
    font-size: 0.98rem;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
}

.auth-meta .meta-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-meta .meta-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.auth-badge {
    background: rgba(47, 111, 237, 0.12);
    color: #2f6fed;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-footnote {
    margin-top: 10px;
    font-size: 0.75rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-card {
    border: none;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(8px);
}

.auth-card .form-control {
    border-radius: 12px;
    padding: 10px 12px;
    border-color: rgba(148, 163, 184, 0.4);
}

.auth-card .btn-primary {
    padding: 10px 16px;
    border-radius: 12px;
}

.auth-card .card-title {
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-panel {
        order: 2;
    }
}

@media (max-width: 600px) {
    .auth-panel {
        min-height: auto;
    }
}
