
:root{
  --bg:#070d1a;
  --panel:#111a2b;
  --panel2:#121f34;
  --panel3:#0c1424;
  --line:rgba(148,163,184,.16);
  --muted:#8fa1c1;
  --text:#eef4ff;
  --blue:#2f6cff;
  --cyan:#48d6ff;
  --purple:#7c3cff;
  --green:#36e985;
  --orange:#f59e0b;
  --danger:#ef4444;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}
body{
  background:
    radial-gradient(circle at 18% 8%, rgba(65,88,208,.22), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(72,214,255,.14), transparent 32%),
    linear-gradient(180deg,#070c18 0%,#080f1e 100%);
}
.app{display:grid;grid-template-columns:292px 1fr;min-height:100vh}
.sidebar{
  position:sticky;top:0;height:100vh;padding:22px 16px;background:rgba(9,15,29,.88);
  border-right:1px solid var(--line);backdrop-filter:blur(18px);overflow:auto
}
.brand{display:flex;align-items:center;gap:12px;margin:4px 0 26px 2px}
.brand-mark{width:42px;height:42px;border-radius:15px;background:linear-gradient(135deg,var(--purple),var(--cyan));display:grid;place-items:center;font-weight:900;font-size:24px;box-shadow:0 10px 28px rgba(88,80,255,.35)}
.brand-title{font-weight:850;font-size:22px;line-height:1.05}
.brand-title span{display:block;font-weight:500;font-size:14px;color:#b8c4df}
.nav-label{margin:26px 12px 10px;color:#7182a6;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.nav a,.quick a{
  display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:13px;color:#d9e3f8;text-decoration:none;margin:5px 0;font-size:14.5px;
  background:transparent;border:1px solid transparent
}
.nav a:hover,.quick a:hover{background:rgba(255,255,255,.055);border-color:var(--line)}
.nav a.active{background:linear-gradient(135deg,rgba(124,60,255,.95),rgba(47,108,255,.95));box-shadow:0 12px 28px rgba(47,108,255,.22)}
.nav svg,.quick svg{width:18px;height:18px;opacity:.92}
.quick{margin-top:18px;padding:14px;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));border:1px solid var(--line)}
.quick-title{font-weight:700;margin:0 0 12px 0;color:#e7eefc}
.quick .primary{background:linear-gradient(135deg,var(--purple),var(--blue));justify-content:center;font-weight:800}
.main{min-width:0}
.topbar{
  height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 28px 0 30px;
  background:rgba(6,11,22,.48);border-bottom:1px solid var(--line);backdrop-filter:blur(18px);position:sticky;top:0;z-index:5
}
.top-left{display:flex;align-items:center;gap:16px}
.hamb{width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.045);border:1px solid var(--line);display:grid;place-items:center;color:#a9b9da}
.search{position:relative;width:min(430px,42vw)}
.search input{width:100%;height:44px;border-radius:13px;background:#111a2d;border:1px solid var(--line);color:var(--text);padding:0 44px 0 16px;outline:none}
.search svg{position:absolute;right:14px;top:12px;width:20px;color:#8da0c1}
.top-icons{display:flex;align-items:center;gap:12px}
.icon-btn{width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.04);border:1px solid var(--line);display:grid;place-items:center;color:#bbcae6}
.profile{display:flex;align-items:center;gap:10px;padding-left:10px;border-left:1px solid var(--line)}
.avatar{width:39px;height:39px;border-radius:50%;background:linear-gradient(135deg,#f59e0b,#7c3cff);display:grid;place-items:center;font-weight:900}
.profile b{font-size:14px}.profile span{display:block;font-size:12px;color:var(--muted)}
.content{padding:28px 30px 34px}
.header-line{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.title-wrap{display:flex;align-items:center;gap:14px}
.title-icon{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--purple),#293cff);display:grid;place-items:center;box-shadow:0 13px 28px rgba(124,60,255,.28)}
h1{margin:0;font-size:25px;letter-spacing:-.03em}
.subtitle{margin:4px 0 0;color:#95a6c7;font-size:14px}
.btn{
  border:0;border-radius:13px;padding:12px 18px;color:white;font-weight:800;background:linear-gradient(135deg,var(--purple),var(--blue));cursor:pointer;box-shadow:0 12px 28px rgba(47,108,255,.25)
}
.btn.secondary{background:#18243a;color:#dce7ff;border:1px solid var(--line);box-shadow:none}
.btn.soft{background:rgba(72,214,255,.1);color:#bdecff;border:1px solid rgba(72,214,255,.22);box-shadow:none}
.btn.danger{background:rgba(239,68,68,.14);color:#ffb1b1;border:1px solid rgba(239,68,68,.25);box-shadow:none}
.layout{display:grid;grid-template-columns:minmax(680px,1fr) 430px;gap:18px;align-items:start}
.card{
  border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,rgba(22,33,54,.92),rgba(15,24,41,.92));
  box-shadow:0 22px 60px rgba(0,0,0,.25);overflow:hidden
}
.card-pad{padding:20px}
.form-card{padding:0}
.form-section{padding:20px;border-bottom:1px dashed rgba(148,163,184,.16)}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.section-title{display:flex;align-items:center;gap:10px;font-weight:850;font-size:16px}
.pill-number{width:27px;height:27px;border-radius:9px;background:linear-gradient(135deg,var(--purple),var(--blue));display:grid;place-items:center;font-size:13px;font-weight:900}
.pill-number.green{background:linear-gradient(135deg,#0f9f59,#21d481)}
.pill-number.orange{background:linear-gradient(135deg,#a35d10,#f59e0b)}
.option-pill{font-size:12px;color:#61d9ff;background:rgba(72,214,255,.12);border:1px solid rgba(72,214,255,.2);padding:5px 10px;border-radius:999px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
.field label{display:block;font-size:13px;color:#cbd7f3;margin:0 0 7px}
.input-row{display:flex;gap:10px}
input,select,textarea{
  width:100%;height:44px;border-radius:12px;background:#142039;border:1px solid var(--line);
  color:#f6f9ff;padding:0 13px;outline:none;font-size:14px
}
textarea{height:88px;padding:12px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:rgba(72,214,255,.52);box-shadow:0 0 0 4px rgba(72,214,255,.08)}
.delivery-box{
  margin-top:16px;border-radius:14px;border:1px solid rgba(124,60,255,.35);
  background:linear-gradient(135deg,rgba(124,60,255,.12),rgba(47,108,255,.08));padding:14px 15px;color:#dce5ff
}
.delivery-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.delivery-title{display:flex;align-items:center;gap:8px;font-weight:800;color:#bda9ff;font-size:13px}
.delivery-box p{margin:0;color:#dce5ff;font-size:13.5px;line-height:1.42}
.right-col{display:flex;flex-direction:column;gap:14px}
.warranty-card{padding:16px;border-color:rgba(54,233,133,.22);background:linear-gradient(180deg,rgba(20,43,47,.9),rgba(13,27,37,.92))}
.checkline{display:flex;gap:10px;align-items:flex-start;padding:13px;border-radius:13px;background:rgba(54,233,133,.08);border:1px solid rgba(54,233,133,.18);margin-bottom:14px}
.checkline input{width:18px;height:18px;accent-color:#7c3cff}
.checkline b{display:block;font-size:14px}.checkline span{display:block;color:#8ee6b1;font-size:13px;margin-top:4px}
.warranty-big{margin-top:14px;display:flex;align-items:center;gap:18px;padding:17px;border-radius:14px;border:1px solid rgba(54,233,133,.3);background:rgba(54,233,133,.07)}
.shield{width:78px;height:78px;border-radius:20px;background:rgba(54,233,133,.13);display:grid;place-items:center;font-size:42px;color:var(--green)}
.days small{color:#bdc9df}.days strong{display:block;color:var(--green);font-size:35px;line-height:1.05}.days span{color:#74e99e;font-size:13px}
.status-card textarea{height:64px}
.summary-card{padding:18px}
.summary-title{font-weight:850;margin-bottom:15px;color:#c8d7f4}
.summary-row{display:flex;justify-content:space-between;gap:16px;padding:8px 0;color:#c9d4ed;font-size:14px}
.summary-row span:first-child{color:#94a6c8}
.total{border-top:1px solid var(--line);margin-top:8px;padding-top:14px;font-size:18px}
.total strong{color:#a875ff;font-size:23px}
.green-badge{background:rgba(54,233,133,.14);color:#63f39a;border:1px solid rgba(54,233,133,.22);padding:5px 10px;border-radius:999px;font-weight:800;font-size:12px}
.bottom-actions{position:sticky;bottom:0;margin-top:12px;background:rgba(15,24,41,.88);backdrop-filter:blur(15px);border:1px solid var(--line);border-radius:15px;padding:14px;display:flex;justify-content:space-between;gap:12px}
.records{margin-top:18px}
.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line)}
table{border-collapse:collapse;width:100%;min-width:760px;background:rgba(15,24,41,.7)}
th,td{padding:13px 14px;border-bottom:1px solid var(--line);text-align:left;font-size:13.5px}
th{color:#bcd0f2;font-size:12px;text-transform:uppercase;letter-spacing:.05em;background:rgba(255,255,255,.035)}
td{color:#e4ebfb}
.empty{text-align:center;color:#93a4c5;padding:24px!important}
@media(max-width:1150px){.app{grid-template-columns:1fr}.sidebar{display:none}.layout{grid-template-columns:1fr}.search{width:52vw}}
@media(max-width:760px){.topbar{height:auto;padding:14px;align-items:flex-start;gap:12px;flex-direction:column}.top-icons{display:none}.content{padding:18px 14px}.header-line{align-items:flex-start;gap:12px;flex-direction:column}.grid-2,.grid-3{grid-template-columns:1fr}.layout{gap:14px}.search{width:100%}.bottom-actions{flex-direction:column}.btn{width:100%}}


/* V9: Dashboard separado + mensajes internos */
.toast-host{
  position:fixed;
  right:22px;
  top:92px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}
.toast{
  min-width:290px;
  max-width:390px;
  transform:translateY(-10px);
  opacity:0;
  transition:.22s ease;
  padding:14px 16px;
  border-radius:15px;
  background:rgba(15,24,41,.96);
  border:1px solid rgba(54,233,133,.32);
  box-shadow:0 18px 48px rgba(0,0,0,.38);
  color:#eaf3ff;
}
.toast.show{opacity:1;transform:translateY(0)}
.toast strong{display:block;color:#63f39a;margin-bottom:3px}
.toast span{display:block;color:#cbd7f3;font-size:13.5px}
.toast.error{border-color:rgba(239,68,68,.35)}
.toast.error strong{color:#ff9a9a}

.dash-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:16px;
}
.metric-card{
  padding:20px;
  border-radius:18px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(22,33,54,.95),rgba(15,24,41,.92));
  box-shadow:0 18px 48px rgba(0,0,0,.22);
}
.metric-card span{display:block;color:#aebcda;font-weight:750;margin-bottom:10px}
.metric-card strong{display:block;font-size:38px;line-height:1;color:#eef4ff}
.metric-card small{display:block;margin-top:10px;color:#7f91b5}
.metric-card.warning strong{color:#fbbf24}
.metric-card.danger strong{color:#fb7185}
.dashboard-layout{grid-template-columns:minmax(650px,1fr) 380px}
.quick-actions{display:grid;gap:10px}
@media(max-width:1050px){
  .dash-grid{grid-template-columns:repeat(2,1fr)}
  .dashboard-layout{grid-template-columns:1fr}
}
@media(max-width:640px){
  .dash-grid{grid-template-columns:1fr}
  .toast-host{left:14px;right:14px;top:78px}
  .toast{min-width:0;max-width:none;width:100%}
}


/* V10 PRO Settings UI */
.settings-app .content{max-width:1440px;margin:0 auto}
.settings-content{padding-top:24px}
.inline-alert{
  margin-bottom:16px;
  border-radius:15px;
  padding:14px 16px;
  background:rgba(54,233,133,.12);
  border:1px solid rgba(54,233,133,.28);
  color:#b9ffd3;
  font-weight:750;
}
.settings-hero{
  padding:24px;
  margin-bottom:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  background:
    radial-gradient(circle at 12% 20%, rgba(124,60,255,.24), transparent 32%),
    linear-gradient(135deg,rgba(22,33,54,.96),rgba(11,20,36,.95));
}
.settings-hero h2{
  margin:12px 0 8px;
  font-size:28px;
  letter-spacing:-.04em;
}
.settings-hero p{
  margin:0;
  max-width:720px;
  color:#98a9c9;
}
.hero-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,120px);
  gap:12px;
}
.hero-mini-grid div{
  padding:16px;
  border-radius:16px;
  background:rgba(255,255,255,.045);
  border:1px solid var(--line);
  text-align:center;
}
.hero-mini-grid strong{
  display:block;
  font-size:28px;
  color:#62dcff;
}
.hero-mini-grid span{
  color:#96a8c9;
  font-size:12px;
}
.settings-grid{
  display:grid;
  grid-template-columns:minmax(680px,1fr) 420px;
  gap:18px;
  align-items:start;
}
.settings-grid.lower{
  grid-template-columns:1fr 1fr;
  margin-top:18px;
}
.settings-side{
  display:grid;
  gap:18px;
}
.settings-panel{
  padding:20px;
  overflow:hidden;
}
.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.panel-head h2{
  margin:0;
  font-size:23px;
  letter-spacing:-.03em;
}
.panel-head p{
  margin:6px 0 0;
  color:#8fa1c1;
  font-size:13.5px;
}
.counter{
  min-width:42px;
  height:34px;
  padding:0 12px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-weight:900;
  color:#c7f4ff;
  background:rgba(72,214,255,.11);
  border:1px solid rgba(72,214,255,.24);
}
.settings-list{
  display:grid;
  gap:12px;
}
.settings-item{
  display:grid;
  grid-template-columns:44px 1fr auto;
  align-items:start;
  gap:13px;
  padding:15px;
  border-radius:16px;
  background:linear-gradient(135deg,rgba(124,60,255,.10),rgba(72,214,255,.045));
  border:1px solid rgba(124,60,255,.28);
  transition:.18s ease;
}
.settings-item:hover{
  transform:translateY(-1px);
  border-color:rgba(72,214,255,.38);
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}
.item-icon{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--purple),var(--blue));
  font-weight:900;
}
.item-body strong{
  display:block;
  font-size:15.5px;
  margin-bottom:4px;
}
.item-body span{
  display:block;
  color:#8fc9ff;
  font-size:12.5px;
}
.item-body p{
  margin:7px 0 0;
  color:#cbd7f3;
  line-height:1.4;
  font-size:13.5px;
}
.item-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.mini-danger{
  border:1px solid rgba(239,68,68,.25);
  background:rgba(239,68,68,.10);
  color:#ffb5b5;
  border-radius:11px;
  padding:9px 11px;
  cursor:pointer;
  font-weight:800;
}
.add-box{
  margin-top:16px;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.035);
  border:1px dashed rgba(148,163,184,.22);
}
.add-box .btn{
  margin-top:12px;
}
.compact-list{
  display:grid;
  gap:10px;
}
.compact-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 13px;
  border-radius:14px;
  background:rgba(124,60,255,.09);
  border:1px solid rgba(124,60,255,.25);
}
.compact-item span{
  color:#e8efff;
  font-weight:700;
}
.compact-item .mini-danger{
  width:34px;
  height:34px;
  padding:0;
  border-radius:10px;
}
.inline-add{
  margin-top:13px;
  display:flex;
  gap:10px;
}
.inline-add input{
  flex:1;
}
.duration-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.duration-card{
  padding:15px;
  border-radius:16px;
  background:rgba(72,214,255,.075);
  border:1px solid rgba(72,214,255,.18);
}
.duration-card strong{
  display:block;
  font-size:17px;
}
.duration-card span{
  display:block;
  margin-top:6px;
  color:#93a8cb;
}
.status-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.status-chip{
  border:1px solid rgba(54,233,133,.22);
  background:rgba(54,233,133,.10);
  color:#b9ffd3;
  padding:10px 13px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
}
.status-chip b{
  color:#ff9a9a;
  margin-left:6px;
}
@media(max-width:1180px){
  .settings-grid,
  .settings-grid.lower{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  .settings-hero{
    flex-direction:column;
    align-items:stretch;
  }
  .hero-mini-grid{
    grid-template-columns:repeat(2,1fr);
  }
  .settings-item{
    grid-template-columns:1fr;
  }
  .duration-grid{
    grid-template-columns:1fr;
  }
  .inline-add{
    flex-direction:column;
  }
}


/* V11 Registros / Clientes PRO */
.clickable-row{cursor:pointer;transition:.15s ease}
.clickable-row:hover{background:rgba(72,214,255,.055)}
.records-layout{
  display:grid;
  grid-template-columns:minmax(560px,1fr) 440px;
  gap:18px;
  align-items:start;
}
.records-list-pro{
  display:grid;
  gap:10px;
}
.record-row-pro{
  width:100%;
  border:1px solid var(--line);
  background:linear-gradient(135deg,rgba(22,33,54,.92),rgba(12,22,38,.92));
  color:var(--text);
  border-radius:16px;
  padding:14px;
  display:grid;
  grid-template-columns:46px 1fr auto;
  gap:13px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  transition:.18s ease;
}
.record-row-pro:hover,
.record-row-pro.selected{
  border-color:rgba(72,214,255,.42);
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(0,0,0,.22);
  background:linear-gradient(135deg,rgba(124,60,255,.14),rgba(72,214,255,.08));
}
.client-mini-avatar{
  width:46px;
  height:46px;
  border-radius:15px;
  display:grid;
  place-items:center;
  font-weight:900;
  background:linear-gradient(135deg,var(--purple),var(--blue));
}
.record-row-body strong{
  display:block;
  font-size:15px;
}
.record-row-body span{
  display:block;
  margin-top:4px;
  color:#93a6c8;
  font-size:13px;
}
.record-row-meta{
  text-align:right;
}
.record-row-meta b{
  display:block;
  font-size:13.5px;
  margin-bottom:5px;
}
.record-row-meta em{
  font-style:normal;
  font-size:12px;
  padding:5px 8px;
  border-radius:999px;
  font-weight:800;
}
.ok-mini{background:rgba(54,233,133,.12);color:#7df7a7}
.warning-mini{background:rgba(245,158,11,.13);color:#fbbf24}
.danger-mini{background:rgba(239,68,68,.13);color:#ff9090}
.record-detail{
  position:sticky;
  top:98px;
  padding:20px;
}
.empty-detail{
  min-height:460px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#91a4c6;
}
.empty-detail h2{margin:6px 0 4px;color:#eaf2ff}
.empty-detail p{max-width:320px;margin:0;line-height:1.45}
.big-icon{
  width:86px;
  height:86px;
  border-radius:28px;
  display:grid;
  place-items:center;
  font-size:42px;
  background:rgba(124,60,255,.13);
  border:1px solid rgba(124,60,255,.28);
}
.client-card-head{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}
.client-avatar{
  width:58px;
  height:58px;
  border-radius:19px;
  display:grid;
  place-items:center;
  font-size:26px;
  font-weight:900;
  background:linear-gradient(135deg,#7c3cff,#2f6cff);
  box-shadow:0 16px 32px rgba(47,108,255,.25);
}
.client-card-head h2{
  margin:0;
  font-size:22px;
}
.client-card-head p{
  margin:5px 0 0;
  color:#96a8c9;
  font-size:13px;
}
.detail-status-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:16px 0;
}
.detail-badge{
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:850;
  color:#c7f4ff;
  background:rgba(72,214,255,.10);
  border:1px solid rgba(72,214,255,.25);
}
.detail-main-card{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.detail-main-card div{
  padding:14px;
  border-radius:15px;
  background:rgba(255,255,255,.035);
  border:1px solid var(--line);
}
.detail-main-card small{
  display:block;
  color:#8fa1c1;
  margin-bottom:6px;
}
.detail-main-card strong{
  display:block;
  color:#eef4ff;
}
.timeline-pro{
  margin:16px 0;
  display:grid;
  gap:10px;
}
.time-item{
  display:grid;
  grid-template-columns:24px 1fr;
  gap:10px;
  align-items:start;
}
.time-item span{
  width:14px;
  height:14px;
  margin-top:4px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 6px rgba(54,233,133,.10);
}
.time-item small{
  display:block;
  color:#8fa1c1;
}
.time-item strong{
  display:block;
  margin-top:3px;
}
.access-box,.notes-box{
  padding:15px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  margin-top:12px;
}
.access-box h3,.notes-box h3{
  margin:0 0 10px;
  font-size:16px;
}
.notes-box p{
  margin:0;
  color:#cbd7f3;
  line-height:1.45;
  white-space:pre-wrap;
}
.detail-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}
@media(max-width:1100px){
  .records-layout{grid-template-columns:1fr}
  .record-detail{position:static}
}
@media(max-width:680px){
  .record-row-pro{grid-template-columns:42px 1fr}
  .record-row-meta{text-align:left;grid-column:2}
  .detail-main-card{grid-template-columns:1fr}
  .detail-actions{grid-template-columns:1fr}
}


/* V12 Premium Light Aqua / Gold Theme */
:root{
  --bg:#eef9ff;
  --panel:#ffffff;
  --panel2:#f7fcff;
  --panel3:#eef8ff;
  --line:rgba(14,116,144,.15);
  --muted:#5f7088;
  --text:#0f243b;
  --blue:#1f75ff;
  --cyan:#20c7d9;
  --purple:#2563eb;
  --green:#14b86f;
  --orange:#d99a18;
  --danger:#ef4444;
  --gold:#d9a441;
}
html,body{
  background:
    radial-gradient(circle at 14% 10%, rgba(32,199,217,.20), transparent 32%),
    radial-gradient(circle at 84% 14%, rgba(217,164,65,.16), transparent 34%),
    linear-gradient(135deg,#f8fdff 0%,#eaf8ff 45%,#f9fbff 100%) !important;
  color:var(--text) !important;
}
body{
  background:
    radial-gradient(circle at 18% 8%, rgba(32,199,217,.20), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(217,164,65,.16), transparent 32%),
    linear-gradient(180deg,#f7fcff 0%,#edf8ff 100%) !important;
}
.sidebar{
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(232,248,255,.92)) !important;
  border-right:1px solid rgba(14,116,144,.14) !important;
  box-shadow:10px 0 36px rgba(14,116,144,.08) !important;
}
.brand-mark{
  color:#fff !important;
  background:linear-gradient(135deg,#24c6dc,#1f75ff 62%,#d9a441) !important;
  box-shadow:0 14px 30px rgba(31,117,255,.22) !important;
}
.brand-title{
  color:#12304b !important;
}
.brand-title span,
.nav-label,
.subtitle,
.quick-title,
.field label,
.panel-head p,
.item-body span,
.item-body p,
.duration-card span,
.summary-row span,
.client-card-head p,
.record-row-body span,
.empty,
.empty-detail,
.metric-card small,
.metric-card span{
  color:#5f7088 !important;
}
.nav a,.quick a{
  color:#183650 !important;
  background:rgba(255,255,255,.65) !important;
  border:1px solid rgba(14,116,144,.10) !important;
}
.nav a:hover,.quick a:hover{
  background:linear-gradient(135deg,rgba(32,199,217,.15),rgba(31,117,255,.10)) !important;
  border-color:rgba(32,199,217,.35) !important;
}
.nav a.active,.quick .primary{
  color:#fff !important;
  background:linear-gradient(135deg,#20c7d9,#1f75ff) !important;
  box-shadow:0 14px 30px rgba(31,117,255,.22) !important;
}
.quick{
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(232,248,255,.68)) !important;
  border:1px solid rgba(14,116,144,.12) !important;
  box-shadow:0 16px 40px rgba(14,116,144,.08) !important;
}
.topbar{
  background:rgba(255,255,255,.78) !important;
  border-bottom:1px solid rgba(14,116,144,.13) !important;
  box-shadow:0 10px 30px rgba(14,116,144,.07) !important;
}
.hamb,.icon-btn{
  background:rgba(255,255,255,.8) !important;
  border:1px solid rgba(14,116,144,.14) !important;
  color:#1d5877 !important;
}
.search input,
input,select,textarea{
  background:rgba(255,255,255,.88) !important;
  border:1px solid rgba(14,116,144,.16) !important;
  color:#102a43 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7) !important;
}
.search input::placeholder,
input::placeholder,
textarea::placeholder{
  color:#7f8fa6 !important;
}
input:focus,select:focus,textarea:focus{
  border-color:rgba(32,199,217,.65) !important;
  box-shadow:0 0 0 4px rgba(32,199,217,.13) !important;
}
.card,
.metric-card,
.settings-panel,
.record-detail{
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(241,251,255,.88)) !important;
  border:1px solid rgba(14,116,144,.13) !important;
  box-shadow:0 20px 50px rgba(14,116,144,.10) !important;
}
h1,h2,h3,
.section-title,
.panel-head h2,
.summary-title,
.client-card-head h2,
.metric-card strong,
.detail-main-card strong,
.time-item strong,
.item-body strong,
.compact-item span,
.duration-card strong,
.record-row-body strong,
.record-row-meta b{
  color:#102a43 !important;
}
.title-icon,
.pill-number,
.client-avatar,
.client-mini-avatar,
.item-icon{
  background:linear-gradient(135deg,#20c7d9,#1f75ff) !important;
  color:#fff !important;
  box-shadow:0 14px 30px rgba(31,117,255,.22) !important;
}
.pill-number.green{
  background:linear-gradient(135deg,#19c37d,#20c7d9) !important;
}
.pill-number.orange{
  background:linear-gradient(135deg,#d9a441,#f5c76b) !important;
}
.btn{
  color:#fff !important;
  background:linear-gradient(135deg,#20c7d9,#1f75ff) !important;
  box-shadow:0 14px 30px rgba(31,117,255,.22) !important;
}
.btn:hover{
  filter:brightness(1.03);
  transform:translateY(-1px);
}
.btn.secondary{
  background:linear-gradient(180deg,#ffffff,#edf8ff) !important;
  color:#1d5877 !important;
  border:1px solid rgba(14,116,144,.16) !important;
  box-shadow:0 8px 22px rgba(14,116,144,.08) !important;
}
.btn.soft{
  background:rgba(32,199,217,.12) !important;
  color:#08758a !important;
  border:1px solid rgba(32,199,217,.25) !important;
  box-shadow:none !important;
}
.delivery-box,
.settings-item,
.compact-item{
  background:linear-gradient(135deg,rgba(32,199,217,.10),rgba(217,164,65,.08)) !important;
  border:1px solid rgba(32,199,217,.22) !important;
  color:#183650 !important;
}
.delivery-title{
  color:#08758a !important;
}
.delivery-box p{
  color:#23445f !important;
}
.warranty-card,
.checkline,
.warranty-big{
  background:linear-gradient(135deg,rgba(20,184,111,.10),rgba(32,199,217,.08)) !important;
  border-color:rgba(20,184,111,.22) !important;
}
.days strong,
.metric-card.warning strong,
.total strong{
  color:#d9a441 !important;
}
.metric-card.danger strong{
  color:#ef4444 !important;
}
.green-badge,
.status-chip,
.ok-mini{
  color:#087a4c !important;
  background:rgba(20,184,111,.12) !important;
  border:1px solid rgba(20,184,111,.20) !important;
}
.warning-mini{
  color:#a66b00 !important;
  background:rgba(217,164,65,.16) !important;
}
.danger-mini{
  color:#c33030 !important;
  background:rgba(239,68,68,.12) !important;
}
.table-wrap,table{
  background:rgba(255,255,255,.72) !important;
  border-color:rgba(14,116,144,.12) !important;
}
th{
  color:#24536e !important;
  background:rgba(32,199,217,.08) !important;
}
td{
  color:#183650 !important;
}
.record-row-pro{
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(236,250,255,.88)) !important;
  border:1px solid rgba(14,116,144,.14) !important;
  color:#102a43 !important;
}
.record-row-pro:hover,
.record-row-pro.selected{
  background:linear-gradient(135deg,rgba(32,199,217,.13),rgba(217,164,65,.10)) !important;
  border-color:rgba(32,199,217,.38) !important;
}
.detail-main-card div,
.access-box,
.notes-box,
.duration-card{
  background:rgba(255,255,255,.72) !important;
  border:1px solid rgba(14,116,144,.13) !important;
}
.bottom-actions{
  background:rgba(255,255,255,.86) !important;
  border:1px solid rgba(14,116,144,.13) !important;
  box-shadow:0 -12px 34px rgba(14,116,144,.08) !important;
}
.toast{
  background:rgba(255,255,255,.96) !important;
  border:1px solid rgba(20,184,111,.25) !important;
  color:#102a43 !important;
}
.toast span{color:#31516b !important}
.settings-hero{
  background:
    radial-gradient(circle at 12% 20%, rgba(32,199,217,.18), transparent 32%),
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(236,250,255,.92)) !important;
}
.hero-mini-grid div{
  background:rgba(255,255,255,.75) !important;
  border:1px solid rgba(14,116,144,.13) !important;
}
.hero-mini-grid strong{
  color:#08758a !important;
}
.option-pill,
.counter,
.detail-badge{
  color:#08758a !important;
  background:rgba(32,199,217,.12) !important;
  border:1px solid rgba(32,199,217,.22) !important;
}
.avatar{
  color:#fff !important;
  background:linear-gradient(135deg,#d9a441,#1f75ff) !important;
}
@media(max-width:760px){
  .sidebar{
    background:#ffffff !important;
  }
}


/* V13 Correcciones finales: cache, topbar, garantia y resumen */
.topbar{
  background:rgba(255,255,255,.90) !important;
  color:#102a43 !important;
}
.search{
  display:flex !important;
  align-items:center !important;
}
.search input{
  height:46px !important;
  padding:0 48px 0 16px !important;
  line-height:46px !important;
}
.search span,
.search svg{
  position:absolute !important;
  right:16px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:22px !important;
  height:22px !important;
  line-height:22px !important;
  font-size:22px !important;
  color:#0e7490 !important;
  opacity:1 !important;
  display:grid !important;
  place-items:center !important;
  pointer-events:none !important;
}
.hamb{
  color:#0e7490 !important;
  background:linear-gradient(180deg,#ffffff,#eefaff) !important;
  border:1px solid rgba(14,116,144,.20) !important;
}

/* Mantener tema claro en todos los módulos aunque haya estilos viejos cargados */
.app,
.main,
.content,
.form-section,
.settings-content{
  color:#102a43 !important;
}
.main{
  background:
    radial-gradient(circle at 25% 12%, rgba(32,199,217,.14), transparent 31%),
    radial-gradient(circle at 85% 8%, rgba(217,164,65,.10), transparent 28%),
    linear-gradient(180deg,#f7fcff,#eaf8ff) !important;
}
.form-card,
.form-section,
.card,
.card-pad,
.status-card,
.summary-card,
.settings-panel,
.record-detail{
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(244,252,255,.92)) !important;
  color:#102a43 !important;
}
.form-section{
  border-bottom:1px dashed rgba(14,116,144,.18) !important;
}
.sidebar,
.sidebar *:not(.brand-mark):not(.active){
  text-shadow:none !important;
}

/* Garantía: más legible */
.warranty-card{
  background:linear-gradient(160deg,rgba(234,255,245,.96),rgba(234,249,255,.94)) !important;
  border:1px solid rgba(20,184,111,.25) !important;
  color:#102a43 !important;
}
.warranty-card .section-title,
.warranty-card label,
.warranty-card .field label{
  color:#102a43 !important;
}
.checkline{
  background:linear-gradient(135deg,rgba(20,184,111,.13),rgba(32,199,217,.08)) !important;
  border:1px solid rgba(20,184,111,.24) !important;
}
.checkline b{
  color:#0f5132 !important;
  font-weight:900 !important;
}
.checkline span span{
  color:#18794e !important;
  font-weight:650 !important;
}
.warranty-big{
  background:linear-gradient(135deg,#ffffff,rgba(225,255,241,.95)) !important;
  border:1px solid rgba(20,184,111,.28) !important;
}
.shield{
  background:linear-gradient(135deg,rgba(20,184,111,.18),rgba(32,199,217,.12)) !important;
  color:#14b86f !important;
}
.days small{
  color:#50657f !important;
  font-weight:700 !important;
}
.days strong{
  color:#14b86f !important;
  font-weight:950 !important;
}
.days span,
#warrantyStatus{
  color:#0f8a54 !important;
  font-weight:750 !important;
}

/* Resumen del servicio PRO */
.summary-card{
  background:
    radial-gradient(circle at 100% 0%, rgba(217,164,65,.14), transparent 38%),
    linear-gradient(180deg,#ffffff,#f2fbff) !important;
  border:1px solid rgba(14,116,144,.14) !important;
  box-shadow:0 18px 44px rgba(14,116,144,.10) !important;
}
.summary-title{
  font-size:18px !important;
  color:#102a43 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding-bottom:12px !important;
  border-bottom:1px solid rgba(14,116,144,.12) !important;
}
.summary-title:before{
  content:"✦";
  width:26px;
  height:26px;
  border-radius:9px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#d9a441);
  font-size:13px;
}
.summary-row{
  padding:10px 0 !important;
  border-bottom:1px solid rgba(14,116,144,.08) !important;
}
.summary-row span{
  color:#58708a !important;
  font-weight:750 !important;
}
.summary-row b{
  color:#153450 !important;
  font-weight:850 !important;
}
.summary-row.total{
  margin-top:12px !important;
  padding:15px !important;
  border-radius:16px !important;
  border:1px solid rgba(217,164,65,.24) !important;
  background:linear-gradient(135deg,rgba(217,164,65,.10),rgba(32,199,217,.07)) !important;
}
.summary-row.total span{
  font-size:17px !important;
  color:#153450 !important;
}
.summary-row.total strong{
  color:#d99a18 !important;
  font-size:26px !important;
  font-weight:950 !important;
}

/* Inputs y selects visibles en claro */
input,select,textarea{
  background:#ffffff !important;
  color:#102a43 !important;
  border:1px solid rgba(14,116,144,.18) !important;
}
input[type="date"]{
  color-scheme:light !important;
}

/* Botones más premium */
.btn{
  background:linear-gradient(135deg,#18bdd2,#1f75ff) !important;
  border:0 !important;
  color:#fff !important;
}
.btn.secondary{
  background:linear-gradient(180deg,#ffffff,#effbff) !important;
  color:#0f5570 !important;
  border:1px solid rgba(14,116,144,.18) !important;
}
.green-badge{
  background:rgba(20,184,111,.13) !important;
  border:1px solid rgba(20,184,111,.23) !important;
  color:#0f8a54 !important;
}

/* Tabla y tarjetas sin sombras oscuras */
.table-wrap,
table{
  background:#ffffff !important;
}
th{
  background:#eafaff !important;
  color:#0f5570 !important;
}
td{
  color:#153450 !important;
}


/* V14 Smart Status Card */
.smart-status-card{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:18px 1fr;
  gap:13px;
  align-items:center;
  padding:15px;
  margin-bottom:15px;
  border-radius:17px;
  border:1px solid rgba(14,116,144,.16);
  background:linear-gradient(135deg,#ffffff,#f0fbff);
  box-shadow:0 14px 34px rgba(14,116,144,.08);
}
.smart-status-card:before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.18;
  pointer-events:none;
  background:radial-gradient(circle at 92% 10%, currentColor, transparent 34%);
}
.smart-status-pulse{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#14b86f;
  box-shadow:0 0 0 8px rgba(20,184,111,.12);
  animation:smartPulse 1.6s infinite ease-in-out;
}
@keyframes smartPulse{
  0%{transform:scale(.96);box-shadow:0 0 0 0 rgba(20,184,111,.28)}
  70%{transform:scale(1);box-shadow:0 0 0 10px rgba(20,184,111,0)}
  100%{transform:scale(.96);box-shadow:0 0 0 0 rgba(20,184,111,0)}
}
.smart-status-card small{
  display:block;
  color:#5f7088 !important;
  font-weight:800;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.smart-status-card strong{
  display:block;
  margin-top:3px;
  font-size:22px;
  color:#102a43 !important;
}
.smart-status-card span{
  display:block;
  margin-top:4px;
  color:#50657f !important;
  font-weight:650;
  line-height:1.35;
}
.smart-status-card.active{
  color:#14b86f;
  border-color:rgba(20,184,111,.24);
  background:linear-gradient(135deg,#ffffff,#effdf6) !important;
}
.smart-status-card.soon{
  color:#1f75ff;
  border-color:rgba(31,117,255,.28);
  background:linear-gradient(135deg,#ffffff,#eef6ff) !important;
}
.smart-status-card.soon .smart-status-pulse{
  background:#1f75ff;
  box-shadow:0 0 0 8px rgba(31,117,255,.12);
}
.smart-status-card.renew{
  color:#d99a18;
  border-color:rgba(217,154,24,.34);
  background:linear-gradient(135deg,#ffffff,#fff7e8) !important;
}
.smart-status-card.renew .smart-status-pulse{
  background:#d99a18;
  box-shadow:0 0 0 8px rgba(217,154,24,.14);
}
.smart-status-card.urgent,
.smart-status-card.today{
  color:#ef4444;
  border-color:rgba(239,68,68,.30);
  background:linear-gradient(135deg,#ffffff,#fff1f1) !important;
}
.smart-status-card.urgent .smart-status-pulse,
.smart-status-card.today .smart-status-pulse{
  background:#ef4444;
  box-shadow:0 0 0 8px rgba(239,68,68,.14);
}
.smart-status-card.expired{
  color:#991b1b;
  border-color:rgba(153,27,27,.32);
  background:linear-gradient(135deg,#fff7f7,#ffe9e9) !important;
}
.smart-status-card.expired .smart-status-pulse{
  background:#991b1b;
  box-shadow:0 0 0 8px rgba(153,27,27,.14);
}
.smart-status-card.permanent{
  color:#0e7490;
  border-color:rgba(14,116,144,.24);
  background:linear-gradient(135deg,#ffffff,#eafaff) !important;
}
.smart-status-card.permanent .smart-status-pulse{
  background:#0e7490;
  box-shadow:0 0 0 8px rgba(14,116,144,.12);
}
.status-card{
  padding-top:18px !important;
}


/* V15 Canal de comunicación */
.channel-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.channel-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 14px;
  border-radius:16px;
  background:linear-gradient(135deg,rgba(32,199,217,.12),rgba(217,164,65,.08)) !important;
  border:1px solid rgba(32,199,217,.22);
}
.channel-card span{
  font-weight:850;
  color:#153450;
}
.channel-card .mini-danger{
  width:32px;
  height:32px;
  padding:0;
  display:grid;
  place-items:center;
}
#communication_channel{
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(135deg,rgba(32,199,217,.65),rgba(217,164,65,.45)) border-box !important;
  border:1px solid transparent !important;
}
@media(max-width:760px){
  .channel-grid{grid-template-columns:1fr}
}


/* V16 Phone auto-format + compact client/channel row */
.client-channel-row{
  grid-template-columns:1.15fr .85fr !important;
}
.client-channel-row .input-row{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  gap:10px !important;
}
#phone{
  letter-spacing:.02em;
  font-weight:750;
}
#communication_channel{
  height:44px !important;
}
@media(max-width:760px){
  .client-channel-row{
    grid-template-columns:1fr !important;
  }
  .client-channel-row .input-row{
    grid-template-columns:1fr !important;
  }
}


/* V17 Price format */
#price{
  font-weight:850;
  letter-spacing:.01em;
}


/* V18 Multi-country phone with flag */
.phone-country-wrap{
  display:grid;
  grid-template-columns:190px 1fr;
  gap:10px;
}
.country-select{
  font-weight:850 !important;
  color:#102a43 !important;
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(135deg,rgba(32,199,217,.65),rgba(217,164,65,.45)) border-box !important;
  border:1px solid transparent !important;
}
#phone{
  font-weight:850;
  letter-spacing:.02em;
}
.detail-actions{
  grid-template-columns:1fr 1fr 1fr !important;
}
@media(max-width:760px){
  .phone-country-wrap{
    grid-template-columns:1fr;
  }
  .detail-actions{
    grid-template-columns:1fr !important;
  }
}

/* CLIENT GROUP CARDS */
.client-group-card{
  background:linear-gradient(180deg,#ffffff,#f7fcff);
  border:1px solid rgba(14,116,144,.12);
  border-radius:26px;
  padding:22px;
  margin-bottom:22px;
  box-shadow:0 14px 40px rgba(15,23,42,.06);
}
.client-group-top{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(14,116,144,.10);
}
.client-avatar{
  width:58px;height:58px;border-radius:18px;
  background:linear-gradient(135deg,#20c7d9,#2563eb);
  color:#fff;font-weight:900;font-size:22px;
  display:grid;place-items:center;
}
.client-main{
  display:flex;gap:14px;align-items:center;
}
.client-meta h3{
  margin:0;color:#102a43;font-size:21px;
}
.client-meta p{
  margin:4px 0 0;color:#5f7088;font-size:13px;
}
.client-stats{
  display:flex;gap:10px;flex-wrap:wrap;
}
.client-pill{
  padding:10px 14px;border-radius:999px;
  background:rgba(32,199,217,.10);
  color:#08758a;font-weight:800;font-size:12px;
  border:1px solid rgba(32,199,217,.18);
}
.client-products{
  display:grid;
  gap:12px;
}
.client-product-row{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr auto;
  gap:12px;
  align-items:center;
  padding:16px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(14,116,144,.10);
}
.client-product-row strong{
  color:#102a43;
}
.client-product-row small{
  display:block;
  color:#5f7088;
  margin-top:4px;
}
.client-action-btn{
  border:0;
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#2563eb);
}
@media(max-width:900px){
  .client-product-row{
    grid-template-columns:1fr;
  }
}


/* V24 - Vista agrupada real por cliente */
.grouped-client-list{
  display:grid;
  gap:16px;
  margin-top:16px;
}
.grouped-client-card{
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#f6fcff);
  border:1px solid rgba(14,116,144,.14);
  box-shadow:0 16px 42px rgba(14,116,144,.10);
  overflow:hidden;
}
.grouped-client-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  background:linear-gradient(135deg,rgba(32,199,217,.10),rgba(217,164,65,.07));
  border-bottom:1px solid rgba(14,116,144,.10);
}
.grouped-client-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.grouped-avatar{
  width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  color:#fff;
  font-weight:950;
  font-size:20px;
  flex:0 0 auto;
}
.grouped-client-title h3{
  margin:0;
  color:#102a43;
  font-size:20px;
}
.grouped-client-title p{
  margin:5px 0 0;
  color:#5f7088;
  font-weight:650;
  font-size:13px;
}
.grouped-client-kpis{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.grouped-client-kpis span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:#fff;
  border:1px solid rgba(14,116,144,.13);
  color:#153450;
}
.grouped-services{
  padding:14px;
  display:grid;
  gap:10px;
}
.grouped-service-row{
  display:grid;
  grid-template-columns:1.6fr 1fr .9fr .9fr .8fr auto;
  gap:12px;
  align-items:center;
  padding:14px;
  border-radius:17px;
  border:1px solid rgba(14,116,144,.11);
  background:#fff;
}
.grouped-service-row strong{
  color:#102a43;
}
.grouped-service-row small,
.grouped-service-row span{
  display:block;
  color:#5f7088;
  font-size:12px;
  margin-top:4px;
}
.grouped-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}
.grouped-actions button,
.grouped-actions a{
  border:0;
  text-decoration:none;
  padding:9px 12px;
  border-radius:12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
}
.grouped-actions a{
  background:linear-gradient(135deg,#d9a441,#20c7d9);
}
.badge-status{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:82px;
  padding:7px 12px!important;
  border-radius:999px!important;
  font-weight:950!important;
  font-size:12px!important;
  border:1px solid transparent!important;
}
.status-active{background:rgba(34,197,94,.14)!important;color:#15803d!important;border-color:rgba(34,197,94,.26)!important}
.status-soon{background:rgba(59,130,246,.13)!important;color:#1d4ed8!important;border-color:rgba(59,130,246,.28)!important}
.status-warning{background:rgba(245,158,11,.15)!important;color:#b45309!important;border-color:rgba(245,158,11,.28)!important}
.status-danger,.status-expired{background:rgba(239,68,68,.13)!important;color:#b91c1c!important;border-color:rgba(239,68,68,.28)!important}
.status-today{background:rgba(217,119,6,.16)!important;color:#92400e!important;border-color:rgba(217,119,6,.32)!important}
.status-permanent{background:rgba(14,165,233,.13)!important;color:#0369a1!important;border-color:rgba(14,165,233,.28)!important}
.grouped-empty{
  padding:24px;
  text-align:center;
  color:#5f7088;
  background:#fff;
  border:1px solid rgba(14,116,144,.12);
  border-radius:18px;
}
@media(max-width:980px){
  .grouped-client-head{align-items:flex-start;flex-direction:column}
  .grouped-client-kpis{justify-content:flex-start}
  .grouped-service-row{grid-template-columns:1fr}
  .grouped-actions{justify-content:flex-start}
}

/* V26 ajuste cliente maestro: mantener diseño V24 */
.grouped-service-row small{
  word-break:break-word;
}


/* V27 - Corrección visual módulo Registros */
body .content{
  max-width: none;
}
.client-summary-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(180px,1fr)) !important;
  gap:16px !important;
  margin:0 0 18px 0 !important;
  align-items:stretch !important;
}
.client-summary-grid .metric-card{
  min-height:120px !important;
  padding:20px !important;
  border-radius:20px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
}
.client-summary-grid .metric-card span{
  margin:0 0 8px 0 !important;
  font-size:15px !important;
}
.client-summary-grid .metric-card strong{
  font-size:36px !important;
  line-height:1 !important;
  margin:0 !important;
}
.client-summary-grid .metric-card small{
  margin-top:8px !important;
}
.grouped-client-list{
  margin-top:18px !important;
}
.grouped-client-card{
  margin-bottom:18px !important;
}
.grouped-client-head{
  min-height:auto !important;
}
.grouped-services{
  padding:14px !important;
}
.grouped-service-row{
  min-height:74px !important;
}
.grouped-service-row > div{
  min-width:0 !important;
}
.grouped-service-row strong{
  font-size:15px !important;
}
.grouped-service-row small{
  font-size:12px !important;
  line-height:1.3 !important;
}
@media(max-width:1200px){
  .client-summary-grid{
    grid-template-columns:repeat(2,minmax(180px,1fr)) !important;
  }
}
@media(max-width:680px){
  .client-summary-grid{
    grid-template-columns:1fr !important;
  }
}


/* V30 - Records exactamente estilo referencia */
.records-v30-main{
  background:
    radial-gradient(circle at 22% 12%, rgba(32,199,217,.10), transparent 28%),
    linear-gradient(180deg,#f8fdff,#eef9ff) !important;
}
.records-v30-content{padding:28px 28px 42px !important}
.records-v30-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}
.records-v30-actions{display:flex;gap:12px}
.records-v30-metrics{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(170px,1fr)) !important;
  gap:16px !important;
  margin-bottom:18px !important;
}
.v30-metric{
  min-height:122px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  padding:22px !important;
  border-radius:18px !important;
  background:#fff !important;
}
.v30-metric strong{font-size:36px !important}
.v30-metric em{
  width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;font-style:normal;font-size:23px;
  background:rgba(32,199,217,.14);
}
.v30-metric.warning em{background:rgba(217,164,65,.18)}
.v30-metric.danger em{background:rgba(239,68,68,.14);color:#dc2626}
.records-v30-panel{
  background:#fff;border:1px solid rgba(14,116,144,.12);
  border-radius:18px;box-shadow:0 20px 50px rgba(14,116,144,.08);
  padding:16px;overflow:hidden;
}
.records-v30-toolbar{
  display:grid;grid-template-columns:1.2fr 1fr 1fr auto auto;
  align-items:center;gap:12px;margin-bottom:12px;
}
.records-v30-filter input,.records-v30-toolbar select{
  height:48px !important;border-radius:14px !important;background:#fff !important;
}
.records-v30-pageinfo{color:#48617d;font-weight:650;white-space:nowrap}
.records-v30-pager{display:flex;gap:8px;align-items:center}
.records-v30-pager button,.records-v30-pager b{
  width:38px;height:38px;border-radius:10px;border:1px solid rgba(14,116,144,.14);
  display:grid;place-items:center;background:#fff;color:#153450;font-weight:900;
}
.records-v30-pager b{background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;border:0}
.records-v30-list{border:1px solid rgba(14,116,144,.10);border-radius:16px;overflow:hidden;background:#fff}
.records-v30-row{border-bottom:1px solid rgba(14,116,144,.10);background:#fff}
.records-v30-row:last-child{border-bottom:0}
.records-v30-row-main{
  min-height:112px;display:grid;
  grid-template-columns:70px minmax(260px,1fr) auto auto auto auto 42px;
  gap:18px;align-items:center;padding:18px 18px;
}
.records-v30-avatar{
  width:58px;height:58px;border-radius:18px;display:grid;place-items:center;
  color:#fff;font-size:22px;font-weight:950;background:linear-gradient(135deg,#20c7d9,#1f75ff);
}
.records-v30-row:nth-child(3n) .records-v30-avatar{background:linear-gradient(135deg,#7c3aed,#20c7d9)}
.records-v30-client h3{margin:0 0 10px;color:#102a43;font-size:21px;letter-spacing:-.03em}
.product-icons-strip{display:flex;gap:10px;align-items:center;margin:0 !important}
.product-mini-icon{
  width:36px !important;height:36px !important;border-radius:10px !important;
  display:grid;place-items:center;color:#fff;font-size:11px;font-weight:950;
  box-shadow:0 8px 18px rgba(15,23,42,.12);
}
.product-adobe{background:linear-gradient(135deg,#ff2b2b,#8b0000)}
.product-canva{background:linear-gradient(135deg,#00c4cc,#7d2ae8)}
.product-capcut{background:linear-gradient(135deg,#111827,#4b5563)}
.product-office{background:linear-gradient(135deg,#f97316,#dc2626)}
.product-netflix{background:linear-gradient(135deg,#e50914,#7f1d1d)}
.product-spotify{background:linear-gradient(135deg,#1db954,#15803d)}
.product-generic{background:linear-gradient(135deg,#20c7d9,#1f75ff)}
.product-more{font-size:12px;font-weight:850;padding:7px 9px;border-radius:999px;background:#eef6ff;color:#1d4ed8}
.records-v30-pill{
  padding:10px 14px;border-radius:999px;background:#fff;border:1px solid rgba(14,116,144,.14);
  font-weight:900;color:#153450;white-space:nowrap;
}
.records-v30-next span{display:block;color:#48617d;font-size:13px}
.records-v30-next b{display:block;color:#102a43;font-size:16px;margin-top:4px}
.records-v30-view{
  border:0;border-radius:12px;min-width:126px;height:44px;color:#fff;font-weight:950;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);box-shadow:0 10px 24px rgba(31,117,255,.18);
}
.records-v30-arrow{
  width:40px;height:40px;border:0;border-radius:12px;background:#f3f8ff;color:#153450;font-size:18px;font-weight:950;
}
.badge-status{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:82px;padding:8px 12px!important;border-radius:999px!important;font-weight:950!important;font-size:12px!important;border:1px solid transparent!important;
}
.status-active{background:rgba(34,197,94,.14)!important;color:#15803d!important;border-color:rgba(34,197,94,.26)!important}
.status-soon{background:rgba(59,130,246,.13)!important;color:#1d4ed8!important;border-color:rgba(59,130,246,.28)!important}
.status-warning{background:rgba(245,158,11,.15)!important;color:#b45309!important;border-color:rgba(245,158,11,.28)!important}
.status-danger,.status-expired{background:rgba(239,68,68,.13)!important;color:#b91c1c!important;border-color:rgba(239,68,68,.28)!important}
.status-today{background:rgba(217,119,6,.16)!important;color:#92400e!important;border-color:rgba(217,119,6,.32)!important}
.status-permanent{background:rgba(14,165,233,.13)!important;color:#0369a1!important;border-color:rgba(14,165,233,.28)!important}
.records-v30-details{padding:0 18px 18px;display:grid;gap:10px;animation:v30open .22s ease}
@keyframes v30open{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.records-v30-service{
  display:grid;grid-template-columns:1.7fr .8fr .8fr .8fr .8fr auto;gap:12px;align-items:center;
  padding:14px;border-radius:16px;background:#fafdff;border:1px solid rgba(14,116,144,.10);
}
.records-v30-service strong{color:#102a43}
.records-v30-service small,.records-v30-service span{display:block;color:#5f7088;font-size:12px;margin-top:4px}
.records-v30-service-actions{display:flex;gap:8px}
.records-v30-service-actions button,.records-v30-service-actions a{
  border:0;text-decoration:none;padding:9px 12px;border-radius:12px;font-size:12px;font-weight:900;color:#fff;background:linear-gradient(135deg,#20c7d9,#1f75ff)
}
.records-v30-service-actions a{background:linear-gradient(135deg,#d9a441,#20c7d9)}
.records-v30-footer{display:flex;justify-content:space-between;align-items:center;margin-top:16px;color:#48617d}
.records-v30-empty{padding:26px;text-align:center;color:#5f7088}
@media(max-width:1180px){
  .records-v30-metrics{grid-template-columns:repeat(2,1fr)!important}
  .records-v30-toolbar{grid-template-columns:1fr 1fr}
  .records-v30-row-main{grid-template-columns:60px 1fr;align-items:start}
  .records-v30-pill,.records-v30-next,.records-v30-view,.records-v30-arrow,.records-v30-row-main>.badge-status{margin-left:78px}
}
@media(max-width:720px){
  .records-v30-content{padding:18px!important}
  .records-v30-metrics{grid-template-columns:1fr!important}
  .records-v30-toolbar{grid-template-columns:1fr}
  .records-v30-head{flex-direction:column;align-items:flex-start}
  .records-v30-service{grid-template-columns:1fr}
}


/* V32 - Logos en Ajustes integrado sin romper layout */
.settings-logo-panel{
  margin:22px 0;
  padding:22px;
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#f7fcff);
  border:1px solid rgba(14,116,144,.14);
  box-shadow:0 15px 42px rgba(14,116,144,.08);
}
.settings-logo-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:16px;
}
.settings-logo-head h2{
  margin:0;
  color:#102a43;
  font-size:24px;
}
.settings-logo-head p{
  margin:6px 0 0;
  color:#5f7088;
}
.settings-logo-badge{
  padding:8px 12px;
  border-radius:999px;
  color:#08758a;
  background:rgba(32,199,217,.12);
  border:1px solid rgba(32,199,217,.22);
  font-weight:900;
  font-size:12px;
}
.settings-logo-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}
.settings-logo-card{
  display:grid;
  grid-template-columns:58px 1fr;
  gap:12px;
  align-items:center;
  padding:16px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(14,116,144,.12);
}
.settings-logo-preview{
  width:54px;
  height:54px;
  border-radius:16px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:950;
  font-size:18px;
}
.settings-logo-info strong{
  display:block;
  color:#102a43;
  font-size:16px;
}
.settings-logo-info small{
  display:block;
  color:#5f7088;
  margin-top:3px;
}
.settings-logo-card input[type="file"]{
  grid-column:1 / -1;
  width:100%;
}
.settings-logo-card button{
  grid-column:1 / -1;
  border:0;
  border-radius:14px;
  padding:11px 14px;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  cursor:pointer;
}
.product-adobe{background:linear-gradient(135deg,#ff2b2b,#8b0000)}
.product-canva{background:linear-gradient(135deg,#00c4cc,#7d2ae8)}
.product-capcut{background:linear-gradient(135deg,#111827,#4b5563)}
.product-office{background:linear-gradient(135deg,#f97316,#dc2626)}
@media(max-width:720px){
  .settings-logo-head{flex-direction:column}
}

.product-mini-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  display:block;
}


/* V33 - Ajustes legibles, edición en listas y cliente inteligente */
.inline-alert{
  background:#e8fff2 !important;
  border:1px solid #9ee6bd !important;
  color:#0f5132 !important;
  box-shadow:0 10px 28px rgba(22,163,74,.08);
}
.inline-alert.error{
  background:#fff1f2 !important;
  border-color:#fecdd3 !important;
  color:#991b1b !important;
}
.toast.success{
  background:#ffffff !important;
  border-color:#9ee6bd !important;
  color:#102a43 !important;
}
.toast.success strong{color:#15803d !important}
.toast.success span{color:#334155 !important}
.item-icon img,
.settings-logo-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  display:block;
}
.edit-setting-form{display:grid;gap:10px;}
.edit-setting-form input,
.edit-setting-form select,
.edit-setting-form textarea,
.compact-edit-form input{
  width:100%;
  min-height:40px;
  border-radius:12px;
  border:1px solid rgba(14,116,144,.16);
  background:rgba(255,255,255,.88);
  color:#102a43;
  padding:0 12px;
  font-weight:700;
}
.edit-setting-form textarea{min-height:64px;padding:10px 12px;resize:vertical;}
.inline-edit-actions{display:flex;justify-content:flex-start;}
.mini-save{
  border:0;
  border-radius:12px;
  padding:9px 13px;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  cursor:pointer;
}
.item-actions-stack{display:grid;gap:8px;min-width:120px;}
.mini-logo-upload label{
  display:block;
  text-align:center;
  border-radius:12px;
  padding:9px 10px;
  color:#08758a;
  background:rgba(32,199,217,.12);
  border:1px solid rgba(32,199,217,.22);
  font-weight:900;
  cursor:pointer;
}
.mini-logo-upload input{display:none;}
.editable-compact,
.editable-channel-card,
.status-edit-chip{display:flex !important;align-items:center;gap:8px;}
.compact-edit-form{flex:1;display:flex;gap:8px;align-items:center;}
.compact-edit-form input{min-width:0;}
.status-edit-chip{
  padding:7px;
  border-radius:999px;
  background:rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.22);
}
.settings-logo-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) !important;}
.settings-logo-preview.product-generic{background:linear-gradient(135deg,#20c7d9,#1f75ff);}
.product-mini-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  display:block;
}
@media(max-width:760px){
  .settings-item{grid-template-columns:44px 1fr !important;}
  .item-actions-stack{grid-column:1 / -1;}
}


/* V36 - Footer PRO sin tocar formulario */
.system-footer-pro{
  margin:28px 0 0;
  padding:24px 28px;
  border-top:1px solid rgba(14,116,144,.12);
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(30,41,59,.98));
  color:#fff;
  border-radius:24px;
}
.system-footer-brand{display:grid;gap:6px}
.system-footer-brand strong{font-size:18px}
.system-footer-brand span{color:#b7c8e4}
.system-footer-meta{display:flex;gap:10px;flex-wrap:wrap}
.system-footer-meta span{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  font-weight:800;
  color:#dff7ff;
}
@media(max-width:760px){
  .system-footer-pro{flex-direction:column;align-items:flex-start}
}


/* V38 - Dashboard Ultra PRO */
.dashboard-v38{
  padding:28px 28px 0 !important;
  background:
    radial-gradient(circle at 18% 10%, rgba(32,199,217,.20), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(217,164,65,.16), transparent 27%),
    linear-gradient(180deg,#f9fdff 0%,#eef9ff 58%,#f8fdff 100%);
}
.v38-topbar{
  backdrop-filter:blur(18px);
  background:rgba(255,255,255,.84) !important;
}
.v38-hero{
  position:relative;
  overflow:hidden;
  min-height:210px;
  padding:30px;
  border-radius:34px;
  display:flex;
  justify-content:space-between;
  gap:22px;
  align-items:flex-start;
  color:#fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(32,199,217,.35), transparent 24%),
    radial-gradient(circle at 82% 0%, rgba(217,164,65,.28), transparent 28%),
    linear-gradient(135deg,#0b1220,#152238 58%,#0e7490);
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  margin-bottom:18px;
}
.v38-hero::after{
  content:"";
  position:absolute;
  inset:auto -80px -120px auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:rgba(255,255,255,.09);
}
.v38-badge{
  width:max-content;
  padding:9px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  color:#dff7ff;
  font-weight:900;
  margin-bottom:18px;
}
.v38-hero h1{
  margin:0;
  font-size:42px;
  line-height:1;
  letter-spacing:-.055em;
}
.v38-hero p{
  color:#cde7f5;
  margin:12px 0 0;
  font-size:16px;
}
.v38-hero-stats{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
}
.v38-hero-stats div{
  min-width:160px;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.15);
}
.v38-hero-stats span{
  display:block;
  color:#a9c7d9;
  font-size:12px;
  font-weight:800;
}
.v38-hero-stats b{
  display:block;
  margin-top:6px;
  color:#fff;
  font-size:15px;
}
.v38-hero-right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  position:relative;
  z-index:2;
}
.v38-alert-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
  margin-bottom:16px;
}
.v38-alert{
  padding:15px 18px;
  border-radius:20px;
  font-weight:850;
  background:#fff;
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 12px 30px rgba(14,116,144,.07);
}
.v38-alert.success{background:#ecfdf5;color:#047857;border-color:#bbf7d0}
.v38-alert.warning{background:#fff7ed;color:#9a3412;border-color:#fed7aa}
.v38-alert.danger{background:#fff1f2;color:#991b1b;border-color:#fecdd3}
.v38-alert.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.v38-kpi-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(145px,1fr));
  gap:14px;
  margin-bottom:18px;
}
.v38-kpi{
  min-height:132px;
  padding:18px;
  border-radius:26px;
  display:flex;
  align-items:flex-start;
  gap:14px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 18px 45px rgba(14,116,144,.08);
  transition:.22s ease;
}
.v38-kpi:hover{transform:translateY(-3px);box-shadow:0 24px 55px rgba(14,116,144,.12)}
.v38-kpi span{display:block;color:#59708c;font-weight:900;margin-bottom:8px}
.v38-kpi strong{display:block;color:#102a43;font-size:31px;line-height:1;letter-spacing:-.04em}
.v38-kpi small{display:block;color:#60758f;margin-top:10px}
.kpi-icon{
  min-width:44px;width:44px;height:44px;border-radius:16px;
  display:grid;place-items:center;color:#fff;font-weight:950;
}
.kpi-icon.blue{background:linear-gradient(135deg,#20c7d9,#1f75ff)}
.kpi-icon.green{background:linear-gradient(135deg,#22c55e,#16a34a)}
.kpi-icon.amber{background:linear-gradient(135deg,#f59e0b,#d97706)}
.kpi-icon.red{background:linear-gradient(135deg,#fb7185,#ef4444)}
.kpi-icon.gold{background:linear-gradient(135deg,#d9a441,#f59e0b)}
.kpi-icon.teal{background:linear-gradient(135deg,#10b981,#14b8a6)}
.v38-layout{
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:18px;
}
.v38-card{
  padding:22px;
  border-radius:28px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 18px 50px rgba(14,116,144,.08);
  overflow:hidden;
}
.v38-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.v38-card-head h2{margin:0;color:#102a43;font-size:23px;letter-spacing:-.04em}
.v38-card-head p{margin:6px 0 0;color:#60758f}
.v38-soft-btn,.v38-chip{
  border:1px solid rgba(32,199,217,.24);
  background:rgba(32,199,217,.10);
  color:#08758a;
  padding:11px 14px;
  border-radius:16px;
  font-weight:950;
}
.v38-chip.green{background:#ecfdf5;color:#047857;border-color:#bbf7d0}
.v38-products-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
}
.v38-product{
  padding:15px;
  border-radius:21px;
  background:#fff;
  border:1px solid rgba(14,116,144,.12);
  transition:.22s ease;
  cursor:pointer;
}
.v38-product:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(14,116,144,.10)}
.v38-product-top{
  display:grid;
  grid-template-columns:42px 1fr auto;
  align-items:center;
  gap:12px;
}
.v38-product-top strong{display:block;color:#102a43;font-size:15px}
.v38-product-top span{display:block;color:#60758f;font-size:12px;margin-top:3px}
.v38-product-top b{font-size:26px;color:#102a43}
.v38-progress{height:9px;border-radius:999px;background:#e8f6fb;margin:14px 0 9px;overflow:hidden}
.v38-progress i{height:100%;display:block;border-radius:999px;background:linear-gradient(135deg,#20c7d9,#1f75ff)}
.v38-product small{font-weight:900;color:#60758f}
.v38-health-meter{
  --health:0%;
  width:205px;height:205px;border-radius:50%;
  margin:8px auto 24px;
  display:grid;place-items:center;
  background:conic-gradient(#20c7d9 var(--health), #e6f4fb 0);
  box-shadow:inset 0 0 30px rgba(32,199,217,.10);
}
.v38-health-meter>div{
  width:142px;height:142px;border-radius:50%;
  background:#fff;display:grid;place-items:center;text-align:center;
  border:1px solid rgba(14,116,144,.10);
}
.v38-health-meter strong{font-size:38px;color:#102a43;line-height:1}
.v38-health-meter span{color:#60758f;font-weight:900}
.v38-health-list{display:grid;gap:0}
.v38-health-list div{
  display:flex;justify-content:space-between;gap:12px;
  padding:12px 0;border-bottom:1px solid rgba(14,116,144,.10);
  color:#48617d;font-weight:850;
}
.v38-health-list b{color:#102a43}
.v38-bars{
  min-height:255px;
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:10px;
  align-items:end;
  padding-top:10px;
}
.v38-bar-item{
  display:grid;
  gap:8px;
  align-items:end;
  min-height:230px;
}
.v38-bar{
  height:190px;
  border-radius:999px;
  background:#eaf6fb;
  display:flex;
  align-items:end;
  overflow:hidden;
}
.v38-bar i{
  display:block;
  width:100%;
  border-radius:999px;
  background:linear-gradient(180deg,#1f75ff,#20c7d9);
}
.v38-bar-item span{
  text-align:center;
  color:#60758f;
  font-size:11px;
  font-weight:900;
}
.v38-warranty-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:14px;
}
.v38-warranty-grid div{
  padding:16px;border-radius:20px;border:1px solid rgba(14,116,144,.10)
}
.v38-warranty-grid span{display:block;color:#60758f;font-weight:900}
.v38-warranty-grid strong{display:block;font-size:31px;color:#102a43;margin-top:6px}
.v38-warranty-grid .good{background:#ecfdf5}
.v38-warranty-grid .warn{background:#fffbeb}
.v38-warranty-grid .bad{background:#fff1f2}
.v38-mini-list,.v38-calendar-list,.v38-activity-list,.v38-top-list{display:grid;gap:10px}
.v38-mini-row,.v38-cal-row,.v38-activity-row,.v38-top-row{
  padding:12px;
  border-radius:17px;
  background:#fff;
  border:1px solid rgba(14,116,144,.10);
}
.v38-mini-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#48617d;
  font-weight:850;
}
.v38-mini-row b{color:#102a43}
.v38-table-wrap{overflow:auto;border-radius:18px;border:1px solid rgba(14,116,144,.10)}
.v38-table{width:100%;border-collapse:collapse;background:#fff}
.v38-table th{background:#eafaff;color:#0f5872;font-size:12px;text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:13px}
.v38-table td{padding:13px;border-top:1px solid rgba(14,116,144,.10);color:#102a43;font-weight:750}
.v38-table tr{cursor:pointer}
.badge-status{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:82px;padding:7px 12px!important;border-radius:999px!important;font-weight:950!important;font-size:12px!important;border:1px solid transparent!important;
}
.status-active{background:rgba(34,197,94,.14)!important;color:#15803d!important;border-color:rgba(34,197,94,.26)!important}
.status-soon{background:rgba(59,130,246,.13)!important;color:#1d4ed8!important;border-color:rgba(59,130,246,.28)!important}
.status-danger,.status-expired{background:rgba(239,68,68,.13)!important;color:#b91c1c!important;border-color:rgba(239,68,68,.28)!important}
.v38-cal-row{
  display:grid;
  grid-template-columns:62px 1fr;
  gap:12px;
  align-items:center;
}
.v38-cal-row>div{
  width:54px;height:54px;border-radius:18px;display:grid;place-items:center;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;
}
.v38-cal-row strong{font-size:20px;line-height:1}
.v38-cal-row span{font-size:10px;font-weight:900}
.v38-cal-row p{margin:0;color:#102a43;font-weight:950}
.v38-cal-row small{display:block;color:#60758f;margin-top:4px}
.v38-activity-row,.v38-top-row{
  display:grid;
  grid-template-columns:40px 1fr auto;
  align-items:center;
  gap:12px;
}
.v38-activity-row strong,.v38-top-row strong{display:block;color:#102a43}
.v38-activity-row span,.v38-top-row span{display:block;color:#60758f;font-size:12px;margin-top:3px}
.v38-activity-row b,.v38-top-row b{color:#d79400}
.v38-avatar{
  width:40px;height:40px;border-radius:14px;display:grid;place-items:center;
  color:#fff;font-weight:950;background:linear-gradient(135deg,#20c7d9,#1f75ff);
}
.v38-actions-list{display:grid;gap:10px}
.v38-actions-list button{
  border:1px solid rgba(14,116,144,.12);
  background:#fff;
  color:#102a43;
  border-radius:17px;
  padding:15px 16px;
  text-align:left;
  font-weight:950;
  cursor:pointer;
  transition:.2s ease;
}
.v38-actions-list button:hover{transform:translateX(4px)}
.v38-actions-list button:first-child{
  color:#fff;background:linear-gradient(135deg,#20c7d9,#1f75ff);border:0;text-align:center;
}
.product-mini-icon{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  color:#fff;font-size:11px;font-weight:950;box-shadow:0 8px 18px rgba(15,23,42,.12);overflow:hidden;
}
.product-mini-icon img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.product-adobe{background:linear-gradient(135deg,#ff2b2b,#8b0000)}
.product-canva{background:linear-gradient(135deg,#00c4cc,#7d2ae8)}
.product-capcut{background:linear-gradient(135deg,#111827,#4b5563)}
.product-office{background:linear-gradient(135deg,#f97316,#dc2626)}
.product-generic{background:linear-gradient(135deg,#20c7d9,#1f75ff)}
.v38-empty{padding:18px;border-radius:16px;background:#fff;border:1px solid rgba(14,116,144,.10);color:#60758f;text-align:center}
.system-footer-pro{
  margin:28px 0 0;
  padding:24px 28px;
  border-top:1px solid rgba(14,116,144,.12);
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(30,41,59,.98));
  color:#fff;
  border-radius:24px 24px 0 0;
}
.system-footer-brand{display:grid;gap:6px}
.system-footer-brand strong{font-size:18px}
.system-footer-brand span{color:#b7c8e4}
.system-footer-meta{display:flex;gap:10px;flex-wrap:wrap}
.system-footer-meta span{
  padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);font-weight:800;color:#dff7ff;
}
@media(max-width:1320px){
  .v38-kpi-grid{grid-template-columns:repeat(3,1fr)}
  .v38-layout{grid-template-columns:1fr}
}
@media(max-width:780px){
  .dashboard-v38{padding:18px 16px 0!important}
  .v38-hero,.v38-card-head,.system-footer-pro{flex-direction:column;align-items:flex-start}
  .v38-kpi-grid,.v38-warranty-grid{grid-template-columns:1fr}
  .v38-bars{gap:5px}
  .v38-hero h1{font-size:32px}
}


/* V39 - Optimización visual sin cambiar diseño */
.dashboard-v38 *{
  scroll-behavior:auto !important;
}
.dashboard-v38{
  contain:layout paint style;
}
.v38-topbar{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  background:rgba(255,255,255,.96) !important;
}
.v38-card,
.v38-kpi,
.v38-product,
.v38-alert{
  box-shadow:0 8px 22px rgba(14,116,144,.06) !important;
}
.v38-hero{
  box-shadow:0 14px 38px rgba(15,23,42,.16) !important;
}
.v38-kpi,
.v38-product,
.v38-actions-list button{
  transition:none !important;
}
.v38-kpi:hover,
.v38-product:hover{
  transform:none !important;
  box-shadow:0 8px 22px rgba(14,116,144,.06) !important;
}
.v38-hero::after{
  display:none !important;
}
.v38-card{
  content-visibility:auto;
  contain-intrinsic-size:520px;
}
.v38-products .v38-card,
.v38-products,
.v38-health,
.v38-chart-card,
.v38-warranty,
.v38-renewals,
.v38-calendar,
.v38-activity,
.v38-top-clients,
.v38-actions{
  will-change:auto !important;
}
.v38-bar i,
.v38-progress i{
  transition:none !important;
}
.product-mini-icon{
  box-shadow:none !important;
}
.v38-table-wrap{
  overscroll-behavior:contain;
}
@media (prefers-reduced-motion: no-preference){
  .v38-card,
  .v38-kpi,
  .v38-product{
    animation:none !important;
  }
}


/* V40 - Optimización global + Cards KPI PRO alineadas */
*{
  scroll-behavior:auto !important;
}
html, body{
  text-rendering:optimizeSpeed;
}
.app,
.main,
.content{
  will-change:auto !important;
}
.topbar,
.v38-topbar{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  background:rgba(255,255,255,.97) !important;
}
.sidebar,
.topbar{
  contain:layout paint;
}
.card,
.form-card,
.settings-panel,
.v38-card,
.v38-kpi,
.v38-product,
.v38-alert,
.client-card,
.client-summary-card,
.product-row,
.settings-item{
  box-shadow:0 7px 18px rgba(14,116,144,.055) !important;
}
.v38-hero{
  box-shadow:0 12px 30px rgba(15,23,42,.15) !important;
}
.v38-hero::after{
  display:none !important;
}
.v38-card,
.settings-panel,
.form-card,
.client-card{
  content-visibility:auto;
  contain-intrinsic-size:520px;
}
.v38-kpi,
.v38-product,
.v38-actions-list button,
.nav a,
.btn,
button{
  transition:none !important;
}
.v38-kpi:hover,
.v38-product:hover,
.nav a:hover,
.btn:hover,
button:hover{
  transform:none !important;
}
.v38-progress i,
.v38-bar i{
  transition:none !important;
}
.product-mini-icon{
  box-shadow:none !important;
}

/* 6 cards superiores mejor alineadas */
.v38-kpi-grid{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:12px !important;
  align-items:stretch !important;
}
.v38-kpi{
  min-height:118px !important;
  padding:16px 16px !important;
  border-radius:24px !important;
  display:grid !important;
  grid-template-columns:46px minmax(0,1fr) !important;
  align-items:start !important;
  gap:13px !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,253,255,.96)) !important;
  border:1px solid rgba(14,116,144,.115) !important;
  overflow:hidden !important;
}
.v38-kpi .kpi-icon{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  border-radius:15px !important;
  margin-top:0 !important;
}
.v38-kpi div:last-child{
  min-width:0 !important;
  display:grid !important;
  align-content:start !important;
  gap:4px !important;
}
.v38-kpi span{
  margin:0 !important;
  color:#526982 !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.1 !important;
  max-width:100% !important;
}
.v38-kpi strong{
  font-size:30px !important;
  line-height:1.05 !important;
  letter-spacing:-.04em !important;
  color:#102a43 !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
.v38-kpi small{
  margin:0 !important;
  color:#60758f !important;
  font-size:12.5px !important;
  line-height:1.25 !important;
}
.v38-kpi.wide strong,
#mMoney{
  font-size:27px !important;
  line-height:1.05 !important;
  white-space:normal !important;
  word-break:normal !important;
}
.v38-kpi.wide span{
  max-width:120px !important;
}

/* Más fluidez en tablas y listas */
.v38-table-wrap,
.pro-table-wrap{
  overscroll-behavior:contain;
}
.v38-activity-list,
.v38-top-list,
.v38-calendar-list,
.v38-mini-list{
  contain:layout paint;
}

/* Formulario más liviano */
.form-layout,
.form-card,
.side-card,
.summary-card{
  box-shadow:0 7px 18px rgba(14,116,144,.055) !important;
}
.form-card,
.side-card,
.summary-card{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
input, select, textarea{
  transition:none !important;
}

@media(max-width:1420px){
  .v38-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media(max-width:880px){
  .v38-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:560px){
  .v38-kpi-grid{
    grid-template-columns:1fr !important;
  }
}


/* V41 - MODO ULTRA FAST GLOBAL
   Mantiene diseño, elimina fuentes de latencia: blur, content-visibility lazy jank, sombras grandes, hover transforms y repaints. */
:root{
  --fast-shadow: 0 2px 8px rgba(14,116,144,.045);
  --fast-border: rgba(14,116,144,.11);
}
*,
*::before,
*::after{
  animation:none !important;
  transition:none !important;
  scroll-behavior:auto !important;
  will-change:auto !important;
}
html,body{
  transform:none !important;
  filter:none !important;
  text-rendering:optimizeSpeed;
}
body,
.app,
.main,
.content,
.dashboard-v38{
  contain:none !important;
}
.topbar,
.v38-topbar,
.sidebar,
.card,
.form-card,
.side-card,
.summary-card,
.settings-panel,
.v38-card,
.v38-kpi,
.v38-product,
.v38-alert,
.client-card,
.product-row,
.settings-item{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  content-visibility:visible !important;
  contain:none !important;
}
.v38-hero::after,
.v38-hero::before,
.dashboard-v38::after,
.dashboard-v38::before,
.content::after,
.content::before{
  display:none !important;
}
.v38-card,
.v38-kpi,
.v38-product,
.v38-alert,
.form-card,
.side-card,
.summary-card,
.settings-panel,
.client-card,
.product-row,
.settings-item,
.quick,
.card{
  box-shadow:var(--fast-shadow) !important;
}
.v38-hero{
  box-shadow:0 4px 16px rgba(15,23,42,.12) !important;
  background:linear-gradient(135deg,#0b1220,#12364a 65%,#0e7490) !important;
}
.dashboard-v38{
  background:linear-gradient(180deg,#f9fdff 0%,#eef9ff 100%) !important;
}
.v38-kpi:hover,
.v38-product:hover,
.v38-actions-list button:hover,
.nav a:hover,
.btn:hover,
button:hover{
  transform:none !important;
  box-shadow:var(--fast-shadow) !important;
}

/* KPIs compactos, alineados y livianos */
.v38-kpi-grid{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:12px !important;
}
.v38-kpi{
  min-height:108px !important;
  padding:14px !important;
  border-radius:22px !important;
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) !important;
  align-items:start !important;
  gap:12px !important;
  background:#fff !important;
  border:1px solid var(--fast-border) !important;
}
.v38-kpi .kpi-icon{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  border-radius:14px !important;
}
.v38-kpi div:last-child{
  display:grid !important;
  gap:3px !important;
  min-width:0 !important;
}
.v38-kpi span{
  margin:0 !important;
  font-size:12.5px !important;
  line-height:1.05 !important;
  color:#526982 !important;
  font-weight:900 !important;
}
.v38-kpi strong{
  font-size:28px !important;
  line-height:1.05 !important;
  color:#102a43 !important;
  letter-spacing:-.035em !important;
  overflow-wrap:anywhere !important;
}
.v38-kpi small{
  margin:0 !important;
  font-size:12px !important;
  line-height:1.2 !important;
  color:#60758f !important;
}
#mMoney{
  font-size:25px !important;
  line-height:1.05 !important;
}

/* Gráfico y ring más livianos */
.v38-health-meter{
  box-shadow:none !important;
  background:conic-gradient(#20c7d9 var(--health), #e8f6fb 0) !important;
}
.v38-bar,
.v38-progress{
  box-shadow:none !important;
}
.v38-bar i,
.v38-progress i{
  background:#1f9df4 !important;
}

/* Inputs y tablas más rápidos */
input,select,textarea,button,a{
  transition:none !important;
}
.v38-table-wrap,
.pro-table-wrap,
.records-list,
.main{
  overscroll-behavior:contain;
}
.v38-activity-list,
.v38-top-list,
.v38-calendar-list,
.v38-mini-list,
.v38-products-grid{
  contain:none !important;
}

/* Sidebar y formulario: menos repintado */
.sidebar{
  background:#f8fcff !important;
  box-shadow:none !important;
}
.nav a{
  box-shadow:none !important;
}
.form-card,
.side-card,
.summary-card{
  background:#fff !important;
}

/* Evita selección accidental que a veces vuelve lento el drag/mouse */
.dashboard-v38 .v38-card-head,
.dashboard-v38 .v38-kpi,
.dashboard-v38 .v38-product,
.sidebar{
  user-select:none;
}

@media(max-width:1420px){
  .v38-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media(max-width:880px){
  .v38-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media(max-width:560px){
  .v38-kpi-grid{grid-template-columns:1fr !important;}
}


/* V42 - Dashboard fix: hero legible, KPIs pro y alertas clicables */
.v38-hero h1,
#greetingTitle{
  color:#ffffff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.28) !important;
  opacity:1 !important;
}
.v38-hero p,
#heroSubtitle{
  color:#e9f8ff !important;
  text-shadow:0 1px 4px rgba(0,0,0,.18) !important;
}

/* KPIs superiores: layout limpio, sin texto cortado */
.v38-kpi-grid{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:14px !important;
}
.v38-kpi{
  min-height:126px !important;
  padding:18px 16px !important;
  border-radius:24px !important;
  display:grid !important;
  grid-template-columns:46px 1fr !important;
  align-items:start !important;
  gap:14px !important;
  background:linear-gradient(180deg,#fff,#f8fdff) !important;
  border:1px solid rgba(14,116,144,.12) !important;
  box-shadow:0 8px 18px rgba(14,116,144,.055) !important;
  overflow:hidden !important;
}
.v38-kpi .kpi-icon{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  border-radius:15px !important;
  font-size:18px !important;
  line-height:1 !important;
}
.v38-kpi > div:last-child{
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  align-items:flex-start !important;
  gap:6px !important;
}
.v38-kpi span{
  display:block !important;
  margin:0 !important;
  color:#526982 !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.15 !important;
  white-space:normal !important;
}
.v38-kpi strong{
  display:block !important;
  margin:0 !important;
  color:#102a43 !important;
  font-size:30px !important;
  line-height:1 !important;
  letter-spacing:-.035em !important;
  white-space:normal !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
}
.v38-kpi small{
  display:block !important;
  margin:0 !important;
  color:#60758f !important;
  font-size:12.5px !important;
  line-height:1.22 !important;
  white-space:normal !important;
}
.v38-kpi.wide strong,
#mMoney{
  font-size:26px !important;
  line-height:1.02 !important;
}
.v38-kpi.wide span{
  max-width:130px !important;
}

/* Alertas ahora son botones limpios y rápidos */
.v38-alert-strip{
  align-items:stretch !important;
}
.v38-alert{
  width:100% !important;
  text-align:left !important;
  cursor:pointer !important;
  appearance:none !important;
  border-radius:18px !important;
  font-family:inherit !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  line-height:1.25 !important;
}
.v38-alert:hover{
  filter:brightness(.99) !important;
}
.v38-alert span{
  flex:0 0 auto !important;
}

/* Modal detalle alertas */
.dash-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
}
.dash-modal.show{
  display:block;
}
.dash-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.36);
}
.dash-modal-card{
  position:absolute;
  right:30px;
  top:92px;
  width:min(640px,calc(100vw - 40px));
  max-height:calc(100vh - 130px);
  overflow:auto;
  border-radius:26px;
  background:#fff;
  border:1px solid rgba(14,116,144,.14);
  box-shadow:0 24px 60px rgba(15,23,42,.22);
}
.dash-modal-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:20px;
  background:linear-gradient(180deg,#fff,#f7fdff);
  border-bottom:1px solid rgba(14,116,144,.10);
}
.dash-modal-head h3{
  margin:0;
  color:#102a43;
  font-size:24px;
  letter-spacing:-.04em;
}
.dash-modal-head p{
  margin:5px 0 0;
  color:#60758f;
}
.dash-modal-head button{
  width:38px;
  height:38px;
  border:0;
  border-radius:13px;
  background:#eff6ff;
  color:#102a43;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}
.dash-modal-body{
  padding:16px 20px 20px;
  display:grid;
  gap:10px;
}
.dash-detail-row{
  display:grid;
  grid-template-columns:42px 1fr auto;
  align-items:center;
  gap:12px;
  padding:13px;
  border-radius:18px;
  background:#f8fdff;
  border:1px solid rgba(14,116,144,.10);
}
.dash-detail-row strong{
  display:block;
  color:#102a43;
}
.dash-detail-row span{
  display:block;
  color:#526982;
  font-weight:800;
  font-size:13px;
}
.dash-detail-row small{
  display:block;
  color:#60758f;
  margin-top:2px;
  font-weight:750;
}
@media(max-width:1420px){
  .v38-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media(max-width:880px){
  .v38-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .dash-modal-card{right:20px;top:75px}
}
@media(max-width:560px){
  .v38-kpi-grid{grid-template-columns:1fr !important;}
  .dash-detail-row{grid-template-columns:42px 1fr}
  .dash-detail-row .badge-status{grid-column:2}
}


/* V43 - Modal alertas con acceso directo al registro */
.dash-detail-click{
  cursor:pointer;
}
.dash-detail-click:hover{
  background:#eefbff !important;
  border-color:rgba(32,199,217,.30) !important;
}
.dash-detail-actions{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.dash-detail-actions button,
.dash-detail-actions a{
  border:0;
  text-decoration:none;
  border-radius:12px;
  padding:9px 12px;
  font-weight:900;
  font-size:12px;
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  cursor:pointer;
  white-space:nowrap;
}
.dash-detail-actions a{
  background:linear-gradient(135deg,#d9a441,#20c7d9);
}
@media(max-width:620px){
  .dash-detail-row{
    grid-template-columns:42px 1fr !important;
  }
  .dash-detail-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
    padding-left:54px;
  }
}


/* V44 - KPI Cards Premium alineadas y limpias */
.v38-kpi-grid{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:stretch !important;
  margin-bottom:18px !important;
}
.v38-kpi{
  position:relative !important;
  min-height:128px !important;
  padding:18px 16px 16px !important;
  border-radius:26px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:12px !important;
  overflow:hidden !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(32,199,217,.11), transparent 38%),
    linear-gradient(180deg,#ffffff 0%,#f7fcff 100%) !important;
  border:1px solid rgba(14,116,144,.13) !important;
  box-shadow:0 10px 24px rgba(14,116,144,.075) !important;
}
.v38-kpi::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,#20c7d9,#1f75ff);
}
.v38-kpi .kpi-icon{
  position:absolute !important;
  right:14px !important;
  top:14px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:16px !important;
  display:grid !important;
  place-items:center !important;
  color:#fff !important;
  font-size:18px !important;
  line-height:1 !important;
  font-weight:950 !important;
}
.v38-kpi > div:last-child{
  width:100% !important;
  min-width:0 !important;
  display:grid !important;
  grid-template-rows:auto auto auto !important;
  align-content:start !important;
  justify-items:start !important;
  gap:7px !important;
  padding-right:52px !important;
}
.v38-kpi span{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  color:#4f6681 !important;
  font-size:13px !important;
  line-height:1.15 !important;
  font-weight:950 !important;
  letter-spacing:-.01em !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.v38-kpi strong{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  color:#0d2945 !important;
  font-size:32px !important;
  line-height:.98 !important;
  font-weight:950 !important;
  letter-spacing:-.045em !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}
.v38-kpi small{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  color:#61758f !important;
  font-size:12.5px !important;
  line-height:1.22 !important;
  font-weight:750 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.v38-kpi.wide,
.v38-kpi:has(#mMoney){
  background:
    radial-gradient(circle at 100% 0%, rgba(217,164,65,.16), transparent 42%),
    linear-gradient(180deg,#fffefb 0%,#f8fdff 100%) !important;
}
.v38-kpi.wide::before,
.v38-kpi:has(#mMoney)::before{
  background:linear-gradient(90deg,#d9a441,#20c7d9);
}
.v38-kpi.wide > div:last-child,
.v38-kpi:has(#mMoney) > div:last-child{
  padding-right:48px !important;
}
#mMoney{
  font-size:29px !important;
  line-height:1 !important;
  letter-spacing:-.045em !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}
.kpi-icon.blue{background:linear-gradient(135deg,#20c7d9,#1f75ff) !important;}
.kpi-icon.green{background:linear-gradient(135deg,#22c55e,#16a34a) !important;}
.kpi-icon.amber{background:linear-gradient(135deg,#f59e0b,#d97706) !important;}
.kpi-icon.red{background:linear-gradient(135deg,#fb7185,#ef4444) !important;}
.kpi-icon.gold{background:linear-gradient(135deg,#d9a441,#f59e0b) !important;}
.kpi-icon.teal{background:linear-gradient(135deg,#10b981,#14b8a6) !important;}

@supports not selector(:has(*)){
  .v38-kpi:nth-child(5){
    background:
      radial-gradient(circle at 100% 0%, rgba(217,164,65,.16), transparent 42%),
      linear-gradient(180deg,#fffefb 0%,#f8fdff 100%) !important;
  }
  .v38-kpi:nth-child(5)::before{
    background:linear-gradient(90deg,#d9a441,#20c7d9);
  }
}

/* Más espacio visual entre alertas y KPIs */
.v38-alert-strip{
  margin-bottom:16px !important;
}
.v38-alert{
  min-height:52px !important;
  align-items:center !important;
}

/* Responsive limpio */
@media(max-width:1460px){
  .v38-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  .v38-kpi{
    min-height:118px !important;
  }
}
@media(max-width:900px){
  .v38-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:560px){
  .v38-kpi-grid{
    grid-template-columns:1fr !important;
  }
}


/* V49 - FIX REAL card Ingresos: limpio, alineado y sin monto partido */
.v38-kpi-grid{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:stretch !important;
}

.v38-kpi:nth-child(5),
.v38-kpi.wide{
  min-height:138px !important;
  padding:18px !important;
  border-radius:26px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(255,250,235,.98) 100%) !important;
  border:1px solid rgba(217,164,65,.28) !important;
  box-shadow:0 10px 24px rgba(217,164,65,.10) !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  overflow:hidden !important;
}

.v38-kpi:nth-child(5)::before,
.v38-kpi.wide::before{
  height:4px !important;
  background:linear-gradient(90deg,#d9a441,#20c7d9) !important;
}

.v38-kpi:nth-child(5) .kpi-icon,
.v38-kpi.wide .kpi-icon{
  position:absolute !important;
  right:16px !important;
  top:16px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:16px !important;
  margin:0 !important;
  background:linear-gradient(135deg,#d9a441,#f59e0b) !important;
}

.v38-kpi:nth-child(5) > div:last-child,
.v38-kpi.wide > div:last-child{
  width:100% !important;
  min-width:0 !important;
  padding-right:48px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:7px !important;
}

.v38-kpi:nth-child(5) span,
.v38-kpi.wide span{
  display:block !important;
  margin:0 !important;
  color:#72551a !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:950 !important;
  text-transform:uppercase !important;
  letter-spacing:.04em !important;
  max-width:100% !important;
  white-space:nowrap !important;
}

.v38-kpi:nth-child(5) strong,
.v38-kpi.wide strong,
#mMoney{
  display:block !important;
  margin:0 !important;
  color:#102a43 !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:950 !important;
  letter-spacing:-.035em !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
  max-width:100% !important;
}

.v38-kpi:nth-child(5) small,
.v38-kpi.wide small{
  display:block !important;
  margin:0 !important;
  color:#7a6a45 !important;
  font-size:12px !important;
  line-height:1.1 !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}

/* En pantallas más pequeñas, el card de ingresos toma más espacio para no romper el monto */
@media(max-width:1460px){
  .v38-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  .v38-kpi:nth-child(5),
  .v38-kpi.wide{
    grid-column:span 1 !important;
  }
  .v38-kpi:nth-child(5) strong,
  .v38-kpi.wide strong,
  #mMoney{
    font-size:28px !important;
  }
}

@media(max-width:900px){
  .v38-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:560px){
  .v38-kpi-grid{
    grid-template-columns:1fr !important;
  }
}
/* V50 - Reducir tamaÃ±o icono $ para no cubrir monto */
.v38-kpi:nth-child(5) .kpi-icon,
.v38-kpi.wide .kpi-icon{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    font-size:14px !important;
    top:10px !important;
    right:10px !important;
}

/* V61 - Filtros PRO por producto en Registros */
.records-product-tabs-wrap{
  margin:0 0 18px;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(240,253,255,.94));
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 10px 24px rgba(14,116,144,.055);
}
.records-product-tabs-wrap h3{
  margin:0;
  color:#102a43;
  font-size:18px;
  font-weight:950;
  letter-spacing:-.025em;
}
.records-product-tabs-wrap p{
  margin:5px 0 14px;
  color:#60758f;
  font-size:13px;
  font-weight:700;
}
.records-product-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.product-tab{
  border:1px solid rgba(14,116,144,.13);
  background:#fff;
  color:#102a43;
  border-radius:18px;
  padding:10px 12px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
  font-weight:900;
  min-height:48px;
  box-shadow:0 6px 14px rgba(15,23,42,.045);
}
.product-tab:hover{
  border-color:rgba(32,199,217,.45);
  transform:translateY(-1px);
}
.product-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  border-color:transparent;
  box-shadow:0 12px 24px rgba(31,117,255,.20);
}
.product-tab-icon{
  width:30px;
  height:30px;
  border-radius:11px;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:12px;
  font-weight:950;
  overflow:hidden;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
}
.product-tab-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.product-tab-icon.all{
  background:linear-gradient(135deg,#0ea5e9,#2563eb);
}
.product-tab b{
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#eef8ff;
  color:#0e7490;
  font-size:12px;
}
.product-tab.active b{
  background:rgba(255,255,255,.22);
  color:#fff;
}
@media(max-width:760px){
  .records-product-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .product-tab{
    width:100%;
    justify-content:flex-start;
  }
}
@media(max-width:460px){
  .records-product-tabs{
    grid-template-columns:1fr;
  }
}


/* V62 - Mostrar y activar tabs de producto */
.records-product-tabs-wrap{
  min-height:auto !important;
}
.records-product-tabs{
  min-height:52px !important;
}
.records-product-tabs:empty::after{
  content:"Cargando productos...";
  color:#60758f;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  height:44px;
}
.product-tab{
  user-select:none;
}


/* V64 - Filtro producto corregido y visible */
.records-filter-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.records-category-tabs,.records-product-tabs{display:flex;flex-wrap:wrap;gap:10px}
.records-category-tabs{margin-bottom:12px}
.category-tab{border:1px solid rgba(14,116,144,.14);background:#fff;color:#102a43;border-radius:15px;padding:10px 13px;font-weight:900;cursor:pointer;box-shadow:0 6px 14px rgba(15,23,42,.04)}
.category-tab.active{background:linear-gradient(135deg,#102a43,#0e7490);color:#fff;border-color:transparent}
.category-tab b{margin-left:6px;padding:2px 7px;border-radius:999px;background:#eef8ff;color:#0e7490;font-size:12px}
.category-tab.active b{background:rgba(255,255,255,.18);color:#fff}
.product-tab.reset{min-height:auto;padding:11px 16px;background:#fff;color:#0e7490}
.records-product-tabs:empty::after{content:"Cargando productos...";color:#60758f;font-weight:900;padding:14px 0}
@media(max-width:760px){.records-filter-head{flex-direction:column}.records-category-tabs,.records-product-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.records-category-tabs,.records-product-tabs{grid-template-columns:1fr}}


/* V66 - Filtro PRO directo por cliente en Registros */
.records-client-filter-wrap{
  margin:0 0 18px;
  padding:16px 18px;
  border-radius:22px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(245,250,255,.95));
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.records-client-filter-wrap h3{
  margin:0;
  color:#102a43;
  font-size:17px;
  font-weight:950;
  letter-spacing:-.02em;
}
.records-client-filter-wrap p{
  margin:5px 0 0;
  color:#60758f;
  font-size:13px;
  font-weight:700;
}
.records-client-filter-box{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:420px;
}
.records-client-filter-box select{
  width:100%;
  min-height:46px;
  border-radius:16px;
  border:1px solid rgba(14,116,144,.18);
  background:#fff;
  color:#102a43;
  font-weight:850;
  padding:0 14px;
  outline:none;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}
.records-client-filter-box select:focus{
  border-color:rgba(32,199,217,.55);
  box-shadow:0 0 0 4px rgba(32,199,217,.12);
}
@media(max-width:900px){
  .records-client-filter-wrap{flex-direction:column;align-items:stretch}
  .records-client-filter-box{min-width:0;width:100%;flex-direction:column;align-items:stretch}
  .records-client-filter-box .product-tab.reset{justify-content:center}
}


/* V70 Calendar + Clients PRO modules */
.pro-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:18px 0}
.pro-card{background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(241,251,255,.9));border:1px solid rgba(14,116,144,.14);border-radius:22px;box-shadow:0 18px 45px rgba(14,116,144,.09);padding:22px;color:#102a43}
.pro-card span{display:block;color:#5f7088;font-weight:800;margin-bottom:8px}.pro-card strong{font-size:34px;line-height:1;color:#102a43}.pro-card small{display:block;color:#6b7f99;margin-top:8px}
.pro-panel{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(238,251,255,.9));border:1px solid rgba(14,116,144,.14);border-radius:24px;box-shadow:0 20px 50px rgba(14,116,144,.10);padding:18px;margin-top:18px}
.pro-toolbar{display:grid;grid-template-columns:1.3fr .8fr .8fr auto;gap:12px;align-items:center;margin:14px 0}.pro-toolbar input,.pro-toolbar select{height:48px;border-radius:16px;padding:0 16px}
.calendar-shell{display:grid;grid-template-columns:1.4fr .8fr;gap:18px}.calendar-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.calendar-head h2{margin:0}.calendar-actions{display:flex;gap:8px}.calendar-actions button{height:42px;border-radius:14px;border:1px solid rgba(14,116,144,.16);background:#fff;color:#1d5877;font-weight:900;padding:0 14px}
.calendar-week,.calendar-days{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.calendar-week div{font-weight:900;color:#08758a;text-align:center;padding:8px}.day-cell{min-height:118px;background:rgba(255,255,255,.78);border:1px solid rgba(14,116,144,.13);border-radius:18px;padding:10px;position:relative;overflow:hidden}.day-cell.muted{opacity:.45}.day-cell.today{border-color:rgba(31,117,255,.55);box-shadow:0 0 0 4px rgba(31,117,255,.08)}.day-num{font-weight:950;color:#102a43}.day-count{position:absolute;top:8px;right:8px;background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;border-radius:999px;font-size:11px;font-weight:900;padding:4px 8px}.event-dot{display:block;margin-top:7px;padding:6px 8px;border-radius:12px;font-size:11px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(32,199,217,.12);border:1px solid rgba(32,199,217,.20);color:#075f73}.event-dot.expired{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.20);color:#b91c1c}.event-dot.soon,.event-dot.urgent{background:rgba(217,164,65,.16);border-color:rgba(217,164,65,.25);color:#8a5600}
.agenda-list{display:flex;flex-direction:column;gap:10px;max-height:680px;overflow:auto;padding-right:4px}.agenda-item,.client-pro-row{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;background:rgba(255,255,255,.78);border:1px solid rgba(14,116,144,.13);border-radius:20px;padding:14px}.agenda-date{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;display:grid;place-items:center;text-align:center;font-weight:950;box-shadow:0 12px 28px rgba(31,117,255,.18)}.agenda-date small{display:block;font-size:11px}.agenda-body b,.client-pro-main b{display:block;color:#102a43;font-size:16px}.agenda-body span,.client-pro-main span{display:block;color:#5f7088;font-size:13px;margin-top:4px}.agenda-note{font-size:12px;color:#31516b;margin-top:6px;background:rgba(32,199,217,.08);border-radius:12px;padding:7px 9px}.status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:8px 12px;font-weight:900;font-size:12px;background:rgba(20,184,111,.12);color:#087a4c;border:1px solid rgba(20,184,111,.2)}.status-pill.expired{background:rgba(239,68,68,.12);color:#c33030;border-color:rgba(239,68,68,.22)}.status-pill.soon,.status-pill.urgent{background:rgba(217,164,65,.16);color:#a66b00;border-color:rgba(217,164,65,.25)}
.clients-layout{display:grid;grid-template-columns:1fr;gap:14px}.client-pro-row{grid-template-columns:auto 1fr auto auto}.client-pro-avatar{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;display:grid;place-items:center;font-weight:950;font-size:18px}.client-products{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.client-products span{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:rgba(32,199,217,.10);border:1px solid rgba(32,199,217,.18);color:#08758a;font-weight:850;font-size:12px;padding:6px 9px}.client-actions{display:flex;gap:8px}.mini-btn{height:38px;border-radius:14px;border:1px solid rgba(14,116,144,.16);background:#fff;color:#1d5877;font-weight:900;padding:0 12px}.mini-btn.primary{background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;border:0}.client-detail-box{display:none;grid-column:1/-1;background:rgba(255,255,255,.64);border:1px solid rgba(14,116,144,.12);border-radius:18px;padding:12px;margin-top:8px}.client-pro-row.open .client-detail-box{display:block}.detail-table-pro{width:100%;border-collapse:separate;border-spacing:0 8px}.detail-table-pro td{padding:10px 12px;background:rgba(255,255,255,.74);border-top:1px solid rgba(14,116,144,.10);border-bottom:1px solid rgba(14,116,144,.10)}.detail-table-pro td:first-child{border-radius:14px 0 0 14px;border-left:1px solid rgba(14,116,144,.10);font-weight:900}.detail-table-pro td:last-child{border-radius:0 14px 14px 0;border-right:1px solid rgba(14,116,144,.10)}
@media(max-width:1000px){.pro-grid{grid-template-columns:repeat(2,1fr)}.calendar-shell{grid-template-columns:1fr}.pro-toolbar{grid-template-columns:1fr}.client-pro-row{grid-template-columns:auto 1fr}.client-actions{grid-column:1/-1}.day-cell{min-height:92px}}
@media(max-width:640px){.pro-grid{grid-template-columns:1fr}.calendar-week,.calendar-days{gap:4px}.day-cell{border-radius:12px;min-height:76px;padding:6px}.event-dot{display:none}.day-count{font-size:10px;padding:3px 6px}}

/* V71 Clientes + Calendario PRO refinado (sin tocar datos) */
.client-premium-card{
  position:relative;
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.client-premium-card:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,#20c7d9,#1f75ff);
  opacity:.75;
}
.client-premium-card:hover{
  transform:translateY(-2px);
  border-color:rgba(31,117,255,.24);
  box-shadow:0 18px 38px rgba(23,92,129,.10);
}
.client-pro-metrics{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;min-width:190px}
.metric-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:8px 12px;background:rgba(31,117,255,.10);border:1px solid rgba(31,117,255,.16);color:#0e3f73;font-weight:900;font-size:12px;white-space:nowrap}
.metric-chip.soft{background:rgba(32,199,217,.10);border-color:rgba(32,199,217,.18);color:#08758a}
.clients-pagination-pro{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding:14px 4px 2px;flex-wrap:wrap}
.pager-summary{color:#5f7088;font-weight:800;font-size:14px}.pager-summary b{color:#102a43}
.pager-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pager-buttons button{min-width:40px;height:40px;border-radius:14px;border:1px solid rgba(14,116,144,.16);background:rgba(255,255,255,.82);color:#1d5877;font-weight:950;cursor:pointer;box-shadow:0 10px 22px rgba(23,92,129,.06)}
.pager-buttons button.active{background:linear-gradient(135deg,#20c7d9,#1f75ff);color:#fff;border:0;box-shadow:0 12px 28px rgba(31,117,255,.18)}
.pager-buttons button:disabled{opacity:.45;cursor:not-allowed}.pager-dots{font-weight:900;color:#7a8ca3;padding:0 2px}
.calendar-hover-card{position:fixed;z-index:99999;width:min(360px,calc(100vw - 34px));pointer-events:none;opacity:0;transform:translateY(8px) scale(.98);transition:opacity .16s ease,transform .16s ease;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(14,116,144,.18);border-radius:20px;box-shadow:0 22px 60px rgba(15,52,83,.20);padding:14px;color:#102a43}
.calendar-hover-card.show{opacity:1;transform:translateY(0) scale(1)}
.calendar-hover-card .tip-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.calendar-hover-card .tip-top b{font-size:16px}.calendar-hover-card .tip-top span{border-radius:999px;background:rgba(32,199,217,.10);border:1px solid rgba(32,199,217,.18);color:#08758a;font-weight:900;font-size:12px;padding:6px 10px;white-space:nowrap}
.calendar-hover-card .tip-line{font-size:13px;color:#415c78;margin-top:6px}.calendar-hover-card .tip-line strong{color:#102a43}.calendar-hover-card .tip-note{margin-top:10px;border-radius:14px;background:linear-gradient(135deg,rgba(32,199,217,.10),rgba(31,117,255,.08));border:1px solid rgba(32,199,217,.15);padding:10px 12px;color:#254963;font-size:13px;line-height:1.35}
.event-dot,.agenda-note-hover{cursor:pointer;transition:transform .14s ease, box-shadow .14s ease}.event-dot:hover,.agenda-note-hover:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(23,92,129,.10)}
@media(max-width:1000px){.client-pro-metrics{grid-column:1/-1;justify-content:flex-start}.clients-pagination-pro{align-items:flex-start}.pager-buttons button{min-width:38px;height:38px}.calendar-hover-card{display:none}}


/* V72 - Clientes PRO premium UX/UI (solo diseño, sin datos) */
.clients-premium-panel{
  padding:20px;
  background:
    radial-gradient(circle at 14% 0%, rgba(32,199,217,.16), transparent 35%),
    radial-gradient(circle at 92% 8%, rgba(31,117,255,.13), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,252,255,.92));
}
.clients-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 4px 16px;
}
.clients-panel-head h2{margin:0;color:#102a43;font-size:22px;letter-spacing:-.03em;line-height:1.1}
.clients-panel-head p{margin:6px 0 0;color:#5f7088;font-weight:750;font-size:13px}
.clients-panel-head span{
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;padding:9px 13px;background:rgba(31,117,255,.10);
  color:#0e3f73;border:1px solid rgba(31,117,255,.16);font-weight:950;font-size:12px;white-space:nowrap;
}
.clients-pro-toolbar{
  margin:0 0 16px;
  padding:12px;
  border-radius:22px;
  background:rgba(255,255,255,.70);
  border:1px solid rgba(14,116,144,.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 12px 30px rgba(15,52,83,.05);
}
.clients-pro-toolbar input,.clients-pro-toolbar select{
  border:1px solid rgba(14,116,144,.14);
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 18px rgba(15,52,83,.04);
  color:#102a43;font-weight:850;outline:none;
}
.clients-pro-toolbar input:focus,.clients-pro-toolbar select:focus{
  border-color:rgba(31,117,255,.40);
  box-shadow:0 0 0 4px rgba(31,117,255,.10),0 10px 22px rgba(31,117,255,.06);
}
.clients-layout{gap:16px}
.client-pro-row.client-premium-card{
  display:grid;
  grid-template-columns:72px minmax(280px,1fr) auto auto auto;
  gap:16px;
  align-items:center;
  padding:18px 18px 18px 20px;
  border-radius:26px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.95),rgba(248,253,255,.88)),
    radial-gradient(circle at 0% 0%,rgba(32,199,217,.12),transparent 32%);
  border:1px solid rgba(14,116,144,.13);
  box-shadow:0 18px 44px rgba(15,52,83,.075);
  min-height:116px;
}
.client-pro-row.client-premium-card:before{width:5px;border-radius:26px 0 0 26px;opacity:.9}
.client-pro-row.client-premium-card:after{
  content:"";position:absolute;right:18px;top:16px;width:54px;height:54px;border-radius:999px;
  background:linear-gradient(135deg,rgba(32,199,217,.11),rgba(31,117,255,.08));
  filter:blur(.1px);pointer-events:none;
}
.client-pro-avatar{
  width:64px;height:64px;border-radius:22px;
  box-shadow:0 16px 32px rgba(31,117,255,.20), inset 0 1px 0 rgba(255,255,255,.35);
  font-size:20px;letter-spacing:-.04em;
}
.client-pro-main{min-width:0}
.client-pro-main b{font-size:18px;letter-spacing:-.025em;color:#0b2540;margin-bottom:2px}
.client-pro-main span{font-size:13px;color:#60748c;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}
.client-products{margin-top:10px;gap:7px}
.client-products span{
  padding:7px 10px;background:linear-gradient(135deg,rgba(32,199,217,.13),rgba(31,117,255,.07));
  border-color:rgba(32,199,217,.20);font-size:12px;color:#075f73;box-shadow:0 8px 18px rgba(32,199,217,.06);
}
.client-pro-metrics{min-width:unset;max-width:260px;justify-content:flex-end;position:relative;z-index:2}
.metric-chip{padding:9px 12px;box-shadow:0 10px 20px rgba(31,117,255,.06)}
.status-pill{position:relative;z-index:2;box-shadow:0 8px 18px rgba(20,184,111,.07)}
.client-actions{position:relative;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}
.mini-btn{height:40px;border-radius:15px;background:rgba(255,255,255,.92);box-shadow:0 10px 22px rgba(15,52,83,.055);cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.mini-btn:hover{transform:translateY(-1px);border-color:rgba(31,117,255,.26);box-shadow:0 14px 26px rgba(31,117,255,.10)}
.mini-btn.primary{box-shadow:0 14px 26px rgba(31,117,255,.18)}
.client-detail-box{
  margin-top:4px;padding:14px;border-radius:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.90),rgba(240,251,255,.78));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
.client-pro-row.open{border-color:rgba(31,117,255,.28);box-shadow:0 24px 60px rgba(31,117,255,.12)}
.client-pro-row.open .client-detail-box{animation:clientFadeIn .18s ease both}
@keyframes clientFadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.detail-table-pro{border-spacing:0 9px}
.detail-table-pro td{font-size:13px;color:#36506b;background:rgba(255,255,255,.88)}
.detail-table-pro td:first-child{color:#102a43}
.clients-pagination-pro{
  border-top:1px solid rgba(14,116,144,.10);
  padding:16px 2px 0;margin-top:18px;
}
@media(max-width:1240px){
  .client-pro-row.client-premium-card{grid-template-columns:72px minmax(220px,1fr) auto auto;}
  .client-actions{grid-column:2/-1;justify-content:flex-start}
}
@media(max-width:850px){
  .clients-panel-head{align-items:flex-start;flex-direction:column}
  .client-pro-row.client-premium-card{grid-template-columns:62px 1fr;gap:12px;padding:16px}
  .client-pro-metrics,.status-pill,.client-actions{grid-column:1/-1;justify-content:flex-start}
  .client-pro-avatar{width:58px;height:58px;border-radius:19px}
  .client-pro-main span{white-space:normal;max-width:none}
}

/* V73 - Clientes PRO Studio Premium (solo UI/código, sin tocar datos) */
.clients-premium-panel{
  padding:22px;
  background:
    radial-gradient(circle at 12% 8%, rgba(32,199,217,.18), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(31,117,255,.16), transparent 30%),
    linear-gradient(135deg, rgba(246,253,255,.98), rgba(255,255,255,.92));
  border-radius:30px;
}
.clients-panel-head{
  padding:8px 6px 18px;
}
.clients-panel-head h2{font-size:25px;letter-spacing:-.045em}
.clients-panel-head p{font-size:13px;color:#526b86}
.clients-panel-head span{
  background:linear-gradient(135deg,rgba(32,199,217,.18),rgba(31,117,255,.14));
  box-shadow:0 12px 26px rgba(31,117,255,.08);
}
.clients-pro-toolbar{
  border-radius:26px;
  padding:13px;
  background:rgba(255,255,255,.76);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.clients-layout{gap:18px}
.client-v73-card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:30px;
  padding:0;
  background:
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(244,252,255,.90));
  border:1px solid rgba(14,116,144,.13);
  box-shadow:0 22px 55px rgba(15,52,83,.085);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.client-v73-card:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:7px;
  background:linear-gradient(180deg,#15d5db,#1f75ff 55%,#7c3cff);
  border-radius:30px 0 0 30px;
}
.client-v73-card:after{
  content:"";
  position:absolute;
  right:-42px;
  top:-54px;
  width:170px;
  height:170px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(32,199,217,.18),rgba(31,117,255,.07),transparent 68%);
  pointer-events:none;
}
.client-v73-card:hover{
  transform:translateY(-3px);
  border-color:rgba(31,117,255,.28);
  box-shadow:0 30px 72px rgba(31,117,255,.13);
}
.client-v73-top{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:74px minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:20px 22px 12px 24px;
}
.client-v73-avatar{
  width:70px;
  height:70px;
  border-radius:25px;
  display:grid;
  place-items:center;
  background:
    linear-gradient(135deg,#18c7d8,#207bff 70%);
  box-shadow:0 18px 38px rgba(31,117,255,.22), inset 0 1px 0 rgba(255,255,255,.42);
}
.client-v73-avatar span{color:#fff;font-size:22px;font-weight:1000;letter-spacing:-.04em}
.client-v73-info{min-width:0}
.client-v73-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.client-v73-title h3{margin:0;color:#0b2540;font-size:20px;line-height:1.05;letter-spacing:-.04em}
.client-v73-info p{margin:7px 0 0;color:#60748c;font-weight:750;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:620px}
.client-v73-products{margin-top:12px}
.client-v73-stats{display:flex;gap:10px;align-items:center;justify-content:flex-end}
.client-v73-stats div{
  min-width:88px;
  border-radius:20px;
  padding:12px 14px;
  background:rgba(255,255,255,.80);
  border:1px solid rgba(14,116,144,.12);
  box-shadow:0 12px 26px rgba(15,52,83,.055);
  text-align:center;
}
.client-v73-stats strong{display:block;color:#0b2540;font-size:22px;line-height:1;font-weight:1000;letter-spacing:-.04em}
.client-v73-stats small{display:block;margin-top:5px;color:#60748c;font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.02em}
.client-v73-bottom{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 18px 18px 24px;
  padding:13px 14px 13px 18px;
  border-radius:22px;
  background:linear-gradient(135deg,rgba(32,199,217,.08),rgba(31,117,255,.06));
  border:1px solid rgba(14,116,144,.10);
}
.client-v73-next span{display:block;color:#60748c;font-size:11px;font-weight:1000;text-transform:uppercase;letter-spacing:.04em}
.client-v73-next b{display:block;margin-top:3px;color:#0b2540;font-size:14px;font-weight:950}
.client-v73-card .client-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;position:relative;z-index:3}
.client-v73-card .mini-btn{height:42px;border-radius:16px;padding:0 15px}
.client-v73-card .mini-btn.primary{background:linear-gradient(135deg,#15c8dc,#1f75ff);box-shadow:0 16px 32px rgba(31,117,255,.20)}
.client-v73-details{margin:0 18px 18px 24px;border-radius:24px;background:rgba(255,255,255,.86)}
.client-v73-card.open{border-color:rgba(31,117,255,.34)}
.client-v73-card.open .client-v73-bottom{background:linear-gradient(135deg,rgba(32,199,217,.14),rgba(31,117,255,.10))}
.detail-table-pro td{vertical-align:middle}
@media(max-width:1050px){
  .client-v73-top{grid-template-columns:74px 1fr;align-items:start}
  .client-v73-stats{grid-column:1/-1;justify-content:flex-start;padding-left:88px}
}
@media(max-width:760px){
  .clients-premium-panel{padding:16px;border-radius:24px}
  .client-v73-top{grid-template-columns:58px 1fr;gap:12px;padding:16px 16px 10px 18px}
  .client-v73-avatar{width:56px;height:56px;border-radius:20px}.client-v73-avatar span{font-size:18px}
  .client-v73-title h3{font-size:17px}.client-v73-info p{white-space:normal;max-width:none}
  .client-v73-stats{padding-left:0}.client-v73-bottom{margin:0 14px 14px 18px;flex-direction:column;align-items:stretch}
  .client-v73-card .client-actions{justify-content:flex-start;flex-wrap:wrap}
}

/* V52 - Dashboard USD/HNL live converter */
.v52-hero-tools{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:16px;
  min-width:280px;
}
.v52-hero-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}
.v52-dollar-widget{
  width:300px;
  border:1px solid rgba(255,255,255,.24);
  background:linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  border-radius:24px;
  padding:16px;
  color:#fff;
  box-shadow:0 20px 45px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.20);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.v52-dollar-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:13px;
}
.v52-dollar-head span{
  display:block;
  font-weight:900;
  font-size:13px;
  color:rgba(255,255,255,.86);
  letter-spacing:.02em;
}
.v52-dollar-head strong{
  display:block;
  margin-top:4px;
  font-size:18px;
  line-height:1.1;
}
.v52-dollar-head small{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:rgba(34,197,94,.18);
  border:1px solid rgba(134,239,172,.45);
  color:#bbf7d0;
  font-size:10px;
  font-weight:1000;
}
.v52-dollar-head small:before{
  content:'';
  width:7px;
  height:7px;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 0 5px rgba(34,197,94,.16);
}
.v52-dollar-head small.offline{
  background:rgba(251,191,36,.14);
  border-color:rgba(251,191,36,.35);
  color:#fde68a;
}
.v52-dollar-head small.offline:before{background:#f59e0b;box-shadow:0 0 0 5px rgba(245,158,11,.16);}
.v52-dollar-row{
  display:grid;
  grid-template-columns:52px 1fr;
  align-items:center;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.14);
  border-radius:16px;
  overflow:hidden;
}
.v52-dollar-row label{
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  font-size:12px;
  color:#dff7ff;
  border-right:1px solid rgba(255,255,255,.16);
}
.v52-dollar-row input{
  height:44px;
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font-size:18px;
  font-weight:1000;
  padding:0 13px;
}
.v52-dollar-row input::placeholder{color:rgba(255,255,255,.50);}
.v52-dollar-result{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(2,132,199,.22);
  border:1px solid rgba(125,211,252,.26);
}
.v52-dollar-result span{font-size:12px;font-weight:800;color:rgba(255,255,255,.76);}
.v52-dollar-result b{font-size:20px;line-height:1;color:#fff;}
.v52-dollar-widget p{
  margin:10px 2px 0;
  font-size:11px;
  color:rgba(255,255,255,.68);
  font-weight:700;
}
@media (max-width: 980px){
  .v38-hero{align-items:stretch;}
  .v52-hero-tools{align-items:stretch;min-width:0;width:100%;}
  .v52-hero-actions{justify-content:flex-start;}
  .v52-dollar-widget{width:auto;}
}

/* v78 Finanzas PRO: gráfico mensual premium */
.v78-finance-card{overflow:hidden;position:relative;}
.v78-finance-card::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 18% 8%, rgba(32,199,217,.14), transparent 34%),
             radial-gradient(circle at 82% 22%, rgba(31,117,255,.10), transparent 35%);
}
.v78-finance-head{position:relative;z-index:2;}
.v78-finance-pro{position:relative;z-index:2;display:grid;gap:18px;padding-top:4px;}
.v78-finance-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.v78-finance-pill{
  background:rgba(255,255,255,.82);border:1px solid rgba(14,116,144,.11);
  border-radius:20px;padding:14px 16px;box-shadow:0 12px 28px rgba(15,60,100,.06);
  display:grid;gap:5px;min-height:74px;
}
.v78-finance-pill span{font-size:12px;font-weight:900;color:#5f7591;}
.v78-finance-pill strong{font-size:18px;font-weight:1000;color:#102a43;line-height:1.1;}
.v78-chart-wrap{
  background:linear-gradient(180deg, rgba(255,255,255,.86), rgba(247,253,255,.74));
  border:1px solid rgba(14,116,144,.10);border-radius:26px;padding:12px 14px 4px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 16px 38px rgba(15,60,100,.06);
}
.v78-chart{width:100%;height:300px;display:block;overflow:visible;}
.v78-grid{stroke:rgba(50,87,125,.15);stroke-width:1;stroke-dasharray:7 8;}
.v78-y{fill:#6a7f99;font-weight:900;font-size:12px;}
.v78-area{fill:url(#v78Area);}
.v78-line{fill:none;stroke:url(#v78Line);stroke-width:5;stroke-linecap:round;filter:url(#v78Glow);}
.v78-dot{fill:#1f75ff;stroke:#fff;stroke-width:5;filter:drop-shadow(0 7px 12px rgba(31,117,255,.28));transition:all .18s ease;}
.v78-dot-group:hover .v78-dot{r:10;fill:#20c7d9;}
.v78-value{fill:#102a43;font-size:13px;font-weight:1000;paint-order:stroke;stroke:#fff;stroke-width:5;stroke-linejoin:round;}
.v78-month{fill:#5f7591;font-size:13px;font-weight:1000;}
.v78-finance-foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:4px 4px 0;color:#60758f;font-size:12px;font-weight:900;
}
.v78-finance-foot b{padding:8px 12px;border-radius:999px;background:rgba(16,185,129,.10);color:#059669;}
.v78-finance-foot b.down{background:rgba(239,68,68,.10);color:#dc2626;}
@media (max-width: 980px){
  .v78-finance-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .v78-chart{height:260px;}
}
@media (max-width: 620px){
  .v78-finance-summary{grid-template-columns:1fr;}
  .v78-finance-pill{min-height:auto;}
}

/* ===== V90 Branding PRO: logo y favicon aplicables en todo el sistema ===== */
.brand-mark.brand-mark-dynamic{
  overflow:hidden !important;
  background:linear-gradient(135deg,#effcff,#eaf4ff) !important;
  border:1px solid rgba(32,199,217,.18) !important;
  color:#12304b !important;
}
.brand-mark.brand-mark-dynamic .brand-logo-img,
.brand-dot.brand-dot-dynamic .brand-logo-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  padding:5px;
}
.brand-mark.brand-mark-dynamic span,
.brand-dot.brand-dot-dynamic span{display:grid;place-items:center;width:100%;height:100%;}
.brand-dot.brand-dot-dynamic{
  overflow:hidden;
  background:linear-gradient(135deg,#effcff,#eaf4ff) !important;
  border:1px solid rgba(32,199,217,.25);
  color:#12304b !important;
}
.branding-panel-pro{
  margin-top:24px;
  overflow:hidden;
  position:relative;
  border:1px solid rgba(32,199,217,.16) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(32,199,217,.16), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(31,117,255,.10), transparent 34%),
    rgba(255,255,255,.88) !important;
}
.branding-head-pro{align-items:center;}
.branding-grid-pro{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.branding-card-pro{
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:28px;
  border:1px solid rgba(14,116,144,.13);
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(244,252,255,.84));
  box-shadow:0 20px 45px rgba(15,60,100,.08);
}
.branding-preview-pro{
  min-height:150px;
  border-radius:24px;
  display:grid;
  place-items:center;
  border:1px dashed rgba(31,117,255,.26);
  background:
    linear-gradient(45deg, rgba(31,117,255,.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(31,117,255,.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(31,117,255,.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(31,117,255,.045) 75%),
    rgba(255,255,255,.78);
  background-size:22px 22px;
  background-position:0 0,0 11px,11px -11px,-11px 0;
  overflow:hidden;
}
.branding-preview-pro img{
  max-width:88%;
  max-height:120px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 14px 20px rgba(15,60,100,.12));
}
.favicon-preview-pro{min-height:150px;}
.favicon-preview-pro img{max-width:76px;max-height:76px;}
.branding-empty-preview{
  width:74px;
  height:74px;
  border-radius:22px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:1000;
  font-size:26px;
  background:linear-gradient(135deg,#20c7d9,#1f75ff 70%,#d9a441);
  box-shadow:0 18px 38px rgba(31,117,255,.22);
}
.branding-info-pro{display:grid;gap:4px;}
.branding-info-pro strong{font-size:18px;color:#102a43;}
.branding-info-pro span{font-size:13px;font-weight:700;color:#5f7088;line-height:1.35;}
.branding-drop-pro{
  position:relative;
  cursor:pointer;
  display:grid;
  grid-template-columns:46px 1fr;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(32,199,217,.23);
  background:rgba(239,252,255,.76);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.branding-drop-pro:hover{
  transform:translateY(-1px);
  border-color:rgba(31,117,255,.38);
  box-shadow:0 14px 30px rgba(31,117,255,.10);
}
.branding-drop-pro input{position:absolute;inset:0;opacity:0;cursor:pointer;}
.branding-drop-pro .drop-icon{
  grid-row:1/3;
  width:46px;
  height:46px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#20c7d9,#1f75ff);
  color:#fff;
  font-size:22px;
  font-weight:1000;
}
.branding-drop-pro b{font-size:15px;color:#102a43;line-height:1;}
.branding-drop-pro small{font-size:12px;color:#627891;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.branding-save-pro{
  width:100%;
  min-height:48px;
  border-radius:18px !important;
  box-shadow:0 18px 34px rgba(31,117,255,.16) !important;
}
.branding-note-pro{
  margin-top:16px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(16,185,129,.10);
  border:1px solid rgba(16,185,129,.18);
  color:#0f766e;
  font-weight:800;
}
.branding-note-pro span{
  width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#10b981;color:#fff;font-weight:1000;flex:0 0 auto;
}
.branding-note-pro p{margin:0;font-size:13px;line-height:1.35;}
@media (max-width: 860px){
  .branding-grid-pro{grid-template-columns:1fr;}
  .branding-preview-pro{min-height:130px;}
}

/* ===== V91 Sidebar Logo Card PRO - solo logo, sin texto ===== */
.sidebar .brand{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
  width:100% !important;
  margin:0 0 22px 0 !important;
  padding:10px 8px 14px !important;
  border-bottom:1px solid rgba(16,93,142,.10) !important;
}
.sidebar .brand .brand-title{
  display:none !important;
}
.sidebar .brand-mark.brand-mark-dynamic{
  width:218px !important;
  height:86px !important;
  min-width:218px !important;
  border-radius:24px !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(135deg, #0b1730 0%, #123b65 48%, #081222 100%) !important;
  border:1px solid rgba(255,255,255,.20) !important;
  box-shadow:
    0 18px 36px rgba(10,25,55,.16),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  color:#fff !important;
}
.sidebar .brand-mark.brand-mark-dynamic .brand-logo-img{
  width:100% !important;
  height:100% !important;
  max-width:200px !important;
  max-height:72px !important;
  object-fit:contain !important;
  padding:10px 14px !important;
  display:block !important;
  filter:drop-shadow(0 8px 15px rgba(0,0,0,.28)) !important;
}
.sidebar .brand-mark.brand-mark-dynamic span{
  color:#fff !important;
  font-weight:900 !important;
  letter-spacing:.04em !important;
}
@media(max-width:1150px){
  .sidebar .brand-mark.brand-mark-dynamic{width:190px !important;min-width:190px !important;height:78px !important;}
}

/* ===== V92 Sidebar Logo Card Light Gradient + Clickable ===== */
.sidebar .brand.brand-home-link{
  text-decoration:none !important;
  cursor:pointer !important;
  transition:transform .22s ease, filter .22s ease !important;
}
.sidebar .brand.brand-home-link:hover{
  transform:translateY(-1px) !important;
  filter:saturate(1.05) !important;
}
.sidebar .brand-mark.brand-mark-dynamic{
  width:218px !important;
  height:88px !important;
  min-width:218px !important;
  border-radius:24px !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.98) 0%, rgba(255,255,255,.74) 38%, transparent 68%),
    linear-gradient(135deg, #ffffff 0%, #eaf8ff 34%, #dffcff 58%, #fff7de 100%) !important;
  border:1px solid rgba(32,184,218,.30) !important;
  box-shadow:
    0 16px 34px rgba(18,115,169,.13),
    0 5px 14px rgba(255,154,32,.08),
    inset 0 1px 0 rgba(255,255,255,.96) !important;
  position:relative !important;
}
.sidebar .brand-mark.brand-mark-dynamic::before{
  content:"" !important;
  position:absolute !important;
  inset:8px !important;
  border-radius:18px !important;
  background:linear-gradient(135deg, rgba(255,255,255,.68), rgba(255,255,255,.20)) !important;
  pointer-events:none !important;
}
.sidebar .brand-mark.brand-mark-dynamic::after{
  content:"" !important;
  position:absolute !important;
  left:18px !important;
  right:18px !important;
  bottom:10px !important;
  height:3px !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,#22c7df,#1d75ff,#ffb321) !important;
  opacity:.9 !important;
}
.sidebar .brand-mark.brand-mark-dynamic .brand-logo-img{
  position:relative !important;
  z-index:2 !important;
  max-width:196px !important;
  max-height:72px !important;
  padding:10px 12px !important;
  filter:drop-shadow(0 7px 12px rgba(13,59,104,.20)) !important;
}
.sidebar .brand.brand-home-link:active{
  transform:scale(.985) !important;
}
@media(max-width:1150px){
  .sidebar .brand-mark.brand-mark-dynamic{width:190px !important;min-width:190px !important;height:80px !important;}
}

/* ===== V93 Sidebar Logo Card Premium Gradient - mejor contraste para logo blanco ===== */
.sidebar .brand.brand-home-link{
  text-decoration:none !important;
  cursor:pointer !important;
  transition:transform .22s ease, filter .22s ease, box-shadow .22s ease !important;
}
.sidebar .brand.brand-home-link:hover{
  transform:translateY(-2px) !important;
  filter:saturate(1.08) brightness(1.03) !important;
}
.sidebar .brand .brand-title{display:none !important;}
.sidebar .brand-mark.brand-mark-dynamic{
  width:218px !important;
  min-width:218px !important;
  height:88px !important;
  border-radius:24px !important;
  background:
    radial-gradient(circle at 18% 14%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.08) 28%, transparent 56%),
    radial-gradient(circle at 84% 18%, rgba(34,211,238,.24) 0%, transparent 40%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #0891b2 100%) !important;
  border:1px solid rgba(255,255,255,.22) !important;
  box-shadow:
    0 18px 36px rgba(15,23,42,.18),
    0 8px 20px rgba(8,145,178,.12),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  position:relative !important;
  color:#fff !important;
}
.sidebar .brand-mark.brand-mark-dynamic::before{
  content:"" !important;
  position:absolute !important;
  inset:9px !important;
  border-radius:18px !important;
  background:linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.03)) !important;
  pointer-events:none !important;
}
.sidebar .brand-mark.brand-mark-dynamic::after{
  content:"" !important;
  position:absolute !important;
  inset:auto 18px 10px 18px !important;
  height:3px !important;
  border-radius:999px !important;
  background:linear-gradient(90deg, #38bdf8, #2563eb, #22d3ee) !important;
  opacity:.88 !important;
}
.sidebar .brand-mark.brand-mark-dynamic .brand-logo-img{
  position:relative !important;
  z-index:2 !important;
  width:100% !important;
  height:100% !important;
  max-width:200px !important;
  max-height:72px !important;
  object-fit:contain !important;
  padding:10px 14px !important;
  display:block !important;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.28)) !important;
}
.sidebar .brand-mark.brand-mark-dynamic span{
  position:relative !important;
  z-index:2 !important;
  color:#fff !important;
  font-weight:900 !important;
}
.sidebar .brand.brand-home-link:active{transform:scale(.985) !important;}
@media(max-width:1150px){
  .sidebar .brand-mark.brand-mark-dynamic{width:190px !important;min-width:190px !important;height:80px !important;}
}


/* Premium logo card */
.premium-brand{
display:flex;align-items:center;justify-content:center;
min-height:92px;padding:12px;margin:14px;
border-radius:22px;
background:linear-gradient(135deg,#0f172a 0%,#1e40af 55%,#06b6d4 100%);
box-shadow:0 12px 30px rgba(30,64,175,.25);
border:1px solid rgba(255,255,255,.12);
transition:.25s ease;
}
.premium-brand:hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(6,182,212,.25);}
.premium-brand .brand-mark-dynamic{
width:100%;height:68px;display:flex;align-items:center;justify-content:center;
}
.premium-brand .brand-mark-dynamic img{
max-height:62px!important;max-width:180px!important;width:auto!important;
object-fit:contain;
filter:drop-shadow(0 2px 8px rgba(255,255,255,.15));
}
#branding .branding-preview img,
.branding-preview img{max-width:220px;max-height:80px;}
.branding-favicon-preview img{max-width:64px;max-height:64px;}

/* V37_CLIENT_SELECTOR_NAME_PHONE_GROUP_FIX */
.field{position:relative}
.client-smart-chooser{display:none;position:absolute;left:0;right:0;top:100%;z-index:80;margin-top:8px;background:rgba(255,255,255,.96);backdrop-filter:blur(18px);border:1px solid rgba(29,178,220,.22);box-shadow:0 18px 45px rgba(12,45,80,.18);border-radius:22px;padding:12px;max-height:460px;overflow:auto}
.client-smart-chooser.show{display:block}
.client-choice-head{background:linear-gradient(135deg,rgba(36,192,232,.12),rgba(48,122,255,.08));border:1px solid rgba(31,178,220,.18);border-radius:16px;padding:12px 14px;margin-bottom:10px;color:#0b2945}
.client-choice-head b{display:block;font-size:14px;margin-bottom:2px}.client-choice-head span{display:block;font-size:12px;font-weight:800;color:#5a6d84;line-height:1.25}
.client-choice-card{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:12px;margin:10px 0;border-radius:18px;border:1px solid rgba(39,185,224,.22);background:linear-gradient(135deg,#fff,rgba(233,250,255,.84));box-shadow:0 10px 25px rgba(24,90,140,.08);cursor:pointer;transition:.18s ease}
.client-choice-card:hover{transform:translateY(-1px);border-color:rgba(41,144,255,.48);box-shadow:0 16px 34px rgba(24,90,140,.14)}
.client-choice-avatar{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#20c7dc,#286dff);color:#fff;font-weight:900;font-size:16px;box-shadow:0 8px 18px rgba(38,112,230,.2)}
.client-choice-info{min-width:0}.client-choice-info strong{display:block;font-size:14px;color:#09223e;margin-bottom:3px}.client-choice-info span{display:block;font-size:12px;color:#23415f;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.client-choice-info small{display:block;margin-top:3px;font-size:11px;color:#007a95;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-choice-use{border:0;border-radius:14px;background:linear-gradient(135deg,#1bb9dc,#246bff);color:#fff;font-size:12px;font-weight:900;padding:10px 12px;cursor:pointer;box-shadow:0 8px 20px rgba(35,118,255,.22)}
.client-choice-new{width:100%;border:0;border-radius:17px;padding:13px;margin-top:10px;background:linear-gradient(135deg,#24c56b,#246bff);color:#fff;font-weight:900;cursor:pointer;box-shadow:0 12px 25px rgba(35,118,255,.18)}
@media(max-width:760px){.client-choice-card{grid-template-columns:42px 1fr}.client-choice-use{grid-column:1/-1}.client-smart-chooser{position:fixed;left:14px;right:14px;top:120px;max-height:70vh}}

/* V70 - Selector inteligente de cliente PRO */
.client-smart-chooser{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:100%;
  z-index:120;
  margin-top:10px;
  padding:14px;
  max-height:520px;
  overflow:auto;
  border-radius:26px;
  border:1px solid rgba(32,199,217,.24);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(238,251,255,.96));
  box-shadow:0 24px 60px rgba(15,52,83,.18), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter:blur(18px);
}
.client-smart-chooser.show{display:block;animation:clientChooserIn .16s ease both}
@keyframes clientChooserIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.client-choice-head{
  margin-bottom:12px;
  padding:13px 15px;
  border-radius:18px;
  border:1px solid rgba(32,199,217,.18);
  background:linear-gradient(135deg,rgba(32,199,217,.13),rgba(31,117,255,.07));
  color:#0b2540;
}
.client-choice-head b{display:block;font-size:14px;font-weight:950;letter-spacing:-.02em;color:#0b2540;margin:0 0 3px}
.client-choice-head span{display:block;font-size:12px;font-weight:850;line-height:1.35;color:#516982}
.client-choice-card.client-choice-card-pro{
  display:grid;
  grid-template-columns:56px minmax(0,1fr) 118px;
  gap:14px;
  align-items:center;
  margin:10px 0;
  padding:14px;
  border-radius:22px;
  border:1px solid rgba(14,116,144,.14);
  background:
    radial-gradient(circle at 100% 0%,rgba(31,117,255,.08),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,253,255,.94));
  box-shadow:0 14px 34px rgba(15,52,83,.09);
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.client-choice-card.client-choice-card-pro:hover{
  transform:translateY(-2px);
  border-color:rgba(31,117,255,.34);
  box-shadow:0 18px 42px rgba(31,117,255,.13);
}
.client-choice-avatar{
  width:56px!important;
  height:56px!important;
  border-radius:20px!important;
  display:grid!important;
  place-items:center!important;
  color:#fff!important;
  font-size:18px!important;
  font-weight:950!important;
  letter-spacing:-.04em!important;
  background:linear-gradient(135deg,#20c7d9,#1f75ff)!important;
  box-shadow:0 14px 26px rgba(31,117,255,.22), inset 0 1px 0 rgba(255,255,255,.3)!important;
}
.client-choice-info{min-width:0!important}
.client-choice-title-row{display:flex;align-items:center;gap:8px;justify-content:space-between;margin-bottom:7px;min-width:0}
.client-choice-title-row strong,
.client-choice-info strong{font-size:16px!important;font-weight:950!important;letter-spacing:-.025em!important;color:#0b2540!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.client-choice-count{display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;padding:5px 9px!important;background:rgba(32,199,217,.12)!important;border:1px solid rgba(32,199,217,.20)!important;color:#08758a!important;font-size:11px!important;font-weight:950!important;white-space:nowrap!important}
.client-choice-meta-grid{display:grid;grid-template-columns:1fr;gap:4px;margin-bottom:5px}
.client-choice-meta,
.client-choice-info span{display:block!important;color:#34546f!important;font-size:12px!important;font-weight:850!important;line-height:1.35!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.client-choice-last,
.client-choice-info small{display:block!important;color:#007a95!important;font-size:11px!important;font-weight:950!important;line-height:1.3!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin-top:4px!important}
.client-choice-use{
  appearance:none!important;
  border:0!important;
  border-radius:16px!important;
  min-height:42px!important;
  padding:0 14px!important;
  background:linear-gradient(135deg,#20c7d9,#1f75ff)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:950!important;
  cursor:pointer!important;
  box-shadow:0 12px 24px rgba(31,117,255,.22)!important;
  transition:transform .15s ease,box-shadow .15s ease!important;
}
.client-choice-use:hover{transform:translateY(-1px)!important;box-shadow:0 16px 30px rgba(31,117,255,.28)!important}
.client-choice-new{
  width:100%!important;
  appearance:none!important;
  border:0!important;
  border-radius:18px!important;
  min-height:46px!important;
  margin-top:12px!important;
  padding:0 16px!important;
  background:linear-gradient(135deg,#21c66f,#1f75ff)!important;
  color:#fff!important;
  font-size:13px!important;
  font-weight:950!important;
  cursor:pointer!important;
  box-shadow:0 14px 28px rgba(31,117,255,.18)!important;
}
@media(max-width:760px){
  .client-smart-chooser{position:fixed;left:14px;right:14px;top:116px;max-height:72vh}
  .client-choice-card.client-choice-card-pro{grid-template-columns:48px 1fr;gap:12px}
  .client-choice-avatar{width:48px!important;height:48px!important;border-radius:17px!important}
  .client-choice-use{grid-column:1/-1;width:100%}
}

/* V71 - Selector cliente: tarjeta amplia legible */
.client-smart-chooser{
  width:min(680px, calc(100vw - 42px))!important;
  max-width:680px!important;
  right:auto!important;
  overflow-x:hidden!important;
}
.client-choice-card.client-choice-card-pro{
  grid-template-columns:64px minmax(0,1fr) 138px!important;
  gap:16px!important;
  padding:18px!important;
  align-items:center!important;
}
.client-choice-avatar{
  width:62px!important;
  height:62px!important;
  border-radius:22px!important;
  font-size:20px!important;
}
.client-choice-title-row{
  align-items:flex-start!important;
  gap:10px!important;
  margin-bottom:9px!important;
}
.client-choice-title-row strong,
.client-choice-info strong{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:18px!important;
  line-height:1.12!important;
  max-width:none!important;
}
.client-choice-count{
  flex:0 0 auto!important;
  padding:6px 10px!important;
  font-size:12px!important;
}
.client-choice-meta-grid{
  gap:5px!important;
  margin-bottom:7px!important;
}
.client-choice-meta,
.client-choice-info span,
.client-choice-last,
.client-choice-info small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:break-word!important;
  max-width:none!important;
}
.client-choice-meta,
.client-choice-info span{
  font-size:13px!important;
  line-height:1.35!important;
}
.client-choice-last,
.client-choice-info small{
  font-size:12px!important;
  line-height:1.35!important;
}
.client-choice-use{
  min-width:132px!important;
  min-height:46px!important;
  border-radius:18px!important;
  font-size:13px!important;
}
.client-choice-new{
  min-height:50px!important;
  border-radius:20px!important;
  font-size:14px!important;
}
@media(max-width:760px){
  .client-smart-chooser{width:auto!important;max-width:none!important;right:14px!important;}
  .client-choice-card.client-choice-card-pro{grid-template-columns:54px 1fr!important;}
  .client-choice-use{grid-column:1/-1!important;width:100%!important;}
}

/* V80 Settings - Login / Acceso */
.login-settings-panel{background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(235,251,255,.86))!important;border-color:rgba(45,212,191,.25)!important}
.login-settings-form .field label{font-weight:850;color:#43627f}
.login-preview-mini{
  display:flex;align-items:center;gap:14px;padding:15px;border-radius:20px;
  background:linear-gradient(135deg,#ffffff,#eefbff);
  border:1px solid rgba(14,165,233,.16);
  box-shadow:0 12px 32px rgba(14,165,233,.08);
}
.login-preview-logo{width:86px;height:58px;border-radius:18px;display:grid;place-items:center;overflow:hidden;background:#fff;border:1px solid rgba(14,165,233,.14)}
.login-preview-logo img{max-width:92%;max-height:80%;object-fit:contain;display:block}
.login-preview-mini strong{display:block;color:#0f2742;font-size:16px;line-height:1.1}
.login-preview-mini span{display:block;margin-top:4px;color:#60758d;font-size:12px;font-weight:750;line-height:1.35}
.settings-help-note{margin:12px 0 0;color:#5d758f;font-size:12px;font-weight:750;line-height:1.45}
#login-access select{color:#0f2742;background:#fff}
