body {
    background: #f3efe7;
    color: #2f241c;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: #8a3d16;
}

.app-shell {
    min-height: 100vh;
}

.app-header {
    align-items: center;
    background: linear-gradient(135deg, #fffaf3, #ead9c7);
    border-bottom: 1px solid #d9c4b1;
    display: flex;
    justify-content: space-between;
    padding: 1.6rem 2rem;
}

.brand {
    color: #2f241c;
    font-size: 2.2rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-subtitle {
    color: #6a564a;
    font-size: 1.3rem;
}

.main-nav {
    align-items: center;
    display: flex;
    gap: 1.2rem;
}

.nav-user {
    color: #6a564a;
    font-size: 1.3rem;
}

.container {
    margin: 0 auto;
    max-width: 1240px;
    padding: 2rem;
}

.page-section {
    display: grid;
    gap: 1.6rem;
}

.page-section.narrow {
    max-width: 860px;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.section-heading h2,
.section-heading h3,
.panel h3 {
    margin-bottom: 0.4rem;
}

.panel {
    background: #fffaf5;
    border: 1px solid #dcc9b7;
    border-radius: 1.2rem;
    box-shadow: 0 0.8rem 2rem rgba(98, 67, 40, 0.08);
    padding: 1.8rem;
}

.grid-2,
.grid-4,
.two-column,
.button-row,
.meta-grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.two-column {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.button-row {
    grid-auto-flow: column;
    justify-content: start;
}

.button,
button,
input[type="submit"] {
    border-radius: 999px;
}

.button-primary,
button.button-primary {
    background: #8a3d16;
    border-color: #8a3d16;
}

.button-outline {
    background: transparent;
    border: 1px solid #8a3d16;
    color: #8a3d16;
}

.muted {
    color: #6a564a;
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: 1.1rem;
    padding: 0.3rem 0.9rem;
    text-transform: capitalize;
}

.status-draft,
.status-script_ready {
    background: #f5e4bf;
}

.status-ready {
    background: #cfe9cf;
}

.status-failed {
    background: #f2c8c5;
}

.thumb {
    border: 1px solid #dcc9b7;
    border-radius: 0.8rem;
    display: block;
    max-height: 70px;
    max-width: 120px;
}

.meta-list {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 140px 1fr;
    margin: 0;
}

.meta-list dt {
    font-weight: 700;
}

.meta-list dd {
    margin: 0;
}

.log-box,
textarea[readonly] {
    background: #2b211d;
    border-radius: 1rem;
    color: #f6efe5;
    font-family: "Courier New", monospace;
    min-height: 180px;
    overflow: auto;
    padding: 1rem;
    white-space: pre-wrap;
}

.actions {
    white-space: nowrap;
}

.auth-page {
    align-items: center;
    background: radial-gradient(circle at top, #f8e9d6, #ead5c0 48%, #f5efe6);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: #fffaf5;
    border: 1px solid #dcc9b7;
    border-radius: 1.4rem;
    box-shadow: 0 1rem 3rem rgba(98, 67, 40, 0.12);
    max-width: 520px;
    padding: 2rem;
    width: 100%;
}

@media (max-width: 900px) {
    .app-header,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav,
    .button-row {
        grid-auto-flow: row;
    }

    .container {
        padding: 1.2rem;
    }
}
