:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #eef6f5;
    --ink: #17211d;
    --muted: #66736d;
    --line: #dfe6ea;
    --brand: #0f766e;
    --brand-strong: #0b5e58;
    --accent: #b7791f;
    --danger: #b42318;
    --info: #2563eb;
    --success: #16a34a;
    --warning: #d97706;
    --violet: #7c3aed;
    --rose: #db2777;
    --cyan: #0891b2;
    --lime: #65a30d;
    --sidebar: #12322d;
    --sidebar-soft: #1b443d;
    --shadow: 0 18px 45px rgba(23, 33, 29, 0.09);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --ring: rgba(37, 99, 235, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 28%),
        linear-gradient(315deg, rgba(37, 99, 235, 0.08), transparent 26%),
        var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

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

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

.auth-page,
.landing-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.landing-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: stretch;
}

.landing-hero,
.login-card,
.panel,
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.landing-hero {
    padding: 44px;
}

.login-card {
    width: min(420px, 100%);
    padding: 30px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: white;
    font-weight: 800;
}

.landing-title {
    margin: 32px 0 14px;
    max-width: 760px;
    font-size: 44px;
    line-height: 1.08;
}

.landing-copy {
    max-width: 740px;
    color: var(--muted);
    font-size: 17px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.feature-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcf9;
}

.feature-item strong {
    display: block;
    margin-bottom: 4px;
}

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

.landing-side {
    padding: 28px;
    background: var(--sidebar);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.landing-side h2 {
    margin-top: 0;
}

.demo-box {
    margin-top: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    background: linear-gradient(160deg, #061824 0%, #0f3f3a 30%, #172554 67%, #3b1d52 100%);
    background-size: 180% 180%;
    color: #e8f4ef;
    padding: 22px 16px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.2);
    animation: sidebarShift 18s ease-in-out infinite;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(20, 184, 166, 0.12), transparent 42%, rgba(236, 72, 153, 0.1));
}

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

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 999px;
}

.sidebar .brand-mark {
    color: white;
    display: flex;
    width: 100%;
    padding: 0 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .brand-icon {
    background: linear-gradient(135deg, #14b8a6, #38bdf8 45%, #a855f7);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 18px;
}

.brand-text small {
    color: #b7d5cf;
    font-size: 11px;
    font-weight: 700;
}

.nav-section {
    margin-top: 16px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c7d9d5;
    font-size: 11px;
    font-weight: 700;
    margin: 0 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.nav-label svg {
    width: 14px;
    height: 14px;
    color: var(--section-accent);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 8px;
    color: #e1eee9;
    border: 1px solid transparent;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: -11px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--section-accent);
    opacity: 0;
    transform: scaleY(0.45);
    transition: opacity 160ms ease, transform 160ms ease;
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: color-mix(in srgb, var(--section-accent) 20%, transparent);
    color: color-mix(in srgb, var(--section-accent) 86%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--section-accent) 20%, transparent);
}

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

.nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--section-accent) 24%, transparent), rgba(255, 255, 255, 0.08));
    border-color: color-mix(in srgb, var(--section-accent) 34%, transparent);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.nav-link:hover .nav-arrow,
.nav-link.active .nav-arrow {
    opacity: 0.8;
    transform: translateX(0);
}

.nav-link.active .nav-icon {
    background: var(--section-accent);
    color: white;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--section-accent) 32%, transparent);
}

.main {
    min-width: 0;
}

.topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.topbar-title {
    font-weight: 800;
    font-size: 18px;
}

.topbar-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.content {
    padding: 28px;
}

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

.page-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.page-kicker {
    margin-top: 5px;
    color: var(--muted);
}

