:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #15171a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #111827;
  --danger: #b42318;
  --success: #067647;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; }
.topbar { max-width: 980px; margin: 0 auto; padding: 32px 24px 12px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
h1 { margin: 4px 0 0; font-size: 30px; }
h2 { margin: 4px 0 0; font-size: 22px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.logout { color: var(--ink); font-weight: 700; text-decoration: none; }
.app-shell { max-width: 980px; margin: 0 auto; padding: 16px 24px 56px; display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 22px rgba(0,0,0,.04); }
.input-card, .result-card { padding: 24px; }
label { display: block; font-weight: 800; margin-bottom: 10px; }
textarea, input[type="password"] { width: 100%; border: 1px solid #cfd4dc; border-radius: 12px; padding: 14px 16px; background: #fff; color: var(--ink); outline: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
textarea:focus, input[type="password"]:focus { border-color: #7c8798; box-shadow: 0 0 0 3px rgba(124,135,152,.14); }
.input-meta { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
button { border: 0; border-radius: 11px; background: var(--primary); color: #fff; padding: 12px 17px; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #eef0f3; color: #20242b; }
.small-button { padding: 9px 12px; font-size: 12px; }
.status { min-height: 22px; margin-top: 12px; font-size: 14px; }
.status.error { color: var(--danger); }
.status.success { color: var(--success); }
.status.loading { color: var(--muted); }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; margin-bottom: 6px; }
.result-value { font-size: 26px; font-weight: 900; letter-spacing: .01em; }
.result-value.huge { font-size: 42px; }
.color-block { display: flex; align-items: center; gap: 10px; }
.line-actions { display: flex; align-items: center; gap: 14px; }
.swatch { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(0,0,0,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.swatch.small { width: 24px; height: 24px; border-radius: 7px; }
code { background: #f5f6f7; padding: 6px 8px; border-radius: 7px; font-size: 12px; }
.accent-footer { display: flex; align-items: center; gap: 10px; padding-top: 18px; color: var(--muted); font-size: 13px; }
.hidden { display: none; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 28px; }
.login-card .muted { color: var(--muted); margin: 10px 0 22px; }
.login-card button { width: 100%; margin-top: 14px; }
.alert { padding: 11px 13px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.alert.error { background: #fff1f0; color: var(--danger); border: 1px solid #ffd7d3; }
@media (max-width: 680px) {
  .topbar, .result-head, .result-row, .line-actions { align-items: flex-start; }
  .topbar, .result-head, .result-row { flex-direction: column; }
  .line-actions { width: 100%; justify-content: space-between; }
  .result-value { font-size: 22px; }
}
