:root {
    color-scheme: light;
    --bg: #eef4fa;
    --panel: #ffffff;
    --text: #151515;
    --muted: #5f6f7d;
    --line: #d5e3ef;
    --accent: #2471a3;
    --accent-strong: #17517a;
    --accent-soft: #4fa9e7;
    --panel-border: #cfe4f8;
    --panel-fill: rgba(248, 252, 255, 0.92);
    --workspace-canvas: #f8fcff;
    --panel-title: #155f30;
    --panel-label: #345063;
    --pulse-green: #186532;
    --pulse-green-strong: #0f3d1f;
    --green-gradient: linear-gradient(180deg, #0f3d1f 0%, #186532 50%, #2c8b46 100%);
    --danger: #b42318;
    --shadow: 0 22px 48px rgba(36, 113, 163, 0.11);
    --panel-shadow: 0 26px 64px rgba(36, 113, 163, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    --page-corner-art:
        radial-gradient(circle at 100% 100%, rgba(79, 169, 231, 0.12) 0%, rgba(79, 169, 231, 0.07) 7%, transparent 14%),
        linear-gradient(315deg, transparent 0 82%, rgba(79, 169, 231, 0.11) 82.25%, transparent 82.55%),
        linear-gradient(315deg, transparent 0 85.5%, rgba(36, 113, 163, 0.09) 85.75%, transparent 86.05%),
        linear-gradient(315deg, transparent 0 89%, rgba(79, 169, 231, 0.08) 89.2%, transparent 89.5%),
        linear-gradient(315deg, transparent 0 92.5%, rgba(36, 113, 163, 0.07) 92.65%, transparent 92.95%);
    --page-corner-art-size:
        220px 220px,
        1100px 1100px,
        1400px 1400px,
        1700px 1700px,
        2000px 2000px;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 16% 10%, rgba(79, 169, 231, 0.10) 0%, rgba(79, 169, 231, 0.04) 20%, transparent 34%),
        linear-gradient(180deg, #fcfeff 0%, #f2f7fc 42%, #e7eff7 100%);
    background-attachment: fixed;
}

@media (min-width: 1101px) {
    body:has(#accessPanel:not(.hidden)),
    body:has(#workspace:not(.hidden)),
    body:has(#adminPanel:not(.hidden)) {
        height: 100vh;
        overflow: hidden;
    }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.82;
    background: var(--page-corner-art);
    background-repeat: no-repeat;
    background-size: var(--page-corner-art-size);
    background-position:
        right bottom,
        right bottom,
        right bottom,
        right bottom,
        right bottom;
}

.company-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.82;
    background: var(--page-corner-art);
    background-repeat: no-repeat;
    background-size: var(--page-corner-art-size);
    background-position:
        right bottom,
        right bottom,
        right bottom,
        right bottom,
        right bottom;
}

.company-header,
.app-shell,
.company-footer {
    position: relative;
    z-index: 1;
}

.company-header {
    min-height: 92px;
    z-index: 40;
    overflow: visible;
    background: rgba(255, 255, 255, 0.74);
    border-bottom: 1px solid rgba(36, 113, 163, 0.14);
    box-shadow: 0 14px 34px rgba(36, 113, 163, 0.08);
}

.header-tech {
    position: absolute;
    inset: 0 -3vw;
    overflow: hidden;
    pointer-events: none;
    color: transparent;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: clamp(20px, 2.35vw, 42px);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.05;
    opacity: 0.28;
    user-select: none;
}

.header-tech span {
    position: absolute;
    display: block;
    background: linear-gradient(90deg, #a7b5c2 0%, #78848b 60%, #5d6266 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 2px 6px rgba(48, 103, 214, 0.12);
    white-space: nowrap;
}

.header-tech span:nth-child(1) {
    top: 3%;
    left: 1%;
    transform: rotate(-4deg);
}

.header-tech span:nth-child(2) {
    top: 28%;
    left: 12%;
    font-size: 0.9em;
    transform: rotate(2deg);
}

.header-tech span:nth-child(3) {
    top: 10%;
    left: 26%;
    font-size: 1.12em;
    transform: rotate(-1deg);
}

.header-tech span:nth-child(4) {
    top: 54%;
    left: 36%;
    font-size: 0.95em;
    transform: rotate(3deg);
}

.header-tech span:nth-child(5) {
    top: -2%;
    left: 56%;
    font-size: 1.18em;
    transform: rotate(1deg);
}

.header-tech span:nth-child(6) {
    top: 34%;
    left: 62%;
    font-size: 0.86em;
    transform: rotate(-3deg);
}

.header-tech span:nth-child(7) {
    top: 73%;
    left: 72%;
    font-size: 0.96em;
    transform: rotate(2deg);
}

.header-tech span:nth-child(8) {
    top: 15%;
    left: 79%;
    transform: rotate(-2deg);
}

.header-tech span:nth-child(9) {
    top: 50%;
    left: 87%;
    font-size: 0.88em;
    transform: rotate(4deg);
}

.header-tech span:nth-child(10) {
    top: 1%;
    left: 93%;
    font-size: 1.08em;
    transform: rotate(-4deg);
}

.header-tech span:nth-child(11) {
    top: 31%;
    left: 46%;
    font-size: 0.82em;
    transform: rotate(3deg);
}

.header-tech span:nth-child(12) {
    top: 68%;
    left: 4%;
    font-size: 0.86em;
    transform: rotate(2deg);
}

.header-tech span:nth-child(13) {
    top: 45%;
    left: 20%;
    font-size: 1.05em;
    transform: rotate(-3deg);
}

.header-tech span:nth-child(14) {
    top: 79%;
    left: 27%;
    font-size: 0.84em;
    transform: rotate(4deg);
}

.header-tech span:nth-child(15) {
    top: 2%;
    left: 40%;
    font-size: 0.88em;
    transform: rotate(2deg);
}

.header-tech span:nth-child(16) {
    top: 74%;
    left: 49%;
    font-size: 0.92em;
    transform: rotate(-4deg);
}

.header-tech span:nth-child(17) {
    top: 16%;
    left: 64%;
    font-size: 0.86em;
    transform: rotate(3deg);
}

.header-tech span:nth-child(18) {
    top: 84%;
    left: 58%;
    font-size: 0.8em;
    transform: rotate(2deg);
}

.header-tech span:nth-child(19) {
    top: 58%;
    left: 15%;
    font-size: 0.78em;
    transform: rotate(-2deg);
}

.header-tech span:nth-child(20) {
    top: 39%;
    left: 77%;
    font-size: 0.86em;
    transform: rotate(3deg);
}

.header-tech span:nth-child(21) {
    top: 82%;
    left: 91%;
    font-size: 0.82em;
    transform: rotate(-3deg);
}

.header-tech span:nth-child(22) {
    top: 17%;
    left: 7%;
    font-size: 0.8em;
    transform: rotate(4deg);
}

.header-tech span:nth-child(23) {
    top: 63%;
    left: 62%;
    font-size: 0.82em;
    transform: rotate(-2deg);
}

.header-tech span:nth-child(24) {
    top: 43%;
    left: 91%;
    font-size: 0.8em;
    transform: rotate(2deg);
}

.footer-tech {
    position: absolute;
    inset: -22px -3vw;
    z-index: 0;
    overflow: hidden;
    color: transparent;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: clamp(20px, 2.35vw, 42px);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.05;
    opacity: 0.20;
    pointer-events: none;
    user-select: none;
}

.footer-tech span {
    position: absolute;
    display: block;
    background: linear-gradient(90deg, #a7b5c2 0%, #78848b 60%, #5d6266 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 2px 6px rgba(48, 103, 214, 0.12);
    white-space: nowrap;
}

.footer-tech span:nth-child(1) {
    top: 0%;
    left: 2%;
    transform: rotate(-4deg);
}

.footer-tech span:nth-child(2) {
    top: 34%;
    left: 11%;
    font-size: 0.92em;
    transform: rotate(2deg);
}

.footer-tech span:nth-child(3) {
    top: 5%;
    left: 24%;
    font-size: 1.14em;
    transform: rotate(-2deg);
}

.footer-tech span:nth-child(4) {
    top: 58%;
    left: 34%;
    font-size: 0.9em;
    transform: rotate(3deg);
}

.footer-tech span:nth-child(5) {
    top: -8%;
    left: 50%;
    font-size: 1.12em;
    transform: rotate(1deg);
}

.footer-tech span:nth-child(6) {
    top: 28%;
    left: 60%;
    font-size: 0.88em;
    transform: rotate(-3deg);
}

.footer-tech span:nth-child(7) {
    top: 72%;
    left: 67%;
    font-size: 0.9em;
    transform: rotate(2deg);
}

.footer-tech span:nth-child(8) {
    top: 12%;
    left: 77%;
    transform: rotate(-2deg);
}

.footer-tech span:nth-child(9) {
    top: 52%;
    left: 84%;
    font-size: 0.86em;
    transform: rotate(4deg);
}

.footer-tech span:nth-child(10) {
    top: 2%;
    left: 93%;
    font-size: 1.04em;
    transform: rotate(-4deg);
}

.footer-tech span:nth-child(11) {
    top: 35%;
    left: 45%;
    font-size: 0.84em;
    transform: rotate(3deg);
}

.footer-tech span:nth-child(12) {
    top: 70%;
    left: 4%;
    font-size: 0.82em;
    transform: rotate(2deg);
}

.footer-tech span:nth-child(13) {
    top: 48%;
    left: 20%;
    font-size: 1.02em;
    transform: rotate(-3deg);
}

.footer-tech span:nth-child(14) {
    top: 80%;
    left: 28%;
    font-size: 0.78em;
    transform: rotate(4deg);
}

.footer-tech span:nth-child(15) {
    top: 0%;
    left: 39%;
    font-size: 0.84em;
    transform: rotate(2deg);
}

.footer-tech span:nth-child(16) {
    top: 76%;
    left: 49%;
    font-size: 0.88em;
    transform: rotate(-4deg);
}

.footer-tech span:nth-child(17) {
    top: 12%;
    left: 64%;
    font-size: 0.82em;
    transform: rotate(3deg);
}

.footer-tech span:nth-child(18) {
    top: 84%;
    left: 58%;
    font-size: 0.78em;
    transform: rotate(2deg);
}

.footer-tech span:nth-child(19) {
    top: 58%;
    left: 15%;
    font-size: 0.76em;
    transform: rotate(-2deg);
}

.footer-tech span:nth-child(20) {
    top: 42%;
    left: 75%;
    font-size: 0.82em;
    transform: rotate(3deg);
}

.footer-tech span:nth-child(21) {
    top: 82%;
    left: 90%;
    font-size: 0.78em;
    transform: rotate(-3deg);
}

.footer-tech span:nth-child(22) {
    top: 20%;
    left: 7%;
    font-size: 0.76em;
    transform: rotate(4deg);
}

.footer-tech span:nth-child(23) {
    top: 64%;
    left: 61%;
    font-size: 0.78em;
    transform: rotate(-2deg);
}

.footer-tech span:nth-child(24) {
    top: 42%;
    left: 92%;
    font-size: 0.76em;
    transform: rotate(2deg);
}

.tech-cloud span {
    top: var(--y) !important;
    left: var(--x) !important;
    font-size: calc(var(--s, 1) * 1em) !important;
    transform: rotate(var(--r, 0deg)) !important;
}

.company-header-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, auto) minmax(260px, 1fr);
    align-items: center;
    gap: 24px;
    width: min(2200px, calc(100% - clamp(24px, 4vw, 96px)));
    min-height: 92px;
    margin: 0 auto;
    padding: 6px 0;
}

.company-logo-link {
    justify-self: start;
}

.header-product-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

.header-product-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.brand-mark.header-brand-mark {
    width: clamp(56px, 3.25vw, 68px);
    height: clamp(56px, 3.25vw, 68px);
    flex: 0 0 auto;
    font-size: clamp(24px, 1.45vw, 30px);
}

.header-product-brand h1 {
    color: #111827;
    font-size: clamp(27px, 1.85vw, 35px);
    font-weight: 800;
    line-height: 1;
}

.header-product-brand p {
    color: var(--accent-strong);
    font-size: clamp(13px, 0.8vw, 15px);
    font-weight: 700;
    line-height: 1.12;
}

.company-logo-link,
.company-pulse-link,
.footer-brand a {
    color: inherit;
    text-decoration: none;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.country-selector {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
}

.locale-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: auto;
    min-width: 112px;
    min-height: 44px;
    padding: 0 34px 0 12px;
    margin-top: 0;
    border: 1px solid rgba(36, 113, 163, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(36, 113, 163, 0.07);
    cursor: pointer;
}

.locale-button:hover,
.locale-button:focus {
    border-color: rgba(36, 113, 163, 0.54);
    background: #ffffff;
}

.locale-flag {
    width: 26px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.08);
}

.locale-chevron {
    position: absolute;
    right: 12px;
    color: var(--accent-strong);
    font-size: 18px;
    line-height: 1;
}

.locale-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 100;
    display: grid;
    gap: 4px;
    min-width: 112px;
    padding: 6px;
    border: 1px solid rgba(36, 113, 163, 0.22);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(36, 113, 163, 0.16);
}

.locale-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 36px;
    margin-top: 0;
    padding: 0 10px;
    border-radius: 6px;
    color: var(--accent-strong);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
}

.locale-menu-item:hover,
.locale-menu-item[aria-checked="true"] {
    background: #eef7fd;
}

.company-logo {
    display: block;
    width: clamp(170px, 20vw, 300px);
    max-height: 76px;
    object-fit: contain;
}

.company-pulse-link {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 260px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(36, 113, 163, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(36, 113, 163, 0.09);
}

.company-pulse-link:hover,
.company-pulse-link:focus {
    border-color: rgba(36, 113, 163, 0.54);
    background: #ffffff;
}

.company-pulse-link::after {
    content: "→";
    color: var(--accent);
    font-weight: 800;
    line-height: 1;
}

.company-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.company-pulse-text {
    color: var(--accent-strong);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.15;
    white-space: nowrap;
}

.app-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: min(2200px, calc(100% - clamp(24px, 4vw, 96px)));
    margin: 0 auto;
    padding: 8px 0 24px;
}

.access-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    padding-top: 8px;
}

