:root {
    --bg: #f5f5f7;
    --bg-soft: #fbfbfd;
    --text: #101114;
    --muted: #6e727b;
    --border: rgba(255, 255, 255, 0.56);
    --line: rgba(16, 17, 20, 0.08);
    --glass: rgba(255, 255, 255, 0.56);
    --glass-strong: rgba(255, 255, 255, 0.72);
    --glass-dark: rgba(245, 247, 250, 0.18);
    --shadow-xl: 0 30px 80px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
    --accent: #1677ff;
    --accent-dark: #0f5ed1;
    --accent-soft: rgba(22, 119, 255, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Kanit', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 18%, rgba(152, 215, 255, 0.42), transparent 25%),
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.85), transparent 24%),
        radial-gradient(circle at 78% 76%, rgba(204, 229, 255, 0.6), transparent 26%),
        linear-gradient(180deg, #fdfdfe 0%, #f5f6f8 45%, #eef1f5 100%);
    background-attachment: fixed;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.75;
}

body::before {
    top: 90px;
    left: -80px;
    width: 260px;
    height: 260px;
    background: rgba(150, 201, 255, 0.42);
}

body::after {
    right: -60px;
    bottom: 70px;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.72);
}

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

.topbar {
    position: sticky;
    top: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1320px, calc(100% - 28px));
    margin: 14px auto 0;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(235, 244, 255, 0.24));
    box-shadow: var(--shadow-lg);
    backdrop-filter: saturate(180%) blur(26px);
    -webkit-backdrop-filter: saturate(180%) blur(26px);
}

.topbar::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.12));
    opacity: 0.8;
    pointer-events: none;
}

.topbar > * {
    position: relative;
    z-index: 1;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 320px;
}

.topbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.topbar-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 19px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.35)),
        rgba(255, 255, 255, 0.46);
    color: #111827;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 24px rgba(15, 23, 42, 0.08);
}

.brand i {
    font-size: 1.25rem;
}

.brand-title {
    font-size: clamp(0.98rem, 0.78rem + 0.35vw, 1.08rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: #111827;
}

.brand-copy {
    max-width: 560px;
    color: rgba(17, 24, 39, 0.58);
    line-height: 1.4;
    font-size: clamp(0.8rem, 0.74rem + 0.22vw, 0.9rem);
}

.topbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.topbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: rgba(17, 24, 39, 0.68);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: clamp(0.9rem, 0.82rem + 0.18vw, 0.96rem);
    line-height: 1.2;
    white-space: nowrap;
    font-weight: 600;
    transition: all 180ms ease;
}

.topbar .nav-link.active,
.topbar .nav-link:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.topbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.user-chip {
    display: grid;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.42);
    color: #111827;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.user-chip strong {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.user-chip span {
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.55);
}

.topbar-actions .btn.active {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.main-content {
    width: min(1320px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.auth-layout {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 180px);
}

.auth-panel {
    width: min(560px, 100%);
}

.auth-card,
.panel-card,
.metric-card,
.group-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34)),
        rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow-xl);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
}

.auth-card::before,
.panel-card::before,
.metric-card::before,
.group-card::before,
.hero-panel::before,
.hero-highlight::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.auth-card > *,
.panel-card > *,
.metric-card > *,
.group-card > *,
.hero-panel > *,
.hero-highlight > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    padding: 38px;
}

.hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.9fr);
    gap: 24px;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 36px;
    background:
        radial-gradient(circle at top right, rgba(180, 217, 255, 0.58), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.36)),
        rgba(255, 255, 255, 0.26);
    box-shadow: var(--shadow-xl);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-bottom: 14px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    color: rgba(15, 23, 42, 0.75);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.hero-panel p {
    margin: 0;
    max-width: 780px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.72;
}

.hero-highlight {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42)),
        rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
}

.hero-highlight span {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: rgba(17, 24, 39, 0.58);
    font-size: 0.95rem;
}

