:root {
  /* Colores de marca GeekDev (logo) */
  --brand-blue: #4A87CE;
  --brand-black: #010101;
  --brand-gray: #737373;


  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --surface-2: #F7F8F9;
  --ink: #111111;
  --ink-muted: #5C5C5C;
  --ink-faint: #737373;
  --line: #E2E3E5;
  --line-strong: #C8CACD;
  --accent: #2F6CB3;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7F0FA;

  --pri-bloqueante: #C0392B;
  --pri-bloqueante-bg: #FBE9E7;
  --pri-alta: #B4650E;
  --pri-alta-bg: #FBEEDC;
  --pri-media: #3D6A8C;
  --pri-media-bg: #E4EEF4;
  --pri-baja: #6B7280;
  --pri-baja-bg: #EDEEF0;

  --status-progreso: #1F7A64;
  --status-esperando: #7B5EA7;
  --status-progreso-bg: #E3F2EE;
  --status-esperando-bg: #EFEAF6;

  --ok: #1F7A64;
  --ok-bg: #E3F2EE;
  --danger: #C0392B;
  --danger-bg: #FBE9E7;
  --warn: #B4650E;
  --warn-bg: #FBEEDC;

  --shadow: 0 1px 2px rgba(30, 36, 48, 0.06), 0 4px 14px rgba(30, 36, 48, 0.05);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-blue: #6AA0DE;

    --bg: #0D0D0E;
    --surface: #171718;
    --surface-2: #1E1E20;
    --ink: #F2F2F2;
    --ink-muted: #A6A6A6;
    --ink-faint: #8A8A8A;
    --line: #2A2A2C;
    --line-strong: #3A3A3D;
    --accent: #7AA9E0;
    --accent-ink: #0D0D0E;
    --accent-soft: #1B2A3D;

    --pri-bloqueante: #E2695C;
    --pri-bloqueante-bg: #3A2220;
    --pri-alta: #D99A4E;
    --pri-alta-bg: #382A1B;
    --pri-media: #7FAAC9;
    --pri-media-bg: #1E2E3B;
    --pri-baja: #98A0AC;
    --pri-baja-bg: #262B33;

    --status-progreso: #4FB79B;
    --status-esperando: #A895D1;
    --status-progreso-bg: #17332C;
    --status-esperando-bg: #29223A;

    --ok: #4FB79B;
    --ok-bg: #17332C;
    --danger: #E2695C;
    --danger-bg: #3A2220;
    --warn: #D99A4E;
    --warn-bg: #382A1B;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
}

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

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.display {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
}

/* ---------- shell & nav ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: auto;
}

.brand-accent { color: var(--ink-faint); }
.glove { font-size: 15px; }

.topnav-links { display: flex; gap: 4px; }

.topnav-links a {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
}

.topnav-links a:hover { text-decoration: none; background: var(--surface-2); }
.topnav-links a.active { background: var(--accent-soft); color: var(--accent); }

.topnav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.user-name { color: var(--ink-muted); }
.logout-link { color: var(--ink-faint); }

.app-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* ---------- page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: 30px;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.page-head .subtitle { color: var(--ink-muted); font-size: 14px; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-bg); }
.btn-danger:hover { background: var(--danger-bg); }

.btn-sm { padding: 6px 11px; font-size: 12.5px; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 6px;
}
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- flash ---------- */
.flash {
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }

/* ---------- cards / sections ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.card-head .name {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
}

.card-body { padding: 18px; }
.card + .card { margin-top: 14px; }

/* ---------- stat tiles ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.stat .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.stat.is-blocking .num { color: var(--pri-bloqueante); }
.stat .label { font-size: 11.5px; color: var(--ink-muted); margin-top: 6px; }

@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- pills / badges ---------- */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill.bloqueante { color: var(--pri-bloqueante); background: var(--pri-bloqueante-bg); }
.pill.alta { color: var(--pri-alta); background: var(--pri-alta-bg); }
.pill.media { color: var(--pri-media); background: var(--pri-media-bg); }
.pill.baja { color: var(--pri-baja); background: var(--pri-baja-bg); }