.panel {
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.panel:hover {
    border-color: rgba(15, 118, 110, 0.22);
    box-shadow: var(--shadow-soft);
}

.panel-title {
    margin: 0 0 14px;
    font-size: 18px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-heading .panel-title {
    margin: 0;
}

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

.stat-grid-wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(23, 33, 29, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stat-card:hover,
.report-link-card:hover,
.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.stat-teal { border-top-color: var(--brand); }
.stat-blue { border-top-color: var(--info); }
.stat-violet { border-top-color: var(--violet); }
.stat-green { border-top-color: var(--success); }
.stat-amber { border-top-color: var(--warning); }
.stat-rose { border-top-color: var(--rose); }
.stat-red { border-top-color: var(--danger); }
.stat-indigo { border-top-color: #4f46e5; }
.stat-cyan { border-top-color: var(--cyan); }
.stat-lime { border-top-color: var(--lime); }

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

.stat-value {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 800;
}

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

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

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

.chart-panel-large {
    grid-column: span 2;
}

.chart-box {
    position: relative;
    min-height: 280px;
}

.report-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 118px;
    margin-bottom: 0;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.report-link-card strong {
    font-size: 16px;
}

.report-link-card span {
    color: var(--muted);
}

.ai-option,
.ai-tool {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.ai-option input {
    width: auto;
    min-height: auto;
    margin-top: 4px;
}

.ai-option small,
.ai-tool small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

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

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

.ai-workflow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.ai-workflow small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.ai-tool {
    opacity: 0.55;
}

.ai-tool.active {
    opacity: 1;
    border-color: rgba(37, 99, 235, 0.25);
    background: #f7fbff;
}

.ai-answer {
    white-space: pre-wrap;
    padding: 16px;
    border: 1px solid #cfe2ff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f7fbff, #f9fffb);
    color: #1f2a37;
}

.ai-feedback-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

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

.field-full {
    grid-column: 1 / -1;
}

.muted-text {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.checkbox-line input {
    width: 16px;
    height: 16px;
}

.field label {
    display: block;
    color: #33413b;
    font-weight: 700;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    padding: 10px 12px;
    min-height: 42px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--info);
    box-shadow: 0 0 0 4px var(--ring);
    outline: none;
}

.field textarea {
    min-height: 96px;
}

.field small,
.help {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    font-size: 12px;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-strong);
}

.btn-danger {
    color: white;
    background: var(--danger);
    border-color: var(--danger);
}

.btn-warning {
    color: #4a2d05;
    background: #fff7e6;
    border-color: #f5c66a;
}

.btn-xs {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

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

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: #405049;
    background: #f3f6f1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

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

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #f8fbff;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: #27524b;
    font-weight: 700;
    font-size: 12px;
    transition: transform 140ms ease;
}

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

.badge-danger {
    background: #fde8e5;
    color: var(--danger);
}

.badge-info {
    background: #e8f0ff;
    color: var(--info);
}

.badge-success {
    background: #e8f8ed;
    color: var(--success);
}

.badge-warning {
    background: #fff7e6;
    color: var(--warning);
}

.badge-muted {
    background: #f0f2f4;
    color: var(--muted);
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: white;
}

.alert-success {
    border-color: #b7dfd4;
    background: #effaf6;
}

.alert-danger {
    border-color: #f0c4bf;
    background: #fff3f1;
}

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

.pagination {
    margin-top: 16px;
}

.pagination nav {
    display: flex;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 6px 10px;
}

.muted {
    color: var(--muted);
}

.text-right {
    text-align: right;
}

.logout-form {
    margin: 0;
}

@keyframes sidebarShift {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .app-shell,
    .landing-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .stat-grid,
    .stat-grid-wide,
    .chart-grid,
    .workflow-grid,
    .grid-3,
    .grid-2,
    .form-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .chart-panel-large {
        grid-column: auto;
    }

    .topbar,
    .content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page-header {
        flex-direction: column;
    }

    .landing-title {
        font-size: 32px;
    }
}

/* Mockup-inspired product UI refresh */
:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --ink: #102033;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0f9f8f;
    --brand-strong: #0f766e;
    --info: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --violet: #8b5cf6;
    --rose: #ec4899;
    --cyan: #06b6d4;
    --lime: #84cc16;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.09);
    --shadow-soft: 0 14px 32px rgba(15, 23, 42, 0.08);
    --ring: rgba(37, 99, 235, 0.2);
}

body {
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0) 34%),
        linear-gradient(315deg, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0) 30%),
        #f3f6fb;
    color: var(--ink);
}

.app-shell {
    grid-template-columns: 304px minmax(0, 1fr);
}

.sidebar {
    padding: 20px 14px;
    background: linear-gradient(160deg, #08111f 0%, #102a43 28%, #0d5b68 58%, #38245e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .brand-mark {
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 6px 8px 20px;
}

.sidebar .brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #14b8a6, #2563eb 52%, #ec4899);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.36);
}

.brand-text strong {
    font-size: 16px;
    line-height: 1.12;
    white-space: normal;
}

.nav-section {
    margin-top: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.nav-link {
    min-height: 40px;
    padding: 6px 8px;
}

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

.sidebar-plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 2px 4px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(37, 99, 235, 0.12));
    color: #ffffff;
}

.sidebar-plan-card strong,
.sidebar-plan-label {
    display: block;
}

.sidebar-plan-label {
    color: #b7d5cf;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.topbar {
    height: 74px;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

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

.topbar-title {
    font-size: 19px;
}

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

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 12px;
}

.topbar-chip svg {
    width: 16px;
    height: 16px;
}

.topbar-chip-ai {
    border-color: #ccfbf1;
    background: #ecfdf5;
    color: #047857;
}

.btn-ghost {
    background: #f8fafc;
}

.content {
    padding: 30px;
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    gap: 22px;
    margin-bottom: 20px;
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(22, 78, 99, 0.9) 54%, rgba(67, 56, 202, 0.88)),
        #0f172a;
    color: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 5px;
    background: linear-gradient(90deg, #14b8a6, #2563eb, #f59e0b, #ec4899);
}

.dashboard-hero-copy,
.hero-metric-grid {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #c7f9ef;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.eyebrow svg {
    width: 15px;
    height: 15px;
}

.dashboard-hero h1 {
    margin: 18px 0 10px;
    font-size: 36px;
    line-height: 1.12;
}

