/* Task manager — Ink wash */

:root {
  --ink: #4A4A4A;
  --stone: #CBCBCB;
  --paper: #FFFFE3;
  --slate: #6D8196;
  --slate-soft: rgba(109, 129, 150, 0.12);
  --danger: #A45544;
  --success: #6F8A6B;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--slate); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ---------- layout ---------- */

.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.app header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--stone);
}

.app header.top h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.05;
}
.h1-primary { display: block; }
.h1-secondary {
  display: block;
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  color: var(--slate);
  opacity: 0.75;
  margin-top: 1px;
}

.app header.top .date {
  font-size: 12px;
  color: var(--slate);
  text-align: right;
  line-height: 1.1;
}
.date-primary { font-weight: 600; color: var(--ink); }
.date-secondary { font-style: italic; opacity: 0.75; margin-top: 1px; }

/* Tabs */

nav.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--stone);
  margin-bottom: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* Edge legacy */
}
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs button {
  padding: 6px 12px 8px;
  color: var(--ink);
  opacity: 0.55;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  line-height: 1.05;
  text-align: left;
}

nav.tabs.primary button { opacity: 0.9; color: var(--ink); }
nav.tabs.primary button.active { opacity: 1; color: var(--slate); }

nav.tabs button.active {
  opacity: 1;
  color: var(--slate);
  border-bottom-color: var(--slate);
}

nav.tabs .t-primary {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
nav.tabs .t-secondary {
  display: block;
  font-size: 9px;
  font-style: italic;
  opacity: 0.65;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 1px;
}
nav.tabs button.active .t-secondary { opacity: 0.85; }

/* Section heading */

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  opacity: 0.7;
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.1;
}
.sh-primary { display: inline; }
.sh-secondary {
  display: inline;
  margin-left: 6px;
  font-size: 10px;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  opacity: 0.65;
}
.lane section h3 { line-height: 1.1; }
.lane section h3 .sh-primary { display: inline; }
.lane section h3 .sh-secondary { display: inline; margin-left: 5px; font-size: 9px; font-style: italic; opacity: 0.55; text-transform: none; letter-spacing: 0; font-weight: 400; }

.section + .section { margin-top: 20px; }

/* ---------- ficha ---------- */

.ficha {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ficha .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
  background: var(--slate);
}

.ficha .body { flex: 1; min-width: 0; }

.ficha .title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

/* Bilingual title rendering: primary bold, secondary grey italic below. */
.title-bilingual { line-height: 1.2; }
.title-primary {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.title-secondary {
  font-size: 12px;
  font-style: italic;
  color: var(--slate);
  opacity: 0.85;
  margin-top: 1px;
}
.chip-secondary {
  display: inline;
  margin-left: 4px;
  font-style: italic;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.lane-title { display: flex; flex-direction: column; min-width: 0; }
.lane .title-primary { font-size: 14px; font-weight: 600; }
.lane .title-secondary { font-size: 11px; }
.ficha.recurring { border-left: 3px solid var(--moss, #7A8A5C); }
.ficha.recurring .dot { opacity: 0.7; }

.ficha .meta {
  font-size: 12px;
  color: var(--slate);
  margin-top: 2px;
}

.ficha .chip {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--slate-soft);
  color: var(--slate);
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.ficha .check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--stone);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
  background: var(--paper);
  position: relative;
}

.ficha.done { opacity: 0.55; }
.ficha.done .title { text-decoration: line-through; }
.ficha.done .check {
  background: var(--success);
  border-color: var(--success);
}
.ficha.done .check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ficha.overdue { border-color: var(--danger); }
.ficha.overdue .meta { color: var(--danger); }

.ficha.meeting { border-left: 3px solid var(--slate); }

.ficha.priority-high { box-shadow: inset 3px 0 0 var(--slate); }

/* ---------- Projects lanes ---------- */

.lanes {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.lane {
  flex: 0 0 260px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--stone);
  border-radius: 12px;
  padding: 10px 10px 6px;
}

.lane > header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.lane > header .swatch {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lane section { margin-top: 10px; }
.lane section h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  opacity: 0.5;
  margin: 0 0 4px;
  font-weight: 600;
}

.lane .ficha { padding: 7px 9px; margin-bottom: 5px; }
.lane .ficha .title { font-size: 13px; }
.lane .ficha .meta { font-size: 11px; }

/* ---------- empty state ---------- */

.empty {
  padding: 20px 0;
  color: var(--slate);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}

/* ---------- quick-add bar ---------- */

.quickbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--paper);
  border-top: 1px solid var(--stone);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.quickbar-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}

