:root {
    color-scheme: light;
    --font-main: Inter, Manrope, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --bg: #f4f7fb;
    --bg-2: #eaf0fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef4ff;
    --text: #111827;
    --heading: #0f172a;
    --muted: #64748b;
    --label: #334155;
    --line: #dfe7f2;
    --line-strong: #cbd5e1;
    --primary: #2563eb;
    --primary-2: #06b6d4;
    --primary-3: #14b8a6;
    --primary-soft: #dbeafe;
    --purple: #7c3aed;
    --purple-soft: #ede9fe;
    --success: #059669;
    --success-soft: #dcfce7;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --sidebar-bg: #0b1120;
    --sidebar-bg-2: #111a2e;
    --sidebar-text: #dbe7ff;
    --sidebar-muted: #8fa1bd;
    --sidebar-line: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 52%, #10b981 100%);
    --gradient-dark: linear-gradient(180deg, #111827 0%, #0b1120 100%);
    --gradient-hero: linear-gradient(135deg, #101827 0%, #1d4ed8 48%, #0f766e 100%);
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.13);
    --shadow-lg: 0 30px 90px rgba(15, 23, 42, 0.22);
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --topbar-h: 78px;
    --sidebar-w: 294px;
    --focus: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070b14;
    --bg-2: #0d1322;
    --surface: #111827;
    --surface-2: #0f172a;
    --surface-3: #172033;
    --text: #d8e1f4;
    --heading: #f8fafc;
    --muted: #91a0b8;
    --label: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.32);
    --primary-soft: rgba(37, 99, 235, 0.18);
    --purple-soft: rgba(124, 58, 237, 0.18);
    --success-soft: rgba(5, 150, 105, 0.18);
    --warning-soft: rgba(217, 119, 6, 0.18);
    --danger-soft: rgba(220, 38, 38, 0.18);
    --sidebar-bg: #060a12;
    --sidebar-bg-2: #0d1322;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.34);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 36px 110px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

html,
body {
    transition: background-color 0.24s ease, color 0.24s ease;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% -8%, rgba(37, 99, 235, 0.12), transparent 26%),
        radial-gradient(circle at 98% 0%, rgba(20, 184, 166, 0.10), transparent 26%),
        linear-gradient(180deg, var(--bg-2), var(--bg) 280px);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at 20% -10%, rgba(37, 99, 235, 0.22), transparent 28%),
        radial-gradient(circle at 90% 6%, rgba(124, 58, 237, 0.16), transparent 24%),
        radial-gradient(circle at 74% 92%, rgba(20, 184, 166, 0.14), transparent 26%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

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

.app-shell {
    position: relative;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar-w);
    flex-direction: column;
    padding: 20px;
    color: var(--sidebar-text);
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.32), transparent 31%),
        radial-gradient(circle at 100% 18%, rgba(6, 182, 212, 0.18), transparent 28%),
        linear-gradient(180deg, var(--sidebar-bg-2), var(--sidebar-bg));
    border-right: 1px solid var(--sidebar-line);
    box-shadow: 22px 0 70px rgba(15, 23, 42, 0.28);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
}

.sidebar.open {
    transform: translateX(0);
}

.brand,
.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    min-height: 66px;
    padding: 10px;
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
    font-weight: 900;
}

.brand-name {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-meta,
.sidebar-footer span,
.muted,
.auth-hint,
.security-note {
    color: var(--muted);
}

.sidebar .brand-meta,
.sidebar-footer span {
    color: var(--sidebar-muted);
}

.sidebar-insight {
    display: grid;
    gap: 3px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.08));
}

.sidebar-insight span,
.sidebar-insight small,
.nav-section-label {
    color: var(--sidebar-muted);
}

.sidebar-insight strong {
    color: #ffffff;
    font-size: 18px;
}

.sidebar-insight small {
    font-size: 12px;
}

.nav-section-label {
    margin: 22px 8px 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-item,
.bottom-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    position: relative;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--sidebar-text);
    font-weight: 750;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
    transform: translateX(3px);
}

.nav-item.active,
.nav-item:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.10);
}

.nav-item.active::before {
    position: absolute;
    content: "";
    left: -20px;
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.78);
}

.nav-icon,
.quick-add-icon {
    position: relative;
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-icon::before,
.nav-icon::after,
.quick-add-icon::before,
.quick-add-icon::after {
    position: absolute;
    content: "";
    inset: 8px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.nav-icon[data-icon="users"]::before,
.quick-add-icon[data-icon="users"]::before,
.nav-icon[data-icon="target"]::before,
.quick-add-icon[data-icon="target"]::before {
    border-radius: 50%;
}

.nav-icon[data-icon="users"]::after,
.quick-add-icon[data-icon="users"]::after {
    inset: 19px 6px 7px;
    border-radius: 10px 10px 4px 4px;
}

.nav-icon[data-icon="target"]::after,
.quick-add-icon[data-icon="target"]::after {
    inset: 13px;
    border: 0;
    border-radius: 50%;
    background: currentColor;
}

.nav-icon[data-icon="wallet"]::after,
.quick-add-icon[data-icon="wallet"]::after {
    inset: 13px 7px 13px 21px;
    border: 0;
    background: currentColor;
}

.nav-icon[data-icon="calendar"]::after,
.quick-add-icon[data-icon="calendar"]::after,
.nav-icon[data-icon="note"]::after,
.quick-add-icon[data-icon="note"]::after,
.nav-icon[data-icon="invoice"]::after,
.quick-add-icon[data-icon="invoice"]::after {
    inset: 11px 10px 15px;
    border-width: 2px 0 0;
    border-radius: 0;
}

.nav-icon[data-icon="check"]::before,
.quick-add-icon[data-icon="check"]::before {
    inset: 8px 7px 10px 9px;
    border-width: 0 0 3px 3px;
    border-radius: 0;
    transform: rotate(-45deg);
}

.nav-icon[data-icon="check"]::after,
.quick-add-icon[data-icon="check"]::after {
    display: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #e0f2fe;
    background: rgba(56, 189, 248, 0.16);
    font-weight: 900;
}

.logout-link {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    border-radius: 13px;
    color: #fecdd3;
    font-weight: 800;
    transition: background 0.18s ease;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.mobile-backdrop.show {
    display: block;
}

.main-area {
    min-height: 100vh;
    padding-bottom: 92px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 260px);
}

:root[data-theme="dark"] .main-area {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), transparent 280px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    min-height: var(--topbar-h);
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.62);
    background: rgba(244, 247, 251, 0.86);
    backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .topbar {
    border-bottom-color: rgba(148, 163, 184, 0.14);
    background: rgba(7, 11, 20, 0.82);
}

.topbar-title {
    min-width: 0;
}

.topbar h1,
.auth-brand h1,
.hero-band h2,
.panel h3,
.section-heading h3 {
    margin: 0;
    color: var(--heading);
    letter-spacing: 0;
}

.topbar h1 {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 900;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.topbar-search {
    position: relative;
    display: none;
    width: min(360px, 32vw);
    margin-left: auto;
}

.topbar-search input {
    min-height: 44px;
    padding-left: 42px;
    border-color: transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-xs);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    transform: translateY(-50%);
}

.search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--muted);
    content: "";
    transform: rotate(45deg);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
}

.topbar-actions .secondary-action {
    display: none;
}

.topbar-icon-button,
.icon-button,
.icon-close {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topbar-icon-button:hover,
.icon-button:hover,
.icon-close:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
    box-shadow: var(--shadow-sm);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 2px 0;
    border-radius: 999px;
    background: var(--text);
}

.bell-icon {
    position: relative;
    width: 17px;
    height: 18px;
    border: 2px solid var(--muted);
    border-bottom: 0;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
}

.bell-icon::before {
    position: absolute;
    left: 4px;
    bottom: -5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    content: "";
}

.bell-icon::after {
    position: absolute;
    top: -5px;
    right: -6px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--danger);
    content: "";
}

.theme-icon {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--primary) 0 50%, transparent 50%);
    border: 2px solid var(--primary);
}

:root[data-theme="dark"] .theme-icon {
    background: linear-gradient(90deg, #f8fafc 0 50%, transparent 50%);
    border-color: #f8fafc;
}

.primary-action,
.secondary-action,
.danger-action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-action {
    border: 0;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.secondary-action {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-xs);
}

.danger-action {
    border: 1px solid rgba(220, 38, 38, 0.26);
    color: var(--danger);
    background: var(--danger-soft);
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.small-action {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 13px;
}

.content-wrap {
    width: min(1260px, 100%);
    margin: 0 auto;
    padding: 18px;
    animation: pageIn 0.35s ease both;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid,
.module-page {
    display: grid;
    gap: 18px;
}

.hero-band,
.module-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.70);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-band {
    display: grid;
    min-height: 240px;
    gap: 22px;
    padding: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.24), transparent 18%),
        radial-gradient(circle at 12% 100%, rgba(16, 185, 129, 0.28), transparent 22%),
        var(--gradient-hero);
}

.hero-band::after,
.module-hero::after {
    position: absolute;
    right: -80px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    content: "";
}

.hero-band h2 {
    max-width: 780px;
    color: #ffffff;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.03;
    font-weight: 950;
}

.hero-band p {
    max-width: 720px;
    color: #dce8ff;
    font-size: 15px;
    line-height: 1.7;
}

.dashboard-quick-actions {
    margin-top: 20px;
}

.dashboard-quick-actions .secondary-action {
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-stats {
    align-self: end;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-stats span,
.hero-stats small {
    display: block;
    color: #dce8ff;
}

.hero-stats strong {
    display: block;
    margin: 8px 0 4px;
    color: #ffffff;
    font-size: 44px;
    line-height: 1;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 2px;
}

.section-heading h3 {
    font-size: 20px;
}

.section-heading > span,
.section-heading a {
    color: var(--muted);
    font-weight: 800;
}

.module-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: space-between;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.56)),
        var(--surface);
}

:root[data-theme="dark"] .module-hero {
    background:
        radial-gradient(circle at 90% 30%, rgba(37, 99, 235, 0.20), transparent 24%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
}

:root[data-theme="dark"] .topbar-search input,
:root[data-theme="dark"] .topbar-icon-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .icon-close,
:root[data-theme="dark"] .secondary-action,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: rgba(17, 24, 39, 0.88);
}

:root[data-theme="dark"] .bottom-nav {
    background: rgba(17, 24, 39, 0.92);
}

:root[data-theme="dark"] .quick-add-grid a {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.98));
}

.module-hero h2 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 950;
    letter-spacing: 0;
}

.module-hero p {
    max-width: 670px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions,
.form-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kpi-grid,
.finance-summary,
.invoice-summary,
.pipeline-summary {
    display: grid;
    gap: 14px;
}

.kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-card,
.panel,
.module-form-panel,
.filter-bar,
.module-card,
.summary-card,
.empty-state,
.kanban-column,
.table-shell,
.quick-add-card,
.auth-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .kpi-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .module-form-panel,
:root[data-theme="dark"] .filter-bar,
:root[data-theme="dark"] .module-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .kanban-column,
:root[data-theme="dark"] .table-shell,
:root[data-theme="dark"] .quick-add-card,
:root[data-theme="dark"] .auth-panel {
    background: rgba(17, 24, 39, 0.82);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.03), var(--shadow-sm);
}

.kpi-card,
.summary-card,
.module-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.kpi-card:hover,
.summary-card:hover,
.module-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

.kpi-card {
    min-height: 150px;
    padding: 20px;
}

.kpi-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--primary);
    content: "";
}

