:root {
    color-scheme: dark;
    --ink: #f5f7fb;
    --ink-soft: #d7dce8;
    --muted: #8d96ab;
    --muted-2: #596174;
    --canvas: #07070c;
    --surface: rgba(18, 19, 29, 0.86);
    --surface-strong: rgba(28, 29, 42, 0.94);
    --line: rgba(255, 255, 255, 0.12);
    --accent: #ff234f;
    --accent-strong: #ff486a;
    --accent-soft: rgba(255, 35, 79, 0.16);
    --aqua: #29d9ff;
    --aqua-soft: rgba(41, 217, 255, 0.14);
    --danger: #ff5472;
    --success: #2ee59d;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
    --shadow-red: 0 0 36px rgba(255, 35, 79, 0.28);
    --radius: 6px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --app-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-bg: var(--canvas);
    --bs-body-color: var(--ink);
    --bs-border-radius: var(--radius);
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(126deg, transparent 0 18%, rgba(255, 35, 79, 0.13) 18% 18.4%, transparent 18.4% 100%),
        linear-gradient(28deg, transparent 0 66%, rgba(41, 217, 255, 0.12) 66% 66.3%, transparent 66.3% 100%),
        linear-gradient(180deg, #0c0d14 0%, #07070c 46%, #050509 100%);
    color: var(--ink);
    font-family: var(--app-font-family);
    font-size: 14px;
    line-height: 1.45;
}

body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
}

body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 0 42%, transparent 88%);
}

body::after {
    z-index: -1;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
        linear-gradient(92deg, transparent 0 7%, rgba(255, 35, 79, 0.09) 7% 7.3%, transparent 7.3% 100%),
        linear-gradient(112deg, transparent 0 78%, rgba(41, 217, 255, 0.08) 78% 78.3%, transparent 78.3% 100%);
    opacity: 0.9;
}

button,
input,
textarea {
    font: inherit;
}

button,
button.primary-button,
button.secondary-button,
button.danger-button,
button.icon-button,
a.primary-button,
a.secondary-button,
label.secondary-button {
    margin: 0;
}

button,
button.primary-button,
button.secondary-button,
button.danger-button,
button.icon-button {
    appearance: none;
    cursor: pointer;
}

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

.lucide {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 clamp(16px, 3vw, 34px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background:
        linear-gradient(90deg, rgba(255, 35, 79, 0.13), transparent 32%),
        rgba(8, 9, 14, 0.82);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px) saturate(140%);
}

.topbar::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    width: min(46vw, 560px);
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--accent), var(--aqua));
    opacity: 0.72;
}

.brand,
.ghost-link {
    color: var(--ink);
    text-decoration: none;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.brand:hover {
    color: var(--ink);
}

.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 35, 79, 0.72);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 35, 79, 0.96), rgba(124, 25, 255, 0.56)),
        #171823;
    box-shadow: var(--shadow-red);
    color: #fff;
}

.brand-mark::after {
    position: absolute;
    inset: -40% auto auto -20%;
    width: 62%;
    height: 190%;
    transform: rotate(28deg);
    content: "";
    background: rgba(255, 255, 255, 0.22);
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-copy strong {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.brand-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 720;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-height: 58px;
}

.topbar-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.topbar .compact-action {
    min-width: 0;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 760;
}

.topbar .compact-action .lucide {
    width: 0.86rem;
    height: 0.86rem;
}

.app-shell {
    width: min(1240px, calc(100% - 36px));
    margin: 32px auto 64px;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px 18px;
}

.auth-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 460px);
    width: min(1060px, 100%);
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 35, 79, 0.15), transparent 34%),
        linear-gradient(28deg, transparent 0 62%, rgba(41, 217, 255, 0.12) 62% 100%),
        rgba(12, 13, 20, 0.94);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-panel::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 35, 79, 0.28);
    clip-path: polygon(0 0, 36% 0, 36% 2px, 2px 2px, 2px 34%, 0 34%);
}

.auth-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 35, 79, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
}

.auth-visual::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(520px) rotateX(57deg) translateY(120px);
    transform-origin: center bottom;
    opacity: 0.8;
}

