/* ===========================================================================
   Rediseño 3 · "cielo suave"
   Base tranquila (superficies suaves, cielo que sigue la hora), con tres préstamos
   del segundo estilo: puntitos de fondo, títulos anchos y métricas con relieve.
   Tipografía: títulos en Lexend (pensada para cansar menos la vista) y la del sistema de
   Apple (San Francisco) para el resto. Color de acción: azul pizarra neutro; el rojo solo avisa de lo negativo.
   Rendimiento: solo se anima transform/opacity; sin backdrop-filter.
=========================================================================== */

:root {
  --h1-size: clamp(2.3rem, 4.4vw, 4rem);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", ui-sans-serif, "Inter", system-ui, "Segoe UI", sans-serif;
  --font-title: "Lexend", "Avenir Next", system-ui, sans-serif;
  --sky-1: 246;
  --sky-2: 268;
  --sky-3: 214;
  --bd: rgba(170, 182, 255, 0.13);
  --bd-strong: rgba(170, 182, 255, 0.3);
  --hard: #04050a;
  --r-panel: 22px;
  --r-ctl: 12px;
}

html, body {
  font-family: var(--font-ui);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font-family: var(--font-ui); }

::selection { background: rgba(111, 135, 176, 0.45); color: #fff; }

/* ---------------------------------------------------------------- fondo --- */
body { background: transparent; }

/* Cielo (cambia con la hora) */
body::before {
  background:
    radial-gradient(52% 42% at 12% -6%, hsl(var(--sky-1) 34% 55% / 0.22), transparent 72%),
    radial-gradient(44% 38% at 92% 4%, hsl(var(--sky-2) 30% 58% / 0.14), transparent 70%),
    radial-gradient(70% 46% at 55% 108%, hsl(var(--sky-3) 32% 50% / 0.14), transparent 70%),
    var(--bg);
}

body::after, .cursor-glow, .panel-frame { display: none !important; }

/* ------------------------------------------------------------ tipografía --- */
/* Títulos: Archivo ancho y pesado. Todo lo demás: la fuente del sistema */
h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--h1-size);
  line-height: 0.96;
  letter-spacing: -0.04em;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
}

h2 { font-size: 1.2rem; letter-spacing: -0.015em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  margin: 0;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: none;
  opacity: 0.75;
}

.field-label, .priority-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  margin: 14px 0 7px;
}

/* ---------------------------------------------------------------- cabecera --- */
.topbar { margin-bottom: 30px; gap: 28px; }
.topbar > section:first-child { display: grid; gap: 10px; }

.welcome-message {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: none;
}

