@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/roboto-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/roboto-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/roboto-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-mono-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/roboto-mono-var.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/roboto-mono-var.woff2') format('woff2'); }

/* Hide scrollbars globally — scroll still works (iOS/Safari/Chrome/Firefox) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

:root {
  --bg:       #000000;
  --surface:  #141414;
  --surface2: #1F1F1F;
  --border:   #333333;
  --accent:   #276EF1;
  --accent2:  #e8834a;
  --green:    #4ade80;
  --red:      #f87171;
  --blue:     #60a5fa;
  --text:     #FFFFFF;
  --muted:    #AFAFAF;
  --radius:   14px;
  --font:     'Roboto', sans-serif;
  --mono:     'Roboto Mono', monospace;
}

/* ── LIGHT MODE ── */
[data-theme="light"] {
  --bg:       #F6F6F6;
  --surface:  #ffffff;
  --surface2: #EEEEEE;
  --border:   #E2E2E2;
  --accent:   #276EF1;
  --accent2:  #c05e20;
  --green:    #15803d;
  --red:      #dc2626;
  --blue:     #1d4ed8;
  --text:     #000000;
  --muted:    #757575;
}
[data-theme="light"] .overlay              { background: rgba(0,0,0,0.38); }
[data-theme="light"] .task-chip            { background: #276EF115; border-color: #276EF130; color: var(--accent); }
[data-theme="light"] .chem-chip            { background: #1d4ed815; border-color: #1d4ed830; color: var(--blue); }
[data-theme="light"] .stat-card::before    { opacity: 0.025; }
[data-theme="light"] .detail-panel         { background: var(--bg); }
[data-theme="light"] .search-inner input   { background: var(--surface); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-tap-highlight-color: transparent; }

.app { display: flex; flex-direction: column; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; }

/* HEADER */
.header { padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer;
}

/* STATS STRIP */
.stats-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 18px 20px 0; }
.stat-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 12px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; inset: 0; opacity: .04;
  background: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
  background-size: 8px 8px;
}
.stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 4px; }
.stat-value { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--accent); line-height: 1; }

/* SEARCH */
.search-wrap { padding: 14px 20px 0; }
.search-inner { position: relative; }
.search-inner input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px 10px 38px; color: var(--text);
  font-family: var(--mono); font-size: 13px; outline: none; transition: border-color .2s;
}
.search-inner input:focus { border-color: var(--accent); }
.search-inner input::placeholder { color: var(--muted); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.search-clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 700;
  cursor: pointer; padding: 4px; line-height: 1;
}
#search-input { padding-right: 34px; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* CLIENT LIST */
.list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 20px 20px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty p { font-size: 14px; }

.client-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: border-color .2s, transform .1s;
}
.client-card:active { transform: scale(.98); }
.client-card:hover { border-color: var(--accent); }
.client-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; background: var(--surface2); border: 1px solid var(--border);
  color: var(--accent); font-family: var(--font); text-transform: uppercase;
}
.client-body { flex: 1; min-width: 0; }
.client-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.client-tag  { font-size: 11px; color: var(--muted); font-weight: 600; font-family: var(--mono); }
.client-right { text-align: right; flex-shrink: 0; }
.client-amount { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.client-services { font-size: 11px; color: var(--muted); margin-top: 2px; }
.last-service-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  margin-left: 4px; align-self: center;
}
.dot-green { background: var(--green); }
.dot-yellow { background: #f5c842; }
.dot-red { background: var(--red); }

/* HISTORY PAGE — sticky month grouping */
.history-month-header {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 -20px 8px; padding: 8px 20px 6px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  font-family: var(--font);
}
.history-month-header span:first-child { font-size: 13px; font-weight: 800; color: var(--text); text-transform: capitalize; }
.history-month-stats { font-size: 11px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }

/* SERVICE HISTORY in client detail */
.service-item {
  background: var(--surface2); border-radius: 10px; border: 1px solid var(--border);
  padding: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s;
}
.service-item:hover { border-color: var(--accent); }
.service-header { display: flex; justify-content: space-between; align-items: center; }
.service-date { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 500; }
.service-tasks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.task-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #276EF118; border: 1px solid #276EF130; color: var(--accent); font-weight: 700;
}
.chem-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #60a5fa18; border: 1px solid #60a5fa30; color: var(--blue); font-weight: 700;
}
.service-chevron { color: var(--muted); font-size: 14px; }

