:root {
  /* Tema claro: gris claro + azul tenue */
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --line: #dde4ee;
  --line-soft: #e8edf4;
  --ink: #243244;
  --muted: #647488;
  --muted-dim: #93a1b2;

  --accent: #5a7fb0;          /* azul tenue (acentos, bordes activos) */
  --accent-strong: #4c719f;   /* botones */
  --accent-press: #406191;
  --accent-soft: #e9f0f8;     /* fondo azul muy claro */
  --accent-ink: #ffffff;
  --amber: var(--accent);     /* alias de compatibilidad */
  --amber-press: var(--accent-press);

  --ok: #3f9b6b;
  --cyan: #3a8fa6;
  --danger: #c8555f;
  --steel-blue: #6c86a8;

  --radius: 12px;
  --tag: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Barlow Semi Condensed', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(36,50,68,0.05), 0 4px 12px -8px rgba(36,50,68,0.12);
  --shadow-md: 0 10px 30px -16px rgba(36,50,68,0.22);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(90,127,176,0.08), transparent 60%),
    repeating-linear-gradient(115deg, rgba(36,50,68,0.012) 0 2px, transparent 2px 24px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
.wrap { min-height: 100%; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; }
.brand .gauge { width: 26px; height: 26px; flex: none; }
.brand .word { font-size: 21px; line-height: 1; }
.brand .word b { color: var(--accent-strong); font-weight: 700; }

/* ===================== ACCESO ===================== */
.auth-stage { flex: 1; display: grid; place-items: center; padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); }
.auth { width: 100%; max-width: 392px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand { margin-bottom: 14px; }
.auth-head p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.ticket { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow-md); }
.ticket::before { content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 1px; background-image: radial-gradient(circle, var(--line) 1.4px, transparent 1.6px); background-size: 11px 1px; background-repeat: repeat-x; opacity: 0.9; }
.ticket .stub { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 26px; height: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; }
.ticket .stub::after { content: ""; position: absolute; inset: 6px 9px; border-radius: 50%; background: var(--line-soft); }
.tag-label { font-family: var(--tag); font-size: 11px; letter-spacing: 0.18em; color: var(--muted-dim); text-transform: uppercase; margin: 4px 0 18px; text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 4px; margin-bottom: 20px; }
.tab { appearance: none; border: 0; background: transparent; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; color: var(--muted); padding: 9px 8px; border-radius: 6px; cursor: pointer; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow-sm); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Campos / botones ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; font-family: var(--body); font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,127,176,0.18); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn { width: 100%; font-family: var(--display); font-weight: 700; font-size: 15.5px; letter-spacing: 0.03em; color: var(--accent-ink); background: var(--accent-strong); border: 0; border-radius: 9px; padding: 12px 14px; cursor: pointer; margin-top: 6px; transition: background .15s ease, transform .05s ease; }
.btn:hover { background: var(--accent-press); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.ghost-btn { font-family: var(--display); font-weight: 600; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ghost-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.ghost-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-inline { width: auto; margin: 0; padding: 10px 16px; font-size: 14px; }
.btn-sm { width: auto; margin: 0; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.btn-sm:hover { border-color: var(--accent); }
.btn-sm.amber { background: var(--accent-strong); color: var(--accent-ink); border-color: var(--accent-strong); }
.btn-sm.amber:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn-sm.danger { color: var(--danger); border-color: rgba(200,85,95,0.35); background: var(--surface); }
.btn-sm.danger:hover { background: rgba(200,85,95,0.08); }
.btn-sm.wa { background: #25D366; color: #fff; border-color: #25D366; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.btn-sm.wa:hover { background: #1eb858; border-color: #1eb858; }
.btn-sm.wa svg { width: 14px; height: 14px; }

.msg { font-size: 13px; line-height: 1.45; border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fbecee; color: #a23b45; border: 1px solid rgba(200,85,95,0.35); }
.msg.ok { background: #e7f4ec; color: #2f7a52; border: 1px solid rgba(63,155,107,0.35); }
.hint { margin: 14px 2px 0; font-size: 12px; color: var(--muted-dim); text-align: center; line-height: 1.5; }

/* ===================== TOPBAR + NAV ===================== */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 26px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 30; }
.topbar-left { display: flex; align-items: center; gap: 26px; }
.nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.nav a { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.01em; color: var(--muted); text-decoration: none; padding: 9px 15px; border-radius: 9px; transition: color .15s ease, background .15s ease; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--accent-strong); background: var(--accent-soft); }
.nav a.soon { color: var(--muted-dim); cursor: default; }
.nav a.soon:hover { background: transparent; color: var(--muted-dim); }
.user-chip { display: flex; align-items: center; gap: 12px; }
.who { text-align: right; line-height: 1.25; }
.who .name { font-size: 14px; font-weight: 600; }
.who .badge { font-family: var(--tag); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-strong); }
.who .badge.cli { color: var(--steel-blue); }

.panel { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 22px calc(40px + env(safe-area-inset-bottom)); }
.section-label { display: flex; align-items: center; gap: 10px; font-family: var(--tag); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-dim); margin: 0 0 14px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Saludo / catálogo cliente ---------- */
.greet { margin: 4px 0 26px; }
.greet h1 { font-family: var(--display); font-weight: 700; font-size: 28px; margin: 0 0 6px; letter-spacing: 0.01em; }
.greet p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 30px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px; box-shadow: var(--shadow-sm); }
.svc h3 { font-family: var(--display); font-weight: 600; font-size: 16.5px; margin: 0 0 4px; letter-spacing: 0.01em; }
.svc .desc { color: var(--muted); font-size: 13px; line-height: 1.45; min-height: 18px; }
.svc .meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.svc .price { font-family: var(--tag); font-size: 15px; color: var(--accent-strong); }
.svc .dur { font-family: var(--tag); font-size: 12px; color: var(--muted-dim); }
.soon { background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 11px; padding: 18px 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.soon b { color: var(--ink); font-weight: 600; }
.loading { color: var(--muted-dim); font-size: 14px; font-family: var(--tag); }

/* ===================== CALENDARIO ===================== */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-title { display: flex; align-items: center; gap: 12px; }
.cal-title h1 { font-family: var(--display); font-weight: 700; font-size: 25px; margin: 0; letter-spacing: 0.01em; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 36px; height: 36px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; font-size: 16px; transition: border-color .15s ease, background .15s ease; }
.cal-nav button:hover { border-color: var(--accent); }
.cal-nav .today { width: auto; padding: 0 14px; font-family: var(--display); font-weight: 600; font-size: 13.5px; }
.cal-nav .nav-action { width: auto; height: 36px; padding: 0 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 13px; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-weekdays div { padding: 9px 8px; font-family: var(--tag); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dim); text-align: left; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; cursor: pointer; transition: background .12s ease; display: flex; flex-direction: column; gap: 4px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out { background: var(--surface-2); cursor: default; }
.cal-cell.out:hover { background: var(--surface-2); }
.cal-daynum { font-family: var(--tag); font-size: 12.5px; color: var(--muted); align-self: flex-start; padding: 1px 2px; }
.cal-cell.out .cal-daynum { color: var(--muted-dim); opacity: .65; }
.cal-cell.today .cal-daynum { background: var(--accent-strong); color: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 500; }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 3px 7px; font-size: 11.5px; line-height: 1.3; cursor: pointer; background: var(--surface-2); color: var(--ink); border-left: 3px solid var(--steel-blue); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-chip:hover { filter: brightness(0.96); }
.cal-chip b { font-family: var(--tag); font-weight: 500; font-size: 11px; margin-right: 4px; color: var(--muted); }
.cal-chip.solicitada,
.cal-chip.confirmada,
.cal-chip.en_proceso { background: #e3f5ea; border-left-color: #1d7a44; color: #14512f; }
.cal-chip.solicitada b,
.cal-chip.confirmada b,
.cal-chip.en_proceso b { color: #1d7a44; }
.cal-chip.completada { background: #e3f5ea; border-left-color: #1d7a44; color: #14512f; opacity: .7; }
.cal-chip.completada b { color: #1d7a44; }
.cal-chip.cancelada { background: #fbe7e7; border-left-color: #b3261e; color: #8a1c17; text-decoration: line-through; }
.cal-chip.cancelada b { color: #b3261e; }
.cal-chip.no_asistio { background: #fdeede; border-left-color: #c0853e; color: #7a5217; }
.cal-chip.no_asistio b { color: #c0853e; }
.cal-more { font-size: 11px; color: var(--muted-dim); font-family: var(--tag); padding: 1px 4px; }

/* ===================== MODAL ===================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(36,50,68,0.34); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(36,50,68,0.4); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-head h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0; letter-spacing: 0.01em; }
.modal-close { background: transparent; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }

.inline-add { border: 1px dashed var(--accent); border-radius: 9px; padding: 12px; margin-bottom: 14px; background: var(--accent-soft); }
.linklike { background: none; border: 0; color: var(--accent-strong); font-size: 12.5px; cursor: pointer; padding: 0; font-family: var(--body); }
.linklike:hover { text-decoration: underline; }

.svc-pick { display: grid; gap: 8px; max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--surface-2); }
.svc-pick label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); cursor: pointer; margin: 0; }
.svc-pick label .p { margin-left: auto; font-family: var(--tag); font-size: 12px; color: var(--muted); }
.svc-pick input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent-strong); }

.detail-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row .k { color: var(--muted); min-width: 96px; font-size: 13px; }
.detail-row .v { color: var(--ink); }
.estado-pill { display: inline-block; font-family: var(--tag); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.estado-pill.confirmada { color: var(--accent-strong); border-color: rgba(76,113,159,0.4); background: var(--accent-soft); }
.estado-pill.solicitada { color: var(--steel-blue); border-color: rgba(108,134,168,0.4); }
.estado-pill.en_proceso { color: var(--cyan); border-color: rgba(58,143,166,0.4); }
.estado-pill.completada { color: var(--ok); border-color: rgba(63,155,107,0.4); }
.estado-pill.cancelada, .estado-pill.no_asistio { color: var(--danger); border-color: rgba(200,85,95,0.4); }

/* ===================== LISTAS ===================== */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { font-family: var(--display); font-weight: 700; font-size: 25px; margin: 0; letter-spacing: 0.01em; }
.toolbar .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { font-family: var(--body); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; width: 210px; }
.search::placeholder { color: var(--muted-dim); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,127,176,0.18); }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.trow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 13px 16px; box-shadow: var(--shadow-sm); }
.trow .ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--display); font-weight: 700; font-size: 16px; }
.trow .main { flex: 1; min-width: 0; }
.trow .main .t { font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: 0.01em; }
.trow .main .s { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .main .s .mono { font-family: var(--tag); }
.trow .main .moto-line { color: var(--accent-strong); font-size: 12.5px; margin-top: 3px; font-family: var(--tag); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .meta { text-align: right; font-family: var(--tag); color: var(--muted); font-size: 13px; white-space: nowrap; }
.trow .acts { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 14px; }
.empty .big { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink); margin-bottom: 6px; }

.foot { text-align: center; padding: 20px; color: var(--muted-dim); font-family: var(--tag); font-size: 11px; letter-spacing: 0.08em; }

/* ---- Grupos de formulario (cliente vs moto) ---- */
.fgroup { border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 4px; margin-bottom: 14px; background: var(--surface-2); }
.fgroup.moto { background: var(--accent-soft); border-color: var(--accent); }
.fgroup-title { font-family: var(--tag); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-dim); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.fgroup.moto .fgroup-title { color: var(--accent-strong); }
.fgroup-title .opt { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 11.5px; color: var(--muted); }

/* ---- Página ancha + tabla de clientes ---- */
.panel.wide { max-width: min(1640px, 96vw); }
.ctable-wrap { overflow: auto; max-height: calc(100vh - 232px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ctable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.ctable thead th { position: sticky; top: 0; z-index: 5; background: var(--surface-2); color: var(--muted); font-family: var(--tag); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; text-align: left; padding: 7px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ctable thead th.acts-col { text-align: right; }
.ctable tbody td { padding: 6px 11px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; color: var(--ink); }
.ctable tbody tr:last-child td { border-bottom: 0; }
.ctable tbody tr:hover td { background: var(--surface-2); }
.ctable .c-nombre { font-family: var(--display); font-weight: 600; font-size: 12.5px; }
.ctable .ellip30 { display: inline-block; max-width: 25ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ctable .c-mono { font-family: var(--tag); color: var(--muted); }
.ctable .c-forma { font-size: 11px; color: var(--muted); display: inline-block; max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ctable .c-color { font-family: var(--tag); color: var(--accent-strong); }
.ctable .c-dim { color: var(--muted-dim); }
.ctable td.acts { text-align: right; }
.row-acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
.iconbtn { width: 28px; height: 28px; padding: 0; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; text-decoration: none; }
.iconbtn:hover { border-color: var(--accent); color: var(--ink); }
.iconbtn svg { width: 15px; height: 15px; }
.iconbtn.wa { background: #25D366; border-color: #25D366; color: #fff; }
.iconbtn.wa:hover { background: #1eb858; border-color: #1eb858; }
.iconbtn.danger { color: var(--danger); border-color: rgba(200,85,95,0.3); }
.iconbtn.danger:hover { background: rgba(200,85,95,0.08); border-color: var(--danger); }
.opill { display: inline-block; font-family: var(--tag); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.opill.abierta { color: var(--accent-strong); border-color: rgba(76,113,159,0.4); background: var(--accent-soft); }
.opill.cerrada { color: var(--ok); border-color: rgba(63,155,107,0.4); }
.opill.cancelada { color: var(--danger); border-color: rgba(200,85,95,0.4); }
.opill.pendiente { color: #9a6a00; border-color: rgba(191,143,0,0.45); background: #fbf3dd; animation: opillPulse 1.8s ease-in-out infinite; }
@keyframes opillPulse {
  0%, 100% { background: #fbf3dd; box-shadow: 0 0 0 0 rgba(191,143,0,0.30); }
  50% { background: #f6e6b4; box-shadow: 0 0 0 3px rgba(191,143,0,0.12); }
}
@media (prefers-reduced-motion: reduce) { .opill.pendiente { animation: none; } }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-left { gap: 14px; }
  .nav { position: static; transform: none; order: 3; width: 100%; justify-content: center; flex-wrap: wrap; margin-top: 6px; gap: 4px; }
  .nav a { padding: 7px 11px; font-size: 14px; }
  .panel { padding: 18px 14px 40px; }
  .panel.wide { max-width: 100%; }
  .ctable-wrap { max-height: calc(100vh - 210px); }
  .cal-cell { min-height: 78px; }
  .cal-chip { font-size: 10.5px; padding: 2px 5px; }
  .search { width: 100%; }
  .toolbar-actions { width: 100%; }
}
@media (max-width: 460px) {
  .greet h1 { font-size: 24px; }
  .row-2 { grid-template-columns: 1fr; }
  .cal-title h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