.auth-wordmark {
    position: absolute;
    top: clamp(30px, 5vw, 58px);
    left: clamp(28px, 5vw, 58px);
    z-index: 2;
    display: grid;
    gap: 8px;
}

.auth-wordmark span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.auth-wordmark strong {
    max-width: 360px;
    color: var(--ink);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
}

.gx-core {
    position: absolute;
    right: 13%;
    bottom: 18%;
    z-index: 2;
    display: grid;
    width: 152px;
    height: 152px;
    place-items: center;
    border: 1px solid rgba(255, 35, 79, 0.52);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 35, 79, 0.16), rgba(41, 217, 255, 0.08)),
        rgba(5, 6, 12, 0.82);
    box-shadow: 0 0 70px rgba(255, 35, 79, 0.35);
    transform: rotate(45deg);
}

.gx-core .lucide {
    width: 58px;
    height: 58px;
    color: var(--accent);
    filter: drop-shadow(0 0 14px rgba(255, 35, 79, 0.6));
    transform: rotate(-45deg);
}

.gx-beam {
    position: absolute;
    z-index: 1;
    display: block;
    height: 2px;
    transform-origin: center;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.86;
    animation: beam-scan 4.2s var(--ease) infinite alternate;
}

.beam-one {
    top: 42%;
    left: -12%;
    width: 72%;
    transform: rotate(-24deg);
}

.beam-two {
    right: -8%;
    bottom: 28%;
    width: 54%;
    background: linear-gradient(90deg, transparent, var(--aqua), transparent);
    transform: rotate(-24deg);
    animation-delay: 500ms;
}

.login-card {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 15px;
    align-self: center;
    width: min(100%, 400px);
    margin: 0 clamp(22px, 5vw, 52px) 0 auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    background: rgba(11, 12, 18, 0.88);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.auth-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 16px;
    align-items: start;
    margin-bottom: 22px;
}

.auth-heading .tile-icon {
    justify-self: end;
}

.login-card h1 {
    max-width: none;
    font-size: clamp(2rem, 3.1vw, 2.35rem);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.login-card .field-group + .field-group {
    margin-top: 2px;
}

.login-card .full-button {
    margin-top: 5px;
}

.narrow-shell {
    width: min(880px, calc(100% - 36px));
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.editor-panel,
.side-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
        var(--surface);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(18px) saturate(130%);
}

.editor-panel::before,
.side-panel::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    border-radius: inherit;
    background:
        linear-gradient(90deg, var(--accent), transparent 28%) top left / 100% 1px no-repeat,
        linear-gradient(180deg, var(--accent), transparent 30%) top left / 1px 100% no-repeat;
    opacity: 0.6;
}