/* OVERLAY / MODAL */
.overlay {
  position: fixed; inset: 0; background: #000b; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0;
  padding: 20px 20px 40px; transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  max-height: 92vh; max-height: 92dvh; overflow-y: auto;
}
.overlay.open .modal { transform: translateY(0); }
#modal-service .modal {
  height: 100vh; height: 100dvh;
  max-height: 100vh; max-height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
#modal-client-chooser { align-items: center; }
#modal-client-chooser .modal {
  border-radius: 20px; max-width: 320px; margin: 0 24px; padding: 28px 22px 22px;
}
#modal-pool-dashboard { z-index: 80; }
#modal-pool-dashboard .modal {
  height: 100vh; height: 100dvh;
  max-height: 100vh; max-height: 100dvh;
  border-radius: 0;
  padding: calc(16px + env(safe-area-inset-top)) 0 26px;
  transform: translateX(100%);
}
#modal-pool-dashboard.open .modal { transform: translateX(0); }
#modal-client-info .modal {
  height: 100vh; height: 100dvh;
  max-height: 100vh; max-height: 100dvh;
  border-radius: 0;
  padding: calc(16px + env(safe-area-inset-top)) 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(100%);
}
#modal-client-info.open .modal { transform: translateX(0); }
.modal-scroll-body { flex: 1; min-height: 0; overflow-y: auto; }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 999px; margin: 0 auto 20px; }
.modal-title  { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.modal-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-family: var(--mono); }

/* DETAIL PANEL (full screen) */
.detail-panel {
  position: fixed; inset: 0; background: var(--bg); z-index: 90;
  max-width: 480px; margin: 0 auto; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.detail-panel.open { transform: translateX(0); }
.detail-header {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg); z-index: 2;
}
.back-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer;
}
.detail-title { font-size: 18px; font-weight: 800; flex: 1; }
.detail-body { padding: 20px 20px 120px; }

.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.info-value { font-family: var(--mono); font-size: 13px; text-align: right; max-width: 60%; }

