:root {
    --aurora-bg: #eef3f8;
    --aurora-panel: #ffffff;
    --aurora-sidebar: #14213d;
    --aurora-sidebar-deep: #0f1b33;
    --aurora-accent: #14b8a6;
    --aurora-accent-soft: rgba(20, 184, 166, 0.12);
    --aurora-text: #0f172a;
    --aurora-muted: #64748b;
    --aurora-line: #dbe3ef;
}

body {
    background-color: var(--aurora-bg);
    color: var(--aurora-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.14) 0%, #f5f8fc 45%, var(--aurora-bg) 100%);
}

.auth-shell-stacked {
    flex-direction: column;
    gap: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--aurora-line);
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.08);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-brand-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.auth-brand-logo {
    display: block;
    max-width: min(100%, 320px);
    height: auto;
}

.app-navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--aurora-line);
}

.feature-card {
    border: 1px solid var(--aurora-line);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.06);
    height: 100%;
}

.page-card {
    border: 1px solid var(--aurora-line);
    border-radius: 1rem;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.06);
}

.dashboard-body {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 28%),
        linear-gradient(180deg, #f4f8fc 0%, #f8fafc 30%, var(--aurora-bg) 100%);
}

.dashboard-shell {
    min-height: 100vh;
}

.dashboard-sidebar {
    --sidebar-width: 240px;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--aurora-sidebar) 0%, var(--aurora-sidebar-deep) 100%);
    color: #e2e8f0;
    flex-shrink: 0;
}

.dashboard-shell.sidebar-collapsed .dashboard-sidebar {
    --sidebar-width: 104px;
}

.dashboard-shell.sidebar-collapsed .sidebar-label,
.dashboard-shell.sidebar-collapsed .sidebar-chevron,
.dashboard-shell.sidebar-collapsed .sidebar-heading,
.dashboard-shell.sidebar-collapsed .sidebar-summary,
.dashboard-shell.sidebar-collapsed .sidebar-footer-copy,
.dashboard-shell.sidebar-collapsed .collapse .nav {
    display: none !important;
}

.dashboard-shell.sidebar-collapsed .sidebar-link,
.dashboard-shell.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

.dashboard-main {
    min-width: 0;
}

.sidebar-brand {
    color: #f8fafc;
    text-decoration: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 0.875rem;
    border-radius: 0.9rem;
    color: #cbd5e1;
    text-decoration: none;
    background: transparent;
    border: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link.active {
    color: #fff;
    background: var(--aurora-accent-soft);
}

.sidebar-submenu .sidebar-link {
    padding-block: 0.625rem;
    padding-left: 2.75rem;
    font-size: 0.95rem;
}

.sidebar-icon {
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--aurora-line);
}

.stat-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.surface-muted {
    background: rgba(148, 163, 184, 0.12);
}

.section-anchor {
    scroll-margin-top: 6rem;
}

.table-shell {
    border-radius: 1rem;
    overflow: hidden;
}

.table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.fa-solid,
.fas {
    font-weight: 600 !important;
}

.table td a[aria-label],
.table td button[aria-label] {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #475569;
    text-decoration: none;
    line-height: 1;
}

.table td a[aria-label]:hover,
.table td button[aria-label]:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1f2937;
}

.table td a[aria-label]:focus-visible,
.table td button[aria-label]:focus-visible {
    outline: 2px solid var(--aurora-accent);
    outline-offset: 2px;
}

.table td a[aria-label] + a[aria-label],
.table td a[aria-label] + button[aria-label],
.table td button[aria-label] + a[aria-label],
.table td button[aria-label] + button[aria-label],
.table td form.d-inline + form.d-inline,
.table td form.d-inline + a[aria-label],
.table td a[aria-label] + form.d-inline {
    margin-left: 0.375rem;
}

.table td button[aria-label][disabled],
.table td a[aria-label][aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

.table-sort {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font-weight: 600;
}

.table-sort.active {
    color: var(--aurora-accent);
}

.chart-shell {
    min-height: 320px;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 320px;
    max-height: 320px;
    overflow: hidden;
}

.chart-canvas-wrap.chart-canvas-wrap-sm {
    height: 240px;
    max-height: 240px;
}

.chart-canvas-wrap > canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.profile-avatar-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12);
}

.notification-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #ef4444;
    display: inline-block;
}

.dropdown-menu-wide {
    width: min(100vw - 2rem, 340px);
}

@media (max-width: 991.98px) {
    .dashboard-sidebar {
        width: min(92vw, 270px);
    }

    .dashboard-shell.sidebar-collapsed .dashboard-sidebar {
        --sidebar-width: 270px;
    }
}

@media (min-width: 992px) {
    .dashboard-shell {
        align-items: flex-start;
    }

    .dashboard-sidebar.offcanvas-lg {
        position: sticky !important;
        top: 0 !important;
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        flex-shrink: 0;
        display: flex !important;
        flex-direction: column !important;
    }

    .dashboard-sidebar .offcanvas-header {
        display: flex !important;
        flex-shrink: 0;
        padding: 1rem 0.875rem 0.875rem;
    }

    .dashboard-sidebar .offcanvas-body {
        flex-grow: 1 !important;
        overflow-y: auto !important;
        padding: 0.875rem !important;
    }
}

@media (min-width: 1200px) {
    .dashboard-sidebar .offcanvas-body {
        padding: 1rem 1.125rem !important;
    }
}
