:root {
    --bg: #f7f0e6;
    --bg-strong: #e7dac7;
    --card: rgba(255, 250, 244, 0.84);
    --card-strong: #fffaf4;
    --line: rgba(77, 53, 35, 0.14);
    --text: #2a190f;
    --muted: #765747;
    --accent: #be4f2d;
    --accent-strong: #8f2f13;
    --accent-soft: rgba(190, 79, 45, 0.1);
    --success: #177245;
    --danger: #b42318;
    --shadow: 0 24px 80px rgba(63, 36, 16, 0.16);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(190, 79, 45, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(23, 114, 69, 0.14), transparent 30%),
        linear-gradient(135deg, #f8f1e8 0%, #efe0cc 52%, #e8d4c0 100%);
}

button,
input {
    font: inherit;
}

.page-shell {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    min-height: 100vh;
    padding: 28px;
}

.sidebar-card,
.panel,
.modal-card,
.toast,
.hero-panel {
    backdrop-filter: blur(16px);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-radius: var(--radius-xl);
    padding: 28px;
}

.brand-lockup h1,
.hero-panel h2,
.panel h3,
.modal-card h3 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    line-height: 1.05;
}

.brand-lockup h1 {
    font-size: 2.4rem;
    margin-top: 14px;
}

.brand-lockup p,
.panel-copy,
.dashboard-copy {
    color: var(--muted);
    line-height: 1.6;
}

.brand-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.brand-badge {
    padding: 8px 14px;
    background: var(--accent-soft);
    border-radius: 999px;
}

.status-stack {
    display: grid;
    gap: 18px;
}

.info-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(77, 53, 35, 0.08);
}

.flow-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.mono-text {
    margin: 10px 0 0;
    font-family: "SFMono-Regular", "Consolas", monospace;
    word-break: break-word;
}

.content-stage {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    border-radius: var(--radius-xl);
}

.hero-panel h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    max-width: 13ch;
}

.panel-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 24px;
}

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

.panel {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.auth-panel,
.activity-panel {
    min-height: 620px;
}

.panel-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px;
    background: rgba(42, 25, 15, 0.04);
    border-radius: 999px;
}

.tab-button,
.primary-button,
.secondary-button,
.ghost-button {
    border: 0;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.tab-button {
    border-radius: 999px;
    padding: 12px 18px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
}

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

.tab-panel {
    display: none;
    margin-top: 26px;
}

.tab-panel.active {
    display: block;
}

.form-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

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

.field span {
    font-size: 0.95rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(77, 53, 35, 0.16);
    background: rgba(255, 255, 255, 0.78);
    padding: 14px 16px;
    color: var(--text);
    outline: none;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(190, 79, 45, 0.12);
}

.field-error {
    min-height: 18px;
    color: var(--danger);
    font-size: 0.82rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 999px;
    font-weight: 700;
}

.primary-button {
    padding: 0 22px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff8f2;
}

.secondary-button {
    padding: 0 20px;
    background: rgba(42, 25, 15, 0.08);
    color: var(--text);
}

.ghost-button {
    padding: 10px 14px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.tab-button:hover {
    transform: translateY(-1px);
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.response-log {
    margin: 24px 0 0;
    min-height: 520px;
    overflow: auto;
    padding: 20px;
    border-radius: var(--radius-md);
    background: #22150f;
    color: #fbe6d5;
    font-family: "SFMono-Regular", "Consolas", monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

.accent-card {
    background:
        linear-gradient(135deg, rgba(190, 79, 45, 0.12), rgba(255, 255, 255, 0.68)),
        var(--card);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 160px) 1fr;
    gap: 12px 16px;
    margin: 18px 0 0;
}

.detail-grid dt {
    color: var(--muted);
}

.detail-grid dd {
    margin: 0;
    font-weight: 600;
    word-break: break-word;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 40;
    max-width: 420px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    color: var(--text);
    animation: slide-in 180ms ease;
}

.toast.success {
    border-color: rgba(23, 114, 69, 0.22);
    background: rgba(239, 251, 243, 0.95);
}

.toast.error {
    border-color: rgba(180, 35, 24, 0.22);
    background: rgba(255, 241, 239, 0.96);
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(28, 16, 9, 0.42);
}

.modal-card {
    width: min(100%, 520px);
    border-radius: var(--radius-xl);
    padding: 26px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.hidden {
    display: none !important;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .page-shell,
    .panel-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        order: 2;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 16px;
        gap: 16px;
    }

    .sidebar-card,
    .panel,
    .hero-panel,
    .modal-card {
        padding: 20px;
        border-radius: 22px;
    }

    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-panel h2 {
        max-width: none;
        font-size: 2.2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