.pill.pendiente { color: var(--ink-faint); background: var(--surface-2); }
.pill.en-progreso { color: var(--status-progreso); background: var(--status-progreso-bg); }
.pill.esperando { color: var(--status-esperando); background: var(--status-esperando-bg); }

.pill.activo { color: var(--ok); background: var(--ok-bg); }
.pill.pausado { color: var(--warn); background: var(--warn-bg); }
.pill.cerrado { color: var(--ink-faint); background: var(--surface-2); }

.pill.borrador { color: var(--ink-faint); background: var(--surface-2); }
.pill.enviada { color: var(--pri-media); background: var(--pri-media-bg); }
.pill.aceptada { color: var(--status-progreso); background: var(--status-progreso-bg); }
.pill.rechazada { color: var(--danger); background: var(--danger-bg); }
.pill.pagada { color: var(--ok); background: var(--ok-bg); }

.tag-kind {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace;
}

/* ---------- tables ---------- */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

table.data td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--surface-2); }

.table-wrap { overflow-x: auto; }

/* ---------- forms ---------- */
label { font-size: 12.5px; color: var(--ink-muted); display: block; margin-bottom: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="file"], select, textarea {
  font: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  width: 100%;
}

textarea { resize: vertical; min-height: 70px; font-family: inherit; }

.field { margin-bottom: 14px; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.inline-form .field { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ---------- task rows (shared with client detail + tasks.php) ---------- */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: none; }
.task-row.done { opacity: 0.5; }
.task-row.done .task-title { text-decoration: line-through; }

.check {
  appearance: none;
  width: 18px; height: 18px; min-width: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after {
  content: ""; position: absolute; left: 5px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 500; }
.task-title .tag-inline {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  color: var(--ink-faint); text-transform: uppercase; margin-right: 7px;
}
.task-notes { font-size: 12.5px; color: var(--ink-muted); margin-top: 3px; }
.task-meta { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.empty-note { padding: 22px 18px; text-align: center; color: var(--ink-faint); font-size: 13px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- login / install ---------- */
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-card .glove { font-size: 26px; display: block; margin-bottom: 6px; }
.auth-card h1 { font-size: 24px; margin: 0 0 4px; text-transform: uppercase; }
.auth-card p.lead { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 22px; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  font-size: 12.5px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--ink-muted);
}
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.hours-total {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--ink-muted);
}

@media (max-width: 480px) {
  .page-head h1 { font-size: 24px; }
  .topnav { padding: 10px 14px; }
  .card-body { padding: 14px; }
}

/* ---------- marca GeekDev (logo, favicon y colores) ---------- */
.topnav { border-bottom: 2px solid var(--brand-blue); }
.topnav-brand, .topnav-brand:hover { text-decoration: none; }
.topnav-brand { gap: 10px; }
.brand-mark { display: block; height: 34px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-word { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.32em; color: var(--ink); }
.brand-dev { color: var(--brand-blue); }
.brand-sub { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brand-gray); }
.auth-card { text-align: center; }
.auth-card form { text-align: left; }
.auth-card .auth-logo { display: block; width: 140px; height: auto; margin: 0 auto 10px; }
.auth-card h1.auth-title { font-size: 14px; font-weight: 600; letter-spacing: 0.4em; color: var(--brand-gray); margin: 0 0 6px; }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); opacity: 1; }
::selection { background: var(--brand-blue); color: #FFFFFF; }
@media (max-width: 600px) { .brand-mark { height: 28px; } .brand-word { font-size: 16px; } }
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) { .only-light { display: none !important; } .only-dark { display: block !important; } }

