/* ============================================================
   HORAS SANITARIO — style.css
   Tema: Industrial / médico oscuro
   Tipografía: DM Mono (datos) + DM Sans (UI)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:          #0d0f14;
  --bg-card:     #13161f;
  --bg-input:    #1a1e2a;
  --bg-hover:    #1e2332;
  --border:      #252a3a;
  --border-hi:   #3a4260;
  --text:        #eaedf5;
  --text-dim:    #8e99bb;
  --text-muted:  #535c7a;
  --accent:      #4d84f5;
  --accent-dim:  #1e2e5a;
  --accent-glow: rgba(77,132,245,0.12);
  --green:       #29c98e;
  --green-dim:   #0c3525;
  --red:         #f05468;
  --red-dim:     #3d1020;
  --amber:       #f5a623;
  --amber-dim:   #3d2800;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --font-ui:     'DM Sans', system-ui, sans-serif;
  --font-mono:   'DM Mono', monospace;
  --nav-h:       58px;
  --bottom-h:    70px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ──────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; min-height: 100dvh; }

/* Top nav */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(13,15,20,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem;
}
.nav-logo { display: flex; align-items: center; gap: 0; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-logo svg { color: var(--accent); margin-right: 0.45rem; }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-user {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-dim); cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 100px; padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  transition: border-color 0.2s;
}
.nav-user:hover { border-color: var(--border-hi); }

/* Avatar */
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-dim); border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 600; color: var(--accent);
  flex-shrink: 0; font-family: var(--font-mono);
}

/* Main content */
.main-content {
  flex: 1;
  padding-top: var(--nav-h);
  /* Leave room for fixed bottom nav + safe area */
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 1.5rem);
}

/* Bottom tab bar */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(13,15,20,0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  /* Safe area: iOS home indicator / Android nav bar */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Force GPU layer so nothing renders on top */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; background: none; border: none;
  cursor: pointer; color: var(--text-muted);
  font-family: var(--font-ui); font-size: 0.66rem; font-weight: 500;
  transition: color 0.2s; padding: 10px 0 10px; position: relative;
  min-height: 56px;
}
.tab-btn svg { width: 22px; height: 22px; stroke-width: 1.5; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::before {
  content: ''; position: absolute;
  top: 0; left: 25%; right: 25%; height: 2px;
  background: var(--accent); border-radius: 0 0 3px 3px;
}

/* ── Views ──────────────────────────────────────────────────── */
.view { display: none; padding: 1.25rem; max-width: 600px; margin: 0 auto; }
.view.active { display: block; }

/* ── Section header ─────────────────────────────────────────── */
.sec-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.sec-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.sec-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 3px; text-transform: capitalize; }

/* ── Cards ──────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 0.875rem; }
.card-sm { padding: 0.875rem 1rem; }
.card-flush { padding: 0; overflow: hidden; }

/* ── Form elements ──────────────────────────────────────────── */
.field { margin-bottom: 0.875rem; }
.field:last-child { margin-bottom: 0; }
label {
  display: block; font-size: 0.72rem; font-weight: 500;
  color: var(--text-dim); margin-bottom: 0.3rem;
  text-transform: uppercase; letter-spacing: 0.07em;
}
input, select, textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-ui); font-size: 1rem; padding: 0.75rem 1rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23606880' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center;
  padding-right: 2.5rem;
}
input[type="time"] { font-family: var(--font-mono); letter-spacing: 0.05em; font-size: 1.05rem; }
input[type="date"] { font-family: var(--font-mono); }
input[type="color"] { height: 46px; padding: 4px 6px; cursor: pointer; }
textarea { resize: vertical; min-height: 72px; font-size: 0.9rem; }

.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.fields-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 0.7rem 1.15rem; transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { background: var(--bg-input); color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text); }
.btn-danger { background: var(--red-dim); color: var(--red); }
.btn-icon { padding: 0.55rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 0.95rem; border-radius: var(--radius); }