/* FORMS */
.form-group  { margin-bottom: 14px; }
.form-label  {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; display: block;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; color: var(--text);
  font-family: var(--mono); font-size: 14px; outline: none; transition: border-color .2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: none; height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Native date/time pickers follow the app theme */
#dt-edit-date, #dt-edit-time { color-scheme: dark; }
[data-theme="light"] #dt-edit-date, [data-theme="light"] #dt-edit-time { color-scheme: light; }

/* TASK CHECKBOXES */
.tasks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task-check {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px;
  background: var(--surface2); border-radius: 10px; border: 2px solid var(--border);
  cursor: pointer; transition: all .15s; font-size: 13px; font-weight: 600;
}
.task-check-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.task-check.checked { border-color: var(--accent); background: #276EF112; color: var(--accent); }
.task-check .task-icon { font-size: 18px; }
.task-check input { display: none; }
.checkmark { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border); margin-left: auto; flex-shrink: 0; transition: all .15s; }
.task-check.checked .checkmark { background: var(--accent); border-color: var(--accent); display: flex; align-items: center; justify-content: center; }
.task-check.checked .checkmark::after { content: '✓'; font-size: 10px; color: #fff; font-weight: 800; }
.task-last-line { font-size: 10px; font-weight: 600; color: var(--muted); font-family: 'Roboto Mono', monospace; padding-left: 28px; }
.task-freq-fraction { font-weight: 700; }
.task-freq-bar-track { background: var(--border); height: 5px; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.task-freq-bar-fill { height: 100%; border-radius: 3px; transition: width .2s; }

/* TASK FREQUENCY MODAL */
.freq-row { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.freq-row:last-child { border-bottom: none; margin-bottom: 4px; padding-bottom: 0; }
.freq-row-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.freq-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.freq-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.freq-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.freq-chip.fallback.active { background: #276EF122; color: var(--accent); border-color: var(--accent); }
.freq-custom-inputs { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.freq-custom-inputs input[type=number] { width: 70px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; color: var(--text); font-family: 'Roboto Mono', monospace; font-size: 12px; }
.freq-custom-inputs select { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; color: var(--text); font-size: 12px; font-family: var(--font); }

/* CHEMICAL INPUTS */
.chem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chem-item { position: relative; }
.chem-label-inline {
  position: absolute; top: 9px; left: 10px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--muted); pointer-events: none;
}
.chem-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px 14px 8px; color: var(--text);
  font-family: var(--mono); font-size: 14px; outline: none; transition: border-color .2s;
}
.chem-input:focus { border-color: var(--blue); }
.chem-input::placeholder { color: var(--border); }

/* PHOTOS */
.photos-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-thumb {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); cursor: pointer;
}
.photo-add {
  width: 72px; height: 72px; border-radius: 10px; border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  color: var(--muted); cursor: pointer; background: var(--surface2); transition: all .15s;
}
.photo-add:hover { border-color: var(--accent); color: var(--accent); }

/* SMS PREVIEW */
.sms-preview {
  background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.sms-bubble {
  background: #276EF118; border: 1px solid #276EF130; border-radius: 14px 14px 4px 14px;
  padding: 14px 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; word-break: break-word; margin-bottom: 14px;
}

/* BUTTONS */
.btn-primary {
  width: 100%; background: var(--accent); color: #fff; border: none;
  border-radius: 12px; padding: 14px; font-family: var(--font); font-weight: 800;
  font-size: 16px; cursor: pointer; margin-top: 6px; transition: opacity .15s;
}
.btn-primary:active { opacity: .8; }
.btn-secondary {
  width: 100%; background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px; font-family: var(--font); font-weight: 700;
  font-size: 15px; cursor: pointer; margin-top: 8px; transition: opacity .15s;
}
.btn-secondary:active { opacity: .7; }
.btn-danger {
  width: 100%; background: #f8717122; color: var(--red); border: 1px solid #f8717144;
  border-radius: 12px; padding: 12px; font-family: var(--font); font-weight: 700;
  font-size: 14px; cursor: pointer; margin-top: 8px; transition: opacity .15s;
}
.btn-sms {
  width: 100%; background: #4ade8022; color: var(--green); border: 1px solid #4ade8044;
  border-radius: 12px; padding: 13px; font-family: var(--font); font-weight: 800;
  font-size: 15px; cursor: pointer; margin-top: 8px; transition: opacity .15s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-sms:active { opacity: .7; }

/* FAB */
.fab {
  position: fixed; bottom: 88px; right: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent); color: #fff; border: none;
  font-size: 26px; cursor: pointer; box-shadow: 0 4px 24px #276EF144;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, opacity .15s;
}
.fab:active { transform: scale(.93); opacity: .8; }

/* BOTTOM NAV — 4 primary destinations (Ruta/Clientes/Historial/Pagos),
   always visible across all 3 pages; a flex sibling of .page (not fixed),
   so header+page.show+bottom-nav share .app's 100% height via flex:1 on
   the page. Everything else (Perfil, Config, Backup, Acerca de) stays in
   the ☰ drawer — see drawerNavRow() in drawer.js for the pre-existing
   equivalent inside the drawer, which this mirrors (same 4 destinations,
   same goToRuta()/goToAllClients()/goToHistoryFromDrawer()/
   goToPaymentsFromDrawer() targets, same active-state rules). */
.bottom-nav { flex-shrink: 0; display: flex; border-top: 1px solid var(--border); background: var(--surface); padding: 6px 4px; }
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; background: none; border: none; color: var(--muted);
  font-family: var(--font); cursor: pointer; position: relative; transition: color .15s;
}
.bnav-item.active { color: var(--accent); }
.bnav-ic { font-size: 19px; line-height: 1; }
.bnav-lb { font-size: 9.5px; font-weight: 700; }
.bnav-dot {
  position: absolute; top: -2px; right: -6px; width: 7px; height: 7px;
  border-radius: 50%; background: #f5c842; border: 2px solid var(--surface);
}

/* PAGES */
.page { display: none; }
.page.show { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

/* SECTION TITLE */
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px 0;
}
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.section-count { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* TOAST */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-80px);
  background: var(--green); color: #000; padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 14px; z-index: 999; transition: transform .3s;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); color: #fff; }
.toast-undo-btn {
  background: none; border: none; color: inherit; font: inherit; font-weight: 800;
  text-decoration: underline; cursor: pointer; padding: 0; margin-left: 10px;
}

/* SERVICE VIEW DETAIL */
.service-detail-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.service-detail-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* AMOUNT HIGHLIGHT */
.amount-big { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--accent); }

/* responsive safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .list { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .fab { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .bottom-nav { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}

/* ── DAY TABS ── */
.day-tabs {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  gap: 0; padding: 12px 20px 0;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: 1 0 auto; padding: 8px 10px; font-size: 12px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: all .15s;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: var(--font); letter-spacing: .3px;
  text-align: center; white-space: nowrap;
}
.day-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.day-tab.today  { color: var(--green); }
.day-tab.today.active { color: var(--green); border-bottom-color: var(--green); }

/* ── DAY PICKER (in modal) ── */
.day-picker {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.day-chip {
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--muted); cursor: pointer; transition: all .15s;
  font-family: var(--font);
}
.day-chip.selected {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ── DAY BADGE on client card ── */
.day-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.day-badge {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
  font-family: var(--mono);
}
.day-badge.today-badge { background: #4ade8022; color: var(--green); border-color: #4ade8044; }

/* ── DRAG & DROP ── */
.client-card.draggable { cursor: default; }
.client-card.dragging  { opacity: 0.4; transform: scale(0.98); }
.client-card.drag-over {
  border-color: var(--accent) !important;
  transform: scale(1.01);
  box-shadow: 0 0 0 2px #276EF130;
}

.order-num {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--accent); min-width: 18px; text-align: center;
  flex-shrink: 0; align-self: center;
}

.drag-handle {
  font-size: 20px; color: var(--border); cursor: grab;
  padding: 4px 2px; flex-shrink: 0; align-self: center;
  touch-action: none; user-select: none;
  transition: color .15s;
}
.drag-handle:active { cursor: grabbing; color: var(--accent); }

/* ── OPTION C ROW STYLE ── */
.draggable-row:active { background: var(--surface2) !important; }
.draggable-row.drag-over { background: #276EF110 !important; border-left: 3px solid #276EF1 !important; }
.draggable-row.dragging  { opacity: 0.4; }

/* ── WATER PARAMS ── */
.water-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
/* Caja de scroll interno de las tarjetas de parámetros (LSI banner queda
   afuera, fijo) — sin barra visible, el pseudo-elemento no se puede inline. */
.wp-cards-scroll::-webkit-scrollbar { display: none; }
.wp-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.wp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wp-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
}
.wp-unit {
  font-size: 9px;
  color: var(--border);
  font-family: var(--mono);
}
.wp-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.wp-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  line-height: 1;
  user-select: none;
}
.wp-value:active { opacity: 0.7; }
.wp-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.wp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
}
.wp-input-edit {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--accent);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  padding: 12px;
}
.wp-input-edit.show { display: flex; }
.wp-input-edit input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
  text-align: center;
  outline: none;
}
.wp-input-edit .wp-edit-btns {
  display: flex;
  gap: 6px;
  width: 100%;
}
.wp-edit-ok {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 6px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.wp-edit-cancel {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
