/* Facewash del shell de min/ (sidebar + top bar + dashboard de Inicio), post-login.
   Convive con stylish-portfolio.css/marsCSS.css (vendor) en vez de tocarlos:
   este archivo se carga despues y sobre-escribe lo necesario. */

:root {
  --sh-purple: #5b3df0;
  --sh-blue: #2f6bff;
  --sh-gradient: linear-gradient(135deg, var(--sh-purple), var(--sh-blue));
  --sh-ink: #15172b;
  --sh-ink-soft: #4a4d63;
  --sh-muted: #868aa3;
  --sh-border: #e9eaf3;
  --sh-bg-soft: #f6f7fb;
  --sh-sidebar-w: 240px;
  --sh-topbar-h: 64px;
}

/* Font Awesome 5 solido SOLO para la clase .fas (modulos del dashboard, mismos iconos que
   la landing). No se carga solid.min.css porque tambien redefine .fa y rompe los iconos
   FA4 que usa el resto de min/. */
@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 900;
  font-display: auto;
  src: url(../../PortfolioFiles/fontawesome/webfonts/fa-solid-900.woff2) format("woff2"),
       url(../../PortfolioFiles/fontawesome/webfonts/fa-solid-900.woff) format("woff");
}
.fas { font-family: "Font Awesome 5 Free"; font-weight: 900; }

/* ---------- Sidebar ---------- */

#sidebar-wrapper {
  top: 0;
  bottom: 0;
  height: auto;
  width: 264px;
  left: -264px;
  background: #fff;
  border-right: 1px solid var(--sh-border);
  box-shadow: none;
  overflow-x: hidden;
}
#sidebar-wrapper.active {
  width: 264px;
  transform: translateX(264px);
  box-shadow: 10px 0 40px -14px rgba(20,20,60,.4);
}

#sidebar-wrapper .sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 264px;
  min-height: 100%;
  padding: 0 14px 18px;
}

#sidebar-wrapper .sidebar-brand {
  height: auto;
  line-height: normal;
  text-indent: 0;
  padding: 22px 8px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--sh-border);
}
#sidebar-wrapper .sidebar-brand a { display: block; }
#sidebar-wrapper .sidebar-brand a:hover { background: none; }
.sidebar-brand-logo { width: 136px; }

/* Boton cerrar */
#sidebar-wrapper #menu-close {
  position: absolute;
  top: 20px;
  right: 14px;
  margin: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--sh-bg-soft);
  border: 1px solid var(--sh-border);
  color: var(--sh-muted);
  font-size: 14px;
  box-shadow: none;
  z-index: 2;
  transition: background .15s ease, color .15s ease, transform .2s ease;
}
#sidebar-wrapper #menu-close:hover { background: #fdeaec; color: #de4f68; border-color: #f9d2d8; transform: rotate(90deg); }

/* Etiquetas de grupo */
#sidebar-wrapper .sb-label {
  list-style: none;
  text-indent: 0;
  line-height: 1;
  padding: 20px 12px 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: #a3a7ba;
}

/* Filas */
#sidebar-wrapper .sb-item { list-style: none; text-indent: 0; line-height: normal; margin-bottom: 4px; }
#sidebar-wrapper .sb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px 7px 8px;
  border-radius: 14px;
  color: var(--sh-ink-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-indent: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
#sidebar-wrapper .sb-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 15px;
  background: var(--card-icon-bg, #eef0f8);
  color: var(--card-icon, #6b6e85);
  transition: transform .2s ease, background .15s ease, color .15s ease;
}
#sidebar-wrapper .sb-link:hover { background: var(--sh-bg-soft); color: var(--sh-ink); transform: translateX(2px); }
#sidebar-wrapper .sb-link:hover .sb-ico { transform: scale(1.08) rotate(-5deg); }

/* Activo */
#sidebar-wrapper .sb-link.sb-active,
#sidebar-wrapper .sb-link.sb-active:hover {
  background: var(--sh-gradient);
  color: #fff;
  box-shadow: 0 14px 24px -14px rgba(91,61,240,.8);
  transform: none;
}
#sidebar-wrapper .sb-link.sb-active .sb-ico { background: rgba(255,255,255,.22); color: #fff; }

/* Insignias y candado */
#sidebar-wrapper .sb-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efeafe;
  color: var(--sh-purple);
}
#sidebar-wrapper .sb-active .sb-badge { background: rgba(255,255,255,.25); color: #fff; }
#sidebar-wrapper .sb-lock { margin-left: auto; font-size: 12px; color: #b4b8cb; }

/* Modulo no contratado */
#sidebar-wrapper .sb-link.sb-locked { color: #a3a7ba; cursor: not-allowed; }
#sidebar-wrapper .sb-link.sb-locked .sb-ico { background: #eef0f6; color: #b4b8cb; }
#sidebar-wrapper .sb-link.sb-locked:hover { background: transparent; transform: none; }
#sidebar-wrapper .sb-link.sb-locked:hover .sb-ico { transform: none; }

/* Submenu de Inventarios (se abre con transicion de alto) */
#sidebar-wrapper .sb-caret { margin-left: auto; font-size: 15px; color: var(--sh-muted); transition: transform .25s ease; }
#sidebar-wrapper .sb-open > .sb-link .sb-caret { transform: rotate(180deg); }
#sidebar-wrapper .sb-sub-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
#sidebar-wrapper .sb-open > .sb-sub-wrap { grid-template-rows: 1fr; }
#sidebar-wrapper .sb-sub {
  overflow: hidden;
  list-style: none;
  margin: 0 0 0 26px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--sh-border);
}
#sidebar-wrapper .sb-open > .sb-sub-wrap > .sb-sub { margin-top: 4px; margin-bottom: 6px; }
#sidebar-wrapper .sb-sub li { text-indent: 0; line-height: normal; margin: 2px 0; }
#sidebar-wrapper .sb-sub li a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .12s ease, color .12s ease, padding .15s ease;
}
#sidebar-wrapper .sb-sub li a:hover { background: var(--sh-bg-soft); color: var(--sh-ink); padding-left: 16px; }
#sidebar-wrapper .sb-sub li a.sidebar-active { background: #efeafe; color: var(--sh-purple); font-weight: 700; }

/* Pie: cerrar sesion */
#sidebar-wrapper .sb-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sh-border); }
#sidebar-wrapper .sb-danger .sb-ico { background: #fdeaec; color: #de4f68; }
#sidebar-wrapper .sb-danger:hover { background: #fdeaec; color: #de4f68; }

/* ---------- Top bar ---------- */

#top.app-topbar {
  position: fixed;
  top: 0;
  right: 0;
  /* left: lo define el bloque de media queries al final del archivo
     (0 en movil, el ancho del sidebar en escritorio). */
  height: var(--sh-topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--sh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f4fb;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  height: 44px;
  max-width: 360px;
  flex: 1;
  color: var(--sh-muted);
  cursor: text;
  transition: max-width .25s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.topbar-search:hover { background: #eceefa; border-color: #dcdffa; }
.topbar-search:focus-within {
  max-width: 480px;
  background: #fff;
  border-color: var(--sh-purple);
  box-shadow: 0 0 0 4px rgba(91,61,240,.12), 0 10px 24px -14px rgba(45,40,130,.35);
}
.topbar-search-icon { transition: color .15s ease, transform .2s ease; }
.topbar-search:hover .topbar-search-icon,
.topbar-search:focus-within .topbar-search-icon { color: var(--sh-purple); }
.topbar-search:focus-within .topbar-search-icon { transform: scale(1.12); }
.topbar-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 13.5px;
  width: 100%;
  color: var(--sh-ink);
}
.topbar-search input::placeholder { color: #9a9eb8; }
.topbar-kbd {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #9a9eb8;
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 6px;
  padding: 1px 7px;
  transition: opacity .15s ease;
}
.topbar-search:focus-within .topbar-kbd { opacity: 0; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-menu { position: relative; }

/* Campana */
.topbar-bell {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: #eef1ff;
  color: var(--sh-blue);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.topbar-bell:hover,
.topbar-bell.open { background: var(--sh-gradient); color: #fff; box-shadow: 0 10px 20px -10px rgba(91,61,240,.7); transform: translateY(-1px); }
.topbar-bell:hover .fa, .topbar-bell.open .fa { animation: bell-ring .6s ease; transform-origin: 50% 0; }
.topbar-bell-dot {
  position: absolute; top: 10px; right: 11px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff4d6a; border: 2px solid #eef1ff;
}
.topbar-bell:hover .topbar-bell-dot, .topbar-bell.open .topbar-bell-dot { border-color: var(--sh-purple); }
.topbar-bell .min-badge-bar { position: absolute; top: -6px; right: -6px; }
@keyframes bell-ring {
  0% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } 100% { transform: rotate(0); }
}

/* Usuario */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.topbar-user:hover, .topbar-user.open { background: #f3f4fb; border-color: #dcdffa; }
.topbar-user.open { box-shadow: 0 0 0 4px rgba(91,61,240,.1); }
.topbar-user-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sh-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex: none;
  box-shadow: 0 6px 14px -6px rgba(91,61,240,.7);
  transition: transform .2s ease;
}
.topbar-user:hover .topbar-user-avatar { transform: scale(1.06); }
.topbar-user-avatar.big { width: 46px; height: 46px; font-size: 19px; }
.topbar-user-online {
  position: absolute; right: 0; bottom: 0; width: 11px; height: 11px;
  border-radius: 50%; background: #22c55e; border: 2px solid #fff;
}
.topbar-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-user-info strong { font-size: 13px; font-weight: 700; color: var(--sh-ink); }
.topbar-user-info span { font-size: 11px; color: var(--sh-muted); }
.topbar-user-caret { color: var(--sh-muted); font-size: 14px; transition: transform .2s ease; }
.topbar-user.open .topbar-user-caret { transform: rotate(180deg); }

/* Paneles desplegables (busqueda, notificaciones, usuario) */
.topbar-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: 92vw;
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 18px;
  box-shadow: 0 24px 50px -18px rgba(30,27,90,.35);
  overflow: hidden;
  z-index: 950;
  animation: panel-in .16s ease;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.search-panel { left: 0; right: auto; width: 100%; min-width: 300px; display: none; }
.topbar-search:focus-within .search-panel { display: block; }
.panel-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 22px; text-align: center; }
.panel-empty i { font-size: 20px; color: var(--sh-purple); background: #efeafe; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.panel-empty strong { font-size: 14px; color: var(--sh-ink); }
.panel-empty span { font-size: 12.5px; color: var(--sh-muted); }

.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.panel-head strong { font-size: 15px; color: var(--sh-ink); }
.panel-head a { font-size: 12px; font-weight: 600; color: var(--sh-purple); }
.panel-foot { border-top: 1px solid var(--sh-border); text-align: center; padding: 12px; }
.panel-foot a { font-size: 13px; font-weight: 600; color: var(--sh-purple); }
.notif-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  color: var(--sh-ink); transition: background .12s ease; text-decoration: none;
}
.notif-item:hover { background: var(--sh-bg-soft); text-decoration: none; color: var(--sh-ink); }
.notif-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-icon-bg); color: var(--card-icon); font-size: 16px;
}
.notif-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.notif-body strong { font-size: 13px; font-weight: 700; }
.notif-body span { font-size: 12px; color: var(--sh-muted); }
.notif-time { font-size: 11px; color: #9a9eb8; flex: none; }

.user-panel { width: 260px; padding-bottom: 8px; }
.user-panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--sh-border); margin-bottom: 6px; }
.user-panel-head strong { display: block; font-size: 14px; color: var(--sh-ink); }
.user-panel-head span:not(.topbar-user-avatar) { font-size: 12px; color: var(--sh-muted); }
.user-item {
  display: flex; align-items: center; gap: 12px; margin: 0 8px; padding: 10px 12px;
  border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--sh-ink-soft); text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.user-item i { width: 18px; text-align: center; color: var(--sh-muted); transition: color .12s ease; }
.user-item em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--sh-purple); background: #efeafe; padding: 2px 8px; border-radius: 999px; }
.user-item:hover { background: var(--sh-bg-soft); color: var(--sh-ink); text-decoration: none; }
.user-item:hover i { color: var(--sh-purple); }
.user-item.danger:hover { background: #fdeaec; color: #de4f68; }
.user-item.danger:hover i { color: #de4f68; }

/* ---------- Dashboard de Inicio ---------- */

.dash-wrap { padding: 24px 28px 40px; max-width: 1400px; margin: 0 auto; }
.dash-greeting { font-size: 22px; font-weight: 700; color: var(--sh-ink); margin: 0 0 4px; }
.dash-subgreeting { color: var(--sh-muted); font-size: 13.5px; margin: 0 0 24px; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.dash-stat-card {
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 26px -20px rgba(45,40,130,.35);
  transition: box-shadow .15s ease, transform .15s ease;
}
.dash-stat-card:hover { box-shadow: 0 16px 30px -18px rgba(45,40,130,.4); transform: translateY(-2px); }
.dash-stat-label { font-size: 12.5px; color: var(--sh-muted); margin-bottom: 8px; }
.dash-stat-value { font-size: 30px; font-weight: 800; color: var(--sh-ink); }
.dash-stat-value small { font-size: 14px; font-weight: 600; color: var(--sh-muted); }
.dash-stat-placeholder { color: var(--sh-muted); font-size: 12.5px; margin-top: 4px; }

.dash-section-title { font-size: 15px; font-weight: 700; color: var(--sh-ink); margin: 0 0 14px; }

.dash-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.dash-module-tile {
  position: relative;
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--sh-ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.dash-module-tile:hover { box-shadow: 0 14px 30px -18px rgba(45,40,130,0.35); transform: translateY(-2px); color: var(--sh-ink); text-decoration: none; }
.dash-module-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-icon-bg, var(--sh-bg-soft)); color: var(--card-icon, var(--sh-purple)); font-size: 19px;
  margin-bottom: 4px;
}
.dash-module-tile h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--sh-ink); }
.dash-module-tile p { margin: 0; font-size: 12.5px; color: var(--sh-ink-soft); line-height: 1.45; }
.dash-module-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.8); color: var(--sh-ink-soft);
}

