:root {
    --bg: #f3efe7;
    --panel: #fffdf8;
    --line: #d7cbb6;
    --text: #221f1a;
    --muted: #706759;
    --accent: #0f6c5c;
    --accent-soft: #d7efe9;
    --danger: #9c3b2c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", sans-serif; background: linear-gradient(135deg, #f7f4ed, #ece4d7); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
small, .muted { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
textarea { resize: vertical; }
button { border: 0; cursor: pointer; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #ece3d4; vertical-align: top; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.shell-auth { grid-template-columns: minmax(0, 1fr); }
.sidebar { background: rgba(34, 31, 26, 0.96); color: white; padding: 2rem; display: flex; flex-direction: column; gap: 2rem; }
.content { padding: 2rem; }
.content-auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; }
.nav { display: grid; gap: 0.6rem; }
.nav a { color: rgba(255,255,255,0.78); padding: 0.9rem 1rem; border-radius: 14px; background: rgba(255,255,255,0.05); }
.nav a.active, .nav a:hover { color: white; background: rgba(255,255,255,0.14); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: #c2b7a5; margin-bottom: 0.6rem; }
.page-header, .section-heading, .actions, .header-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.stats-grid, .grid { display: grid; gap: 1rem; }
.stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.two-thirds { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.card, .auth-card, .stat-card { background: rgba(255,255,255,0.82); border: 1px solid rgba(215,203,182,0.85); border-radius: 24px; padding: 1.4rem; box-shadow: 0 10px 30px rgba(72, 57, 27, 0.07); }
.auth-card { width: min(560px, 100%); display: grid; gap: 1.5rem; }
.auth-shell { width: min(1120px, 100%); flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px); gap: 1.5rem; align-items: stretch; }
.auth-hero { position: relative; overflow: hidden; padding: 2.2rem; border-radius: 28px; background:
    radial-gradient(circle at top right, rgba(255,255,255,0.65), transparent 32%),
    linear-gradient(145deg, #123f4a, #1f6d63 55%, #d8efe9 145%);
    color: white;
    min-height: 100%;
    box-shadow: 0 18px 40px rgba(26, 41, 39, 0.18);
}
.auth-hero .eyebrow,
.auth-hero .muted { color: rgba(255,255,255,0.8); }
.auth-hero h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; max-width: 10ch; margin-bottom: 1rem; }
.auth-highlights, .demo-grid { display: grid; gap: 0.85rem; }
.auth-highlights { margin-top: 2rem; }
.auth-highlight { padding: 1rem 1.1rem; border-radius: 18px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(8px); }
.auth-highlight strong { display: block; margin-bottom: 0.35rem; }
.auth-form-card { width: 100%; background: rgba(255,255,255,0.9); padding: 1.6rem; }
.stat-card strong { display: block; font-size: 2rem; margin-top: 0.35rem; }
.badge { display: inline-flex; padding: 0.45rem 0.8rem; border-radius: 999px; background: var(--accent); color: white; font-size: 0.8rem; }
.badge.soft { background: var(--accent-soft); color: var(--accent); }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 0.85rem 1.2rem; border-radius: 14px; background: var(--accent); color: white; font-weight: 600; }
.button-secondary { background: #efe6d8; color: var(--text); }
.button-warning { background: #f3dfbf; color: #6e4a00; }
.full-width { width: 100%; }
.flash { border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.flash.success { background: #dff1e9; color: #0e5f51; }
.flash.danger { background: #f8e1dc; color: var(--danger); }
.stack, .stack-lg, .timeline, .comment-list, .file-list { display: grid; gap: 1rem; }
.stack-lg { gap: 1.5rem; }
.top-border { border-top: 1px solid #ece3d4; margin-top: 1rem; padding-top: 1rem; }
.detail-row, .timeline-item { padding-bottom: 0.85rem; border-bottom: 1px solid #efe7da; }
.version-card, .field-builder, .demo-box { padding: 1rem; border: 1px solid #ece3d4; border-radius: 18px; background: var(--panel); }
.demo-box h3 { margin-bottom: 0.9rem; }
.demo-box p:last-child { margin-bottom: 0; }
.field-builder.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); display: grid; gap: 1rem; }
.checkbox-row { display: flex; gap: 0.7rem; align-items: center; }
.checkbox-row input { width: auto; }
.inline-check { margin-top: 1.8rem; }
.inline-actions { justify-content: flex-start; align-items: center; }
.align-end { align-items: end; }
.file-list a { display: inline-flex; padding: 0.6rem 0.8rem; border-radius: 12px; background: #f1ede4; margin-right: 0.5rem; }
.table-wrap { overflow-x: auto; }
@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .stats-grid, .grid.two, .grid.two-thirds { grid-template-columns: 1fr; }
    .field-builder.compact { grid-template-columns: 1fr; }
    .content { padding: 1rem; }
    .content-auth { padding: 1rem; min-height: auto; align-items: stretch; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { min-height: auto; }
    .auth-hero h1 { max-width: none; }
}

@media (max-width: 640px) {
    .auth-hero,
    .auth-form-card { padding: 1.25rem; border-radius: 22px; }
    .auth-card { gap: 1.25rem; }
    .checkbox-row { align-items: flex-start; }
    .demo-grid { gap: 0.65rem; }
}
