:root {
    --bg: #f5f5f5;
    --panel: rgba(255, 255, 255, 0.98);
    --text: #111111;
    --muted: #6b6b6b;
    --line: #000000;
    --button: #111111;
    --button-text: #ffffff;
    --surface-radius: 28px;
    --control-radius: 20px;
    --control-height: 54px;
    --content-width: 1120px;
    --shell-frame-padding: clamp(18px, 3vw, 34px);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.04);
    --soft-line: #d9d9d4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text);
    text-decoration: none;
}

.shell {
    min-height: 100vh;
    display: grid;
    align-content: start;
    justify-items: center;
    padding: 24px;
}

.shell-frame {
    width: 100%;
    max-width: var(--content-width);
    display: grid;
    gap: 12px;
}

.shell-top {
    display: grid;
    gap: 12px;
}

.shell-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    width: 100%;
    padding: 26px var(--shell-frame-padding);
    border: 1px solid var(--line);
    border-radius: var(--surface-radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

.brand-logo-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: auto;
    height: clamp(43px, 5.6vw, 54px);
    object-fit: contain;
    max-width: 100%;
}

.brand-heading {
    margin: 0;
    justify-self: end;
    text-align: right;
    min-width: 0;
}

.brand-name-link {
    display: inline-block;
    font-size: clamp(2.2rem, 4.6vw, 2.8rem);
    font-weight: 200;
    letter-spacing: 0.01em;
    line-height: 1;
}

.subtitle,
.lead {
    color: var(--muted);
}

.messages {
    display: grid;
    gap: 12px;
}

.message {
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--surface-radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.shell-main {
    display: grid;
    gap: 12px;
}

.page-head {
    margin: 8px 0 4px;
}

.hero-card {
    margin-top: 28px;
    padding: 36px;
}

.hero-card.narrow {
    max-width: 640px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--muted);
}

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

.hero-actions {
    margin: 24px 0 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-height);
    height: var(--control-height);
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--button);
    color: var(--button-text);
    cursor: pointer;
}

.button:disabled {
    background: #efefef;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--surface-radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.button-secondary {
    background: #efefef;
    color: var(--text);
}

.workspace-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shell-button-row {
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.shell-control-button,
.shell-control-static {
    min-height: 43px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    white-space: nowrap;
}

.shell-control-button {
    background: var(--text);
    color: #fff;
}

.shell-control-static {
    background: #fff;
    color: var(--text);
}

.user-chip {
    color: #555;
}

.form-shell {
    display: grid;
    gap: 20px;
}

.form-panel {
    display: grid;
    gap: 20px;
}

.section-block {
    display: grid;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--soft-line);
}

.section-head {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.status-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    white-space: nowrap;
}

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

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

.field span:first-child {
    color: var(--muted);
    font-size: 0.92rem;
}

.field-checkbox {
    align-content: center;
}

.checkbox-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 48px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #f2f2ef;
    color: #444444;
}

.checkbox-input {
    width: auto;
    min-width: 18px;
    min-height: 18px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field-error,
.error-block {
    color: #8a1f1f;
}

@media (max-width: 900px) {
    .shell-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .brand-heading {
        justify-self: start;
        text-align: left;
    }

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

    .workspace-tabs,
    .shell-button-row {
        justify-content: stretch;
    }

    .shell-control-button,
    .shell-control-static {
        width: 100%;
    }
}