.quickbar-meta select,
.quickbar-meta input[type=date],
.quickbar-meta input[type=time] {
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--stone);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.quickbar-meta select { flex: 1 1 auto; min-width: 0; }
.quickbar-meta input[type=date] { flex: 0 0 auto; }
.quickbar-meta input[type=time] { flex: 0 0 auto; }

.quickbar-meta select:focus,
.quickbar-meta input[type=date]:focus,
.quickbar-meta input[type=time]:focus {
  border-color: var(--slate);
  background: var(--slate-soft);
}

.quickbar-main {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quickbar-main input[type=text] {
  flex: 1;
  font: inherit;
  padding: 9px 14px;
  border: 1px solid var(--stone);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.quickbar-main input[type=text]:focus {
  border-color: var(--slate);
  background: var(--slate-soft);
}

.quickbar-main button.send {
  background: var(--slate);
  color: var(--paper);
  border-radius: 22px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--slate);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 70px; left: 50%; transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }

/* ---------- responsive ---------- */

@media (min-width: 720px) {
  .app { padding: 24px 32px 96px; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .two-col > .section + .section { margin-top: 0; }
}

/* ============================================================
   v3: subtabs, projects matrix, productivity grid, settings
   ============================================================ */

nav.tabs.primary button.gear {
  margin-left: auto;
  font-size: 18px;
  padding: 6px 10px;
}

nav.tabs.subtabs {
  border-bottom: 1px solid var(--stone);
  margin-top: -18px;
  margin-bottom: 16px;
  padding-top: 4px;
  min-height: 0;
}
nav.tabs.subtabs:empty { display: none; }
nav.tabs.subtabs button { padding: 4px 12px; line-height: 1.2; }
nav.tabs.subtabs .t-primary {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
nav.tabs.subtabs .t-secondary {
  display: inline;
  font-size: 10px;
  font-style: italic;
  opacity: 0.65;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
}
nav.tabs.subtabs .t-secondary::before {
  content: ' | ';
  margin: 0 3px;
  font-style: normal;
  opacity: 0.5;
}

/* ---------- Projects matrix ---------- */

.projects-matrix {
  display: grid;
  grid-auto-rows: auto;
  border: 1px solid var(--stone);
  border-radius: 10px;
  background: rgba(255,255,255,0.3);
  margin: 0;
  padding: 0;
  width: 100%;
  overflow: hidden;
}
.pm-row {
  display: grid;
  grid-template-columns: 130px repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--stone);
  min-width: 0;
}
.late-section {
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 20px;
  background: rgba(164, 85, 68, 0.04);
}
.late-section .section-title { color: var(--danger); opacity: 1; }
.pm-row:first-child { border-top: none; }
.pm-row.pm-header {
  position: sticky; top: 0;
  background: var(--paper);
  z-index: 2;
}

.pm-cell {
  padding: 8px 10px;
  border-left: 1px solid var(--stone);
  min-width: 0;
}
.pm-cell:first-child { border-left: none; }
.pm-rowhead {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(255,255,255,0.4);
  position: sticky; left: 0;
  z-index: 1;
}
.pm-rowhead .swatch { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; flex-shrink: 0; }
.pm-rowhead .lane-title { min-width: 0; }
.pm-rowhead .title-primary { font-size: 13px; font-weight: 600; }
.pm-rowhead .title-secondary { font-size: 10px; }
.pm-colhead {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.7;
  font-weight: 600;
  background: rgba(255,255,255,0.4);
}
.pm-colhead .sh-primary { display: block; margin-left: 0; }
.pm-colhead .sh-secondary { display: block; margin-left: 0; font-size: 9px; font-style: italic; text-transform: none; letter-spacing: 0; opacity: 0.6; font-weight: 400; }
.pm-data .ficha { padding: 6px 8px; margin-bottom: 4px; }
.pm-data .ficha .title-primary { font-size: 12px; }
.pm-data .ficha .title-secondary { font-size: 10px; }
.pm-data .ficha .meta { font-size: 10px; }
.pm-empty { color: var(--stone); font-size: 11px; text-align: center; padding: 4px 0; }

.late-section {
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 20px;
  background: rgba(164, 85, 68, 0.04);
}
.late-section .section-title { color: var(--danger); opacity: 1; }

/* ---------- Productivity grid ---------- */

.prod-wrap {
  border: 1px solid var(--stone);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.prod-head {
  display: grid;
  grid-template-columns: 44px repeat(var(--prod-cols, 1), 1fr);
  background: rgba(255,255,255,0.5);
  border-bottom: 1px solid var(--stone);
}
.prod-corner { border-right: 1px solid var(--stone); background: rgba(255,255,255,0.35); }
.prod-day-h {
  padding: 6px 4px;
  text-align: center;
  border-left: 1px solid var(--stone);
  font-size: 11px;
}
.prod-day-h:first-child { border-left: none; }
.prod-day-label { color: var(--slate); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.prod-day-num { font-weight: 600; font-size: 14px; }
.prod-grid {
  display: grid;
  grid-template-columns: 44px repeat(var(--prod-cols, 1), 1fr);
  height: 600px;
}
.prod-timerail {
  position: relative;
  border-right: 1px solid var(--stone);
  background: rgba(255,255,255,0.25);
}
.prod-hour {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  line-height: 1;
}
.prod-col {
  position: relative;
  border-left: 1px solid var(--stone);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(100% / 24 - 1px),
    rgba(203,203,203,0.5) calc(100% / 24 - 1px),
    rgba(203,203,203,0.5) calc(100% / 24)
  );
}
.prod-col:first-child { border-left: none; }
/* Calendar frame: narrower calendar flanked by floating side arrows. */
.prod-frame {
  display: flex;
  align-items: stretch;
  gap: 12px;
  justify-content: center;
  max-width: 100%;
}
.prod-frame .prod-wrap {
  max-width: 820px;
  width: 100%;
  flex: 1 1 820px;
  min-width: 0;
}
.prod-side-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  color: var(--ink);
  user-select: none;
  min-width: 44px;
  align-self: stretch;
}
.prod-side-arrow:hover { opacity: 1; background: rgba(0,0,0,0.06); }

/* Totals per project over the visible window, shown between the nav arrows
 * and the calendar grid. Colored swatch, Basque primary + English italic
 * secondary, right-aligned hour count. */
.prod-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 8px 12px;
  margin: 0 0 10px 0;
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 11px;
  align-items: center;
  justify-content: space-between;   /* spread items edge-to-edge */
}
.prod-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;                   /* each item claims its share */
  justify-content: flex-start;
}
.prod-summary-swatch {
  display: inline-block;
  width: 3px;                        /* vertical colored line */
  height: 22px;
  border-radius: 1.5px;
  flex: 0 0 auto;
}
.prod-summary-label {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}
.prod-summary-name {
  font-weight: 600;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  white-space: nowrap;
}
.prod-summary-name-en {
  font-style: italic;
  opacity: 0.55;
  font-size: 9px;
  white-space: nowrap;
}
.prod-summary-hours {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  opacity: 0.8;
  margin-left: 4px;
}