.kpi-card.blue::before {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.kpi-card.green::before {
    background: linear-gradient(90deg, #059669, #22c55e);
}

.kpi-card.gold::before {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.kpi-card.red::before {
    background: linear-gradient(90deg, #dc2626, #fb7185);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent),
        var(--primary-soft);
}

.kpi-card.green .kpi-icon {
    background: var(--success-soft);
}

.kpi-card.gold .kpi-icon {
    background: var(--warning-soft);
}

.kpi-card.red .kpi-icon {
    background: var(--danger-soft);
}

.kpi-card span,
.summary-card span,
.kpi-card small {
    display: block;
    color: var(--muted);
}

.kpi-card span,
.summary-card span {
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.kpi-card strong {
    display: block;
    margin: 8px 0 5px;
    color: var(--heading);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1;
    letter-spacing: -0.02em;
}

.panel {
    padding: 22px;
}

.premium-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--surface-2));
}

.panel-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.progress-track {
    height: 12px;
    margin: 20px 0 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-3));
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.34);
}

.activity-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.activity-item p {
    margin: 4px 0 0;
    color: var(--muted);
}

.activity-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.muted-item .activity-dot {
    background: var(--line-strong);
}

label {
    display: grid;
    gap: 8px;
    color: var(--label);
    font-size: 13px;
    font-weight: 850;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: #60a5fa;
    box-shadow: var(--focus);
}

.module-form-panel {
    padding: 20px;
}

.module-form {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.filter-bar {
    display: grid;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.task-board,
.target-grid,
.customer-grid,
.pipeline-summary,
.transaction-list,
.planner-list,
.notes-grid,
.invoice-list,
.invoice-summary {
    display: grid;
    gap: 14px;
}

.kanban-column {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    background: var(--surface-2);
}

.kanban-header,
.card-top,
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kanban-header {
    padding: 2px 2px 8px;
}

.kanban-header span,
.badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 900;
}

.module-card,
.summary-card,
.empty-state {
    padding: 16px;
}

.module-card {
    display: grid;
    gap: 12px;
}

.module-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.card-top strong {
    color: var(--heading);
    font-size: 16px;
}

.card-meta {
    color: var(--muted);
    font-size: 13px;
}

.priority-low {
    color: var(--success);
    background: var(--success-soft);
}

.priority-medium {
    color: var(--primary);
    background: var(--primary-soft);
}

.priority-high {
    color: var(--warning);
    background: var(--warning-soft);
}

.priority-urgent {
    color: var(--danger);
    background: var(--danger-soft);
}

.quick-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.progress-track.compact {
    height: 10px;
    margin: 4px 0;
}

.summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-card strong {
    color: var(--heading);
    font-size: 24px;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.wide {
    grid-column: 1 / -1;
}

.table-shell {
    display: none;
    overflow: auto;
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 0.16s ease;
}

.data-table tbody tr:hover {
    background: rgba(219, 234, 254, 0.34);
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.mobile-card-list {
    display: grid;
    gap: 12px;
}

.planner-card,
.invoice-card {
    border-left: 5px solid var(--primary);
}

.invoice-card {
    border-left-color: var(--warning);
}

.note-card {
    align-content: start;
}

.note-card.pinned {
    border-top: 5px solid var(--warning);
}

.note-card p {
    white-space: pre-wrap;
}

.checkbox-label {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.invoice-builder {
    overflow: hidden;
}

.invoice-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.invoice-items-head h3 {
    margin: 0;
}

.invoice-items {
    display: grid;
    gap: 12px;
}

.invoice-item-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.invoice-totals {
    display: grid;
    gap: 8px;
    justify-items: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.quick-add-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 11, 20, 0.62);
    backdrop-filter: blur(9px);
}

.quick-add-card {
    width: min(640px, 100%);
    padding: 22px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.22s ease both;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.icon-close {
    font-size: 18px;
    font-weight: 900;
}

.quick-add-grid {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.quick-add-grid a {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--surface-2));
    font-weight: 850;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-add-grid a:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow-sm);
}

.quick-add-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    color: var(--primary);
    background: var(--primary-soft);
}

.bottom-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.bottom-nav a {
    flex-direction: column;
    min-height: 58px;
    justify-content: center;
    border-radius: 16px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    transition: color 0.18s ease, background 0.18s ease;
}

.bottom-nav .nav-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    background: transparent;
}

.bottom-nav a.active {
    color: #ffffff;
    background: var(--gradient-primary);
}

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.20), transparent 30%),
        radial-gradient(circle at 100% 10%, rgba(20, 184, 166, 0.14), transparent 28%),
        var(--bg);
}

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

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

.auth-brand {
    margin-bottom: 22px;
}

.auth-brand h1 {
    font-size: 26px;
}

.auth-brand p,
.auth-hint,
.security-note {
    margin: 6px 0 0;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.full-width {
    width: 100%;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius);
    font-weight: 800;
}

.alert.error {
    color: var(--danger);
    background: var(--danger-soft);
}

.alert.success {
    color: var(--success);
    background: var(--success-soft);
}

.install-details {
    margin: 16px 0;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.install-details p {
    margin: 6px 0;
}

.print-invoice {
    display: none;
}

.print-sheet {
    color: #111827;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.print-head,
.print-parties {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.print-head h2,
.print-parties h3 {
    margin: 0 0 8px;
}

.print-head p,
.print-parties p {
    margin: 3px 0;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.print-table th,
.print-table td {
    padding: 10px;
    border: 1px solid #d1d5db;
    text-align: left;
}

.print-totals {
    display: grid;
    justify-items: end;
}

.print-totals p {
    margin: 3px 0;
}

@media (min-width: 760px) {
    .topbar-actions .secondary-action {
        display: inline-flex;
    }

    .hero-band {
        grid-template-columns: 1fr 210px;
        align-items: end;
    }

    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-band,
    .section-heading,
    .kpi-grid {
        grid-column: 1 / -1;
    }

    .module-hero {
        flex-direction: row;
        align-items: center;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 240px));
    }

    .target-grid,
    .customer-grid,
    .pipeline-summary,
    .finance-summary,
    .notes-grid,
    .invoice-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-item-row {
        grid-template-columns: 1.2fr 1.4fr 0.6fr 0.8fr auto;
        align-items: end;
    }

    .quick-add-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .topbar-search {
        display: block;
    }
}

@media (min-width: 1040px) {
    .sidebar {
        transform: none;
    }

    .menu-button,
    .bottom-nav,
    .mobile-backdrop {
        display: none;
    }

    .main-area {
        margin-left: var(--sidebar-w);
        padding-bottom: 0;
    }

    .topbar {
        padding: 16px 28px;
    }

    .content-wrap {
        padding: 28px;
    }

    .task-board {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: start;
    }

    .target-grid,
    .customer-grid,
    .notes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pipeline-summary,
    .finance-summary,
    .invoice-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .table-shell {
        display: block;
    }

    .mobile-card-list {
        display: none;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 13px;
    }

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

    .topbar-actions {
        margin-left: auto;
    }

    .topbar-icon-button[aria-label="Notifications"] {
        display: none;
    }

    .primary-action,
    .secondary-action,
    .danger-action {
        width: auto;
    }

    .hero-actions,
    .form-actions,
    .card-actions {
        align-items: stretch;
    }

    .hero-actions > *,
    .form-actions > *,
    .card-actions > * {
        flex: 1 1 auto;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .module-hero,
    .hero-band,
    .panel,
    .module-form-panel,
    .filter-bar {
        border-radius: var(--radius-lg);
    }

    .hero-band {
        padding: 24px;
    }

    .hero-band h2 {
        font-size: 31px;
    }

    .quick-add-card {
        max-height: min(720px, calc(100vh - 36px));
        overflow: auto;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-invoice,
    .print-invoice * {
        visibility: visible;
    }

    .print-invoice {
        position: absolute;
        inset: 0;
        display: block;
        padding: 32px;
        background: #ffffff;
    }

    .sidebar,
    .topbar,
    .bottom-nav,
    .quick-add-modal {
        display: none;
    }
}

/* Round 5D market-standard admin UI */
:root {
    --font-main: "Plus Jakarta Sans", "Inter", "Manrope", "Segoe UI", system-ui, sans-serif;
    --admin-bg: #f3f7fb;
    --card-rgb: 255, 255, 255;
    --dark-card-rgb: 17, 24, 39;
    --market-shadow: 0 18px 50px rgba(37, 99, 235, 0.10);
}

:root[data-theme="dark"] {
    --admin-bg: #07101d;
    --market-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

body {
    font-family: var(--font-main);
}

.svg-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.nav-icon::before,
.nav-icon::after,
.quick-add-icon::before,
.quick-add-icon::after {
    display: none;
}

.nav-icon,
.quick-add-icon,
.tile-icon {
    color: inherit;
}

.nav-group {
    display: grid;
    gap: 5px;
}

.sidebar-nav {
    gap: 18px;
    margin-top: 18px;
}

.nav-section-label {
    margin: 0 8px 4px;
}

.nav-item {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 13.5px;
}

.nav-item .svg-icon {
    width: 18px;
    height: 18px;
}

.nav-icon {
    width: 32px;
    height: 32px;
}

.topbar-title span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.topbar-actions .primary-action,
.topbar-actions .secondary-action {
    gap: 8px;
}

.topbar-actions .svg-icon {
    width: 18px;
    height: 18px;
}

.search-icon {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 0;
}

.search-icon::after {
    display: none;
}

.search-icon .svg-icon {
    width: 18px;
    height: 18px;
}

.bell-icon,
.theme-icon {
    display: none;
}

.dashboard-welcome {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 2px 0;
}

.dashboard-welcome h2 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.dashboard-welcome p {
    margin: 7px 0 0;
    color: var(--muted);
}

.welcome-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.welcome-chips span {
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(var(--card-rgb), 0.72);
    font-size: 12px;
    font-weight: 850;
}

:root[data-theme="dark"] .welcome-chips span {
    background: rgba(var(--dark-card-rgb), 0.72);
}

.command-card {
    order: 3;
}

.section-heading {
    order: 4;
}

.quick-tile-grid {
    order: 2;
}

.kpi-grid {
    order: 5;
}

.invoice-dashboard-grid {
    order: 7;
}

.dashboard-lower {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    order: 8;
}

.dashboard-lower > .panel {
    min-width: 0;
}

.mini-summary-panel a,
.section-heading a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.mini-metric-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mini-metric-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-2);
}

.mini-metric-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.mini-metric-list strong {
    color: var(--heading);
    font-size: 18px;
}

.quick-tile {
    min-height: 132px;
}

.tile-icon::before,
.tile-icon::after {
    display: block;
}

.tile-icon-check::before {
    inset: 12px 11px 15px 13px;
    border-width: 0 0 3px 3px;
    border-radius: 0;
    transform: rotate(-45deg);
}

.tile-icon-check::after {
    display: none;
}

.tile-icon-users::before {
    border-radius: 50%;
}

.tile-icon-users::after {
    inset: 27px 10px 11px;
    border-radius: 10px 10px 4px 4px;
}

.tile-icon-invoice::after {
    inset: 17px 15px 20px;
    border-width: 2px 0 0;
    border-radius: 0;
}

.tile-icon-wallet::after {
    inset: 19px 10px 19px 31px;
    border: 0;
    background: currentColor;
}

.kpi-card {
    display: grid;
    align-content: space-between;
    min-height: 158px;
}

.kpi-card strong {
    letter-spacing: -0.04em;
}

.kpi-card:nth-child(2)::before,
.kpi-card:nth-child(8)::before {
    background: linear-gradient(90deg, #8b5cf6, #2563eb);
}

.kpi-card:nth-child(2) .kpi-icon,
.kpi-card:nth-child(8) .kpi-icon {
    background: var(--purple-soft);
}

.kpi-card:nth-child(3)::before {
    background: linear-gradient(90deg, #06b6d4, #14b8a6);
}

.kpi-card:nth-child(3) .kpi-icon {
    background: rgba(6, 182, 212, 0.14);
}

.module-hero {
    border-radius: 26px;
}

.module-hero > div:first-child::before {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    content: "Workspace";
}

.filter-bar {
    border-radius: 20px;
}

.module-form-panel {
    border-radius: 22px;
}

.module-card,
.summary-card {
    border-radius: 20px;
}

.table-shell {
    border-radius: 22px;
}

.bottom-nav .svg-icon {
    width: 18px;
    height: 18px;
}

@media (min-width: 980px) {
    .dashboard-lower {
        grid-template-columns: 1.1fr 0.95fr;
    }

    .activity-panel {
        grid-row: span 2;
    }
}

@media (min-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-welcome {
        display: grid;
    }

    .welcome-chips {
        justify-content: start;
    }

    .topbar-title span {
        display: none;
    }

    .topbar-actions .primary-action span,
    .topbar-actions .secondary-action span {
        display: none;
    }

    .topbar-actions .primary-action,
    .topbar-actions .secondary-action {
        width: 42px;
        padding: 0;
    }

    .quick-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-tile {
        min-height: 122px;
    }
}

/* Round 5E design correction */
:root {
    --topbar-h: 68px;
    --sidebar-w: 286px;
    --bg: #f3f7fb;
    --surface: #ffffff;
    --surface-2: #f7f9fd;
    --text: #1f2937;
    --heading: #0f172a;
    --muted: #64748b;
    --label: #334155;
    --line: #dbe4ef;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.07);
    --shadow: 0 16px 42px rgba(15, 23, 42, 0.11);
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --bg-2: #0f172a;
    --surface: #172033;
    --surface-2: #111827;
    --text: #e2e8f0;
    --heading: #f8fafc;
    --muted: #94a3b8;
    --label: #cbd5e1;
    --line: rgba(148, 163, 184, 0.20);
}

html,
body {
    overflow-x: hidden;
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.08), transparent 25%),
        var(--bg);
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.16), transparent 24%),
        radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.08), transparent 26%),
        var(--bg);
}