.editor-panel {
    padding: 32px;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.motion-in {
    animation: panel-in 520ms var(--ease) both;
}

.motion-delay {
    animation-delay: 90ms;
}

.panel-heading,
.section-title {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}

.panel-heading {
    margin-bottom: 26px;
}

.title-stack,
.section-title > div {
    min-width: 0;
}

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

.eyebrow {
    margin: 0 0 7px;
    color: var(--aqua);
    font-size: 0.72rem;
    font-weight: 880;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    color: var(--ink);
    font-size: clamp(1.65rem, 2.3vw, 2.35rem);
    font-weight: 880;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

h2 {
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: 0;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.field-group {
    display: grid;
    gap: 9px;
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 760;
}

textarea,
input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        rgba(5, 6, 10, 0.88);
    color: var(--ink);
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.36);
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

textarea {
    min-height: 390px;
    padding: 20px;
    resize: vertical;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.7;
}

textarea::placeholder {
    color: var(--muted-2);
}

input[type="email"],
input[type="password"],
input[type="text"] {
    min-height: 46px;
    padding: 10px 12px;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(16, 17, 25, 0.72);
    color: var(--muted);
    transform: translateY(-50%);
    transition: border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    border-color: rgba(41, 217, 255, 0.42);
    background: rgba(24, 26, 38, 0.94);
    color: #fff;
    box-shadow: 0 0 20px rgba(41, 217, 255, 0.12);
    outline: none;
}

.password-toggle .lucide {
    width: 1rem;
    height: 1rem;
}

.password-toggle .password-eye-off,
.password-toggle.is-visible .password-eye {
    display: none;
}

.password-toggle.is-visible .password-eye-off {
    display: block;
}

textarea:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: rgba(255, 35, 79, 0.78);
    background: rgba(7, 8, 13, 0.96);
    box-shadow:
        0 0 0 1px rgba(255, 35, 79, 0.42),
        0 0 28px rgba(255, 35, 79, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    width: auto;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 180ms var(--ease),
        border-color 180ms var(--ease),
        background 180ms var(--ease),
        box-shadow 180ms var(--ease);
}

.primary-button {
    padding: 0 13px;
    border: 1px solid rgba(255, 35, 79, 0.92);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent),
        linear-gradient(135deg, #ff174a, #b80032);
    color: #fff;
    box-shadow: 0 0 28px rgba(255, 35, 79, 0.32);
}

.primary-button:hover {
    border-color: rgba(255, 92, 120, 0.96);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
        linear-gradient(135deg, #ff486a, #d61045);
    color: #fff;
    box-shadow: 0 0 42px rgba(255, 35, 79, 0.42);
    transform: translateY(-1px);
}

.secondary-button {
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(16, 17, 25, 0.82);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.danger-button {
    padding: 0 12px;
    border: 1px solid rgba(255, 84, 114, 0.24);
    background: rgba(30, 12, 20, 0.62);
    color: var(--danger);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.danger-button:hover {
    border-color: rgba(255, 84, 114, 0.54);
    background: rgba(52, 16, 29, 0.88);
    color: #fff;
    box-shadow: 0 0 24px rgba(255, 84, 114, 0.18);
    transform: translateY(-1px);
}

.secondary-button:hover,
.icon-button:hover {
    border-color: rgba(41, 217, 255, 0.48);
    background: rgba(24, 26, 38, 0.96);
    color: #fff;
    box-shadow: 0 0 24px rgba(41, 217, 255, 0.16);
    transform: translateY(-1px);
}

.compact-action {
    min-height: 30px;
    height: 30px;
    padding-right: 10px;
    padding-left: 10px;
}

.icon-button {
    width: 36px;
    flex: 0 0 36px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(16, 17, 25, 0.78);
    color: var(--muted);
}

.full-button {
    width: 100%;
}

.panel-heading > .primary-button {
    flex: 0 0 178px;
    min-width: 178px;
    width: 178px;
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 35, 79, 0.42);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
}

.is-busy .lucide {
    animation: spin 900ms linear infinite;
}

.file-zone {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.file-list {
    display: grid;
    gap: 12px;
    margin-top: 15px;
}

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(198px, 260px) 44px;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background: rgba(7, 8, 13, 0.72);
    animation: row-in 260ms var(--ease) both;
}

.file-row:hover {
    border-color: rgba(255, 35, 79, 0.38);
    background: rgba(13, 14, 22, 0.92);
    box-shadow: 0 0 26px rgba(255, 35, 79, 0.1);
}

.stored-file {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 16px;
}

.file-main {
    min-width: 0;
}

.with-icon {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.file-icon,
.metric-icon,
.signal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.file-icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(41, 217, 255, 0.3);
    background: var(--aqua-soft);
    color: var(--aqua);
}

.file-main strong,
.file-main span,
.inline-password span {
    display: block;
}

.file-main strong {
    overflow: hidden;
    color: var(--ink);
    font-weight: 820;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-main span,
.inline-password span,
.status-line,
.empty-state,
.metric-label,
.signal-row span {
    color: var(--muted);
    font-size: 0.86rem;
}

.inline-password {
    display: grid;
    gap: 7px;
    margin: 0;
}

.paste-content {
    min-height: 390px;
    margin: 0;
    padding: 21px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 34px,
        rgba(5, 6, 10, 0.86);
    color: var(--ink-soft);
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.7;
}

.notice {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: var(--radius);
    font-weight: 760;
}

.notice-error {
    border: 1px solid rgba(255, 84, 114, 0.3);
    background: rgba(255, 84, 114, 0.1);
    color: var(--danger);
}

.notice-success {
    border: 1px solid rgba(46, 229, 157, 0.28);
    background: rgba(46, 229, 157, 0.1);
    color: var(--success);
}

.status-line {
    min-height: 22px;
    margin: 12px 0 0;
    font-weight: 720;
}

.status-line.is-error {
    color: var(--danger);
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 76px;
    margin-bottom: 0;
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.17);
    border-radius: var(--radius);
    background:
        repeating-linear-gradient(-45deg, rgba(255, 35, 79, 0.045) 0 8px, transparent 8px 16px),
        rgba(8, 9, 14, 0.7);
    text-align: center;
}

.empty-state .lucide {
    color: var(--accent);
}

.metric {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.metric-icon {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 35, 79, 0.38);
    background: var(--accent-soft);
    color: var(--accent);
}

.metric-value {
    display: block;
    color: var(--ink);
    font-size: 4rem;
    font-weight: 920;
    line-height: 0.86;
    text-shadow: 0 0 24px rgba(255, 35, 79, 0.36);
}

.metric-label {
    grid-column: 2;
    margin-top: 4px;
    font-weight: 730;
}

.signal-list {
    display: grid;
    gap: 2px;
    margin-top: 18px;
}

.signal-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid var(--line);
}

.signal-row:last-child {
    border-bottom: 0;
}

.signal-icon {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(41, 217, 255, 0.24);
    background: var(--aqua-soft);
    color: var(--aqua);
}

.signal-row strong {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 830;
    text-align: right;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 35, 79, 0.38);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 850;
}

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

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.choice-row label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    background: rgba(9, 10, 16, 0.78);
    color: var(--ink-soft);
    font-weight: 780;
}

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

.user-table {
    display: grid;
    gap: 10px;
}

.user-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) 120px 120px 110px minmax(190px, auto);
    gap: 14px;
    align-items: center;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    background: rgba(7, 8, 13, 0.7);
}

