:root {
    --bg: #f6f6f4;
    --surface: #ffffff;
    --text: #1d1d1b;
    --muted: #6b6b66;
    --border: #e3e3df;
    --accent: #1d9e75;
    --error: #a32d2d;
    --radius: 10px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.topbar .right { color: var(--muted); }
.topbar a { color: var(--accent); text-decoration: none; }
.container { max-width: 880px; margin: 0 auto; padding: 32px 20px; }
.muted { color: var(--muted); }
h1 { font-size: 22px; font-weight: 600; }

body.auth {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 360px;
}
.card h1 { margin-top: 0; }
form label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--muted);
}
form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}
button {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
button:hover { opacity: .92; }
.error {
    background: #fceaea;
    color: var(--error);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

/* --- Panels (settings, dashboard) --- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.panel h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.panel-head h2 { margin: 0; }

/* Buttons that are not full-width form submits. */
.btn {
    display: inline-block;
    padding: 11px 16px;
    width: auto;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    min-height: 44px;
    line-height: 22px;
}
.btn:hover { opacity: .92; }
.btn-secondary { background: #e9e9e6; color: var(--text); }
.btn-inline { width: auto; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-ok   { background: #e3f5ec; color: var(--accent); }
.badge-hot  { background: #fdeaea; color: #c0392b; }
.badge-warm { background: #fff3e0; color: #c77700; }
.badge-cold { background: #e9eef5; color: #46607e; }

/* Data tables */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}
table.data th { color: var(--muted); font-weight: 600; }

/* Draft review cards (dashboard) */
.draft {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    background: var(--surface);
}
.draft-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.draft-head strong { font-size: 15px; }
.draft .reasoning { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.draft .message {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    white-space: pre-wrap;
}
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.draft-actions .btn { flex: 1 1 auto; text-align: center; }
.empty-state { color: var(--muted); padding: 24px 0; }

h2 { font-size: 18px; }
