:root {
    --bg: #f3efe6;
    --panel: #fffaf2;
    --panel-strong: #fffdf8;
    --border: #d9cfbe;
    --text: #1f1a14;
    --muted: #675e53;
    --accent: #b4552d;
    --accent-soft: #f5ddca;
    --success: #2f7d5f;
    --success-soft: #dff3eb;
    --danger: #9e2c2c;
    --danger-soft: #f8dddd;
    --shadow: 0 18px 45px rgba(57, 37, 20, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(180, 85, 45, 0.1), transparent 30%),
        linear-gradient(180deg, #efe6d8 0%, var(--bg) 18%, #efe9dd 100%);
}

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

a:hover {
    text-decoration: underline;
}

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

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.brand {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.tagline {
    margin: 6px 0 0;
    color: var(--muted);
    max-width: 640px;
}

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

.content {
    display: grid;
    gap: 20px;
}

.panel {
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

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

.panel-header h1,
.panel-header h2,
.panel-header h3,
.panel h2,
.panel h3 {
    margin: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: 1.1fr 0.9fr;
}

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

.stat {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-row {
    display: grid;
    gap: 8px;
}

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

label {
    font-size: 0.92rem;
    font-weight: 700;
}

input,
textarea,
button,
.button {
    font: inherit;
}

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

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

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

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

.helper,
.muted {
    color: var(--muted);
    font-size: 0.92rem;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.flash-success {
    background: var(--success-soft);
    border-color: rgba(47, 125, 95, 0.18);
    color: #1d5a43;
}

.flash-error {
    background: var(--danger-soft);
    border-color: rgba(158, 44, 44, 0.18);
    color: #792020;
}

.callout {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: #6e3016;
    border: 1px solid rgba(180, 85, 45, 0.16);
}

code {
    font-family: Consolas, Monaco, monospace;
    background: rgba(31, 26, 20, 0.06);
    border-radius: 8px;
    padding: 2px 6px;
}

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

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

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(103, 94, 83, 0.16);
    vertical-align: top;
}

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

.stack {
    display: grid;
    gap: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pill-active {
    background: var(--success-soft);
    color: #1d5a43;
}

.pill-paused {
    background: rgba(31, 26, 20, 0.08);
    color: var(--text);
}

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

.bar-list {
    display: grid;
    gap: 12px;
}

.bar-row {
    display: grid;
    gap: 6px;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
}

.bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(31, 26, 20, 0.08);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #c66c46 0%, #b4552d 100%);
}

.empty {
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
}

.login-card {
    width: min(460px, 100%);
    margin: 8vh auto 0;
}

@media (max-width: 980px) {
    .grid-2,
    .stats,
    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
    }
}