.sidebar {
    width: var(--sidebar-w);
    max-width: min(var(--sidebar-w), calc(100vw - 28px));
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.24);
}

.sidebar * {
    max-width: 100%;
}

.sidebar-nav {
    overflow-x: hidden;
    overflow-y: visible;
    gap: 14px;
    padding-right: 0;
}

.brand {
    min-height: 60px;
    border-radius: 18px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.sidebar-insight {
    margin-top: 12px;
    padding: 12px;
    border-radius: 16px;
}

.sidebar-insight strong {
    font-size: 16px;
}

.nav-section-label {
    margin: 0 8px 5px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
}

.nav-placeholder {
    display: flex;
    min-height: 36px;
    align-items: center;
    padding: 0 12px;
    color: var(--sidebar-muted);
    font-size: 12px;
    font-weight: 750;
}

.nav-item {
    min-height: 43px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 10px;
}

.nav-icon .svg-icon {
    width: 17px;
    height: 17px;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.74));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.nav-item.active::before {
    display: none;
}

.nav-item:hover {
    transform: translateX(2px);
}

.sidebar-footer {
    padding-top: 12px;
}

.user-chip {
    padding: 10px;
    border-radius: 16px;
}

.avatar {
    width: 34px;
    height: 34px;
}

.mobile-backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.topbar {
    min-height: var(--topbar-h);
    padding: 10px 18px;
    background: rgba(243, 247, 251, 0.94);
    box-shadow: none;
}

:root[data-theme="dark"] .topbar {
    background: rgba(11, 18, 32, 0.94);
}

.topbar h1 {
    font-size: 26px;
    font-weight: 850;
}

.topbar-title span {
    color: var(--muted);
}

.topbar-search input,
.topbar-icon-button,
.icon-button,
.icon-close,
.secondary-action,
input,
select,
textarea {
    background: var(--surface);
}

.topbar-icon-button,
.icon-button,
.icon-close {
    border-radius: 12px;
    box-shadow: none;
}

.primary-action,
.secondary-action,
.danger-action {
    border-radius: 11px;
}

.content-wrap {
    padding: 22px;
}

.dashboard-grid,
.module-page {
    gap: 18px;
}

.dashboard-welcome {
    padding-top: 0;
}

.dashboard-welcome h2 {
    font-size: 30px;
    font-weight: 850;
}

.welcome-chips span {
    background: var(--surface);
}

.hero-band {
    min-height: 220px;
    border-radius: 22px;
}

.hero-band h2 {
    font-size: clamp(30px, 3.4vw, 42px);
}

.hero-stats {
    min-width: 190px;
}

.quick-tile {
    min-height: 124px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.quick-tile:hover {
    transform: translateY(-3px);
}

.tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
}

.kpi-card {
    min-height: 136px;
    padding: 18px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.kpi-card::after {
    width: 92px;
    height: 92px;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 12px;
}

.kpi-card span {
    color: var(--label);
    font-size: 11.5px;
}

.kpi-card small {
    color: var(--muted);
}

.kpi-card strong {
    font-size: clamp(25px, 2.4vw, 32px);
}

:root[data-theme="dark"] .kpi-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .module-form-panel,
:root[data-theme="dark"] .filter-bar,
:root[data-theme="dark"] .module-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .kanban-column,
:root[data-theme="dark"] .table-shell,
:root[data-theme="dark"] .quick-add-card {
    background: var(--surface);
    border-color: var(--line);
}

.panel,
.module-form-panel,
.filter-bar,
.module-card,
.summary-card,
.table-shell {
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
}

.filter-bar {
    background: var(--surface);
}

:root[data-theme="dark"] .filter-bar {
    background: var(--surface);
}

.module-hero {
    min-height: 128px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.88)),
        var(--surface);
}

:root[data-theme="dark"] .module-hero {
    background: var(--surface);
}

.module-hero h2 {
    font-size: clamp(24px, 2.7vw, 32px);
    font-weight: 850;
}

.module-card {
    min-height: 104px;
}

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

.data-table th,
.data-table td {
    padding: 12px 14px;
    font-size: 13.5px;
}

.data-table th {
    color: var(--label);
}

:root[data-theme="dark"] .data-table th {
    background: #111827;
}

.bottom-nav {
    right: 10px;
    bottom: 10px;
    left: 10px;
    gap: 4px;
    padding: 7px;
    border-radius: 18px;
    background: var(--surface);
}

.bottom-nav a {
    min-height: 52px;
    border-radius: 13px;
    font-size: 9.5px;
}

.bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.bottom-nav a.active {
    box-shadow: none;
}

.quick-add-modal {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(2px);
}

.quick-add-card {
    border-radius: 22px;
}

.quick-add-grid a {
    min-height: 54px;
    border-radius: 14px;
}

@media (min-width: 1040px) {
    .main-area {
        margin-left: var(--sidebar-w);
    }
}

@media (max-width: 680px) {
    .sidebar {
        width: min(286px, calc(100vw - 30px));
        max-width: calc(100vw - 30px);
        padding: 14px;
    }

    .topbar {
        min-height: 62px;
        padding: 10px 12px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .content-wrap {
        padding: 14px 14px 108px;
    }

    .dashboard-welcome h2 {
        font-size: 24px;
    }

    .welcome-chips {
        gap: 6px;
    }

    .welcome-chips span {
        min-height: 28px;
        padding: 6px 9px;
        font-size: 11px;
    }

    .hero-band {
        min-height: 190px;
        padding: 20px;
    }

    .hero-band h2 {
        font-size: 28px;
    }

    .hero-stats {
        min-width: 0;
    }

    .quick-tile {
        min-height: 112px;
        padding: 14px;
    }

    .quick-tile strong {
        font-size: 16px;
    }

    .quick-tile small {
        font-size: 12px;
    }

    .tile-icon {
        width: 34px;
        height: 34px;
    }

    .kpi-card {
        min-height: 118px;
        padding: 15px;
    }

    .kpi-card strong {
        font-size: 25px;
    }

    .module-hero {
        min-height: 112px;
    }

    .bottom-nav {
        right: 8px;
        bottom: 8px;
        left: 8px;
    }
}

/* Round 5C visual enhancement layer */
:root {
    --glow-blue: 0 18px 42px rgba(37, 99, 235, 0.18);
    --glow-cyan: 0 18px 42px rgba(6, 182, 212, 0.16);
    --glow-green: 0 18px 42px rgba(16, 185, 129, 0.16);
    --glow-orange: 0 18px 42px rgba(245, 158, 11, 0.16);
    --glow-purple: 0 18px 42px rgba(124, 58, 237, 0.18);
    --app-pad: clamp(16px, 2.2vw, 30px);
}

:root[data-theme="dark"] {
    --glow-blue: 0 0 34px rgba(37, 99, 235, 0.22);
    --glow-cyan: 0 0 34px rgba(6, 182, 212, 0.20);
    --glow-green: 0 0 34px rgba(16, 185, 129, 0.18);
    --glow-orange: 0 0 34px rgba(245, 158, 11, 0.18);
    --glow-purple: 0 0 34px rgba(124, 58, 237, 0.22);
}

body {
    letter-spacing: 0;
}

.content-wrap {
    padding: var(--app-pad);
}

.dashboard-grid,
.module-page {
    gap: clamp(16px, 1.7vw, 24px);
}

.sidebar {
    padding: 18px;
}

.brand {
    border-radius: 24px;
}

.brand-mark {
    position: relative;
}

.brand-mark::after {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 19px;
    content: "";
}

.sidebar-insight {
    position: relative;
    overflow: hidden;
}

.sidebar-insight::after {
    position: absolute;
    right: -26px;
    bottom: -34px;
    width: 94px;
    height: 94px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    content: "";
}

.nav-item {
    isolation: isolate;
}

.nav-item::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.10));
    opacity: 0;
    content: "";
    transition: opacity 0.18s ease;
}

.nav-item.active::after,
.nav-item:hover::after {
    opacity: 1;
}

.nav-item.active .nav-icon {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.75), rgba(6, 182, 212, 0.38));
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.24);
}

