:root {
    color-scheme: light;
    --bg: #eef3f8;
    --bg-soft: #f7faff;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: #ffffff;
    --panel-muted: #e6edf5;
    --text: #142033;
    --muted: #64748b;
    --faint: #8a98aa;
    --line: rgba(33, 49, 72, 0.12);
    --line-strong: rgba(33, 49, 72, 0.2);
    --accent: #00c7f7;
    --accent-strong: #0096ff;
    --accent-soft: rgba(0, 199, 247, 0.14);
    --green: #24d66b;
    --violet: #8b5cf6;
    --amber: #f4a21f;
    --lime: #84cc16;
    --shadow: 0 24px 70px rgba(37, 55, 84, 0.18);
    --sidebar-w: 268px;
    --radius: 8px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #02060b;
    --bg-soft: #060b12;
    --panel: rgba(10, 16, 25, 0.86);
    --panel-strong: #0b111b;
    --panel-muted: #101826;
    --text: #eef7ff;
    --muted: #9aa8bb;
    --faint: #65758a;
    --line: rgba(156, 176, 205, 0.12);
    --line-strong: rgba(156, 176, 205, 0.22);
    --accent: #00d9ff;
    --accent-strong: #00a7ff;
    --accent-soft: rgba(0, 217, 255, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(0, 199, 247, 0.14), transparent 30rem),
        radial-gradient(circle at 86% 16%, rgba(139, 92, 246, 0.12), transparent 26rem),
        linear-gradient(135deg, var(--bg), var(--bg-soft));
    color: var(--text);
    font-family: var(--font);
    letter-spacing: 0;
}

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

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 14px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-strong) 76%, transparent);
    backdrop-filter: blur(20px);
    box-shadow: 18px 0 60px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 24px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
    border-radius: 8px;
    box-shadow: 0 0 28px var(--accent-soft);
    object-fit: cover;
}

.brand strong {
    display: block;
    font-size: 25px;
    line-height: 1;
}

.brand span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.side-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item span,
.icon-button {
    display: grid;
    min-width: 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
}

.nav-item:hover,
.nav-item.is-active {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: linear-gradient(90deg, var(--accent-soft), transparent);
    color: var(--text);
    transform: translateX(2px);
}

.nav-item.is-active span {
    border-color: var(--accent);
    background: var(--accent);
    color: #001018;
    box-shadow: 0 0 22px var(--accent-soft);
}

.sidebar-panel {
    padding: 14px 10px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.panel-heading {
    margin-bottom: 12px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.category-list,
.type-cloud {
    display: grid;
    gap: 8px;
}

.category-pill,
.type-cloud button {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-muted) 66%, transparent);
    color: var(--muted);
    border-radius: 8px;
    cursor: pointer;
}

.category-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    padding: 0 11px;
    text-align: left;
}

.category-pill em {
    color: var(--faint);
    font-size: 12px;
    font-style: normal;
}

.category-pill.is-active,
.category-pill:hover,
.type-cloud button:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: var(--accent-soft);
    color: var(--text);
}

.type-cloud {
    grid-template-columns: 1fr 1fr;
}

.type-cloud button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
}

.workspace {
    min-width: 0;
    padding: 18px 20px 28px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: minmax(340px, 520px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 58px;
    margin-bottom: 14px;
    padding: 8px 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 94%, transparent), transparent);
    backdrop-filter: blur(12px);
}

.menu-button {
    display: none;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    box-shadow: var(--shadow);
}

.search-box span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

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

.language-select,
.login-link,
.theme-toggle {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    color: var(--text);
}

.language-select {
    max-width: 150px;
    padding: 0 10px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    cursor: pointer;
}

.theme-toggle strong {
    font-size: 12px;
}

.theme-toggle-track {
    position: relative;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: var(--panel-muted);
    box-shadow: inset 0 0 0 1px var(--line);
}

.theme-toggle-dot {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    transition: transform 160ms ease;
}

:root[data-theme="dark"] .theme-toggle-dot {
    transform: translateX(18px);
}

.login-link {
    display: inline-grid;
    place-items: center;
    padding: 0 16px;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
    grid-template-areas:
        "hero stats"
        "preview info"
        "templates info";
    gap: 12px;
}

.hero-panel,
.preview-panel,
.panel-card,
.stat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: var(--shadow);
}

.hero-panel {
    grid-area: hero;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 306px;
    overflow: hidden;
}

.hero-panel:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--panel-strong) 86%, transparent) 0%, transparent 72%),
        radial-gradient(circle at 76% 46%, rgba(0, 217, 255, 0.24), transparent 18rem),
        radial-gradient(circle at 88% 22%, rgba(139, 92, 246, 0.24), transparent 18rem);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    padding: 34px 30px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero-copy h1 {
    max-width: 640px;
    margin: 18px 0 14px;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 0.98;
}