/* ── Stat cards ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat-lbl { font-size: 0.68rem; font-weight: 500; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.4rem; }
.stat-val { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.stat-hint { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.35rem; }
.stat-accent .stat-val { color: var(--accent); }
.stat-ok      .stat-val { color: var(--green); }
.stat-deficit .stat-val { color: var(--red); }
.stat-neutral .stat-val { color: var(--text); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem; border-radius: 100px; text-transform: uppercase;
}
.badge svg { width: 10px; height: 10px; }
.badge-ok      { background: var(--green-dim); color: var(--green); }
.badge-deficit { background: var(--red-dim);   color: var(--red); }
.badge-warn    { background: var(--amber-dim); color: var(--amber); }
.badge-neutral { background: var(--bg-input);  color: var(--text-dim); }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-wrap { background: var(--bg-input); border-radius: 100px; height: 5px; overflow: hidden; margin-top: 0.5rem; }
.progress-bar  { height: 100%; border-radius: 100px; transition: width 0.5s ease; }
.progress-ok   { background: var(--green); }
.progress-deficit { background: var(--red); }
.progress-over { background: var(--accent); }

/* ── Visit item (list) ───────────────────────────────────────── */
.visit-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 0.5rem;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.visit-item:hover { border-color: var(--border-hi); background: var(--bg-hover); }
.visit-client { flex: 1; min-width: 0; }
.visit-client-name { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-client-dir  { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-time { text-align: right; flex-shrink: 0; }
.visit-total { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; }
.visit-detail { font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-mono); margin-top: 2px; }
.visit-del { color: var(--text-muted); transition: color 0.2s; }
.visit-del:hover { color: var(--red); }

/* ── Day summary row ─────────────────────────────────────────── */
.day-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 0.5rem; overflow: hidden;
}
.day-row-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; cursor: pointer;
  transition: background 0.15s;
}
.day-row-header:hover { background: var(--bg-hover); }
.day-name  { font-size: 0.8rem; font-weight: 600; width: 36px; flex-shrink: 0; }
.day-date  { font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono); width: 40px; flex-shrink: 0; }
.day-total { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; flex: 1; }
.day-total.empty { color: var(--text-muted); font-family: var(--font-ui); font-size: 0.8rem; }
.day-chevron { color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.day-chevron.open { transform: rotate(180deg); }
.day-body { display: none; padding: 0 1rem 0.875rem; border-top: 1px solid var(--border); }
.day-body.open { display: block; }
.day-body .visit-item { margin-bottom: 0.375rem; }
.day-body .visit-item:last-child { margin-bottom: 0; }

/* ── Week row ────────────────────────────────────────────────── */
.week-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 0.5rem; overflow: hidden;
}
.week-row-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem; cursor: pointer; transition: background 0.15s;
}
.week-row-header:hover { background: var(--bg-hover); }
.week-num   { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); width: 28px; flex-shrink: 0; }
.week-total { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; flex: 1; }
.week-diff  { font-family: var(--font-mono); font-size: 0.82rem; flex-shrink: 0; }
.week-diff.pos { color: var(--green); }
.week-diff.neg { color: var(--red); }
.week-body { display: none; padding: 0 0.75rem 0.75rem; border-top: 1px solid var(--border); }
.week-body.open { display: block; }

/* ── Nav arrows ──────────────────────────────────────────────── */
.period-nav {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem;
}
.period-nav .btn { padding: 0.55rem 0.7rem; }
.period-label { flex: 1; text-align: center; font-size: 0.88rem; font-weight: 500; }

/* ── Client list item ────────────────────────────────────────── */
.client-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 0.5rem;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-weight: 500; font-size: 0.9rem; }
.client-dir  { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── Bottom sheet / overlay ──────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(5,7,14,0.8); backdrop-filter: blur(6px);
}
.overlay.open { display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 600px;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  animation: slideUp 0.22s cubic-bezier(.16,1,.3,1);
  max-height: 92dvh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); opacity:0; } to { transform: translateY(0); opacity:1; } }
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1.25rem; }
.sheet-title  { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; letter-spacing: -0.01em; }
.sheet-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.sheet-actions .btn { flex: 1; }