.user-row:hover {
    border-color: rgba(41, 217, 255, 0.32);
    background: rgba(13, 14, 22, 0.9);
}

.user-row-head {
    min-height: 42px;
    border-color: rgba(255, 35, 79, 0.28);
    background: rgba(255, 35, 79, 0.08);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 860;
    text-transform: uppercase;
}

.user-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.user-main strong,
.user-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-main strong {
    color: var(--ink);
    font-weight: 820;
}

.user-main small {
    color: var(--muted);
}

.row-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 830;
}

.status-active {
    border: 1px solid rgba(46, 229, 157, 0.3);
    background: rgba(46, 229, 157, 0.1);
    color: var(--success);
}

.status-muted {
    border: 1px solid rgba(141, 150, 171, 0.22);
    background: rgba(141, 150, 171, 0.1);
    color: var(--muted);
}

.workspace-page {
    width: min(1220px, calc(100% - 32px));
    min-height: calc(100vh - 86px);
    margin: 20px auto 40px;
}

.loading-shell {
    display: grid;
    min-height: 320px;
    place-items: center;
    color: var(--muted);
}

.file-workspace-shell {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 96px);
}

html.workspace-fullscreen-lock,
body.workspace-fullscreen-lock {
    height: 100%;
    overflow: hidden;
}

.file-workspace-shell.is-fullscreen {
    position: fixed;
    inset: 10px;
    z-index: 3000;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    height: calc(100dvh - 20px);
    padding: 0;
    border-radius: var(--radius);
    background: rgba(4, 5, 10, 0.96);
}

.file-workspace-shell.is-fullscreen .navigator-panel {
    display: none;
}

.file-workspace-shell.is-fullscreen .navigator-panel,
.file-workspace-shell.is-fullscreen .code-workbench {
    min-height: 0;
}

.file-workspace-shell.is-fullscreen .code-workbench {
    height: 100%;
    overflow: hidden;
}

.file-workspace-shell.is-fullscreen .editor-surface,
.file-workspace-shell.is-fullscreen .code-pane {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.file-workspace-shell.is-fullscreen .code-output {
    min-height: 0;
    overflow: auto;
}

.file-workspace-shell::after {
    position: absolute;
    inset: 8px;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 1px solid rgba(41, 217, 255, 0.45);
    border-radius: var(--radius);
    background: rgba(7, 8, 14, 0.72);
    color: var(--aqua);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    pointer-events: none;
    content: "Drop local";
    opacity: 0;
    transform: scale(0.99);
    transition: opacity 160ms var(--ease), transform 160ms var(--ease);
    backdrop-filter: blur(12px);
}

.file-workspace-shell.is-dragging::after {
    opacity: 1;
    transform: scale(1);
}

.navigator-panel,
.code-workbench {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 35, 79, 0.09), transparent 34%),
        rgba(10, 11, 17, 0.9);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px) saturate(130%);
}