/* Event blocks — timed meetings / deadlines / reminders. Dashed border in
 * the project color distinguishes them from real time-entry activity blocks. */
.prod-event {
  position: absolute;
  left: 2px; right: 2px;
  border: 1.5px dashed;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.4);
}
.prod-event-label { display: flex; align-items: center; gap: 4px; line-height: 1.2; }
.prod-event-icon { font-size: 10px; opacity: 0.8; }
.prod-event-title {
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Completion pills — short badges at completed_at showing "✓ task title" in
 * the project color. Compact font, distinct from time-entry blocks. */
/* Completion pill — sits INSIDE the column near its right edge at
 * completed_at, with solid project-color background + high z-index so it
 * reads above any time-entry block underneath. pointer-events:none so clicks
 * pass through to the underlying block. */
.prod-done-pill {
  position: absolute;
  right: 3px;
  left: auto;
  z-index: 4;
  transform: translateY(-50%);   /* anchor pill at completed_at */
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 4px;
  border-radius: 9px;
  color: #fff;
  font-size: 9px;
  font-style: italic;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.22);
  pointer-events: none;
  max-width: 60%;                /* keeps left-side of block readable */
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-done-check { font-size: 10px; font-weight: 700; font-style: normal; }
.prod-done-title { overflow: hidden; text-overflow: ellipsis; }

.section-done .ficha { opacity: 0.7; }
.section-done .ficha.done { text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.3); }

/* Section-title rows become flex so the slide toggle can sit on the right
 * of the heading (Gaur / Today    [✓ Eginda ●━━○]). */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .sh-primary,
.section-title .sh-secondary { flex: 0 0 auto; }

