:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #2f2521;
  background: #fbf5f1;
  --accent: #ac3e27;
  --accent-dark: #8c2e1b;
  --ink: #2f2521;
  --muted: #695852;
  --line: #e7d8d0;
  --soft: #fff3ed;
  --surface: #fffdfa;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 5vw, 2.5rem); line-height: 1.12; letter-spacing: -.055em; }
h2 { font-size: 1.3rem; letter-spacing: -.03em; }
p { line-height: 1.6; color: var(--muted); }
a { color: var(--accent); }
code { font-size: .9em; overflow-wrap: anywhere; }

.form-page {
  display: grid;
  align-content: center;
  justify-items: center;
  background: radial-gradient(ellipse at top, #ffe4d5, transparent 65%), #fbf5f1;
  padding: 20px;
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 4vw, 32px); }
.submit-card { width: min(100%, 460px); box-shadow: 0 20px 60px #7b3c2516; }
.submit-card h1 { margin: 22px 0 12px; }
.submit-card form, .login label { margin-top: 24px; }
.submit-card .primary, .login .primary { margin-top: 12px; width: 100%; }
.login { max-width: 420px; margin: 20px auto; }
.login p { margin-top: 12px; }

.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 725; color: var(--ink); }
.mark { width: 24px; height: 24px; display: inline-grid; place-items: center; background: var(--accent); border-radius: 8px; }
.mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff8f5; }

label { font-size: .875rem; font-weight: 650; display: block; margin-bottom: 6px; }
input, button, select { font: inherit; }
input:not([type='checkbox']), select { border: 1px solid #bbaaa1; border-radius: 10px; padding: 0 12px; min-height: 44px; max-width: 100%; color: var(--ink); background: #fff; }
input:not([type='checkbox']) { width: 100%; font-size: 1rem; }
button, .button-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button-link:hover { background: var(--soft); }
button:disabled, select:disabled { cursor: default; opacity: .55; }
button.primary { min-height: 44px; background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: var(--accent-dark); }
:focus-visible { outline: 3px solid #b6462e; outline-offset: 3px; }
.message:empty { display: none; }
.message { margin-top: 12px; font-size: .9rem; }
.message[data-tone='error'] { color: #a42619; }
.message[data-tone='success'] { color: #286042; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-content, .dashboard { width: min(100% - 32px, 1060px); margin-inline: auto; }
.topbar-content { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding-block: 13px; }
.topbar-content a { font-size: .875rem; font-weight: 650; }
.dashboard { padding-block: 36px; }
.dashboard h1 + .panel { margin-top: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.summary { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.filter { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.filter select { min-height: 36px; }

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.schedule { background: #f9f2ed; padding: 12px 14px; border-radius: 12px; margin: 16px 0; }
.schedule h3 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.schedule p { font-size: .875rem; margin-top: 4px; }
.schedule-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; }
.schedule-form label { margin: 0; }
.schedule-form input { margin-top: 4px; }
.schedule .items { margin-top: 4px; }
.items { margin: 12px 0 0; padding: 0; list-style: none; }
.queue-item { border-top: 1px solid var(--line); padding-block: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.item-details { min-width: 0; display: grid; gap: 3px; }
.item-url { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.pending-links { margin-top: 12px; }
.pending-links textarea { width: 100%; padding: 10px 12px; border: 1px solid #bbaaa1; border-radius: 10px; font: inherit; resize: vertical; }
.empty { padding-block: 16px; color: var(--muted); }

@media (max-width: 650px) {
  .dashboard { padding-block: 24px; }
  .queue-item { align-items: start; flex-direction: column; }
}