.brand,
.workspace-header,
.status-line,
.code-banner,
.browser-header,
.project-list-item {
    display: flex;
    align-items: center;
}

.brand {
    gap: 14px;
    margin-bottom: 24px;
    padding-right: 54px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--green-gradient);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(24, 101, 50, 0.22);
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.15;
}

h2 {
    font-size: 18px;
    margin-bottom: 18px;
    color: var(--panel-title);
    font-weight: 700;
}

p,
.eyebrow {
    color: var(--muted);
}

.split,
.support-grid,
.workspace-grid {
    display: grid;
    gap: 18px;
}

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

.support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    overflow: hidden;
}

.system-info-panel,
.support-chat-panel {
    min-height: 0;
}

.system-info-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}

.system-panel-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark.system-brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    font-size: 26px;
}

.system-panel-title {
    display: grid;
    gap: 1px;
    margin-bottom: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.02;
}

.system-panel-title span {
    display: block;
}

.knowledge-text {
    min-height: 0;
    overflow: auto;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
}

.knowledge-content {
    display: grid;
    align-content: start;
    gap: 14px;
    padding-right: 8px;
}

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

.knowledge-section + .knowledge-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(36, 113, 163, 0.13);
}

.knowledge-section h3 {
    margin: 0;
    color: var(--panel-title);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.knowledge-section p {
    color: #2b2f33;
    font-size: 13px;
    line-height: 1.5;
}

.knowledge-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.knowledge-list li {
    position: relative;
    min-height: 22px;
    padding-left: 28px;
    color: #2b2f33;
    font-size: 13px;
    line-height: 1.5;
}

.knowledge-list li::before {
    content: "\2713";
    position: absolute;
    top: 1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #ffffff;
    background: #188a5a;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(24, 138, 90, 0.16);
}

.support-chat-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-message-list {
    max-height: none;
    overflow-y: auto;
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.16fr) minmax(440px, 0.84fr);
    grid-template-rows: minmax(102px, auto) minmax(0, 1fr);
    align-items: stretch;
    gap: 12px 14px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, var(--panel-fill) 100%),
        #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: var(--panel-shadow);
    padding: 22px;
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(180deg, #4fa9e7 0%, #2471a3 55%, #75c7f3 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 14px 30px rgba(36, 113, 163, 0.18);
}