.user-chip {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

:root[data-theme="dark"] .topbar {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
}

.topbar-search input {
    transition: width 0.22s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.topbar-search input:focus {
    box-shadow: var(--focus), var(--shadow-sm);
}

.hero-band {
    min-height: 270px;
    isolation: isolate;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.28), transparent 16%),
        radial-gradient(circle at 18% 110%, rgba(16, 185, 129, 0.36), transparent 25%),
        linear-gradient(135deg, #08111f 0%, #1d4ed8 45%, #0f766e 100%);
}

.hero-band::before {
    position: absolute;
    inset: 18px;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    content: "";
}

.hero-band h2 {
    text-wrap: balance;
}

.hero-band .eyebrow {
    display: inline-flex;
    width: fit-content;
    min-height: 28px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.hero-stats {
    position: relative;
    min-width: 205px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-stats::after {
    position: absolute;
    right: 16px;
    bottom: 14px;
    width: 52px;
    height: 52px;
    border: 8px solid rgba(255, 255, 255, 0.12);
    border-top-color: #ffffff;
    border-radius: 50%;
    content: "";
}

.dashboard-quick-actions .secondary-action {
    min-height: 44px;
    border-radius: 999px;
}

.quick-tile-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-tile {
    position: relative;
    display: grid;
    min-height: 140px;
    align-content: end;
    gap: 5px;
    overflow: hidden;
    padding: 18px;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-tile::before,
.quick-tile::after {
    position: absolute;
    content: "";
    border-radius: 50%;
}

.quick-tile::before {
    top: -34px;
    right: -28px;
    width: 116px;
    height: 116px;
    background: rgba(255, 255, 255, 0.16);
}

.quick-tile::after {
    right: 28px;
    bottom: 22px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.quick-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.quick-tile strong,
.quick-tile small {
    position: relative;
    z-index: 1;
}

.quick-tile strong {
    font-size: 19px;
    font-weight: 950;
}

.quick-tile small {
    color: rgba(255, 255, 255, 0.82);
}

.tile-blue {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.tile-purple {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.tile-orange {
    background: linear-gradient(135deg, #f97316, #d97706);
}

.tile-green {
    background: linear-gradient(135deg, #059669, #14b8a6);
}

.tile-icon {
    position: absolute;
    top: 18px;
    left: 18px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.tile-icon::before,
.tile-icon::after {
    position: absolute;
    inset: 12px;
    border: 2px solid currentColor;
    border-radius: 6px;
    content: "";
}

.tile-icon[data-icon="check"]::before {
    inset: 12px 11px 15px 13px;
    border-width: 0 0 3px 3px;
    border-radius: 0;
    transform: rotate(-45deg);
}

.tile-icon[data-icon="check"]::after {
    display: none;
}

.tile-icon[data-icon="users"]::before {
    border-radius: 50%;
}

.tile-icon[data-icon="users"]::after {
    inset: 27px 10px 11px;
    border-radius: 10px 10px 4px 4px;
}

.tile-icon[data-icon="invoice"]::after {
    inset: 17px 15px 20px;
    border-width: 2px 0 0;
    border-radius: 0;
}

.tile-icon[data-icon="wallet"]::after {
    inset: 19px 10px 19px 31px;
    border: 0;
    background: currentColor;
}

.section-heading {
    padding: 0 2px;
}

.section-heading h3 {
    font-size: 22px;
    letter-spacing: -0.02em;
}

.kpi-card {
    min-height: 166px;
    isolation: isolate;
}

.kpi-card::after {
    position: absolute;
    top: -42px;
    right: -42px;
    z-index: -1;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.10);
    content: "";
}

.kpi-card.blue {
    box-shadow: var(--glow-blue), var(--shadow-sm);
}

.kpi-card.green {
    box-shadow: var(--glow-green), var(--shadow-sm);
}

.kpi-card.gold {
    box-shadow: var(--glow-orange), var(--shadow-sm);
}

.kpi-card.red {
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.13), var(--shadow-sm);
}

:root[data-theme="dark"] .kpi-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
        rgba(17, 24, 39, 0.88);
}

.kpi-icon {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.kpi-icon::after {
    position: absolute;
    right: 9px;
    bottom: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: 0.42;
}

.panel,
.module-form-panel,
.filter-bar,
.module-card,
.summary-card,
.table-shell {
    backdrop-filter: blur(12px);
}

.premium-panel {
    position: relative;
    overflow: hidden;
}

.premium-panel::after {
    position: absolute;
    right: -50px;
    top: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
    content: "";
}

.module-hero {
    min-height: 142px;
}

.module-hero::before {
    position: absolute;
    left: 22px;
    bottom: 18px;
    width: 72px;
    height: 5px;
    border-radius: 999px;
    background: var(--gradient-primary);
    content: "";
    opacity: 0.88;
}

.module-hero .primary-action,
.module-hero .secondary-action {
    position: relative;
    z-index: 1;
}

.filter-bar {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.84));
}

:root[data-theme="dark"] .filter-bar {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(15, 23, 42, 0.80));
}

.kanban-column {
    border-radius: 22px;
}

.kanban-header strong {
    color: var(--heading);
    font-size: 14px;
}

.module-card {
    min-height: 118px;
}

.empty-state {
    min-height: 116px;
    align-content: center;
    background:
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(37, 99, 235, 0.025) 12px 24px),
        var(--surface);
}

:root[data-theme="dark"] .empty-state {
    background:
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(56, 189, 248, 0.035) 12px 24px),
        rgba(17, 24, 39, 0.86);
}

.data-table {
    border-spacing: 0;
}

.data-table th:first-child {
    border-top-left-radius: 18px;
}

.data-table th:last-child {
    border-top-right-radius: 18px;
}

.quick-add-card {
    border-radius: 28px;
}

.quick-add-grid a {
    position: relative;
    overflow: hidden;
}

.quick-add-grid a::after {
    position: absolute;
    right: -22px;
    bottom: -24px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.06);
    content: "";
}

.bottom-nav {
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.bottom-nav a {
    font-size: 9.5px;
    letter-spacing: 0.01em;
}

.bottom-nav a.active {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

@media (min-width: 760px) {
    .quick-tile-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .content-wrap {
        padding: 14px 14px 112px;
    }

    .topbar {
        min-height: 70px;
        padding: 12px 14px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .hero-band {
        min-height: 220px;
        padding: 22px;
    }

    .hero-band .eyebrow {
        min-height: 24px;
        font-size: 10px;
    }

    .dashboard-quick-actions {
        display: none;
    }

    .quick-tile-grid {
        gap: 12px;
    }

    .quick-tile {
        min-height: 126px;
        padding: 15px;
        border-radius: 21px;
    }

    .quick-tile strong {
        font-size: 17px;
    }

    .tile-icon {
        top: 14px;
        left: 14px;
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .section-heading {
        align-items: center;
    }

    .section-heading h3 {
        font-size: 18px;
    }

    .kpi-card {
        min-height: 132px;
        padding: 17px;
    }

    .kpi-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .module-hero {
        min-height: 128px;
        padding: 20px;
    }

    .module-hero h2 {
        font-size: 26px;
    }

    .filter-bar,
    .module-form-panel,
    .panel {
        padding: 16px;
    }

    .bottom-nav {
        right: 8px;
        bottom: 8px;
        left: 8px;
    }
}
/* Round 6 Axelit-style app upgrades */
:root {
    --collapsed-sidebar-width: 82px;
}

html.sidebar-collapsed .sidebar {
    width: var(--collapsed-sidebar-width);
}

html.sidebar-collapsed .main-area {
    margin-left: var(--collapsed-sidebar-width);
}

html.sidebar-collapsed .brand {
    justify-content: center;
}

html.sidebar-collapsed .brand > div:not(.brand-mark),
html.sidebar-collapsed .sidebar-insight,
html.sidebar-collapsed .nav-section-label,
html.sidebar-collapsed .nav-item span:not(.nav-icon),
html.sidebar-collapsed .nav-placeholder,
html.sidebar-collapsed .sidebar-footer .user-chip > div,
html.sidebar-collapsed .logout-link {
    display: none;
}

html.sidebar-collapsed .nav-item {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

html.sidebar-collapsed .sidebar-footer {
    align-items: center;
}

.compact-summary {
    margin-bottom: 18px;
}

.rich-module-card {
    display: grid;
    gap: 12px;
}

.inline-log {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-log input {
    width: 110px;
}

.habit-grid {
    display: grid;
    grid-template-columns: repeat(21, 1fr);
    gap: 5px;
}

.habit-grid span {
    display: block;
    aspect-ratio: 1;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.2);
}

.habit-grid span.done {
    background: linear-gradient(135deg, var(--primary), var(--success));
}

.checklist-list {
    display: grid;
    gap: 8px;
}

.checklist-list button {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface-3);
    cursor: pointer;
}

.checklist-list button.done {
    color: var(--muted);
    text-decoration: line-through;
}

.service-group {
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
}

.service-group h3 {
    margin: 8px 0 0;
    color: var(--heading);
}

.round6-dashboard {
    display: grid;
    gap: 18px;
}

.round6-top-grid,
.round6-detail-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.round6-shortcuts {
    grid-column: span 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.round6-weekly {
    grid-column: span 6;
}

.round6-today {
    grid-column: span 3;
}

.round6-panel {
    grid-column: span 4;
}

.round6-panel.wide {
    grid-column: span 6;
}

.dashboard-chart-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    align-items: end;
    min-height: 170px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-3);
}

.dashboard-chart-bars span {
    display: block;
    min-height: 28px;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, var(--primary), var(--info));
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-3);
}

.dashboard-list-item strong {
    color: var(--heading);
}

.dashboard-list-item span {
    color: var(--muted);
    font-size: 13px;
}

.pipeline-bars {
    display: grid;
    gap: 10px;
}

.pipeline-bars div {
    display: grid;
    gap: 6px;
}

.pipeline-bars span {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1180px) {
    .round6-shortcuts,
    .round6-weekly,
    .round6-today,
    .round6-panel,
    .round6-panel.wide {
        grid-column: span 6;
    }
}

@media (max-width: 980px) {
    html.sidebar-collapsed .sidebar {
        width: var(--sidebar-w);
    }

    html.sidebar-collapsed .main-area {
        margin-left: 0;
    }

    html.sidebar-collapsed .brand > div:not(.brand-mark),
    html.sidebar-collapsed .sidebar-insight,
    html.sidebar-collapsed .nav-section-label,
    html.sidebar-collapsed .nav-item span:not(.nav-icon),
    html.sidebar-collapsed .sidebar-footer .user-chip > div,
    html.sidebar-collapsed .logout-link {
        display: block;
    }

    .main-area {
        padding-bottom: 120px;
    }

    .content-wrap {
        padding-top: 14px;
        padding-bottom: 120px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .round6-top-grid,
    .round6-detail-grid {
        grid-template-columns: 1fr;
    }

    .round6-shortcuts,
    .round6-weekly,
    .round6-today,
    .round6-panel,
    .round6-panel.wide {
        grid-column: 1 / -1;
    }

    .round6-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .content-wrap {
        padding-right: 14px;
        padding-left: 14px;
    }

    .module-card-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .round6-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-log {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-log input {
        width: 100%;
    }

    .bottom-nav {
        bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Round 6 desktop density fix: compact Axelit-style dashboard only */
@media (min-width: 1024px) {
    .content-wrap {
        width: 100%;
        max-width: none;
        padding: 16px 18px 24px;
    }

    .round6-dashboard {
        gap: 12px;
    }

    .round6-dashboard .dashboard-welcome {
        min-height: 0;
        padding: 14px 16px;
        border-radius: 16px;
    }

    .round6-dashboard .dashboard-welcome h2 {
        font-size: 24px;
        line-height: 1.05;
    }

    .round6-dashboard .dashboard-welcome p {
        margin-top: 4px;
        font-size: 13px;
    }

    .round6-dashboard .welcome-chips {
        gap: 7px;
    }

    .round6-dashboard .welcome-chips span {
        min-height: 28px;
        padding: 5px 9px;
        border-radius: 9px;
        font-size: 11px;
    }

    .round6-top-grid,
    .round6-detail-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 12px;
    }

    .round6-shortcuts {
        grid-column: span 3;
        gap: 10px;
    }

    .round6-weekly {
        grid-column: span 6;
    }

    .round6-today {
        grid-column: span 3;
    }

    .round6-shortcuts .quick-tile {
        min-height: 98px;
        padding: 14px;
        border-radius: 14px;
    }

    .round6-shortcuts .quick-tile strong {
        font-size: 17px;
    }

    .round6-shortcuts .quick-tile small {
        font-size: 12px;
        line-height: 1.35;
    }

    .round6-dashboard .panel,
    .round6-dashboard .premium-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .round6-dashboard .panel-header {
        gap: 8px;
        margin-bottom: 10px;
    }

    .round6-dashboard .panel-header h3 {
        font-size: 16px;
        line-height: 1.15;
    }

    .round6-dashboard .eyebrow {
        margin-bottom: 3px;
        font-size: 10.5px;
    }

    .dashboard-chart-bars {
        min-height: 116px;
        padding: 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .round6-weekly .mini-metric-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
    }

    .round6-dashboard .mini-metric-list {
        gap: 8px;
    }

    .round6-dashboard .mini-metric-list div {
        min-height: 54px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .round6-dashboard .mini-metric-list span,
    .dashboard-list-item span,
    .pipeline-bars span {
        font-size: 11.5px;
    }

    .round6-dashboard .mini-metric-list strong {
        font-size: 15px;
        line-height: 1.1;
    }

    .dashboard-list {
        gap: 8px;
    }

    .dashboard-list-item {
        min-height: 52px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .dashboard-list-item strong {
        font-size: 13px;
        line-height: 1.2;
    }

    .round6-dashboard > .kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .round6-dashboard > .kpi-grid .kpi-card {
        min-height: 96px;
        padding: 11px 12px;
        border-radius: 15px;
        align-content: start;
        gap: 2px;
    }

    .round6-dashboard > .kpi-grid .kpi-card::before {
        height: 4px;
    }

    .round6-dashboard > .kpi-grid .kpi-icon {
        width: 26px;
        height: 26px;
        margin-bottom: 2px;
        border-radius: 10px;
    }

    .round6-dashboard > .kpi-grid .kpi-card span {
        font-size: 10px;
        letter-spacing: 0.04em;
    }

    .round6-dashboard > .kpi-grid .kpi-card strong {
        margin: 2px 0 1px;
        font-size: clamp(20px, 1.55vw, 25px);
    }

    .round6-dashboard > .kpi-grid .kpi-card small {
        font-size: 11px;
        line-height: 1.25;
    }

    .round6-detail-grid .round6-panel {
        grid-column: span 3;
        min-height: 142px;
    }

    .round6-detail-grid .round6-panel:nth-child(1),
    .round6-detail-grid .round6-panel:nth-child(2),
    .round6-detail-grid .round6-panel:nth-child(3),
    .round6-detail-grid .round6-panel:nth-child(4) {
        order: 1;
    }

    .round6-detail-grid .round6-panel:nth-child(5) {
        order: 2;
        grid-column: span 4;
    }

    .round6-detail-grid .round6-panel:nth-child(7) {
        order: 3;
        grid-column: span 4;
    }

    .round6-detail-grid .round6-panel:nth-child(6) {
        order: 4;
        grid-column: span 4;
    }

    .round6-detail-grid .round6-panel:nth-child(8) {
        order: 5;
        grid-column: span 12;
        min-height: 116px;
    }

    .round6-detail-grid .round6-panel:nth-child(8) .mini-metric-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .round6-dashboard .progress-track {
        height: 8px;
    }

    .pipeline-bars {
        gap: 8px;
    }

    .activity-list {
        gap: 8px;
    }

    .activity-item {
        padding: 9px 0;
    }

    html.sidebar-collapsed .content-wrap {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (min-width: 1280px) {
    .content-wrap {
        padding-right: 22px;
        padding-left: 22px;
    }

    .round6-top-grid,
    .round6-detail-grid,
    .round6-dashboard > .kpi-grid {
        gap: 14px;
    }
}

/* Round 6B final UI adjustment */
.sidebar,
.sidebar-nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.module-hero::before {
    display: none !important;
    content: none !important;
}

.dashboard-task-carousel {
    position: relative;
    overflow: hidden;
}

.dashboard-carousel-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.dashboard-slide {
    min-width: 100%;
}

.dashboard-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.dashboard-carousel-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--line-strong);
    transition: width 0.2s ease, background 0.2s ease;
}

.dashboard-carousel-dots span.active {
    width: 18px;
    background: var(--primary);
}

@media (min-width: 1040px) {
    :root {
        --collapsed-sidebar-width: 72px;
    }

    .menu-button {
        display: grid;
    }

    .sidebar,
    .main-area,
    .topbar,
    .content-wrap {
        transition: width 0.24s ease, margin-left 0.24s ease, padding 0.24s ease;
    }

    html.sidebar-collapsed .sidebar {
        width: var(--collapsed-sidebar-width);
        max-width: var(--collapsed-sidebar-width);
        padding: 14px 10px;
    }

    html.sidebar-collapsed .main-area {
        margin-left: var(--collapsed-sidebar-width);
    }

    html.sidebar-collapsed .brand {
        justify-content: center;
        padding: 0;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    html.sidebar-collapsed .brand-mark {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    html.sidebar-collapsed .sidebar-nav {
        gap: 10px;
        margin-top: 18px;
        overflow-x: hidden;
    }

    html.sidebar-collapsed .nav-group {
        display: grid;
        justify-items: center;
        gap: 8px;
    }

    html.sidebar-collapsed .nav-section-label {
        display: block;
        width: 5px;
        height: 5px;
        overflow: hidden;
        padding: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.28);
        color: transparent;
    }

    html.sidebar-collapsed .nav-item {
        width: 48px;
        height: 48px;
        min-height: 48px;
        justify-content: center;
        padding: 0;
        border-radius: 15px;
    }

    html.sidebar-collapsed .nav-item:hover {
        transform: translateX(0);
    }

    html.sidebar-collapsed .nav-item.active {
        background: rgba(255, 255, 255, 0.16);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    }

    html.sidebar-collapsed .nav-item.active::before {
        left: -10px;
        width: 3px;
        height: 24px;
    }

    html.sidebar-collapsed .nav-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    html.sidebar-collapsed .sidebar-footer {
        display: grid;
        justify-items: center;
        padding-top: 12px;
    }

    html.sidebar-collapsed .user-chip {
        padding: 0;
        border: 0;
        background: transparent;
    }

    html.sidebar-collapsed .avatar {
        width: 42px;
        height: 42px;
    }

    .round6-top-grid {
        align-items: stretch;
    }

    .round6-today .dashboard-list-item {
        min-height: 126px;
        align-content: center;
    }
}

@media (max-width: 1039px) {
    .dashboard-task-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .dashboard-task-carousel::-webkit-scrollbar {
        display: none;
    }

    .dashboard-carousel-track {
        gap: 10px;
        transform: none !important;
    }

    .dashboard-slide {
        min-width: min(84vw, 340px);
        scroll-snap-align: start;
    }

    .dashboard-carousel-dots {
        display: none;
    }

    .main-area {
        padding-bottom: 128px;
    }

    .content-wrap {
        padding-top: 16px;
        padding-bottom: 128px;
        scroll-padding-top: calc(var(--topbar-h) + 18px);
    }

    .module-page,
    .round6-dashboard,
    .dashboard-welcome,
    .module-hero {
        scroll-margin-top: calc(var(--topbar-h) + 18px);
    }
}

/* Round 6C Axelit-style visual clarity polish */
:root {
    --ax-body: #f4f7fb;
    --ax-card: rgba(255, 255, 255, 0.94);
    --ax-card-soft: rgba(248, 251, 255, 0.96);
    --ax-dashed: rgba(83, 122, 255, 0.34);
    --ax-blue: #3b82f6;
    --ax-purple: #8b5cf6;
    --ax-green: #22c55e;
    --ax-orange: #f59e0b;
    --ax-red: #ef4444;
    --ax-cyan: #06b6d4;
    --ax-shadow: 0 18px 46px rgba(23, 37, 84, 0.08);
}

:root[data-theme="dark"] {
    --ax-body: #0b1020;
    --ax-card: rgba(18, 24, 45, 0.94);
    --ax-card-soft: rgba(23, 31, 57, 0.92);
    --ax-dashed: rgba(115, 145, 255, 0.38);
    --ax-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
}

body {
    background:
        radial-gradient(circle at 16% 8%, rgba(59, 130, 246, 0.10), transparent 24rem),
        radial-gradient(circle at 88% 14%, rgba(139, 92, 246, 0.08), transparent 22rem),
        var(--ax-body);
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at 18% 6%, rgba(59, 130, 246, 0.16), transparent 25rem),
        radial-gradient(circle at 88% 10%, rgba(139, 92, 246, 0.13), transparent 24rem),
        linear-gradient(135deg, #090d1a 0%, #11162a 48%, #0b1020 100%);
}

.panel,
.module-form-panel,
.filter-bar,
.module-card,
.summary-card,
.empty-state,
.invoice-preview,
.auth-panel {
    background: var(--ax-card);
    border: 1px solid rgba(108, 122, 160, 0.16);
    box-shadow: var(--ax-shadow);
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .module-form-panel,
:root[data-theme="dark"] .filter-bar,
:root[data-theme="dark"] .module-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .invoice-preview,
:root[data-theme="dark"] .auth-panel {
    background: linear-gradient(145deg, rgba(20, 27, 49, 0.98), rgba(14, 20, 38, 0.96));
    border-color: rgba(139, 162, 255, 0.17);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.panel:hover,
.module-card:hover,
.summary-card:hover,
.quick-tile:hover {
    border-color: rgba(70, 108, 255, 0.26);
}

.empty-state {
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(245, 243, 255, 0.9)),
        var(--ax-card);
    border: 1px dashed var(--ax-dashed);
    color: var(--text);
}

:root[data-theme="dark"] .empty-state {
    background:
        linear-gradient(135deg, rgba(31, 42, 79, 0.82), rgba(40, 28, 68, 0.74)),
        var(--ax-card-soft);
}

.panel-header h3,
.module-hero h1,
.dashboard-welcome h2,
.card-top strong {
    letter-spacing: 0;
}

.eyebrow,
.panel-header .eyebrow,
.module-hero .eyebrow,
.mini-metric-list span,
.kpi-card span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .panel-header .eyebrow,
:root[data-theme="dark"] .module-hero .eyebrow,
:root[data-theme="dark"] .mini-metric-list span,
:root[data-theme="dark"] .kpi-card span {
    color: rgba(218, 226, 255, 0.72);
}

.module-hero,
.dashboard-welcome {
    overflow: hidden;
    border: 1px solid rgba(99, 125, 255, 0.16);
    background:
        radial-gradient(circle at 92% 10%, rgba(59, 130, 246, 0.18), transparent 15rem),
        radial-gradient(circle at 8% 90%, rgba(34, 197, 94, 0.10), transparent 14rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.92));
    box-shadow: var(--ax-shadow);
}

:root[data-theme="dark"] .module-hero,
:root[data-theme="dark"] .dashboard-welcome {
    background:
        radial-gradient(circle at 92% 12%, rgba(59, 130, 246, 0.24), transparent 15rem),
        radial-gradient(circle at 12% 88%, rgba(139, 92, 246, 0.20), transparent 16rem),
        linear-gradient(135deg, rgba(22, 31, 58, 0.98), rgba(11, 16, 32, 0.98));
    border-color: rgba(139, 162, 255, 0.22);
}

.module-hero::before,
.module-hero::after,
.hero-actions::before,
.hero-actions::after,
.section-title::before,
.section-title::after,
.btn::before,
.btn::after,
.app-card::before,
.app-card::after {
    display: none !important;
    content: none !important;
}

.round6-shortcuts .quick-tile {
    min-height: 0;
    border: 0;
    box-shadow: 0 14px 34px rgba(27, 44, 103, 0.14);
}

.round6-shortcuts .quick-tile::before {
    display: block;
    width: 74px;
    height: 74px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.round6-shortcuts .quick-tile strong {
    font-size: 0.96rem;
}

.round6-shortcuts .quick-tile small {
    opacity: 0.84;
}

.round6-dashboard .panel,
.round6-dashboard .premium-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, var(--ax-card), var(--ax-card-soft));
}

.round6-dashboard .premium-panel::after {
    display: block;
    content: "";
    position: absolute;
    top: -42px;
    right: -44px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
    pointer-events: none;
}

.round6-dashboard .panel-header {
    position: relative;
    z-index: 1;
}

.dashboard-chart-bars {
    position: relative;
    min-height: 124px;
    padding: 16px 16px 10px;
    border: 1px dashed rgba(88, 116, 255, 0.23);
    border-radius: 22px;
    background:
        linear-gradient(to top, rgba(59, 130, 246, 0.08) 1px, transparent 1px) 0 0 / 100% 28px,
        linear-gradient(135deg, rgba(239, 246, 255, 0.85), rgba(245, 243, 255, 0.68));
}

:root[data-theme="dark"] .dashboard-chart-bars {
    background:
        linear-gradient(to top, rgba(96, 165, 250, 0.10) 1px, transparent 1px) 0 0 / 100% 28px,
        linear-gradient(135deg, rgba(24, 35, 68, 0.82), rgba(33, 25, 58, 0.72));
    border-color: rgba(139, 162, 255, 0.20);
}

.dashboard-chart-bars span {
    border-radius: 999px 999px 8px 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 8px 18px rgba(59, 130, 246, 0.16);
}

.round6-dashboard .mini-metric-list div {
    position: relative;
    overflow: hidden;
    background: rgba(248, 251, 255, 0.86);
    border: 1px solid rgba(108, 122, 160, 0.14);
    border-left: 3px solid rgba(59, 130, 246, 0.58);
    border-radius: 16px;
}

.round6-dashboard .mini-metric-list div:nth-child(2n) {
    border-left-color: rgba(139, 92, 246, 0.62);
}

.round6-dashboard .mini-metric-list div:nth-child(3n) {
    border-left-color: rgba(34, 197, 94, 0.62);
}

:root[data-theme="dark"] .round6-dashboard .mini-metric-list div {
    background: rgba(13, 19, 37, 0.62);
    border-color: rgba(139, 162, 255, 0.14);
}

.round6-dashboard > .kpi-grid .kpi-card {
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.14), transparent 7rem),
        var(--ax-card);
    border: 1px solid rgba(108, 122, 160, 0.15);
    box-shadow: var(--ax-shadow);
}

.round6-dashboard > .kpi-grid .kpi-card.green {
    background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.16), transparent 7rem), var(--ax-card);
}

.round6-dashboard > .kpi-grid .kpi-card.gold {
    background: radial-gradient(circle at 100% 0, rgba(245, 158, 11, 0.17), transparent 7rem), var(--ax-card);
}

.round6-dashboard > .kpi-grid .kpi-card.red {
    background: radial-gradient(circle at 100% 0, rgba(239, 68, 68, 0.15), transparent 7rem), var(--ax-card);
}

.round6-dashboard > .kpi-grid .kpi-card.purple {
    background: radial-gradient(circle at 100% 0, rgba(139, 92, 246, 0.17), transparent 7rem), var(--ax-card);
}

:root[data-theme="dark"] .round6-dashboard > .kpi-grid .kpi-card {
    background:
        radial-gradient(circle at 100% 0, rgba(96, 165, 250, 0.16), transparent 7rem),
        linear-gradient(145deg, rgba(20, 27, 49, 0.98), rgba(13, 19, 37, 0.98));
}

.round6-detail-grid .round6-panel {
    border-left: 4px solid rgba(59, 130, 246, 0.48);
}

.round6-detail-grid .round6-panel:nth-child(1) {
    border-style: dashed solid solid solid;
    border-left-color: var(--ax-purple);
    background: linear-gradient(145deg, rgba(250, 245, 255, 0.92), var(--ax-card));
}

.round6-detail-grid .round6-panel:nth-child(2) {
    border-left-color: var(--ax-blue);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.94), var(--ax-card));
}

.round6-detail-grid .round6-panel:nth-child(3) {
    border-left-color: var(--ax-green);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), var(--ax-card));
}

