/* ===================================================================
   NATaLiA — "Terminal"
   Monospace throughout, rules instead of boxes, phosphor green on near
   black. Brackets and prefixes are drawn with generated content, so the
   markup stays clean.
   =================================================================== */

:root {
  --bg: #0c0c0c;
  --panel: #151515;
  --fg: #cccccc;
  --dim: #7a7a7a;
  --rule: #333333;
  --accent: #00cc44;
  --accent-dim: #067a2c;
  --amber: #ffaa00;
  --danger: #ff5555;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2300cc44'/%3E%3C/svg%3E");
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "DejaVu Sans Mono", "Liberation Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 0 1rem;
}

.container { margin: 0 auto; max-width: 54rem; }

/* --- header / footer rules ----------------------------------------- */

header {
  border-bottom: 1px solid var(--rule);
  color: var(--dim);
  display: flex;
  font-size: 0.78rem;
  gap: 0.75rem;
  padding: 0.9rem 0 0.5rem 0;
  width: 100%;
}

header::before {
  color: var(--accent);
  content: "NATaLiA";
  font-weight: bold;
  letter-spacing: 0.08em;
}

header span { margin-left: auto; }

main {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

/* --- the one task -------------------------------------------------- */

.next-item { max-width: 46rem; width: 100%; }

.next-item::before {
  color: var(--dim);
  content: "> NEXT TASK";
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.6rem;
}

.next-item h2 {
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.3;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.75rem;
}

.next-item { color: var(--fg); }

main > p { color: var(--dim); }
main > p::before { color: var(--accent-dim); content: "> "; }

footer {
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  padding: 0.6rem 0 1.2rem 0;
  width: 100%;
}

/* --- controls ------------------------------------------------------ */

/*
 * These were literal "[ ]" brackets drawn with ::before/::after content, which
 * looked right but ended up in the accessible name — a screen reader read the
 * About button as "[ About ]". Generated content counts as rendered text, and
 * a pseudo-element cannot be marked decorative. A 1px frame gets the same
 * boxed look without touching what the button is called.
 */
button, input[type="button"] {
  background-color: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.8rem;
  text-transform: uppercase;
}

button:hover, input[type="button"]:hover {
  background-color: var(--accent-dim);
  border-color: var(--accent);
  color: var(--bg);
}

/* Inverted, the way a selected item looks in a text UI. */
.open-button { background-color: var(--accent); border-color: var(--accent); color: var(--bg); }

button:disabled { border-color: var(--rule); color: var(--rule); cursor: default; }
button:disabled:hover { background-color: transparent; color: var(--rule); }

.complete { align-self: flex-start; margin-top: 1.5rem; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

input[type="text"],
input[type="date"],
select,
textarea {
  background-color: #000;
  border: 1px solid var(--rule);
  caret-color: var(--accent);
  color: var(--accent);
  font: inherit;
  padding: 0.35rem 0.5rem;
  width: 100%;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
option { background: #000; color: var(--accent); }
textarea { min-height: 5rem; resize: vertical; }

.theme-picker__label {
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

label.column, .task-item > .column {
  align-items: stretch;
  color: var(--dim);
  font-size: 0.72rem;
  gap: 0.3rem;
  letter-spacing: 0.16em;
  margin-bottom: 1rem;
  text-align: left;
  text-transform: uppercase;
}

.task-item > .column > button { align-self: flex-start; }

/* --- panels -------------------------------------------------------- */

dialog {
  background: var(--panel);
  border: 1px solid var(--accent-dim);
  color: var(--fg);
  left: 50%;
  max-height: 80%;
  overflow-y: auto;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(52rem, calc(100% - 2rem));
}

/* A labelled rule across the top, the way a TUI frames a pane. */
dialog::before {
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
  content: "NATaLiA";
  display: block;
  flex: 0 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  padding: 0.6rem 1.25rem;
}

dialog.list-area::before, dialog.list-area-portrait::before { content: "// TASK LIST"; }
dialog:has(button.create)::before { content: "// NEW TASK"; }
dialog:has(.task-item):not(:has(button.create))::before { content: "// EDIT TASK"; }
dialog:has(h3)::before { content: "// ABOUT"; }

dialog > * { margin-left: 1.25rem; margin-right: 1.25rem; }
dialog > .row { justify-content: flex-start; margin-bottom: 1.1rem; margin-top: 1.1rem; }
dialog > .row > button + button { margin-left: 1rem; }

dialog h3 { display: none; }
dialog p { color: var(--fg); font-size: 0.85rem; margin-block: 0.9rem; }
dialog > p:first-of-type { margin-top: 1.1rem; }

/* --- the task table ------------------------------------------------ */

table {
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 1.1rem;
  width: calc(100% - 2.5rem);
}

th {
  border-bottom: 1px solid var(--rule);
  color: var(--dim);
  font-weight: normal;
  letter-spacing: 0.14em;
  padding: 0.4rem 1rem 0.4rem 0;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  border-bottom: 1px dotted var(--rule);
  padding: 0.5rem 1rem 0.5rem 0;
  vertical-align: top;
}

tbody tr:hover td { background: #1e1e1e; }
tbody tr:last-child td { border-bottom: none; }

/* --- row actions --------------------------------------------------- */

.action-icon { display: none; }

td .row { gap: 0.75rem; justify-content: flex-start; }

/* The icons carry no text, so the generated content here IS the accessible
   name. Words, not initials, for that reason. */
button.edit::after { content: "edit"; }
button.delete::after { content: "delete"; }

button.edit { border-color: var(--amber); color: var(--amber); }
button.edit:hover { background-color: var(--amber); border-color: var(--amber); color: var(--bg); }

button.delete { border-color: var(--danger); color: var(--danger); }
button.delete:hover { background-color: var(--danger); border-color: var(--danger); color: var(--bg); }