.panel > :not(.tab-list),
.panel form,
.panel .tab-pane,
.panel .admin-tab-pane {
    position: relative;
    z-index: 1;
}

.panel:not(.editor-panel):not(.admin-shell) {
    padding-left: 56px;
}

label {
    display: block;
    margin: 14px 0 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--panel-label);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #d7e8f6;
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(79, 169, 231, 0.18);
    outline: none;
}

textarea {
    min-height: 118px;
    resize: vertical;
}

select {
    min-height: 42px;
}

button,
.site-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 6px;
    border: 0;
    padding: 0 16px;
    font-weight: 700;
    text-decoration: none;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.inline-check input {
    width: auto;
    margin: 0;
}

button {
    margin-top: 18px;
    color: #fff;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 60%, var(--accent) 100%);
    cursor: pointer;
}

.icon-button {
    width: 40px;
    min-height: 40px;
    margin-top: 0;
    padding: 0;
    border: 1px solid var(--line);
    color: var(--text);
    background: #ffffff;
    font-size: 22px;
    line-height: 1;
}

.icon-button:hover {
    background: #f4f7f9;
}

.admin-gear {
    position: static;
    flex: 0 0 auto;
}

.status-line button {
    margin-top: 0;
}

.secondary-button {
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
}

button:hover {
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 62%, var(--accent-strong) 100%);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.secondary-button:hover {
    background: #f4f7f9;
}