.round6-detail-grid .round6-panel:nth-child(4) {
    border-left-color: var(--ax-orange);
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.94), var(--ax-card));
}

.round6-detail-grid .round6-panel:nth-child(5) {
    border-left-color: var(--ax-green);
}

.round6-detail-grid .round6-panel:nth-child(6) {
    border-left-color: var(--ax-cyan);
}

.round6-detail-grid .round6-panel:nth-child(7) {
    border-left-color: var(--ax-purple);
}

.round6-detail-grid .round6-panel:nth-child(8) {
    border-left-color: var(--ax-blue);
}

:root[data-theme="dark"] .round6-detail-grid .round6-panel {
    background: linear-gradient(145deg, rgba(20, 27, 49, 0.98), rgba(13, 19, 37, 0.98));
}

.dashboard-slide {
    position: relative;
    min-height: 118px;
    padding: 18px 18px 28px 58px;
    overflow: hidden;
    border: 1px solid rgba(88, 116, 255, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 96% 6%, rgba(59, 130, 246, 0.16), transparent 5.4rem),
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(245, 243, 255, 0.86));
    box-shadow: 0 12px 26px rgba(23, 37, 84, 0.08);
}

.dashboard-slide::before {
    content: "TD";
    position: absolute;
    top: 18px;
    left: 16px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--ax-blue), var(--ax-purple));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.dashboard-slide::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 14px;
    left: 58px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ax-blue), rgba(59, 130, 246, 0.18));
}

