:root {
    --ink: #101828;
    --muted: #667085;
    --line: #d9e2ec;
    --paper: #ffffff;
    --soft: #f5f8fb;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --dashboard-bg: #f7fafc;
    --auth-bg: linear-gradient(120deg, rgba(21, 94, 239, 0.08), transparent 38%),
        linear-gradient(260deg, rgba(14, 147, 132, 0.13), transparent 36%),
        #fbfdff;
    --hero-bg: linear-gradient(115deg, rgba(21, 94, 239, 0.09), transparent 42%),
        linear-gradient(250deg, rgba(14, 147, 132, 0.13), transparent 34%),
        #fbfdff;
    --blue: #155eef;
    --blue-dark: #0f3fbd;
    --teal: #0e9384;
    --amber: #f79009;
    --rose: #e31b54;
    --shadow: 0 24px 70px rgba(16, 24, 40, 0.13);
}

:root[data-theme="dark"] {
    --ink: #eef4ff;
    --muted: #aab8cf;
    --line: #26364d;
    --paper: #09111f;
    --soft: #111c2e;
    --surface: #101a2b;
    --surface-strong: #152238;
    --header-bg: rgba(9, 17, 31, 0.9);
    --dashboard-bg: #0b1424;
    --auth-bg: linear-gradient(120deg, rgba(21, 94, 239, 0.18), transparent 38%),
        linear-gradient(260deg, rgba(14, 147, 132, 0.16), transparent 36%),
        #09111f;
    --hero-bg: linear-gradient(115deg, rgba(21, 94, 239, 0.2), transparent 42%),
        linear-gradient(250deg, rgba(14, 147, 132, 0.18), transparent 34%),
        #09111f;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    color-scheme: light;
}

/* Analytics dashboard redesign */
.analytics-body {
    min-height: 100vh;
    padding: 44px 54px;
    background:
        linear-gradient(90deg, #4f7df4 0 16%, transparent 16%),
        linear-gradient(180deg, #fbfbfb, #f4f6fb);
}

:root[data-theme="dark"] .analytics-body {
    background:
        linear-gradient(90deg, #2547a8 0 16%, transparent 16%),
        linear-gradient(180deg, #07101d, #0d1728);
}

.analytics-shell {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: calc(100vh - 88px);
    overflow: hidden;
    border-radius: 8px;
    background: #edece9;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    animation: float-in 620ms ease both;
}

:root[data-theme="dark"] .analytics-shell {
    background: #101826;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.analytics-rail {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    justify-items: center;
    gap: 26px;
    padding: 42px 18px 28px;
    background: #0c1020;
}

.rail-logo {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    background: #0c1020;
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rail-logo:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: #11172c;
    transform: scale(1.04);
}

.rail-logo img,
.brand-mark img,
.public-portfolio-brand span img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rail-nav,
.rail-footer {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.rail-nav {
    align-self: center;
}

.rail-link {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.rail-link:hover,
.rail-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(4px);
}

.rail-link.active::after {
    content: "";
    position: absolute;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ffffff;
}

.rail-link svg {
    width: 21px;
    height: 21px;
}

.rail-footer form {
    margin: 0;
}

.rail-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    color: #0c1020;
    background: linear-gradient(145deg, #ffd2cc, #ffffff);
    font-weight: 900;
}

.rail-logout {
    color: #ffb4ab;
}

.analytics-workspace {
    min-width: 0;
    padding: 44px;
}

.analytics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 34px;
}

.analytics-header h1 {
    margin: 0;
    color: #0d1020;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1;
}

:root[data-theme="dark"] .analytics-header h1 {
    color: var(--ink);
}

.analytics-header .eyebrow {
    margin-bottom: 10px;
}

.analytics-header-tools {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
}

.account-pill,
.analytics-search {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    color: #0d1020;
    background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="dark"] .account-pill,
:root[data-theme="dark"] .analytics-search {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
}

.account-pill {
    max-width: 320px;
    padding: 0 22px;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-pill svg,
.analytics-search svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.analytics-search {
    padding: 0 18px;
}

.analytics-search input {
    width: 160px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    outline: none;
}

.analytics-content {
    display: grid;
    gap: 28px;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.analytics-content.dashboard-content-swapping {
    opacity: 0.42;
    transform: translateY(6px);
    pointer-events: none;
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(270px, 1fr) minmax(270px, 1fr) minmax(280px, 0.95fr);
    gap: 36px;
    align-items: start;
}

.analytics-card,
.mini-stat-card,
.activity-panel {
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.07);
    animation: dashboard-card-in 560ms ease both;
}

:root[data-theme="dark"] .analytics-card,
:root[data-theme="dark"] .mini-stat-card,
:root[data-theme="dark"] .activity-panel {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.22);
}

.analytics-card {
    padding: 28px;
}

.analytics-card:nth-child(2) {
    animation-delay: 80ms;
}

.analytics-side {
    display: grid;
    gap: 36px;
}

.analytics-side > *:nth-child(2) {
    animation-delay: 120ms;
}

.analytics-side > *:nth-child(3) {
    animation-delay: 180ms;
}

.card-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    font-weight: 800;
}

.card-menu svg {
    width: 22px;
    height: 22px;
}

.gradient-card {
    min-height: 312px;
    color: #ffffff;
    background: linear-gradient(135deg, #fb705d 0%, #ef4fa1 100%);
}

.gradient-card > strong {
    display: block;
    margin-bottom: 24px;
    font-size: clamp(2.5rem, 5vw, 3.7rem);
    line-height: 1;
}

.wave-chart {
    display: block;
    width: 100%;
    height: 86px;
    margin-bottom: 24px;
}

.wave-chart path {
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    animation: draw-wave 1.8s ease forwards;
}

.wave-chart path:nth-child(1) {
    stroke: #ffffff;
}

.wave-chart path:nth-child(2) {
    stroke: #1463ff;
    animation-delay: 120ms;
}

.wave-chart path:nth-child(3) {
    stroke: #fdf4a6;
    animation-delay: 240ms;
}

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

.gradient-stats span {
    display: grid;
    gap: 6px;
    border-right: 2px dotted rgba(255, 255, 255, 0.54);
}

.gradient-stats span:last-child {
    border-right: 0;
}

.gradient-stats b {
    font-size: 1.4rem;
}

.donut-card {
    min-height: 312px;
}

.donut-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) 170px;
    gap: 18px;
    align-items: center;
}

.donut-layout strong {
    display: block;
    margin-bottom: 48px;
    color: #0d1020;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
}

:root[data-theme="dark"] .donut-layout strong {
    color: var(--ink);
}

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

.legend-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.legend-list i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fb705d;
}

.legend-list span:nth-child(2) i {
    background: #ffc633;
}

.donut-chart {
    position: relative;
    display: grid;
    width: 170px;
    height: 170px;
    place-items: center;
    border-radius: 999px;
    background:
        conic-gradient(#101526 0 24%, transparent 24% 32%, #fb705d 32% 59%, transparent 59% 66%, #ef4fa1 66% 86%, transparent 86% 91%, #ffc633 91% 100%);
    animation: spin-in 900ms cubic-bezier(.2, .8, .2, 1) both;
}

.donut-chart::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 999px;
    background: #edece9;
}

:root[data-theme="dark"] .donut-chart::before {
    background: #101826;
}

.donut-chart span {
    z-index: 1;
    width: 78px;
    height: 78px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f96b55, #ab382a);
    box-shadow: inset 0 8px 18px rgba(255, 255, 255, 0.25);
    transform: rotate(28deg);
}

.mini-stat-card {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    min-height: 112px;
    padding: 14px;
}

.mini-icon {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 8px;
    color: #0d1020;
    background: #ffd0cc;
}

.mini-icon svg {
    width: 24px;
    height: 24px;
}

.mini-stat-card strong {
    display: block;
    color: #0d1020;
    font-size: 1.8rem;
}

:root[data-theme="dark"] .mini-stat-card strong {
    color: var(--ink);
}

.mini-stat-card span:not(.mini-icon) {
    color: var(--muted);
    font-weight: 700;
}

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

:root[data-theme="dark"] .progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef4fa1, #fb705d);
    animation: grow-width 900ms ease both;
}

.progress-track.dark i {
    background: #112334;
}

:root[data-theme="dark"] .progress-track.dark i {
    background: #d6e6f6;
}

.post-card {
    min-height: 402px;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 22px;
    align-items: end;
    height: 190px;
    padding: 20px 8px 6px;
}

.bar-chart span {
    display: block;
    width: 18px;
    min-height: 30px;
    justify-self: center;
    border-radius: 999px;
    background: #d0cdc6;
    animation: bar-rise 760ms ease both;
}

.bar-chart span:nth-child(2) {
    animation-delay: 80ms;
}

.bar-chart span:nth-child(3) {
    animation-delay: 160ms;
}

.bar-chart span:nth-child(4) {
    animation-delay: 240ms;
}

.bar-chart span:nth-child(5) {
    animation-delay: 320ms;
}

.bar-chart span:nth-child(6) {
    animation-delay: 400ms;
}

.bar-chart span:nth-child(7) {
    animation-delay: 480ms;
}

.bar-chart .hot {
    background: linear-gradient(180deg, #fb705d, #ef4fa1);
}

.completed-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .completed-row {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.completed-row .mini-icon {
    width: 44px;
    height: 44px;
}

.completed-row strong,
.completed-row span {
    display: block;
}

.completed-row span {
    color: var(--muted);
}

.completed-row b {
    font-size: 1.7rem;
}

.activity-panel {
    padding: 0 0 18px;
}

.activity-tabs {
    display: flex;
    gap: 26px;
    padding: 0 4px 22px;
}

.activity-tabs button {
    position: relative;
    border: 0;
    color: #9aa0a6;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.activity-tabs button.active {
    color: #0d1020;
}

:root[data-theme="dark"] .activity-tabs button.active {
    color: var(--ink);
}

.activity-tabs button.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -16px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: #0d1020;
}

:root[data-theme="dark"] .activity-tabs button.active::after {
    background: var(--ink);
}

.activity-list {
    display: grid;
    gap: 14px;
}

.activity-list article {
    display: grid;
    grid-template-columns: 50px minmax(180px, 1fr) minmax(80px, 0.35fr) 64px 26px;
    gap: 16px;
    align-items: center;
    min-height: 64px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
    animation: fade-rise 460ms ease both;
}

:root[data-theme="dark"] .activity-list article {
    background: rgba(255, 255, 255, 0.07);
}

.activity-list article:nth-child(2) {
    animation-delay: 70ms;
}

.activity-list article:nth-child(3) {
    animation-delay: 140ms;
}

.activity-list article:nth-child(4) {
    animation-delay: 210ms;
}

.activity-thumb {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
}

.activity-thumb svg {
    width: 18px;
    height: 18px;
}

.activity-thumb.coral {
    background: #fb705d;
}

.activity-thumb.yellow {
    background: #f4b83d;
}

.activity-thumb.blue {
    background: #4f7df4;
}

.activity-thumb.pink {
    background: #ef4fa1;
}

.activity-list strong,
.activity-list span {
    display: block;
}

.activity-list span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.88rem;
}

.activity-list b {
    font-size: 0.9rem;
}

.activity-list > article > svg {
    color: #0d1020;
}

:root[data-theme="dark"] .activity-list > article > svg {
    color: var(--ink);
}

.trend {
    justify-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.trend.up {
    color: #087443;
    background: #dff8e8;
}

.trend.down {
    color: #b42318;
    background: #fee4e2;
}

.analytics-admin {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.62);
}

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

.section-control-grid .analytics-card {
    min-height: 280px;
}

.simple-section-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.simple-section-card h2 {
    margin: 0;
    font-size: 1.35rem;
}

.simple-section-card p {
    color: var(--muted);
    line-height: 1.6;
}

.simple-section-card .btn {
    justify-self: start;
    margin-top: auto;
}