.hero-highlight strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(2.8rem, 4.8vw, 4.2rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-actions {
    display: flex;
    align-items: center;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 26px;
}

.page-header h1,
.auth-card h1 {
    margin: 0;
    font-size: clamp(2rem, 1.25rem + 2.9vw, 3.85rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.eyebrow {
    margin-bottom: 12px;
    color: rgba(17, 24, 39, 0.48);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-secondary {
    color: var(--muted) !important;
}

.metric-card {
    padding: 24px 26px;
    min-height: 168px;
}

.metric-card span {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: rgba(17, 24, 39, 0.52);
    font-size: 0.96rem;
    font-weight: 600;
}

.metric-card span i {
    color: var(--accent);
}

.metric-card strong {
    display: block;
    margin-top: 20px;
    font-size: clamp(2.35rem, 3.8vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.panel-card {
    padding: 26px;
}

.profile-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(22, 119, 255, 0.16), rgba(22, 119, 255, 0.32));
    color: var(--accent-dark);
    font-size: 1.8rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.profile-meta-list {
    display: grid;
    gap: 12px;
}

.profile-meta-item {
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
}

.profile-meta-item span {
    display: block;
    margin-bottom: 6px;
    color: rgba(17, 24, 39, 0.55);
    font-size: 0.86rem;
}

.profile-meta-item strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.35;
}

.project-row-list {
    display: grid;
    gap: 18px;
}

.project-entry-card {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.project-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.project-entry-head strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}

.table-responsive {
    overflow-x: auto;
}

div.dt-container .dt-layout-row {
    gap: 14px;
    margin: 0 0 14px;
}

div.dt-container .dt-layout-cell {
    padding: 0;
}

div.dt-container .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

div.dt-container .dt-button {
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    font-weight: 600;
    padding: 0.55rem 1rem !important;
}

div.dt-container .dt-button:hover,
div.dt-container .dt-button:focus {
    background: rgba(22, 119, 255, 0.12) !important;
    border-color: rgba(22, 119, 255, 0.28) !important;
    color: var(--accent-dark) !important;
}

div.dt-container .dt-search input,
div.dt-container .dt-length select {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    padding: 0.55rem 0.9rem;
}

div.dt-container .dt-search input {
    min-width: min(280px, 100%);
}

div.dt-container .dt-info,
div.dt-container .dt-length,
div.dt-container .dt-search label,
div.dt-container .dt-paging {
    color: var(--muted);
    font-weight: 500;
}

div.dt-container .dt-paging .pagination {
    gap: 6px;
}

div.dt-container .dt-paging .page-link {
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

div.dt-container .dt-paging .page-item.active .page-link {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 767px) {
    div.dt-container .dt-layout-row {
        gap: 10px;
    }

    div.dt-container .dt-buttons {
        width: 100%;
    }

    div.dt-container .dt-button {
        flex: 1 1 calc(33.333% - 8px);
        text-align: center;
    }

    div.dt-container .dt-search input {
        min-width: 0;
        width: 100%;
    }
}

.chart-panel {
    overflow: hidden;
}

.chart-canvas {
    width: 100%;
    height: 360px;
}

.chart-canvas-sm {
    height: 300px;
}

.chart-canvas-lg {
    height: 420px;
}

.group-card {
    padding: 22px;
    min-height: 100%;
}

.group-card-clickable {
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.group-card-clickable:hover,
.group-card-clickable:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    outline: none;
}

.dashboard-modal {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
        rgba(255, 255, 255, 0.88);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(20px);
}

.group-card h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.detail-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 8px 16px;
    align-items: center;
}

.detail-grid span {
    color: rgba(17, 24, 39, 0.55);
}

.status-stack,
.timeline-list {
    display: grid;
    gap: 14px;
}

.status-item,
.timeline-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.timeline-item {
    display: block;
}

.badge {
    border-radius: 999px;
    padding: 0.58rem 0.82rem;
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: -0.01em;
}

.text-bg-success,
.text-bg-primary,
.text-bg-warning,
.text-bg-info,
.text-bg-danger,
.text-bg-secondary {
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn {
    border-radius: 999px;
    padding: 0.82rem 1.18rem;
    font-weight: 600;
    font-size: 0.96rem;
    letter-spacing: -0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(180deg, #1f84ff, #116ce6);
    border-color: rgba(15, 94, 209, 0.9);
    color: #fff;
    box-shadow: 0 14px 30px rgba(17, 108, 230, 0.24);
}

.btn-accent:hover {
    background: linear-gradient(180deg, #3690ff, #0f5ed1);
    border-color: rgba(15, 94, 209, 0.92);
    color: #fff;
    box-shadow: 0 18px 36px rgba(17, 108, 230, 0.28);
}

.btn-econ {
    background: linear-gradient(180deg, #e83e8c, #c21873);
    border-color: rgba(194, 24, 115, 0.9);
    color: #fff;
    box-shadow: 0 14px 30px rgba(194, 24, 115, 0.24);
    transition: all 0.2s ease;
}

.btn-econ:hover {
    background: linear-gradient(180deg, #f05aa0, #ad1457);
    border-color: rgba(173, 20, 87, 0.92);
    color: #fff;
    box-shadow: 0 18px 36px rgba(194, 24, 115, 0.30);
    transform: translateY(-1px);
}

.btn-econ:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(194, 24, 115, 0.22);
}

.btn-outline-secondary,
.btn-light {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.6);
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.btn-outline-secondary:hover,
.btn-light:hover {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}

.form-control,
.form-select {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 0.92rem 1rem;
    background: rgba(255, 255, 255, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(22, 119, 255, 0.32);
    box-shadow: 0 0 0 0.22rem rgba(22, 119, 255, 0.14);
    background: rgba(255, 255, 255, 0.78);
}

.progress {
    height: 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #8fc5ff, #1677ff 55%, #0f5ed1 100%);
    border-radius: 999px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: rgba(15, 23, 42, 0.08);
}

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

.table thead th {
    color: rgba(17, 24, 39, 0.52);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom-width: 1px;
}

.member-entry-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.5);
}

.member-entry-table {
    min-width: 860px;
}

.member-entry-table > :not(caption) > * > * {
    vertical-align: middle;
}

.member-entry-table .form-control,
.member-entry-table .form-select {
    min-width: 0;
    border-radius: 14px;
    padding: 0.72rem 0.85rem;
}

.member-entry-table .btn-sm {
    padding: 0.58rem 0.9rem;
}

.h4,
h4 {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: clamp(1.12rem, 1rem + 0.45vw, 1.34rem);
    line-height: 1.35;
    letter-spacing: -0.02em;
    flex-wrap: wrap;
}

small,
.small {
    font-size: 0.86rem;
}

.alert {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

.swal-econ-popup {
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 1.35rem 1.35rem 1.1rem;
}

.swal-econ-title {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.swal-econ-text {
    color: var(--muted);
}

.swal2-actions {
    gap: 10px;
}

.swal-econ-confirm,
.swal-econ-cancel {
    margin: 0 !important;
}

.chart-canvas + *,
.chart-panel p,
.panel-card p,
.auth-card p {
    position: relative;
}

.btn i,
.text-secondary i,
.h4 i,
.nav-link i {
    opacity: 0.9;
}

@media (max-width: 991px) {
    .topbar {
        top: 10px;
        width: calc(100% - 20px);
        margin-top: 10px;
        flex-wrap: wrap;
        padding: 14px;
        border-radius: 24px;
    }

    .topbar-brand {
        flex-basis: 100%;
    }

    .topbar-menu {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .main-content {
        width: calc(100% - 20px);
        padding: 22px 0 28px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

@media (max-width: 767px) {
    .topbar-brand,
    .topbar-menu,
    .page-header {
        width: 100%;
    }

    .topbar-brand {
        align-items: flex-start;
        gap: 12px;
    }

    .topbar-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .topbar-menu {
        display: none;
        width: 100%;
        margin-left: 0;
        padding-top: 4px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .topbar-menu.is-open {
        display: flex;
    }

    .brand-copy {
        display: none;
    }

    .brand {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .brand i {
        font-size: 1.05rem;
    }

    .topbar-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
        overflow: visible;
        padding: 4px;
        gap: 6px;
        border-radius: 22px;
        width: 100%;
    }

    .topbar .nav-link {
        justify-content: center;
        padding: 9px 13px;
        font-size: 0.9rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .topbar-actions .btn,
    .user-chip {
        min-height: 44px;
    }

    .page-header {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }

    .page-header h1,
    .auth-card h1 {
        font-size: clamp(1.9rem, 6.8vw, 2.85rem);
        line-height: 1.12;
    }

    .hero-panel h2 {
        font-size: clamp(1.6rem, 6vw, 2.45rem);
        line-height: 1.14;
    }

    .h4,
    h4 {
        font-size: 1.08rem;
        line-height: 1.4;
    }

    .chart-canvas,
    .chart-canvas-sm {
        height: 280px;
    }
}

@media (max-width: 575px) {
    .topbar {
        gap: 12px;
        padding: 12px;
        border-radius: 22px;
    }

    .topbar-brand {
        gap: 10px;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .topbar-nav {
        grid-template-columns: 1fr;
    }

    .topbar .nav-link {
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions .btn,
    .user-chip {
        width: 100%;
        justify-content: center;
    }

    .user-chip {
        text-align: center;
    }

    .user-chip strong {
        justify-content: center;
    }
}