.dashboard-slide:nth-child(2)::before {
    content: "HB";
    background: linear-gradient(135deg, var(--ax-purple), #ec4899);
}

.dashboard-slide:nth-child(2)::after {
    background: linear-gradient(90deg, var(--ax-purple), rgba(139, 92, 246, 0.18));
}

.dashboard-slide:nth-child(3)::before {
    content: "IN";
    background: linear-gradient(135deg, var(--ax-orange), var(--ax-red));
}

.dashboard-slide:nth-child(3)::after {
    background: linear-gradient(90deg, var(--ax-orange), rgba(245, 158, 11, 0.18));
}

.dashboard-slide strong {
    display: block;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.25;
}

.dashboard-slide span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

:root[data-theme="dark"] .dashboard-slide {
    background:
        radial-gradient(circle at 96% 6%, rgba(96, 165, 250, 0.18), transparent 5.4rem),
        linear-gradient(135deg, rgba(29, 42, 77, 0.92), rgba(24, 22, 54, 0.84));
    border-color: rgba(139, 162, 255, 0.19);
}

:root[data-theme="dark"] .dashboard-slide span {
    color: rgba(218, 226, 255, 0.72);
}

.activity-item {
    padding: 10px 12px;
    border: 1px solid rgba(108, 122, 160, 0.12);
    border-left: 3px solid rgba(59, 130, 246, 0.58);
    border-radius: 15px;
    background: rgba(248, 251, 255, 0.70);
}

:root[data-theme="dark"] .activity-item {
    background: rgba(13, 19, 37, 0.58);
    border-color: rgba(139, 162, 255, 0.13);
}

.pipeline-bars > div {
    padding: 10px 12px;
    border: 1px solid rgba(108, 122, 160, 0.12);
    border-radius: 16px;
    background: rgba(248, 251, 255, 0.72);
}

:root[data-theme="dark"] .pipeline-bars > div {
    background: rgba(13, 19, 37, 0.58);
    border-color: rgba(139, 162, 255, 0.13);
}

.rich-module-card.habit-card,
.habit-card {
    border: 1px dashed rgba(139, 92, 246, 0.34);
    background: linear-gradient(145deg, rgba(250, 245, 255, 0.92), var(--ax-card));
}

.rich-module-card.project-card,
.project-card {
    border-left: 4px solid rgba(59, 130, 246, 0.68);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.94), var(--ax-card));
}

.rich-module-card.service-card,
.service-card {
    border-left: 4px solid rgba(34, 197, 94, 0.68);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), var(--ax-card));
}

:root[data-theme="dark"] .rich-module-card.habit-card,
:root[data-theme="dark"] .habit-card,
:root[data-theme="dark"] .rich-module-card.project-card,
:root[data-theme="dark"] .project-card,
:root[data-theme="dark"] .rich-module-card.service-card,
:root[data-theme="dark"] .service-card {
    background: linear-gradient(145deg, rgba(20, 27, 49, 0.98), rgba(13, 19, 37, 0.98));
}

.sidebar-nav {
    overflow-x: hidden;
}

.menu-button {
    border-color: rgba(99, 125, 255, 0.18);
    background: var(--ax-card);
}

:root[data-theme="dark"] .menu-button {
    background: rgba(20, 27, 49, 0.92);
}

@media (min-width: 1040px) {
    .round6-dashboard {
        gap: 14px;
    }

    .round6-dashboard .dashboard-welcome {
        min-height: auto;
        padding-block: 16px;
    }

    .round6-dashboard .dashboard-welcome h2 {
        font-size: clamp(1.55rem, 1.8vw, 2rem);
    }

    .round6-dashboard .panel,
    .round6-dashboard .premium-panel {
        padding: 16px;
    }

    .round6-today .dashboard-list-item {
        min-height: 118px;
    }

    .round6-dashboard > .kpi-grid .kpi-card {
        min-height: 116px;
        padding: 15px;
    }
}

@media (max-width: 1039px) {
    html,
    body {
        overflow-x: hidden;
    }

    .content-wrap {
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: calc(128px + env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    .round6-dashboard,
    .module-page {
        gap: 16px;
    }

    .dashboard-task-carousel {
        margin-inline: -2px;
        padding: 2px 2px 4px;
    }

    .dashboard-slide {
        min-width: min(88vw, 360px);
    }
}

@media (max-width: 640px) {
    .round6-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .round6-shortcuts .quick-tile {
        padding: 15px;
        border-radius: 20px;
    }

    .round6-dashboard > .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .round6-dashboard > .kpi-grid .kpi-card {
        min-height: 118px;
        padding: 14px;
    }

    .round6-detail-grid,
    .round6-top-grid {
        gap: 14px;
    }

    .round6-panel,
    .round6-panel.wide,
    .round6-weekly,
    .round6-today {
        grid-column: 1 / -1;
    }
}

/* Final Round 6 polish */
.round6-weekly {
    display: flex;
    flex-direction: column;
}

.round6-weekly .dashboard-chart-bars {
    flex: 1;
    min-height: 190px;
    align-items: end;
}

.round6-weekly .dashboard-chart-bars::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.09), transparent 34%),
        linear-gradient(to top, rgba(255, 255, 255, 0.32), transparent);
    pointer-events: none;
}

.dashboard-task-carousel-vertical {
    height: 260px;
    padding: 2px;
    overflow: hidden;
}

.dashboard-task-carousel-vertical .dashboard-carousel-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: var(--carousel-transform, translateY(0));
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-task-carousel-vertical .dashboard-slide {
    min-width: 100%;
    min-height: 116px;
    flex: 0 0 116px;
}

.dashboard-task-carousel-vertical .dashboard-carousel-dots {
    position: absolute;
    right: 12px;
    top: 50%;
    z-index: 2;
    flex-direction: column;
    margin: 0;
    transform: translateY(-50%);
}

.dashboard-task-carousel-vertical .dashboard-carousel-dots span.active {
    width: 6px;
    height: 18px;
}

.dashboard-slide.focus-empty {
    border-style: dashed;
}

.dashboard-slide.focus-suggestion::before {
    content: "GO";
    background: linear-gradient(135deg, var(--ax-cyan), var(--ax-blue));
}

.dashboard-slide.focus-habit::before {
    content: "HB";
    background: linear-gradient(135deg, var(--ax-purple), #ec4899);
}

.dashboard-slide.focus-invoice::before {
    content: "IN";
    background: linear-gradient(135deg, var(--ax-orange), var(--ax-red));
}

.round6-progress-panel {
    border-left-color: var(--ax-blue);
}

.dashboard-progress-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analytics-progress-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 150px;
    padding: 15px;
    overflow: hidden;
    border: 1px solid rgba(108, 122, 160, 0.14);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.14), transparent 6rem),
        rgba(248, 251, 255, 0.78);
}

.analytics-progress-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -28px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
}

.analytics-progress-card span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.progress-donut {
    --accent: var(--ax-blue);
    position: relative;
    z-index: 1;
    display: grid;
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--ax-card) 0 54%, transparent 55%),
        conic-gradient(var(--accent) var(--progress, 0%), rgba(108, 122, 160, 0.16) 0);
    box-shadow: inset 0 0 0 1px rgba(108, 122, 160, 0.10), 0 14px 28px rgba(23, 37, 84, 0.10);
}

.progress-donut::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(108, 122, 160, 0.10);
}

.progress-donut span {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.progress-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.analytics-progress-card strong {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
}

.analytics-progress-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.analytics-progress-card.money {
    --accent: var(--ax-green);
    border-left: 4px solid var(--ax-green);
    background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.16), transparent 6rem), rgba(248, 251, 255, 0.80);
}

.analytics-progress-card.habit {
    --accent: var(--ax-purple);
    border-left: 4px solid var(--ax-purple);
    background: radial-gradient(circle at 100% 0, rgba(139, 92, 246, 0.16), transparent 6rem), rgba(248, 251, 255, 0.80);
}

