:root {
  --bg: #000000;
  --panel: #0d0d0c;
  --line: #232320;
  --fg: #e9e8e2;
  --muted: #706e66;
  --accent: #f2a93b;   /* urgente */
  --ok: #4f9b6e;       /* con margen */
  --warn: #d9633b;     /* vencida / crítica */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100%;
}

body {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.screen { display: none; max-width: 560px; margin: 0 auto; padding: 28px 20px 60px; }
.screen.active { display: block; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

h1 .count { color: var(--muted); font-weight: 400; font-size: 13px; }

p.desc { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="url"], input[type="text"] {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 13px;
  border-radius: 3px;
  outline: none;
}

input:focus { border-color: var(--accent); }

.hint { font-size: 11px; color: var(--muted); margin-top: 8px; }
.error-text { font-size: 11px; color: var(--warn); margin-top: 8px; min-height: 14px; }

button {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  padding: 12px 18px;
  border-radius: 3px;
  cursor: pointer;
  width: 100%;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:active { transform: translateY(1px); }

button.primary { background: var(--fg); color: #000; border-color: var(--fg); font-weight: 600; }
button.ghost { color: var(--muted); }
button.small { width: auto; padding: 8px 14px; font-size: 12px; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

#push-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 14px;
  border-radius: 3px;
  margin-bottom: 22px;
  font-size: 12.5px;
  color: var(--muted);
}

#push-banner.hidden { display: none; }

.task-list { list-style: none; margin: 0; padding: 0; }

.task {
  display: grid;
  grid-template-columns: 3px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.task:last-child { border-bottom: none; }

.task .bar {
  align-self: stretch;
  border-radius: 2px;
  background: var(--muted);
  min-height: 100%;
}
.task .bar.ok { background: var(--ok); }
.task .bar.accent { background: var(--accent); }
.task .bar.warn { background: var(--warn); }

.task .title { font-size: 14px; color: var(--fg); margin: 0 0 4px; }
.task .course { font-size: 11.5px; color: var(--muted); }

.task .when { text-align: right; font-size: 11.5px; white-space: nowrap; }
.task .when.ok { color: var(--ok); }
.task .when.accent { color: var(--accent); }
.task .when.warn { color: var(--warn); }

.empty { color: var(--muted); font-size: 13px; padding: 30px 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