.navigator-panel::before,
.code-workbench::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(90deg, var(--accent), transparent 32%) top left / 100% 1px no-repeat,
        linear-gradient(180deg, var(--accent), transparent 28%) top left / 1px 100% no-repeat,
        linear-gradient(270deg, var(--aqua), transparent 34%) bottom right / 100% 1px no-repeat;
    opacity: 0.58;
}

.navigator-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.workspace-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.workspace-kicker span {
    color: var(--aqua);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.workspace-kicker strong {
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 850;
}

.workspace-actions,
.toolbar-actions,
.empty-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.workspace-actions .primary-button,
.workspace-actions .secondary-button,
.workspace-actions .danger-button {
    flex: 1 1 0;
    min-width: 0;
}

.workspace-switcher {
    display: grid;
    gap: 8px;
}

.workspace-switcher-head {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.workspace-switcher-head > span {
    color: var(--aqua);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.workspace-list {
    display: grid;
    max-height: 152px;
    gap: 5px;
    overflow: auto;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(4, 5, 10, 0.34);
}

.workspace-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 4px;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
}

.workspace-item.is-active {
    border-color: rgba(255, 35, 79, 0.48);
    background:
        linear-gradient(90deg, rgba(255, 35, 79, 0.14), transparent),
        rgba(14, 15, 23, 0.78);
    box-shadow: 0 0 22px rgba(255, 35, 79, 0.12);
}

.workspace-select,
.workspace-delete {
    border: 0;
    background: transparent;
}

.workspace-select {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    grid-template-rows: 16px 13px;
    column-gap: 7px;
    align-items: center;
    min-width: 0;
    min-height: 38px;
    padding: 5px 7px;
    color: var(--ink-soft);
    text-align: left;
}

.workspace-select .lucide {
    grid-row: 1 / 3;
    width: 0.88rem;
    height: 0.88rem;
    color: var(--accent);
}

.workspace-select span,
.workspace-select small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-select span {
    color: #fff;
    font-size: 0.74rem;
    font-weight: 820;
}

.workspace-select small {
    color: var(--muted);
    font-size: 0.61rem;
    font-weight: 760;
    text-transform: uppercase;
}

.workspace-delete {
    display: inline-grid;
    width: 30px;
    min-height: 38px;
    place-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted-2);
}

.workspace-delete:hover {
    color: var(--danger);
    background: rgba(255, 84, 114, 0.08);
}

.workspace-delete .lucide {
    width: 0.85rem;
    height: 0.85rem;
}

.tree-panel {
    min-height: 0;
    overflow: auto;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 28px),
        rgba(4, 5, 10, 0.46);
}

.tree-empty {
    display: grid;
    gap: 10px;
    padding: 18px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.tree-empty .lucide {
    color: var(--aqua);
}

.tree-row {
    --depth: 0;
    margin-bottom: 3px;
}

.tree-button {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 30px;
    padding: 0 8px 0 calc(8px + var(--depth) * 14px);
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.76rem;
    text-align: left;
}

.tree-button:hover,
.tree-row.is-active .tree-button {
    border-color: rgba(41, 217, 255, 0.28);
    background: rgba(41, 217, 255, 0.08);
    color: #fff;
}

.tree-row.is-file .tree-button {
    color: var(--muted);
}

.tree-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 4px;
    align-items: center;
}

.tree-file-row .tree-button {
    min-width: 0;
}

.tree-delete {
    display: inline-grid;
    width: 28px;
    height: 30px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted-2);
}

.tree-delete:hover {
    border-color: rgba(255, 84, 114, 0.34);
    background: rgba(255, 84, 114, 0.08);
    color: var(--danger);
}

.tree-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-button em {
    color: var(--muted-2);
    font-size: 0.72rem;
    font-style: normal;
}

.tree-button .lucide {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--accent);
}