.analytics-progress-card.project {
    --accent: var(--ax-blue);
    border-left: 4px solid var(--ax-blue);
    background: radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.16), transparent 6rem), rgba(248, 251, 255, 0.80);
}

.analytics-progress-card.todo {
    --accent: var(--ax-orange);
    border-left: 4px solid var(--ax-orange);
    background: radial-gradient(circle at 100% 0, rgba(245, 158, 11, 0.16), transparent 6rem), rgba(248, 251, 255, 0.80);
}

:root[data-theme="dark"] .analytics-progress-card {
    background:
        radial-gradient(circle at 100% 0, rgba(96, 165, 250, 0.16), transparent 6rem),
        rgba(13, 19, 37, 0.72);
    border-color: rgba(139, 162, 255, 0.14);
}

:root[data-theme="dark"] .progress-donut {
    background:
        radial-gradient(circle at center, rgba(20, 27, 49, 0.98) 0 54%, transparent 55%),
        conic-gradient(var(--accent) var(--progress, 0%), rgba(139, 162, 255, 0.15) 0);
    box-shadow: inset 0 0 0 1px rgba(139, 162, 255, 0.11), 0 14px 28px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .analytics-progress-card.money {
    background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.17), transparent 6rem), rgba(13, 19, 37, 0.72);
}

:root[data-theme="dark"] .analytics-progress-card.habit {
    background: radial-gradient(circle at 100% 0, rgba(139, 92, 246, 0.17), transparent 6rem), rgba(13, 19, 37, 0.72);
}

:root[data-theme="dark"] .analytics-progress-card.project {
    background: radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.17), transparent 6rem), rgba(13, 19, 37, 0.72);
}

:root[data-theme="dark"] .analytics-progress-card.todo {
    background: radial-gradient(circle at 100% 0, rgba(245, 158, 11, 0.17), transparent 6rem), rgba(13, 19, 37, 0.72);
}

@media (min-width: 1040px) {
    .round6-weekly {
        min-height: 390px;
    }

    .round6-weekly .dashboard-chart-bars {
        min-height: 220px;
    }

    .round6-today {
        min-height: 390px;
    }
}

@media (max-width: 1039px) {
    .round6-weekly .dashboard-chart-bars {
        min-height: 160px;
    }

    .dashboard-task-carousel-vertical {
        height: 254px;
        overflow: hidden;
        scroll-snap-type: none;
    }

    .dashboard-task-carousel-vertical .dashboard-carousel-track {
        gap: 12px;
        transform: var(--carousel-transform, translateY(0)) !important;
    }

    .dashboard-task-carousel-vertical .dashboard-slide {
        min-width: 100%;
        flex-basis: 114px;
        min-height: 114px;
        scroll-snap-align: none;
    }

    .dashboard-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .round6-weekly .dashboard-chart-bars {
        min-height: 138px;
    }

    .dashboard-task-carousel-vertical {
        height: 250px;
    }

    .dashboard-task-carousel-vertical .dashboard-slide {
        padding-right: 28px;
    }

    .dashboard-progress-grid {
        grid-template-columns: 1fr;
    }

    .analytics-progress-card {
        min-height: 124px;
        padding: 13px;
    }

    .progress-donut {
        width: 78px;
        height: 78px;
        flex-basis: 78px;
    }

    .progress-donut span {
        font-size: 0.9rem;
    }

    .analytics-progress-card p {
        font-size: 0.74rem;
    }
}

/* Dashboard demo polish */
.dashboard-demo-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
    gap: 18px;
    align-items: stretch;
    padding: 24px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.76)),
        var(--surface);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.dashboard-demo-hero h2 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    line-height: 1.05;
    font-weight: 950;
}

.dashboard-demo-hero p:not(.eyebrow) {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.demo-hero-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.demo-hero-summary div {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
}

.demo-hero-summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.demo-hero-summary strong {
    color: var(--heading);
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    line-height: 1.1;
}

.round6-dashboard .dashboard-priority-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.round6-dashboard .dashboard-priority-kpis .kpi-card {
    min-height: 128px;
    padding: 18px;
    border-radius: 18px;
}

.round6-dashboard .dashboard-priority-kpis .kpi-card strong {
    margin-top: 6px;
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
}

.dashboard-business-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-business-grid .dashboard-main-panel {
    min-height: 176px;
    padding: 18px;
    border-radius: 18px;
}

.dashboard-business-grid .panel-header {
    margin-bottom: 14px;
}

.dashboard-business-grid .panel-header a {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 900;
}

.dashboard-business-grid .mini-metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-business-grid .mini-metric-list div,
.dashboard-demo-hero .demo-hero-summary div {
    box-shadow: none;
}

.dashboard-business-grid .mini-metric-list div {
    min-height: 76px;
    align-content: center;
    padding: 12px;
    border-radius: 14px;
}

.dashboard-business-grid .mini-metric-list strong {
    overflow-wrap: anywhere;
    font-size: clamp(1.05rem, 1.35vw, 1.32rem);
    line-height: 1.15;
}

.dashboard-business-grid .customer-panel {
    grid-column: span 2;
}

:root[data-theme="dark"] .dashboard-demo-hero {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme="dark"] .demo-hero-summary div {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.15);
}

@media (max-width: 1180px) {
    .dashboard-demo-hero {
        grid-template-columns: 1fr;
    }

    .round6-dashboard .dashboard-priority-kpis,
    .dashboard-business-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-business-grid .customer-panel {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .dashboard-demo-hero {
        padding: 18px;
        border-radius: 18px;
    }

    .demo-hero-summary,
    .round6-dashboard .dashboard-priority-kpis,
    .dashboard-business-grid,
    .dashboard-business-grid .mini-metric-list {
        grid-template-columns: 1fr;
    }

    .round6-dashboard .dashboard-priority-kpis .kpi-card,
    .dashboard-business-grid .dashboard-main-panel {
        min-height: auto;
    }
}

/* Products / Stock demo polish */
[data-module="products"] .module-hero p {
    max-width: 680px;
}

[data-module="products"] .module-hero {
    order: 1;
}

[data-module="products"] .compact-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    order: 2;
    margin-bottom: 0;
}

[data-module="products"] .compact-summary .kpi-card {
    min-height: 116px;
    border-radius: 18px;
}

.product-filter-bar {
    grid-template-columns: 1.5fr 1fr minmax(180px, 0.65fr);
    gap: 12px;
    order: 4;
    padding: 14px;
    border-radius: 18px;
}

.product-form-panel {
    order: 3;
    border-radius: 18px;
}

.product-form-panel .panel-header {
    margin-bottom: 4px;
}

.product-form-panel .panel-header h3 {
    margin: 0;
    color: var(--heading);
    font-size: 1.1rem;
}

.product-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    order: 5;
}

.product-card {
    position: relative;
    gap: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 4px solid rgba(37, 99, 235, 0.58);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.92));
}

.product-card.low-stock-product {
    border-left-color: var(--danger);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.72));
}

.product-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.product-card-head > div {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.product-card-head strong {
    color: var(--heading);
    font-size: 1.05rem;
    line-height: 1.25;
}

.product-card-head small,
.product-sku {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.product-sku {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-status.status-low-stock {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.24);
    background: var(--danger-soft);
}

.product-status.status-inactive {
    color: var(--muted);
    border-color: rgba(100, 116, 139, 0.24);
    background: rgba(100, 116, 139, 0.10);
}

.product-card p {
    min-height: 2.7em;
}

.product-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.product-field-grid div {
    display: grid;
    gap: 4px;
    min-height: 72px;
    align-content: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
}

.product-field-grid span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-field-grid strong {
    overflow-wrap: anywhere;
    color: var(--heading);
    font-size: 1rem;
    line-height: 1.15;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-actions .small-action {
    min-height: 36px;
    border-radius: 10px;
}

:root[data-theme="dark"] .product-card {
    background:
        linear-gradient(180deg, rgba(20, 27, 49, 0.98), rgba(13, 19, 37, 0.96));
    border-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme="dark"] .product-card.low-stock-product {
    background:
        linear-gradient(180deg, rgba(34, 20, 28, 0.98), rgba(13, 19, 37, 0.96));
}

:root[data-theme="dark"] .product-field-grid div {
    background: rgba(15, 23, 42, 0.64);
    border-color: rgba(148, 163, 184, 0.14);
}

@media (max-width: 1180px) {
    [data-module="products"] .compact-summary,
    .product-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    [data-module="products"] .compact-summary,
    .product-filter-bar,
    .product-list-grid,
    .product-field-grid {
        grid-template-columns: 1fr;
    }

    .product-card-head {
        display: grid;
    }

    .product-actions .small-action {
        width: 100%;
    }
}

/* Customer demo frontend polish */
.auth-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%),
        linear-gradient(135deg, #f6f9ff 0%, #eef6f3 48%, #f8fafc 100%);
}

.auth-panel {
    width: min(460px, calc(100vw - 32px));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

.auth-brand {
    align-items: flex-start;
}

.auth-brand h1 {
    margin-bottom: 4px;
    line-height: 1.1;
}

.auth-subtitle,
.auth-demo-copy p {
    margin: 0;
    color: var(--muted);
}

.auth-demo-copy {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
}

.auth-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-highlights span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 850;
    background: rgba(20, 184, 166, 0.12);
}

.brand-name,
.topbar-title h1,
.module-hero h2,
.dashboard-demo-hero h2,
.panel-header h3 {
    letter-spacing: 0;
}

.sidebar {
    box-shadow: 14px 0 40px rgba(15, 23, 42, 0.14);
}

.nav-group {
    margin-bottom: 18px;
}

.nav-section-label {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.nav-item {
    min-height: 42px;
    border-radius: 12px;
}

.nav-item span:last-child {
    line-height: 1.2;
}

.topbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(14px);
}

.content-wrap {
    padding-top: 24px;
}

.module-page,
.round6-dashboard {
    gap: 20px;
}

.module-hero,
.dashboard-demo-hero,
.panel,
.kpi-card,
.empty-state,
.quick-add-card {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.module-hero,
.dashboard-demo-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.86)),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 36%);
}

.module-hero h2,
.dashboard-demo-hero h2 {
    color: var(--heading);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.12;
}

.module-hero p,
.dashboard-demo-hero p {
    max-width: 820px;
    line-height: 1.65;
}

.dashboard-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dashboard-quick-actions a,
.primary-action,
.secondary-action,
.small-action {
    min-height: 40px;
    border-radius: 12px;
    font-weight: 850;
}