.daily-push p {
  max-width: 30ch;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff 25%, #bfd6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

.topbar-controls { gap: 8px; }

.finance-button, .logout-button, .lock-button, .fin-back {
  min-height: 38px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.finance-button {
  padding: 0 16px;
  color: var(--cyan);
  border: 1px solid rgba(139, 188, 223, 0.28);
  background: rgba(139, 188, 223, 0.07);
}

.finance-button:hover {
  background: rgba(139, 188, 223, 0.14);
  border-color: rgba(139, 188, 223, 0.55);
  box-shadow: 0 6px 22px -8px var(--cyan-glow);
  transform: translateY(-1px);
}

.lock-button { width: 38px; height: 38px; }

.logout-button { padding: 0 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); }
.logout-button:hover { color: var(--text); border-color: var(--line-strong); box-shadow: none; }

/* ------------------------------------------------- métricas con relieve --- */
/* Fichas con borde grueso y sombra dura: se levantan al pasar y se aplastan al pulsar */
.status-strip { width: 520px; gap: 12px; }

.status-strip article,
.metric-grid article,
.fin-kpi {
  min-height: 94px;
  padding: 16px 18px;
  border: 1.5px solid var(--bd-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 4px 4px 0 var(--hard);
  transition: transform 0.16s var(--ease-snap), box-shadow 0.16s var(--ease-snap), border-color 0.15s;
}

.status-strip article:hover,
.metric-grid article:hover,
.fin-kpi:hover {
  transform: translate(-2px, -2px);
  border-color: rgba(170, 182, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 6px 6px 0 var(--hard);
}

.status-strip article:active,
.metric-grid article:active,
.fin-kpi:active {
  transform: translate(2px, 2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 1px 1px 0 var(--hard);
}

.status-strip span, .metric-grid strong {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-grid strong { display: block; }

.status-strip small, .metric-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ bloques --- */
.panel, .dashboard-grid .panel {
  padding: 24px;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 28px 50px -30px rgba(2, 3, 12, 0.9);
  transition: border-color 0.25s var(--ease), translate 0.35s var(--ease);
  will-change: auto;
}

.panel:hover, .dashboard-grid .panel:hover {
  translate: 0 -3px;
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 34px 60px -30px rgba(2, 3, 12, 0.95);
}

.panel-spot { background: radial-gradient(circle, rgba(196, 205, 255, 0.07), transparent 52%); }

.panel-header { margin-bottom: 18px; align-items: flex-start; flex-wrap: wrap; gap: 10px 12px; }

/* El título manda; la categoría queda debajo con su puntito */
.panel-header > div:first-child,
.fin-top > section:first-child { display: flex; flex-direction: column-reverse; gap: 5px; }

.verse-panel, .dashboard-grid .verse-panel {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(139, 188, 223, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%),
    var(--surface);
}

blockquote {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------------------- controles --- */
input, textarea, select {
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: rgba(6, 8, 16, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Foco violeta */
input:focus, textarea:focus, select:focus {
  border-color: rgba(111, 135, 176, 0.8);
  box-shadow: 0 0 0 4px rgba(111, 135, 176, 0.18);
}

input::placeholder, textarea::placeholder { color: rgba(141, 149, 176, 0.62); }

/* Acción principal: rojo plano, sin brillo */
.task-form button,
.timer-actions .btn-primary,
.login-card button,
.x-submit,
.fin-add button,
.cm-add button,
.dm-actions button[type="submit"],
.preset-button.is-active {
  background: linear-gradient(180deg, #7a92ba, #586f96);
  color: #fff;
  border: 0;
  border-radius: var(--r-ctl);
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px -10px rgba(111, 135, 176, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.task-form button:hover,
.timer-actions .btn-primary:hover,
.login-card button:hover,
.x-submit:hover,
.fin-add button:hover,
.preset-button.is-active:hover {
  box-shadow: 0 12px 22px -10px rgba(111, 135, 176, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.ghost-button, .icon-button {
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.ghost-button:hover, .icon-button:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); box-shadow: none; }

/* Botón Semana/Hoy: neutro en modo día, azul en modo semana */
.priority-panel:not(.is-week) .priority-mode-button {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}
.priority-panel.is-week .eyebrow { color: var(--cyan); }

.preset-toggle { border-radius: 14px; background: rgba(6, 8, 16, 0.5); border: 1px solid var(--line); }
.preset-button { border-radius: 10px; font-weight: 600; letter-spacing: 0; }

/* Casillas redondas con visto animado */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-grid;
  place-content: center;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(170, 182, 255, 0.38);
  background: transparent;
  box-shadow: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Visto dibujado con un trazo (no con bordes girados): sale limpio en cualquier tamaño */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.6l3 3 5.9-6.9' fill='none' stroke='%2306140e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
  transform: scale(0);
  transition: transform 0.25s var(--ease-snap);
}

input[type="checkbox"]:hover { border-color: var(--green); }
input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
input[type="checkbox"]:checked::after { transform: scale(1); }

/* ------------------------------------------------------------------- tareas --- */
.task-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.task-group-header { flex-wrap: wrap; row-gap: 4px; }
.group-name { flex: 0 1 auto; min-width: 5ch; overflow-wrap: normal; font-size: 1.04rem; font-weight: 600; font-variation-settings: "wdth" 115; letter-spacing: -0.02em; }
.group-meta { font-size: 0.84rem; color: var(--muted); letter-spacing: 0; }

.task-item, .capture-item {
  grid-template-columns: 12px 22px minmax(0, 1fr) auto 28px 28px 28px;
  column-gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
}

.capture-item { grid-template-columns: 12px minmax(0, 1fr) 28px 28px; align-items: center; }

.task-item:hover, .capture-item:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line); }

/* Estados de la fila, sin brillos: borde fino y un tinte muy suave.
   Prioridad = rojo, en proceso = azul, hecha = verde (mismos significados de siempre) */
.task-item, .subtask-item, .capture-item { --pri: #ef4458; --pri-rgb: 239, 68, 88; }
.pri-orange { --pri: #f59e3c; --pri-rgb: 245, 158, 60; }
.task-item.is-priority:not(.is-done), .capture-item.is-priority {
  border: 1.5px solid rgba(var(--pri-rgb), 0.6);
  padding: 10px;
  background: rgba(var(--pri-rgb), 0.07);
  box-shadow: none;
}
.subtask-item.is-priority:not(.is-done) {
  border: 1.5px solid rgba(var(--pri-rgb), 0.6);
  background: rgba(var(--pri-rgb), 0.07);
}
.subtask-item.is-priority .priority-task { color: var(--pri); }
.subtask-item .priority-task { width: 22px; min-height: 22px; border-radius: 6px; font-size: 0.8rem; }
.subtask-item:not(:hover):not(:focus-within):not(.is-priority) .priority-task { opacity: 0.3; }

/* La exclamación marcada y su botón, en rojo (tareas y notas) */
.task-item.is-priority .priority-task, .capture-item.is-priority .priority-task { color: var(--pri); }
.priority-task:hover { color: var(--pri, var(--neg)); border-color: var(--pri, var(--neg)); box-shadow: none; }
.task-item.is-priority::before, .capture-item.is-priority::before { display: none; }
.task-item.is-priority > span:nth-of-type(2), .capture-item.is-priority > span:nth-of-type(2) { color: var(--text); }
/* En proceso: azul claro y bien visible (borde, tinte, texto y botón relleno) */
.task-item.is-progress:not(.is-done), .subtask-item.is-progress:not(.is-done) {
  border: 1.5px solid #4aa8d8;
  background: rgba(74, 168, 216, 0.16);
  box-shadow: none;
}
.task-item.is-progress:not(.is-done) > span:nth-of-type(2) { color: #a8e0ff; font-weight: 600; }
.task-item.is-progress:not(.is-done) .progress-task[aria-pressed="true"],
.task-item.is-progress:not(.is-done) > .progress-indicator,
.subtask-item.is-progress .progress-subtask[aria-pressed="true"] {
  opacity: 1;
  color: #06202e;
  background: #5ec0f0;
  box-shadow: none;
}
/* Prioritaria + en proceso: borde rojo (prioridad) con interior azul (en proceso) y franja azul a la izquierda */
.task-item.is-progress.is-priority:not(.is-done), .subtask-item.is-progress.is-priority:not(.is-done) {
  border: 1.5px solid rgba(var(--pri-rgb), 0.85);
  background: rgba(74, 168, 216, 0.16);
  box-shadow: inset 5px 0 0 #4aa8d8;
}
.task-item.is-done, .task-item.is-done.is-priority {
  border-color: rgba(82, 224, 164, 0.28);
  background: rgba(82, 224, 164, 0.05);
  box-shadow: none;
}
.task-item > input[type="checkbox"] { width: 20px; min-height: 20px; margin-top: 4px; }
.remove-task, .remove-capture, .priority-task, .progress-task { width: 28px; min-height: 28px; border-radius: 9px; }
.subtask-item { border-radius: 12px; }

@media (hover: hover) {
  .task-item:not(:hover):not(:focus-within) .remove-task,
  .task-item:not(:hover):not(:focus-within):not(.is-priority) .priority-task { opacity: 0.3; }
}

/* ------------------------------------------------------------------ pomodoro --- */
.timer-face {
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(139, 188, 223, 0.08), transparent 70%),
    rgba(6, 8, 16, 0.5);
}

.timer-face::before { background: none !important; }
.timer-face::after { background: conic-gradient(from 0deg, transparent 0%, rgba(139, 188, 223, 0.1) 25%, transparent 50%); }

#timerDisplay, .timer-face strong {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- animación --- */
/* Un solo momento orquestado: al entrar, columnas y bloques suben en cascada */
.dashboard-grid > .stack:nth-child(1) { --c: 0; }
.dashboard-grid > .stack:nth-child(2) { --c: 1; }
.dashboard-grid > .stack:nth-child(3) { --c: 2; }
.stack > .panel:nth-child(1) { --p: 0; }
.stack > .panel:nth-child(2) { --p: 1; }
.stack > .panel:nth-child(3) { --p: 2; }
.stack > .panel:nth-child(4) { --p: 3; }
.stack > .panel:nth-child(5) { --p: 4; }
.stack > .panel:nth-child(6) { --p: 5; }

.stack > .panel, .fin-grid > .panel {
  animation: rise 0.8s var(--ease) backwards;
  animation-delay: calc(var(--c, 0) * 90ms + var(--p, 0) * 85ms + 80ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.topbar, .fin-top { animation: none; }

/* Cambio de página suave */
@view-transition { navigation: auto; }
.topbar, .fin-top { view-transition-name: cabecera; }
::view-transition-old(root) { animation: 180ms ease both vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------- cursor --- */
/* Solo el punto: crece un poco sobre lo pulsable, se encoge al pulsar y es barrita sobre el texto */
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30000;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}

.cursor-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(236, 240, 250, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease), width 0.2s var(--ease), height 0.2s var(--ease), border-radius 0.2s var(--ease), background 0.2s, opacity 0.2s;
}

.cursor-dot.is-hover::before { transform: translate(-50%, -50%) scale(1.1); background: transparent; border: 1.5px solid var(--cyan); box-shadow: 0 0 0 2px rgba(139, 188, 223, 0.25), 0 1px 8px rgba(0, 0, 0, 0.35); }
.cursor-dot.is-press::before { transform: translate(-50%, -50%) scale(0.8); }
.cursor-dot.is-text::before { width: 3px; height: 22px; border-radius: 2px; background: #fff; border-color: transparent; box-shadow: none; transform: translate(-50%, -50%); }
.cursor-dot.is-hidden::before { opacity: 0; }

/* ------------------------------------------------------------------- login --- */
.login-card, .login-brand { border-radius: 26px; }
.login-brand h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }

/* ------------------------------------------------------------------ móvil --- */
@media (max-width: 680px) {
  .panel, .dashboard-grid .panel { padding: 20px; border-radius: 20px; }
  .status-strip { width: 100%; gap: 8px; }
  .status-strip article { min-height: 0; padding: 12px 10px; border-radius: 16px; }
  .status-strip span { font-size: 1.5rem; }
  .status-strip small { font-size: 0.76rem; }
  h1 { font-size: clamp(2.2rem, 12vw, 3.2rem); }
}

:is(button, a, summary, select, input[type="checkbox"]):focus-visible {
  outline: 2px solid rgba(139, 188, 223, 0.85);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .stack > .panel, .fin-grid > .panel { animation: none; }
  @view-transition { navigation: none; }
}

/* Pestañas y chips activos de Finanzas/Calendario: azul suave en vez de rojo */
.fin-tabs button.is-on,
.fin-months button.is-on {
  color: #fff;
  background: rgba(139, 188, 223, 0.14);
  border-color: rgba(139, 188, 223, 0.5);
  box-shadow: none;
}

/* --------------------------------------------------- efectos 3D (relieve) --- */
/* Botones: sombra dura que se "aplasta" al pulsar */
.finance-button, .logout-button, .lock-button, .fin-back,
.ghost-button, .icon-button,
.task-form button, .timer-actions .btn-primary, .login-card button, .x-submit,
.fin-add button, .cm-add button, .dm-actions button[type="submit"], .preset-button.is-active {
  border: 1.5px solid var(--bd-strong);
  box-shadow: 3px 3px 0 var(--hard);
  transition: transform 0.14s var(--ease-snap), box-shadow 0.14s var(--ease-snap), background 0.15s, border-color 0.15s;
}

.task-form button, .timer-actions .btn-primary, .login-card button, .x-submit,
.fin-add button, .cm-add button, .dm-actions button[type="submit"], .preset-button.is-active {
  border-color: #222c42;
}

.finance-button:hover, .logout-button:hover, .lock-button:hover, .fin-back:hover,
.ghost-button:hover, .icon-button:hover,
.task-form button:hover, .timer-actions .btn-primary:hover, .login-card button:hover, .x-submit:hover,
.fin-add button:hover, .cm-add button:hover, .preset-button.is-active:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--hard);
}

.finance-button:active, .logout-button:active, .lock-button:active, .ghost-button:active, .icon-button:active,
.task-form button:active, .timer-actions .btn-primary:active, .login-card button:active, .x-submit:active,
.fin-add button:active, .cm-add button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--hard);
}

/* Bloques: borde algo más marcado y sombra dura; se levantan al pasar el ratón */
.panel, .dashboard-grid .panel {
  border: 1.5px solid var(--bd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 5px 5px 0 var(--hard);
  transition: border-color 0.2s var(--ease), translate 0.2s var(--ease-snap), box-shadow 0.2s var(--ease-snap);
}

.panel:hover, .dashboard-grid .panel:hover {
  translate: -2px -2px;
  border-color: var(--bd-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 7px 7px 0 var(--hard);
}

@media (hover: none), (max-width: 680px) {
  .panel:hover, .dashboard-grid .panel:hover { translate: 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 5px 5px 0 var(--hard); }
}

/* Lo destructivo sigue en rojo al pasar el ratón */
.remove-task:hover, .remove-capture:hover, .remove-subtask:hover, .danger-button:hover,
.panel-remove-btn:hover, .row-del:hover, .oo-del:hover {
  color: var(--neg);
  border-color: var(--neg);
  box-shadow: none;
}

/* Detalles de acento */
#timerPhase, .timer-face p { color: var(--cyan); }

/* Editor de texto de tarea: ocupa varias líneas y crece con el contenido */
textarea.rename-input {
  display: block;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Selector de color de prioridad */
.pri-menu {
  position: fixed; z-index: 1000; display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-hard, #10131a); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.pri-menu button {
  width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%;
  border: 2px solid transparent; background: var(--c);
}
.pri-menu button.is-current { border-color: #fff; }
.pri-menu .pri-none { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1; }

/* Escritura estilo macOS: San Francisco con trazo algo más firme, tracking ajustado y más aire */
input:not([type="checkbox"]):not([type="radio"]), textarea, .task-item > span:nth-of-type(2), .subtask-item > span, .capture-item > span {
  font-family: var(--font-ui);
  font-size: 0.97rem;
  font-weight: 450;
  letter-spacing: -0.012em;
  line-height: 1.5;
  color: #eef1fa;
  caret-color: var(--cyan);
  font-optical-sizing: auto;
  font-feature-settings: "calt", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
input::placeholder, textarea::placeholder { font-weight: 400; letter-spacing: -0.01em; }

/* Texto de la fila centrado con el check y los botones (28 px): sin relleno superior que lo bajaba */
.task-item > span:nth-of-type(2), .capture-item > span:nth-of-type(2) {
  padding-top: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
}
.task-item > input[type="checkbox"] { margin-top: 4px; }

/* Cabeceras de página alineadas con el texto de dentro de los bloques (relleno del bloque + borde) */
.topbar > section:first-child, .fin-top > section:first-child { padding-left: 22px; }
@media (max-width: 640px) {
  .topbar > section:first-child, .fin-top > section:first-child { padding-left: 18px; }
}

/* Diario de avances */
.log-form { display: grid; gap: 8px; }
.log-form textarea { resize: none; min-height: 64px; }
.log-form-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.log-hint { color: var(--muted); font-size: 0.76rem; }
.log-history { margin-top: 14px; display: grid; gap: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.log-day h3 { margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; color: var(--cyan); letter-spacing: 0; }
.log-entry { display: grid; grid-template-columns: 44px 1fr 24px; gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid var(--line); }
.log-entry time { color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.log-entry p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.45; }
.log-remove { width: 24px; min-height: 24px; padding: 0; border-radius: 8px; opacity: 0.3; }
.log-entry:hover .log-remove { opacity: 1; }
.log-more { justify-self: start; }

.log-form.task-form { display: grid; grid-template-columns: 1fr; }

/* Alineación óptica: la tinta de las letras grandes empieza algo a la derecha de su caja, así que el
   resto de la cabecera (fecha, puntito, saludo) se corre esa misma distancia. --ink = fracción del cuerpo del h1 */
.topbar > section:first-child > :not(h1), .fin-top > section:first-child > :not(h1) {
  margin-left: calc(var(--h1-size) * var(--ink, 0.075));
}

/* Las tres tarjetas del resumen: misma distancia a los botones de arriba y a los bloques de abajo */
.topbar { margin-bottom: 14px; }
.topbar-summary { gap: 14px; }
@media (max-width: 680px) {
  .topbar { gap: 14px; }
}