.tree-row.is-file .lucide {
    color: var(--aqua);
}

.tree-delete .lucide,
.tree-row.is-file .tree-delete .lucide {
    width: 0.86rem;
    height: 0.86rem;
    color: currentColor;
}

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

.workspace-metrics span {
    display: grid;
    gap: 2px;
    min-height: 46px;
    align-content: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 760;
    text-transform: uppercase;
}

.workspace-metrics strong {
    color: #fff;
    font-size: 0.96rem;
    line-height: 1;
}

.code-workbench {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 16px;
}

.workspace-toolbar {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.workspace-toolbar h1 {
    font-size: clamp(1.35rem, 1.8vw, 1.65rem);
    line-height: 1;
}

.tabs-strip {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
    margin: 0 0 10px;
    padding: 0 0 6px;
    overflow-x: auto;
}

.file-tab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    width: 176px;
    min-width: 176px;
    height: 44px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
        rgba(13, 14, 22, 0.88);
}

.file-tab.is-active {
    border-color: rgba(255, 35, 79, 0.54);
    box-shadow: 0 0 24px rgba(255, 35, 79, 0.16);
}

.file-tab.is-empty {
    border-style: dashed;
}

.tab-main,
.tab-close {
    min-height: 42px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
}

.tab-main {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    grid-template-rows: 17px 13px;
    column-gap: 7px;
    row-gap: 0;
    align-content: center;
    align-items: center;
    min-width: 0;
    padding: 5px 8px;
    text-align: left;
}

.tab-main .lucide {
    grid-row: 1 / 3;
    width: 0.86rem;
    height: 0.86rem;
}

.tab-main span,
.tab-main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-main small {
    grid-column: 2;
    color: var(--muted-2);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.tab-main span {
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1.05;
}

.tab-close {
    display: grid;
    place-items: center;
    width: 28px;
    padding: 0;
    color: var(--muted);
}

.tab-close .lucide {
    width: 0.78rem;
    height: 0.78rem;
}

.tab-close:hover {
    background: rgba(255, 35, 79, 0.12);
    color: var(--accent);
}

.editor-surface {
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
        rgba(4, 5, 10, 0.76);
}

.empty-editor {
    display: grid;
    min-height: 100%;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 32px;
    text-align: center;
}

.empty-editor > .lucide {
    width: 56px;
    height: 56px;
    color: var(--accent);
    filter: drop-shadow(0 0 20px rgba(255, 35, 79, 0.45));
}

.empty-editor h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 900;
    text-transform: uppercase;
}

.empty-editor p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
}

.code-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100%;
}

.code-header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
}

.code-header div {
    display: grid;
    min-width: 0;
}

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

.code-header strong {
    color: #fff;
    font-size: 0.8rem;
}

.code-header span,
.code-header small {
    color: var(--muted);
    font-size: 0.66rem;
}

.code-header small {
    flex: 0 0 auto;
    color: var(--aqua);
    font-weight: 850;
    text-transform: uppercase;
}

.code-header-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}

.code-header-actions .icon-button {
    width: 30px;
    min-height: 30px;
    height: 30px;
    flex-basis: 30px;
}

.danger-icon {
    border-color: rgba(255, 84, 114, 0.24);
    color: var(--danger);
}

.danger-icon:hover {
    border-color: rgba(255, 84, 114, 0.5);
    background: rgba(255, 84, 114, 0.1);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 84, 114, 0.16);
}

.code-output {
    display: grid;
    grid-template-columns: auto minmax(max-content, 1fr);
    align-items: start;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto;
    color: #dce3f3;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.68;
    tab-size: 4;
    white-space: pre;
}

.code-output code {
    display: block;
    min-width: max-content;
    padding: 16px 18px;
}

.code-gutter {
    position: sticky;
    left: 0;
    z-index: 1;
    display: grid;
    min-height: 100%;
    padding: 16px 10px 16px 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(90deg, rgba(255, 35, 79, 0.08), transparent),
        rgba(9, 10, 16, 0.96);
    color: rgba(141, 150, 171, 0.82);
    font-variant-numeric: tabular-nums;
    text-align: right;
    user-select: none;
}

.code-gutter span {
    min-width: 2.6ch;
    line-height: 1.68;
}