.dashboard-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 15px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.dashboard-hero .btn {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.dashboard-hero .btn-primary {
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    border-color: transparent;
}

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

.hero-metric {
    min-height: 124px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-metric span,
.hero-metric small {
    display: block;
    color: #cbd5e1;
    font-weight: 700;
}

.hero-metric strong {
    display: block;
    margin: 10px 0 5px;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.hero-metric-blue { background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(255, 255, 255, 0.08)); }
.hero-metric-green { background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(255, 255, 255, 0.08)); }
.hero-metric-amber { background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(255, 255, 255, 0.08)); }
.hero-metric-violet { background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.08)); }

.stat-grid-dashboard {
    margin-bottom: 20px;
}

.stat-card-rich {
    position: relative;
    min-height: 148px;
    padding: 16px;
    border-top-width: 0;
    border-color: rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    overflow: hidden;
}

.stat-card-rich::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--stat-color, var(--brand));
}

.stat-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-card-rich .stat-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: color-mix(in srgb, var(--stat-color, var(--brand)) 14%, white);
    color: var(--stat-color, var(--brand));
}

.stat-icon svg {
    width: 19px;
    height: 19px;
}

.stat-card-rich .stat-label {
    color: #64748b;
    font-weight: 800;
}

.stat-card-rich .stat-value {
    margin-top: 14px;
    color: #0f172a;
    font-size: clamp(20px, 1.6vw, 27px);
    overflow-wrap: anywhere;
}

.stat-foot {
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.stat-teal { --stat-color: var(--brand); }
.stat-blue { --stat-color: var(--info); }
.stat-violet { --stat-color: var(--violet); }
.stat-green { --stat-color: var(--success); }
.stat-amber { --stat-color: var(--warning); }
.stat-rose { --stat-color: var(--rose); }
.stat-red { --stat-color: var(--danger); }
.stat-indigo { --stat-color: #6366f1; }
.stat-cyan { --stat-color: var(--cyan); }
.stat-lime { --stat-color: var(--lime); }

.insight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.insight-card {
    min-height: 192px;
    padding: 17px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.insight-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.insight-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #ffffff;
}

.insight-icon svg {
    width: 21px;
    height: 21px;
}

.insight-card h2 {
    margin: 0;
    font-size: 17px;
}

.insight-card p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.insight-ai .insight-icon { background: linear-gradient(135deg, #2563eb, #8b5cf6); }
.insight-storage .insight-icon { background: linear-gradient(135deg, #0f9f8f, #10b981); }
.insight-verify .insight-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.insight-actions .insight-icon { background: linear-gradient(135deg, #ec4899, #8b5cf6); }

.insight-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.insight-row strong {
    color: #0f172a;
    text-align: right;
}

.progress-track {
    height: 9px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.progress-track span {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #2563eb, #8b5cf6);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.quick-action-grid a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    font-size: 12px;
}

.dashboard-chart-grid,
.dashboard-table-grid {
    margin-top: 20px;
}

.panel {
    border-color: rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.96);
}

.chart-panel,
.data-panel {
    box-shadow: var(--shadow-soft);
}

.chart-panel-featured {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.panel-subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.chart-box {
    min-height: 300px;
}

.table-wrap {
    border-color: #e2e8f0;
    box-shadow: none;
}

th {
    background: #f8fafc;
    color: #475569;
}

td a {
    color: #1d4ed8;
    font-weight: 800;
}

.badge {
    border: 1px solid transparent;
}

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

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .topbar,
    .topbar-actions,
    .dashboard-hero,
    .insight-grid,
    .hero-metric-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        height: auto;
        align-items: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .dashboard-hero h1 {
        font-size: 30px;
    }
}
.action-center-panel {
    margin-top: 20px;
}

.action-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.action-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.action-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.action-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ffffff;
    background: #2563eb;
}

.action-copy {
    min-width: 0;
}

.action-copy strong,
.action-copy small {
    display: block;
}

.action-copy strong {
    font-size: 14px;
    color: #16251f;
}

.action-copy small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.action-item b {
    color: #0f172a;
    font-size: 14px;
}

.action-red .action-icon { background: #dc2626; }
.action-rose .action-icon { background: #e11d48; }
.action-amber .action-icon { background: #f59e0b; }
.action-blue .action-icon { background: #2563eb; }
.action-cyan .action-icon { background: #0891b2; }
.action-teal .action-icon { background: #0f766e; }
.action-violet .action-icon { background: #7c3aed; }

.health-panel {
    margin-top: 20px;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.health-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    min-height: 158px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.health-card:hover {
    transform: translateY(-2px);
    border-color: var(--health-color);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.health-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--health-color), #0f172a);
}

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

.health-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.health-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.health-top strong {
    font-size: 14px;
}

.health-top b {
    color: var(--health-color);
    font-size: 18px;
}

.health-copy small,
.health-copy em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.4;
}

.health-status {
    width: max-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--health-color);
    font-size: 11px;
    font-weight: 900;
}

.health-card .progress-track {
    margin-top: auto;
}

.health-red { --health-color: #ef4444; }
.health-blue { --health-color: #2563eb; }
.health-amber { --health-color: #f59e0b; }
.health-teal { --health-color: #0f9f8f; }
.health-violet { --health-color: #8b5cf6; }