/* Slide toggle — label + track with a circular thumb that slides L→R. */
.slide-toggle {
  margin-left: auto;            /* pushed to the right end of the header */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 10px;
  opacity: 0.55;
}
.slide-toggle:hover { opacity: 1; }
.slide-toggle input { display: none; }
.slide-toggle-txt {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}
.slide-toggle-eu {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: italic;
  font-size: 9px;
}
.slide-toggle-en { font-style: italic; opacity: 0.6; font-size: 8px; }
.slide-toggle-track {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  transition: background 0.15s ease;
}
.slide-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: left 0.15s ease, background 0.15s ease;
}
.slide-toggle.on .slide-toggle-track { background: var(--sage, #8EAF8D); }
.slide-toggle.on .slide-toggle-thumb { left: 14px; }

/* Undo button — same shape as the check but with a ↺ glyph, rotated into a
 * different colour palette so it doesn't look like a completion action. */
.check-undo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--ink);
  opacity: 0.55;
  font-size: 14px;
  cursor: pointer;
}
.check-undo:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.prod-block {
  position: absolute;
  left: 2px; right: 2px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  padding: 3px 5px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}
/* Each solid block has a two-column label: Basque primary on the left, English
 * secondary on the right in greyed italic. Hides gracefully when there's not
 * enough horizontal room on phone. */
.prod-block-label { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.prod-label-left { min-width: 0; flex: 1 1 auto; }
.prod-label-right {
  text-align: right;
  font-style: italic;
  opacity: 0.55;                 /* greyer than the Basque primary */
  color: rgba(255,255,255,0.85);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 50%;
}
.prod-label-right .prod-sec-line {
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* First line of the English secondary = project name. Uppercase it so it
 * visually pairs with the Basque "ERAMAN LANA" on the left while staying
 * lower-contrast. */
.prod-label-right .prod-sec-line:first-child {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Compact layout: short blocks (< 60 min) don't have room to stack 2 rows,
 * so each side flattens to a single horizontal line with the second piece of
 * info after a "|" separator. Styles on each text span stay intact — caps
 * where they were, italic where they were — only the layout collapses. */
.prod-block-compact .prod-label-left,
.prod-block-compact .prod-label-right {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.prod-block-compact .prod-label-left .prod-project,
.prod-block-compact .prod-label-left .prod-task,
.prod-block-compact .prod-label-right .prod-sec-line {
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-block-compact .prod-label-left .prod-task { margin-top: 0; }
.prod-block-compact .prod-label-left .prod-task::before,
.prod-block-compact .prod-label-right .prod-sec-line:not(:first-child)::before {
  content: "|";
  opacity: 0.4;
  margin-right: 4px;
  font-weight: normal;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}
.prod-block-label .prod-project {
  font-weight: 600;
  font-size: 10px;
  line-height: 1.15;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prod-block-label .prod-task {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 1px;
  line-height: 1.15;
  font-style: italic;
}

/* Overlap label: stacks BOTH entries, each with the same left/right layout as
 * solid blocks (Basque CAPS-italic on left, English grey-italic on right).
 * text-shadow for legibility over the striped background. */
.prod-block-overlap-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  height: 100%;
  box-sizing: border-box;
  text-shadow: 0 0 4px rgba(0,0,0,0.6);
}
.prod-overlap-entry {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

/* ---------- Ezarpenak ---------- */

.settings-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--stone);
  border-radius: 8px;
  color: var(--slate);
  text-decoration: none;
}
.settings-link:hover { background: var(--slate-soft); }
.settings-subsection { margin-top: 20px; }
.settings-subsection h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.6;
  margin: 0 0 8px;
  font-weight: 600;
}
.settings-item {
  padding: 8px 12px;
  border: 1px solid var(--stone);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.settings-addform {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.settings-addform input[type=text] {
  flex: 1; font: inherit; font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--stone); border-radius: 8px;
  background: var(--paper); outline: none;
}
.settings-addform input[type=text]:focus { border-color: var(--slate); background: var(--slate-soft); }
.settings-add-btn {
  padding: 6px 14px; border-radius: 8px;
  background: var(--slate); color: var(--paper); font-weight: 600;
  border: 1px solid var(--slate);
}
.user-item .user-name { font-weight: 600; margin-bottom: 4px; }
.user-link-row { display: flex; gap: 6px; align-items: center; }
.user-login-link {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; padding: 4px 8px;
  border: 1px solid var(--stone); border-radius: 6px;
  background: var(--paper); color: var(--slate);
  user-select: all;
}
.user-copy-btn {
  padding: 4px 12px; border-radius: 6px;
  background: var(--slate-soft); color: var(--slate);
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--stone);
}

.day-secti