.danger-button {
    color: var(--danger);
}

.danger-button:hover {
    color: #fff;
    background: var(--danger);
}

.workspace-header {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(180px, 0.55fr) minmax(420px, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.workspace > .workspace-header {
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr) auto;
    grid-template-areas:
        "title pricing pricing"
        "title limit actions";
    gap: 8px 16px;
}

.project-title-inline {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0;
}

.workspace > .workspace-header .project-title-inline {
    grid-area: title;
}

.project-label {
    color: var(--panel-label);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.project-title-inline h1 {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-line {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.workspace > .workspace-header .status-line {
    grid-area: actions;
    justify-self: end;
    min-width: min(640px, 100%);
}

.status {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.status-generating {
    animation: status-blink 1s ease-in-out infinite;
    border-color: #f59e0b;
    color: #7c2d12;
}

@keyframes status-blink {
    0%,
    100% {
        background: #fff7ed;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
        opacity: 1;
    }

    50% {
        background: #fed7aa;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
        opacity: 0.58;
    }
}

.site-link {
    background: var(--green-gradient);
    color: #fff;
}

.site-link.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.code-banner {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    background: #ecfdf5;
}

.code-banner-text {
    display: grid;
    gap: 4px;
}

.code-banner small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.code-banner strong {
    overflow-wrap: anywhere;
    font-family: Consolas, "Liberation Mono", monospace;
    text-align: right;
}

.generation-panel {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
    padding: 8px 12px 8px 42px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, var(--panel-fill) 100%),
        #ffffff;
    box-shadow: var(--panel-shadow);
}

.generation-panel::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(180deg, #4fa9e7 0%, #2471a3 55%, #75c7f3 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 14px 30px rgba(36, 113, 163, 0.18);
}

.generation-panel h2 {
    margin-bottom: 0;
    font-size: 15px;
}

.generation-panel p {
    font-size: 12px;
    line-height: 1.25;
}

.generation-main {
    width: min(760px, 100%);
    min-width: 0;
}

.generation-stats {
    display: grid;
    gap: 5px;
    min-width: 220px;
    padding: 8px 10px;
    border: 1px solid rgba(36, 113, 163, 0.14);
    border-radius: 8px;
    background: rgba(248, 252, 255, 0.82);
}

.generation-stats h3 {
    margin: 0;
    color: var(--panel-title);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}

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

.token-stat {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.token-stat span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-stat strong {
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-stat-total strong {
    color: var(--accent-strong);
    font-size: 21px;
}

.generation-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.generation-title-row p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generation-version-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 5px;
}

.generation-version-navigation select {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
}

.generation-version-navigation .compact-button {
    width: 28px;
    min-height: 28px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.browser-header {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.browser-header h2 {
    margin-bottom: 0;
}

.browser-header input {
    max-width: 340px;
}

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

.project-list-item {
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    margin-top: 0;
    border: 1px solid var(--line);
    background: #fbfcfd;
    color: var(--text);
    text-align: left;
}

.project-list-item:hover {
    background: #f4f7f9;
}

.project-list-main,
.project-list-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-list-main {
    font-weight: 700;
}

.project-list-meta,
.project-empty {
    color: var(--muted);
    font-size: 13px;
}

.generation-error {
    max-width: 360px;
    margin: 0;
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.generation-version-list {
    display: grid;
    gap: 5px;
    width: 100%;
    margin-top: 5px;
    padding-right: 4px;
    overflow: visible;
}

.payment-offer-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 6px;
    max-width: 820px;
    margin-top: 7px;
}

.workspace-pricing-list {
    grid-area: pricing;
    align-self: stretch;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-top: 0;
}

.token-limit-banner {
    grid-area: limit;
    justify-self: start;
    align-self: stretch;
    display: flex;
    align-items: center;
    max-width: 360px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid rgba(190, 18, 60, 0.28);
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.payment-offer {
    display: grid;
    gap: 2px;
    min-height: 52px;
    padding: 7px 9px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
}

.workspace-pricing-list .payment-offer {
    min-height: 42px;
    padding: 5px 8px;
}

.payment-offer strong {
    font-size: 12px;
    line-height: 1.15;
}

.payment-offer span,
.payment-offer small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
}

.payment-offer-price {
    font-weight: 700;
    white-space: nowrap;
}

.payment-offer .payment-offer-pay {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
}

.payment-offer-disabled {
    opacity: 0.68;
}

.generation-version {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 5px 7px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.generation-version.active-version {
    border-color: rgba(44, 139, 70, 0.34);
    background: #eef9f1;
}

.generation-version-details {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.generation-version-details strong {
    font-size: 13px;
    line-height: 1.15;
}

.generation-version-details span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
}

.generation-version-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.generation-version-actions .compact-button,
.generation-version-actions .compact-link {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 12px;
}

.compact-link {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.editor-panel {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.summary-panel {
    grid-column: 2;
    grid-row: 1;
    max-height: 220px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.summary-panel h2 {
    margin-bottom: 9px;
}

.chat-panel {
    grid-column: 2;
    grid-row: 2;
}

.tab-list {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 251, 254, 0.92);
}

.tab-button {
    min-height: 48px;
    margin-top: 0;
    border-radius: 0;
    border-right: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
}

.tab-button:last-child {
    border-right: 0;
}

.tab-button:hover,
.tab-button.active {
    color: var(--text);
    background: #ffffff;
}

.tab-button.active {
    box-shadow: inset 0 -3px 0 var(--accent);
}

.tab-pane {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 22px;
}

.editor-panel #briefPane,
.editor-panel #visionPane,
.editor-panel #settingsPane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-panel #briefPane.hidden,
.editor-panel #visionPane.hidden,
.editor-panel #settingsPane.hidden {
    display: none;
}

.editor-panel #briefForm,
.editor-panel #visionForm,
.editor-panel #designForm {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.field-grid {
    display: grid;
    gap: 12px;
}

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

.tab-pane-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

#visionForm .tab-pane-scroll {
    display: grid;
    grid-template-rows:
        auto
        auto minmax(80px, 1fr)
        auto minmax(80px, 1fr)
        auto minmax(170px, 2.2fr);
    align-content: stretch;
    gap: 7px;
}

#visionForm .tab-pane-scroll h2 {
    margin-bottom: 8px;
}

#visionForm .tab-pane-scroll label {
    margin: 8px 0 0;
}

#visionForm .tab-pane-scroll textarea {
    height: 100%;
    min-height: 0;
}

#visionForm #visualStyle {
    min-height: 170px;
}

.tab-pane-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(248, 252, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.tab-pane-actions button {
    margin-top: 0;
}

.brief-history-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.admin-panel:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.admin-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.admin-tabs {
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
}

.admin-tabs .tab-button {
    border-right: 1px solid var(--line);
    border-bottom: 0;
}

.admin-tabs .tab-button:last-child {
    border-right: 0;
}

.admin-tab-pane {
    flex: 1;
    min-width: 0;
}

.admin-project-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    height: 100%;
    min-height: 0;
}

.admin-project-list,
.admin-project-detail,
.admin-code-panel {
    min-height: 0;
    overflow: auto;
}

.admin-project-list {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 100%;
    padding-right: 4px;
}

.admin-project-button {
    display: grid;
    justify-content: stretch;
    gap: 5px;
    width: 100%;
    min-height: 62px;
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    color: var(--text);
    background: #fbfcfd;
    text-align: left;
}

.admin-project-button:hover {
    background: #f4f7f9;
}

.admin-project-button span,
.admin-pricing-details span {
    color: var(--muted);
    font-size: 12px;
}

.admin-project-detail {
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr);
    gap: 16px;
}

.admin-detail,
.admin-code-panel,
.admin-detail-empty {
    padding: 16px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.admin-detail {
    display: grid;
    gap: 10px;
}

.admin-detail h2 {
    margin-bottom: 2px;
}

.admin-detail-empty {
    color: var(--muted);
}

.admin-meta-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
}

.admin-meta-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.admin-version-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-version-picker select {
    width: auto;
    min-width: 120px;
    min-height: 34px;
    padding: 6px 10px;
}

.admin-access-code-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    background: #ecfdf5;
}

.admin-access-code-banner span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-access-code-banner strong {
    overflow-wrap: anywhere;
    font-family: Consolas, "Liberation Mono", monospace;
}

.admin-code-panel {
    display: flex;
    flex-direction: column;
}

.admin-file-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: min(640px, 100%);
}