.code-output .hljs-keyword,
.code-output .hljs-selector-tag,
.code-output .hljs-title.function_ {
    color: #ff5f7e;
}

.code-output .hljs-string,
.code-output .hljs-attr,
.code-output .hljs-template-variable {
    color: #6de7ff;
}

.code-output .hljs-number,
.code-output .hljs-literal,
.code-output .hljs-built_in {
    color: #ffd166;
}

.code-output .hljs-comment {
    color: #6f778b;
    font-style: italic;
}

.code-output .hljs-title,
.code-output .hljs-name,
.code-output .hljs-variable {
    color: #f4f7ff;
}

.workspace-status {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding-top: 12px;
    color: var(--muted);
    font-size: 0.78rem;
}

.workspace-status strong {
    color: var(--aqua);
    font-size: 0.76rem;
}

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

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

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

@keyframes row-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes beam-scan {
    from {
        opacity: 0.48;
        filter: blur(0);
    }

    to {
        opacity: 1;
        filter: blur(1px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

@media (max-width: 1040px) {
    .file-workspace-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .workspace-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .auth-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-visual {
        min-height: 230px;
    }

    .gx-core {
        right: 9%;
        bottom: 12%;
        width: 108px;
        height: 108px;
    }

    .gx-core .lucide {
        width: 42px;
        height: 42px;
    }

    .login-card {
        width: calc(100% - 36px);
        margin: 0 auto 24px;
    }

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

    .workspace-page {
        width: min(100% - 24px, 1480px);
    }

    .file-workspace-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .file-workspace-shell.is-fullscreen {
        inset: 8px;
        grid-template-columns: 1fr;
        height: calc(100dvh - 16px);
        overflow: auto;
    }

    .navigator-panel {
        min-height: 360px;
    }

    .tree-panel {
        max-height: 300px;
    }

    .code-workbench {
        min-height: 680px;
    }

    .side-panel {
        position: static;
        order: -1;
    }
}

@media (max-width: 680px) {
    .topbar {
        min-height: 66px;
        padding: 0 14px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .brand-copy small {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-actions .secondary-button span,
    .topbar-form .secondary-button span {
        display: none;
    }

    .app-shell,
    .narrow-shell {
        width: min(100% - 22px, 1240px);
        margin-top: 18px;
    }

    .auth-wordmark strong {
        font-size: 2.25rem;
    }

    .editor-panel,
    .side-panel,
    .login-card {
        padding: 20px;
    }

    .auth-heading {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 14px;
        align-items: start;
    }

    .login-card h1 {
        font-size: clamp(1.85rem, 8vw, 2.2rem);
    }

    .panel-heading,
    .section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-heading {
        align-items: start;
    }

    .panel-heading .primary-button,
    .section-title .secondary-button {
        flex: 1 1 auto;
        width: 100%;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.02;
    }

    textarea,
    .paste-content {
        min-height: 300px;
    }

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

    .icon-button {
        width: 100%;
    }

    .metric-value {
        font-size: 3.2rem;
    }

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

    .user-row-head {
        display: none;
    }

    .row-actions {
        justify-content: stretch;
    }

    .row-actions .secondary-button {
        flex: 1 1 auto;
    }

    .workspace-page {
        width: min(100% - 18px, 1480px);
        margin-top: 12px;
    }

    .navigator-panel,
    .code-workbench {
        padding: 14px;
    }

    .workspace-actions,
    .toolbar-actions,
    .empty-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-actions .primary-button,
    .workspace-actions .secondary-button,
    .workspace-actions .danger-button,
    .toolbar-actions .secondary-button,
    .empty-actions .primary-button,
    .empty-actions .secondary-button {
        width: 100%;
    }

    .workspace-metrics {
        grid-template-columns: 1fr;
    }

    .workspace-toolbar h1 {
        font-size: 1.85rem;
    }

    .file-tab {
        grid-template-columns: minmax(118px, 1fr) 34px;
        min-width: 172px;
    }

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

    .code-header small {
        align-self: start;
    }

    .code-output {
        font-size: 0.82rem;
    }

    .code-output code {
        padding: 14px;
    }

    .code-gutter {
        padding: 14px 8px 14px 10px;
    }
}
