/* =========================================================
   PANEL DE GESTIÓN — estilo agenda profesional
   --accent se pisa con el color de marca del negocio.
   ========================================================= */
:root {
  --accent:      #7C3AED;
  --accent-fg:   #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #FFFFFF);
  --accent-dark: color-mix(in srgb, var(--accent) 80%, #000000);

  --nav:     #1E2A32;
  --nav-2:   #2B3943;
  --nav-fg:  #F2F4F7;
  --nav-mu:  #9AA7B3;

  --bg:      #F2F4F7;
  --surface: #FFFFFF;
  --line:    #E4E7EC;
  --line-2:  #F0F2F5;
  --text:    #101828;
  --text-2:  #344054;
  --muted:   #667085;
  --danger:  #D92D20;
  --wa:      #25D366;

  --radius:    10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow:    0 16px 40px -16px rgba(16, 24, 40, 0.30), 0 2px 6px rgba(16, 24, 40, 0.06);

  --topnav-h: 56px;
  --colmin:   170px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* =========================================================
   BOTONES Y CONTROLES
   ========================================================= */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: #D0D5DD; background: #F9FAFB; }
.btn-danger { background: var(--danger); color: #FFF; }
.btn-danger:hover { background: #B42318; }
.btn-wa { background: var(--wa); color: #FFF; }
.btn-wa:hover { background: #1FB855; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--nav-fg); position: relative;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--nav-2); }
.icon-btn--light { color: var(--muted); width: 32px; height: 32px; }
.icon-btn--light:hover { background: var(--line-2); color: var(--text); }

.link-btn { color: var(--accent-dark); font-weight: 600; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

input:not([type=checkbox]):not([type=color]), select, textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid #D0D5DD; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--line-2); color: var(--muted); }
input[type=color] { width: 56px; height: 40px; border: 1px solid #D0D5DD; border-radius: var(--radius-sm); padding: 3px; background: #FFF; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }

.input-sm, .select-sm { height: 34px !important; font-size: 13px; }
.select-sm { width: auto; padding-right: 28px; }
.input-search { width: 240px !important; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.field--inline { flex-direction: row; align-items: center; gap: 8px; }
.field--inline > span { white-space: nowrap; font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.chip:hover { border-color: var(--accent); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

.seg { display: inline-flex; padding: 3px; background: var(--line-2); border-radius: 9px; }
.seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, #FFF); color: color-mix(in srgb, var(--c) 75%, #000);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--line-2); color: var(--text-2); font-size: 11px; font-weight: 600;
}
.tag--accent { background: var(--accent-soft); color: var(--accent-dark); }
.tag--danger { background: #FEE4E2; color: #B42318; }

.avatar {
  --c: var(--accent);
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c); color: #FFF; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.avatar--xs { width: 22px; height: 22px; font-size: 10px; vertical-align: middle; }
.avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--soft { background: var(--accent-soft); color: var(--accent-dark); }
.avatar--ghost { background: var(--line); color: var(--muted); }

.estado-select {
  width: auto !important; height: 30px !important; padding: 0 26px 0 10px !important;
  border-radius: 999px !important; border: 1px solid transparent !important; box-shadow: none !important;
  background-color: color-mix(in srgb, var(--c) 14%, #FFF) !important;
  color: color-mix(in srgb, var(--c) 75%, #000); font-size: 12px; font-weight: 600;
}

/* =========================================================
   LOGIN
   ========================================================= */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--nav);
}
.login-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px;
  padding: 32px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); font-size: 13px; }
.login-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #F472B6); }
.login-card h1 { font-size: 22px; letter-spacing: -.01em; }
.login-error { color: var(--danger); font-size: 13px; }

/* =========================================================
   ESTRUCTURA
   ========================================================= */
.app { height: 100dvh; display: flex; flex-direction: column; }

.topnav {
  flex-shrink: 0; height: var(--topnav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 16px 0 20px;
  background: var(--nav); color: var(--nav-fg);
}
.topnav-brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; }
.topnav-brand img { height: 30px; max-width: 140px; object-fit: contain; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--accent-fg); font-size: 12px;
}
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.topnav-links { display: flex; gap: 4px; height: 100%; }
.topnav-link {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 0 14px; color: var(--nav-mu); font-weight: 600; font-size: 14px;
}
.topnav-link:hover { color: var(--nav-fg); }
.topnav-link.is-active { color: #FFF; }
.topnav-link.is-active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--accent);
}
.count-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #F79009; color: #FFF; font-size: 11px; line-height: 20px; text-align: center;
}
.topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.dot-badge {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: #F04438; box-shadow: 0 0 0 2px var(--nav);
}
.user-btn { margin-left: 6px; border-radius: 50%; }
.user-btn .avatar { background: var(--accent); color: var(--accent-fg); }

.demo-bar {
  flex-shrink: 0; padding: 8px 16px; text-align: center; font-size: 13px;
  background: #FEF6E7; color: #93370D; border-bottom: 1px solid #FCE3B8;
}

.main { flex: 1; min-height: 0; overflow: auto; }
.view { padding: 24px; max-width: 1360px; margin: 0 auto; }
.view--agenda { padding: 0; max-width: none; height: 100%; }

.bottomnav { display: none; }

/* =========================================================
   DROPDOWNS, TOAST, POPOVER, MODAL, DRAWER
   ========================================================= */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 220px; padding: 6px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.dropdown-menu--notif { width: 320px; }
.dropdown-menu--right { right: 0; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
.dropdown-email { padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; word-break: break-all; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 6px; text-align: left; font-size: 14px; color: var(--text-2);
}
.dropdown-item:hover { background: var(--line-2); color: var(--text); }
.notif-item { display: grid; width: 100%; padding: 9px 10px; border-radius: 6px; text-align: left; }
.notif-item:hover { background: var(--line-2); }
.notif-item span { color: var(--muted); font-size: 13px; }
.notif-item small { color: var(--muted); font-size: 11px; }
.empty-mini { padding: 18px 10px; color: var(--muted); font-size: 13px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200;
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); padding: 12px 16px;
  background: #101828; color: #FFF; border-radius: 10px; box-shadow: var(--shadow);
  font-size: 14px; transform: translateX(-50%);
}
.toast.is-in { animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.toast-btn { color: #FFF; font-weight: 700; text-decoration: underline; white-space: nowrap; }

.pop {
  position: fixed; z-index: 120; width: 360px; max-height: calc(100vh - 24px); overflow: auto;
  padding: 14px 18px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.pop-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -8px 6px 0; }
.pop-state-bar { width: 40px; height: 5px; border-radius: 5px; background: var(--c); }
.pop-state-bar--blq { background: repeating-linear-gradient(135deg, #98A2B3 0 4px, #D0D5DD 4px 8px); }
.pop-tools { display: flex; gap: 2px; }
.pop-cliente { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pop-cliente:hover { text-decoration-color: currentColor; }
.pop-cliente--static { text-decoration: none; display: block; }
.pop-servicio { margin-top: 6px; font-weight: 600; color: var(--text-2); }
.pop-precio { margin-left: 6px; color: var(--muted); font-weight: 500; }
.pop-fecha { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.pop-list { list-style: none; display: grid; gap: 9px; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.pop-list li { display: flex; align-items: center; gap: 8px; }
.pop-list li svg { width: 16px; height: 16px; color: var(--muted); }
.wa-link { color: #067647; font-weight: 600; }
.pop-estados { display: flex; flex-wrap: wrap; gap: 6px; }
.estado-dot {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2);
}
.estado-dot span { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.estado-dot:hover { border-color: var(--c); }
.estado-dot.is-on { background: color-mix(in srgb, var(--c) 14%, #FFF); border-color: var(--c); color: color-mix(in srgb, var(--c) 75%, #000); }
.pop-foot { display: flex; gap: 8px; justify-content: space-between; margin-top: 14px; }

.cellmenu {
  position: fixed; z-index: 110; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.cellmenu-head { padding: 6px 10px 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

.modal {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px;
  background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px);
}
.modal-box {
  width: 100%; max-width: 640px; max-height: calc(100dvh - 40px); overflow: auto;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  animation: modalIn .2s ease;
}
.modal-box--sm { max-width: 440px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line-2);
}
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.drawer { position: fixed; inset: 0; z-index: 140; background: rgba(16, 24, 40, .35); }
.drawer-box {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  overflow: auto; padding: 16px 24px 32px; background: var(--surface); box-shadow: var(--shadow);
  animation: drawerIn .22s ease; display: flex; flex-direction: column; gap: 14px;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; justify-content: flex-end; margin-bottom: -8px; }

/* =========================================================
   FORMULARIOS
   ========================================================= */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field--full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.form-warn { padding: 10px 12px; border-radius: var(--radius-sm); background: #FEF3F2; color: #B42318; font-size: 13px; font-weight: 500; }
.note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--line-2); font-size: 13px; }
#libres .chip { height: 30px; font-variant-numeric: tabular-nums; }

/* =========================================================
   PÁGINAS (resumen, reservas, clientes, config)
   ========================================================= */
.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: 24px; letter-spacing: -.01em; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; }
.loading { padding: 32px; text-align: center; color: var(--muted); }
.empty { padding: 48px 20px; text-align: center; color: var(--text-2); display: grid; gap: 10px; justify-items: center; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis--sm .kpi { padding: 14px 16px; }
.kpis--sm .kpi-val { font-size: 22px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; min-height: 108px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.kpi--dark { background: var(--nav); border-color: var(--nav); color: #FFF; }
.kpi--dark .kpi-label { color: var(--nav-mu); }
.kpi--sk { background: linear-gradient(90deg, #FFF, var(--line-2), #FFF); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi-val { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12px; font-weight: 600; }
.kpi-delta--up { color: #079455; }
.kpi-delta--down { color: #D92D20; }
.kpi-delta--flat { color: var(--muted); }
.kpi--dark .kpi-delta--up { color: #47CD89; }
.kpi--dark .kpi-delta--down { color: #F97066; }
.kpi--dark .kpi-delta--flat { color: var(--nav-mu); }
.kpi-extra { font-size: 12px; color: var(--muted); }

.rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card--span2 { grid-column: span 2; }

.list { display: flex; flex-direction: column; }
#rs-hoy .list { max-height: 460px; overflow-y: auto; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 6px;
  border-top: 1px solid var(--line-2); cursor: pointer; border-radius: 6px;
}
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #F9FAFB; }
.list-row.is-past { opacity: .55; }
.list-row.is-next { background: var(--accent-soft); }
.list-time { width: 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-main strong, .list-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main span { font-size: 13px; }

.vbars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 6px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.vbar-val { font-size: 11px; font-weight: 600; color: var(--muted); }
.vbar-track { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.vbar-fill { width: 100%; background: color-mix(in srgb, var(--accent) 55%, #FFF); border-radius: 6px; min-height: 2px; }
.vbar-fill.is-max { background: var(--accent); }
.vbar-label { font-size: 12px; font-weight: 600; color: var(--text-2); }

.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; background: var(--line-2); border-radius: 8px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.hbar-val { text-align: right; font-weight: 700; }

.donut-wrap { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.donut { width: 130px; height: 130px; flex-shrink: 0; }
.donut circle { fill: none; stroke-width: 12; }
.donut-bg { stroke: #E4E7EC; }
.donut-fg { stroke: var(--accent); stroke-linecap: round; }
.donut-num { font-size: 20px; font-weight: 700; text-anchor: middle; fill: var(--text); stroke: none; }
.donut-sub { font-size: 8px; text-anchor: middle; fill: var(--muted); stroke: none; }
.legend-list { list-style: none; display: grid; gap: 8px; font-size: 13px; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend-list strong { margin-left: auto; padding-left: 8px; }
.legend-list--row { grid-auto-flow: column; justify-content: start; gap: 16px; margin-top: 10px; }
.big-num { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.big-num .muted { font-size: 14px; font-weight: 500; }
.stack { display: flex; height: 12px; border-radius: 12px; overflow: hidden; background: var(--line-2); }
.stack span { background: var(--c); }
.meter { display: inline-block; width: 80px; height: 6px; margin-right: 6px; vertical-align: middle; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 6px; }

/* Tablas */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 10px 18px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--muted); background: #F9FAFB;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table--compact td { padding: 10px 18px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #F9FAFB; }
.row-link.is-muted td { opacity: .55; }
.cell-user { display: flex; align-items: center; gap: 10px; }

.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters-row input[type=date] { height: 34px; font-size: 13px; width: 150px; }
.filters-row .input-search { flex: 1; }

/* Ficha de cliente */
.ficha-top { display: flex; gap: 16px; align-items: center; }
.ficha-top h2 { font-size: 20px; }
.ficha-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ficha-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ficha-stats div { display: grid; padding: 10px; background: var(--line-2); border-radius: 8px; text-align: center; }
.ficha-stats strong { font-size: 14px; white-space: nowrap; }
.ficha-stats span { font-size: 11px; color: var(--muted); }
.ficha-fav { font-size: 13px; color: var(--text-2); }
.ficha-h { font-size: 14px; margin-top: 8px; }
.hist { list-style: none; display: flex; flex-direction: column; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line-2); cursor: pointer; }
.hist-row:hover { background: #F9FAFB; }
.hist-date { display: grid; width: 70px; font-size: 13px; }
.hist-main { flex: 1; display: grid; min-width: 0; font-size: 13px; }

/* Configuración */
.cfg { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.cfg-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.cfg-nav-item { padding: 10px 12px; border-radius: 8px; text-align: left; font-weight: 600; color: var(--muted); }
.cfg-nav-item:hover { background: var(--surface); color: var(--text); }
.cfg-nav-item.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border-left: 3px solid var(--accent); }
.cfg-body { padding: 22px; }
.cfg-head { margin-bottom: 18px; }
.cfg-head h2 { font-size: 18px; margin-bottom: 4px; }
.cfg-actions { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0 10px; flex-wrap: wrap; }
.cfg-actions:has(> :only-child) { justify-content: flex-end; }

.srv-table { display: flex; flex-direction: column; gap: 8px; }
.srv-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 110px 120px 32px; gap: 8px; align-items: center; }
.srv-row--head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px; }
.input-suffix, .input-prefix { position: relative; display: block; }
.input-suffix em, .input-prefix em { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); pointer-events: none; }
.input-suffix em { right: 10px; }
.input-suffix input { padding-right: 36px !important; }
.input-prefix em { left: 10px; }
.input-prefix input { padding-left: 24px !important; }

.pro-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pro-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.pro-list li strong { flex: 1; }
.inline-form { display: flex; gap: 8px; max-width: 420px; }

.day-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span {
  display: grid; place-items: center; width: 52px; height: 38px; border: 1px solid var(--line);
  border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.day-toggle input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.day-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.share-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 20px; background: var(--accent-soft); border-radius: 10px; }
.share-box > div:first-child { display: grid; gap: 2px; min-width: 0; }
.share-box a { color: var(--accent-dark); font-weight: 600; word-break: break-all; }
.share-actions { display: flex; gap: 8px; }

/* =========================================================
   AGENDA
   ========================================================= */
.ag { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100%; }
.ag-side {
  display: flex; flex-direction: column; gap: 18px; padding: 16px;
  background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
}
.ag-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ag-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.ag-side-toggle { display: none; }
.arrows { display: flex; }
.ag-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-right: auto; }
.ag-title h1 { font-size: 17px; white-space: nowrap; }
.ag-title span { font-size: 13px; white-space: nowrap; }
.ag-body { flex: 1; min-height: 0; overflow: auto; background: var(--surface); position: relative; }
.ag-body--lista { background: var(--bg); padding: 16px; }
.ag-body--lista .table-wrap { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.minical-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.minical-head strong { font-size: 14px; }
.minical-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.minical-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.minical-day {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-2);
}
.minical-day:hover { background: var(--line-2); }
.minical-day.is-closed { color: #B8BFCA; }
.minical-day.has-dot::after { content: ''; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.minical-day.is-sel { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.minical-day.is-today { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.minical-day.is-today::after { background: var(--accent-fg); }

.legend { display: grid; gap: 7px; }
.legend-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.legend-item i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--c) 20%, #FFF); border-left: 3px solid var(--c); font-style: normal; font-size: 10px; display: grid; place-items: center; }
.legend-item i.legend-blq { background: repeating-linear-gradient(135deg, #D0D5DD 0 3px, #F2F4F7 3px 6px); border: 0; }
.legend-item i.legend-web { background: none; border: 0; width: 12px; }

/* Grilla */
.cal { display: grid; width: 100%; min-width: min-content; }
.cal-corner {
  position: sticky; top: 0; left: 0; z-index: 6; background: var(--surface);
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.cal-head {
  position: sticky; top: 0; z-index: 5; height: 58px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px; min-width: 0;
  background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2);
}
.cal-head-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-head-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-head--dia { flex-direction: column; justify-content: center; gap: 0; text-align: center; position: sticky; }
.cal-head--dia:hover { background: #F9FAFB; }
.cal-head-dow { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-head-num { font-size: 20px; font-weight: 700; line-height: 1.1; }
.cal-head--dia .cal-head-count { position: absolute; top: 8px; right: 10px; }
.cal-head--dia.is-today .cal-head-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-size: 16px; }

.cal-times { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); }
.cal-time { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-time:first-child { transform: translateY(2px); }
.cal-time--minor { font-weight: 400; color: #98A2B3; }

.cal-col {
  position: relative; cursor: cell; border-left: 1px solid var(--line-2);
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--row));
}
.cal-col.is-closed { cursor: default; }
.cal-off {
  position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(242, 244, 247, .9) 0 7px, rgba(234, 236, 240, .9) 7px 14px);
}
.cal-off span { position: sticky; top: 70px; display: block; padding: 12px; text-align: center; font-weight: 600; color: var(--muted); }

.ev {
  position: absolute; z-index: 1; overflow: hidden; padding: 4px 7px;
  background: color-mix(in srgb, var(--c) 15%, #FFF); border-left: 3px solid var(--c);
  border-radius: 6px; box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  font-size: 12px; line-height: 1.3; cursor: pointer; user-select: none;
  transition: box-shadow .15s, transform .15s;
}
.ev:hover, .ev:focus-visible { z-index: 3; box-shadow: 0 6px 16px -6px rgba(16, 24, 40, .35); }
.ev-top { display: flex; align-items: center; gap: 4px; }
.ev-time { font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--c) 72%, #000); font-variant-numeric: tabular-nums; }
.ev-web { font-size: 10px; margin-left: auto; }
.ev-pro { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--c); color: #FFF; font-size: 8px; font-weight: 700; }
.ev-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-serv { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev--corto { display: flex; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.ev--corto .ev-serv { display: none; }
.ev--corto .ev-top { flex-shrink: 0; }
.ev--corto .ev-web { margin-left: 0; }
.ev--cancelada { background: repeating-linear-gradient(135deg, #F9FAFB 0 6px, #F2F4F7 6px 12px); }
.ev--cancelada .ev-name, .ev--cancelada .ev-serv { text-decoration: line-through; color: var(--muted); }
.ev--no_asistio .ev-name { text-decoration: line-through; text-decoration-color: var(--c); }
.ev--ghost { z-index: 20; opacity: .92; pointer-events: none; outline: 2px dashed var(--c); box-shadow: var(--shadow); }
.ev--origen { opacity: .3; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

.blq {
  position: absolute; left: 3px; right: 3px; z-index: 1; overflow: hidden;
  display: flex; flex-direction: column; padding: 4px 8px;
  background: repeating-linear-gradient(135deg, #E4E7EC 0 6px, #F2F4F7 6px 12px);
  border-radius: 6px; border: 1px dashed #D0D5DD;
  font-size: 12px; font-weight: 600; color: #475467; cursor: pointer;
}
.blq small { font-weight: 500; color: var(--muted); }

.now { position: absolute; left: 0; right: 0; z-index: 4; height: 2px; background: #F04438; pointer-events: none; }
.now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #F04438; }
.now-label { position: absolute; right: 4px; z-index: 5; transform: translateY(-50%); padding: 1px 5px; border-radius: 4px; background: #F04438; color: #FFF; font-size: 10px; font-weight: 700; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .topnav-link { padding: 0 10px; }
}

@media (max-width: 900px) {
  .ag { grid-template-columns: minmax(0, 1fr); }
  .ag-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 130; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .ag-side.is-open { transform: none; }
  .ag-side-toggle { display: inline-flex; }
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .cfg-nav { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; }
  .cfg-nav-item { white-space: nowrap; }
  .cfg-nav-item.is-on { border-left: 0; border-bottom: 3px solid var(--accent); }
}

@media (max-width: 720px) {
  :root { --colmin: 148px; --topnav-h: 52px; }
  .topnav { gap: 8px; padding: 0 8px 0 14px; }
  .topnav-links { display: none; }
  .brand-name { max-width: 50vw; }
  .bottomnav {
    flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .bottomnav-item {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 8px;
  }
  .bottomnav-item svg { width: 22px; height: 22px; }
  .bottomnav-item.is-active { color: var(--accent-dark); }
  .bottomnav-item .count-badge { position: absolute; top: 0; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; line-height: 18px; box-shadow: 0 0 0 2px var(--surface); }
  .toast { bottom: 76px; }

  .view { padding: 16px; }
  .view--agenda { padding: 0; }
  .page-head h1 { font-size: 20px; }
  .page-actions { width: 100%; }
  .page-actions .input-search { flex: 1; width: auto !important; min-width: 0; }
  .kpis { gap: 10px; }
  .kpi { min-height: 0; padding: 14px; }
  .kpi-val { font-size: 22px; }
  .rs-grid { grid-template-columns: minmax(0, 1fr); }
  .card--span2 { grid-column: auto; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px -14px; }
  .table th, .table td { padding: 10px 12px; }
  .hide-sm { display: none !important; }

  .ag-toolbar { padding: 8px 10px; gap: 6px; }
  .ag-title { order: 10; width: 100%; margin-right: 0; }
  .ag-title h1 { font-size: 15px; }
  .ag-toolbar .dropdown { margin-left: auto; }

  .pop--sheet {
    left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%;
    max-height: 82dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom));
    animation: sheetIn .22s ease;
  }
  @keyframes sheetIn { from { transform: translateY(30px); opacity: 0; } }

  .modal { padding: 0; align-items: end; }
  .modal-box { max-height: 94dvh; border-radius: 16px 16px 0 0; max-width: none; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-grid > .field:not(.field--full):has(textarea, select[name=servicio]) { grid-column: 1 / -1; }

  .srv-row--head { display: none; }
  .srv-row {
    grid-template-columns: 1fr 1fr 32px; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  }
  .srv-row > input[data-k="nombre"] { grid-column: 1 / 3; }
  .srv-row > input[data-k="categoria"] { grid-column: 1 / -1; grid-row: 2; }
  .srv-row > .input-suffix { grid-row: 3; }
  .srv-row > .input-prefix { grid-row: 3; }
  .srv-row > [data-quitar] { grid-column: 3; grid-row: 1; }

  .ficha-stats { grid-template-columns: repeat(2, 1fr); }
  .filters-row input[type=date] { width: auto; flex: 1; }
  .filters-row .field--inline { flex: 1; }
  .dropdown-menu--notif { position: fixed; top: 56px; left: 8px; right: 8px; width: auto; }
}

@media (max-width: 420px) {
  .hide-xs { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   FASE B — caja, pagos, ficha ampliada, profesionales
   ========================================================= */
.date-nav { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.date-nav input[type=date] { width: 150px; }

.banner-ok {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 16px;
  background: #ECFDF3; border: 1px solid #ABEFC6; border-radius: var(--radius); color: #067647; font-size: 14px;
}

.num { text-align: right; }
.money-in  { color: #067647; font-weight: 700; }
.money-out { color: #B42318; font-weight: 700; }
.hbar-val--money { width: auto; min-width: 84px; white-space: nowrap; }
.hbar:has(.hbar-val--money) { grid-template-columns: minmax(0, 1.3fr) 1fr auto; }
.list-row--static { cursor: default; }
.list-row--static:hover { background: none; }

.cierre-resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cierre-resumen div { display: grid; padding: 10px; background: var(--line-2); border-radius: 8px; text-align: center; }
.cierre-resumen span { font-size: 12px; color: var(--muted); }

/* Pagos en agenda y popover */
.ev-paid {
  display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: auto;
  border-radius: 50%; background: #12B76A; color: #FFF; font-size: 9px; font-weight: 800;
}
.ev-paid + .ev-web { margin-left: 2px; }
.legend-item i.legend-paid { width: 14px; height: 14px; border-radius: 50%; background: #12B76A; color: #FFF; font-size: 9px; font-weight: 800; }
.pop-pago { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pop-pago:empty { display: none; }
.paid-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: #ECFDF3; color: #067647; font-size: 12px; font-weight: 700; }
.paid-inline { color: #067647; font-weight: 600; }

/* Ficha ampliada */
.debe-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #FEF3F2; border: 1px solid #FECDCA; border-radius: 10px; color: #B42318; font-size: 13px;
}
.ficha-nota { padding: 10px 12px; background: #FFFAEB; border-radius: 8px; font-size: 13px; }
.ficha-tabs { align-self: flex-start; margin-top: 4px; }
.cumple-tag { color: #C11574; font-weight: 600; margin-top: 2px; }
.hist-nota { color: var(--text-2); margin-top: 2px; }
.hist-row--static { cursor: default; }
.hist-row--static:hover { background: none; }

/* Profesionales */
.pro-info { flex: 1; display: grid; min-width: 0; }
.serv-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.serv-checks fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; display: grid; gap: 6px; }
.serv-checks legend { padding: 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.hor-dias { display: grid; gap: 6px; margin-top: 10px; }
.hor-dia { display: grid; grid-template-columns: 130px 110px 14px 110px; justify-content: start; align-items: center; gap: 8px; }
.hor-dia input[type=time] { width: 110px; }
.hor-dia.is-off { opacity: .6; }
#hor-modo { align-self: flex-start; }

/* Menú "Más" (mobile) */
.sheet { position: fixed; inset: 0; z-index: 125; background: rgba(16, 24, 40, .35); display: flex; align-items: flex-end; }
.sheet-box {
  width: 100%; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow); animation: sheetIn .22s ease;
}
.sheet-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px;
  border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; text-align: left;
}
.sheet-item:hover { background: var(--line-2); }
.sheet-item svg { width: 22px; height: 22px; color: var(--muted); }
.sheet-item .count-badge { margin-left: auto; }
@keyframes sheetIn { from { transform: translateY(30px); opacity: 0; } }

@media (max-width: 720px) {
  .hor-dia { grid-template-columns: 1fr 14px 1fr; justify-content: stretch; }
  .hor-dia label { grid-column: 1 / -1; }
  .hor-dia input[type=time] { width: 100%; }
  .cierre-resumen { grid-template-columns: 1fr 1fr 1fr; }
  .date-nav input[type=date] { width: 140px; }
  .page-actions .btn { flex: 1; }
  .list-row { gap: 8px; }
  .list-row .list-main { min-width: 60px; }
  .list-row > strong { font-size: 13px; }
  .list-row .btn-sm { padding: 0 10px; }
  .list-time { width: auto; min-width: 40px; }
}

/* =========================================================
   EXTRAS: sin turno, venta de productos, comisiones, sellos
   ========================================================= */
.modal-box--lg { max-width: 860px; }
.modal-body .table-wrap { margin: 0; }
.table tfoot td { padding: 12px 18px; border-top: 2px solid var(--line); background: var(--line-2); }
.table th.num, .table td.num { text-align: right; }

.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip small { font-weight: 400; opacity: .75; }
.chip--muted:not(.is-on) { color: var(--muted); border-style: dashed; }

/* Venta de productos */
.prod-pick { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.prod-pick li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.prod-pick li.is-on { border-color: var(--accent); background: var(--accent-soft); }
.prod-pick-name { display: grid; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.venta-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--line-2); }
.venta-total strong { font-size: 20px; }

/* Comisiones */
.com-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* Tarjeta de sellos (fidelización) */
.fid-card { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.fid-sellos { display: flex; flex-wrap: wrap; gap: 6px; }
.fid-sello {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  font-size: 12px; color: var(--accent-dark);
}
.fid-sello.is-on { border: none; background: var(--accent); }
.fid-sello.is-premio { border-style: solid; }
.pop-premio { color: var(--accent-dark); font-weight: 600; }

/* Aviso de clientes para reactivar */
.reactivar-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-dark); font-size: 13px;
}

/* Productos en Configuración: nombre, precio, stock, quitar */
.srv-table--prod .srv-row { grid-template-columns: minmax(0, 2fr) 130px 90px 32px; }
@media (max-width: 720px) {
  .srv-table--prod .srv-row { grid-template-columns: 1fr 1fr 32px; }
  .srv-table--prod .srv-row > input[data-k="nombre"] { grid-column: 1 / 3; grid-row: 1; }
  .srv-table--prod .srv-row > .input-prefix { grid-column: 1; grid-row: 2; }
  .srv-table--prod .srv-row > input[data-k="stock"] { grid-column: 2; grid-row: 2; }
}

/* Comisiones en el celular: una tarjeta por profesional */
.com-head .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.com-head .seg::-webkit-scrollbar { display: none; }
.com-head .seg button { white-space: nowrap; }
@media (max-width: 720px) {
  .com-table thead { display: none; }
  .com-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .com-table td, .table.com-table tfoot td { padding: 0; border: 0; background: none; }
  .com-table td:first-child, .com-table td:last-child { grid-column: 1 / -1; }
  .com-table td:last-child:empty { display: none; }
  .com-table td:last-child .btn { width: 100%; margin-top: 6px; }
  .com-table td[data-l] { display: flex; justify-content: space-between; gap: 8px; }
  .com-table td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
  .com-table td.com-pagar { grid-column: 1 / -1; padding-top: 4px; border-top: 1px dashed var(--line); font-size: 15px; }
  .com-table tfoot tr { margin-top: 4px; padding: 12px; background: var(--line-2); border-radius: 8px; }
}