.admin-file-controls select {
    min-width: 0;
}

.admin-code-panel pre {
    flex: 1;
    min-height: 220px;
    overflow: auto;
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre;
}

.admin-asset-preview {
    flex: 1;
    min-height: 220px;
    overflow: auto;
    margin: 14px 0 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-asset-preview img,
.admin-asset-preview video,
.admin-asset-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    object-fit: contain;
}

.admin-asset-preview audio {
    width: calc(100% - 24px);
    margin: 12px;
}

.admin-form-grid,
.admin-pricing-list {
    display: grid;
    gap: 14px;
    max-width: 900px;
}

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

.admin-model-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.4fr) minmax(180px, 1fr) minmax(160px, 0.7fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.admin-model-row > strong {
    align-self: center;
    color: var(--text);
}

.admin-model-row label {
    margin-top: 0;
}

.admin-model-row select {
    margin-top: 7px;
}

.admin-model-usage-table-wrap {
    overflow-x: auto;
}

.admin-model-usage-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.admin-model-usage-table th,
.admin-model-usage-table td {
    min-height: 44px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.admin-model-usage-table th:first-child {
    text-align: left;
}

.admin-model-usage-table thead th {
    color: var(--panel-label);
    background: #f4f8fb;
    font-size: 13px;
}

.admin-model-usage-table tbody tr:last-child th,
.admin-model-usage-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-model-usage-table input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.admin-form-grid textarea {
    min-height: 160px;
}

.admin-pricing-rate {
    display: grid;
    gap: 7px;
    max-width: 360px;
    margin-top: 0;
}

.admin-pricing-rate small,
.pricing-net-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.pricing-net-note {
    margin: 0;
}

.admin-pricing-config {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.admin-pricing-config h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.admin-pricing-config p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.admin-token-pricing-list,
.admin-pricing-limits {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}

.admin-token-pricing-row {
    display: grid;
    gap: 7px;
}

.admin-token-pricing-row strong {
    color: var(--panel-label);
    font-size: 13px;
}

.admin-pricing-limits {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.admin-pricing-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(130px, 0.35fr) minmax(130px, 0.35fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.admin-pricing-details {
    display: grid;
    gap: 5px;
    align-self: center;
}

.admin-pricing-row label {
    margin-top: 0;
}

.admin-login {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(29, 39, 48, 0.35);
}

.admin-login-dialog {
    width: min(420px, 100%);
}

.asset-form {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.asset-form h2 {
    margin-bottom: 12px;
}

.asset-form-grid {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
    align-items: stretch;
    gap: 14px;
}

.asset-form-fields,
.asset-form-description {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.asset-form label {
    margin: 7px 0 5px;
}

.asset-form input,
.asset-form textarea {
    padding: 9px 11px;
}

.asset-form input[type="file"] {
    max-width: 360px;
}

.asset-form button[type="submit"] {
    align-self: flex-start;
    margin-top: 12px;
}

.asset-form-description textarea {
    flex: 1;
    min-height: 118px;
}

.asset-list,
.design-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.asset-item {
    display: grid;
    grid-template-columns: clamp(170px, 18vw, 230px) minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(14px, 1.6vw, 22px);
    padding: 20px 22px;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
}

.asset-preview {
    align-self: stretch;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 172px;
    height: 100%;
    overflow: hidden;
    border: 1px dashed #b8c2cc;
    border-radius: 6px;
    color: var(--muted);
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.asset-preview-clickable {
    cursor: zoom-in;
}

.asset-preview-clickable:hover,
.asset-preview-clickable:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(79, 169, 231, 0.16);
    outline: none;
}

.asset-preview img,
.asset-preview video,
.asset-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.asset-preview audio {
    width: calc(100% - 20px);
}

.asset-meta-form {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.25fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 10px clamp(12px, 1.2vw, 18px);
    min-width: 0;
}

.asset-title {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin-bottom: 0;
}

.asset-title strong,
.asset-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-title span {
    color: var(--muted);
    font-size: 14px;
}

.asset-meta-form textarea,
.design-row textarea {
    min-height: 72px;
}

.asset-fields {
    display: contents;
}

.asset-label-actions,
.asset-description-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.asset-label-actions {
    grid-column: 1;
    grid-row: 2;
    justify-content: space-between;
}

.asset-label-actions input {
    min-height: 54px;
    padding: 13px 18px;
}

.asset-description-field {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.asset-meta-form .asset-description-field label {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin: 0;
}

.asset-description-field textarea {
    flex: 1;
    min-height: 0;
    padding: 18px;
}

.asset-label-actions .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: clamp(8px, 1.2vw, 18px);
    margin-top: 12px;
}

.asset-label-actions .compact-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13.3333px;
}

.asset-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.55);
}

.asset-preview-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(980px, 100%);
    max-height: min(82vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.35);
}

.asset-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--line);
}

.asset-preview-header h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-preview-dialog img {
    display: block;
    width: 100%;
    max-height: calc(82vh - 54px);
    object-fit: contain;
    background: #0f172a;
}

.settings-section + .settings-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.section-header,
.row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-header h2 {
    margin-bottom: 0;
}

.heading-hint {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.compact-button {
    min-height: 34px;
    margin-top: 0;
    padding: 0 12px;
    font-size: 13px;
}

.design-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.5fr) minmax(160px, 0.7fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.design-row-color,
.design-row-element {
    grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1.45fr) minmax(86px, auto);
    align-items: stretch;
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
}

.design-color-fields,
.design-element-fields,
.design-row-actions {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.design-color-fields,
.design-element-fields {
    gap: 12px;
}

.design-row-color textarea,
.design-row-element textarea {
    min-height: 118px;
}

.design-row-color input[name="label"],
.design-row-element input[name="label"] {
    min-height: 41px;
}

.design-row-color > label,
.design-row-element > label {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.design-row-color > label textarea,
.design-row-element > label textarea {
    flex: 1;
}

.design-row-actions {
    justify-content: flex-end;
    gap: 10px;
}

.design-row-actions .compact-button {
    width: 100%;
    min-width: 86px;
}

.design-row label,
.asset-meta-form label {
    margin: 0 0 5px;
}

.design-row-color > label,
.design-row-element > label,
.design-color-fields label,
.design-element-fields label {
    margin-bottom: 0;
}

.field-inline input[type="color"] {
    min-height: 50px;
    padding: 4px;
}

.design-element-fields select {
    min-height: 50px;
}

.summary-content {
    display: grid;
    align-content: start;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
    color: var(--text);
}

.summary-row {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.summary-row strong {
    color: var(--panel-label);
    font-size: 12px;
    line-height: 1.2;
}

.summary-row span {
    color: var(--text);
    font-size: 13px;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.message-list {
    flex: 1;
    min-height: 0;
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.message {
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.82);
}

.message-user {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.message-meta {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.message p,
.empty-chat {
    margin: 0;
    white-space: pre-wrap;
}

.chat-form textarea {
    min-height: 72px;
}

.workspace:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--workspace-canvas);
}

.summary-panel,
.chat-panel {
    min-height: 0;
    overflow: hidden;
}

.summary-panel,
.chat-panel,
.chat-form {
    display: flex;
    flex-direction: column;
}

.chat-form {
    flex: 0 0 auto;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    max-width: min(420px, calc(100% - 36px));
    padding: 14px 16px;
    border-radius: 8px;
    color: #fff;
    background: var(--danger);
    box-shadow: var(--shadow);
}

.company-footer {
    flex: 0 0 auto;
    overflow: hidden;
    border-top: 1px solid rgba(36, 113, 163, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.company-footer-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) repeat(2, minmax(190px, 0.9fr));
    align-items: center;
    gap: 14px;
    width: min(2200px, calc(100% - clamp(24px, 4vw, 96px)));
    margin: 0 auto;
    padding: 6px 0 8px;
}

.company-footer h2 {
    margin-bottom: 3px;
    background: var(--green-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--pulse-green);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.company-footer p {
    color: #151515;
    font-size: 11.5px;
    line-height: 1.25;
}

.company-footer a {
    color: #151515;
    text-decoration: none;
}

.company-footer a:hover,
.company-footer a:focus {
    color: var(--accent-strong);
    text-decoration: underline;
}

.footer-logo {
    display: block;
    width: min(95px, 100%);
    margin-bottom: 2px;
}

.hidden {
    display: none;
}

@media (max-width: 1100px) {
    :root {
        --page-corner-art-size:
            150px 150px,
            620px 620px,
            780px 780px,
            940px 940px,
            1100px 1100px;
    }

    body {
        background-image:
            radial-gradient(circle at 18% 8%, rgba(79, 169, 231, 0.085) 0%, rgba(79, 169, 231, 0.035) 18%, transparent 28%),
            linear-gradient(180deg, #fcfeff 0%, #f3f7fb 48%, #e9f0f7 100%);
    }

    body::before,
    .company-footer::before {
        opacity: 0.68;
    }

    .company-header {
        min-height: auto;
    }

    .company-header-inner {
        display: flex;
        align-items: center;
        flex-direction: column;
        width: min(100% - 24px, 1180px);
        min-height: auto;
        padding: 8px 0 10px;
    }

    .company-logo-link,
    .company-header-actions {
        justify-self: auto;
    }

    .header-product-brand {
        order: 2;
        justify-content: center;
    }

    .company-header-actions {
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
    }

    .company-logo {
        width: min(220px, 68vw);
        max-height: 58px;
    }

    .company-pulse-link {
        max-width: 100%;
        min-height: 48px;
        padding: 0 12px;
    }

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

    .company-pulse-text {
        font-size: 14px;
    }

    .app-shell {
        width: min(100% - 24px, 1180px);
        min-height: auto;
        padding: 8px 0 14px;
    }

    .split,
    .support-grid,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .workspace:not(.hidden) {
        display: block;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .workspace-grid {
        display: grid;
        grid-template-rows: auto;
        overflow: visible;
    }

    .editor-panel,
    .summary-panel,
    .chat-panel {
        overflow: visible;
    }

    .tab-pane,
    .message-list {
        overflow: visible;
    }

    .summary-panel {
        max-height: 300px;
        overflow: hidden;
    }

    .summary-content {
        overflow: auto;
    }

    .editor-panel #briefPane,
    .editor-panel #visionPane,
    .editor-panel #settingsPane,
    .editor-panel #briefForm,
    .editor-panel #visionForm,
    .editor-panel #designForm {
        display: block;
    }

    .tab-pane-scroll {
        overflow: visible;
        padding-right: 0;
    }

    #visionForm .tab-pane-scroll {
        display: block;
    }

    #visionForm .tab-pane-scroll h2 {
        margin-bottom: 18px;
    }

    #visionForm .tab-pane-scroll label {
        margin: 14px 0 7px;
    }

    #visionForm .tab-pane-scroll textarea {
        min-height: 118px;
    }

    #visionForm #visualStyle {
        min-height: 220px;
    }

    .tab-pane-actions {
        margin: 18px 0 0;
        padding: 0;
        border-top: 0;
        background: transparent;
    }

    .message-list {
        max-height: 340px;
        overflow: auto;
    }

    .system-info-panel,
    .support-chat-panel {
        min-height: auto;
    }

    .workspace-header {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .workspace > .workspace-header {
        grid-template-areas:
            "title"
            "pricing"
            "limit"
            "actions";
    }

    .status-line {
        justify-content: flex-start;
    }

    .workspace > .workspace-header .status-line {
        justify-self: stretch;
        min-width: 0;
    }

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

    .generation-stats {
        width: 100%;
        min-width: 0;
    }

    .generation-panel,
    .summary-panel,
    .editor-panel,
    .chat-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .code-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .code-banner strong {
        text-align: left;
    }

    .generation-version {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-offer-list {
        grid-template-columns: 1fr;
    }

    .workspace-pricing-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .generation-version-actions {
        justify-content: flex-start;
    }

    .tab-list {
        grid-template-columns: 1fr;
    }

    .admin-project-layout {
        display: block;
    }

    .admin-tabs {
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-project-list,
    .admin-project-detail,
    .admin-code-panel {
        margin-top: 16px;
        overflow: visible;
    }

    .admin-pricing-row,
    .admin-model-row,
    .admin-token-pricing-list,
    .admin-pricing-limits,
    .admin-meta-row {
        grid-template-columns: 1fr;
    }

    .tab-button {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .asset-form-grid,
    .asset-item,
    .asset-meta-form,
    .field-grid.two-columns,
    .design-row {
        grid-template-columns: 1fr;
    }

    .asset-meta-form {
        grid-template-rows: auto;
    }

    .asset-label-actions,
    .asset-description-field {
        grid-column: auto;
        grid-row: auto;
    }

    .asset-preview {
        width: min(260px, 100%);
        height: 160px;
        min-height: 160px;
        max-height: none;
    }

    .asset-form input[type="file"],
    .asset-form button[type="submit"] {
        max-width: none;
    }

    .asset-label-actions {
        justify-content: flex-start;
    }

    .browser-header {
        align-items: stretch;
        flex-direction: column;
    }

    .browser-header input {
        max-width: none;
    }

    .generation-error {
        max-width: none;
        text-align: left;
    }

    .company-footer-inner {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 1180px);
        gap: 8px;
        padding: 10px 0 12px;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 10px;
    }
}

@media (min-width: 1600px) {
    .workspace-grid {
        grid-template-columns: minmax(0, 1.18fr) minmax(500px, 0.82fr);
    }
}

@media (max-width: 640px) {
    .workspace-pricing-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2400px) {
    .app-shell {
        width: min(2400px, calc(100% - 160px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-generating {
        animation: none;
        background: #fff7ed;
    }
}
