:root {
    --bg: #f7f1e7;
    --bg-accent: radial-gradient(circle at top left, rgba(222, 153, 67, 0.35), transparent 32%), radial-gradient(circle at right 20%, rgba(18, 18, 18, 0.09), transparent 28%), #f7f1e7;
    --panel: rgba(255, 250, 244, 0.84);
    --panel-strong: #fff8f0;
    --text: #181511;
    --muted: #6f675e;
    --line: rgba(24, 21, 17, 0.1);
    --brand: #de9943;
    --brand-dark: #8a5520;
    --danger: #b6452c;
    --ok: #1b7f54;
    --shadow: 0 30px 60px rgba(24, 21, 17, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-accent);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
}

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

code,
input,
select,
textarea,
button {
    font: inherit;
}

code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.92rem;
}

.page-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.site-header,
.hero-card,
.panel,
.stat-card,
.flash-card {
    backdrop-filter: blur(18px);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.muted,
.meta-label,
.eyebrow {
    color: var(--muted);
}

.brand-mark {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #f6bf73);
    box-shadow: 0 0 0 7px rgba(222, 153, 67, 0.14);
}

.site-nav {
    display: flex;
    gap: 18px;
    font-size: 0.96rem;
}

.content-shell {
    display: grid;
    gap: 22px;
}

.hero-card,
.panel,
.stat-card,
.flash-card {
    border-radius: var(--radius);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    align-items: end;
}

.hero-card h1 {
    margin: 8px 0 0;
    font-size: clamp(2rem, 3.5vw, 3.4rem);
    line-height: 0.98;
    max-width: 14ch;
}

.lede {
    max-width: 62ch;
    margin: 14px 0 0;
    color: var(--muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    margin: 0;
}

.stats-grid,
.panel-grid,
.split-grid {
    display: grid;
    gap: 18px;
}

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

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.stat-card strong {
    font-size: 2.1rem;
}

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

.panel {
    padding: 24px;
}

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

.section-heading h2 {
    margin: 0;
}

.form-grid,
.timeline,
.health-list,
.stack-actions {
    display: grid;
    gap: 16px;
}

label span,
.meta-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
    padding: 14px 16px;
}

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

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    padding: 13px 18px;
    min-height: 46px;
}

.primary-button {
    background: linear-gradient(135deg, var(--brand), #f0b86d);
    color: #181511;
    font-weight: 700;
}

.ghost-button {
    background: rgba(24, 21, 17, 0.06);
    color: var(--text);
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
    text-transform: capitalize;
    background: rgba(24, 21, 17, 0.08);
}

.status-ok,
.status-running {
    background: rgba(27, 127, 84, 0.14);
    color: var(--ok);
}

.status-failed,
.status-failed,
.status-deleting {
    background: rgba(182, 69, 44, 0.14);
    color: var(--danger);
}

.status-creating,
.status-stopping,
.status-stopped {
    background: rgba(138, 85, 32, 0.12);
    color: var(--brand-dark);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-item,
.health-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.timeline-item span,
.health-row span {
    color: var(--muted);
}

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

.detail-grid-wide {
    grid-column: 1 / -1;
}

.danger-box,
.flash-error {
    color: var(--danger);
    background: rgba(182, 69, 44, 0.08);
}

.flash-card {
    padding: 16px 18px;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.checkbox-row input {
    width: auto;
}

.empty-row {
    text-align: center;
    color: var(--muted);
}

@media (max-width: 860px) {
    .site-header,
    .hero-card,
    .panel-grid,
    .stats-grid,
    .split-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .site-header,
    .hero-card {
        border-radius: 28px;
        align-items: start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
    }
}