/* ── Config section ──────────────────────────────────────────── */
.config-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 0.875rem; }
.config-row {
  display: flex; align-items: center; padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border); gap: 0.75rem;
}
.config-row:last-child { border-bottom: none; }
.config-row-info { flex: 1; }
.config-row-label { font-size: 0.88rem; font-weight: 500; }
.config-row-sub   { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; font-family: var(--font-mono); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: calc(var(--nav-h) + 0.75rem); left: 0; right: 0;
  z-index: 300; display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 100px; padding: 0.6rem 1.1rem;
  font-size: 0.82rem; font-weight: 500; box-shadow: var(--shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
@keyframes toastIn  { from { opacity:0; transform: translateY(-8px) scale(0.95); } to { opacity:1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(-6px); } }

/* ── Spinner / loading ───────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.65s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.empty-state   { text-align: center; padding: 2.5rem 1rem; color: var(--text-dim); }
.empty-state svg { opacity: 0.25; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.85rem; }

/* ── Utilities ───────────────────────────────────────────────── */
.mono     { font-family: var(--font-mono); }
.dim      { color: var(--text-dim); }
.muted    { color: var(--text-muted); }
.accent   { color: var(--accent); }
.green    { color: var(--green); }
.red      { color: var(--red); }
.sm       { font-size: 0.82rem; }
.xs       { font-size: 0.72rem; }
.bold     { font-weight: 600; }
.mt-sm    { margin-top: 0.5rem; }
.mt-md    { margin-top: 1rem; }
.mt-lg    { margin-top: 1.5rem; }
.mb-sm    { margin-bottom: 0.5rem; }
.divider  { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── Inline visit editor (Hoy view) ─────────────────────────── */
.hoy-actions { display:flex; flex-direction:column; gap:0.5rem; margin-bottom:0.875rem; }
.hoy-copy-row { display:flex; gap:0.5rem; }
.hoy-copy-btn {
  flex:1; font-size:0.72rem; padding:0.55rem 0.4rem;
  white-space:normal; text-align:center; line-height:1.3;
  min-width:0;
}

.vi-list { display:flex; flex-direction:column; gap:0.5rem; }

.vi-row {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:0.875rem 1rem;
  transition:border-color 0.3s;
}
.vi-row.vi-saving { border-color:var(--accent); opacity:0.75; }
.vi-row.vi-saved  { border-color:var(--green); }

.vi-header { display:flex; align-items:center; gap:0.5rem; margin-bottom:0.625rem; }
.vi-name   { flex:1; font-weight:500; font-size:0.9rem; }
.vi-total  { font-family:var(--font-mono); font-size:0.88rem; color:var(--accent); font-weight:500; flex-shrink:0; }
.vi-del    { color:var(--text-muted); flex-shrink:0; }
.vi-del:hover { color:var(--red); background:var(--red-dim); }

.vi-inputs { display:grid; grid-template-columns:1fr 1fr; gap:0.5rem; }
.vi-field label {
  font-size:0.65rem; font-weight:500; color:var(--text-dim);
  text-transform:uppercase; letter-spacing:0.07em;
  margin-bottom:0.25rem; display:block;
}
.vi-field input { font-family:var(--font-mono); font-size:0.95rem; padding:0.55rem 0.75rem; }

.vi-notas { font-size:0.72rem; color:var(--text-dim); margin-top:0.5rem; font-style:italic; }

.vi-row-new { background:var(--bg); border-style:dashed; }
.vi-row-new select { font-size:0.88rem; padding:0.5rem 2.5rem 0.5rem 0.75rem; }
.vi-save-btn { margin-top:0.625rem; width:100%; }

/* Drag handle */
.vi-drag-handle {
  color:var(--text-muted); cursor:grab;
  padding:0.4rem 0.5rem 0.4rem 0;
  touch-action:none; user-select:none; -webkit-user-select:none;
  flex-shrink:0; display:flex; align-items:center;
}
.vi-drag-handle:active { cursor:grabbing; color:var(--text-dim); }
.vi-row.vi-dragging { opacity:0.35; }
.vi-row.vi-drop-above { border-top:2px solid var(--accent) !important; margin-top:-1px; }
.vi-ghost {
  position:fixed; z-index:9999; pointer-events:none;
  border-radius:var(--radius-sm);
  box-shadow:0 12px 32px rgba(0,0,0,0.45);
  opacity:0.92;
}

/* ── Desktop sidebar layout ──────────────────────────────────── */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
  #app { flex-direction: row; }
  .side-nav {
    display: flex !important; flex-direction: column;
    width: 210px; flex-shrink: 0; position: fixed;
    left: 0; top: 0; bottom: 0;
    background: var(--bg-card); border-right: 1px solid var(--border);
    padding: 1.25rem 0.75rem; z-index: 100;
  }
  .side-nav-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em;
    padding: 0 0.5rem; margin-bottom: 1.75rem; color: var(--text);
  }
  .side-nav-logo span { color: var(--accent); }
  .side-tab {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-dim); cursor: pointer;
    background: none; border: none; font-family: var(--font-ui);
    transition: background 0.15s, color 0.15s;
    text-align: left; width: 100%;
  }
  .side-tab svg { width: 17px; height: 17px; flex-shrink: 0; }
  .side-tab:hover { background: var(--bg-hover); color: var(--text); }
  .side-tab.active { background: var(--accent-dim); color: var(--accent); }
  .side-nav-bottom { margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border); }
  .top-nav { left: 210px; }
  .main-content { padding-left: 210px; }
  .view { padding: 1.75rem 2rem; }
  .overlay.open { align-items: center; }
  .sheet { border-radius: var(--radius); max-height: 88dvh; }
}