/* Paleta de la landing (landing.css), una por modulo */
.card-blue   { --card-bg: #e9f1ff; --card-icon: #3b63e0; --card-icon-bg: #d3e2ff; }
.card-green  { --card-bg: #e7f8f0; --card-icon: #1f9d6c; --card-icon-bg: #cdf0dd; }
.card-violet { --card-bg: #efeafe; --card-icon: #6c4cf0; --card-icon-bg: #ddd2fc; }
.card-orange { --card-bg: #fdf0e4; --card-icon: #e4823a; --card-icon-bg: #fbdcbd; }
.card-pink   { --card-bg: #fdeaec; --card-icon: #de4f68; --card-icon-bg: #f9d2d8; }
.card-yellow { --card-bg: #fdf6e1; --card-icon: #cc9a2e; --card-icon-bg: #f8e8b8; }
.card-purple { --card-bg: #f1ecfd; --card-icon: #7c53e8; --card-icon-bg: #ddd0fb; }
.card-coral  { --card-bg: #fdeee5; --card-icon: #e06a3e; --card-icon-bg: #fad9c4; }

/* Modulo no contratado: "apagado" (gris, sin hover, no navega) */
.dash-module-tile.is-off {
  --card-bg: #f1f2f6; --card-icon: #a3a7ba; --card-icon-bg: #e4e6ee;
  cursor: default;
}
.dash-module-tile.is-off:hover { box-shadow: none; transform: none; }
.dash-module-tile.is-off h4 { color: var(--sh-muted); }
.dash-module-tile.is-off p { color: #a3a7ba; }

/* ---------- Fiscal ---------- */

.fiscal-card {
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 14px;
  padding: 28px 32px 32px;
  text-align: left;
}
.fiscal-card-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .3px;
  color: var(--sh-ink-soft);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sh-border);
}
.fiscal-card-title strong { font-weight: 600; color: var(--sh-ink); }
.fiscal-card .listaRow { margin-bottom: 10px; padding: 14px 16px; }
.fiscal-new-btn { margin-top: 18px; }

/* Aviso de seguridad + contador de RFC, al pie de la tarjeta */
.fiscal-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--sh-bg-soft);
  border: 1px solid var(--sh-border);
  border-radius: 16px;
}
.fiscal-note-main { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.fiscal-note-ico {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #e7f8f0; color: #1f9d6c; font-size: 16px;
}
.fiscal-note-main p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--sh-ink-soft); }
.fiscal-note-main p strong { color: var(--sh-ink); }
.fiscal-note-count { flex: 0 0 210px; }
.fiscal-note-count-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.fiscal-note-count-top span { font-size: 11.5px; font-weight: 600; color: var(--sh-muted); }
.fiscal-note-count-top strong { font-size: 13px; color: var(--sh-ink); }
.fiscal-note-bar { height: 8px; border-radius: 999px; background: #e4e6f2; overflow: hidden; }
.fiscal-note-bar span { display: block; height: 100%; border-radius: 999px; background: var(--sh-gradient); transition: width .4s ease; }
.fiscal-note-count.full .fiscal-note-bar span { background: linear-gradient(135deg, #f59e0b, #f97316); }
@media (max-width: 575px) { .fiscal-note-count { flex: 1 1 100%; } }
@media (max-width: 767px) {
  .fiscal-card { padding: 20px 16px 24px; }
  .fiscal-new-btn { display: block; width: 100%; }
}
@media (min-width: 768px) {
  .fiscal-new-btn { width: auto; min-width: 220px; }
}

/* ---------- Banner demo: franja fija abajo, sin empujar ni tapar nada ---------- */

.demo-banner-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 800;
  pointer-events: none;
  border-bottom: none;
  border-top: 1px solid #f0dca0;
  font-size: 11px;
  padding: 4px 10px;
  line-height: 1.3;
}
body { padding-bottom: 28px; }

/* ---------- Tarjeta / formularios / tablas genericas ---------- */

.ui-card {
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 14px;
  padding: 28px 32px 32px;
  text-align: left;
}
.ui-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ui-card-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--sh-ink); }
.ui-section-title {
  margin: 28px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sh-ink);
}
.ui-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--sh-muted); }

/* .row tiene margin-left/right:0 !important global (marsCSS): se compensa el padding de las columnas */
.ui-card .row { margin-left: -15px !important; margin-right: -15px !important; }
.ui-card .form-group { margin-bottom: 18px; }
.ui-card label { font-size: 12.5px; font-weight: 600; color: var(--sh-ink-soft); margin-bottom: 6px; }
.ui-card .form-control {
  height: 42px;
  border: 1px solid var(--sh-border);
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  color: var(--sh-ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ui-card .form-control:focus { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }

.btn-ui {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--sh-gradient);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.btn-ui:hover { opacity: .92; color: #fff; }
.btn-ui[disabled] { opacity: .5; cursor: default; }
.btn-ui-ghost {
  border: 1px solid var(--sh-border);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  color: var(--sh-ink-soft);
  cursor: pointer;
}
.btn-ui-ghost:hover { background: var(--sh-bg-soft); color: var(--sh-ink); }
.btn-ui-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

.ui-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ui-table th {
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--sh-muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sh-border);
}
.ui-table td { padding: 14px 12px; border-bottom: 1px solid var(--sh-border); font-size: 14px; color: var(--sh-ink); vertical-align: middle; }
.ui-table tbody tr:hover td { background: var(--sh-bg-soft); }
.ui-table td.actions { text-align: right; white-space: nowrap; }
.ui-table td.actions .btn-ui-ghost { margin-left: 6px; }

.ui-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.ui-pill.ok   { background: #e7f8f0; color: #1f9d6c; }
.ui-pill.off  { background: #eceef5; color: var(--sh-muted); }
.ui-pill.main { background: #efeafe; color: #6c4cf0; margin-left: 8px; }

/* Permisos por modulo: control segmentado en vez de <select> */
.perm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12.5px; color: var(--sh-muted); }
.perm-tools button {
  border: 1px solid var(--sh-border); background: #fff; border-radius: 999px;
  padding: 3px 12px; font-size: 12px; color: var(--sh-ink-soft); cursor: pointer;
}
.perm-tools button:hover { background: var(--sh-bg-soft); }
.perm-list { border: 1px solid var(--sh-border); border-radius: 12px; overflow: hidden; }
.perm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--sh-border);
}
.perm-row:last-child { border-bottom: none; }
.perm-row:nth-child(even) { background: #fafbfd; }
.perm-name { font-size: 14px; color: var(--sh-ink); }
.seg { display: inline-flex; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 10px; padding: 3px; flex: none; }
.seg button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 8px;
  font-size: 12.5px; color: var(--sh-muted); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--sh-ink); }
.seg button.on { background: #fff; color: var(--sh-ink-soft); font-weight: 600; box-shadow: 0 1px 3px rgba(20,20,60,.14); }
.seg button.on.nz { background: var(--sh-gradient); color: #fff; box-shadow: none; }
.ui-actions { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--sh-border); }

@media (max-width: 767px) {
  .ui-card { padding: 20px 16px 24px; }
  .perm-row { flex-direction: column; align-items: flex-start; }
  .seg button { padding: 6px 10px; }
  .ui-table th:nth-child(3), .ui-table td:nth-child(3), .ui-table th:nth-child(4), .ui-table td:nth-child(4) { display: none; }
}

/* ---------- Ventanas emergentes (checkoutModal*) ---------- */

.checkoutModalOverlay {
  background: rgba(21,23,43,.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: modal-fade .18s ease;
}
.checkoutModalContent {
  border-radius: 22px;
  padding: 32px 30px 28px;
  box-shadow: 0 30px 70px -22px rgba(20,20,60,.55);
  animation: modal-pop .2s ease;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.checkoutModalContent h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--sh-ink); }
.checkoutCloseBtn {
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--sh-bg-soft);
  border: 1px solid var(--sh-border);
  color: var(--sh-muted);
  font-size: 14px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .2s ease;
}
.checkoutCloseBtn:hover, .checkoutCloseBtn:focus { background: #fdeaec; color: #de4f68; border-color: #f9d2d8; text-decoration: none; transform: rotate(90deg); }
.checkoutModalContent label { font-size: 12.5px; font-weight: 600; color: var(--sh-ink-soft); margin-bottom: 6px; }
.checkoutModalContent .form-control {
  height: 42px;
  border: 1px solid var(--sh-border);
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.checkoutModalContent .form-control:focus { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
.checkoutModalContent .btn-primary,
.checkoutModalContent .btn-default { border-radius: 12px; font-weight: 600; font-size: 14px; padding: 11px 18px; }
.checkoutModalContent .btn-lg { font-size: 14.5px; }
.checkoutModalContent .btn-primary { background: var(--sh-gradient); border: none; color: #fff; }
.checkoutModalContent .btn-primary:hover { opacity: .92; }
.checkoutModalContent .btn-primary[disabled] { opacity: .5; }
.checkoutModalContent .btn-default { background: #fff; border: 1px solid var(--sh-border); color: var(--sh-ink-soft); }
.checkoutModalContent .btn-default:hover { background: var(--sh-bg-soft); color: var(--sh-ink); }
.modal-ico {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.modal-ico.warn { background: #fdf6e1; color: #cc9a2e; }
.modal-title-ui { margin: 0 0 6px; }
.modal-text-ui { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: var(--sh-ink-soft); }

/* ---------- Contabilidad mensual ---------- */

.fd-wrap { text-align: left; }
.fd-wrap .ui-card { margin-bottom: 20px; }
.fd-filters .form-group { margin-bottom: 0; }
.fd-status { padding: 22px 26px; }
.fd-warn {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: #fdeaec; color: #c0392b; font-size: 14px; font-weight: 600;
}
.fd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.fd-tile {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px;
  background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px;
}
.fd-tile-ico {
  width: 42px; height: 42px; flex: none; border-radius: 13px; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-icon-bg); color: var(--card-icon);
}
.fd-tile-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fd-tile-label { font-size: 12px; font-weight: 600; color: var(--sh-muted); }
.fd-tile-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fd-tile-value { font-size: 15px; color: var(--sh-ink); }
.fd-tile-msg { font-size: 11.5px; color: #a66a00; }
.badge-count { display: inline-block; background: #efeafe; color: var(--sh-purple); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.ui-pill.bad  { background: #fdeaec; color: #de4f68; }
.ui-pill.wait { background: #fdf6e1; color: #b8860b; }
.fd-note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.fd-note i { margin-top: 3px; }
.fd-note.closed { background: #e7f8f0; color: #1f6f4e; }
.fd-note.closed i { color: #1f9d6c; }
.fd-note.open { background: #fdf6e1; color: #7a5b10; }
.fd-note.open i { color: #cc9a2e; }

.fd-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ui i, .btn-ui-ghost i { margin-right: 8px; }
.btn-ui-ghost.is-warn { background: #fdf6e1; border-color: #f0dca0; color: #8a6d1d; }
.fd-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--sh-muted); }
.fd-actions-row + .fd-hint { margin-top: 16px; }
.fd-hint i { margin-right: 6px; color: #a3a7ba; }
.fd-done { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: #1f9d6c; }
.fd-stale { font-size: 12px; font-weight: 500; color: #a66a00; margin-left: 10px; }
.warning-sat-limite {
  background: #fdf6e1; border: 1px solid #f0dca0; border-left: 4px solid #e4823a;
  border-radius: 14px; padding: 12px 16px; font-size: 13px; color: #7a5b10;
}

/* Cierre inicial / acarreo fiscal */
.cierre-panel h4 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--sh-ink); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cierre-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 18px; }
.cierre-col { border: 1px solid var(--sh-border); border-radius: 16px; padding: 18px 18px 12px; min-width: 0; }
.cierre-col-title { margin-bottom: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--sh-purple); }
table.cierre-table { width: 100%; font-size: 13px; border-collapse: collapse; }
table.cierre-table td { padding: 9px 4px; border-bottom: 1px solid #f0f1f7; color: var(--sh-ink-soft); }
table.cierre-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--sh-ink); font-weight: 600; }
table.cierre-table tr.cierre-corte td { border-top: 2px solid var(--sh-border); font-weight: 700; color: var(--sh-ink); }
table.cierre-table tr.cierre-total td { background: #efeafe; color: var(--sh-purple); font-weight: 800; border-bottom: none; padding: 11px 10px; }
table.cierre-table tr.cierre-total td:first-child { border-radius: 10px 0 0 10px; }
table.cierre-table tr.cierre-total td:last-child { border-radius: 0 10px 10px 0; }

/* Egresos / Ingresos */
.fd-table-card .ui-card-title small { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--sh-muted); }
.excel-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--sh-border); border-radius: 16px; }
table.excel-table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 13px; background: #fff; }
table.excel-table th {
  position: sticky; top: 0; z-index: 1; padding: 12px 10px; text-align: left; white-space: nowrap; line-height: 1.25;
  background: #f6f7fb; color: var(--sh-muted); font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  border-bottom: 1px solid var(--sh-border);
}
table.excel-table td { padding: 10px; border-bottom: 1px solid #f0f1f7; vertical-align: middle; white-space: nowrap; color: var(--sh-ink); }
table.excel-table th.num, table.excel-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.excel-table tbody tr:hover td { background: #f8f9fe; }
/* fondo por tipo de CFDI: ingreso/egreso normal azul claro, pago verde, nota de credito rojo (cancelado, abajo, gris) */
table.excel-table tbody tr.cfdi-I td { background: #eaf2ff; }
table.excel-table tbody tr.cfdi-I:hover td { background: #dbe8ff; }
table.excel-table tbody tr.cfdi-E td { background: #ffe5e9; }
table.excel-table tbody tr.cfdi-E:hover td { background: #ffd5dc; }
table.excel-table tbody tr.cfdi-P td { background: #e2f6ea; }
table.excel-table tbody tr.cfdi-P:hover td { background: #d1eedd; }
table.excel-table tbody tr.cfdi-cancelado td { background: #f4f5f8; color: #a3a7ba; }
table.excel-table tbody tr.cfdi-cancelado:hover td { background: #eceef3; }
table.excel-table tfoot td {
  position: sticky; bottom: 0; padding: 13px 12px; background: #efeafe; color: var(--sh-ink);
  font-weight: 700; border-top: 2px solid #dcd2fb; border-bottom: none;
}
table.excel-table .cell-edit {
  width: 100%; min-width: 84px; padding: 6px 8px; font-size: 13px; font-family: inherit; color: var(--sh-ink);
  background: transparent; border: 1.5px solid transparent; border-radius: 8px;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
table.excel-table .cell-edit:hover { border-color: var(--sh-border); background: #fff; }
table.excel-table .cell-edit:focus { outline: none; border-color: var(--sh-purple); background: #fff; box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
table.excel-table textarea.cell-edit { resize: vertical; min-height: 34px; line-height: 1.3; }
table.excel-table td.observaciones-cell { white-space: normal; min-width: 150px; }
table.excel-table td.conceptos { max-width: 170px; white-space: normal; overflow: hidden; display: table-cell; }
table.excel-table .cell-rfc, table.excel-table .forma-pago-label { font-size: 11px; color: #a3a7ba; }
table.excel-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--sh-purple); cursor: pointer; }
table.excel-table .btn-pdf {
  width: 32px; height: 32px; padding: 0; border: none; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #efeafe; color: var(--sh-purple); transition: background .15s ease, color .15s ease, transform .15s ease;
}
table.excel-table .btn-pdf:hover { background: var(--sh-gradient); color: #fff; transform: translateY(-1px); }
/* Columnas angostas: fecha apilada, nombres que hacen salto de linea, pagos compactos */
table.excel-table td.c-fecha { line-height: 1.35; }
.nombre-clip {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; cursor: pointer; transition: color .12s ease;
}
.nombre-clip:hover { color: var(--sh-purple); }
.nombre-clip.abierto { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.fd-date { display: block; font-weight: 600; }
.fd-hora { display: block; font-size: 11.5px; color: var(--sh-muted); }
.fd-stamp { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; color: #a3a7ba; }
.fd-stamp em { display: block; font-style: normal; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; font-size: 9.5px; }
.fd-stamp span { display: block; }
table.excel-table td.c-name { white-space: normal; width: 140px; max-width: 140px; min-width: 130px; line-height: 1.3; overflow-wrap: break-word; word-break: normal; }
table.excel-table td.c-name .badge-tipo { display: block; width: fit-content; margin: 5px 0 0; }
table.excel-table td.c-pago { white-space: normal; width: 1%; max-width: 100px; line-height: 1.3; }
table.excel-table td.c-metodo, table.excel-table th.c-metodo { width: 1%; text-align: center; }
table.excel-table th.c-pago { white-space: normal; }
.badge-tipo { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .3px; vertical-align: middle; white-space: nowrap; }
.badge-tipo.tipo-E { background: #fdeaec; color: #de4f68; }
.badge-tipo.tipo-P { background: #d9f3f0; color: #1a8c89; }
.badge-tipo.tipo-cancelado { background: #e4e6ee; color: #6b6e85; }
.badge-tipo.tipo-en-proceso { background: #fdf0e4; color: #e4823a; }
.fd-empty { text-align: center; color: #a3a7ba; padding: 30px 12px !important; font-size: 14px; }

/* ---------- Clientes ---------- */

.cu-search { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px; }
.cu-search form { flex: 1 1 320px; margin: 0; }
.ui-search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px;
  background: #f3f4fb; border: 1.5px solid transparent; border-radius: 14px; color: var(--sh-muted);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ui-search:hover { background: #eceefa; border-color: #dcdffa; }
.ui-search:focus-within { background: #fff; border-color: var(--sh-purple); box-shadow: 0 0 0 4px rgba(91,61,240,.12); }
.ui-search:focus-within > i { color: var(--sh-purple); }
.ui-search .form-control, .ui-card .ui-search .form-control { flex: 1; height: auto; padding: 0; border: none; background: none; box-shadow: none; font-size: 14px; }
.ui-search .form-control:focus, .ui-card .ui-search .form-control:focus { border: none; box-shadow: none; }

/* Campo con icono */
.ui-input { position: relative; }
.ui-input > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a3a7ba; font-size: 14px; pointer-events: none; transition: color .15s ease; }
.ui-input:focus-within > i { color: var(--sh-purple); }
.ui-card .ui-input .form-control { padding-left: 42px; }
.ui-input.ta > i { top: 17px; transform: none; }
.ui-card .ui-input textarea.form-control { height: auto; min-height: 92px; padding-top: 12px; resize: vertical; }
.ui-input select.form-control { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23868aa3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.ui-input input[type=number]::-webkit-outer-spin-button, .ui-input input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ui-input input[type=number] { -moz-appearance: textfield; }
.ui-card .form-control.inputError { border-color: #de4f68; box-shadow: 0 0 0 3px rgba(222,79,104,.12); }
.ui-card .form-control[disabled] { background: #f6f7fb; color: var(--sh-muted); }
.cu-response { font-size: 13px; font-weight: 600; color: var(--sh-ink-soft); }

/* Instalaciones y servicios */
.cu-inst-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cu-inst-head .ui-card-title { font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-btn {
  width: 36px; height: 36px; flex: none; border: 1px solid var(--sh-border); border-radius: 11px; background: #fff;
  color: var(--sh-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.icon-btn:hover { background: #efeafe; color: var(--sh-purple); border-color: #dcd2fb; transform: translateY(-1px); }
.cu-rows { display: flex; flex-direction: column; gap: 12px; }
.cu-row { display: flex; align-items: flex-start; gap: 14px; }
.cu-ico {
  width: 38px; height: 38px; flex: none; border-radius: 12px; font-size: 14px;
  display: flex; align-items: center; justify-content: center; background: var(--card-icon-bg); color: var(--card-icon);
}
.cu-val { flex: 1; min-width: 0; padding-top: 2px; font-size: 14px; line-height: 1.5; color: var(--sh-ink); overflow-wrap: anywhere; }
.cu-val h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--sh-ink); }
.cu-val h5 { margin: 2px 0 0; font-size: 12.5px; font-weight: 500; color: var(--sh-muted); }
.cu-sub { display: block; font-size: 12.5px; color: var(--sh-muted); }
.cu-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.cu-serv {
  margin-top: 18px; padding: 18px 20px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border);
  border-left: 4px solid var(--sh-purple); border-radius: 16px;
}
.cu-serv .cu-inst-head { margin-bottom: 12px; }
.cu-serv-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--sh-ink); }
.cu-serv-title i { margin-right: 8px; color: var(--sh-purple); }
.typeahead.dropdown-menu { border: 1px solid var(--sh-border); border-radius: 14px; padding: 6px; box-shadow: 0 20px 40px -18px rgba(30,27,90,.35); }
.typeahead.dropdown-menu > li > a { border-radius: 9px; padding: 8px 12px; }
.typeahead.dropdown-menu > .active > a, .typeahead.dropdown-menu > li > a:hover { background: #efeafe; color: var(--sh-purple); }

/* Ventanas de instalacion / servicio (mecanica JS por id: solo cambia el aspecto) */
#installModal.modal, #serviceModal.modal { background: rgba(21,23,43,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#installModal .modal-content, #serviceModal .modal-content {
  width: 92%; max-width: 640px; margin: 5vh auto; border: none; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px -22px rgba(20,20,60,.55);
}
#installModal .modal-header, #serviceModal .modal-header {
  background: #fff; color: var(--sh-ink); padding: 22px 26px; border-bottom: 1px solid var(--sh-border);
}
#installModal .modal-header h2, #serviceModal .modal-header h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--sh-ink); }
#installModal .close, #serviceModal .close {
  float: right; width: 34px; height: 34px; margin: -4px -6px 0 12px; border-radius: 11px; line-height: 32px; text-align: center;
  background: var(--sh-bg-soft); border: 1px solid var(--sh-border); color: var(--sh-muted); font-size: 20px; opacity: 1; text-shadow: none;
  transition: background .15s ease, color .15s ease;
}
#installModal .close:hover, #serviceModal .close:hover { background: #fdeaec; color: #de4f68; border-color: #f9d2d8; }
#installModal .modal-body, #serviceModal .modal-body { padding: 22px 26px !important; max-height: 68vh; overflow-y: auto; }
#installModal .input-group-addon, #serviceModal .input-group-addon {
  background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-right: none; border-radius: 10px 0 0 10px; color: var(--sh-purple); min-width: 44px;
}
#installModal .form-control, #serviceModal .form-control {
  border: 1px solid var(--sh-border); border-radius: 10px; box-shadow: none; font-size: 14px; min-height: 42px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#installModal .input-group .form-control, #serviceModal .input-group .form-control { border-radius: 0 10px 10px 0; }
#installModal .form-control:focus, #serviceModal .form-control:focus { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
#installModal .inputError, #serviceModal .inputError { border-color: #de4f68 !important; }
/* La logica marca "error" a todo campo requerido vacio desde que abre la ventana; en rojo desde el inicio
   se ve agresivo: se muestra solo cuando el usuario ya toco el campo. */
#installModal .form-control.ng-pristine.inputError, #serviceModal .form-control.ng-pristine.inputError { border-color: var(--sh-border) !important; }
#installModal .datetimeIconDiv, #serviceModal .datetimeIconDiv {
  display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 0; margin: 4px 0 8px; color: var(--sh-purple);
}
#installModal .datetimeIconDiv h5, #serviceModal .datetimeIconDiv h5 { margin: 0; font-size: 13px; font-weight: 700; color: var(--sh-ink-soft); }
#installModal .IDArticulo, #serviceModal .IDArticulo { text-align: right; margin-bottom: 14px; color: var(--sh-muted); font-size: 12.5px; }
#installModal .IDArticulo .form-control, #serviceModal .IDArticulo .form-control { width: 90px; display: inline-block; min-height: 34px; height: 34px; }
#installModal .submitButtons .btn-primary, #serviceModal .submitButtons .btn-primary {
  background: var(--sh-gradient); border: none; border-radius: 12px; font-size: 14.5px; font-weight: 600; padding: 12px 18px;
}
#installModal .modal-footer, #serviceModal .modal-footer { background: #fff; border-top: 1px solid var(--sh-border); text-align: right; padding: 16px 26px !important; }
#installModal .modal-footer .btn-default, #serviceModal .modal-footer .btn-default {
  background: #fff; border: 1px solid var(--sh-border); border-radius: 12px; font-weight: 600; color: var(--sh-ink-soft); padding: 9px 20px;
}
#installModal .modal-footer .btn-default:hover, #serviceModal .modal-footer .btn-default:hover { background: var(--sh-bg-soft); color: var(--sh-ink); }

/* ---------- Control de Empleados ---------- */

.em-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 20px; }
.em-stat {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--sh-border);
  border-radius: 18px; box-shadow: 0 10px 26px -20px rgba(45,40,130,.35);
}
.em-stat-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.em-stat-num { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--sh-ink); }
.em-stat-num small { font-size: 14px; font-weight: 600; color: var(--sh-muted); }
.em-stat-sub { font-size: 12px; color: var(--sh-muted); }
.em-stat .fiscal-note-bar { margin-top: 4px; }
.fiscal-note-bar span.full { background: linear-gradient(135deg, #f59e0b, #f97316); }

.em-events { display: flex; flex-direction: column; gap: 6px; }
.em-ev { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; cursor: pointer; transition: background .12s ease; }
.em-ev:hover { background: var(--sh-bg-soft); }
.em-ev-text { flex: 1; min-width: 0; font-size: 14px; color: var(--sh-ink); }
.em-ev-date { flex: none; text-align: right; font-size: 11.5px; color: var(--sh-muted); line-height: 1.3; }
.em-ev-date strong { display: block; font-size: 13px; color: var(--sh-ink); }

.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; margin-bottom: 20px; }
.em-card {
  background: #fff; border: 1px solid var(--sh-border); border-radius: 20px; padding: 20px; cursor: pointer;
  box-shadow: 0 10px 26px -22px rgba(45,40,130,.4); transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.em-card:hover { box-shadow: 0 18px 34px -20px rgba(45,40,130,.45); transform: translateY(-2px); border-color: #dcd2fb; }
.em-card.baja { opacity: .65; }
.em-card-top { display: flex; align-items: center; gap: 14px; }
.em-card-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.em-card-id strong { font-size: 15.5px; color: var(--sh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-card-id span { font-size: 12.5px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-avatar {
  width: 48px; height: 48px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--card-icon-bg); color: var(--card-icon); font-size: 16px; font-weight: 800; letter-spacing: .5px;
}
.em-avatar.big { width: 60px; height: 60px; border-radius: 19px; font-size: 20px; }
.em-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 12px; padding: 12px; background: var(--sh-bg-soft); border-radius: 14px; }
.em-facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.em-facts span { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--sh-muted); }
.em-facts strong { font-size: 13px; color: var(--sh-ink); }
.em-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; }
.em-badges .ui-pill i { margin-right: 4px; }
.em-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px;
  background: #fff; border: 1px dashed var(--sh-border); border-radius: 20px; text-align: center; color: var(--sh-muted);
}
.em-empty i { font-size: 26px; color: #c4c8dc; margin-bottom: 6px; }
.em-empty strong { color: var(--sh-ink); font-size: 15px; }

/* Ficha (ventana) */
.em-overlay {
  position: fixed; inset: 0; z-index: 1001; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 4vh 16px;
  background: rgba(21,23,43,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: modal-fade .18s ease;
}
.em-modal {
  position: relative; width: 100%; max-width: 1120px; background: var(--sh-bg-soft); border-radius: 26px; padding: 30px 32px 32px;
  box-shadow: 0 30px 70px -22px rgba(20,20,60,.55); animation: modal-pop .2s ease;
}
.em-close {
  position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--sh-border);
  background: #fff; color: var(--sh-muted); cursor: pointer; font-size: 14px; transition: background .15s ease, color .15s ease, transform .2s ease;
}
.em-close:hover { background: #fdeaec; color: #de4f68; border-color: #f9d2d8; transform: rotate(90deg); }
.em-head { display: flex; align-items: center; gap: 18px; margin: 0 48px 22px 0; }
.em-head-text h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--sh-ink); }
.em-head-text p { margin: 0; font-size: 13.5px; color: var(--sh-muted); }
.em-head .ui-pill { margin-left: auto; }
.em-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.em-box { background: #fff; border: 1px solid var(--sh-border); border-radius: 20px; padding: 22px 24px 24px; min-width: 0; }
.em-box h4 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 16px; font-weight: 800; color: var(--sh-ink); }
.em-box-ico { width: 34px; height: 34px; flex: none; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: var(--card-icon-bg); color: var(--card-icon); }
.em-count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sh-bg-soft); color: var(--sh-muted); }
.em-danger { border-color: #f9d2d8; }
.em-save { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 4px 0; }
.em-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.em-fields .form-group { margin-bottom: 14px; }
.em-fields label, .em-box label { font-size: 12.5px; font-weight: 600; color: var(--sh-ink-soft); margin-bottom: 6px; }
.em-fields .form-control, .em-extra .form-control, .em-box .form-control {
  height: 42px; border: 1px solid var(--sh-border); border-radius: 10px; box-shadow: none; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.em-fields .form-control:focus, .em-extra .form-control:focus { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
.em-fields .form-control[disabled] { background: #f6f7fb; }
.em-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.em-three { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 12px; }
.em-more { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--sh-purple); cursor: pointer; }
.em-more i { margin-right: 6px; font-size: 11px; }
.em-msg { font-size: 13px; font-weight: 600; margin-left: 4px; }
.em-msg.ok { color: #1f9d6c; }
.em-msg.err { color: #de4f68; }
p.em-msg { margin: 12px 0 0; }
.em-hint { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--sh-muted); }
.em-hint i { margin-right: 6px; color: #a3a7ba; }
.em-sub { margin: 20px 0 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--sh-purple); }

.em-dates { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--sh-border); }
.em-date { display: flex; align-items: center; gap: 12px; }
.em-date .cu-ico { width: 36px; height: 36px; }
.em-date span:not(.cu-ico) { display: block; font-size: 11.5px; color: var(--sh-muted); }
.em-date strong { font-size: 13.5px; color: var(--sh-ink); }

.em-docs { display: flex; flex-direction: column; gap: 10px; }
.em-doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 14px; }
.em-doc.falta { background: #fff; border-style: dashed; }
.em-doc .cu-ico { width: 38px; height: 38px; }
.em-doc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.em-doc-body strong { font-size: 13.5px; line-height: 1.3; color: var(--sh-ink); }
.em-doc-meta { font-size: 11.5px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; }
.em-doc-meta.falta { color: #cc9a2e; font-weight: 600; }
.em-doc-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.em-file { position: relative; margin: 0; cursor: pointer; overflow: hidden; }
.em-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.em-file.disabled { opacity: .6; pointer-events: none; }
.em-extra { display: grid; grid-template-columns: minmax(120px, 1.5fr) minmax(90px, 1.2fr) minmax(120px, 1.1fr) auto; gap: 8px; margin-top: 12px; border: 0; padding: 0; align-items: center; }
.em-extra .form-control { height: 38px; font-size: 13px; }

.em-saldo { padding: 16px; background: var(--sh-bg-soft); border-radius: 16px; margin-bottom: 14px; }
.em-saldo-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.em-saldo-nums div { display: flex; flex-direction: column; }
.em-saldo-nums strong { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--sh-ink); }
.em-saldo-nums strong.ok { color: #1f9d6c; }
.em-saldo-nums span { font-size: 11.5px; font-weight: 600; color: var(--sh-muted); }
.em-aus { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sh-border); }
.em-aus:last-child { border-bottom: none; }
.em-aus .cu-ico { width: 36px; height: 36px; }
.em-aus-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.em-aus-body strong { font-size: 13.5px; color: var(--sh-ink); }
.em-aus-body span { font-size: 12px; color: var(--sh-muted); }
.em-userline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--sh-bg-soft); border-radius: 14px; font-size: 13.5px; }
.em-userline i { color: var(--sh-purple); margin-right: 6px; }
.em-box .perm-list { margin-top: 4px; }
.em-box .perm-row { padding: 9px 12px; }
.em-box .seg button { padding: 5px 10px; font-size: 12px; }

@media (max-width: 900px) {
  .em-boxes { grid-template-columns: 1fr; }
  .em-extra { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .em-modal { padding: 24px 16px 24px; border-radius: 20px; }
  .em-two, .em-three { grid-template-columns: 1fr; }
  .em-facts { grid-template-columns: 1fr 1fr; }
  .em-head { margin-right: 40px; }
  .em-extra { grid-template-columns: 1fr; }
}

/* ---------- Inventarios ---------- */

.iv-select { max-width: 220px; height: 46px; border-radius: 14px; border: 1.5px solid transparent; background: #f3f4fb; font-size: 14px; box-shadow: none; }
.iv-select:hover { background: #eceefa; }
.iv-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--sh-ink-soft); cursor: pointer; white-space: nowrap; }
.iv-check input { accent-color: var(--sh-purple); width: 16px; height: 16px; }
.iv-msg { margin: 0 0 16px; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.iv-msg.ok { background: #e7f8f0; color: #1f6f4e; }
.iv-msg.err { background: #fdeaec; color: #c0392b; }
.iv-limit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -6px 4px 16px; font-size: 12.5px; color: var(--sh-muted); }
.iv-limit .fiscal-note-bar { width: 160px; }
.iv-title { margin: 0 44px 18px 0; font-size: 21px; font-weight: 800; color: var(--sh-ink); }
.iv-modal {
  position: relative; width: 100%; max-width: 520px; margin: auto; background: #fff; border-radius: 24px; padding: 30px 30px 26px;
  box-shadow: 0 30px 70px -22px rgba(20,20,60,.55); animation: modal-pop .2s ease;
}
.iv-modal.wide { max-width: 720px; }
.em-three2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.iv-box { padding: 18px 20px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.iv-box-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.iv-box-row > div:first-child { flex: 1; }
.iv-box-row strong { display: block; font-size: 14px; color: var(--sh-ink); }
.iv-box-row span:not(.pn-switch) { font-size: 12.5px; line-height: 1.45; color: var(--sh-muted); }
.pn-switch { width: 42px; height: 24px; flex: none; border-radius: 999px; background: #d7dae8; position: relative; cursor: pointer; transition: background .2s ease; }
.pn-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(20,20,60,.25); transition: left .2s ease; }
.pn-switch.on { background: var(--sh-gradient); }
.pn-switch.on i { left: 21px; }

.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.iv-card { background: #fff; border: 1px solid var(--sh-border); border-radius: 20px; padding: 20px; box-shadow: 0 10px 26px -22px rgba(45,40,130,.4); }
.iv-card.off { opacity: .6; }
.iv-card-top { display: flex; align-items: center; gap: 14px; }
.iv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Lista tipo tabla (Catalogo) */
.iv-list { padding: 8px 12px 12px; }
.iv-row { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(110px, 1.2fr) minmax(100px, 1fr) minmax(150px, 1.6fr) 44px; gap: 14px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--sh-border); }
.iv-row:not(.iv-head) { cursor: pointer; transition: background .12s ease; border-radius: 12px; }
.iv-row:not(.iv-head):hover { background: var(--sh-bg-soft); }
.iv-row.inactivo { opacity: .55; }
.iv-head { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--sh-muted); padding-top: 10px; padding-bottom: 10px; }
.iv-row span { min-width: 0; font-size: 14px; color: var(--sh-ink); }
.iv-row small { display: block; font-size: 11.5px; color: var(--sh-muted); }
.iv-row small.bajo { color: #cc9a2e; font-weight: 700; }
.iv-row .c-main strong { display: block; font-size: 14.5px; }
.iv-row .c-price { font-weight: 700; }
.iv-chip { display: inline-block; min-width: 30px; padding: 3px 10px; border-radius: 999px; background: #e7f8f0; color: #1f9d6c; font-size: 12px; font-weight: 600; text-align: center; }
.iv-chip b { font-weight: 800; }
.iv-chip.bajo { background: #fdf6e1; color: #b8860b; }
.iv-chip.agotado { background: #fdeaec; color: #de4f68; }
.iv-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; color: var(--sh-muted); }
.iv-empty i { font-size: 26px; color: #c4c8dc; margin-bottom: 6px; }
.iv-empty strong { color: var(--sh-ink); font-size: 15px; }
.iv-empty.small { padding: 22px 14px; font-size: 13px; }

/* Movimientos */
.iv-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.iv-tipo {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 2px solid var(--sh-border); border-radius: 18px;
  text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; position: relative;
}
.iv-tipo strong { display: block; font-size: 15px; color: var(--sh-ink); }
.iv-tipo > span:last-child { display: none; }
.iv-tipo:hover { transform: translateY(-1px); border-color: #dcdffa; }
.iv-tipo.on { border-color: var(--sh-purple); box-shadow: 0 0 0 4px rgba(91,61,240,.12), 0 14px 28px -20px rgba(91,61,240,.7); }
.iv-tipo .em-box-ico { width: 42px; height: 42px; border-radius: 13px; font-size: 16px; }
.iv-buscador { position: relative; margin-bottom: 14px; }
.iv-sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--sh-border); border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(30,27,90,.35); padding: 6px; max-height: 340px; overflow-y: auto; }
.iv-sug-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.iv-sug-item:hover { background: #efeafe; }
.iv-sug-item strong { display: block; font-size: 14px; }
.iv-sug-item small { display: block; font-size: 11.5px; color: var(--sh-muted); }
.iv-lineas { display: flex; flex-direction: column; gap: 12px; }
.iv-linea { padding: 14px 16px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.iv-linea-top { display: flex; align-items: center; gap: 12px; }
.iv-linea-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.iv-linea-name strong { font-size: 14px; color: var(--sh-ink); }
.iv-linea-name small { font-size: 12px; color: var(--sh-muted); }
.iv-linea-name small.falta { color: #de4f68; font-weight: 700; }
.iv-qty { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--sh-border); border-radius: 12px; overflow: hidden; flex: none; }
.iv-qty button { width: 32px; height: 36px; border: none; background: none; font-size: 17px; color: var(--sh-ink-soft); cursor: pointer; }
.iv-qty button:hover:not([disabled]) { background: #efeafe; color: var(--sh-purple); }
.iv-qty button[disabled] { opacity: .35; cursor: default; }
.iv-qty input { width: 46px; height: 36px; border: none; border-left: 1px solid var(--sh-border); border-right: 1px solid var(--sh-border); text-align: center; font-weight: 700; font-size: 14px; -moz-appearance: textfield; }
.iv-qty input::-webkit-outer-spin-button, .iv-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.iv-seriales { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #d7dae8; }
.iv-serial label { display: block; margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--sh-ink-soft); }
.iv-serial .form-control { height: 40px; border-radius: 10px; border: 1.5px solid var(--sh-border); box-shadow: none; font-size: 13.5px; transition: border-color .15s ease, box-shadow .15s ease; }
.iv-serial .form-control:focus { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
.iv-serial .form-control.err { border-color: #de4f68; background: #fff8f9; }
.iv-serial .form-control.warn { border-color: #e4a23a; background: #fffcf3; }
.iv-serial .form-control.good { border-color: #1f9d6c; }
.iv-serial-msg { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.iv-serial-msg.error { color: #de4f68; } .iv-serial-msg.aviso { color: #b8860b; } .iv-serial-msg.ok { color: #1f9d6c; } .iv-serial-msg.espera { color: var(--sh-muted); }
.iv-retiros { display: flex; flex-direction: column; gap: 10px; }
.iv-retiro { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; background: #fffbea; border: 1px solid #f0dca0; border-radius: 16px; }

/* Existencias + carrito */
.iv-split { display: block; }   /* el carrito ya no ocupa una columna: es un cajon que se desliza desde la derecha */
.iv-products { display: flex; flex-direction: column; gap: 12px; }
.iv-prod { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--sh-border); border-radius: 18px; transition: box-shadow .15s ease, border-color .15s ease; }
.iv-prod:hover { box-shadow: 0 14px 28px -22px rgba(45,40,130,.5); border-color: #dcd2fb; }
.iv-prod.agotado { background: #fcfcfe; }
.iv-prod-main { flex: 1; min-width: 0; }
.iv-prod-main strong { display: block; font-size: 15px; color: var(--sh-ink); }
.iv-prod-main small { display: block; font-size: 12px; color: var(--sh-muted); margin-top: 2px; }
.iv-stocks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.iv-prod-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.iv-prod-side small { font-size: 11px; color: var(--sh-purple); font-weight: 700; margin-top: -4px; }
.iv-precio { font-size: 17px; font-weight: 800; color: var(--sh-ink); }
.iv-cart { position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 990; width: 430px; max-width: 92vw; height: 100vh; height: 100dvh; background: #fff; border: 1px solid var(--sh-border); border-right: none; border-radius: 24px 0 0 24px; box-shadow: -24px 0 60px -24px rgba(25,12,90,.65); overflow: hidden; display: flex; flex-direction: column; transform: translateX(104%); visibility: hidden; transition: transform .3s cubic-bezier(.22,.9,.3,1), visibility 0s linear .3s; }
.iv-cart.open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.22,.9,.3,1), visibility 0s; }
.iv-cart-back { position: fixed; inset: 0; z-index: 985; background: rgba(14,6,52,.42); animation: iv-fondo .25s ease; cursor: pointer; }
@keyframes iv-fondo { from { opacity: 0; } }
.iv-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--sh-border); }
.iv-cart-head h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.iv-cart-head h3 i { color: var(--sh-purple); }
.iv-cart-x { display: inline-flex; }
.iv-cart-cfg { padding: 14px 20px 6px; border-bottom: 1px solid var(--sh-border); }
.iv-cart-cfg .form-group { margin-bottom: 12px; }
.iv-cart-cfg label, .iv-libre label { font-size: 11.5px; font-weight: 600; color: var(--sh-ink-soft); margin-bottom: 4px; }
.iv-cart-cfg .form-control, .iv-libre .form-control { height: 38px; border-radius: 10px; border: 1px solid var(--sh-border); box-shadow: none; font-size: 13.5px; }
.iv-cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; min-height: 90px; display: flex; flex-direction: column; gap: 14px; }
/* cada articulo del carrito es su propia tarjeta (con barra de color a la izquierda, que alterna): asi sus seriales no se confunden con los del siguiente */
.iv-cart-line { position: relative; padding: 14px 14px 14px 16px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-left: 5px solid var(--sh-purple); border-radius: 16px; box-shadow: 0 12px 24px -20px rgba(45,40,130,.45); }
.iv-cart-line:nth-child(even) { border-left-color: var(--sh-blue); }
.iv-cart-line-top { display: flex; align-items: flex-start; gap: 8px; }
.iv-cart-line-mid { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.iv-x { color: var(--sh-muted); font-size: 13px; }
.iv-precio-in { width: 92px; height: 36px; border-radius: 10px; border: 1px solid var(--sh-border); box-shadow: none; font-size: 13.5px; padding: 6px 8px; }
.iv-importe { margin-left: auto; font-size: 14px; color: var(--sh-ink); }
.iv-cart-line .iv-seriales { grid-template-columns: 1fr; margin-top: 12px; padding: 12px; background: #fff; border: 1px dashed #cdd1e6; border-radius: 12px; }
.iv-seriales-tit { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-muted); }
.iv-seriales-tit i { color: var(--sh-purple); }
.iv-cart-libre { padding: 0 20px 12px; }
.iv-libre { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.iv-libre-row { display: flex; gap: 8px; }
.iv-cart-foot { padding: 14px 20px 18px; border-top: 1px solid var(--sh-border); background: var(--sh-bg-soft); }
.iv-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.iv-total span { font-size: 13px; font-weight: 600; color: var(--sh-muted); }
.iv-total strong { font-size: 26px; font-weight: 800; color: var(--sh-ink); }
.iv-cart-btns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.iv-cart-btns .btn-ui, .iv-cart-btns .btn-ui-ghost { justify-content: center; padding-left: 10px; padding-right: 10px; }
.iv-fab-wrap { position: sticky; top: 78px; height: 0; z-index: 950; }
.iv-fab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: absolute; top: 2px; right: 0; width: 72px; height: 66px; padding: 0; border: none; border-radius: 22px; background: var(--sh-gradient); color: #fff; font-weight: 800; box-shadow: 0 18px 30px -12px rgba(91,61,240,.85), 0 0 0 4px rgba(255,255,255,.14); cursor: pointer; animation: iv-fab-in .35s cubic-bezier(.34,1.56,.64,1); transition: transform .15s ease; }
.iv-split-main.con-fab .cu-search, .iv-split-main.con-fab .iv-products, .iv-split-main.con-fab .iv-desc { margin-right: 86px; }   /* carril libre para el boton flotante */
.iv-fab:hover { transform: translateY(-2px) scale(1.03); }
.iv-fab:active { transform: scale(.96); }
.iv-fab i { font-size: 22px; }
.iv-fab-n { position: absolute; top: -9px; right: -9px; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #fff; color: var(--sh-purple); font-size: 13px; box-shadow: 0 6px 14px -4px rgba(20,10,80,.6); }
.iv-fab-t { font-size: 11.5px; line-height: 1; }
@keyframes iv-fab-in { from { transform: scale(.4); opacity: 0; } }
.iv-big-total { text-align: center; font-size: 40px; font-weight: 800; color: var(--sh-ink); margin: 4px 0 2px; letter-spacing: -1px; }
.iv-ok { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 16px; font-size: 18px; color: #1f9d6c; }
.iv-ok i { font-size: 26px; }
.iv-cot-totales { margin: 4px 0 6px; padding: 14px 18px; background: var(--sh-bg-soft); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; max-width: 280px; margin-left: auto; }
.iv-cot-totales div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--sh-ink-soft); }
.iv-cot-totales .t { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--sh-border); font-size: 16px; color: var(--sh-ink); }

/* Ticket (80 mm) */
.ticket-wrap { max-width: 400px; }
.ticket-print { font-family: "Courier New", monospace; font-size: 13px; color: #111; padding: 6px 4px; }
.tk-head { text-align: center; display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed #999; }
.tk-head strong { font-size: 16px; }
.tk-line { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.tk-desc { flex: 1; word-break: break-word; }
.tk-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #999; font-size: 15px; }
.tk-foot { margin-top: 10px; text-align: center; font-size: 11.5px; color: #444; }
#ticket-impresion { display: none; }   /* en pantalla no se ve: solo existe mientras se imprime */
@media print {
  /* Al imprimir un ticket (imprimirTicketPagina en app.js) solo queda su copia, en un contenedor al final del body: el original esta dentro de
     una ventana fija, que salia corrida, cortada y repetida en cada hoja. */
  body.imprimiendo-ticket > *:not(#ticket-impresion) { display: none !important; }
  body.imprimiendo-ticket { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  #ticket-impresion { display: block; width: 76mm; margin: 0; padding: 0; background: #fff; }
  /* marsCSS.css oculta todo al imprimir (body * { visibility: hidden }): la copia del ticket tiene que volver a mostrarse */
  #ticket-impresion, #ticket-impresion * { visibility: visible !important; }
  #ticket-impresion .ticket-print { position: static; width: 76mm; padding: 0; }
  #ticket-impresion .tk-line, #ticket-impresion .tk-total { break-inside: avoid; }
  .no-print { display: none !important; }
  @page { margin: 6mm; }
}
/* Historial */
.iv-filtros { display: flex; flex-wrap: wrap; gap: 14px; }
.iv-filtros .form-group { flex: 1 1 140px; margin-bottom: 8px; }
.iv-filtros label { font-size: 12px; font-weight: 600; color: var(--sh-ink-soft); margin-bottom: 5px; }
.iv-filtros .form-control { height: 40px; border-radius: 10px; border: 1px solid var(--sh-border); box-shadow: none; font-size: 13.5px; }
.iv-hmov { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-bottom: 1px solid var(--sh-border); }
.iv-hmov:last-child { border-bottom: none; }
.iv-hmov-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.iv-hmov-body strong { font-size: 14px; color: var(--sh-ink); }
.iv-hmov-body small { font-size: 12px; color: var(--sh-muted); overflow-wrap: anywhere; }
.iv-hmov-fecha { flex: none; text-align: right; font-size: 11.5px; color: var(--sh-muted); line-height: 1.35; }
.iv-hmov-fecha strong { display: block; font-size: 13px; color: var(--sh-ink); }
.iv-hmov-fecha small { display: block; }
.iv-serial-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .iv-row { grid-template-columns: minmax(0, 1fr) 90px 44px; }
  .iv-row .c-cat, .iv-row .c-stock { display: none; }
  .iv-head .c-stock { display: none; }
}
@media (max-width: 575px) {
  .em-three2 { grid-template-columns: 1fr; }
  .iv-prod { flex-direction: column; align-items: stretch; }
  .iv-prod-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .iv-modal { padding: 24px 18px 20px; }
}

/* ---------- Responsive / shell ----------
   El sidebar va oculto en todos los anchos (como en Mars min) y se abre con el
   boton hamburguesa; #sidebar-wrapper.active (vendor) lo desliza. Todas las
   reglas viven al final para que el orden en cascada nunca quede en duda. */

#menu-toggle {
  z-index: 950;
  top: 12px;
  left: 14px;
  margin: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--sh-bg-soft);
  border: 1px solid var(--sh-border);
  color: var(--sh-ink);
  font-size: 16px;
}
#menu-toggle:hover { background: #eef1ff; color: var(--sh-purple); border-color: #dcdffa; }
#menu-toggle .min-badge-bar { position: absolute; top: -6px; right: -6px; }

#sidebar-wrapper.active { box-shadow: 8px 0 30px -12px rgba(20,20,60,0.35); }

#top.app-topbar { left: 0; padding-left: 70px; }

/* La barra superior es fija: se reserva su alto para que ninguna pagina arranque debajo de ella.
   Solo con sesion (la barra se oculta con ng-hide en el login). */
#top.app-topbar:not(.ng-hide) ~ #menuContent { padding-top: var(--sh-topbar-h); }

@media (max-width: 991px) {
  .topbar-search { display: none; }
  #top.app-topbar { justify-content: flex-end; }
}
@media (max-width: 575px) {
  .topbar-user-info, .topbar-user-caret { display: none; }
  .topbar-user { padding-right: 4px; }
  .topbar-actions { gap: 8px; }
  .notif-panel { right: -52px; }
}

/* ---------- Catalogo: lista, formulario por secciones, listas de precios, fotos ---------- */
.iv-modal.xl { max-width: 880px; }
.cat-sub { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--sh-muted); line-height: 1.4; }
.cat-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin: -4px 0 16px; }
.cat-bar .seg { flex-wrap: wrap; }
.seg button b { margin-left: 5px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(91,61,240,.1); color: var(--sh-purple); }
.seg button.on b { background: #efeafe; }
.cat-amx { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-radius: 12px; background: #e7f8f0; color: #1f6f4e; font-size: 12.5px; font-weight: 600; }
.cat-amx i { font-size: 13px; }
.cat-amx.off { background: #eceef5; color: var(--sh-muted); }
.cat-amx.bad { background: #fdeaec; color: #c0392b; }

.iv-row.cat { grid-template-columns: minmax(230px, 3.2fr) minmax(100px, 1.1fr) minmax(130px, 1.3fr) minmax(130px, 1.4fr) minmax(120px, 1.1fr) 92px; }
.cat-id { display: flex !important; align-items: center; gap: 14px; }
.cat-id-txt { min-width: 0; display: flex; flex-direction: column; }
.cat-thumb { width: 54px; height: 54px; flex: none; border-radius: 15px; overflow: hidden; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); display: inline-flex; align-items: center; justify-content: center; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-thumb.vacio { color: #c4c8dc; font-size: 20px; }
.cat-tags-mini { color: var(--sh-purple) !important; font-weight: 600; }
.cat-nada { color: var(--sh-muted); font-weight: 500; font-size: 13px; }
.iv-row.cat .c-est .ui-pill { margin: 0; white-space: nowrap; }
.iv-row.cat .c-est .ui-pill i { margin-right: 5px; font-size: 10px; }

.cat-sec { margin-bottom: 14px; border: 1px solid var(--sh-border); border-radius: 20px; background: #fff; transition: box-shadow .15s ease, border-color .15s ease; }
.cat-sec.open { background: #fff; box-shadow: 0 12px 28px -24px rgba(45,40,130,.5); }
.cat-sec-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 20px; border: none; background: none; text-align: left; cursor: pointer; border-radius: 20px; }
.cat-sec.static .cat-sec-head { cursor: default; }
.cat-sec-head strong { display: block; font-size: 15px; color: var(--sh-ink); }
.cat-sec-head small { display: block; font-size: 12px; color: var(--sh-muted); }
.cat-sec-head > div { flex: 1; min-width: 0; }
.cat-sec-head em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 3px 10px; border-radius: 999px; background: var(--sh-bg-soft); color: var(--sh-muted); }
.cat-sec:not(.static) .cat-sec-head:hover { background: var(--sh-bg-soft); }
.cat-chev { font-size: 12px; color: var(--sh-muted); transition: transform .2s ease; }
.cat-sec.open .cat-chev { transform: rotate(180deg); }
.cat-sec-body { padding: 4px 20px 20px; }
.cat-ico { width: 40px; height: 40px; flex: none; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; }
.cat-ico.a { background: linear-gradient(135deg, #5b3df0, #2f6bff); }
.cat-ico.b { background: linear-gradient(135deg, #8a63f2, #c06af0); }
.cat-ico.c { background: linear-gradient(135deg, #1f9d6c, #4bc99a); }
.cat-ico.d { background: linear-gradient(135deg, #f08a3d, #f5b13d); }
.cat-ico.e { background: linear-gradient(135deg, #de4f68, #f08a8a); }

.cat-precios { padding: 16px 18px 12px; margin: 4px 0 16px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 18px; }
.cat-precios-head { margin-bottom: 12px; }
.cat-precios-head strong { display: block; font-size: 14px; color: var(--sh-ink); }
.cat-precios-head span { font-size: 12px; color: var(--sh-muted); }
.cat-precio-row { display: grid; grid-template-columns: minmax(110px, 1fr) 150px 120px auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed #d7dae8; }
.cat-precio-row.costo { grid-template-columns: minmax(110px, 1fr) 150px; border-top: none; padding-top: 0; }
.cat-precio-name b { display: block; font-size: 13.5px; color: var(--sh-ink); }
.cat-precio-name small { display: block; font-size: 11.5px; color: var(--sh-muted); }
.cat-money, .cat-pct, .cat-unit { position: relative; }
.cat-money > i, .cat-pct > i, .cat-unit > i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; font-size: 13px; color: var(--sh-muted); pointer-events: none; }
.cat-money > i { left: 14px; }
.cat-pct > i, .cat-unit > i { right: 14px; }
.cat-money .form-control { padding-left: 30px !important; font-weight: 700; }
.cat-pct .form-control { padding-right: 32px !important; font-weight: 700; color: #1f9d6c; }
.cat-pct.neg .form-control { color: #de4f68; }
.cat-unit .form-control { padding-right: 38px !important; }
.cat-sug { border: 1.5px dashed #c9bdfa; background: #fff; color: var(--sh-purple); border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cat-sug:hover { background: #efeafe; }
.cat-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--sh-muted); }
.cat-hint i { margin-right: 6px; color: #a3a7ba; }
.cat-hint a { color: var(--sh-purple); font-weight: 600; }
.iv-box.apagado { opacity: .6; }

.cat-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 46px; padding: 6px 10px; background: #fff; border: 1.5px solid var(--sh-border); border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.cat-tags:focus-within { border-color: var(--sh-purple); box-shadow: 0 0 0 3px rgba(91,61,240,.12); }
.cat-tags input { flex: 1; min-width: 140px; border: none; outline: none; background: none; font-size: 14px; padding: 6px 2px; }
.cat-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: 999px; background: #efeafe; color: #5b3df0; font-size: 12.5px; font-weight: 700; }
.cat-tag button { width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(91,61,240,.15); color: #5b3df0; font-size: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cat-tag button:hover { background: #5b3df0; color: #fff; }
.cat-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.cat-rel small { color: var(--sh-muted); font-size: 12px; margin-right: 4px; }
.cat-rel .ui-pill { margin: 0; }
.cat-rel em { font-style: normal; opacity: .75; }
.cat-medidas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.cat-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.cat-foto { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); margin: 0; }
.cat-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-portada { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: var(--sh-gradient); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; }
.cat-portada.pend { background: rgba(21,23,43,.7); }
.cat-foto-acc { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s ease; }
.cat-foto:hover .cat-foto-acc, .cat-foto:focus-within .cat-foto-acc { opacity: 1; }
.cat-foto-acc button { width: 30px; height: 30px; border: none; border-radius: 10px; background: rgba(255,255,255,.95); color: var(--sh-ink-soft); font-size: 12px; cursor: pointer; box-shadow: 0 4px 10px rgba(20,20,60,.25); }
.cat-foto-acc button:hover { background: #fdeaec; color: #de4f68; }
.cat-foto-acc button:first-child:not(:last-child):hover { background: #fdf6e1; color: #b8860b; }
.cat-foto.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #c9bdfa; background: #faf9ff; color: var(--sh-purple); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.cat-foto.add:hover { background: #efeafe; transform: translateY(-1px); }
.cat-foto.add.disabled { opacity: .5; pointer-events: none; }
.cat-foto.add i { font-size: 20px; }
.cat-foto.add input { display: none; }

.cat-estados { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-estado { position: relative; padding: 16px 16px 14px; border: 1.5px solid var(--sh-border); border-radius: 16px; cursor: pointer; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.cat-estado:hover { transform: translateY(-1px); border-color: #dcdffa; }
.cat-estado i { font-size: 18px; color: #b8bdd3; margin-bottom: 8px; display: block; }
.cat-estado strong { display: block; font-size: 14px; color: var(--sh-ink); }
.cat-estado span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.4; color: var(--sh-muted); }
.cat-estado.on { border-color: var(--sh-purple); box-shadow: 0 0 0 4px rgba(91,61,240,.12); background: #faf9ff; }
.cat-estado.on i { color: var(--sh-purple); }

.cat-listas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.cat-lista { display: grid; grid-template-columns: 34px minmax(0, 1fr) 150px 70px 40px; gap: 14px; align-items: end; padding: 14px 16px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.cat-lista.off { opacity: .6; }
.cat-lista .form-group { margin-bottom: 0; }
.cat-lista-n { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--sh-gradient); color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.cat-lista-sw { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-lista-sw label { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--sh-ink-soft); }
.cat-lista .icon-btn { margin-bottom: 2px; }

@media (max-width: 1100px) {
  .iv-row.cat { grid-template-columns: minmax(0, 1fr) 110px 92px; }
  .iv-row.cat .c-cat, .iv-row.cat .c-stock, .iv-row.cat .c-est { display: none; }
}
@media (max-width: 767px) {
  .cat-precio-row { grid-template-columns: 1fr 1fr; }
  .cat-precio-row.costo { grid-template-columns: 1fr 1fr; }
  .cat-precio-name { grid-column: 1 / -1; }
  .cat-sug { grid-column: 1 / -1; }
  .cat-medidas { grid-template-columns: 1fr 1fr; }
  .cat-estados { grid-template-columns: 1fr; }
  .cat-lista { grid-template-columns: 34px 1fr; }
  .cat-lista .form-group:nth-of-type(1) { grid-column: 2; }
  .cat-sec-body { padding: 4px 14px 16px; }
}

/* ---------- Existencias: fotos, listas de precio, cliente y listas de compra ---------- */
.cat-thumb.lg { width: 64px; height: 64px; border-radius: 17px; }
.iv-prod { gap: 16px; }
.iv-listas { display: flex; flex-wrap: wrap; width: 100%; }
.iv-listas button { flex: 1 1 auto; white-space: nowrap; }
.iv-cli label { display: block; }
.iv-cli-chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #efeafe; border: 1px solid #dcd2fb; border-radius: 14px; }
.iv-cli-chip > div { flex: 1; min-width: 0; }
.iv-cli-chip strong { display: block; font-size: 14px; color: var(--sh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-cli-chip small { display: block; font-size: 11.5px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
.iv-cli-resumen { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: #e7f8f0; color: #1f6f4e; font-size: 12px; line-height: 1.45; }
.iv-cli-resumen b { font-weight: 800; }
.iv-sugeridos { margin: 0 4px 12px; padding: 12px 14px; background: #fffbea; border: 1px solid #f0dca0; border-radius: 16px; }
.iv-sugeridos > small { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 700; color: #8a6d1d; }
.iv-sugeridos > small i { margin-right: 6px; }
.iv-sug-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-sug-chips button { border: 1px solid #f0dca0; background: #fff; color: #7a5b10; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .12s ease, transform .12s ease; }
.iv-sug-chips button:hover { background: #fdf6e1; transform: translateY(-1px); }
.iv-sug-chips button i { margin-right: 4px; font-size: 10px; }
.lc-lista { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.lc-info { flex: 1; min-width: 0; }
.lc-info strong { display: block; font-size: 14px; color: var(--sh-ink); }
.lc-info small { display: block; font-size: 12px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-guardar { display: flex; gap: 10px; flex-wrap: wrap; }
.lc-guardar .form-control { flex: 1 1 200px; }

/* el carrito entero se desplaza (el pie con Cobrar/Cotizar queda fijo abajo): con cliente, sugeridos y varias lineas ya no se encima nada */
.iv-cart { overflow-y: auto; }
.iv-cart > * { flex-shrink: 0; }
.iv-cart-items { flex: 1 0 auto; overflow: visible; }
.iv-cart-foot { position: sticky; bottom: 0; z-index: 2; }

/* ---------- Historial: periodo rapido ---------- */
.hp-periodo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px !important; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-chips button { border: 1.5px solid var(--sh-border); background: #fff; color: var(--sh-ink-soft); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease; }
.hp-chips button:hover { background: #efeafe; border-color: #dcd2fb; color: var(--sh-purple); transform: translateY(-1px); }
.hp-chips button.on { background: var(--sh-gradient); border-color: transparent; color: #fff; box-shadow: 0 10px 20px -12px rgba(91,61,240,.8); }
.hp-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.hp-custom label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--sh-ink-soft); }
.hp-custom .form-control { height: 40px; width: 160px; border-radius: 10px; }
.hp-resumen { margin-left: auto; font-size: 13px; color: var(--sh-muted); }
.hp-resumen b { color: var(--sh-ink); font-weight: 800; }
.hp-aviso { flex: 1 1 100%; margin: 0; padding: 8px 12px; border-radius: 10px; background: #fdf6e1; color: #7a5b10; font-size: 12.5px; }
.hp-aviso i { margin-right: 6px; }

/* ---------- Clientes ---------- */
.cl-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.cl-selects { display: flex; gap: 10px; flex-wrap: wrap; }
.cl-card { gap: 12px; }
.cl-contacto { display: flex; flex-direction: column; gap: 5px; min-height: 18px; }
.cl-contacto span { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--sh-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-contacto i { width: 14px; color: #a3a7ba; font-size: 12px; text-align: center; flex: none; }
.cl-contacto .cl-vacio { color: #b4b8cc; font-style: italic; }
.cl-acciones { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.cl-acciones a { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); color: var(--sh-ink-soft); font-size: 14px; transition: background .14s ease, color .14s ease, transform .14s ease; }
.cl-acciones a:hover { background: #efeafe; color: var(--sh-purple); border-color: #dcd2fb; transform: translateY(-1px); }
.cl-acciones a.wa:hover { background: #e7f8f0; color: #1f9d6c; border-color: #bfead3; }
.cl-rapidos { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.cl-tabs { margin-bottom: 18px; }
.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cl-stats > div { padding: 14px 16px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.cl-stats span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--sh-muted); }
.cl-stats strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 800; color: var(--sh-ink); }
.cl-bloque { margin-bottom: 18px; }
.cl-top { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-top .ui-pill { margin: 0; font-size: 12.5px; padding: 5px 12px; }
.cl-dup { margin-top: 14px; padding: 16px 18px; background: #fffbea; border: 1px solid #f0dca0; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.cl-dup > strong { color: #7a5b10; font-size: 14px; }
.cl-dup-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid #f0e6bf; border-radius: 12px; font-size: 13.5px; }
.cl-dup-item small { display: block; font-size: 11.5px; color: var(--sh-muted); }
.cl-dup .btn-ui { align-self: flex-start; }
@media (max-width: 575px) { .cl-grid { grid-template-columns: 1fr; } }
.iv-cli-nuevo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; font-size: 12px; color: var(--sh-muted); }
.cl-mas { color: var(--sh-muted); margin-left: 6px; font-size: 11.5px; }
.cl-doms { display: flex; flex-direction: column; gap: 10px; }
.cl-dom { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; background: #fff; border: 1.5px solid var(--sh-border); border-radius: 16px; }
.cl-dom.principal { border-color: #cfc4fb; background: #faf9ff; }
.cl-dom-ico { width: 36px; height: 36px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #efeafe; color: var(--sh-purple); font-size: 14px; }
.cl-dom-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-dom-txt strong { font-size: 14px; color: var(--sh-ink); }
.cl-dom-txt span { font-size: 13px; color: var(--sh-ink-soft); }
.cl-dom-txt small { font-size: 12px; color: var(--sh-muted); }
.cl-dom-txt small i { width: 12px; margin-right: 3px; color: #a3a7ba; }
.cl-dom-acc { display: flex; gap: 6px; flex: none; }
.cl-domform { margin-top: 12px; padding: 16px 16px 8px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.cl-domform .form-group { margin-bottom: 12px; }
.cl-domform-btns { display: flex; gap: 8px; margin: 6px 0 8px; }

/* ---------- Agenda (estilo Google Calendar, sin librerias) ---------- */
.ag-app { display: flex; padding: 0 !important; overflow: hidden; min-height: 560px; }
.ag-lateral { width: 262px; flex: none; padding: 18px 16px 16px; border-right: 1px solid var(--sh-border); background: #fff; display: flex; flex-direction: column; gap: 18px; }
.ag-crear { display: flex; align-items: center; gap: 12px; align-self: flex-start; padding: 13px 24px 13px 18px; border: none; border-radius: 20px; background: var(--sh-gradient); color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; box-shadow: 0 14px 26px -14px rgba(91,61,240,.85); transition: transform .15s ease, box-shadow .15s ease; }
.ag-crear:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -14px rgba(91,61,240,.95); }
.ag-crear i { font-size: 15px; }
.ag-mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; color: var(--sh-ink); text-transform: capitalize; }
.ag-mini-head span { display: inline-flex; gap: 2px; }
.ag-mini-head button, .ag-nav button { width: 30px; height: 30px; border: none; border-radius: 50%; background: none; color: var(--sh-ink-soft); font-size: 12px; cursor: pointer; transition: background .12s ease; }
.ag-mini-head button:hover, .ag-nav button:hover { background: var(--sh-bg-soft); }
.ag-mini-dow, .ag-mini-fila { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.ag-mini-dow span { font-size: 10.5px; font-weight: 700; color: var(--sh-muted); padding-bottom: 4px; }
.ag-mini-fila button { height: 32px; border: none; background: none; font-size: 12px; color: var(--sh-ink); cursor: pointer; border-radius: 0; position: relative; }
.ag-mini-fila button.otro { color: #b8bdd3; }
.ag-mini-fila button.sel { background: #efeafe; }
.ag-mini-fila button:hover { background: #f1f2fa; }
.ag-mini-fila button.hoy { color: #fff; font-weight: 800; background: none; z-index: 0; }
.ag-mini-fila button.hoy::before { content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--sh-purple); z-index: -1; }
.ag-lat-titulo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ag-lat-titulo strong { font-size: 13px; color: var(--sh-ink); }
.ag-cal { display: flex; align-items: center; gap: 11px; margin: 0; padding: 7px 6px; border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--sh-ink-soft); }
.ag-cal:hover { background: var(--sh-bg-soft); }
.ag-cal input { display: none; }
.ag-check { width: 18px; height: 18px; flex: none; border-radius: 6px; border: 2px solid; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; transition: background .12s ease; }
.ag-cal-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-cal small { font-size: 11px; color: var(--sh-muted); font-weight: 700; }
.ag-atajos { margin: auto 0 0; font-size: 11px; line-height: 1.7; color: var(--sh-muted); }
.ag-atajos b { display: inline-block; min-width: 18px; padding: 0 5px; text-align: center; border-radius: 5px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); color: var(--sh-ink-soft); }

.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 14px 20px; border-bottom: 1px solid var(--sh-border); }
.ag-burger { display: none; }
.ag-nav { display: inline-flex; }
.ag-titulo { margin: 0 8px 0 4px; font-size: 21px; font-weight: 700; color: var(--sh-ink); flex: 1 1 200px; min-width: 0; }
.ag-titulo::first-letter, .ag-pop-cuando::first-letter { text-transform: uppercase; }
.ag-titulo i { margin-left: 10px; font-size: 14px; color: var(--sh-muted); }
.ag-buscar { flex: 0 1 230px; position: relative; }
.ag-buscar .ag-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--sh-muted); font-size: 12px; cursor: pointer; }
.ag-vistas button { padding: 7px 16px; }

.ag-scroll { position: relative; overflow: auto; height: calc(100vh - 250px); min-height: 480px; max-height: 920px; background: #fff; }
.ag-cabecera { position: sticky; top: 0; z-index: 6; background: #fff; box-shadow: 0 1px 0 var(--sh-border); }
.ag-fila { display: grid; align-items: stretch; }
.ag-esq { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 8px 6px 0; }
.ag-esq small { font-size: 10px; color: var(--sh-muted); font-weight: 600; text-align: right; line-height: 1.1; }
.ag-dia { display: flex; flex-direction: column; align-items: center; padding: 8px 0 8px; border-left: 1px solid var(--sh-border); cursor: pointer; transition: background .12s ease; }
.ag-dia:hover { background: var(--sh-bg-soft); }
.ag-dia small { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-muted); }
.ag-dia b { margin-top: 2px; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; font-size: 21px; font-weight: 500; color: var(--sh-ink); }
.ag-dia.hoy small { color: var(--sh-purple); }
.ag-dia.hoy b { background: var(--sh-purple); color: #fff; font-weight: 700; }
.ag-strip { border-top: 1px solid var(--sh-border); padding: 4px 0 6px; }
.ag-strip-grid { display: grid; gap: 2px 0; padding: 0 2px; }

.ag-seg { min-width: 0; margin: 0 2px; padding: 0 7px; height: 20px; line-height: 20px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center; gap: 5px; color: var(--sh-ink); user-select: none; }
.ag-seg:hover { background: var(--sh-bg-soft); }
.ag-seg.barra { color: #fff; }
.ag-seg.barra:hover { filter: brightness(.94); background-blend-mode: normal; }
.ag-seg.cizq { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ag-seg.cder { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ag-seg span { overflow: hidden; text-overflow: ellipsis; }
.ag-seg b { font-size: 11px; color: var(--sh-ink-soft); font-weight: 700; flex: none; }
.ag-seg.cancelado { opacity: .55; text-decoration: line-through; }
.ag-seg.completado { opacity: .75; }
.ag-seg.arrastrando { opacity: .6; box-shadow: 0 8px 20px rgba(20,20,60,.3); z-index: 20; }
.ag-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; display: inline-block; }
.ag-dot.grande { width: 12px; height: 12px; }

.ag-cuerpo { display: flex; position: relative; }
.ag-horas { width: 56px; flex: none; }
.ag-hora { height: 52px; position: relative; }
.ag-hora span { position: absolute; top: -7px; right: 8px; font-size: 10.5px; color: var(--sh-muted); font-weight: 600; white-space: nowrap; }
.ag-cols { flex: 1; min-width: 0; display: grid; }
.ag-col { position: relative; height: 1248px; border-left: 1px solid var(--sh-border); background-image: linear-gradient(to bottom, var(--sh-border) 1px, transparent 1px); background-size: 100% 52px; cursor: crosshair; user-select: none; }
.ag-col.hoy { background-color: #fbfaff; }
.ag-bloque { position: absolute; border-radius: 8px; overflow: hidden; cursor: grab; color: #fff; box-shadow: 0 1px 2px rgba(20,20,60,.18), 0 0 0 1.5px #fff; transition: box-shadow .12s ease, filter .12s ease; z-index: 2; }
.ag-bloque:hover { z-index: 4; box-shadow: 0 6px 16px -4px rgba(20,20,60,.35), 0 0 0 1.5px #fff; }
.ag-bloque-fondo { position: absolute; inset: 0; }
.ag-bloque-txt { position: relative; padding: 4px 8px 4px 9px; line-height: 1.25; font-size: 12px; pointer-events: none; display: flex; flex-direction: column; }
.ag-bloque-txt strong { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ag-bloque-txt strong i { margin-right: 5px; font-size: 11px; }
.ag-bloque-txt span, .ag-bloque-txt em { font-style: normal; opacity: .92; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-bloque.corto .ag-bloque-txt { flex-direction: row; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.ag-bloque.corto .ag-bloque-txt strong { white-space: nowrap; }
.ag-bloque.cancelado { opacity: .6; }
.ag-bloque.cancelado .ag-bloque-txt strong { text-decoration: line-through; }
.ag-bloque.cancelado .ag-bloque-fondo { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px); }
.ag-bloque.completado { opacity: .72; }
.ag-bloque.proceso::after { content: ''; position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.8); animation: ag-pulso 1.6s ease-out infinite; }
@keyframes ag-pulso { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 100% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } }
.ag-bloque.moviendo { opacity: .35; }
.ag-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; z-index: 3; }
.ag-resize::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: rgba(255,255,255,.65); opacity: 0; transition: opacity .12s ease; }
.ag-bloque:hover .ag-resize::after { opacity: 1; }
.ag-fantasma { position: absolute; left: 3px; right: 6px; border-radius: 8px; opacity: .85; z-index: 8; pointer-events: none; box-shadow: 0 10px 24px -8px rgba(20,20,60,.5); display: flex; padding: 4px 8px; }
.ag-fantasma span { color: #fff; font-size: 11.5px; font-weight: 700; }
.ag-ahora { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #ea4335; z-index: 5; pointer-events: none; }
.ag-ahora i { position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: #ea4335; }

.ag-mes { display: flex; flex-direction: column; flex: 1; }
.ag-mes-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--sh-border); }
.ag-mes-dow span { text-align: center; padding: 9px 0; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-muted); }
.ag-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 30px repeat(3, 22px) 22px; flex: 1; min-height: 124px; position: relative; border-bottom: 1px solid var(--sh-border); }
.ag-celda-mes { border-left: 1px solid var(--sh-border); cursor: pointer; transition: background .12s ease; }
.ag-semana .ag-celda-mes:first-child { border-left: none; }
.ag-celda-mes:hover { background: #fafaff; }
.ag-celda-mes.otro { background: #fbfbfd; }
.ag-celda-mes.destino { background: #efeafe !important; box-shadow: inset 0 0 0 2px var(--sh-purple); }
.ag-num { text-align: center; padding-top: 4px; pointer-events: none; }
.ag-num span { pointer-events: auto; display: inline-block; min-width: 24px; height: 24px; line-height: 24px; padding: 0 5px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--sh-ink); cursor: pointer; }
.ag-num span:hover { background: var(--sh-bg-soft); }
.ag-num span.otro { color: #b8bdd3; }
.ag-num span.hoy { background: var(--sh-purple); color: #fff; font-weight: 800; }
.ag-mas { border: none; background: none; text-align: left; padding: 0 9px; font-size: 11.5px; font-weight: 700; color: var(--sh-ink-soft); cursor: pointer; border-radius: 6px; margin: 0 2px; }
.ag-mas:hover { background: var(--sh-bg-soft); }

.ag-lista { padding: 6px 20px 24px; overflow: auto; max-height: 920px; min-height: 420px; }
.ag-grupo { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 22px; padding: 14px 0; border-bottom: 1px solid var(--sh-border); }
.ag-grupo-fecha { display: flex; align-items: center; gap: 10px; color: var(--sh-ink-soft); align-self: start; }
.ag-grupo-fecha b { font-size: 26px; font-weight: 500; color: var(--sh-ink); min-width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 50%; }
.ag-grupo-fecha span { display: inline-block; font-size: 12.5px; font-weight: 600; }
.ag-grupo-fecha span::first-letter { text-transform: uppercase; }
.ag-grupo-fecha.hoy b { background: var(--sh-purple); color: #fff; font-weight: 700; }
.ag-grupo-evs { display: flex; flex-direction: column; gap: 2px; }
.ag-fila-ev { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; cursor: pointer; transition: background .12s ease; }
.ag-fila-ev:hover { background: var(--sh-bg-soft); }
.ag-fila-hora { width: 150px; flex: none; font-size: 12.5px; color: var(--sh-ink-soft); }
.ag-fila-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-fila-txt strong { font-size: 14px; color: var(--sh-ink); }
.ag-fila-txt small { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--sh-muted); }
.ag-fila-txt small i { margin-right: 4px; }
.ag-fila-ev.cancelado .ag-fila-txt strong { text-decoration: line-through; opacity: .6; }
.ag-fila-ev.completado { opacity: .75; }

.ag-pop-fondo { position: fixed; inset: 0; z-index: 1090; }
.ag-pop { position: fixed; z-index: 1095; width: 360px; max-width: calc(100vw - 16px); max-height: calc(100vh - 20px); overflow: auto; padding: 22px 22px 18px; background: #fff; border-radius: 20px; box-shadow: 0 28px 70px -18px rgba(20,20,60,.55), 0 0 0 1px var(--sh-border); animation: modal-pop .15s ease; }
.ag-pop-barra { position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 20px 20px 0 0; }
.ag-pop-acc { display: flex; justify-content: flex-end; gap: 4px; margin: -6px -8px 4px 0; }
.ag-pop h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--sh-ink); line-height: 1.25; word-break: break-word; }
.ag-pop h3.cancelado { text-decoration: line-through; opacity: .6; }
.ag-pop-cuando { margin: 0 0 8px; font-size: 13px; color: var(--sh-ink-soft); }
.ag-pop-fila { display: flex; gap: 12px; padding: 5px 0; font-size: 13.5px; color: var(--sh-ink); line-height: 1.45; word-break: break-word; }
.ag-pop-fila > i:first-child { width: 16px; flex: none; margin-top: 4px; color: #a3a7ba; font-size: 13px; text-align: center; }
.ag-pop-fila > i.ag-dot { width: 12px; height: 12px; margin: 4px 2px 0 2px; }
.ag-pop-fila small { color: var(--sh-ink-soft); }
.ag-link { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--sh-purple); }
.ag-pre { white-space: pre-wrap; }
.ag-final { background: #e7f8f0; margin: 6px -8px 0; padding: 9px 8px; border-radius: 12px; }
.ag-final > i:first-child { color: #1f9d6c; }
.ag-pop-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sh-border); }

.ag-editor .ag-titulo-in { color: var(--sh-ink); height: 52px; font-size: 20px; font-weight: 600; border-radius: 0; border: none; border-bottom: 2px solid var(--sh-border); background: none; padding: 0 4px; margin-bottom: 14px; box-shadow: none !important; }
.ag-editor .ag-titulo-in:focus { border-bottom-color: var(--sh-purple); }
.ag-editor label i { color: #a3a7ba; margin-right: 6px; width: 14px; text-align: center; }
.ag-cuando { margin-bottom: 14px; }
.ag-cuando-fila { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ag-cuando-fila > i { width: 26px; color: #a3a7ba; text-align: center; }
.ag-cuando-fila .form-control { width: auto; flex: 0 0 auto; height: 42px; border-radius: 10px; }
.ag-a { color: var(--sh-muted); font-size: 13px; }
.ag-aviso-fin { margin-left: 18px; font-size: 12px; font-weight: 600; color: #de4f68; }
.ag-seccion { padding: 14px 16px 2px; margin-bottom: 14px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.ag-cli-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #efeafe; border: 1px solid #dcd2fb; border-radius: 12px; }
.ag-cli-chip strong { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-cli-chip span { font-size: 12.5px; color: var(--sh-ink-soft); }
.ag-emps { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-emps button { border: 1.5px solid var(--sh-border); background: #fff; color: var(--sh-ink-soft); border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s ease; }
.ag-emps button:hover { border-color: #dcd2fb; color: var(--sh-purple); }
.ag-emps button.on { background: var(--sh-gradient); border-color: transparent; color: #fff; }
.ag-calform { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); border-radius: 16px; }
.ag-calform.off { opacity: .6; }
.ag-calform .form-control { flex: 1 1 160px; min-width: 120px; }
.ag-color { width: 40px; height: 40px; padding: 2px; border: 1px solid var(--sh-border); border-radius: 12px; background: #fff; cursor: pointer; }
.ag-paleta { display: flex; gap: 5px; }
.ag-paleta button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--sh-border); cursor: pointer; padding: 0; }
.ag-paleta button:hover { transform: scale(1.2); }

@media (max-width: 899px) {
  .ag-app { flex-direction: column; }
  .ag-lateral { width: 100%; border-right: none; border-bottom: 1px solid var(--sh-border); display: none; padding: 14px 16px; }
  .ag-lateral.abierto { display: flex; }
  .ag-burger { display: inline-flex; }
  .ag-titulo { font-size: 17px; flex-basis: 100%; order: 5; margin: 0; }
  .ag-buscar { flex: 1 1 140px; }
  .ag-scroll { height: calc(100vh - 220px); }
  .ag-grupo { grid-template-columns: 1fr; gap: 6px; }
  .ag-fila-hora { width: 96px; font-size: 11.5px; }
  .ag-semana { min-height: 104px; }
  .ag-atajos { display: none; }
}

/* ============ DIOT mensual ============ */
.dt-pg .fd-note { margin-bottom: 14px; }
.dt-pg .fd-note a { font-weight: 700; text-decoration: underline; }
.dt-sep { color: var(--sh-muted); margin: 0 4px; }
.dt-cab { display: grid; grid-template-columns: minmax(240px, 1.3fr) minmax(260px, 1.4fr) auto; gap: 18px; align-items: center; margin-bottom: 16px; }
.dt-cab-tit h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--sh-ink); }
.dt-cab-tit p { margin: 0; font-size: 12.5px; color: var(--sh-ink-soft); }
.dt-estado { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #eceef5; color: var(--sh-ink-soft); }
.dt-estado > i { font-size: 20px; margin-top: 2px; }
.dt-estado strong { display: block; font-size: 14px; color: var(--sh-ink); }
.dt-estado span { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; }
.dt-estado.wait { background: #fdf6e1; } .dt-estado.wait > i { color: #cc9a2e; }
.dt-estado.ok { background: #e7f8f0; } .dt-estado.ok > i { color: #1f9d6c; }
.dt-estado.main { background: #efeafe; } .dt-estado.main > i { color: #6c4cf0; }
.dt-cab-acc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dt-stats { margin-bottom: 16px; }
.dt-stat-rev.pend { cursor: pointer; box-shadow: 0 0 0 2px #f3c6dc inset; }
.dt-conf { margin: 22px 0 0; border-left: 4px solid #cc9a2e; }
.dt-conf.lista { border-left-color: #1f9d6c; }
.dt-conf.hecha { border-left-color: #6c4cf0; }
.dt-conf strong { font-size: 15px; color: var(--sh-ink); }
.dt-conf strong i { margin-right: 6px; }
.dt-conf p { margin: 4px 0 10px; font-size: 13px; color: var(--sh-ink-soft); }
.dt-check { display: block; margin: 6px 0 12px; font-weight: 600; font-size: 13.5px; }
.dt-nota { display: block; margin-top: 8px; font-size: 11.5px; color: var(--sh-muted); }
.dt-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.dt-menu { position: relative; display: inline-block; }
.dt-menu-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: #fff; border: 1px solid var(--sh-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(20,20,60,.18); padding: 6px; }
.dt-menu-lista button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--sh-ink); }
.dt-menu-lista button small { display: block; color: var(--sh-muted); font-size: 11.5px; }
.dt-menu-lista button:hover { background: var(--sh-bg-soft); }
.dt-ayuda { font-size: 12px; color: var(--sh-muted); margin: 6px 2px 10px; }
.dt-leyenda { margin-left: 10px; white-space: nowrap; }
.dt-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 3px 0 10px; border: 1px solid rgba(0,0,0,.1); }
.dt-sw.na { background: #f1f2f7; } .dt-sw.cero { background: #fff; } .dt-sw.rev { background: #fff3c4; } .dt-sw.err { background: #ffd9d9; } .dt-sw.mod { background: #e6f0ff; }

.dt-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--sh-border); border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(20,20,60,.06); }
.dt-tabla { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: max-content; }
.dt-tabla th, .dt-tabla td { border-right: 1px solid #eef0f6; border-bottom: 1px solid #eef0f6; padding: 0; }
.dt-tabla thead th { position: sticky; background: #fff; z-index: 3; text-align: center; font-weight: 700; color: var(--sh-ink-soft); padding: 6px 8px; white-space: nowrap; }
.dt-g1 th { top: 0; font-size: 12.5px; letter-spacing: .02em; color: #fff !important; }
.dt-g2 th { top: 31px; font-size: 11.5px; background: #f6f7fb; }
.dt-g3 th { top: 59px; font-size: 11px; min-width: 104px; white-space: normal; line-height: 1.25; vertical-align: bottom; background: #fafbfe; }
.dt-g3 .dt-n { display: block; color: var(--sh-muted); font-size: 10px; font-weight: 800; }
.dt-g1 .g-tercero { background: #5b3df0; } .dt-g1 .g-valor { background: #2f6bff; } .dt-g1 .g-acred { background: #1f9d6c; }
.dt-g1 .g-noacred { background: #d9822b; } .dt-g1 .g-adic { background: #7b7f99; }
.dt-g3 .g-tercero { border-bottom: 3px solid #5b3df0; } .dt-g3 .g-valor { border-bottom: 3px solid #2f6bff; } .dt-g3 .g-acred { border-bottom: 3px solid #1f9d6c; }
.dt-g3 .g-noacred { border-bottom: 3px solid #d9822b; } .dt-g3 .g-adic { border-bottom: 3px solid #7b7f99; }
.dt-sticky { position: sticky; z-index: 2; background: #fff; }
.dt-a { left: 0; min-width: 250px; max-width: 250px; }
.dt-b { left: 250px; min-width: 84px; max-width: 84px; text-align: center; box-shadow: 4px 0 6px -4px rgba(20,20,60,.18); }
.dt-tabla thead .dt-sticky { z-index: 5; background: #f6f7fb; }
.dt-a, .dt-b { padding: 8px 10px !important; }
.dt-b small { display: block; font-size: 10px; color: var(--sh-muted); font-weight: 600; }
.dt-tabla tbody tr:hover td { background: #fafbff; }
.dt-tabla tbody tr:hover .dt-sticky { background: #f6f7fd; }
.dt-tabla tr.excl td { opacity: .5; }
.dt-prov { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.dt-prov-txt { min-width: 0; }
.dt-prov-txt strong { display: block; font-size: 12.5px; color: var(--sh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.dt-prov-txt small { display: block; color: var(--sh-muted); font-size: 11px; }
.dt-prov-txt .ui-pill { margin: 3px 4px 0 0; font-size: 10px; padding: 1px 7px; }
.dt-prov-acc { display: flex; gap: 2px; flex: none; }
.dt-prov-acc .icon-btn { width: 24px; height: 24px; font-size: 11px; }
.dt-fila-aviso { display: block; width: 100%; margin-top: 6px; text-align: left; border: 0; background: #fff3c4; color: #7a5b10; border-radius: 8px; padding: 4px 8px; font-size: 11px; line-height: 1.3; cursor: pointer; }
.dt-c { text-align: right; position: relative; min-width: 104px; cursor: text; }
.dt-celda { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 7px 8px; min-height: 34px; }
.dt-val { font-variant-numeric: tabular-nums; color: var(--sh-ink); }
.dt-pais { color: var(--sh-muted); font-size: 10.5px; }
.dt-c.na { background: #f1f2f7; cursor: default; text-align: center; }
.dt-na { display: block; text-align: center; padding: 7px 8px; color: #b6b9cc; }
.dt-c.cero .dt-val { color: var(--sh-muted); }
.dt-c.rev { background: #fff3c4; }
.dt-c.err { background: #ffd9d9; }
.dt-c.mod { background: #e6f0ff; }
.dt-c.rev.mod { background: linear-gradient(135deg, #fff3c4 50%, #e6f0ff 50%); }
.dt-c:not(.na):hover { outline: 2px solid #b7a8ff; outline-offset: -2px; }
.dt-in { width: 100%; min-width: 88px; border: 2px solid var(--sh-purple); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; text-align: right; outline: none; background: #fff; }
.dt-edit-err { display: block; color: #c0392b; font-size: 10.5px; text-align: right; white-space: normal; max-width: 160px; }
.dt-sel { border: 1px solid var(--sh-border); border-radius: 6px; padding: 3px 4px; font-size: 12px; background: #fff; max-width: 150px; }
.dt-sel:disabled { background: transparent; border-color: transparent; color: var(--sh-ink); -webkit-appearance: none; appearance: none; }
.dt-ic { border: 0; background: none; cursor: pointer; padding: 0 2px; font-size: 12px; }
.dt-ic.rev { color: #cc9a2e; } .dt-ic.err { color: #d63a3a; }
.dt-mod-ic { font-style: normal; color: #2f6bff; font-size: 12px; font-weight: 800; }
.dt-vacio { text-align: center; padding: 30px !important; color: var(--sh-muted); }
.dt-pie { font-size: 11.5px; color: var(--sh-muted); margin: 10px 2px 0; }
.dt-pop-fondo { position: fixed; inset: 0; z-index: 90; }
.dt-pop { position: fixed; z-index: 91; width: 300px; background: #fff; border: 1px solid var(--sh-border); border-radius: 14px; box-shadow: 0 16px 40px rgba(20,20,60,.25); padding: 14px; }
.dt-pop strong { font-size: 13px; color: var(--sh-ink); }
.dt-pop strong i { color: #cc9a2e; margin-right: 5px; }
.dt-pop p { font-size: 12.5px; color: var(--sh-ink-soft); margin: 8px 0; line-height: 1.45; }
.dt-pop p.err { color: #c0392b; font-weight: 600; }
.dt-pop-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-cambio { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sh-border); font-size: 13px; align-items: start; }
.dt-cambio b { font-size: 11.5px; color: var(--sh-purple); }
.dt-cambio small { display: block; color: var(--sh-muted); font-size: 11.5px; }
.dt-quien { text-align: right; white-space: nowrap; }
.dt-hist { display: grid; grid-template-columns: 1fr 1.2fr auto auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--sh-border); font-size: 13px; }
.dt-hist small { display: block; color: var(--sh-muted); font-size: 11.5px; }
.dt-hash { font-family: monospace; }
@media (max-width: 900px) {
  .dt-cab { grid-template-columns: 1fr; }
  .dt-cab-acc { justify-content: flex-start; }
  .dt-hist { grid-template-columns: 1fr; }
  .dt-cambio { grid-template-columns: 1fr; }
  .dt-quien { text-align: left; }
  .dt-a { min-width: 190px; max-width: 190px; } .dt-b { left: 190px; }
  .dt-prov-txt strong { max-width: 110px; }
}
.dt-g1 .dt-sticky { color: var(--sh-ink-soft) !important; background: #f6f7fb; font-size: 12.5px; }

/* ============ Login ============ */
.lg-page { position: relative; overflow: hidden; min-height: calc(100vh - 28px); display: flex; align-items: center; justify-content: center; padding: 28px 16px 36px;
  background: radial-gradient(120% 120% at 10% 0%, #eceeff 0%, #f6f7fc 48%, #ffffff 100%); }
.lg-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.lg-blob.b1 { width: 380px; height: 380px; background: #b9a9ff; top: -120px; left: -90px; }
.lg-blob.b2 { width: 340px; height: 340px; background: #a9c6ff; bottom: -110px; right: -80px; }
.lg-blob.b3 { width: 200px; height: 200px; background: #ffd6ec; top: 40%; right: 30%; opacity: .35; }
.lg-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; width: 100%; max-width: 440px; }
.lg-brand { display: none; }
.lg-card { background: #fff; border: 1px solid var(--sh-border); border-radius: 28px; padding: 34px 30px 26px; text-align: center;
  box-shadow: 0 30px 70px -28px rgba(60,40,160,.35), 0 8px 20px -10px rgba(20,20,60,.12); }
.lg-card-logo img { height: 46px; width: auto; max-width: 100%; margin: 0 auto 18px; display: block; }
.lg-card h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--sh-ink); }
.lg-sub { margin: 0 0 24px; color: var(--sh-muted); font-size: 14px; }
.lg-card form { text-align: left; }
.lg-label { display: block; margin: 0 0 6px 4px; font-size: 12.5px; font-weight: 700; color: var(--sh-ink-soft); }
.lg-field { position: relative; margin-bottom: 16px; }
.lg-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #a3a7c0; font-size: 15px; pointer-events: none; transition: color .15s; }
.lg-field input { width: 100%; height: 54px; border: 2px solid #e6e8f3; border-radius: 16px; background: #f7f8fc; padding: 0 48px 0 46px; font-size: 16px; color: var(--sh-ink); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.lg-field input::placeholder { color: #a9adc4; }
.lg-field input:hover { border-color: #d6d9ee; }
.lg-field input:focus { background: #fff; border-color: var(--sh-purple); box-shadow: 0 0 0 5px rgba(91,61,240,.12); }
.lg-field:focus-within .lg-ico { color: var(--sh-purple); }
.lg-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: #9a9eb8; cursor: pointer; font-size: 15px; }
.lg-eye:hover { background: #eef0fb; color: var(--sh-purple); }
.lg-error { display: flex; align-items: flex-start; gap: 10px; margin: -2px 0 16px; padding: 12px 14px; border-radius: 14px; background: #fdecee; color: #b3303f; font-size: 13.5px; font-weight: 600; line-height: 1.4; animation: lg-sacude .35s; }
.lg-error i { margin-top: 2px; }
@keyframes lg-sacude { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.lg-btn { width: 100%; height: 56px; border: 0; border-radius: 16px; background: var(--sh-gradient); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 4px;
  box-shadow: 0 16px 30px -12px rgba(76,61,240,.7); transition: transform .15s, box-shadow .15s, opacity .15s, filter .15s; }
.lg-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 34px -12px rgba(76,61,240,.8); }
.lg-btn:active:not(:disabled) { transform: translateY(0); }
.lg-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; filter: saturate(.6); }
.lg-btn i { margin-left: 8px; transition: transform .15s; }
.lg-btn:hover:not(:disabled) i { transform: translateX(3px); }
.lg-help { margin: 20px 0 8px; font-size: 12.5px; color: var(--sh-muted); line-height: 1.5; }
.lg-help i { margin-right: 5px; color: #b7a8ff; }
.lg-back { display: inline-block; font-size: 13px; font-weight: 700; color: var(--sh-purple); padding: 6px 12px; border-radius: 10px; }
.lg-back:hover { background: #efeafe; text-decoration: none; }
.lg-back i { margin-right: 6px; font-size: 11px; }

@media (min-width: 960px) {
  .lg-shell { max-width: 980px; grid-template-columns: 1.05fr 1fr; gap: 0; background: #fff; border-radius: 36px; overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(60,40,160,.45), 0 10px 24px -12px rgba(20,20,60,.15); }
  .lg-card { border: 0; border-radius: 0; box-shadow: none; padding: 54px 48px 36px; display: flex; flex-direction: column; justify-content: center; }
  .lg-card-logo { display: none; }
  .lg-card h1 { font-size: 30px; }
  .lg-brand { display: flex; flex-direction: column; justify-content: center; padding: 54px 46px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(145deg, #4d34e6 0%, #5b3df0 40%, #2f6bff 100%); }
  .lg-brand::before, .lg-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
  .lg-brand::before { width: 320px; height: 320px; right: -120px; top: -100px; }
  .lg-brand::after { width: 220px; height: 220px; left: -80px; bottom: -80px; }
  .lg-brand > * { position: relative; z-index: 1; }
  .lg-brand-logo { align-self: flex-start; background: #fff; border-radius: 18px; padding: 10px 18px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.45); margin-bottom: 34px; }
  .lg-brand-logo img { height: 36px; width: auto; display: block; }
  .lg-brand h2 { margin: 0 0 12px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: #fff; }
  .lg-brand p { margin: 0 0 28px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.86); max-width: 380px; }
  .lg-mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .lg-mods li { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 11px 14px; backdrop-filter: blur(4px); }
  .lg-mods strong { display: block; font-size: 14px; color: #fff; }
  .lg-mods small { display: block; font-size: 12px; color: rgba(255,255,255,.78); }
  .lg-mod-ico { width: 42px; height: 42px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: #fff; }
  .lg-mod-ico.m1 { color: #7a5af8; } .lg-mod-ico.m2 { color: #e8932f; } .lg-mod-ico.m3 { color: #2f6bff; } .lg-mod-ico.m4 { color: #1f9d6c; }
}
@media (max-width: 420px) {
  .lg-card { padding: 28px 20px 22px; border-radius: 24px; }
  .lg-card h1 { font-size: 23px; }
}

/* ============ Ajustes para celular ============ */
@media (max-width: 767px) {
  .fiscal-card .listaRow { flex-direction: column; align-items: stretch !important; gap: 12px; cursor: default; }
  .fiscal-card .listaRow > div:first-child { min-width: 0; overflow-wrap: anywhere; }
  .fiscal-card .listaRowActions { flex-wrap: wrap; gap: 8px; }
  .fiscal-card .listaRowActions .btn { flex: 1 1 auto; min-height: 38px; }
  .fiscal-card .listaRowActions .btn[title="Contabilidad Mensual"], .fiscal-card .listaRowActions .btn[title="DIOT Mensual"] { flex: 1 1 100%; }
}
.dt-fin { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; color: var(--sh-muted); font-size: 12px; }
.dt-fin span { flex: 1; height: 1px; background: var(--sh-border); }
.dt-fin em { font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.dt-final { height: 140px; }

/* ============ Ancho maximo del contenido en pantallas grandes (margen a los lados) ============ */
.fd-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; }
.fd-wrap.wrap-m  { max-width: 1360px; }   /* existencias: lista + carrito */
.fd-wrap.wrap-l  { max-width: 1520px; }   /* agenda, contabilidad */
.fd-wrap.wrap-xl { max-width: 1780px; }   /* DIOT: tabla de 54 columnas */

/* ============ Historial: movimientos agrupados y pendientes ============ */
.hm-pend-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; border-radius: 16px; background: #fff8e8; border: 1px solid #f3e6c4; }
.hm-pend-bar.on { box-shadow: 0 0 0 2px #f3d9a0 inset; }
.hm-pend-txt { flex: 1 1 260px; min-width: 0; }
.hm-pend-txt strong { display: block; font-size: 14px; color: var(--sh-ink); }
.hm-pend-txt small { display: block; font-size: 12.5px; color: #8a6d1d; margin-top: 2px; line-height: 1.4; }
.hm-lista { display: flex; flex-direction: column; gap: 14px; }
.hm-grupo { padding: 0 !important; margin-bottom: 0 !important; overflow: hidden; }
.hm-head { display: flex; align-items: center; gap: 14px; padding: 15px 20px; background: #fafbff; border-bottom: 1px solid var(--sh-border); }
.hm-grupo.pend .hm-head { background: #fffaf0; }
.hm-tit { flex: 1; min-width: 0; }
.hm-tit strong { display: block; font-size: 14.5px; color: var(--sh-ink); }
.hm-tit small { display: block; font-size: 12.5px; color: var(--sh-muted); margin-top: 2px; line-height: 1.4; }
.hm-items { padding: 4px 20px 6px; }
.hm-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f1f7; }
.hm-item:last-of-type { border-bottom: 0; }
.hm-qty { flex: none; min-width: 44px; font-weight: 800; color: var(--sh-purple); font-size: 14px; }
.hm-item-txt { flex: 1; min-width: 0; }
.hm-item-txt strong { display: block; font-size: 13.5px; color: var(--sh-ink); font-weight: 600; }
.hm-item-txt small { display: block; font-size: 11.5px; color: var(--sh-muted); word-break: break-all; }
.hm-resto { flex: none; font-size: 11.5px; color: var(--sh-muted); white-space: nowrap; }
.hm-acc { flex: none; display: flex; gap: 6px; }
.hm-mas { border: 0; background: none; color: var(--sh-purple); font-weight: 700; font-size: 12.5px; padding: 10px 0 8px; cursor: pointer; }
.hm-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; background: #fffaf0; border-top: 1px solid #f3e6c4; font-size: 13px; color: #7a5b10; font-weight: 600; }
.hm-aviso-perm { margin: 0; padding: 0 20px 14px; font-size: 12px; color: var(--sh-muted); }
.hm-aviso-perm i { margin-right: 5px; }
@media (max-width: 700px) {
  .hm-head { flex-wrap: wrap; padding: 14px; }
  .hm-items { padding: 4px 14px 6px; }
  .hm-item { flex-wrap: wrap; }
  .hm-foot { padding: 12px 14px; }
  .hm-aviso-perm { padding: 0 14px 12px; }
}

/* ============ Espacio al final de cada pantalla: se nota que ahi termina y no se encima con la franja demo ============ */
.fd-wrap { padding-bottom: 120px; }
.dash-wrap { padding-bottom: 120px; }
.fiscal-card { margin-bottom: 120px; }
.dt-final { height: 20px; }
/* Aviso flotante: no empuja el contenido, asi la pantalla no se mueve de donde estabas */
.hm-toast { position: fixed; left: 50%; bottom: 56px; transform: translateX(-50%); z-index: 1300; display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; background: #1f9d6c; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 16px 34px -12px rgba(20,80,60,.55); animation: modal-pop .18s ease; }

/* ============ Historial: seriales de un articulo ============ */
.sr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.sr-tile { text-align: left; border: 2px solid var(--sh-border); background: #fff; border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sr-tile span { display: block; font-size: 12.5px; font-weight: 700; color: var(--sh-muted); }
.sr-tile strong { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 4px; color: var(--sh-ink); }
.sr-tile:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(45,40,130,.5); }
.sr-tile.on.en-tienda { border-color: #1f9d6c; background: #f0fbf6; } .sr-tile.on.en-tienda strong { color: #1f9d6c; }
.sr-tile.on.retiro { border-color: #d9822b; background: #fff8ee; } .sr-tile.on.retiro strong { color: #c46f1c; }
.sr-tile.on.vendido { border-color: #5b3df0; background: #f4f1ff; } .sr-tile.on.vendido strong { color: #5b3df0; }
.sr-tile.on.fuera { border-color: #868aa3; background: #f4f5f9; }
.sr-lista { margin-top: 18px; border-top: 1px solid var(--sh-border); }
.sr-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) 2fr 110px; gap: 14px; align-items: center; padding: 11px 6px; border-bottom: 1px solid #f0f1f7; font-size: 13px; cursor: pointer; }
.sr-row:not(.sr-head):hover { background: #f8f7ff; }
.sr-head { cursor: default; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-muted); }
.sr-sn { font-weight: 700; color: var(--sh-ink); word-break: break-all; }
.sr-sn i { color: var(--sh-purple); margin-right: 6px; }
.sr-sn small { font-weight: 500; color: var(--sh-muted); }
@media (max-width: 700px) { .sr-row { grid-template-columns: 1fr; gap: 4px; } .sr-head { display: none; } }

/* ============ Catalogo: categorias de Anunciamex ============ */
.cat-amx-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--sh-border); }
.amx-filas { margin: 6px 0 14px; max-height: 46vh; overflow-y: auto; border: 1px solid var(--sh-border); border-radius: 14px; }
.amx-fila { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.2fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f0f1f7; }
.amx-fila:last-child { border-bottom: 0; }
.amx-fila small { display: block; color: var(--sh-muted); font-size: 11.5px; }
.amx-head { position: sticky; top: 0; background: #f6f7fb; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-muted); }
@media (max-width: 700px) { .amx-fila { grid-template-columns: 1fr; } .amx-head { display: none; } }

/* ---------- Conciliaciones bancarias (Fiscal) ---------- */
.bk-pg .fd-note { margin-bottom: 14px; }
.bk-stats { margin-bottom: 16px; }
.bk-estados-cab { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.bk-estados-cab h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--sh-ink); }
.bk-estados-cab p { margin: 0; font-size: 13px; color: var(--sh-ink-soft); max-width: 640px; }
.bk-subir { position: relative; overflow: hidden; cursor: pointer; margin: 0; color: #fff; }
.bk-tabla .ui-pill { white-space: nowrap; }
.bk-subir input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bk-subir.is-off { opacity: .55; pointer-events: none; }
.bk-lista { display: flex; flex-direction: column; gap: 12px; }
.bk-edo { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--sh-border); border-radius: 14px; background: #fff; }
.bk-edo-ico { width: 44px; height: 44px; border-radius: 12px; background: #e9f1ff; color: #3b63e0; display: grid; place-items: center; font-size: 19px; }
.bk-edo-info strong { display: block; font-size: 15px; color: var(--sh-ink); }
.bk-edo-info span { display: block; font-size: 12.5px; color: var(--sh-ink-soft); margin-top: 2px; }
.bk-edo-estado { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bk-edo-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bk-sel { max-width: 220px; height: 40px; }
.bk-scroll { max-height: 70vh; }
.bk-tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.bk-tabla th { position: sticky; top: 0; z-index: 2; background: #f6f7fb; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--sh-ink-soft); padding: 10px 12px; border-bottom: 1px solid var(--sh-border); white-space: nowrap; }
.bk-tabla td { padding: 9px 12px; border-bottom: 1px solid #eef0f6; vertical-align: top; }
.bk-tabla tbody tr:hover td { background: #fafbff; }
.bk-sort { cursor: pointer; user-select: none; } .bk-sort i { opacity: .45; margin-left: 4px; font-size: 10px; }
.bk-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-in { color: #1f9d6c; font-weight: 600; } .bk-out { color: #c2410c; font-weight: 600; } .bk-sal { color: var(--sh-muted); }
.bk-fecha { white-space: nowrap; color: var(--sh-ink-soft); }
.bk-concepto { min-width: 220px; max-width: 520px; word-break: break-word; }
.bk-concepto small { color: var(--sh-muted); }
.bk-cfdi { color: var(--sh-muted); }
.bk-fuera td { background: #fffbea; }
.bk-ico-fuera { color: #cc9a2e; margin-left: 6px; }
.bk-flag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: #efeafe; color: #6c4cf0; }
.bk-modal { max-width: 920px; }
.bk-det { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; margin: 4px 0 14px; }
.bk-det-fila label { display: block; font-size: 12px; font-weight: 700; color: var(--sh-ink-soft); margin-bottom: 4px; }
.bk-det-val { padding: 8px 0; font-size: 14px; color: var(--sh-ink); }
.bk-cols, .bk-prev { margin: 14px 0; }
.bk-cols h4, .bk-prev h4, .bk-val h4 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--sh-ink); }
.bk-col { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed #eef0f6; }
.bk-col-txt { min-width: 150px; font-weight: 600; color: var(--sh-ink-soft); }
.bk-col i { color: var(--sh-muted); }
.bk-col-tipo { font-weight: 800; color: #6c4cf0; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; }
.bk-col-sel { max-width: 240px; height: 36px; }
.bk-hint { font-size: 12px; color: var(--sh-muted); margin: 8px 0 0; }
.bk-val { border-radius: 14px; padding: 14px 16px; background: #f6f7fb; margin: 14px 0; }
.bk-val.ok { background: #e7f8f0; } .bk-val.ok h4 { color: #1f6f4e; }
.bk-val.error { background: #fdeaec; } .bk-val.error h4 { color: #b4233f; }
.bk-val-item { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 3px 0; font-size: 13px; color: var(--sh-ink-soft); }
.bk-val-item i { width: 16px; color: #1f9d6c; } .bk-val-item.mal i { color: #de4f68; } .bk-val-item.mal { color: #7f1d2d; font-weight: 600; }
.bk-val-item small { flex-basis: 100%; margin-left: 26px; font-weight: 500; color: #7f1d2d; }
.bk-cuadro { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.08); font-size: 12.5px; color: var(--sh-ink-soft); }
.bk-adv { list-style: none; padding: 0; margin: 12px 0; font-size: 12.5px; color: var(--sh-ink-soft); } .bk-adv li { padding: 3px 0; } .bk-adv i { color: #cc9a2e; margin-right: 4px; }
.bk-mini td { padding: 6px 10px; font-size: 12.5px; }
.bk-pregunta { margin-top: 18px; font-size: 15px; color: var(--sh-ink); }
@media (max-width: 720px) { .bk-edo { grid-template-columns: 1fr; } .bk-edo-estado { align-items: flex-start; } .bk-edo-acc { justify-content: flex-start; } }
/* Conciliaciones: texto legible en el boton de subir y ancho comodo en pantallas grandes */
.bk-pg { max-width: 1240px; margin-left: auto; margin-right: auto; }
.ui-card label.btn-ui.bk-subir, label.btn-ui.bk-subir:hover { color: #fff; font-weight: 700; }
@media (min-width: 1500px) { .bk-pg { max-width: 1320px; } }

/* ---- Conciliaciones bancarias, fase 2: estados del cruce ---- */
.ui-pill.info { background: #e8f1ff; color: #2f5fd0; }
.bk-conc { margin: 4px 0 18px; padding: 18px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--sh-border); box-shadow: 0 6px 24px rgba(40,40,100,.05); }
.bk-conc-cab { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.bk-conc-cab h3, .bk-sin-cab h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--sh-ink); }
.bk-conc-cab p, .bk-sin-cab p { margin: 0; font-size: 13px; color: var(--sh-ink-soft); max-width: 760px; }
.bk-est-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.bk-est { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i n" "i l"; column-gap: 12px; align-items: center; text-align: left; border: 2px solid transparent; border-radius: 16px; padding: 12px 16px; cursor: pointer; transition: transform .12s, box-shadow .12s; font-family: inherit; }
.bk-est i { grid-area: i; font-size: 24px; }
.bk-est b { grid-area: n; font-size: 24px; line-height: 1.1; }
.bk-est span { grid-area: l; font-size: 12.5px; font-weight: 600; }
.bk-est:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40,40,100,.10); }
.bk-est.on { border-color: currentColor; }
.bk-est.ok { background: #e7f8f0; color: #1f9d6c; } .bk-est.warn { background: #fff4d6; color: #a86a00; } .bk-est.bad { background: #fdeaec; color: #d0364f; } .bk-est.info { background: #e8f1ff; color: #2f5fd0; }
.bk-est b, .bk-est span { color: var(--sh-ink); }
.bk-sinresp { margin: 14px 0 0; font-size: 13px; color: #7a5200; background: #fff8e1; border-radius: 12px; padding: 10px 14px; }
.bk-sinresp i { margin-right: 6px; }
.bk-quitar-f { border: 0; background: #efeafe; color: #6c4cf0; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
/* la celda se pinta segun el estado: amarillo = requiere revision (lo que el contador debe decidir) */
.bk-st-Revision .bk-cel, .bk-st-Revision .bk-imp, .bk-st-Pendiente .bk-cel, .bk-st-Pendiente .bk-imp { background: #fff3c4; }
.bk-st-Discrepancia .bk-cel, .bk-st-Discrepancia .bk-imp { background: #fde1e5; }
.bk-st-Conciliado .bk-cel { background: #e9f8f1; }
.bk-st-Identificado .bk-cel { background: #eaf2ff; }
.bk-tabla tbody tr.bk-st-Revision:hover td.bk-cel, .bk-tabla tbody tr.bk-st-Revision:hover td.bk-imp { background: #ffec9e; }
.bk-th-cfdi { min-width: 300px; }
.bk-cfdi { color: var(--sh-ink); min-width: 300px; max-width: 460px; }
.bk-chip { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 600; color: #1d6b4d; margin-bottom: 4px; }
.bk-chip i { margin-top: 3px; font-size: 11px; }
.bk-chip.sug { color: #8a6d1d; font-weight: 500; } .bk-chip em { font-style: normal; font-weight: 700; }
.bk-chip b { font-weight: 500; color: var(--sh-ink-soft); }
.bk-motivo { font-size: 12px; color: var(--sh-ink-soft); line-height: 1.35; }
.bk-nada { color: var(--sh-muted); }
.bk-cel-est { min-width: 150px; white-space: nowrap; }
.bk-sug { display: block; font-size: 11.5px; color: var(--sh-ink-soft); margin-top: 4px; }
.bk-det-link { display: block; font-size: 11.5px; margin-top: 4px; }
.bk-sin { margin-top: 18px; }
.bk-sin-cab { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.bk-sin-cab > div { flex: 1; }
.bk-sin-cab > i { color: var(--sh-muted); }
.bk-sm-efectivo td { color: var(--sh-muted); }
.bk-conf { font-weight: 500; font-size: 12px; color: var(--sh-ink-soft); }
.bk-mov-concepto { margin: 6px 0; font-size: 14.5px; font-weight: 600; color: var(--sh-ink); } .bk-mov-concepto small { color: var(--sh-muted); font-weight: 500; }
.bk-mov-motivo { margin: 6px 0 0; font-size: 13px; color: var(--sh-ink-soft); }
.bk-vinc { padding: 10px 0; border-bottom: 1px dashed #e4e7f0; }
.bk-vinc-t { font-size: 14px; color: var(--sh-ink); } .bk-vinc-t i { color: #6c4cf0; margin-right: 6px; }
.bk-vinc-s { font-size: 12.5px; color: var(--sh-ink-soft); margin-top: 3px; } .bk-vinc-s.mono { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--sh-muted); }
.bk-cancel { color: #d0364f; font-weight: 800; }

/* ---- fase 3: decisiones del contador ---- */
.bk-conc-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-chk { width: 34px; text-align: center; padding-left: 8px !important; padding-right: 4px !important; }
.bk-bulk { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #efeafe; border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.bk-bulk .form-control { max-width: 260px; height: 38px; }
.bk-clas { color: #5b3df0; font-weight: 600; }
.bk-acciones { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef0f6; }
.bk-acciones h4 { margin: 0 0 12px; font-size: 14px; font-weight: 800; color: var(--sh-ink); }
.bk-acc-bloque { margin-bottom: 16px; }
.bk-acc-bloque > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--sh-ink-soft); margin-bottom: 6px; }
.bk-acc-fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bk-acc-fila .form-control { flex: 1 1 200px; height: 40px; }
.bk-link { border: 0; background: none; color: #6c4cf0; font-size: 12.5px; font-weight: 600; padding: 6px 0; cursor: pointer; }
.bk-res { margin-top: 10px; max-height: 280px; overflow: auto; border: 1px solid #eef0f6; border-radius: 12px; }
.bk-res-fila { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #f1f2f8; font-size: 13px; }
.bk-res-fila small { color: var(--sh-ink-soft); }
.bk-res-acc { display: flex; gap: 6px; align-items: center; } .bk-res-acc .form-control { width: 110px; height: 34px; }
.bk-exacto { color: #1f9d6c; font-weight: 700; }
.bk-hist { padding: 7px 0; border-bottom: 1px dashed #e4e7f0; font-size: 13px; color: var(--sh-ink); } .bk-hist small { color: var(--sh-ink-soft); }

/* revision partida en dos: amarillo = por confirmar, naranja = sin coincidencia */
.ui-pill.orange { background: #ffe4cc; color: #b34a00; }
.bk-est.orange { background: #ffe4cc; color: #b34a00; }
.bk-est-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.bk-st-Confirmar .bk-cel, .bk-st-Confirmar .bk-imp { background: #fff3c4; }
.bk-st-SinMatch .bk-cel, .bk-st-SinMatch .bk-imp { background: #ffdcb8; }
.bk-st-Revision .bk-cel, .bk-st-Revision .bk-imp, .bk-st-Pendiente .bk-cel, .bk-st-Pendiente .bk-imp { background: transparent; }
.bk-tabla tbody tr.bk-st-Confirmar:hover td.bk-cel, .bk-tabla tbody tr.bk-st-Confirmar:hover td.bk-imp { background: #ffec9e; }
.bk-tabla tbody tr.bk-st-SinMatch:hover td.bk-cel, .bk-tabla tbody tr.bk-st-SinMatch:hover td.bk-imp { background: #ffcf9c; }

/* confirmar directo en la tabla */
.bk-ok { margin-left: auto; flex: none; border: 0; background: #1f9d6c; color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px; cursor: pointer; white-space: nowrap; }
.bk-ok:hover { background: #178058; } .bk-ok[disabled] { opacity: .6; cursor: default; }
.bk-ok i { margin-right: 4px; font-size: 10px; }

/* botones de confirmar en la columna de estado: texto completo, a la derecha */
.bk-cel-est { min-width: 210px; max-width: 250px; white-space: normal; }
.bk-acc-est { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bk-acc-est .bk-ok { margin-left: 0; white-space: normal; text-align: left; line-height: 1.25; border-radius: 12px; padding: 6px 10px; }
.bk-acc-est .bk-ok { max-width: 100%; box-sizing: border-box; display: block; }

/* ---- boton y ventana de ayuda de los modulos de Fiscal ---- */
.ayuda-host { position: relative; }
.ayuda-wrap { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 3; }
.ayuda-btn { border: 1.5px solid rgba(255,255,255,.65); background: rgba(255,255,255,.16); color: #fff; font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: background .15s; font-family: inherit; }
.ayuda-btn:hover { background: rgba(255,255,255,.3); }
.ayuda-btn i { margin-right: 6px; }
@media (max-width: 640px) { .ayuda-wrap { position: static; transform: none; margin-bottom: 10px; text-align: center; } }
.ayuda-modal { max-width: 860px; text-align: left; }
.ayuda-modal .iv-title i { color: #6c4cf0; margin-right: 8px; }
.ayuda-img { margin: 6px 0 14px; text-align: center; } .ayuda-img img { max-width: 100%; border-radius: 16px; border: 1px solid var(--sh-border); }
.ayuda-bloque { margin: 14px 0; }
.ayuda-bloque h4 { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--sh-ink); }
.ayuda-bloque p, .ayuda-bloque li { font-size: 13.5px; line-height: 1.5; color: var(--sh-ink-soft); }
.ayuda-bloque ol, .ayuda-bloque ul { margin: 0; padding-left: 20px; } .ayuda-bloque li { padding: 3px 0; }
.ayuda-resumen { background: #f4f1ff; border-radius: 14px; padding: 12px 16px; } .ayuda-resumen p { margin: 0; color: var(--sh-ink); }
.ayuda-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }
.ayuda-ojo { background: #fff8e1; border-radius: 14px; padding: 10px 16px; } .ayuda-ojo h4 i { color: #cc9a2e; }
.ayuda-color { padding: 4px 0; font-size: 13px; color: var(--sh-ink-soft); } .ayuda-color .ui-pill { min-width: 120px; text-align: center; margin-right: 8px; }

/* ---- Inicio: plan contratado vs uso ---- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 32px; }
.plan-card { background: #fff; border: 1px solid var(--sh-border); border-radius: 18px; padding: 18px 20px; box-shadow: 0 10px 26px -20px rgba(45,40,130,.35); }
.plan-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.plan-ico { width: 34px; height: 34px; border-radius: 11px; background: #efeafe; color: #6c4cf0; display: grid; place-items: center; font-size: 15px; }
.plan-nombre { font-size: 13.5px; font-weight: 700; color: var(--sh-ink); }
.plan-num { font-size: 26px; font-weight: 800; color: var(--sh-ink); line-height: 1.1; } .plan-num small { font-size: 13px; font-weight: 600; color: var(--sh-muted); }
.plan-barra { height: 9px; border-radius: 999px; background: #eceef5; margin: 12px 0 8px; overflow: hidden; }
.plan-barra span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7c5cf6, #4f7cf0); transition: width .5s ease; }
.plan-card.warn .plan-barra span { background: linear-gradient(90deg, #f6b73c, #f08a3c); }
.plan-card.full .plan-barra span { background: linear-gradient(90deg, #ef5b6e, #d0364f); }
.plan-card.full { border-color: #f3b5be; }
.plan-pie { font-size: 12.5px; color: var(--sh-ink-soft); margin-top: 6px; } .plan-pie b { color: var(--sh-ink); }
.plan-card.full .plan-pie { color: #b4233f; font-weight: 600; }

/* ---- cuentas demo ---- */
.demo-banner-bar.demo-cuenta { background: #efeafe; color: #4a35b8; border-top-color: #d9d0fb; font-weight: 600; }
.demo-banner-bar.demo-cuenta.vencido { background: #fdeaec; color: #b4233f; border-top-color: #f3b5be; }
.demo-card { background: linear-gradient(135deg, #f4f1ff, #eef4ff); border: 1px solid #ddd6fb; border-radius: 22px; padding: 22px 26px; margin-bottom: 26px; }
.demo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.demo-card h3 { margin: 0; font-size: 19px; font-weight: 800; color: var(--sh-ink); }
.demo-card p { margin: 8px 0 0; font-size: 13.5px; color: var(--sh-ink-soft); line-height: 1.5; }
.demo-pasos { list-style: none; padding: 0; margin: 14px 0 6px; display: grid; gap: 10px; }
.demo-pasos li { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--sh-ink); background: rgba(255,255,255,.7); border-radius: 14px; padding: 10px 14px; }
.demo-pasos li b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #6c4cf0; color: #fff; display: grid; place-items: center; font-size: 13px; }
.demo-pasos li span { flex: 1; }
.demo-priv { font-size: 12.5px !important; } .demo-priv i { color: #1f9d6c; margin-right: 4px; }
.fiscal-ejemplo { display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; color: #6c4cf0; background: #efeafe; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.fd-ejemplo-nota { background: #efeafe; border: 1px solid #d9d0fb; color: #4a35b8; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 13px; }
.fd-ejemplo-nota i { margin-right: 8px; }

.plan-act { font-weight: 500; color: var(--sh-muted); font-size: 12px; margin-left: 6px; }

/* ---- liberar espacio (archivo de CFDI) ---- */
.fd-liberar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fd-liberar-txt strong { display: block; font-size: 14.5px; color: var(--sh-ink); margin-bottom: 3px; } .fd-liberar-txt strong i { color: #6c4cf0; margin-right: 6px; }
.fd-liberar-txt span { font-size: 13px; color: var(--sh-ink-soft); max-width: 720px; display: block; line-height: 1.45; }
.fd-archivo-nota { background: #fff4d6; border-color: #f0dca0; color: #7a5200; }
.fd-ok-nota { background: #e7f8f0; border-color: #a7e3c8; color: #1f6f4e; }
.fd-lib-uso { background: #f4f1ff; border-radius: 14px; padding: 10px 14px; margin: 6px 0 12px; font-size: 14px; color: var(--sh-ink); }
.fd-lib-aviso { font-size: 13px; color: var(--sh-ink-soft); } .fd-lib-hint { display: block; margin-top: 6px; color: var(--sh-muted); line-height: 1.4; }
.fd-lib-res { background: #fff8e1; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; color: var(--sh-ink); } .fd-lib-res ul { margin: 8px 0 12px 18px; padding: 0; color: var(--sh-ink-soft); } .fd-lib-res li { margin: 3px 0; line-height: 1.4; }
.plan-tip { margin-top: 4px; color: var(--sh-ink-soft); } .plan-tip a { font-weight: 700; }

/* ---------- Existencias: costos/precios (acceso total), lapiz de editar y descontinuados ---------- */
.iv-costos { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--sh-muted); }
.iv-cost b { font-weight: 700; color: #6b6f8a; }
.iv-cost em { font-style: normal; font-size: 11px; color: #a3a7ba; }
.iv-cost.costo b { color: #8a5a1f; }
.iv-prod-acc { display: flex; align-items: center; gap: 8px; }
.iv-desc { margin-top: 26px; }
.iv-desc-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; font-size: 13px; font-weight: 700; color: var(--sh-muted); }
.iv-prod.desc { background: #f8f8fc; border-style: dashed; }
.iv-prod.desc .iv-prod-main > strong { color: #6b6f8a; }
.iv-prod.desc .cat-thumb { opacity: .65; filter: grayscale(.6); }

/* Cursor de los buscadores: visible, en el color de la marca y a la altura del texto */
input, textarea { caret-color: var(--sh-purple); }
.ui-search .form-control, .ui-card .ui-search .form-control, .topbar-search input { height: 24px; line-height: 24px; padding-left: 2px; }

/* ---------- Fiscal: documentos del SAT (constancia de situacion fiscal / opinion de cumplimiento) ---------- */
.ds-modal { max-width: 560px; }
.ds-ico { background: #efeafe; color: #6c4cf0; }
.ds-sub { margin: -2px 0 16px; font-size: 13px; color: var(--sh-muted); }
.ds-aviso, .ds-msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; margin-bottom: 12px; }
.ds-aviso { background: #fdf6e1; color: #8a6d1d; }
.ds-msg.ok { background: #e7f8f0; color: #1f9d6c; font-weight: 600; }
.ds-msg.bad { background: #fdecee; color: #b3303f; font-weight: 600; }
.ds-aviso i, .ds-msg i { margin-top: 2px; }
.ds-box, .ds-doc { border: 1px solid var(--sh-border); border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; background: #fff; box-shadow: 0 10px 26px -22px rgba(45,40,130,.35); }
.ds-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ds-box-head strong { font-size: 14px; color: var(--sh-ink); }
.ds-hint { margin: 6px 0 10px; font-size: 12.5px; color: var(--sh-muted); line-height: 1.5; }
.ds-hint.bad { color: #b3303f; font-weight: 600; }
.ds-ciec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ds-field { position: relative; flex: 1 1 200px; }
.ds-field .form-control { height: 42px; border-radius: 12px; padding-right: 44px; }
.ds-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: #9a9eb8; cursor: pointer; }
.ds-eye:hover { background: #eef0fb; color: var(--sh-purple); }
.ds-doc-top { display: flex; align-items: center; gap: 12px; }
.ds-doc-ico { width: 44px; height: 44px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--card-icon-bg); color: var(--card-icon); }
.ds-doc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ds-doc-title strong { font-size: 14px; color: var(--sh-ink); }
.ds-doc-title span { font-size: 12px; color: var(--sh-muted); }
.ds-vigencia { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: #e7f8f0; color: #1f9d6c; font-size: 12.5px; font-weight: 600; }
.ds-vigencia.vencida { background: #fdecee; color: #b3303f; }
.ds-doc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ds-hist { margin-top: 10px; font-size: 12px; color: var(--sh-muted); }
.ds-hist a { margin-left: 8px; color: var(--sh-purple); font-weight: 600; }
@media (max-width: 575px) { .ds-doc-actions .btn-ui, .ds-doc-actions .btn-ui-ghost { flex: 1 1 100%; } }


/* =====================================================================================================================
   Tema oscuro: fondo morado profundo (del morado del logo) y recuadros claros que resaltan encima.
   Lo que queda directo sobre el fondo (titulos, textos sueltos, avisos) va en claro; todo lo que vive dentro de un recuadro
   conserva sus colores. El login y la landing tienen su propio diseno.
   ===================================================================================================================== */
:root {
  --sh-dark: #190e3a;
  --sh-dark-2: #2a1678;
  --sh-on-dark: #f3f0ff;
  --sh-on-dark-soft: #c9c0f2;
}
html { background: var(--sh-dark); }
body {
  background:
    radial-gradient(1100px 620px at 90% -8%, rgba(91,61,240,.55), transparent 62%),
    radial-gradient(900px 560px at -8% 108%, rgba(47,107,255,.28), transparent 58%),
    var(--sh-dark);
  background-attachment: fixed;
  min-height: 100vh;
}

/* texto que queda directo sobre el fondo oscuro */
.dash-greeting, .dash-section-title { color: var(--sh-on-dark); }
.dash-subgreeting { color: var(--sh-on-dark-soft); }
.inview-header { background: linear-gradient(135deg, rgba(91,61,240,.42), rgba(47,107,255,.2)); border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 40px -26px rgba(0,0,0,.6); }
.inview-header-noIsLoggedIn, .inview-header-noIsLoggedIn h1, .inview-header-noIsLoggedIn p { color: var(--sh-on-dark); }

/* login sobre el mismo fondo oscuro */
.lg-page { background: transparent; }
.lg-blob { opacity: .32; }
.lg-blob.b1 { background: #5b3df0; }
.lg-blob.b2 { background: #2f6bff; }
.lg-blob.b3 { background: #b24ce0; opacity: .22; }
.lg-card, .lg-shell { box-shadow: 0 40px 80px -30px rgba(0,0,0,.65); }
/* avisos de pagina (errores de carga) y botones sueltos: siempre en recuadro claro sobre el fondo oscuro */
p.message.error { background: #fdeaec; color: #c0392b; border: 1px solid #f6c8cd; border-radius: 12px; padding: 11px 16px; font-weight: 600; }

/* celular: sin carril lateral; el boton flotante del carrito va abajo a la derecha, sobre el contenido */
@media (max-width: 767px) {
  .iv-split-main.con-fab .cu-search, .iv-split-main.con-fab .iv-products, .iv-split-main.con-fab .iv-desc { margin-right: 0; }
  .iv-fab-wrap { position: fixed; top: auto; bottom: 52px; right: 14px; left: auto; height: 0; width: 0; }
  .iv-fab { top: auto; bottom: 0; right: 0; }
}

/* =====================================================================================================================
   Contabilidad Mensual: Nomina y deducciones para ISR (tabla de CFDI de nomina, tratamiento fiscal y tarjetas de resumen)
   ===================================================================================================================== */
.nm-card { margin-top: 22px; }
.nm-ico { color: var(--sh-purple); margin-right: 8px; }
.nm-aviso { display: flex; gap: 10px; align-items: flex-start; background: #f4f1ff; border: 1px solid #e3dcff; border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--sh-ink-soft); margin: 0 0 14px; line-height: 1.5; }
.nm-aviso i { color: var(--sh-purple); margin-top: 2px; }
.nm-error { background: #fdeaec; color: #b4233f; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.nm-integra { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid; }
.nm-integra.si { background: #eefaf5; border-color: #c5ecd9; color: #1d6b4d; } .nm-integra.no { background: #f6f7fb; border-color: #e4e7f0; color: var(--sh-ink-soft); }
.nm-integra > i { font-size: 20px; flex: none; }
.nm-integra-txt { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.45; } .nm-integra-txt strong { font-size: 14px; color: var(--sh-ink); }
.nm-integra-sel { flex: none; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--sh-muted); margin: 0; } .nm-integra-sel .form-control { width: auto; height: 36px; border-radius: 10px; font-size: 13px; }
.nm-filtros { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.nm-filtros .form-control { height: 40px; border-radius: 12px; border: 1px solid var(--sh-border); box-shadow: none; font-size: 13.5px; }
.nm-busca { position: relative; } .nm-busca i { position: absolute; left: 13px; top: 13px; color: var(--sh-muted); } .nm-busca .form-control { padding-left: 36px; }
table.excel-table.nm-table { min-width: 1320px; }
.nm-trat { min-width: 210px; white-space: normal !important; }
.nm-sel { height: 34px; border-radius: 10px; font-size: 12.5px; border: 1.5px solid var(--sh-border); box-shadow: none; padding: 2px 8px; }
.nm-sug { margin-top: 4px; max-width: 230px; white-space: normal; line-height: 1.35; }
.nm-pend { color: #b8860b; font-size: 11.5px; font-weight: 700; white-space: normal; }
.nm-detalle > td { background: #fafbff; white-space: normal !important; }
.nm-avisos { background: #fdf6e1; border: 1px solid #f0dca0; color: #7a5314; border-radius: 12px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 10px; line-height: 1.5; } .nm-avisos i { margin-right: 6px; }
table.nm-conceptos { width: 100%; font-size: 12.5px; border-collapse: collapse; background: #fff; border: 1px solid #e9eaf3; border-radius: 12px; overflow: hidden; }
table.nm-conceptos th { background: #f1f2f9; padding: 7px 9px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--sh-muted); }
table.nm-conceptos td { padding: 7px 9px; border-top: 1px solid #f0f1f7; white-space: normal; }
table.nm-conceptos th.num, table.nm-conceptos td.num { text-align: right; }
.nm-regla { color: var(--sh-ink-soft); font-size: 12px; line-height: 1.4; max-width: 340px; }
.nm-otro td { color: var(--sh-muted); background: #fcfcfe; }
.nm-bitacora { margin-top: 10px; font-size: 12.5px; } .nm-cambio { padding: 4px 0; color: var(--sh-ink-soft); }
.nm-vacio { padding: 22px 8px; text-align: center; }
.nm-resumen { margin-top: 18px; }
.nm-grupo { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--sh-purple); margin: 6px 0 10px; } .nm-grupo small { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--sh-muted); }
.nm-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.nm-tiles-ded { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.nm-big { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--sh-ink); }
.nm-nota { font-size: 11.5px; color: var(--sh-muted); line-height: 1.4; } .nm-nota-inline { color: var(--sh-muted); font-size: 11px; }
.nm-desglose { font-size: 12.5px; color: var(--sh-ink-soft); display: flex; align-items: center; gap: 7px; }
.nm-desglose b { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; } .nm-ok { background: #1f9d6c; } .nm-prop { background: #7c5cf6; }
@media (max-width: 767px) { .nm-filtros { grid-template-columns: 1fr; } .nm-integra-sel { width: 100%; } .nm-integra-sel .form-control { flex: 1; } }

/* Descarga automatica del SAT (Fiscal) */
.sa-card { margin-top: 22px; }
.sa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .sa-head h4 { margin: 0; font-size: 17px; font-weight: 800; color: var(--sh-ink); } .sa-head h4 i { color: var(--sh-purple); margin-right: 8px; }
.sa-sub { color: var(--sh-muted); font-size: 13px; margin: 6px 0 14px; line-height: 1.5; }
.sa-pausa > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; } .sa-reanudar { padding: 5px 14px; }
.sa-opcion { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #f8f9fe; border: 1px solid #eceef8; border-radius: 16px; margin-bottom: 10px; }
.sa-texto { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .sa-texto strong { font-size: 14px; color: var(--sh-ink); } .sa-texto span { font-size: 12.5px; color: var(--sh-ink-soft); line-height: 1.45; } .sa-texto small { font-size: 11.5px; color: var(--sh-purple); font-weight: 600; }
.sa-sw { flex: none; width: 50px; height: 28px; border-radius: 999px; border: 0; background: #d6d9ea; position: relative; cursor: pointer; transition: background .15s; padding: 0; }
.sa-sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(40,40,80,.25); transition: left .15s; }
.sa-sw.on { background: #1f9d6c; } .sa-sw.on i { left: 25px; } .sa-sw:disabled { opacity: .55; cursor: not-allowed; }
.sa-hist-btn { background: none; border: 0; color: var(--sh-ink-soft); font-size: 12.5px; font-weight: 600; padding: 6px 0; cursor: pointer; } .sa-hist-btn i { width: 14px; margin-right: 4px; }
.sa-hist { margin-top: 6px; border: 1px solid #eceef8; border-radius: 14px; overflow: hidden; }
.sa-fila { display: grid; grid-template-columns: 1.3fr auto 2fr; gap: 12px; align-items: center; padding: 10px 14px; font-size: 12.5px; border-bottom: 1px solid #eceef8; } .sa-fila:last-child { border-bottom: 0; }
.sa-fila-p { font-weight: 600; color: var(--sh-ink); display: flex; flex-direction: column; } .sa-fila-p small { font-weight: 400; color: var(--sh-muted); font-size: 11.5px; } .sa-fila-m { color: var(--sh-ink-soft); }
@media (max-width: 767px) { .sa-opcion { align-items: flex-start; } .sa-fila { grid-template-columns: 1fr auto; } .sa-fila-m { grid-column: 1 / -1; } }

/* Botones por RFC (arriba del selector de mes) */
.fd-rfc-botones { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 24px 0 20px; }
.fd-rfc-btn { display: inline-flex; align-items: center; gap: 8px; } .fd-rfc-btn > i { color: var(--sh-purple); }
.fd-rfc-estado { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 4px; } .fd-rfc-estado.ok { background: #e7f8f0; color: #1f9d6c; } .fd-rfc-estado.off { background: #eceef5; color: var(--sh-muted); } .fd-rfc-estado.wait { background: #fdf6e1; color: #b8860b; }
.iv-modal .sa-sub { margin-top: 0; }

/* Agenda: donde es el evento, alta de domicilio y recordatorio por WhatsApp */
.ag-modal { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-modal button { border: 1.5px solid var(--sh-border); background: #fff; border-radius: 999px; padding: 8px 15px; font-weight: 700; font-size: 13px; color: var(--sh-ink-soft); cursor: pointer; font-family: inherit; } .ag-modal button i { margin-right: 6px; }
.ag-modal button.on { background: #efeafe; border-color: #cfc5fa; color: #5b3df0; }
.ag-nuevo-cli, .ag-sin-dom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fdf6e1; border: 1px solid #f0dca0; color: #7a5314; border-radius: 12px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; } .ag-sin-dom i { margin-right: 6px; }
.ag-nd { background: #f8f9fe; border: 1px solid #eceef8; border-radius: 14px; padding: 14px 14px 6px; } .ag-nd > strong { display: block; margin-bottom: 10px; font-size: 14px; } .ag-nd > strong i { color: var(--sh-purple); margin-right: 6px; }
.ag-recor { margin-left: auto; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ag-wa { background: #25d366 !important; border-color: #25d366 !important; color: #fff !important; text-decoration: none; } .ag-wa.hecho { background: #fff !important; color: #1f9d6c !important; border: 1.5px solid #bfe8d3 !important; }
.ag-recor-ok { color: #1f9d6c; font-size: 11.5px; font-weight: 600; } .ag-recor-ok a { color: var(--sh-muted); margin-left: 4px; text-decoration: none; }

/* Pin de mapa; detalle del evento como hoja inferior en celular (con scroll propio) */
.ag-pin { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ag-pin .form-control { flex: 1 1 220px; min-width: 0; } .ag-pin a.btn-ui-ghost { text-decoration: none; }
.ag-pop { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 800px) {
  .ag-pop-fondo { background: rgba(20,20,60,.35); }
  .ag-pop { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; border-radius: 20px 20px 0 0; max-height: 88vh !important; max-height: 88dvh !important; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: ag-sheet .18s ease; }
}
@keyframes ag-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 800px) {
  .ag-fila-ev { flex-wrap: wrap; row-gap: 8px; }
  .ag-fila-txt { flex: 1 1 140px; min-width: 0; }
  .ag-recor { margin-left: 0; width: 100%; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding-left: 4px; }
}

/* Agenda a pantalla completa: sin banner, sin margenes; la cuadricula ocupa todo el alto disponible */
.ag-page .row { margin-left: 0 !important; margin-right: 0 !important; }
.ag-page .col-md-12, .ag-page .marginDiv { padding-left: 0 !important; padding-right: 0 !important; margin: 0 !important; }
.ag-page .fd-wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.ag-page .row[style*="margin:15px 0"] { margin-top: 0 !important; margin-bottom: 0 !important; }
.ag-page .ag-app { margin: 0 !important; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; height: calc(100vh - var(--sh-topbar-h, 64px) - 28px); height: calc(100dvh - var(--sh-topbar-h, 64px) - 28px); min-height: 420px; }
.ag-page .ag-main { min-height: 0; }
.ag-page .ag-scroll { flex: 1 1 0; height: auto; min-height: 0; max-height: none; }
.ag-page .ag-toolbar { padding: 10px 14px; }
.ag-page .ag-lateral { overflow-y: auto; }
@media (max-width: 800px) {
  .ag-page .ag-toolbar { padding: 8px 10px; gap: 8px; }
  .ag-page .ag-app { min-height: 360px; }
}

/* celular: barra de la agenda en 2 renglones (buscar se vuelve icono y se abre al tocarlo) para dejar mas espacio a la cuadricula */
@media (max-width: 800px) {
  .ag-page .ag-titulo { order: 4; font-size: 14px; margin: 0; flex: 1 1 90px; line-height: 1.2; }
  .ag-page .ag-buscar { order: 5; flex: 0 0 38px; width: 38px; min-width: 0; max-width: 38px; }
  .ag-page .ag-buscar input { width: 38px; padding-left: 0; padding-right: 0; color: transparent; cursor: pointer; }
  .ag-page .ag-buscar input::placeholder { color: transparent; }
  .ag-page .ag-buscar:focus-within { flex: 1 1 100%; order: 6; width: 100%; max-width: none; }
  .ag-page .ag-buscar:focus-within input { width: 100%; padding-left: 34px; padding-right: 30px; color: inherit; cursor: text; }
  .ag-page .ag-buscar:focus-within input::placeholder { color: #9a9eb8; }
  .ag-page .ag-vistas { order: 7; width: 100%; display: flex; }
  .ag-page .ag-vistas button { flex: 1; padding: 6px 0; }
}

/* Foto (logo) del perfil de la empresa */
.pf-foto { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.pf-foto-img { width: 96px; height: 96px; flex: none; border-radius: 50%; background: #f1f2fa; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--sh-border), 0 10px 24px -14px rgba(40,40,100,.5); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #b9bdd4; font-size: 34px; }
.pf-foto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-foto-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 240px; } .pf-foto-txt strong { font-size: 14.5px; color: var(--sh-ink); } .pf-foto-txt > span { font-size: 12.5px; color: var(--sh-muted); line-height: 1.45; }
.pf-foto-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .pf-foto-btns label.btn-ui { margin: 0; cursor: pointer; } .pf-foto-btns label.disabled { opacity: .6; pointer-events: none; }

/* deslizar para cambiar de periodo: el scroll vertical sigue funcionando, lo horizontal lo maneja la agenda */
.ag-main .ag-scroll, .ag-main .ag-mes, .ag-main .ag-lista { touch-action: pan-y pinch-zoom; }

/* Cliente nuevo desde el evento */
.ag-link-btn { margin-left: 8px; border: none; background: none; padding: 0; color: var(--sh-purple); font-size: 12px; font-weight: 700; cursor: pointer; } .ag-link-btn:hover { text-decoration: underline; }
.iv-sug-nuevo { background: #f6f3ff; } .iv-sug-nuevo strong { color: #5b3df0; } .iv-sug-nuevo strong i { margin-right: 6px; }

/* Contabilidad mensual: el recuadro grande en lila claro y los chicos de adentro en blanco, para que se distingan */
.fd-wrap .ui-card.fd-status, .fd-wrap .ui-card.fd-actions, .fd-wrap .ui-card.cierre-panel { background: #f1edfe; border-color: #ddd4fb; }
.fd-wrap .fd-status .fd-tile, .fd-wrap .cierre-panel .cierre-col { background: #fff; border-color: #e0d9f8; box-shadow: 0 1px 3px rgba(91,61,240,.08); }

/* tambien las tarjetas de Egresos, Ingresos y Nomina en lila claro: sus tablas, avisos y tarjetitas van en blanco */
.fd-wrap .ui-card.fd-table-card { background: #f1edfe; border-color: #ddd4fb; }
.fd-wrap .fd-table-card .excel-wrap { background: #fff; border-color: #e0d9f8; box-shadow: 0 1px 3px rgba(91,61,240,.08); }
.fd-wrap .nm-card .fd-tile, .fd-wrap .nm-card .nm-aviso, .fd-wrap .nm-card .nm-integra { background: #fff; border-color: #e0d9f8; box-shadow: 0 1px 3px rgba(91,61,240,.08); }
.fd-wrap .nm-card .nm-filtros .form-control { background: #fff; }

/* acciones de la fila del catalogo: duplicar + descontinuar lado a lado */
.iv-row.cat .c-act { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* Existencias: vista publica del articulo (modal) */
.iv-prod.clic { cursor: pointer; }
.vp { max-width: 940px; }
.vp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.vp-big { aspect-ratio: 1 / 1; border-radius: 20px; background: var(--sh-bg-soft); border: 1px solid var(--sh-border); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.vp-big img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.vp-big.vacio { color: #c4c8dc; font-size: 56px; }
.vp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vp-thumbs button { width: 58px; height: 58px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--sh-border); background: #fff; cursor: pointer; }
.vp-thumbs button.on { border-color: var(--sh-purple); }
.vp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-info { min-width: 0; }
.vp-cat { display: block; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--sh-purple); margin-bottom: 4px; }
.vp-titulo { margin: 0 0 4px; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--sh-ink); }
.vp-modelo { display: block; color: var(--sh-ink-soft); margin-bottom: 10px; }
.vp-precio { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; }
.vp-precio strong { font-size: 30px; font-weight: 800; color: var(--sh-ink); }
.vp-precio small { color: var(--sh-muted); font-weight: 600; }
.vp-otros { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--sh-ink-soft); margin-bottom: 8px; }
.vp-desc { white-space: pre-line; line-height: 1.55; color: var(--sh-ink-soft); margin: 12px 0; }
.vp-datos { margin: 10px 0; border-top: 1px solid var(--sh-border); }
.vp-datos > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--sh-border); }
.vp-datos dt { font-weight: 600; color: var(--sh-ink-soft); }
.vp-datos dd { margin: 0; text-align: right; font-weight: 600; color: var(--sh-ink); }
.vp-exist { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.vp-tags { display: flex; gap: 6px 10px; flex-wrap: wrap; color: var(--sh-purple); font-weight: 600; font-size: 12.5px; }
.vp-amx { margin: 12px 0 0; font-size: 12.5px; color: #1f6f4e; font-weight: 600; }
@media (max-width: 767px) {
  .vp-grid { grid-template-columns: 1fr; gap: 16px; }
  .vp-titulo { font-size: 19px; }
}


/* Agenda: descripcion y reporte (el doble de alto que antes y crecen al escribir) */
.ag-area { min-height: 170px; max-height: 60vh; resize: vertical; line-height: 1.45; overflow-y: hidden; }
.ag-reporte .ag-area { background: #fbfaff; }

/* Agenda en celular: la pagina no hace scroll; la agenda ocupa exactamente lo que hay en pantalla */
@media (max-width: 800px) {
  html.ag-lock, html.ag-lock body { overflow: hidden; height: 100%; overscroll-behavior: none; }
  html.ag-lock body { padding-bottom: 0; }
}
.ag-main .ag-scroll, .ag-main .ag-mes, .ag-main .ag-lista { overscroll-behavior: contain; }

/* Aviso de que se esta viendo la copia guardada (sin internet) */
.ag-offline { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff6e0; color: #7a5200; border-bottom: 1px solid #f0dca0; font-size: 12.5px; line-height: 1.4; }
.ag-offline > i { flex: none; }
.ag-offline > span { flex: 1; min-width: 0; }
.ag-offline .btn-ui-sm { flex: none; }


/* Carrito: nombre del articulo clicable (abre sus datos), nota de serial, sugeridos en una sola fila y seriales en la ventana de cobro */
.iv-linea-ver { cursor: pointer; }
.iv-linea-ver i { margin-left: 4px; font-size: 12px; color: var(--sh-purple); opacity: .75; }
.iv-linea-ver:hover { color: var(--sh-purple); }
.iv-serial-nota { margin-top: 8px; font-size: 11.5px; color: var(--sh-muted); }
.iv-serial-nota i { margin-right: 5px; color: var(--sh-purple); }
.iv-sugeridos { padding: 8px 12px 10px; margin-bottom: 10px; }
.iv-sugeridos > small { margin-bottom: 6px; }
.iv-sug-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.iv-sug-chips::-webkit-scrollbar { display: none; }
.iv-sug-chips button { flex: none; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-pago-seriales { margin: 0 0 18px; padding: 14px; background: #f8f7fd; border: 1px solid #ece9fb; border-radius: 16px; }
.iv-pago-seriales-tit { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-muted); margin-bottom: 4px; }
.iv-pago-seriales-tit i { color: var(--sh-purple); } .iv-pago-seriales-tit small { text-transform: none; letter-spacing: 0; font-weight: 700; color: #b8860b; } .iv-pago-seriales-tit small.ok { color: #1f9d6c; }
.iv-pago-linea { margin-top: 10px; } .iv-pago-linea > strong { display: block; font-size: 13.5px; color: var(--sh-ink); }
.iv-pago-linea .iv-seriales { margin-top: 8px; padding-top: 0; border-top: none; }
