* { box-sizing: border-box; }
body {
    margin: 0;
    background: #f5f5f2;
    color: #1f2933;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 180px 1fr; }
.side {
    background: #000;
    color: #f9fafb;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.brand { display: inline-flex; flex-direction: column; gap: 8px; align-items: flex-start; font-weight: 800; text-decoration: none; font-size: 20px; }
.brand-logo { display: block; width: 70px; height: auto; filter: brightness(0) invert(1); }
.brand-logo { margin-left: 5px; }
.brand span { padding-left: 12px; }
.menu-toggle, .menu-button { display: none; }
nav { display: grid; gap: 8px; }
nav a, .logout {
    color: #d1d5db; text-decoration: none; padding: 10px 12px; border-radius: 6px;
}
nav a:hover, .logout:hover { background: #161616; color: #fff; }
.logout { margin-top: auto; }
.main { padding: 28px; max-width: 1180px; width: 100%; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.kicker { margin: 0 0 4px; color: #6b7280; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
button, .button {
    border: 0; background: #1f2937; color: #fff; border-radius: 6px; padding: 10px 14px;
    font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
button.secondary, .button.secondary { background: #e5e7eb; color: #111827; }
button.danger { background: #b91c1c; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.inline-form { margin: 0; display: inline-block; }
.active-toggle-form { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.active-toggle {
    display: inline-flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 7px;
    cursor: pointer; font-weight: 700; white-space: nowrap;
}
.active-toggle input { width: 18px; height: 18px; margin: 0; accent-color: #1f2937; cursor: pointer; }
.active-toggle-form.is-saving { opacity: .55; pointer-events: none; }
.active-toggle-submit { padding: 6px 9px; font-size: 12px; }
html.js .active-toggle-submit { display: none; }
.notice { padding: 12px 14px; border-radius: 6px; margin-bottom: 18px; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.notice.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.panel {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); margin-bottom: 16px;
}
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 14px; }
.muted { color: #6b7280; }
.metric { font-size: 30px; font-weight: 800; margin-top: 8px; }
.timer { margin: 14px 0 0; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 700; }
.pill.bad { background: #fee2e2; color: #991b1b; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.table th { background: #f9fafb; font-size: 12px; color: #6b7280; text-transform: uppercase; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs a { text-decoration: none; padding: 8px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; color: #374151; }
.tabs a.active { background: #000; color: #fff; }
.form-grid { display: grid; gap: 12px; max-width: 720px; }
.form-grid.wide { max-width: 100%; }
label { display: grid; gap: 6px; font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%; border: 1px solid #d1d5db; border-radius: 6px; padding: 10px; font: inherit;
}
textarea { min-height: 260px; resize: vertical; line-height: 1.5; }
.checks { display: flex; gap: 18px; align-items: center; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 24px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #000; color: #f9fafb; padding: 12px; border-radius: 6px; }
.note-box { background: #f9fafb; color: #1f2933; border: 1px solid #e5e7eb; line-height: 1.55; }
@media (max-width: 760px) {
    .shell { grid-template-columns: 1fr; }
    .side {
        position: static;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 16px;
        align-items: center;
        padding: 16px 18px;
    }
    .brand { flex-direction: row; gap: 10px; align-items: center; width: max-content; }
    .brand span { padding-left: 0; text-align: left; }
    .brand-logo { width: 56px; margin-left: 0; }
    .menu-button {
        width: 42px; height: 42px; display: grid; place-content: center; gap: 5px;
        border: 1px solid rgba(249, 250, 251, .2); border-radius: 6px; cursor: pointer;
    }
    .menu-button span { display: block; width: 20px; height: 2px; background: #f9fafb; border-radius: 2px; }
    nav, .logout { display: none; }
    .menu-toggle:checked ~ nav { display: grid; grid-column: 1 / -1; gap: 8px; }
    .menu-toggle:checked ~ .logout { display: block; grid-column: 1 / -1; margin-top: 0; }
    .main { padding: 18px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .grid { grid-template-columns: 1fr; }
}