.email-setup-grid.section-control-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    margin-top: 0;
}

.email-setup-grid .email-config-card {
    grid-column: 1 / -1;
}

@keyframes dashboard-card-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes draw-wave {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes spin-in {
    from {
        opacity: 0;
        transform: rotate(-36deg) scale(0.88);
    }

    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes grow-width {
    from {
        width: 0;
    }
}

@keyframes bar-rise {
    from {
        transform: scaleY(0.18);
        transform-origin: bottom;
    }

    to {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

@media (max-width: 1180px) {
    .analytics-body {
        padding: 22px;
    }

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

    .analytics-workspace {
        padding: 30px;
    }

    .analytics-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-header-tools {
        width: 100%;
        flex-wrap: wrap;
    }

    .analytics-grid,
    .section-control-grid,
    .email-setup-grid.section-control-grid {
        grid-template-columns: 1fr;
    }

    .email-setup-grid .email-config-card {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .analytics-body {
        padding: 0;
        background: #edece9;
    }

    :root[data-theme="dark"] .analytics-body {
        background: #101826;
    }

    .analytics-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border-radius: 0;
    }

    .analytics-rail {
        position: sticky;
        top: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow-x: auto;
        padding: 12px 14px;
    }

    .rail-nav,
    .rail-footer {
        display: flex;
        gap: 10px;
    }

    .rail-logo,
    .rail-link,
    .rail-avatar {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
    }

    .rail-link.active::after {
        right: 4px;
    }

    .analytics-workspace {
        padding: 24px 16px 36px;
    }

    .analytics-header h1 {
        font-size: 2.6rem;
    }

    .analytics-header-tools,
    .analytics-header-tools .btn,
    .analytics-header-tools .theme-toggle,
    .account-pill,
    .analytics-search {
        width: 100%;
    }

    .analytics-search input {
        width: 100%;
    }

    .analytics-grid,
    .analytics-side,
    .section-control-grid {
        gap: 16px;
    }

    .donut-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .donut-layout strong {
        margin-bottom: 24px;
    }

    .mini-stat-card {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .activity-list article {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .activity-list article b,
    .activity-list article .trend {
        display: none;
    }
}

/* Keep dashboard typography and Lucide controls visually stable at every viewport. */
.analytics-shell {
    font-size: 15px;
}

.analytics-header h1 {
    font-size: 2.75rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.analytics-header .eyebrow,
.analytics-card .card-label,
.analytics-card .card-menu,
.analytics-card p,
.analytics-card small,
.mini-stat-card > div > span,
.activity-list article > div > span,
.activity-list article small,
.account-pill,
.analytics-search input {
    font-size: 0.82rem;
    line-height: 1.4;
    letter-spacing: 0;
}

.analytics-card h2,
.analytics-card h3,
.analytics-card strong,
.mini-stat-card strong,
.completed-row strong,
.activity-list article strong {
    letter-spacing: 0;
}

.analytics-shell svg.lucide {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    stroke-width: 2;
}

.analytics-rail svg.lucide {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-basis: 20px;
}

.analytics-header-tools .btn svg.lucide,
.analytics-header-tools .theme-toggle svg.lucide,
.analytics-card .btn svg.lucide {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex-basis: 16px;
}

.analytics-header-tools .btn,
.analytics-header-tools .theme-toggle {
    min-height: 44px;
}

.analytics-search input {
    min-width: 0;
    font-size: 0.86rem;
}

@media (max-width: 720px) {
    .analytics-header h1 {
        font-size: 2.25rem;
    }

    .analytics-shell svg.lucide,
    .analytics-rail svg.lucide {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        flex-basis: 18px;
    }
}

body.modal-open {
    overflow: hidden;
}

:root[data-theme="dark"] body {
    color-scheme: dark;
}

::selection {
    color: #ffffff;
    background: var(--blue);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(20px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    animation: slide-down 520ms ease both;
}

.brand,
.main-nav,
.auth-actions,
.topbar-actions,
.hero-actions {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: #0c1020;
    overflow: hidden;
    transition: transform 180ms ease, background 180ms ease;
}

.brand:hover .brand-mark {
    background: #11172c;
    transform: scale(1.04);
}

.main-nav {
    gap: clamp(12px, 3vw, 34px);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--blue);
}

.main-nav a {
    position: relative;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
    content: "";
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 160ms ease, transform 160ms ease;
}

.main-nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.auth-actions {
    gap: 10px;
}

.topbar-actions {
    gap: 10px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.theme-option {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
}

.theme-option.active {
    color: #ffffff;
    background: var(--blue);
}

:root[data-theme="dark"] .theme-option:not(.active):hover {
    color: var(--ink);
    background: var(--surface-strong);
}

.theme-option svg {
    width: 16px;
    height: 16px;
}

.inline-logout {
    margin: 0;
}

.icon-link {
    gap: 8px;
}

.icon-link svg,
.btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.icon-btn {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.danger-icon {
    color: #d92d20;
    border-color: #fecdca;
    background: #fff5f4;
}

.danger-icon:hover {
    background: #fee4e2;
    box-shadow: 0 10px 24px rgba(217, 45, 32, 0.14);
}

:root[data-theme="dark"] .danger-icon {
    color: #ffb4ab;
    border-color: rgba(255, 180, 171, 0.35);
    background: rgba(217, 45, 32, 0.16);
}

:root[data-theme="dark"] .danger-icon:hover {
    background: rgba(217, 45, 32, 0.26);
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 12px 28px rgba(21, 94, 239, 0.25);
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-danger {
    color: #ffffff;
    background: #d92d20;
}

.btn-danger:hover {
    background: #b42318;
}

.btn-secondary,
.btn-ghost {
    color: var(--ink);
    border-color: var(--line);
    background: var(--surface);
}

.btn-secondary:hover,
.btn-ghost:hover {
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.btn-large {
    min-height: 52px;
    padding: 0 24px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
    gap: clamp(32px, 6vw, 76px);
    align-items: center;
    min-height: calc(100vh - 75px);
    padding: 72px clamp(20px, 5vw, 72px) 46px;
    background: var(--hero-bg);
}

.hero-copy,
.section-heading,
.split-section > div:first-child,
.cta > div {
    animation: fade-rise 720ms ease both;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 22px;
    font-size: clamp(3rem, 8vw, 5.9rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.hero-text {
    max-width: 650px;
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.75;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    max-width: 610px;
    margin: 0;
    gap: 12px;
}

.hero-stats div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.hero-stats dt {
    font-size: 1.45rem;
    font-weight: 800;
}

.hero-stats dd {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-visual {
    overflow: hidden;
    border: 1px solid rgba(217, 226, 236, 0.95);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: float-in 820ms ease both, soft-float 7s ease-in-out 1.1s infinite;
}

.preview-toolbar {
    display: flex;
    gap: 8px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: var(--dashboard-bg);
}

.preview-toolbar span {
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

.preview-toolbar span:nth-child(1) {
    background: var(--rose);
}

.preview-toolbar span:nth-child(2) {
    background: var(--amber);
}

.preview-toolbar span:nth-child(3) {
    background: var(--teal);
}

.workflow-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
}

/* Public homepage polish inspired by the supplied spacious SaaS composition. */
body:not(.dashboard-body):not(.visual-editor-body) .site-header {
    max-width: 1240px;
    margin: 18px auto 0;
    border: 1px solid rgba(217, 226, 236, 0.9);
    border-radius: 999px;
    box-shadow: 0 10px 34px rgba(16, 24, 40, 0.06);
}

body:not(.dashboard-body):not(.visual-editor-body) .hero {
    max-width: 1240px;
    min-height: calc(100vh - 96px);
    margin: 0 auto;
    padding: 74px 42px 64px;
    background:
        radial-gradient(circle at 84% 44%, rgba(111, 91, 255, 0.22), transparent 31%),
        radial-gradient(circle at 68% 76%, rgba(218, 191, 255, 0.2), transparent 24%),
        #fff;
}

body:not(.dashboard-body):not(.visual-editor-body) .hero h1 {
    max-width: 610px;
    font-size: clamp(3.5rem, 6.2vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

body:not(.dashboard-body):not(.visual-editor-body) .hero-text { max-width: 560px; }
body:not(.dashboard-body):not(.visual-editor-body) .hero-visual {
    position: relative;
    border-radius: 22px;
    transform: rotate(1deg);
    box-shadow: 0 28px 80px rgba(71, 59, 160, 0.2);
}
body:not(.dashboard-body):not(.visual-editor-body) .hero-stats div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 8px;
    border: 0;
    background: transparent;
}
body:not(.dashboard-body):not(.visual-editor-body) .hero-stats dt { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #587cf5, #8a42d8); }
body:not(.dashboard-body):not(.visual-editor-body) .hero-stats dt svg { width: 17px; height: 17px; }
body:not(.dashboard-body):not(.visual-editor-body) .hero-stats dd { margin: 0; font-weight: 700; color: var(--ink); }

@media (max-width: 760px) {
    body:not(.dashboard-body):not(.visual-editor-body) .site-header { margin: 10px 12px 0; border-radius: 18px; }
    body:not(.dashboard-body):not(.visual-editor-body) .hero { min-height: auto; padding: 54px 22px 42px; }
    body:not(.dashboard-body):not(.visual-editor-body) .hero h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
    body:not(.dashboard-body):not(.visual-editor-body) .hero-visual { transform: none; }
    body:not(.dashboard-body):not(.visual-editor-body) .hero-stats { grid-template-columns: 1fr; gap: 0; }
}

/* Dedicated platform administration shell. */
.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 88px); max-width: 1440px; margin: 0 auto; overflow: hidden; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.admin-rail { display: flex; flex-direction: column; min-height: 0; padding: 24px 14px; color: #eef4ff; background: #0e1525; }
.admin-rail .rail-logo { margin: 0 auto 22px; }
.admin-rail-label { margin: 0 12px 8px; color: #8e9ab0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-rail nav { display: grid; gap: 3px; overflow-y: auto; min-height: 0; }
.admin-nav-link, .admin-back { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 9px 11px; border-radius: 8px; color: #b8c4d8; text-decoration: none; font-size: .86rem; font-weight: 600; }
.admin-nav-link svg, .admin-back svg { width: 17px; height: 17px; flex: 0 0 auto; }
.admin-nav-link:hover, .admin-nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.admin-nav-link.active { box-shadow: inset 3px 0 #f05b71; }
.admin-back { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0; padding-top: 20px; color: #f7a1ac; }
.admin-main { min-width: 0; padding: 42px clamp(22px, 4vw, 58px); overflow: auto; background: var(--dashboard-bg); }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.admin-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; }
.admin-badge { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(225, 63, 89, .28); border-radius: 999px; color: #c8324d; background: rgba(225, 63, 89, .08); font-size: .78rem; font-weight: 800; }
.admin-badge svg { width: 16px; }
.admin-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.admin-metrics article { display: grid; gap: 8px; min-height: 132px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.admin-metrics article > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #c8324d; background: rgba(225,63,89,.1); }
.admin-metrics svg { width: 17px; }
.admin-metrics small { color: var(--muted); font-weight: 700; }
.admin-metrics strong { font-size: 1.9rem; }
.admin-search { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.admin-search > svg { width: 18px; margin-right: -38px; z-index: 1; color: var(--muted); }
.admin-search input { min-width: 0; flex: 1; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: normal; }
.admin-table th { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.admin-table td small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: var(--soft); }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.inline-form input { width: 130px; min-height: 36px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; }
.admin-empty { display: grid; place-items: center; gap: 10px; min-height: 250px; padding: 40px 20px; text-align: center; color: var(--muted); }
.admin-empty svg { width: 30px; height: 30px; color: #c8324d; }
.admin-empty h2, .admin-empty p { max-width: 560px; margin: 0; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 80px minmax(0,1fr); } .admin-rail { padding: 18px 10px; } .admin-nav-link span, .admin-rail-label, .admin-back { font-size: 0; justify-content: center; } .admin-nav-link { padding: 10px; } .admin-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .analytics-body { padding: 0; } .admin-shell { display: block; min-height: 100vh; border-radius: 0; } .admin-rail { min-height: auto; } .admin-rail nav { grid-template-columns: repeat(4, 1fr); } .admin-main { padding: 28px 16px; } .admin-header { align-items: center; } .admin-header h1 { font-size: 2.2rem; } .admin-badge { font-size: 0; padding: 9px; } .admin-metrics { grid-template-columns: 1fr 1fr; } .admin-search { flex-wrap: wrap; } .admin-search input { flex-basis: 100%; } }

.workflow-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: #101828;
    font-weight: 800;
}

.panel-label {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.workflow-panel h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.status-pill,
.popular {
    border-radius: 999px;
    color: #067647;
    background: #dcfae6;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pill {
    padding: 8px 11px;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 22px 22px;
}

.task-grid article {
    min-height: 160px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.task-grid article:hover {
    border-color: rgba(21, 94, 239, 0.34);
    background: var(--surface);
    transform: translateY(-4px);
}

.task-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.task-icon svg {
    width: 17px;
    height: 17px;
}

.task-grid h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.task-grid p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.image-slot {
    display: grid;
    min-height: 230px;
    place-items: center;
    margin: 0 22px 22px;
    padding: 24px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    color: #ffffff;
    text-align: center;
    background:
        linear-gradient(rgba(16, 24, 40, 0.3), rgba(16, 24, 40, 0.3)),
        url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1100&q=80") center/cover;
    transition: transform 220ms ease, filter 220ms ease;
}

.image-slot:hover {
    filter: saturate(1.08);
    transform: scale(1.012);
}

.image-slot span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.image-slot strong {
    max-width: 320px;
    font-size: 1.35rem;
}

.logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 24px clamp(20px, 5vw, 72px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    font-weight: 700;
}

.logos span {
    padding: 8px 14px;
}

.section,
.split-section,
.cta {
    padding: 82px clamp(20px, 5vw, 72px);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.section-heading h2,
.split-section h2,
.cta h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.feature-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-card,
.price-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.feature-card:hover,
.price-card:hover {
    border-color: rgba(21, 94, 239, 0.25);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.1);
    transform: translateY(-6px);
}

.feature-card {
    overflow: hidden;
}

.feature-card h3,
.feature-card p {
    padding: 0 22px;
}

.feature-card h3 {
    margin: 22px 0 10px;
}

.feature-card p {
    margin-bottom: 24px;
    color: var(--muted);
    line-height: 1.65;
}

.feature-image {
    min-height: 225px;
    background-size: cover;
    background-position: center;
    transition: transform 360ms ease;
}

.feature-card:hover .feature-image {
    transform: scale(1.035);
}

.support-image {
    background-image: url("https://images.unsplash.com/photo-1560264280-88b68371db39?auto=format&fit=crop&w=900&q=80");
}

.workflow-image {
    background-image: url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80");
}

.insight-image {
    background-image: url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=900&q=80");
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1fr);
    gap: 48px;
    align-items: start;
    background: var(--soft);
}

.split-section p {
    max-width: 650px;
    color: var(--muted);
    line-height: 1.75;
}

.solution-list {
    display: grid;
    gap: 14px;
}

.solution-list div {
    display: grid;
    gap: 6px;
    padding: 22px;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 35px rgba(16, 24, 40, 0.06);
    transition: transform 180ms ease, border-color 180ms ease;
}

.solution-list div:hover {
    border-left-color: var(--teal);
    transform: translateX(5px);
}

.solution-list span,
.price-card p,
.price-card li,
.cta p {
    color: var(--muted);
}

.pricing-section {
    background: var(--surface);
}

.price-card {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    padding: 26px;
}

.featured-price {
    border-color: rgba(21, 94, 239, 0.45);
    box-shadow: var(--shadow);
}

.popular {
    align-self: flex-start;
    margin: -6px 0 18px;
    padding: 7px 10px;
}

.price-card h3 {
    margin-bottom: 10px;
    font-size: 1.45rem;
}

.price {
    display: block;
    margin: 14px 0 20px;
    font-size: 2.5rem;
}

.price span {
    color: var(--muted);
    font-size: 1rem;
}

.price-card ul {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
    padding-left: 20px;
}

.price-card .btn {
    margin-top: auto;
}

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #ffffff;
    background: #101828;
}

.cta p,
.cta .eyebrow {
    color: #d0d5dd;
}

.cta h2 {
    max-width: 720px;
}

.auth-body {
    min-height: 100vh;
    background: var(--auth-bg);
}

.auth-header {
    position: relative;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(300px, 1fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
    min-height: calc(100vh - 76px);
    padding: 54px clamp(20px, 5vw, 72px);
}

.auth-minimal .auth-shell {
    grid-template-columns: minmax(280px, 460px);
    justify-content: center;
    align-items: center;
}

.signup-shell {
    align-items: start;
}

.auth-minimal .signup-shell {
    align-items: center;
}

.auth-card {
    padding: clamp(28px, 5vw, 44px);
    border: 1px solid rgba(217, 226, 236, 0.95);
    border-radius: 8px;
    background: var(--header-bg);
    box-shadow: var(--shadow);
    animation: fade-rise 620ms ease both;
}

.auth-card h1 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
    text-align: center;
}

.auth-card .eyebrow,
.auth-intro {
    text-align: center;
}

.auth-intro {
    color: var(--muted);
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.name-grid div {
    display: grid;
    gap: 12px;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.flash-message {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
}

.flash-message.success {
    color: #067647;
    border-color: #abefc6;
    background: #ecfdf3;
}

.flash-message.error {
    color: #b42318;
    border-color: #fecdca;
    background: #fef3f2;
}

.auth-form label,
.field-row {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-row a,
.auth-switch a {
    color: var(--blue);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form select {
    width: 100%;
    min-height: 52px;
    margin-bottom: 8px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form select {
    appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, #667085 50%) right 18px center / 7px 7px no-repeat,
        linear-gradient(135deg, #667085 50%, transparent 50%) right 13px center / 7px 7px no-repeat,
        var(--surface);
}

.auth-form select option {
    color: var(--ink);
    background: var(--surface);
}

:root[data-theme="dark"] .auth-form select option {
    color: #eef4ff;
    background: #101a2b;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: rgba(21, 94, 239, 0.7);
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.1);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 10px;
    font-weight: 600;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.form-button {
    width: 100%;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-aside {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 8px;
    background: #101828;
    box-shadow: var(--shadow);
    animation: float-in 760ms ease 120ms both;
}

.auth-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.78;
    transform: scale(1.02);
    animation: slow-zoom 14s ease-in-out infinite alternate;
}

.login-image {
    background-image:
        linear-gradient(rgba(16, 24, 40, 0.16), rgba(16, 24, 40, 0.42)),
        url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1100&q=80");
}

.signup-image {
    background-image:
        linear-gradient(rgba(16, 24, 40, 0.08), rgba(16, 24, 40, 0.48)),
        url("https://images.unsplash.com/photo-1559136555-9303baea8ebd?auto=format&fit=crop&w=1100&q=80");
}

.auth-note {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: grid;
    gap: 8px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(16, 24, 40, 0.58);
    backdrop-filter: blur(16px);
}

.auth-note strong {
    font-size: 1.2rem;
}

.auth-note span {
    color: #d0d5dd;
    line-height: 1.55;
}

.dashboard-body {
    min-height: 100vh;
    background: var(--dashboard-bg);
}

.dashboard-header form {
    margin: 0;
}

.dashboard-header button {
    cursor: pointer;
    font: inherit;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 72px;
}

.dashboard-flashes {
    margin: 0 0 20px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(28px, 5vw, 46px);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(16, 24, 40, 0.92), rgba(21, 94, 239, 0.72)),
        url("https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1400&q=80") center/cover;
    box-shadow: var(--shadow);
    animation: fade-rise 620ms ease both;
}

.dashboard-hero .eyebrow,
.dashboard-hero p {
    color: #d0d5dd;
}

.dashboard-hero h1 {
    max-width: 680px;
    margin-bottom: 14px;
    font-size: clamp(2.4rem, 7vw, 4.8rem);
}

.dashboard-hero p {
    max-width: 620px;
    margin-bottom: 0;
    line-height: 1.65;
}

.profile-summary {
    display: flex;
    min-width: 280px;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(16, 24, 40, 0.52);
    backdrop-filter: blur(14px);
}

.profile-avatar {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font-weight: 800;
}

.profile-summary div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.profile-summary span:last-child {
    overflow: hidden;
    color: #d0d5dd;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.dashboard-card,
.admin-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
}

.dashboard-card {
    padding: 24px;
}

.metric-card {
    min-height: 190px;
}

.card-label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 2rem;
}

.metric-card p,
.checklist span,
.account-card dd,
.recent-users span {
    color: var(--muted);
    line-height: 1.55;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.dashboard-main-column {
    display: grid;
    gap: 18px;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.dashboard-main-column.dashboard-content-swapping {
    opacity: 0.45;
    transform: translateY(4px);
    pointer-events: none;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.card-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.checklist {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.account-card dl {
    display: grid;
    gap: 18px;
    margin: 0;
}

.account-card div {
    display: grid;
    gap: 4px;
}

.account-card dt {
    color: var(--ink);
    font-weight: 800;
}

.account-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-panel {
    margin-top: 18px;
    padding: 26px;
    border-color: rgba(21, 94, 239, 0.28);
}

.admin-badge {
    padding: 8px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-stats article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 8px;
    background: #f0f6ff;
}

.admin-stats span {
    color: var(--muted);
    font-weight: 700;
}

.admin-stats strong {
    font-size: 2rem;
}

.recent-users {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.recent-users h3 {
    margin-bottom: 6px;
}

.recent-users div {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1.2fr) minmax(80px, 0.4fr);
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.recent-users div span:first-child {
    color: var(--ink);
    font-weight: 800;
}

.dashboard-sections-shell {
    position: sticky;
    top: 94px;
}

.compact-heading {
    margin-bottom: 14px;
}

.compact-heading h2 {
    font-size: 1.45rem;
}

.section-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.section-link-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 0;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.section-link-card:hover {
    border-color: rgba(21, 94, 239, 0.32);
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.09);
    transform: translateX(4px);
}

.section-link-card.active {
    border-color: rgba(21, 94, 239, 0.42);
    background: #eff6ff;
}

:root[data-theme="dark"] .section-link-card.active {
    border-color: rgba(114, 162, 255, 0.56);
    background: #132a4c;
}

:root[data-theme="dark"] .section-link-card.active strong,
:root[data-theme="dark"] .section-link-card.active small,
:root[data-theme="dark"] .section-link-card.active > svg {
    color: #eef4ff;
}

.section-link-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.section-link-card small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.section-link-card > svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.section-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: #eff6ff;
}

:root[data-theme="dark"] .section-icon {
    color: #9cc2ff;
    background: #132a4c;
}

.section-icon svg {
    width: 22px;
    height: 22px;
}

.section-icon.large {
    width: 62px;
    height: 62px;
    margin-bottom: 22px;
    color: #ffffff;
    background: var(--blue);
}

.section-icon.large svg {
    width: 30px;
    height: 30px;
}

.section-page-hero {
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: fade-rise 620ms ease both;
}

:root[data-theme="dark"] .section-page-hero {
    color: var(--ink);
    background: var(--surface-strong);
}

.section-page-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2.5rem, 7vw, 4.9rem);
}

.section-page-hero p:last-child {
    max-width: 690px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--blue);
    font-weight: 800;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.section-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.section-page-grid .dashboard-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
}

.section-page-grid h2 {
    margin-bottom: 12px;
    font-size: 1.45rem;
}

.section-page-grid p {
    color: var(--muted);
    line-height: 1.65;
}

.section-page-grid .btn {
    margin-top: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.settings-card h2 {
    margin-bottom: 18px;
    font-size: 1.55rem;
}

.settings-form {
    display: grid;
    gap: 12px;
}

.settings-form label {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
}

.settings-form input,
.settings-form textarea {
    width: 100%;
    margin-bottom: 6px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.settings-form input {
    min-height: 50px;
}

.settings-form textarea {
    min-height: 110px;
    padding-top: 14px;
    resize: vertical;
}

.settings-form input:focus,
.settings-form textarea:focus {
    border-color: rgba(21, 94, 239, 0.7);
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.1);
}

.settings-form .btn {
    margin-top: 8px;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.settings-form .btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.email-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: 18px;
    margin-top: 18px;
}

.email-config-card {
    grid-column: 1 / -1;
}

.connected-account {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(14, 147, 132, 0.24);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 86%, var(--teal));
}

.connected-account svg,
.permission-list svg {
    width: 20px;
    height: 20px;
    color: var(--teal);
}

.connected-account strong,
.connected-account span {
    display: block;
}

.connected-account span {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.45;
}

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

.permission-list div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: var(--soft);
    line-height: 1.45;
}

.email-config-card dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.email-config-card div {
    display: grid;
    gap: 4px;
}

.email-config-card dt {
    color: var(--ink);
    font-weight: 900;
}

.email-config-card dd {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.empty-state {
    display: grid;
    min-height: 220px;
    place-items: center;
    gap: 8px;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    background: var(--soft);
}

.empty-state svg {
    width: 34px;
    height: 34px;
    color: var(--blue);
}

.empty-state strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(9, 17, 31, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateY(16px) scale(0.98);
    transition: transform 180ms ease;
}

.modal-backdrop.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-heading,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.modal-heading {
    margin-bottom: 22px;
}

.modal-heading h2 {
    margin-bottom: 0;
    font-size: 1.7rem;
}

.modal-heading .icon-btn {
    color: var(--muted);
    border-color: var(--line);
    background: var(--soft);
}

.modal-actions {
    margin-top: 8px;
}

.modal-actions .btn {
    min-width: 120px;
}

.modal-copy {
    color: var(--muted);
    line-height: 1.6;
}

@keyframes fade-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes soft-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes slow-zoom {
    from {
        transform: scale(1.02);
    }

    to {
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .hero,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .feature-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        min-height: 380px;
    }

    .dashboard-hero,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid,
    .section-page-grid,
    .settings-grid,
    .email-setup-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-sections-shell {
        position: static;
    }
}

@media (max-width: 640px) {
    .site-header,
    .auth-actions,
    .hero-actions,
    .cta {
        align-items: stretch;
    }

    .site-header,
    .cta {
        flex-direction: column;
    }

    .brand {
        justify-content: center;
    }

    .main-nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .auth-actions,
    .topbar-actions,
    .hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .auth-actions .inline-logout,
    .topbar-actions .inline-logout,
    .auth-actions .btn,
    .topbar-actions .btn,
    .dashboard-header .inline-logout {
        width: 100%;
    }

    .auth-actions .icon-btn,
    .topbar-actions .icon-btn,
    .dashboard-header .icon-btn {
        width: 100%;
    }

    .theme-toggle {
        width: 100%;
        justify-content: center;
    }

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

    .hero-stats,
    .task-grid {
        grid-template-columns: 1fr;
    }

    .workflow-panel {
        grid-template-columns: auto 1fr;
    }

    .status-pill {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .auth-card {
        padding: 24px;
    }

    .auth-aside {
        min-height: 320px;
    }

    .field-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .name-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        width: min(100% - 28px, 1180px);
        padding-top: 24px;
    }

    .profile-summary {
        min-width: 0;
        width: 100%;
    }

    .dashboard-sections-shell {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .dashboard-sections-shell .compact-heading {
        display: none;
    }

    .section-link-grid {
        grid-template-columns: repeat(4, minmax(190px, 1fr));
        min-width: 780px;
    }

    .section-link-card:hover {
        transform: translateY(-2px);
    }

    .card-heading,
    .recent-users div {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .card-heading {
        flex-direction: column;
    }
}

/* Personal website builder and public profile page */
.portfolio-builder {
    display: grid;
    gap: 24px;
}

.booking-page-content {
    display: grid;
    gap: 24px;
}

.booking-page-heading,
.booking-link-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.booking-page-heading h2,
.booking-link-section h3 {
    margin: 8px 0 6px;
}

.booking-page-heading p,
.booking-link-section p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

.booking-settings-form {
    display: grid;
    gap: 18px;
}

.booking-form-section {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

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

.booking-form-grid label,
.booking-service-row label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.booking-form-grid label.wide,
.booking-service-row label.wide {
    grid-column: 1 / -1;
}

.booking-form-grid input,
.booking-form-grid textarea,
.booking-form-grid select,
.booking-service-row input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
}

.booking-form-grid textarea {
    resize: vertical;
}

.booking-services-grid {
    display: grid;
    gap: 12px;
}

.booking-service-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(110px, .6fr) minmax(110px, .6fr) minmax(180px, 1.4fr) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--soft);
}

.booking-service-row > div {
    display: grid;
    gap: 7px;
}

.booking-service-row > div > strong {
    color: var(--ink);
    font-size: .78rem;
}

.booking-visibility {
    display: flex !important;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.booking-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 900px) {
    .booking-page-heading,
    .booking-link-section {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 600px) {
    .booking-form-grid,
    .booking-service-row {
        grid-template-columns: 1fr;
    }

    .booking-form-section {
        padding: 16px;
    }
}

/* Authenticated dashboard shell */
.dashboard-body.analytics-body {
    padding: 0;
    color: #f7f8fb;
    background: #101014;
}

.dashboard-body .analytics-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100vh;
    overflow: hidden;
    border-radius: 0;
    background: #f7f7f8;
    box-shadow: none;
    animation: none;
}

.dashboard-sidebar {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 26px 16px 18px;
    color: #f7f8fb;
    background: #141418;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 10px 16px;
    color: #ffffff;
}

.dashboard-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #ffffff;
}

.dashboard-brand-mark img { width: 28px; height: 28px; object-fit: contain; }
.dashboard-brand strong { display: block; font-size: 1rem; letter-spacing: 0; }
.dashboard-brand small { display: block; margin-top: 2px; color: #8d8e99; font-size: .67rem; }

.dashboard-sidebar-nav { display: grid; gap: 18px; overflow-y: auto; min-height: 0; }
.dashboard-nav-group { display: grid; gap: 4px; }
.dashboard-nav-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 10px 7px; border: 0; color: #777984; background: transparent; font: inherit; font-size: .66rem; font-weight: 800; letter-spacing: .11em; text-align: left; text-transform: uppercase; cursor: pointer; }
.dashboard-nav-group-toggle svg { width: 14px; height: 14px; transition: transform 160ms ease; }
.dashboard-nav-group.is-collapsed .dashboard-nav-group-toggle svg { transform: rotate(-90deg); }
.dashboard-nav-group.is-collapsed .dashboard-nav-group-items { display: none; }
.dashboard-nav-group-items { display: grid; gap: 3px; }
.dashboard-nav-item { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid transparent; border-radius: 7px; color: #a9aab4; font-size: .82rem; font-weight: 600; text-decoration: none; transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }
.dashboard-nav-item svg { flex: 0 0 auto; width: 16px; height: 16px; color: #777984; }
.dashboard-nav-item:hover { color: #ffffff; background: #202026; }
.dashboard-nav-item.active { color: #ffffff; background: #2b2b34; border-color: #3a3a45; box-shadow: inset 3px 0 #f0b84b; }
.dashboard-nav-item.active svg { color: #f0b84b; }
.dashboard-nav-admin { margin-top: 4px; }
.dashboard-sidebar-footer { display: grid; gap: 12px; margin-top: auto; padding: 14px 6px 0; border-top: 1px solid #2a2a31; }
.dashboard-account { display: flex; min-width: 0; align-items: center; gap: 10px; }
.dashboard-account .rail-avatar { flex: 0 0 auto; width: 32px; height: 32px; font-size: .72rem; }
.dashboard-account > span:last-child { display: grid; min-width: 0; gap: 3px; }
.dashboard-account strong, .dashboard-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-account strong { color: #f2f3f5; font-size: .76rem; }
.dashboard-account small { color: #777984; font-size: .66rem; }
.dashboard-logout { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; color: #8d8e99; background: transparent; font: inherit; font-size: .76rem; cursor: pointer; }
.dashboard-logout:hover { color: #ffffff; }
.dashboard-logout svg { width: 16px; height: 16px; }

.dashboard-body .analytics-workspace { min-width: 0; color: var(--ink); background: #f7f7f8; }
.dashboard-body .analytics-header { min-height: 82px; padding: 20px 34px; border-bottom: 1px solid #e3e3e7; background: rgba(255,255,255,.88); }
.dashboard-body .analytics-header h1 { color: #17171c; font-size: 1.6rem; letter-spacing: 0; }
.dashboard-body .analytics-header .eyebrow { color: #8a8b96; }
.dashboard-body .analytics-content { padding: 30px 34px 46px; }
.dashboard-body .account-pill { max-width: 300px; overflow: hidden; color: #777984; background: #eeeeF1; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-body .analytics-search { background: #ffffff; }

@media (max-width: 820px) {
    .dashboard-body .analytics-shell { display: block; overflow: visible; }
    .dashboard-sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: 252px; transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 18px 0 40px rgba(0,0,0,.22); }
    .dashboard-body .analytics-shell.nav-open .dashboard-sidebar { transform: translateX(0); }
    .dashboard-body .analytics-workspace { min-height: 100vh; }
    .dashboard-body .analytics-header { padding: 18px 20px 18px 64px; }
    .dashboard-body .analytics-content { padding: 22px 18px 34px; }
    .dashboard-body .mobile-nav-toggle { position: fixed; z-index: 30; top: 17px; left: 16px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dedee4; border-radius: 7px; color: #303039; background: #ffffff; }
}

/* Compact overview and quiet scrollbars */
.dashboard-sidebar { width: 218px; }
.dashboard-body .analytics-shell { grid-template-columns: 218px minmax(0, 1fr); }
.dashboard-sidebar-nav { scrollbar-width: thin; scrollbar-color: #3a3a45 transparent; }
.dashboard-sidebar-nav::-webkit-scrollbar { width: 5px; }
.dashboard-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.dashboard-sidebar-nav::-webkit-scrollbar-thumb { border-radius: 5px; background: #3a3a45; }
.dashboard-sidebar-nav::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.overview-content { display: grid; gap: 18px; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.overview-metric, .overview-panel { border: 1px solid #e3e3e7; border-radius: 8px; background: #ffffff; box-shadow: 0 8px 20px rgba(16,24,40,.04); }
.overview-metric { display: grid; gap: 8px; padding: 17px; color: #17171c; text-decoration: none; }
.overview-metric:hover { border-color: #c7c8d1; transform: translateY(-1px); }
.overview-metric span { display: flex; align-items: center; gap: 7px; color: #737581; font-size: .72rem; font-weight: 700; }
.overview-metric span svg { width: 15px; height: 15px; color: #17877f; }
.overview-metric strong { font-size: 1.85rem; line-height: 1; }
.overview-metric small { color: #92939d; font-size: .7rem; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; }
.overview-panel { min-width: 0; padding: 20px; }
.overview-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.overview-panel-heading h2 { margin: 3px 0 0; color: #17171c; font-size: 1.12rem; }
.overview-panel .card-label { margin-bottom: 0; color: #9697a1; font-size: .65rem; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: #17877f; font-size: .72rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link svg { width: 13px; height: 13px; }
.overview-schedule, .overview-attention, .overview-activity { display: grid; gap: 3px; }
.overview-schedule a, .overview-attention a { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #eeeeF1; color: #17171c; text-decoration: none; }
.overview-schedule time { width: 48px; color: #17877f; font-size: .72rem; font-weight: 800; }
.overview-schedule span, .overview-attention span:nth-child(2), .overview-activity span:last-child { display: grid; min-width: 0; gap: 3px; }
.overview-schedule strong, .overview-attention strong, .overview-activity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.overview-schedule small, .overview-attention small, .overview-activity small { overflow: hidden; color: #8c8d97; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.overview-schedule > svg, .overview-attention > svg { flex: 0 0 auto; width: 14px; margin-left: auto; color: #b0b1ba; }
.overview-avatar, .overview-activity-icon { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #ffffff; background: #17877f; font-size: .7rem; font-weight: 800; }
.overview-activity > div { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.overview-activity-icon { border-radius: 7px; color: #17877f; background: #e7f5f2; }
.overview-activity-icon svg { width: 15px; height: 15px; }
.overview-empty { display: grid; justify-items: start; gap: 5px; padding: 18px 0 8px; color: #8c8d97; }
.overview-empty svg { width: 22px; height: 22px; color: #17877f; }
.overview-empty strong { color: #303039; font-size: .82rem; }
.overview-empty span { font-size: .72rem; }
.overview-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.overview-actions a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #e3e3e7; border-radius: 6px; color: #42434d; font-size: .72rem; font-weight: 700; text-decoration: none; }
.overview-actions a:hover { color: #17877f; border-color: #a9d8d2; background: #f5fbfa; }
.overview-actions svg { flex: 0 0 auto; width: 15px; height: 15px; color: #17877f; }

@media (max-width: 1050px) {
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .dashboard-body .analytics-shell { grid-template-columns: 1fr; }
    .dashboard-sidebar { width: 218px; }
    .overview-columns { grid-template-columns: 1fr; }
}

.portfolio-builder-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.portfolio-builder-heading h2,
.portfolio-builder-heading p {
    max-width: 650px;
}

.portfolio-builder-heading h2 {
    margin: 8px 0 8px;
    color: #101828;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: 0;
}

:root[data-theme="dark"] .portfolio-builder-heading h2 {
    color: var(--ink);
}

.portfolio-builder-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.portfolio-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: start;
    gap: 24px;
}

.portfolio-form {
    display: grid;
    gap: 17px;
    padding: 28px;
}

.portfolio-form > label,
.portfolio-fields label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 700;
}

:root[data-theme="dark"] .portfolio-form > label,
:root[data-theme="dark"] .portfolio-fields label {
    color: var(--ink);
}

.portfolio-form label em {
    color: var(--muted);
    font-style: normal;
    font-weight: 500;
}

.portfolio-form input,
.portfolio-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.portfolio-form textarea {
    min-height: 108px;
    resize: vertical;
}

.portfolio-form input:focus,
.portfolio-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.13);
}

.portfolio-fields {
    display: grid;
    gap: 15px;
}

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

.portfolio-fields.stats-fields {
    grid-template-columns: minmax(74px, 0.45fr) minmax(0, 1fr);
    gap: 12px 14px;
}

.slug-input {
    display: flex;
    min-width: 0;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: var(--paper);
    overflow: hidden;
}

.slug-input b {
    padding-left: 12px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.slug-input b strong {
    color: var(--blue);
    font-weight: 800;
}

.slug-input input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding-left: 5px;
    background: transparent;
}

.form-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 1px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.form-section-heading.compact {
    margin-top: 10px;
}

.form-section-heading h3 {
    margin: 0 0 3px;
    color: #101828;
    font-size: 0.95rem;
    letter-spacing: 0;
}

:root[data-theme="dark"] .form-section-heading h3 {
    color: var(--ink);
}

.form-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.portfolio-save-button {
    justify-self: start;
    margin-top: 4px;
}

.portfolio-preview-wrap {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 10px;
}

.portfolio-preview-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.portfolio-preview-kicker svg,
.portfolio-share-row svg {
    width: 16px;
    height: 16px;
}

.portfolio-preview {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(150px, 0.95fr);
    min-height: 460px;
    gap: 20px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 8px;
    padding: 24px;
    background: #eef9f9;
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.1);
    animation: portfolio-preview-in 520ms ease both;
}

:root[data-theme="dark"] .portfolio-preview {
    border-color: rgba(255, 255, 255, 0.1);
    background: #122a35;
}

.portfolio-preview-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.portfolio-preview-copy > span:first-child {
    color: #178f85;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portfolio-preview-copy h3 {
    margin: 16px 0 12px;
    color: #162a66;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 2rem;
    line-height: 0.98;
    letter-spacing: 0;
}

:root[data-theme="dark"] .portfolio-preview-copy h3 {
    color: #effcff;
}

.portfolio-preview-copy p {
    margin: 0;
    color: #49616a;
    font-size: 0.78rem;
    line-height: 1.5;
}

:root[data-theme="dark"] .portfolio-preview-copy p {
    color: #b5d1d7;
}

.portfolio-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.preview-button {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    color: #ffffff;
    background: #172d76;
    font-size: 0.64rem;
    font-weight: 800;
}

.preview-button.ghost {
    color: #172d76;
    border: 1px solid #172d76;
    background: transparent;
}

.portfolio-preview-name {
    margin-top: 28px;
    color: #49616a;
    font-size: 0.72rem;
}

.portfolio-preview-image {
    position: relative;
    min-height: 300px;
    align-self: center;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(145deg, #c5e3dc, #f6d5c8);
}

.portfolio-preview-image img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.portfolio-preview-image > span:not(.preview-image-badge) {
    display: grid;
    height: 100%;
    min-height: 300px;
    place-items: center;
    color: rgba(23, 45, 118, 0.72);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 5rem;
    font-weight: 700;
}

.portfolio-preview-image > svg:not(.lucide) {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 18px;
    height: 18px;
    color: rgba(23, 45, 118, 0.52);
}

.preview-image-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 9px;
    color: #24404b;
    background: rgba(255, 255, 255, 0.86);
    font-size: 0.62rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.preview-image-badge svg {
    width: 15px;
    height: 15px;
    color: #178f85;
    flex: 0 0 auto;
}

.portfolio-share-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.74rem;
}

.portfolio-share-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-portfolio-body {
    min-height: 100vh;
    margin: 0;
    color: #162a66;
    background: #f4fcfc;
    font-family: "DM Sans", Inter, sans-serif;
}

.public-portfolio {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 30px 0 80px;
}

.public-portfolio-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.public-portfolio-brand,
.public-portfolio-powered {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #162a66;
    font-size: 0.84rem;
    font-weight: 800;
}

.public-portfolio-brand span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 8px;
    background: #0c1020;
    overflow: hidden;
}

.public-portfolio-powered {
    color: #63818a;
    font-size: 0.72rem;
}

.public-portfolio-powered svg {
    width: 14px;
    height: 14px;
}

.public-portfolio-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
    align-items: center;
    gap: 74px;
    min-height: 660px;
    padding: 72px 10px 78px;
}

.public-portfolio-copy {
    animation: portfolio-copy-in 650ms ease both;
}

.public-portfolio-eyebrow {
    color: #23978e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.public-portfolio-copy h1 {
    max-width: 560px;
    margin: 20px 0 18px;
    color: #172d76;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 4.4rem;
    line-height: 0.99;
    letter-spacing: 0;
}

.public-portfolio-copy > p {
    max-width: 500px;
    margin: 0;
    color: #526b73;
    font-size: 1rem;
    line-height: 1.55;
}

.public-portfolio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.public-portfolio-hero-extras {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-top: 14px;
}

/* Button children join the existing Hero action row; notes remain below it. */
.public-portfolio-actions:has(+ .public-portfolio-hero-extras .editor-action-target) + .public-portfolio-hero-extras {
    display: contents;
}

.public-portfolio-actions:has(+ .public-portfolio-hero-extras .editor-action-target) + .public-portfolio-hero-extras .public-portfolio-hero-note {
    flex-basis: 100%;
    margin-top: 2px;
}

.public-portfolio-hero-note {
    max-width: 520px;
    margin: 0;
    color: var(--portfolio-text, #526b73);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.public-portfolio-primary,
.public-portfolio-secondary {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    padding: 0 20px;
    font-size: 0.82rem;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.public-portfolio-primary {
    color: #ffffff;
    background: #172d76;
    box-shadow: 0 12px 22px rgba(23, 45, 118, 0.18);
}

.public-portfolio-secondary {
    border: 1px solid #547078;
    color: #172d76;
}

.public-portfolio-primary:hover,
.public-portfolio-secondary:hover {
    transform: translateY(-3px);
}

.public-portfolio-primary svg {
    width: 16px;
    height: 16px;
}

.public-portfolio-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 52px;
}

.public-portfolio-stats div {
    display: grid;
    gap: 4px;
}

.public-portfolio-stats strong {
    color: #172d76;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 1.32rem;
}

.public-portfolio-stats span {
    color: #6d8b92;
    font-size: 0.68rem;
    font-weight: 700;
}

.public-portfolio-visual {
    position: relative;
    animation: portfolio-visual-in 720ms ease 120ms both;
}

.public-portfolio-image {
    position: relative;
    z-index: 1;
    width: min(100%, 490px);
    margin-left: auto;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, #c6e4dc, #f2cec2);
    box-shadow: 0 28px 60px rgba(38, 85, 94, 0.17);
    transform: rotate(2deg);
}

.public-portfolio-image img,
.public-portfolio-placeholder {
    display: grid;
    width: 100%;
    min-height: 520px;
    place-items: center;
    object-fit: cover;
}

.public-portfolio-placeholder {
    color: rgba(23, 45, 118, 0.62);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 10rem;
    font-weight: 700;
}

.public-portfolio-placeholder svg {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 22px;
    height: 22px;
}

.public-portfolio-badge {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    padding: 14px;
    color: #24404b;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.badge-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: #1a9a8f;
}

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

.public-portfolio-badge span:last-child {
    display: grid;
    gap: 2px;
}

.public-portfolio-badge strong {
    font-size: 0.76rem;
}

.public-portfolio-badge small {
    color: #6b858b;
    font-size: 0.65rem;
}

.public-portfolio-orbit {
    position: absolute;
    z-index: 0;
    display: block;
    border: 1px solid rgba(35, 151, 142, 0.24);
    border-radius: 999px;
    animation: orbit-float 5s ease-in-out infinite;
}

.orbit-one {
    right: -30px;
    top: -25px;
    width: 180px;
    height: 180px;
}

.orbit-two {
    bottom: -34px;
    left: -45px;
    width: 140px;
    height: 140px;
    animation-delay: -2s;
}

.public-portfolio-about {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(73, 116, 124, 0.24);
    padding: 26px 10px 0;
}

.public-portfolio-about span {
    color: #23978e;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-portfolio-about p {
    margin: 0;
    color: #6d8b92;
    font-size: 0.84rem;
}

.portfolio-not-found-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: #f4fcfc;
}

.portfolio-not-found {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.portfolio-not-found-mark {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: #172d76;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.portfolio-not-found h1 {
    margin: 0 0 10px;
    color: #172d76;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 2rem;
}

@keyframes portfolio-preview-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes portfolio-copy-in {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes portfolio-visual-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orbit-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(0, 10px); }
}

@media (max-width: 980px) {
    .portfolio-builder-layout,
    .public-portfolio-hero {
        grid-template-columns: 1fr;
    }

    .portfolio-preview-wrap {
        position: static;
    }

    .public-portfolio-hero {
        gap: 42px;
        padding-top: 52px;
    }

    .public-portfolio-image {
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .portfolio-builder-heading,
    .public-portfolio-nav,
    .public-portfolio-about {
        align-items: flex-start;
        flex-direction: column;
    }

    .portfolio-builder-heading .btn {
        width: 100%;
    }

    .portfolio-form {
        padding: 20px;
    }

    .portfolio-fields.two-columns,
    .portfolio-fields.stats-fields,
    .portfolio-preview {
        grid-template-columns: 1fr;
    }

    .portfolio-preview {
        min-height: 0;
    }

    .portfolio-preview-image {
        min-height: 250px;
    }

    .portfolio-preview-image img,
    .portfolio-preview-image > span:not(.preview-image-badge) {
        min-height: 250px;
    }

    .public-portfolio {
        width: min(100% - 34px, 1180px);
        padding-top: 20px;
    }

    .public-portfolio-hero {
        min-height: 0;
        padding: 60px 0 58px;
    }

    .public-portfolio-copy h1 {
        font-size: 3rem;
    }

    .public-portfolio-image img,
    .public-portfolio-placeholder {
        min-height: 390px;
    }

    .public-portfolio-placeholder {
        font-size: 7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-preview,
    .public-portfolio-copy,
    .public-portfolio-visual,
    .public-portfolio-orbit {
        animation: none;
    }
}

/* Extended service-business editor */
.portfolio-form select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
    font-size: 0.88rem;
    outline: none;
}

.portfolio-form input[type="color"] {
    width: 100%;
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

.appearance-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.appearance-fields label:nth-child(n + 5) {
    grid-column: span 1;
}

.portfolio-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.portfolio-toggle-row label,
.portfolio-repeat-title label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.portfolio-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--blue);
}

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

.portfolio-section-row {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: color-mix(in srgb, var(--paper) 78%, var(--soft));
    cursor: grab;
    font-size: 0.82rem;
    font-weight: 700;
}

.portfolio-section-row:active {
    cursor: grabbing;
}

.portfolio-section-row > svg:first-child {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.portfolio-section-row span {
    flex: 1;
}

.portfolio-section-row.dragging {
    opacity: 0.5;
}

.portfolio-repeat-grid,
.portfolio-service-editor {
    display: grid;
    gap: 12px;
}

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

.portfolio-repeat-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: color-mix(in srgb, var(--paper) 84%, var(--soft));
}

.portfolio-repeat-card > strong,
.portfolio-repeat-title strong {
    color: var(--ink);
    font-size: 0.78rem;
}

.portfolio-repeat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portfolio-repeat-card input,
.portfolio-repeat-card textarea {
    min-height: 38px;
    padding: 9px 10px;
    font-size: 0.78rem;
}

.portfolio-repeat-card textarea {
    min-height: 70px;
}

.portfolio-optional-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.portfolio-optional-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.portfolio-publish-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.portfolio-publish-actions .portfolio-save-button {
    margin-top: 0;
}

/* Published pages inherit the editor's safe appearance choices. */
.public-portfolio-body {
    color: var(--portfolio-primary, #162a66);
    background: var(--portfolio-background, #f4fcfc);
}

.public-portfolio-body[data-font-pair="Editorial"],
.public-portfolio-body[data-font-pair="Editorial"] .public-portfolio-copy h1,
.public-portfolio-body[data-font-pair="Editorial"] .public-section-heading h2 {
    font-family: "Space Grotesk", Inter, sans-serif;
}

.public-portfolio-body[data-font-pair="Friendly"] {
    font-family: "DM Sans", Inter, sans-serif;
}

.public-portfolio-body .public-portfolio-brand,
.public-portfolio-body .public-portfolio-powered,
.public-portfolio-body .public-portfolio-copy h1,
.public-portfolio-body .public-portfolio-secondary,
.public-portfolio-body .public-portfolio-stats strong,
.public-portfolio-body .public-section-heading h2,
.public-portfolio-body .public-service-card h3,
.public-portfolio-body .public-about h2,
.public-portfolio-body .public-team h3,
.public-portfolio-body .public-faq h2 {
    color: var(--portfolio-primary, #162a66);
}

.public-portfolio-body .public-portfolio-brand span,
.public-portfolio-body .public-portfolio-primary,
.public-portfolio-body .public-booking {
    background: var(--portfolio-primary, #172d76);
}

.public-portfolio-body .public-portfolio-eyebrow,
.public-portfolio-body .public-section-heading > span,
.public-portfolio-body .public-about > span,
.public-portfolio-body .public-booking > div > span,
.public-portfolio-body .public-service-icon,
.public-portfolio-body .review-stars {
    color: var(--portfolio-accent, #23978e);
}

.public-portfolio-body .public-portfolio-copy > p,
.public-portfolio-body .public-about p,
.public-portfolio-body .public-service-card p,
.public-portfolio-body .public-team p,
.public-portfolio-body .public-contact-grid,
.public-portfolio-body .public-faq p {
    color: var(--portfolio-text, #526b73);
}

.public-portfolio-body .public-portfolio-secondary {
    border-color: var(--portfolio-text, #526b73);
}

.public-portfolio-body .public-portfolio-primary,
.public-portfolio-body .public-portfolio-secondary,
.public-portfolio-body .public-service-card,
.public-portfolio-body .public-portfolio-image,
.public-portfolio-body .public-portfolio-badge,
.public-portfolio-body .public-booking,
.public-portfolio-body .public-review-grid article {
    border-radius: var(--portfolio-radius, 12px);
}

.public-portfolio-dark {
    --portfolio-background: #101b2a !important;
    --portfolio-text: #b7c9d1 !important;
}

.public-portfolio-dark .public-portfolio-powered,
.public-portfolio-dark .public-portfolio-about p,
.public-portfolio-dark .public-portfolio-stats span,
.public-portfolio-dark .public-contact-grid span,
.public-portfolio-dark .public-contact-grid a {
    color: #aac1c9;
}

.public-portfolio-section {
    margin-top: 34px;
    padding: 70px 10px;
}

.public-portfolio-stats.public-portfolio-section {
    display: flex;
    gap: 48px;
    margin-top: 0;
    border-top: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 22%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 22%, transparent);
    padding: 28px 10px;
}

.public-section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 26px;
}

.public-section-heading > span,
.public-about > span,
.public-booking > div > span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.public-section-heading h2,
.public-about h2,
.public-booking h2 {
    max-width: 620px;
    margin: 0;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 2.5rem;
    line-height: 1.04;
}

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

.public-service-card,
.public-team-grid article,
.public-review-grid article {
    padding: 23px;
    background: color-mix(in srgb, var(--portfolio-background, #f4fcfc) 80%, #ffffff);
}

.public-service-card {
    border: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 15%, transparent);
}

.public-service-icon {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portfolio-accent, #23978e) 14%, transparent);
}

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

.public-service-card h3,
.public-team-grid h3 {
    margin: 22px 0 8px;
    font-size: 1.02rem;
}

.public-service-card p,
.public-team-grid p,
.public-review-grid p {
    min-height: 70px;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
}

.public-service-card > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    color: var(--portfolio-text, #526b73);
    font-size: 0.72rem;
    font-weight: 700;
}

.public-service-card > div strong {
    color: var(--portfolio-primary, #172d76);
}

.public-about {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 60px;
    border-top: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 22%, transparent);
}

.public-about p {
    max-width: 620px;
    margin: 20px 0 0;
    font-size: 1rem;
    line-height: 1.6;
}

.team-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--portfolio-accent, #23978e);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.public-team-grid article > span {
    color: var(--portfolio-accent, #23978e);
    font-size: 0.72rem;
    font-weight: 800;
}

.public-review-grid article {
    border: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 14%, transparent);
}

.review-stars {
    font-size: 0.9rem;
    letter-spacing: 3px;
}

.public-review-grid p {
    min-height: 0;
    margin: 18px 0;
    color: var(--portfolio-text, #526b73);
}

.public-review-grid strong {
    color: var(--portfolio-primary, #172d76);
    font-size: 0.78rem;
}

.public-faq > div:last-child {
    max-width: 760px;
}

.public-faq details {
    border-top: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 20%, transparent);
    padding: 19px 0;
}

.public-faq details:last-child {
    border-bottom: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 20%, transparent);
}

.public-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    color: var(--portfolio-primary, #172d76);
    font-size: 0.92rem;
    font-weight: 800;
    list-style: none;
}

.public-faq summary::-webkit-details-marker {
    display: none;
}

.public-faq summary svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.public-faq details[open] summary svg {
    transform: rotate(45deg);
}

.public-faq details p {
    max-width: 620px;
    margin: 13px 0 0;
    font-size: 0.84rem;
    line-height: 1.55;
}

.public-booking {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    color: #ffffff;
    padding: 34px;
}

.public-booking h2 {
    color: #ffffff;
    font-size: 2rem;
}

.public-booking p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
}

.public-booking .public-portfolio-primary {
    flex: 0 0 auto;
    color: var(--portfolio-primary, #172d76);
    background: #ffffff;
}

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

.public-contact-grid > div {
    display: grid;
    gap: 8px;
    border-top: 2px solid var(--portfolio-accent, #23978e);
    padding-top: 13px;
}

.public-contact-grid svg {
    width: 18px;
    height: 18px;
}

.public-contact-grid strong {
    color: var(--portfolio-primary, #172d76);
    font-size: 0.75rem;
}

.public-contact-grid a,
.public-contact-grid span {
    color: var(--portfolio-text, #526b73);
    font-size: 0.75rem;
    line-height: 1.45;
}

.public-gallery-placeholder,
.public-map-placeholder {
    display: grid;
    min-height: 180px;
    place-items: center;
    gap: 9px;
    border: 1px dashed color-mix(in srgb, var(--portfolio-text, #526b73) 24%, transparent);
    border-radius: var(--portfolio-radius, 12px);
    color: var(--portfolio-text, #526b73);
    background: color-mix(in srgb, var(--portfolio-accent, #23978e) 5%, transparent);
    font-size: 0.8rem;
    text-align: center;
}

.public-gallery-placeholder svg,
.public-map-placeholder svg {
    width: 24px;
    height: 24px;
    color: var(--portfolio-accent, #23978e);
}

.public-portfolio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid color-mix(in srgb, var(--portfolio-text, #526b73) 22%, transparent);
    padding: 25px 10px 0;
    color: var(--portfolio-text, #526b73);
    font-size: 0.72rem;
}

.public-portfolio-footer > span:first-child {
    color: var(--portfolio-primary, #172d76);
    font-weight: 800;
}

.public-portfolio-footer > div {
    display: flex;
    gap: 12px;
}

.public-portfolio-footer a {
    color: var(--portfolio-primary, #172d76);
}

.public-portfolio-footer svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 980px) {
    .appearance-fields,
    .public-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-service-grid,
    .public-team-grid,
    .public-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .appearance-fields,
    .portfolio-repeat-grid,
    .public-service-grid,
    .public-team-grid,
    .public-review-grid,
    .public-contact-grid,
    .public-about {
        grid-template-columns: 1fr;
    }

    .public-portfolio-section {
        padding: 48px 0;
    }

    .public-portfolio-stats.public-portfolio-section {
        gap: 22px;
    }

    .public-section-heading h2,
    .public-about h2 {
        font-size: 2rem;
    }

    .public-booking {
        align-items: flex-start;
        flex-direction: column;
        padding: 26px;
    }

    .public-portfolio-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Visual website editor */
.visual-editor-body {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
    color: #172033;
    background: #edf1f7;
}

.visual-editor {
    display: grid;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: 68px minmax(0, 1fr);
}

.visual-editor-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto minmax(220px, 1fr);
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #dfe5ee;
    padding: 0 20px;
    background: #ffffff;
}

.editor-toolbar-left,
.editor-toolbar-right,
.editor-history-actions,
.editor-device-actions,
.editor-back,
.editor-page-title,
.editor-save-status,
.editor-preview-link,
.editor-publish-button {
    display: flex;
    align-items: center;
}

.editor-toolbar-left,
.editor-toolbar-right {
    min-width: 0;
    gap: 12px;
}

.editor-toolbar-right {
    justify-content: flex-end;
}

.editor-back,
.editor-history-actions button,
.editor-device-actions button,
.editor-sidebar-heading button,
.editor-inspector-heading button,
.editor-page-item,
.editor-sidebar-action,
.editor-small-button,
.editor-preview-link {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.editor-back,
.editor-history-actions button,
.editor-inspector-heading button,
.editor-sidebar-heading button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: #667085;
    background: transparent;
}

.editor-back:hover,
.editor-history-actions button:hover,
.editor-inspector-heading button:hover,
.editor-sidebar-heading button:hover {
    color: #172d76;
    background: #f0f3f8;
}

.editor-back svg,
.editor-history-actions svg,
.editor-inspector-heading svg,
.editor-sidebar-heading svg {
    width: 17px;
    height: 17px;
}

.editor-page-title {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.editor-page-title span,
.editor-stage-topline,
.editor-sidebar-heading span,
.editor-selected-label span,
.editor-inspector-field > span,
.editor-muted-note,
.editor-tip-card span {
    color: #8a96a8;
    font-size: 0.68rem;
    font-weight: 700;
}

.editor-page-title strong {
    max-width: 190px;
    overflow: hidden;
    color: #172033;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-history-actions,
.editor-device-actions {
    gap: 4px;
}

.editor-device-actions {
    border: 1px solid #e1e6ee;
    border-radius: 8px;
    padding: 3px;
    background: #f6f8fb;
}

.editor-device-actions button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    padding: 0 10px;
    color: #7b8798;
    background: transparent;
    font-size: 0.7rem;
    font-weight: 700;
}

.editor-device-actions button.active {
    color: #172d76;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(16, 24, 40, 0.09);
}

.editor-device-actions svg {
    width: 15px;
    height: 15px;
}

.editor-save-status {
    gap: 6px;
    color: #2f8a67;
    font-size: 0.72rem;
    font-weight: 800;
}

.editor-save-status.is-saving {
    color: #9b6b24;
}

.editor-save-status svg {
    width: 15px;
    height: 15px;
}

.editor-preview-link,
.editor-publish-button {
    min-height: 36px;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    padding: 0 12px;
    color: #344054;
    background: #f2f4f7;
    font-size: 0.72rem;
    font-weight: 800;
}

.editor-preview-link svg,
.editor-publish-button svg {
    width: 15px;
    height: 15px;
}

.editor-publish-button {
    color: #ffffff;
    background: #172d76;
}

.editor-publish-button:hover,
.editor-preview-link:hover {
    transform: translateY(-1px);
}

.visual-editor-layout {
    display: grid;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: 226px minmax(0, 1fr) 280px;
}

.visual-editor-sidebar {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px;
    background: #ffffff;
}

.editor-left-sidebar {
    border-right: 1px solid #dfe5ee;
}

.editor-right-sidebar {
    border-left: 1px solid #dfe5ee;
}

.editor-sidebar-section {
    position: relative;
    display: grid;
    gap: 9px;
    margin-bottom: 26px;
}

.editor-sidebar-heading,
.editor-inspector-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.editor-sidebar-heading span {
    color: #344054;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.editor-page-item,
.editor-sidebar-action {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 0 11px;
    color: #667085;
    background: transparent;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
}

.editor-page-item.active,
.editor-page-item:hover,
.editor-sidebar-action:hover {
    color: #172d76;
    background: #f0f3f8;
}

.editor-page-item svg,
.editor-sidebar-action svg {
    width: 16px;
    height: 16px;
}

.editor-page-item svg:last-child {
    width: 14px;
    height: 14px;
    margin-left: auto;
}

.editor-muted-note {
    margin: 3px 8px 0;
    line-height: 1.45;
}

.editor-tip-card {
    display: grid;
    gap: 8px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.editor-tip-card svg {
    width: 18px;
    height: 18px;
    color: #23978e;
}

.editor-tip-card strong {
    color: #344054;
    font-size: 0.76rem;
}

.editor-tip-card span {
    line-height: 1.45;
}

.editor-advanced-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
}

.editor-advanced-link svg {
    width: 16px;
    height: 16px;
}

.visual-editor-stage {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    background: #edf1f7;
}

.editor-stage-topline {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
}

.editor-draft-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #9b6b24;
    background: #fff6df;
    font-size: 0.65rem;
    font-weight: 800;
}

.editor-draft-pill svg {
    width: 13px;
    height: 13px;
}

.editor-canvas-scroll {
    display: flex;
    height: 100%;
    min-height: 0;
    flex: 1;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    padding: 0 24px 50px;
}

    width: 100%;
    min-width: 0;
    height: max-content;
    margin: 0 auto;
    transition: width 220ms ease, box-shadow 220ms ease;
}

.editor-device-frame.tablet {
    width: min(768px, 100%);
}

.editor-device-frame.mobile {
    width: min(390px, 100%);
}

.editor-site-root {
    overflow: visible;
    min-height: 100%;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    background: var(--portfolio-background, #f4fcfc);
    box-shadow: 0 20px 55px rgba(16, 24, 40, 0.14);
}

.editor-site-root .public-portfolio {
    width: 100%;
    margin: 0;
    padding: 24px 32px 50px;
}

.editor-site-root .public-portfolio-hero {
    min-height: 570px;
    padding: 58px 8px 64px;
}

.editor-site-root .public-portfolio-copy h1 {
    font-size: 3.6rem;
}

.editor-site-root .public-portfolio-image img,
.editor-site-root .public-portfolio-placeholder {
    min-height: 420px;
}

.editor-site-root .public-portfolio-placeholder {
    font-size: 8rem;
}

.editor-site-root .public-portfolio-section {
    padding: 52px 8px;
}

.editor-site-root .public-portfolio-nav a,
.editor-site-root .public-portfolio-nav span {
    pointer-events: none;
}

.editor-selectable {
    position: relative;
    outline: 1px solid transparent;
    outline-offset: 5px;
    transition: outline-color 150ms ease, background 150ms ease;
}

.editor-selectable:hover,
.editor-selectable.editor-selected {
    outline-color: #7aa4ff;
}

.editor-selectable.editor-selected {
    background: color-mix(in srgb, var(--portfolio-accent, #23978e) 3%, transparent);
}

.editor-page-content [contenteditable="true"] {
    cursor: text;
    outline: 1px dashed transparent;
    outline-offset: 4px;
    transition: outline-color 140ms ease, background 140ms ease;
}

.editor-page-content [contenteditable="true"]:hover,
.editor-page-content [contenteditable="true"]:focus {
    outline-color: #7aa4ff;
    background: rgba(122, 164, 255, 0.08);
}

.editor-section-handle {
    position: absolute;
    z-index: 5;
    top: 7px;
    left: 7px;
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    padding: 3px;
    color: #667085;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.editor-selectable:hover .editor-section-handle,
.editor-selectable.editor-selected .editor-section-handle {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.editor-section-handle span {
    padding: 0 6px;
    color: #344054;
    font-size: 0.64rem;
    font-weight: 800;
}

.editor-section-handle button {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: #667085;
    background: transparent;
    cursor: pointer;
}

.editor-section-handle button:hover {
    color: #172d76;
    background: #edf2fb;
}

.editor-section-handle svg {
    width: 14px;
    height: 14px;
}

.editor-image-target {
    cursor: pointer;
}

.editor-image-target::after {
    content: "Click to replace image";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    border-radius: 999px;
    padding: 8px 11px;
    color: #ffffff;
    background: rgba(23, 45, 118, 0.86);
    font-size: 0.68rem;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 160ms ease;
}

.editor-image-target:hover::after {
    opacity: 1;
}

.editor-action-target {
    cursor: pointer;
}

.editor-add-section-marker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: center;
    margin: 0 0 20px;
    border: 1px dashed #adc1e2;
    border-radius: 999px;
    padding: 7px 11px;
    color: #5271a9;
    background: #f7faff;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
}

.editor-add-section-marker svg {
    width: 14px;
    height: 14px;
}

.editor-add-menu {
    position: absolute;
    z-index: 20;
    display: grid;
    width: 180px;
    gap: 3px;
    margin-top: 8px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    padding: 7px;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(16, 24, 40, 0.16);
}

.editor-add-menu button,
.editor-add-menu span {
    border: 0;
    border-radius: 6px;
    padding: 8px 9px;
    color: #344054;
    background: transparent;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: left;
}

.editor-add-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.editor-add-menu button svg {
    width: 14px;
    height: 14px;
    color: #7b8798;
}

.editor-add-menu button:hover svg {
    color: #172d76;
}

.public-custom-block {
    position: relative;
}

.public-custom { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.public-custom > .editor-section-handle,
.public-custom > .public-custom-block:not(.public-custom-card),
.public-custom > .editor-empty-section { grid-column:1 / -1; }
.public-custom-card { min-height:120px; padding:20px; border:1px solid color-mix(in srgb, var(--portfolio-primary, #172d76) 12%, transparent); border-radius:var(--portfolio-radius, 12px); background:rgba(255,255,255,.72); box-shadow:0 10px 24px rgba(23,32,51,.06); }
.public-custom-card article { color:var(--portfolio-text, #526b73); font-size:.9rem; line-height:1.55; }
.public-custom-card article::first-line { color:var(--portfolio-primary, #172d76); font-weight:800; }
.public-custom-card-icon { display:grid; width:30px; height:30px; margin-bottom:12px; place-items:center; border-radius:9px; color:var(--portfolio-primary, #172d76); background:color-mix(in srgb, var(--portfolio-primary, #172d76) 10%, transparent); }
.public-custom-card-icon svg { width:16px; height:16px; }
@media (max-width:820px) { .public-custom { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .public-custom { grid-template-columns:1fr; } }

.editor-block-handle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 26px;
    color: #8a96a8;
    font-size: 0.62rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 160ms ease;
}

.public-custom-block:hover .editor-block-handle,
.public-custom-block:focus-within .editor-block-handle {
    opacity: 1;
}

.editor-block-handle button {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: #7b8798;
    background: #f0f3f8;
    cursor: pointer;
}

.editor-block-handle button:hover {
    color: #172d76;
    background: #e3ebfb;
}

.editor-block-handle svg {
    width: 13px;
    height: 13px;
}

.editor-add-menu button:hover {
    color: #172d76;
    background: #f0f3f8;
}

.editor-add-menu span {
    color: #8a96a8;
    line-height: 1.4;
}

.editor-inspector-heading {
    padding-bottom: 16px;
    border-bottom: 1px solid #e6eaf0;
}

.editor-inspector-heading > span {
    color: #344054;
    font-size: 0.78rem;
    font-weight: 800;
}

.editor-inspector-empty {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 68px 16px 30px;
    color: #8a96a8;
    text-align: center;
}

.editor-inspector-empty svg {
    width: 26px;
    height: 26px;
    color: #7aa4ff;
}

.editor-inspector-empty strong {
    color: #344054;
    font-size: 0.78rem;
}

.editor-inspector-empty span {
    font-size: 0.7rem;
    line-height: 1.45;
}

.editor-inspector-content,
.editor-site-styles {
    display: grid;
    gap: 16px;
    padding-top: 18px;
}

.editor-format-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border: 1px solid #e0e6ee;
    border-radius: 8px;
    padding: 6px;
    background: #f8fafc;
}

.editor-format-toolbar button,
.editor-format-toolbar label {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: #667085;
    background: transparent;
    cursor: pointer;
}

.editor-format-toolbar button:hover,
.editor-format-toolbar label:hover {
    color: #172d76;
    background: #eaf0fb;
}

.editor-format-toolbar svg {
    width: 14px;
    height: 14px;
}

.editor-format-toolbar input[type="color"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.editor-context-menu {
    position: fixed;
    z-index: 100;
    display: grid;
    width: 174px;
    gap: 2px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(16, 24, 40, 0.18);
}

.editor-context-menu button {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 5px;
    padding: 0 8px;
    color: #344054;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: left;
}

.editor-context-menu button:hover {
    color: #172d76;
    background: #f0f3f8;
}

.editor-context-menu svg {
    width: 14px;
    height: 14px;
    color: #7b8798;
}

.editor-empty-section {
    grid-column: 1 / -1;
    margin: 0;
    border: 1px dashed #bfd0e8;
    border-radius: 8px;
    padding: 22px;
    color: #7890af;
    background: rgba(255, 255, 255, 0.48);
    font-size: 0.78rem;
    text-align: center;
}

.editor-selected-label {
    display: grid;
    gap: 4px;
}

.editor-selected-label strong {
    color: #172033;
    font-size: 0.94rem;
}

.editor-inspector-field {
    display: grid;
    gap: 7px;
}

.editor-inspector-field textarea,
.editor-inspector-field input,
.editor-inspector-field select {
    width: 100%;
    min-width: 0;
    border: 1px solid #dfe5ee;
    border-radius: 7px;
    padding: 10px;
    color: #344054;
    background: #fbfcfe;
    font: inherit;
    font-size: 0.78rem;
    outline: none;
}

.editor-inspector-field input[type="color"] {
    height: 38px;
    padding: 3px;
    cursor: pointer;
}

.editor-inspector-field input[type="file"] {
    padding: 8px;
    font-size: 0.72rem;
}

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

.editor-site-root[data-button-style="rounded"] .public-portfolio-primary,
.editor-site-root[data-button-style="rounded"] .public-portfolio-secondary {
    border-radius: 8px;
}

.editor-site-root[data-button-style="square"] .public-portfolio-primary,
.editor-site-root[data-button-style="square"] .public-portfolio-secondary {
    border-radius: 3px;
}

.public-portfolio-body[data-button-style="rounded"] .public-portfolio-primary,
.public-portfolio-body[data-button-style="rounded"] .public-portfolio-secondary {
    border-radius: 8px;
}

.public-portfolio-body[data-button-style="square"] .public-portfolio-primary,
.public-portfolio-body[data-button-style="square"] .public-portfolio-secondary {
    border-radius: 3px;
}

.editor-inspector-field textarea:focus,
.editor-inspector-field input:focus,
.editor-inspector-field select:focus {
    border-color: #7aa4ff;
    box-shadow: 0 0 0 3px rgba(122, 164, 255, 0.14);
}

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

.editor-small-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    border-radius: 7px;
    padding: 0 9px;
    color: #667085;
    background: #f2f4f7;
    font-size: 0.7rem;
    font-weight: 800;
}

.editor-small-button.danger {
    color: #b54747;
}

.editor-small-button svg {
    width: 14px;
    height: 14px;
}

.editor-inspector-divider {
    height: 1px;
    background: #e6eaf0;
}

.editor-mode-tabs {
    display: flex;
    gap: 3px;
    border-bottom: 1px solid #e6eaf0;
}

.editor-mode-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 0 7px 9px;
    color: #8a96a8;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
}

.editor-mode-tabs button.active {
    border-color: #172d76;
    color: #172d76;
}

.editor-code-view {
    max-height: 250px;
    margin: 0;
    overflow: auto;
    border-radius: 7px;
    padding: 11px;
    color: #d7e6ff;
    background: #172033;
    font-family: Consolas, monospace;
    font-size: 0.65rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

@media (max-width: 1100px) {
    .visual-editor-layout {
        grid-template-columns: 190px minmax(0, 1fr) 250px;
    }

    .editor-device-actions button span {
        display: none;
    }
}

@media (max-width: 820px) {
    .visual-editor-toolbar {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 0 12px;
    }

    .editor-history-actions,
    .editor-device-actions,
    .editor-preview-link {
        display: none;
    }

    .editor-toolbar-right {
        grid-column: 2;
        grid-row: 1;
    }

    .visual-editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-left-sidebar,
    .editor-right-sidebar {
        display: none;
    }

    .editor-site-root .public-portfolio {
        padding-right: 18px;
        padding-left: 18px;
    }

    .editor-site-root .public-portfolio-copy h1 {
        font-size: 2.7rem;
    }
}
/* Production dashboard shell: fixed app frame with internally scrolling content. */
html:has(.analytics-shell),
body.analytics-body {
    height: 100%;
    overflow: hidden;
}

.analytics-body {
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
}

.analytics-shell {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    grid-template-columns: clamp(82px, 7vw, 112px) minmax(0, 1fr);
    border-radius: 0;
}

.analytics-rail {
    min-height: 0;
    gap: clamp(12px, 2vh, 22px);
    padding: clamp(20px, 3.4vh, 34px) 14px clamp(16px, 2.8vh, 24px);
    overflow: visible;
}

.rail-nav {
    width: 100%;
    max-height: 100%;
    align-self: stretch;
    align-content: start;
    justify-content: center;
    gap: clamp(7px, 1.35vh, 14px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 10px 2px 0;
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
    scrollbar-width: thin;
}

.rail-nav::-webkit-scrollbar {
    width: 8px;
}

.rail-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.rail-nav::-webkit-scrollbar-thumb {
    min-height: 34px;
    border: 2px solid #0c1020;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff725f, #ffd15c);
}

.rail-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8b7d, #ffe08a);
}

.rail-link {
    width: clamp(42px, 5.4vh, 50px);
    height: clamp(42px, 5.4vh, 50px);
}

.rail-link.danger {
    color: #fecaca;
}

.rail-link.danger:hover,
.rail-link.danger.active {
    color: #ffffff;
    background: linear-gradient(145deg, #dc2626, #991b1b);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.rail-tooltip {
    position: fixed;
    z-index: 120;
    max-width: 180px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(12, 16, 32, 0.94);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.25);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-8px, -50%) scale(0.96);
    transform-origin: left center;
    transition: opacity 160ms ease, transform 160ms ease;
    white-space: nowrap;
}

.rail-tooltip.active {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}

.rail-logo,
.rail-avatar {
    width: clamp(42px, 5.2vh, 50px);
    height: clamp(42px, 5.2vh, 50px);
}

.analytics-workspace {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: clamp(22px, 3.5vw, 40px);
}

.analytics-header {
    flex: 0 0 auto;
    margin-bottom: clamp(16px, 2.6vh, 28px);
}

.analytics-header h1 {
    font-size: clamp(2rem, 3.7vw, 3.6rem);
}

.analytics-header-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analytics-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
}

.analytics-grid {
    gap: clamp(16px, 2.4vw, 28px);
}

.analytics-side {
    gap: clamp(16px, 2.4vw, 28px);
}

.analytics-card {
    padding: clamp(20px, 2.4vw, 28px);
}

.metric-link-card {
    color: inherit;
    text-decoration: none;
}

.metric-link-card:hover {
    transform: translateY(-3px);
}

.gradient-card p {
    max-width: 28rem;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.mini-schedule,
.section-record-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.mini-schedule span,
.section-record-list div {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.section-record-list div {
    background: var(--soft);
}

.section-record-list span {
    color: var(--muted);
}

.empty-state,
.chart-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 132px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.empty-state.soft {
    min-height: auto;
    margin-top: 18px;
    border-color: rgba(255, 255, 255, 0.32);
    color: rgba(255, 255, 255, 0.86);
}

.empty-state.compact {
    min-height: 94px;
    margin-top: 16px;
}

.chart-empty svg,
.empty-state svg {
    width: 24px;
    height: 24px;
}

.donut-chart.is-empty {
    opacity: 0.42;
    filter: grayscale(1);
}

.real-count {
    display: block;
    margin: 8px 0 14px;
    color: var(--ink);
    font-size: 2.4rem;
    line-height: 1;
}

.admin-section-shell {
    display: grid;
    gap: 18px;
}

.admin-page-card {
    border-color: rgba(220, 38, 38, 0.32);
    background:
        linear-gradient(135deg, rgba(254, 226, 226, 0.82), rgba(255, 255, 255, 0.68)),
        var(--surface);
}

:root[data-theme="dark"] .admin-page-card {
    border-color: rgba(248, 113, 113, 0.34);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.34), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.06);
}

.admin-badge.danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc2626;
}

.admin-badge.danger svg {
    width: 16px;
    height: 16px;
}

.admin-page-card .admin-stats article {
    background: rgba(254, 226, 226, 0.82);
}

:root[data-theme="dark"] .admin-page-card .admin-stats article {
    background: rgba(127, 29, 29, 0.28);
}

.admin-actions,
.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn.danger,
.icon-btn.danger {
    color: #ffffff;
    background: #dc2626;
    border-color: #dc2626;
}

.btn.danger:hover,
.icon-btn.danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.admin-user-table {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.admin-user-head,
.admin-user-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(80px, 0.5fr) minmax(90px, 0.45fr) minmax(170px, 0.8fr) minmax(150px, auto);
    gap: 14px;
    align-items: center;
}

.admin-user-head {
    padding: 0 14px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-user-row {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

:root[data-theme="dark"] .admin-user-row {
    background: rgba(255, 255, 255, 0.06);
}

.admin-user-row strong,
.admin-user-row span {
    overflow-wrap: anywhere;
}

.admin-user-row > div:first-child {
    display: grid;
    gap: 4px;
}

.admin-user-row > div:first-child span {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-credit-count {
    color: var(--ink);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.status-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.status-chip.success {
    color: #087443;
    background: #dcfce7;
}

.status-chip.danger {
    color: #991b1b;
    background: #fee2e2;
}

:root[data-theme="dark"] .status-chip.success {
    color: #bbf7d0;
    background: rgba(22, 101, 52, 0.36);
}

:root[data-theme="dark"] .status-chip.danger {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.42);
}

.admin-icon-action {
    width: 42px;
    height: 42px;
}

.admin-icon-action.danger-soft {
    color: #dc2626;
    background: #fee2e2;
}

.admin-icon-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.admin-modal {
    max-width: 620px;
}

.modal-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 8px;
    color: var(--blue);
    background: #eff6ff;
}

.modal-icon.danger {
    color: #dc2626;
    background: #fee2e2;
}

.modal-icon svg {
    width: 25px;
    height: 25px;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

@media (max-width: 920px) {
    .admin-user-head {
        display: none;
    }

    .admin-user-row {
        grid-template-columns: 1fr;
    }

    .admin-row-actions {
        justify-content: flex-start;
    }
}

.completed-row a,
.icon-only-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

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

.hidden,
.is-filtered-out {
    display: none !important;
}

.mobile-nav-toggle {
    display: none;
}

@media (max-height: 820px) and (min-width: 721px) {
    .analytics-body {
        padding: 0;
    }

    .analytics-shell {
        height: 100dvh;
    }

    .rail-link {
        width: 38px;
        height: 38px;
    }

    .rail-link svg {
        width: 17px;
        height: 17px;
    }

    .rail-nav {
        gap: 6px;
    }

    .analytics-card,
    .mini-stat-card,
    .activity-panel {
        padding: 20px;
    }
}

@media (max-width: 980px) {
    .analytics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .analytics-header {
        align-items: stretch;
    }

    .analytics-header-tools {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    html:has(.analytics-shell),
    body.analytics-body {
        overflow: hidden;
    }

    .analytics-body {
        height: 100dvh;
        padding: 0;
    }

    .analytics-shell {
        height: 100dvh;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .mobile-nav-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 60;
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border: 0;
        border-radius: 8px;
        color: #ffffff;
        background: #0c1020;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
    }

    .analytics-rail {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 55;
        display: grid;
        width: 88px;
        grid-template-rows: auto 1fr auto;
        align-items: start;
        justify-items: center;
        overflow-x: hidden;
        padding-top: 72px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .analytics-shell.nav-open .analytics-rail {
        transform: translateX(0);
    }

    .rail-nav,
    .rail-footer {
        display: grid;
    }

    .analytics-workspace {
        padding: 72px 16px 18px;
    }

    .analytics-header {
        gap: 14px;
    }

    .analytics-header h1 {
        font-size: 2.15rem;
    }

    .account-pill {
        max-width: 100%;
    }

    .activity-list article {
        grid-template-columns: 42px minmax(0, 1fr);
    }
}