.hero-copy p {
    max-width: 570px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

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

.button-primary,
.button-secondary {
    display: inline-grid;
    min-height: 44px;
    place-items: center;
    border-radius: var(--radius);
    font-weight: 850;
}

.button-primary {
    padding: 0 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #001018;
    box-shadow: 0 0 30px var(--accent-soft);
}

.button-secondary {
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 84%, transparent);
    color: var(--text);
}

.button-primary.small,
.button-secondary.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
}

.hero-art {
    position: relative;
    min-height: 100%;
}

.orbital {
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
    border-radius: 50%;
    opacity: 0.9;
}

.orbital-one {
    width: 250px;
    height: 250px;
    right: 16px;
    top: 28px;
    box-shadow: inset 0 0 38px rgba(0, 217, 255, 0.16), 0 0 46px rgba(139, 92, 246, 0.18);
}

.orbital-two {
    width: 120px;
    height: 120px;
    right: 82px;
    top: 94px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.4), transparent 62%);
}

.device-card {
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 212px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
    backdrop-filter: blur(14px);
}

.device-card span {
    display: block;
    height: 96px;
    margin-bottom: 12px;
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(139, 92, 246, 0.25)),
        repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 18px 19px);
}

.device-card strong,
.device-card em {
    display: block;
}

.device-card em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.stat-card {
    min-height: 147px;
    padding: 22px;
}

.stat-card span,
.panel-title span,
.panel-title.compact span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin: 16px 0 6px;
    font-size: 36px;
    line-height: 1;
}

.stat-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.preview-panel {
    grid-area: preview;
    padding: 14px;
}

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

.panel-title h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.mini-link {
    color: var(--muted);
    font-size: 12px;
}

.browser-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-muted) 74%, transparent);
}

.browser-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}

.browser-bar em {
    margin-left: 10px;
    color: var(--faint);
    font-size: 11px;
    font-style: normal;
}

.preview-canvas {
    min-height: 400px;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.13), transparent 44%),
        linear-gradient(180deg, var(--panel-strong), color-mix(in srgb, var(--panel-muted) 60%, transparent));
}

.preview-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 44px;
}

.preview-nav strong {
    margin-right: auto;
    font-size: 18px;
}

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

.preview-nav button {
    height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--text);
    color: var(--bg);
}

.preview-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(180px, 0.8fr);
    align-items: center;
    gap: 26px;
    min-height: 320px;
}

.preview-stage small {
    color: var(--accent-strong);
    font-weight: 900;
    text-transform: uppercase;
}

.preview-stage h3 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 76px);
    line-height: 0.95;
}

.preview-stage p {
    max-width: 360px;
    color: var(--muted);
    line-height: 1.55;
}

.product-stack {
    position: relative;
    min-height: 260px;
}

.product-stack span {
    position: absolute;
    display: block;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.26), rgba(139, 92, 246, 0.18)),
        var(--panel);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.product-stack span:nth-child(1) {
    inset: 18px 30px 64px 18px;
}

.product-stack span:nth-child(2) {
    inset: 74px 4px 22px 76px;
}

.product-stack span:nth-child(3) {
    inset: 124px 120px 0 0;
}

.template-list {
    grid-area: templates;
    padding: 16px;
}

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

.template-card {
    display: grid;
    gap: 7px;
    min-height: 152px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel-muted) 62%, transparent);
    text-align: left;
    cursor: pointer;
}

.template-card:hover,
.template-card.is-active {
    border-color: color-mix(in srgb, var(--accent) 65%, transparent);
    background: var(--accent-soft);
}

.template-card .thumb {
    display: block;
    height: 58px;
    border-radius: 7px;
}