/* ── Tour onboarding ──────────────────────────────────────── */
#tour-spotlight {
  position: fixed; z-index: 8000; pointer-events: none;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(5,7,12,0.82);
  transition: left 0.28s ease, top 0.28s ease, width 0.28s ease, height 0.28s ease;
  display: none;
}
#tour-tooltip {
  position: fixed; z-index: 8001;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 1.125rem 1.125rem 0.875rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  display: none;
}
.tour-title { font-size: 0.975rem; font-weight: 600; margin-bottom: 0.4rem; }
.tour-text  { font-size: 0.83rem; color: var(--text-dim); line-height: 1.55; margin-bottom: 0.875rem; }
.tour-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.tour-dots   { display: flex; gap: 4px; align-items: center; }
.tour-dot    { width: 5px; height: 5px; border-radius: 50%; background: var(--border-hi); transition: all 0.2s; flex-shrink: 0; }
.tour-dot.active { background: var(--accent); width: 14px; border-radius: 3px; }
.tour-btns   { display: flex; gap: 0.3rem; align-items: center; }

/* ── Mes cerrado banner ────────────────────────────────────── */
.mes-cerrado-banner {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--green-dim); border: 1px solid var(--green);
  border-radius: var(--radius-sm); padding: 0.875rem 1rem;
  margin-bottom: 1rem;
}
.mes-cerrado-txt strong { color: var(--green); display: block; font-size: 0.85rem; font-weight: 600; }
.mes-cerrado-txt span   { font-size: 0.73rem; color: var(--text-dim); }

/* ── Mes action bar ────────────────────────────────────────── */
.mes-actions {
  display: flex; gap: 0.625rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.mes-actions .btn { flex: 1; min-width: 0; font-size: 0.8rem; justify-content: center; }

/* ── Light mode ────────────────────────────────────────────── */
body.light {
  --bg:          #f0f2f8;
  --bg-card:     #ffffff;
  --bg-input:    #f5f7ff;
  --bg-hover:    #e8edf5;
  --border:      #d0d7e8;
  --border-hi:   #a8b4d0;
  --text:        #1a1d2e;
  --text-dim:    #4a5170;
  --text-muted:  #6b7494;
  --accent-dim:  #dce8ff;
  --green-dim:   #d1f5e8;
  --red-dim:     #ffe0e4;
  --amber-dim:   #fff3d0;
}
body.light .top-nav    { background: rgba(240,242,248,0.92); }
body.light .bottom-nav { background: rgba(240,242,248,0.95); border-top-color: var(--border); }
body.light .sheet      { box-shadow: 0 -4px 32px rgba(0,0,0,0.12); }
body.light #tour-tooltip { box-shadow: 0 8px 32px rgba(0,0,0,0.15); }

/* ── Nota diaria ───────────────────────────────────────────── */
.nota-diaria-wrap {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nota-diaria-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem;
}
.nota-diaria-input {
  width: 100%; min-height: 60px; resize: vertical;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-ui); font-size: 0.875rem;
  padding: 0.6rem 0.75rem; transition: border-color 0.2s;
}
.nota-diaria-input:focus { outline: none; border-color: var(--accent); }
.nota-diaria-input::placeholder { color: var(--text-muted); }
.nota-saving { border-color: var(--accent) !important; opacity: 0.7; }
.nota-saved  { border-color: var(--green) !important; }

/* ── Ausencias ─────────────────────────────────────────────── */
.ausencia-banner {
  display: flex; align-items: center; gap: 0.75rem;
  border-radius: var(--radius-sm); padding: 0.875rem 1rem;
  margin-bottom: 0.875rem;
}
.ausencia-banner.vacaciones { background: var(--accent-dim); border: 1px solid var(--accent); }
.ausencia-banner.baja_medica { background: var(--red-dim); border: 1px solid var(--red); }
.ausencia-banner.libre { background: var(--green-dim); border: 1px solid var(--green); }
.ausencia-banner.otro { background: var(--amber-dim); border: 1px solid var(--amber); }
.ausencia-icon { font-size: 1.3rem; flex-shrink: 0; }
.ausencia-info { flex: 1; }
.ausencia-info strong { display: block; font-size: 0.875rem; font-weight: 600; }
.ausencia-info span { font-size: 0.72rem; color: var(--text-dim); }