/* ==========================================================
   Rediseño UX 2026-10 · estructura, panel Hoy y formularios
   ========================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-muted); }
.ico { flex: none; }

/* ---------- barra superior ---------- */
.topnav { padding: 0; position: sticky; top: 0; z-index: 20; }
.topnav-inner { max-width: 1280px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; box-sizing: border-box; width: 100%; }
.topnav-brand { margin-right: 0; }
.topnav-links { gap: 4px; }
.topnav-links a { padding: 9px 14px; border-radius: 8px; font-size: 14px; }
.topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topnav-actions .btn { padding: 10px 16px; font-size: 14px; border-radius: 10px; }
.user-chip { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }

/* ---------- contenido ---------- */
.app-main { max-width: 1280px; padding: 28px 32px 64px; box-sizing: border-box; }
.page-head { margin-bottom: 22px; }
.eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.18em; color: var(--ink-faint); }
.page-title { margin: 6px 0 0; font-size: 44px; line-height: 1; letter-spacing: 0.02em; }
.back-link { font-size: 13px; color: var(--ink-muted); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-ink { background: var(--ink); color: var(--surface); }
.pill-line { background: var(--surface); border: 1px solid var(--line); color: var(--ink-muted); }

.layout-split { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.layout-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.layout-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* ---------- agregar rápido ---------- */
.quick-add { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; flex-wrap: wrap; }
.quick-add-icon { color: var(--brand-blue); display: flex; }
.quick-add input[type="text"] { flex: 1 1 220px; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); height: 42px; outline: none; }
.quick-add select { height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 0 10px; font: inherit; font-size: 13.5px; max-width: 200px; }
.quick-add .btn { height: 42px; padding: 0 18px; border-radius: 10px; }
.quick-add:focus-within { border-color: var(--brand-blue); }

/* ---------- grupos de tareas ---------- */
.task-group { overflow: hidden; border-radius: 14px; }
.task-group-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.task-group-head h2 { margin: 0; font-size: 20px; letter-spacing: 0.04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-danger { background: var(--danger); } .dot-ink { background: var(--ink); } .dot-brand { background: var(--brand-blue); } .dot-muted { background: var(--ink-faint); }
.task-row { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-height: 52px; box-sizing: border-box; }
.task-row:last-child { border-bottom: 0; }
.task-row .task-check-form { margin: 0; }
.check-hit { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; cursor: pointer; }
.check-hit input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.task-title { color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; }
.task-title:hover { color: var(--accent); }
.task-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-muted); }
.client-tag { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.meta-icon { display: inline-flex; color: var(--ink-faint); }
.prio { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio-bloqueante { background: var(--pri-bloqueante-bg); color: var(--pri-bloqueante); }
.prio-alta { background: var(--pri-alta-bg); color: var(--pri-alta); }
.prio-media { background: var(--pri-media-bg); color: var(--pri-media); }
.prio-baja { background: var(--pri-baja-bg); color: var(--pri-baja); }
.due { min-width: 96px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.due-vencidas { color: var(--danger); } .due-hoy { color: var(--ink); }
.bell { display: inline-flex; color: var(--brand-blue); }
.empty-state { padding: 28px; text-align: center; }
.empty-state h2 { margin: 0 0 6px; font-size: 24px; }
.empty-state p { margin: 0; color: var(--ink-muted); }

/* ---------- columna lateral ---------- */
.card-dark { background: #111111; color: #F2F2F2; border-color: #111111; padding: 20px; border-radius: 14px; }
.card-dark .display { color: #FFFFFF; }
.card-dark a { color: #8DB8EA; }
.side-head { display: flex; align-items: center; justify-content: space-between; }
.side-head h2, .side-card h2 { margin: 0; font-size: 20px; letter-spacing: 0.04em; }
.funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.funnel-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.funnel-label { width: 132px; color: #C9C9C9; }
.funnel-bar { flex: 1; height: 8px; border-radius: 4px; background: #2A2A2C; overflow: hidden; }
.funnel-bar span { display: block; height: 8px; border-radius: 4px; background: var(--brand-blue); }
.side-empty { margin: 12px 0 0; font-size: 13.5px; color: #B5B5B5; line-height: 1.5; }
.side-card { padding: 18px 20px; border-radius: 14px; }
.side-card .side-empty { color: var(--ink-muted); }
.side-note { margin: 4px 0 8px; font-size: 13px; }
.side-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; text-decoration: none; }
.side-item:first-of-type { margin-top: 10px; }
.side-item:hover { text-decoration: none; color: var(--accent); }
.side-item-row { justify-content: space-between; }
.side-when { width: 84px; flex: none; font-size: 12px; color: var(--accent); padding-top: 2px; }
.side-strong { font-weight: 500; }

/* ---------- formularios ---------- */
.form-wrap { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.form-card { padding: 24px; border-radius: 14px; }
.task-form input[type="text"], .task-form input[type="date"], .task-form input[type="time"], .task-form select, .task-form textarea { width: 100%; box-sizing: border-box; min-height: 46px; border-radius: 10px; font-size: 15px; }
.fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.fieldset legend { font-size: 13px; font-weight: 600; color: var(--ink-muted); margin-bottom: 8px; padding: 0; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 200px; min-width: 0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; box-sizing: border-box; }
.chip.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600; }
.chip-radio .chip { position: relative; }
.chip-radio .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-radio .chip:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.chip-radio .chip:has(input:focus-visible) { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.hint { margin: 0; font-size: 12.5px; color: var(--ink-muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.danger-zone { margin: 0; }
.btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid transparent; }
.btn-danger-ghost:hover { border-color: var(--danger); }

/* ---------- celular: barra inferior y botón + ---------- */
.bottomnav, .fab { display: none; }
@media (max-width: 760px) {
  .topnav-inner { padding: 10px 16px; gap: 12px; }
  .topnav-links, .topnav-new, .logout-link { display: none; }
  .topnav-actions { gap: 8px; }
  .app-main { padding: 18px 16px 120px; }
  .page-title { font-size: 34px; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--ink-muted); font-size: 11.5px; text-decoration: none; }
  .bottomnav a.active { color: var(--accent); font-weight: 600; }
  .fab { display: flex; position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 31; width: 58px; height: 58px; border-radius: 18px; background: var(--ink); color: var(--surface); align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
  .task-row { align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .task-body { flex: 1 1 calc(100% - 50px); }
  .task-row .prio { margin-left: 42px; }
  .due { min-width: 0; margin-left: auto; }
  .quick-add { padding: 8px; }
  .quick-add-icon { display: none; }
  .quick-add input[type="text"] { flex-basis: 100%; padding: 0 8px; }
  .quick-add select { flex: 1 1 40%; max-width: none; }
  .quick-add .btn { flex: 1 1 100%; justify-content: center; }
  .form-card { padding: 18px; }
  .form-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* campo de hora con el mismo estilo que los demás */
input[type="time"] { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; font: inherit; }
input[type="date"], input[type="time"] { color-scheme: light; }
@media (prefers-color-scheme: dark) { input[type="date"], input[type="time"] { color-scheme: dark; } }

/* ==========================================================
   Rediseño UX 2026-10 · parte 2: clientes, ficha y embudo
   ========================================================== */
.txt-danger { color: var(--danger); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.side-label { margin: 0 0 12px; font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.form-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.head-link { margin-left: auto; font-size: 13px; }
.pad-empty { margin: 0; padding: 18px; color: var(--ink-muted); font-size: 14px; }
.card-title { margin: 0 0 14px; font-size: 20px; letter-spacing: 0.04em; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-faint); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-btn:hover { color: var(--danger); border-color: var(--line); }

/* tonos de etapa */
.dot-warn { background: var(--warn); } .dot-ok { background: var(--ok); } .dot-accent { background: var(--accent); }
.stage-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stage-muted { background: var(--pri-baja-bg); color: var(--pri-baja); }
.stage-brand { background: var(--accent-soft); color: var(--accent); }
.stage-warn { background: var(--warn-bg); color: var(--warn); }
.stage-accent { background: var(--accent); color: var(--accent-ink); }
.stage-ok { background: var(--ok-bg); color: var(--ok); }
.stage-danger { background: var(--danger-bg); color: var(--danger); }
.stage-none { background: var(--surface-2); color: var(--ink-muted); border: 1px dashed var(--line-strong); }

/* ---------- lista de clientes ---------- */
.list-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 44px; flex: 1 1 260px; max-width: 380px; color: var(--ink-faint); }
.search-box input { border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); outline: none; width: 100%; height: 42px; padding: 0; }
.search-box:focus-within { border-color: var(--brand-blue); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips .chip { min-height: 38px; font-size: 13.5px; text-decoration: none; }
.client-list { border-radius: 14px; overflow: hidden; }
.cl-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) 0.9fr 1fr 0.9fr; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.cl-row:last-of-type { border-bottom: 0; }
a.cl-row:hover { background: var(--surface-2); text-decoration: none; }
.cl-row-head { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); padding-top: 10px; padding-bottom: 10px; }
.cl-cell-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-cell-name > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.cl-cell-name strong { font-weight: 600; }
.cl-cell-name small { color: var(--ink-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- ficha de cliente ---------- */
.cl-head { align-items: flex-end; }
.cl-title { min-width: 0; }
.cl-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cl-name-row .page-title { margin: 0; }
.cl-context { margin: 8px 0 0; color: var(--ink-muted); font-size: 15px; }
.cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-actions .btn { min-height: 42px; border-radius: 10px; }
.stage-form { margin: 0; display: flex; align-items: center; gap: 6px; }
.stage-select { display: inline-flex; align-items: center; border-radius: 999px; padding: 0 4px 0 12px; height: 34px; }
.stage-select select { border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 6px 0 0; height: 32px; }
.stage-select select option { color: var(--ink); background: var(--surface); }
.tag-kind { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-faint); }
.cl-layout .layout-side { flex: 1 1 280px; max-width: 360px; }
.cl-person { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cl-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; overflow-wrap: anywhere; }
.cl-next { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.cl-next .ico { margin-top: 2px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.kv-small { font-size: 12.5px; color: var(--ink-muted); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 2px 0 8px; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--brand-blue); }
.space-link { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; margin-top: 8px; min-height: 44px; box-sizing: border-box; }
.space-link:first-of-type { margin-top: 0; }
.space-link .ico { color: var(--accent); }
.space-link > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.space-link small { color: var(--ink-muted); font-size: 12px; }
.space-link:hover { border-color: var(--brand-blue); text-decoration: none; }
.space-empty { border-style: dashed; }
.space-empty small { color: var(--accent); }
.cl-notes { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); overflow-wrap: anywhere; }

.cl-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cl-tabs a { padding: 12px 14px; color: var(--ink-muted); font-size: 14px; white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cl-tabs a:hover { color: var(--ink); text-decoration: none; }
.cl-tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.cl-tabs .mono { font-size: 11.5px; color: var(--ink-faint); }
.cl-duo { display: flex; flex-wrap: wrap; gap: 18px; }
.cl-duo > .card { flex: 1 1 300px; min-width: 0; }
.task-row.is-done .task-title { color: var(--ink-faint); text-decoration: line-through; }
.done-group summary { cursor: pointer; list-style: none; }
.done-group summary::-webkit-details-marker { display: none; }
.done-group:not([open]) summary { border-bottom: 0; }
.task-note { color: var(--ink-faint); }

.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 9px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.tone-ink { background: var(--ink); } .tone-brand { background: var(--brand-blue); } .tone-ok { background: var(--ok); } .tone-accent { background: var(--accent); } .tone-muted { background: var(--ink-faint); }
.tl-text { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.tl-label { font-weight: 600; }
.tl-date { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.timeline-full li { border-top: 1px solid var(--line); }
.timeline-full li:first-child { border-top: 0; }

.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.doc-row:first-of-type { margin-top: 10px; }
.doc-row:hover { text-decoration: none; color: var(--accent); }
.doc-ext { width: 38px; height: 38px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.doc-info { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.doc-info small { color: var(--ink-muted); font-size: 12px; }

.inline-card .field-row { align-items: flex-end; }
.field-sm { flex: 0 1 160px !important; }
.field-grow { flex: 1 1 240px !important; }
.inline-card input[type="number"], .inline-card input[type="file"] { width: 100%; box-sizing: border-box; min-height: 46px; }
.form-actions-row { align-items: center; justify-content: space-between; }
.check-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 44px; }
.check-label input { width: 18px; height: 18px; accent-color: var(--ink); }
.data-row { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.data-row:last-child { border-bottom: 0; }
.data-row form { margin: 0; }
.dr-date { width: 64px; font-size: 12px; color: var(--ink-faint); flex: none; }
.dr-main { flex: 1 1 220px; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
a.dr-main:hover { color: var(--accent); }
.dr-num { font-weight: 600; white-space: nowrap; }
.dr-tag { font-size: 12px; color: var(--ok); }
.status-select { height: 34px; border-radius: 999px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.qs-aceptada, .qs-pagada { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.qs-enviada { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.qs-rechazada { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

/* ---------- embudo ---------- */
.stat-box { display: inline-flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.stat-box small { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.stat-box strong { font-size: 16px; margin-top: 2px; }
.board-scroll { overflow-x: auto; padding-bottom: 10px; margin: 0 -4px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; padding: 0 4px; min-height: 480px; }
.board-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, background .15s; }
.board-col.is-over { border-color: var(--brand-blue); background: var(--accent-soft); }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.board-col-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.board-col-head .mono { margin-left: auto; font-size: 12px; }
.deal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 7px; cursor: grab; }
.deal-card:hover { border-color: var(--line-strong); }
.deal-card.is-dragging { opacity: 0.5; }
.deal-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.deal-context { font-size: 13px; color: var(--ink-muted); }
.deal-amount { font-size: 13px; }
.deal-next { display: flex; align-items: flex-start; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--accent); }
.deal-next .ico { margin-top: 2px; }
.deal-next.is-late { color: var(--danger); }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.deal-foot form { margin: 0; }
.move-select { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-muted); font: inherit; font-size: 12.5px; padding: 0 6px; max-width: 150px; }
.board-extra { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.board-extra summary { cursor: pointer; }

@media (max-width: 760px) {
  .cl-row-head { display: none; }
  .cl-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; }
  .cl-row > span:nth-child(2) { justify-self: end; }
  .cl-row > span:nth-child(3), .cl-row > span:nth-child(4), .cl-row > span:nth-child(5) { font-size: 12.5px; color: var(--ink-muted); }
  .cl-row > span:nth-child(3)::before { content: "Abiertas: "; }
  .cl-row > span:nth-child(4) { justify-self: end; }
  .cl-row > span:nth-child(5) { display: none; }
  .search-box { max-width: none; }
  .cl-layout .layout-side { max-width: none; order: 2; }
  .cl-actions { width: 100%; }
  .cl-actions .btn { flex: 1 1 auto; justify-content: center; }
  .board { grid-auto-columns: 82%; }
  .data-row { padding: 10px 14px; gap: 8px 12px; }
  .dr-main { flex-basis: 100%; order: -1; }
}

.side-card h2.side-label, .form-card h2.side-label { margin: 0 0 12px; font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.cl-duo > .card, .layout-main > .card, .layout-side > .card { margin-top: 0; }

/* etapa «No ganado» */
.board-col-lost { background: transparent; border-style: dashed; }
.board-col-lost .deal-card { opacity: 0.85; }
.lost-reason { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--danger-bg); color: var(--danger); font-size: 12px; font-weight: 600; }
.cl-lost { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 13.5px; margin-bottom: 14px; }
.cl-lost span { color: var(--ink-muted); }
.cl-lost a { font-size: 12.5px; }