.thumb.cyan { background: linear-gradient(135deg, #00d9ff, #275efe); }
.thumb.violet { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.thumb.lime { background: linear-gradient(135deg, #84cc16, #00d9ff); }
.thumb.amber { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.template-card strong {
    font-size: 14px;
}

.template-card em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.template-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.template-card b {
    padding: 4px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
    color: var(--accent-strong);
    font-size: 11px;
}

.template-card small {
    color: var(--faint);
    font-size: 11px;
}

.info-stack {
    grid-area: info;
    display: grid;
    align-content: start;
    gap: 12px;
}

.panel-card {
    padding: 16px;
}

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

.details-card dl {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}

.details-card dl div {
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-muted) 54%, transparent);
}

.details-card dt {
    color: var(--faint);
    font-size: 12px;
}

.details-card dd {
    margin: 0;
    font-weight: 800;
}

.activity-card .bars {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 96px;
    margin-bottom: 14px;
}

.activity-card .bars span {
    flex: 1;
    height: var(--h);
    min-width: 4px;
    border-radius: 999px 999px 2px 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.activity-card strong {
    display: block;
    font-size: 28px;
}

.activity-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.templates-dashboard {
    display: grid;
    gap: 12px;
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    min-height: 210px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 22%, rgba(0, 217, 255, 0.18), transparent 22rem),
        color-mix(in srgb, var(--panel) 90%, transparent);
}

.templates-header h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 0.98;
}

.templates-header p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

.templates-count {
    display: grid;
    place-items: center;
    min-width: 170px;
    min-height: 140px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.templates-count strong {
    font-size: 46px;
    line-height: 1;
}

.templates-count span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

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

.catalog-card {
    position: relative;
    display: grid;
    gap: 12px;
    min-height: 260px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: var(--shadow);
}

.catalog-card .thumb {
    height: 132px;
    border-radius: 7px;
}

.catalog-rank {
    position: absolute;
    top: 22px;
    right: 22px;
    display: grid;
    min-width: 42px;
    height: 30px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-strong) 74%, transparent);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 900;
}

.catalog-card-body {
    display: grid;
    gap: 8px;
}

.catalog-card-body strong {
    font-size: 18px;
}

.catalog-card-body em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 2px;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 42px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    color: var(--muted);
    font-weight: 800;
}

.pagination a.is-active,
.pagination a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #001018;
}

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

.category-card {
    min-height: 318px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-card-top {
    position: relative;
    padding: 12px 12px 0;
}

.category-card-top .thumb {
    display: block;
    height: 118px;
    border-radius: 7px;
}

.category-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.category-card-body h2 {
    margin: 0;
    font-size: 22px;
}

.category-card-body p {
    min-height: 64px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.category-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.category-stats span {
    min-height: 48px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-muted) 54%, transparent);
    color: var(--muted);
    font-size: 12px;
}

.category-stats strong {
    display: block;
    color: var(--text);
    font-size: 18px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    align-items: stretch;
    gap: 12px;
    min-height: calc(100vh - 112px);
}

.auth-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 620px;
    padding: clamp(26px, 5vw, 58px);
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 30%, rgba(0, 217, 255, 0.2), transparent 22rem),
        radial-gradient(circle at 82% 72%, rgba(139, 92, 246, 0.16), transparent 18rem),
        color-mix(in srgb, var(--panel) 90%, transparent);
}

.auth-copy h1 {
    max-width: 760px;
    margin: 18px 0 16px;
    font-size: clamp(40px, 5.4vw, 76px);
    line-height: 0.96;
}

.auth-copy p {
    max-width: 620px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.auth-benefits div {
    min-height: 124px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel-muted) 56%, transparent);
    color: var(--muted);
    line-height: 1.45;
}

.auth-benefits span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #001018;
    font-size: 11px;
    font-weight: 900;
}

.auth-card {
    display: grid;
    align-items: center;
    padding: clamp(18px, 3vw, 30px);
}

.auth-form {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    color: var(--faint);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.form-field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
    background: color-mix(in srgb, var(--panel-muted) 58%, transparent);
    color: var(--text);
}

.form-field select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
    background: color-mix(in srgb, var(--panel-muted) 58%, transparent);
    color: var(--text);
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-field input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.terms-field {
    align-items: flex-start;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.form-row a,
.auth-switch a {
    color: var(--accent-strong);
    font-weight: 800;
}

.auth-submit {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.auth-switch {
    margin: 2px 0 0;
    color: var(--muted);
    text-align: center;
}

.account-dashboard {
    display: grid;
    gap: 12px;
}

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

.account-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 172px;
}

.account-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #001018;
    font-size: 12px;
    font-weight: 900;
}

.account-card span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.account-card strong {
    display: block;
    margin: 8px 0;
    font-size: 34px;
    line-height: 1;
}

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

.account-card .mini-link {
    position: absolute;
    right: 16px;
    bottom: 14px;
}

.account-activity {
    min-height: 220px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 130px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}

.empty-state span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 900;
}

.empty-state p {
    margin: 0;
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "stats"
            "preview"
            "templates"
            "info";
    }

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

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

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        width: min(320px, 88vw);
        transition: transform 180ms ease;
    }

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

    .workspace {
        padding: 12px;
    }

    .topbar {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .menu-button {
        display: grid;
    }

    .topbar-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .language-select,
    .theme-toggle,
    .login-link {
        flex: 1;
        min-width: 0;
    }

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

    .hero-art {
        display: none;
    }

    .preview-stage {
        grid-template-columns: 1fr;
    }

    .product-stack {
        min-height: 180px;
    }

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

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

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

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

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

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

    .auth-copy {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .hero-copy {
        padding: 24px 18px;
    }

    .stats-row,
    .template-cards,
    .info-stack,
    .most-viewed-grid,
    .category-grid,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .preview-canvas {
        min-height: 340px;
        padding: 14px;
    }

    .preview-nav span {
        display: none;
    }

    .auth-benefits {
        grid-template-columns: 1fr;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