.primary-action {
    background: linear-gradient(135deg, #2563eb, #10b981);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.secondary-action,
.small-action {
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.dashboard-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-section-head h3 {
    margin: 2px 0 0;
    color: var(--heading);
    font-size: 1.25rem;
}

.dashboard-section-head span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.dashboard-module-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.module-overview-card {
    display: grid;
    gap: 14px;
    min-height: 170px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.module-overview-card h4 {
    margin: 0 0 8px;
    color: var(--heading);
    font-size: 1rem;
    line-height: 1.25;
}

.module-overview-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.module-overview-card a {
    align-self: end;
    justify-self: start;
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
}

.kpi-card {
    min-height: 132px;
    padding: 18px;
}

.kpi-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.kpi-card strong {
    color: var(--heading);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.05;
}

.panel {
    border-radius: 18px;
}

.panel-header {
    align-items: flex-start;
    gap: 14px;
}

.panel-header a {
    font-weight: 850;
}

.filter-bar,
.module-form,
.form-grid,
.search-row {
    gap: 12px;
}

input,
select,
textarea {
    border-color: rgba(148, 163, 184, 0.34);
    border-radius: 12px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-wrap {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: auto;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

td {
    vertical-align: middle;
}

.badge,
.status-badge,
.product-status {
    border-radius: 999px;
    font-weight: 850;
}

.empty-state {
    border-style: dashed;
    color: var(--muted);
    background: rgba(248, 250, 252, 0.8);
}

[data-module="reports"] .module-hero,
[data-module="reports"] .panel {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

[data-module="reports"] .filter-bar {
    align-items: end;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
}

[data-module="reports"] [data-report-csv],
[data-module="reports"] [data-report-print] {
    color: #0f766e;
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(236, 253, 245, 0.9);
}

.print-sheet,
.invoice-print,
.receipt-print,
[data-print-area] {
    color: #111827;
    background: #fff;
}

@media print {
    .sidebar,
    .topbar,
    .bottom-nav,
    .mobile-backdrop,
    .quick-add-modal,
    .filter-bar,
    .no-print {
        display: none !important;
    }

    .app-shell,
    .main-area,
    .content-wrap {
        display: block;
        margin: 0;
        padding: 0;
        width: 100%;
        background: #fff;
    }

    .panel,
    .print-sheet,
    .invoice-print,
    .receipt-print,
    [data-print-area] {
        border: 0;
        box-shadow: none;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        border-bottom: 1px solid #e5e7eb;
        padding: 8px;
    }
}

@media (max-width: 1180px) {
    .dashboard-module-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .dashboard-module-overview,
    .dashboard-business-grid,
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .content-wrap {
        padding: 16px;
        padding-bottom: 92px;
    }

    .module-hero,
    .dashboard-demo-hero,
    .panel {
        border-radius: 16px;
    }

    .dashboard-module-overview,
    .dashboard-business-grid,
    .kpi-grid,
    .demo-hero-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-quick-actions a {
        flex: 1 1 100%;
        justify-content: center;
    }

    .panel-header {
        display: grid;
    }
}

:root[data-theme="dark"] .auth-demo-copy,
:root[data-theme="dark"] .module-overview-card,
:root[data-theme="dark"] [data-module="reports"] .filter-bar {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme="dark"] .topbar {
    background: rgba(15, 23, 42, 0.88);
}

/* Final customer demo view polish */
body {
    text-rendering: optimizeLegibility;
}

.auth-body {
    min-height: 100vh;
    padding: 24px;
}

.auth-panel {
    display: grid;
    gap: 18px;
    padding: clamp(24px, 4vw, 34px);
}

.auth-form {
    gap: 16px;
}

.auth-form label,
.module-form label,
.filter-bar label,
.form-grid label {
    color: var(--heading);
    font-size: 0.84rem;
    font-weight: 850;
}

.auth-form input {
    min-height: 46px;
}

.auth-form .primary-action {
    min-height: 48px;
    font-size: 0.96rem;
}

.sidebar-insight {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.28);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(16, 185, 129, 0.84));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.nav-item.active .nav-icon {
    color: #fff;
}

.topbar-search input {
    min-height: 40px;
    background: rgba(255, 255, 255, 0.72);
}

.topbar-actions {
    gap: 10px;
}

.dashboard-demo-hero {
    align-items: stretch;
    min-height: 220px;
    padding: clamp(22px, 4vw, 34px);
}

.dashboard-demo-hero > div:first-child {
    display: grid;
    align-content: center;
    gap: 10px;
}

.demo-hero-summary {
    align-content: stretch;
}

.demo-hero-summary div {
    display: grid;
    align-content: center;
    min-height: 84px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.demo-hero-summary span,
.mini-metric-list span {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-quick-actions {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.dashboard-quick-actions a {
    padding-inline: 16px;
}

.dashboard-priority-kpis {
    gap: 14px;
}

.dashboard-priority-kpis .kpi-card {
    border-top: 3px solid rgba(37, 99, 235, 0.5);
}

.dashboard-priority-kpis .kpi-card.green {
    border-top-color: rgba(16, 185, 129, 0.78);
}

.dashboard-priority-kpis .kpi-card.red {
    border-top-color: rgba(220, 38, 38, 0.72);
}

.dashboard-priority-kpis .kpi-card.gold {
    border-top-color: rgba(245, 158, 11, 0.78);
}

.dashboard-module-overview {
    gap: 16px;
}

.module-overview-card {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.module-overview-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.module-overview-card a,
.panel-header a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
}

.custom-addon-head {
    margin-top: 8px;
}

[data-module="coming-soon"] .module-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 34%);
}

[data-module="coming-soon"] .panel {
    border-style: solid;
}

[data-module="coming-soon"] .mini-metric-list div {
    border-left: 3px solid rgba(37, 99, 235, 0.55);
}

.module-page > .panel,
.module-page > .module-hero,
.round6-dashboard > .panel,
.dashboard-business-grid > .panel {
    width: 100%;
}

.module-hero {
    padding: clamp(20px, 3vw, 28px);
}

.panel {
    padding: clamp(16px, 2.4vw, 22px);
}

.panel-header {
    margin-bottom: 14px;
}

.panel-header h3 {
    line-height: 1.18;
}

.mini-metric-list {
    gap: 10px;
}

.mini-metric-list div {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.filter-bar,
.module-form {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.form-actions {
    gap: 10px;
}

.form-actions .primary-action,
.form-actions .secondary-action,
.form-actions .small-action {
    justify-content: center;
}

input,
select,
textarea {
    min-height: 42px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.94);
}

textarea {
    min-height: 96px;
}

.table-wrap {
    background: #fff;
}

th,
td {
    padding: 12px 14px;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(37, 99, 235, 0.035);
}

.badge,
.status-badge,
.product-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    white-space: nowrap;
}

.empty-state.wide,
.empty-state {
    padding: 24px;
    border-radius: 18px;
    font-weight: 750;
    text-align: center;
}

[data-module="reports"] .dashboard-business-grid,
[data-module="reports"] .report-grid {
    gap: 16px;
}

[data-module="reports"] .panel-header h3 {
    font-size: 1.08rem;
}

[data-module="reports"] .secondary-action {
    justify-content: center;
}

[data-module="reports"] [data-report-summary] .kpi-card {
    border-top: 3px solid rgba(16, 185, 129, 0.64);
}

.invoice-preview,
.receipt-preview,
.print-sheet,
.invoice-print,
.receipt-print,
[data-print-area] {
    border-radius: 14px;
}

@media (max-width: 1100px) {
    .topbar {
        gap: 12px;
    }

    .topbar-search {
        display: none;
    }
}

@media (max-width: 760px) {
    .auth-body {
        padding: 16px;
    }

    .auth-panel {
        width: 100%;
    }

    .auth-brand {
        display: grid;
        text-align: center;
        justify-items: center;
    }

    .auth-highlights {
        justify-content: center;
    }

    .topbar-actions .secondary-action span,
    .topbar-actions .primary-action span {
        display: none;
    }

    .dashboard-demo-hero {
        min-height: auto;
    }

    .module-overview-card {
        min-height: 0;
    }

    .filter-bar,
    .module-form,
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .form-actions > * {
        width: 100%;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.86rem;
    }
}

@media (max-width: 520px) {
    .topbar-title h1 {
        font-size: 1.05rem;
    }

    .module-hero h2,
    .dashboard-demo-hero h2 {
        font-size: 1.32rem;
    }

    .kpi-card strong {
        font-size: 1.25rem;
    }

    .bottom-nav a span:last-child {
        font-size: 0.68rem;
    }
}

:root[data-theme="dark"] .dashboard-quick-actions,
:root[data-theme="dark"] .demo-hero-summary div,
:root[data-theme="dark"] .filter-bar,
:root[data-theme="dark"] .module-form,
:root[data-theme="dark"] .table-wrap,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}

/* Premium demo finish: original modern admin styling */
:root {
    --premium-page: #f4f7fb;
    --premium-page-2: #edf5ff;
    --premium-card: rgba(255, 255, 255, 0.96);
    --premium-line: rgba(148, 163, 184, 0.20);
    --premium-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
    --premium-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.app-body {
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.15), transparent 34%),
        linear-gradient(180deg, var(--premium-page-2), var(--premium-page) 38%, #f8fafc 100%);
}

.main-area {
    background: transparent;
}

.sidebar {
    background:
        linear-gradient(180deg, #0f172a 0%, #111c33 54%, #0b1220 100%);
}

.brand {
    padding: 14px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.brand .brand-mark {
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-name {
    color: #f8fafc;
    font-size: 0.98rem;
}

.brand-meta {
    color: rgba(226, 232, 240, 0.72);
    font-weight: 800;
}

.topbar {
    margin: 16px 18px 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    box-shadow: var(--premium-shadow-soft);
}

.content-wrap {
    padding-inline: clamp(18px, 2.8vw, 34px);
}

.module-page,
.round6-dashboard {
    max-width: 1560px;
    margin-inline: auto;
}

.module-hero,
.dashboard-demo-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--premium-shadow);
}

.module-hero::after,
.dashboard-demo-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -110px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 68%);
    pointer-events: none;
}

.dashboard-demo-hero h2,
.module-hero h2 {
    max-width: 780px;
}

.dashboard-demo-hero p,
.module-hero p {
    color: #475569;
    font-size: 0.98rem;
}

.demo-hero-summary strong {
    color: #0f172a;
    font-size: 1.14rem;
}

.dashboard-quick-actions,
.panel,
.kpi-card,
.module-overview-card,
.product-card {
    background: var(--premium-card);
    border-color: var(--premium-line);
    box-shadow: var(--premium-shadow-soft);
}

.primary-action,
button.primary-action,
a.primary-action {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #06b6d4 100%);
}

.primary-action:hover,
.secondary-action:hover,
.small-action:hover {
    transform: translateY(-1px);
}

.secondary-action,
a.secondary-action,
button.secondary-action,
.small-action {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dashboard-section-head {
    padding-inline: 4px;
}

.dashboard-section-head h3 {
    font-size: 1.35rem;
}

.module-overview-card {
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.module-overview-card h4::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    vertical-align: 1px;
}

.dashboard-business-grid .dashboard-main-panel {
    min-height: 172px;
}

.mini-metric-list strong {
    color: #0f172a;
}

.filter-bar,
.module-form {
    box-shadow: var(--premium-shadow-soft);
}

input,
select,
textarea {
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

.table-wrap table {
    min-width: 760px;
}

thead th {
    background: rgba(241, 245, 249, 0.95);
}

tbody td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.76);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.badge,
.status-badge,
.product-status {
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(241, 245, 249, 0.88);
}

.alert,
.empty-state {
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--premium-shadow-soft);
}

[data-module="reports"] .panel {
    min-height: 220px;
}

[data-module="reports"] [data-report-csv],
[data-module="reports"] [data-report-print] {
    min-width: 118px;
    font-weight: 900;
}

[data-module="coming-soon"] .badge {
    color: #075985;
    border-color: rgba(14, 165, 233, 0.26);
    background: rgba(224, 242, 254, 0.92);
}

[data-module="coming-soon"] .form-actions .primary-action {
    min-width: 180px;
}

.auth-panel {
    border-radius: 28px;
}

.auth-brand .brand-mark {
    width: 54px;
    height: 54px;
}

.auth-highlights span {
    color: #1e40af;
    background: rgba(219, 234, 254, 0.82);
}

@media (max-width: 900px) {
    .topbar {
        margin: 10px 10px 0;
        border-radius: 18px;
    }

    .content-wrap {
        padding-inline: 14px;
    }

    .dashboard-demo-hero,
    .module-hero {
        padding: 20px;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: center;
    }

    .topbar-title .eyebrow,
    .topbar-title span {
        display: none;
    }

    .dashboard-quick-actions {
        padding: 10px;
    }

    .kpi-card,
    .module-overview-card,
    .panel {
        padding: 16px;
    }

    .table-wrap {
        margin-inline: -2px;
    }
}

:root[data-theme="dark"] .app-body {
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 34%),
        linear-gradient(180deg, #0f172a, #111827 100%);
}

:root[data-theme="dark"] .dashboard-demo-hero p,
:root[data-theme="dark"] .module-hero p {
    color: #cbd5e1;
}

:root[data-theme="dark"] .demo-hero-summary strong,
:root[data-theme="dark"] .mini-metric-list strong {
    color: #f8fafc;
}
