/* =====================================================================
   Clixvet · administrador (paleta Clixvet: azul #2f5bea, violeta #6d3fe0, coral #ff7a59, marino #14204a)
   Mismo estilo de Bloch: barra lateral oscura con foto, barra superior
   de color, tarjetas de indicadores y paneles blancos. Letra Poppins.
   ===================================================================== */
:root {
  --adm-primary: #2f5bea;
  --adm-primary-dark: #1e3fb8;
  --adm-primary-soft: #e8eefd;
  --adm-blue: #1e88e5;
  --adm-teal: #26c39a;
  --adm-purple: #6f42c1;
  --adm-orange: #f39c12;
  --adm-red: #e04646;
  --adm-accent: #ff7a59;
  --adm-violet: #6d3fe0;
  --adm-side: #101936;
  --adm-side-w: 250px;
  --adm-bg: #f4f6fb;
  --adm-ink: #222a40;
  --adm-muted: #7a838c;
  --adm-line: #e6e9ec;
  --adm-radius: 6px;
  --bs-primary: var(--adm-primary);
  --bs-primary-rgb: 47, 91, 234;
  --bs-link-color: var(--adm-primary);
  --bs-link-color-rgb: 47, 91, 234;
  --bs-link-hover-color: var(--adm-primary-dark);
}
body.adm, body.auth-body { font-family: "Poppins", system-ui, sans-serif; font-size: .9rem; color: var(--adm-ink); background: var(--adm-bg); }
a { color: var(--adm-primary); }
.btn { border-radius: var(--adm-radius); font-weight: 500; }
.btn-primary { background: var(--adm-primary); border-color: var(--adm-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--adm-primary-dark); border-color: var(--adm-primary-dark); }
.btn-outline-primary { color: var(--adm-primary); border-color: var(--adm-primary); }
.btn-outline-primary:hover { background: var(--adm-primary); border-color: var(--adm-primary); }
.btn-soft { background: var(--adm-primary-soft); color: var(--adm-primary-dark); border: 0; }
.btn-soft:hover { background: #d3defb; color: var(--adm-primary-dark); }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: var(--adm-radius); }
.form-control, .form-select { border-radius: var(--adm-radius); font-size: .9rem; border-color: #d8dde2; }
.form-control:focus, .form-select:focus { border-color: var(--adm-primary); box-shadow: 0 0 0 .2rem rgba(47,91,234,.15); }
.form-check-input:checked { background-color: var(--adm-primary); border-color: var(--adm-primary); }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }
.form-text { font-size: .78rem; }
.text-muted, .text-soft { color: var(--adm-muted) !important; }

/* ---------- Barra lateral ---------- */
.adm-side {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--adm-side-w); z-index: 1040;
  background: linear-gradient(rgba(16,25,54,.92), rgba(16,25,54,.97)), var(--side-image) center/cover;
  color: rgba(255,255,255,.75); display: flex; flex-direction: column; overflow-y: auto; transition: transform .25s;
}
.side-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; height: 60px; color: #fff; text-decoration: none; font-size: 1.15rem; flex: 0 0 auto; }
.side-brand span { font-weight: 300; }
.side-brand strong { font-weight: 700; }
.side-brand:hover { color: #fff; }
.side-user { text-align: center; padding: 1rem 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-avatar { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .6rem; background: rgba(255,255,255,.92); color: var(--adm-primary); font-weight: 700; font-size: 1.6rem; border: 3px solid rgba(255,255,255,.25); }
.side-user strong { display: block; color: #fff; font-weight: 600; }
.side-user small { display: block; color: rgba(255,255,255,.55); font-size: .75rem; margin-bottom: .6rem; }
.side-user-actions { display: flex; justify-content: center; gap: 1.1rem; }
.side-user-actions a { color: #fff; font-size: 1.05rem; opacity: .85; }
.side-user-actions a:hover { opacity: 1; color: var(--adm-accent); }
.side-nav { padding: .75rem 0 2rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-title { margin: 1.1rem 0 .35rem; padding: 0 1.25rem; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.side-link { display: flex; align-items: center; gap: .85rem; padding: .62rem 1.25rem; color: rgba(255,255,255,.8); text-decoration: none; border-left: 3px solid transparent; font-size: .87rem; }
.side-link i { width: 18px; text-align: center; font-size: .95rem; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--adm-accent); font-weight: 500; }
.side-link.is-soon { opacity: .4; cursor: default; }
.side-link.is-soon:hover { background: none; color: rgba(255,255,255,.8); }
.side-badge, .side-count { margin-left: auto; font-style: normal; font-size: .65rem; font-weight: 600; border-radius: 999px; padding: .1rem .45rem; }
.side-badge { background: rgba(255,255,255,.18); color: #fff; }
.side-count { background: var(--adm-red); color: #fff; }
.side-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--adm-orange); box-shadow: 0 0 0 3px rgba(243,156,18,.25); }
.side-alert { margin-left: auto; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff6b5e; box-shadow: 0 0 0 3px rgba(255,107,94,.22); }
.side-backdrop { display: none; }

/* ---------- Principal ---------- */
.adm-main { margin-left: var(--adm-side-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin .25s; }
.adm-top { position: sticky; top: 0; z-index: 1030; height: 60px; background: var(--adm-primary); display: flex; align-items: center; gap: .5rem; padding: 0 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.top-btn { position: relative; border: 0; background: none; color: #fff; height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: var(--adm-radius); font-size: 1.05rem; text-decoration: none; padding: 0 .6rem; }
.top-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.top-btn-text { font-size: .82rem; font-weight: 500; }
.top-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff5b5b; border: 2px solid var(--adm-primary); }
.top-pending { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.14); color: #fff; text-decoration: none; padding: .35rem .5rem .35rem .8rem; border-radius: 999px; font-size: .8rem; }
.top-pending strong { background: #fff; color: var(--adm-primary-dark); border-radius: 999px; padding: .15rem .65rem; font-weight: 600; }
.top-pending:hover { background: rgba(255,255,255,.22); color: #fff; }
.top-pending i { color: #ffd166; }
.adm-content { flex: 1; padding: 1.5rem 1.75rem 2rem; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.35rem; }
.adm-title { font-size: 1.55rem; font-weight: 400; margin: 0; }
.adm-title small { font-size: .9rem; color: var(--adm-muted); margin-left: .35rem; }
.adm-crumbs { font-size: .8rem; display: flex; gap: .45rem; align-items: center; color: var(--adm-muted); }
.adm-crumbs a { color: var(--adm-ink); text-decoration: none; }
.adm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1rem 1.75rem; background: #fff; border-top: 1px solid var(--adm-line); font-size: .8rem; color: var(--adm-muted); }
.adm-foot a { color: var(--adm-ink); }
body.side-collapsed .adm-side { transform: translateX(-100%); }
body.side-collapsed .adm-main { margin-left: 0; }
@media (max-width: 991.98px) {
  .adm-side { transform: translateX(-100%); }
  .adm-main { margin-left: 0; }
  body.side-open .adm-side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
  .adm-content { padding: 1.1rem 1rem 1.5rem; }
  .top-pending span { display: none; }
}

/* ---------- Paneles ---------- */
/* Sección: borde propio y cabecera en verde suave con una franja del color principal, para que no se confunda con el fondo */
.panel { background: #fff; border: 1px solid #dce2ee; border-radius: var(--adm-radius); box-shadow: 0 1px 4px rgba(16,25,54,.06); margin-bottom: 1.5rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid #d3ddf8; background: var(--adm-head, #e9eefc); box-shadow: inset 4px 0 0 var(--adm-primary); border-radius: calc(var(--adm-radius) - 1px) calc(var(--adm-radius) - 1px) 0 0; }
.panel-head .panel-title { font-weight: 500; color: #1b2a55; }
.panel-head .panel-title > i:first-child, .panel-head .panel-title > .fa-solid:first-child { color: var(--adm-primary); }
.panel-title { font-size: 1.15rem; font-weight: 400; margin: 0; }
.panel-title small { color: var(--adm-muted); font-size: .8rem; margin-left: .25rem; }
.panel-tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.panel-body { padding: 1.25rem; }
.panel-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--adm-line); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.panel-note { background: #f8f9fa; border-radius: var(--adm-radius); padding: .8rem 1rem; font-size: .82rem; color: var(--adm-muted); }

/* Indicadores (KPI) */
.kpi { display: flex; justify-content: space-between; align-items: flex-start; border-radius: var(--adm-radius); padding: 1.3rem 1.3rem 1.1rem; color: #fff; min-height: 120px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.kpi:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.kpi i { font-size: 2.2rem; opacity: .9; }
.kpi-value { font-size: 2.3rem; font-weight: 300; line-height: 1; text-align: right; }
.kpi-label { font-size: .82rem; text-align: right; margin-top: .4rem; }
.kpi-sub { font-size: .72rem; text-align: right; opacity: .85; }
.kpi-blue { background: var(--adm-blue); }
.kpi-teal { background: var(--adm-teal); }
.kpi-purple { background: var(--adm-purple); }
.kpi-orange { background: var(--adm-orange); }
.kpi-green { background: var(--adm-primary); }

/* Tablas */
.table-adm { margin: 0; font-size: .86rem; }
.table-adm th { font-weight: 600; color: var(--adm-ink); border-bottom-width: 1px; background: #fafbfc; white-space: nowrap; padding: .75rem 1rem; }
.table-adm td { padding: .75rem 1rem; vertical-align: middle; color: #4a525a; }
.table-adm tr.is-new td { font-weight: 600; color: var(--adm-ink); }
.table-adm tr.is-hidden td { opacity: .55; }
.table-adm .actions { white-space: nowrap; text-align: right; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--adm-muted); }
.empty i { font-size: 2.4rem; opacity: .35; display: block; margin-bottom: .75rem; }

.badge-state { display: inline-block; border-radius: 3px; padding: .2rem .5rem; font-size: .72rem; font-weight: 500; color: #fff; }
.st-new { background: var(--adm-orange); }
.st-read { background: var(--adm-blue); }
.st-answered { background: var(--adm-teal); }
.st-archived { background: #9aa3ab; }
.st-on { background: var(--adm-teal); }
.st-off { background: #9aa3ab; }
.st-admin { background: var(--adm-purple); }
.st-editor { background: var(--adm-blue); }
.st-vet { background: var(--adm-teal); }
.st-reception { background: var(--adm-orange); }
.st-groomer { background: var(--adm-purple); }

.progress-line { height: 8px; border-radius: 4px; background: #e5e7ea; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--adm-purple); }

/* Listas ordenables */
.sort-list { list-style: none; margin: 0; padding: 0; }
.sort-item { display: flex; align-items: center; gap: .85rem; padding: .7rem 1rem; border-bottom: 1px solid var(--adm-line); background: #fff; }
.sort-item:last-child { border-bottom: 0; }
.sort-item.is-hidden > .sort-main { opacity: .5; }
.sort-handle { cursor: grab; color: #b1b8bf; padding: .25rem; }
.sort-handle:active { cursor: grabbing; }
.sort-ghost { background: var(--adm-primary-soft) !important; }
.sort-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .85rem; }
.sort-thumb { width: 54px; height: 42px; border-radius: 4px; object-fit: cover; background: #eef0f2; flex: 0 0 auto; display: grid; place-items: center; color: var(--adm-muted); }
.sort-title { font-weight: 500; color: var(--adm-ink); }
.sort-sub { font-size: .78rem; color: var(--adm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sort-actions { display: flex; gap: .35rem; flex: 0 0 auto; }
.sort-children { list-style: none; padding: 0 0 0 2.5rem; margin: 0; border-top: 1px dashed var(--adm-line); min-height: 6px; }

/* Bloques de una página */
.blk-card { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: #fff; margin-bottom: .6rem; }
.blk-card.is-hidden { background: #fafafa; }
.blk-card.is-hidden .blk-card-main { opacity: .5; }
.blk-type-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--adm-primary-soft); color: var(--adm-primary); font-size: 1.05rem; flex: 0 0 auto; }
.blk-card-main { flex: 1; min-width: 0; }
.blk-card-type { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--adm-muted); }
.blk-card-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.type-pick button { text-align: left; border: 1px solid var(--adm-line); background: #fff; border-radius: 8px; padding: .9rem; display: flex; gap: .75rem; align-items: flex-start; }
.type-pick button:hover { border-color: var(--adm-primary); background: var(--adm-primary-soft); }
.type-pick strong { display: block; font-weight: 600; font-size: .88rem; }
.type-pick small { color: var(--adm-muted); font-size: .76rem; line-height: 1.35; display: block; }

/* Elementos repetibles (diapositivas, tarjetas, horarios) */
.rep-item { border: 1px solid var(--adm-line); border-radius: 8px; padding: 1rem; margin-bottom: .75rem; background: #fcfcfd; position: relative; }
.rep-item-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.rep-item-head .sort-handle { margin-left: -.25rem; }
.rep-item-head strong { font-size: .82rem; color: var(--adm-muted); font-weight: 500; }
.rep-item-head .btn { margin-left: auto; }

/* Selector de imagen */
.img-field { display: flex; gap: .75rem; align-items: center; }
.img-field-preview { width: 120px; height: 80px; border-radius: 6px; border: 1px dashed #c9d0d6; background: #f6f7f8 center/cover no-repeat; display: grid; place-items: center; color: #a6aeb5; flex: 0 0 auto; overflow: hidden; }
.img-field-preview.is-contain { background-size: contain; background-origin: content-box; padding: 6px; }
.img-field-preview.is-dark { background-color: #222a40; }
.img-field-preview.has-img i { display: none; }
.img-field-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Biblioteca */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.media-tile { position: relative; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer; padding: 0; text-align: left; }
.media-tile:hover, .media-tile:focus { border-color: var(--adm-primary); }
.media-tile.is-selected { border-color: var(--adm-primary); box-shadow: 0 0 0 3px rgba(47,91,234,.25); }
.media-thumb { aspect-ratio: 4 / 3; background: #eef0f2 center/cover no-repeat; display: grid; place-items: center; color: #9aa3ab; font-size: 2rem; }
.media-name { display: block; font-size: .72rem; padding: .4rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--adm-muted); }
.dropzone { border: 2px dashed #c9d0d6; border-radius: 10px; padding: 1.5rem; text-align: center; color: var(--adm-muted); background: #fafbfc; transition: background .15s, border-color .15s; }
.dropzone.is-over { border-color: var(--adm-primary); background: var(--adm-primary-soft); }

/* Plantillas */
.theme-card { border: 2px solid var(--adm-line); border-radius: 10px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.theme-card.is-current { border-color: var(--adm-primary); box-shadow: 0 0 0 3px rgba(47,91,234,.18); }
.theme-shot { aspect-ratio: 16 / 10; background: #eef0f2 top center/cover no-repeat; border-bottom: 1px solid var(--adm-line); }
.theme-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.theme-body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.theme-body p { color: var(--adm-muted); font-size: .82rem; flex: 1; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d0d5da; vertical-align: middle; }
.color-row { display: flex; align-items: center; gap: .6rem; }
.color-row input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 6px; }

/* Vista previa de Google */
.serp { font-family: Arial, sans-serif; border: 1px solid var(--adm-line); border-radius: 8px; padding: .9rem 1rem; background: #fff; }
.serp-url { color: #202124; font-size: .78rem; }
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin: .15rem 0; }
.serp-desc { color: #4d5156; font-size: .85rem; }
.counter { font-size: .72rem; color: var(--adm-muted); float: right; }
.counter.is-over { color: var(--adm-red); font-weight: 600; }

/* Mensaje */
.msg-body { white-space: pre-wrap; background: #f8f9fa; border-radius: 8px; padding: 1rem 1.1rem; font-size: .9rem; }
.msg-meta dt { font-weight: 500; color: var(--adm-muted); font-size: .78rem; }
.msg-meta dd { margin-bottom: .6rem; }

/* Línea de tiempo (actividad) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .85rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--adm-line); }
.timeline li:last-child { border-bottom: 0; }
.tl-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--adm-primary-soft); color: var(--adm-primary); flex: 0 0 auto; font-size: .85rem; }
.tl-icon.is-warn { background: #fdecea; color: var(--adm-red); }
.tl-text { flex: 1; min-width: 0; }
.tl-when { font-size: .75rem; color: var(--adm-muted); white-space: nowrap; }

/* Editor de texto simple */
.rte { border: 1px solid #d8dde2; border-radius: var(--adm-radius); background: #fff; }
.rte:focus-within { border-color: var(--adm-primary); box-shadow: 0 0 0 .2rem rgba(47,91,234,.15); }
.rte-bar { display: flex; flex-wrap: wrap; gap: .15rem; padding: .35rem; border-bottom: 1px solid var(--adm-line); background: #fafbfc; border-radius: var(--adm-radius) var(--adm-radius) 0 0; }
.rte-bar button { border: 0; background: none; width: 32px; height: 30px; border-radius: 4px; color: #4a525a; }
.rte-bar button:hover { background: #e9ecef; }
.rte-area { min-height: 140px; padding: .75rem .9rem; outline: none; font-size: .9rem; line-height: 1.6; }
.rte-area p { margin-bottom: .75rem; }
.rte-area:empty::before { content: attr(data-placeholder); color: #aab2b9; }

/* ---------- Avisos (alert, confirm, procesando) ---------- */
.cxv-modal { border: 0; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.cxv-alert-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.8rem; }
.cxv-alert-icon.is-success { background: #e2f6ee; color: var(--adm-teal); }
.cxv-alert-icon.is-error { background: #fdecea; color: var(--adm-red); }
.cxv-alert-icon.is-warning { background: #fff4e0; color: var(--adm-orange); }
.cxv-loading { position: fixed; inset: 0; z-index: 2000; background: rgba(16,25,54,.35); display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.cxv-loading.is-on { display: flex; }
.cxv-loading-box { background: #fff; border-radius: 12px; padding: 1.75rem 2.25rem; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.2); min-width: 260px; }
.cxv-loading-icon { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--adm-primary-soft); border-top-color: var(--adm-primary); display: inline-block; animation: cxv-spin .8s linear infinite; }
@keyframes cxv-spin { to { transform: rotate(360deg); } }
.cxv-toast { background: var(--adm-ink); color: #fff; border: 0; }

/* ---------- Ingreso ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { position: relative; background: linear-gradient(160deg, rgba(20,32,74,.86), rgba(48,30,120,.88)), var(--auth-image) center/cover; color: #fff; display: flex; align-items: center; justify-content: center; padding: 3rem; }
.auth-side-inner { text-align: center; max-width: 26rem; }
.auth-side h1 { font-size: 2rem; font-weight: 600; color: #fff; margin: 1.25rem 0 .5rem; }
.auth-side p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.auth-credit { position: absolute; bottom: 1.25rem; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.5); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: #fff; }
.auth-card { width: 100%; max-width: 380px; }
.auth-logo { display: block; margin: 0 auto 1.25rem; }
.auth-title { font-size: 1.6rem; font-weight: 600; margin-bottom: .35rem; }
.auth-sub { color: var(--adm-muted); margin-bottom: 1.5rem; }
.auth-back { margin-top: 2rem; color: var(--adm-muted); text-decoration: none; font-size: .85rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #a6aeb5; }
.input-icon .form-control { padding-left: 2.5rem; height: 46px; }
.btn-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a939b; padding: .4rem .6rem; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* =====================================================================
   Clínica (entregas 5 a 7): dueños, pacientes, ficha y agenda
   ===================================================================== */
.form-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--adm-muted); font-weight: 600; margin: 1.6rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--adm-line); }
.pet-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--adm-primary-soft); color: var(--adm-primary); display: inline-grid; place-items: center; flex: none; overflow: hidden; font-size: 1.2rem; position: relative; }
.pet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-avatar.sm { width: 36px; height: 36px; font-size: .95rem; }
.pet-avatar.lg { width: 84px; height: 84px; font-size: 2rem; }
.pet-avatar.is-editable { cursor: pointer; }
.pet-avatar-edit { position: absolute; inset: auto 0 0 0; height: 30%; background: rgba(0,0,0,.45); color: #fff; font-size: .8rem; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.pet-avatar.is-editable:hover .pet-avatar-edit { opacity: 1; }
.pet-avatar:not(.is-editable) .pet-avatar-edit { display: none; }
.pet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; padding: 1rem 1.25rem 1.25rem; }
.pet-card { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pet-card:hover { border-color: var(--adm-primary); box-shadow: 0 2px 8px rgba(47,91,234,.1); color: inherit; }
.pet-card.is-deceased { opacity: .6; }
.pet-info { flex: 1; min-width: 0; }
.pet-info small { display: block; color: var(--adm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; padding: 0 1.25rem 1.25rem; }
.pet-alerts.border-top { padding-top: 1rem; }
.pet-alert { display: flex; gap: .6rem; padding: .6rem .8rem; border-radius: var(--adm-radius); background: #f5f6f7; font-size: .85rem; }
.pet-alert strong { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.pet-alert i { margin-top: .2rem; color: var(--adm-muted); }
.pet-alert.is-danger { background: #fdecec; } .pet-alert.is-danger i, .pet-alert.is-danger strong { color: #b42323; }
.pet-alert.is-warning { background: #fff5e0; } .pet-alert.is-warning i, .pet-alert.is-warning strong { color: #9a6200; }
.cons-list { padding: .25rem 0; }
.timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .8rem 1.25rem; border-top: 1px solid var(--adm-line); color: inherit; text-decoration: none; }
.timeline-item:first-child { border-top: 0; }
.timeline-item:hover { background: #fafbfb; color: inherit; }
.timeline-date { font-weight: 500; }
.timeline-date small { display: block; color: var(--adm-muted); font-weight: 400; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; padding: 1.25rem; }
.file-card { border: 1px solid var(--adm-line); border-radius: var(--adm-radius); display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; }
.file-thumb { grid-column: 1 / -1; height: 120px; background: #f5f6f7; display: grid; place-items: center; font-size: 2.6rem; color: var(--adm-muted); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { padding: .5rem .75rem; min-width: 0; font-size: .85rem; }
.file-card .btn-icon { margin-right: .5rem; }
.vet-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.vet-dot.sm { width: 10px; height: 10px; }
.res-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; vertical-align: -1px; margin-right: 2px; }
.res-dot.sm { width: 10px; height: 10px; }
.agenda-sep { width: 1px; align-self: stretch; background: var(--line, #dfe5ea); margin: 2px 6px; }
/* Estados de cita */
.ap-requested { background: var(--adm-orange); } .ap-confirmed { background: var(--adm-blue); } .ap-arrived { background: var(--adm-purple); }
.ap-done { background: var(--adm-teal); } .ap-cancelled { background: #9aa3ab; } .ap-no_show { background: var(--adm-red); }
/* Calendario semanal */
.cal-wrap { overflow-x: auto; }
.cal { min-width: 860px; }
.cal-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--adm-line); position: sticky; top: 0; background: #fff; z-index: 2; }
.cal-head > div { padding: .55rem .5rem; text-align: center; font-size: .8rem; color: var(--adm-muted); }
.cal-head > div strong { color: var(--adm-ink); font-size: 1rem; margin-left: .2rem; }
.cal-head > .is-today strong { background: var(--adm-primary); color: #fff; border-radius: 50%; display: inline-grid; place-items: center; width: 28px; height: 28px; }
.cal-body { display: grid; grid-template-columns: 56px repeat(7, 1fr); position: relative; }
.cal-hours > div { font-size: .72rem; color: var(--adm-muted); text-align: right; padding-right: .5rem; transform: translateY(-.45rem); }
.cal-hours > div:first-child { transform: none; }
.cal-day { position: relative; border-left: 1px solid var(--adm-line); background-image: linear-gradient(to bottom, var(--adm-line) 1px, transparent 1px); background-size: 100% 52px; cursor: copy; }
.cal-day.is-today { background-color: #f6f8fd; }
.cal-ev { position: absolute; white-space: nowrap; text-overflow: ellipsis; border: 0; border-left: 4px solid; border-radius: 4px; text-align: left; padding: .15rem .4rem; font-size: .76rem; line-height: 1.25; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.cal-ev small { display: block; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { filter: brightness(.95); z-index: 1; }
.cal-ev.ap-cancelled { text-decoration: line-through; opacity: .7; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--adm-red); z-index: 1; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--adm-red); }
.slot-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.slot-list .small { width: 100%; }
.kpi-red { --kpi: var(--adm-red); }
@media print {
  .adm-side, .adm-top, .adm-crumbs, .panel-foot, .btn, .d-print-none, .adm-foot { display: none !important; }
  .adm-main, .adm-content { margin: 0 !important; padding: 0 !important; }
  .panel { box-shadow: none; border: 0; }
  body.adm { background: #fff; }
  .col-xl-8 { width: 100%; }
}
.panel-head > :last-child:not(:first-child) { margin-left: auto; }

/* =====================================================================
   v1.5 · menú en grupos, tablas tipo datatable, cargas con arrastrar,
   contraseñas con ojo, foto del usuario y tablero
   ===================================================================== */

/* ---------- Menú lateral en grupos ---------- */
.adm-side { overflow: hidden; }
.side-brand { height: 56px; border-bottom: 1px solid rgba(255,255,255,.06); }
.side-user { padding: .9rem 1rem .85rem; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av name" "av role" "av acts"; column-gap: .85rem; text-align: left; align-items: center; }
.side-user .side-avatar-wrap { grid-area: av; position: relative; }
.side-user strong { grid-area: name; font-size: .88rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { grid-area: role; margin: 0 0 .35rem; }
.side-user-actions { grid-area: acts; justify-content: flex-start; gap: .9rem; }
.side-user-actions a { font-size: .95rem; }
.side-avatar { width: 58px; height: 58px; font-size: 1.25rem; margin: 0; cursor: pointer; overflow: hidden; padding: 0; position: relative; transition: border-color .15s; }
.side-avatar:hover { border-color: var(--adm-accent); }
.user-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.user-photo.has-photo .user-initials { visibility: hidden; }
.side-avatar-edit { position: absolute; right: -4px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--adm-accent); color: #fff; display: grid; place-items: center; font-size: .65rem; border: 2px solid #101936; text-decoration: none; }
.side-avatar-edit:hover { color: #fff; background: var(--adm-primary); }
.side-search { position: relative; padding: .75rem .9rem .5rem; }
.side-search i { position: absolute; left: 1.65rem; top: 50%; transform: translateY(-25%); color: rgba(255,255,255,.45); font-size: .8rem; pointer-events: none; }
.side-search input { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: #fff; padding: .42rem .9rem .42rem 2.1rem; font-size: .8rem; outline: none; }
.side-search input::placeholder { color: rgba(255,255,255,.45); }
.side-search input:focus { background: rgba(255,255,255,.14); border-color: rgba(255,122,89,.6); }
.side-search kbd { position: absolute; right: 1.6rem; top: 50%; transform: translateY(-25%); background: rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: .6rem; padding: .1rem .35rem; border-radius: 4px; pointer-events: none; }
.side-search input:focus ~ kbd, .side-search input:not(:placeholder-shown) ~ kbd { display: none; }
.side-nav { flex: 1; overflow-y: auto; padding: .25rem 0 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.side-nav::-webkit-scrollbar { width: 6px; } .side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.side-menu, .side-sub { list-style: none; margin: 0; padding: 0; }
.side-link { padding: .55rem 1.1rem; }
.side-group-toggle { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .6rem 1.1rem; background: none; border: 0; border-left: 3px solid transparent; color: rgba(255,255,255,.82); font-size: .87rem; text-align: left; }
.side-group-toggle > i:first-child { width: 18px; text-align: center; font-size: .95rem; }
.side-group-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-group-toggle .side-chev { margin-left: auto; font-size: .7rem; transition: transform .2s; opacity: .7; }
.side-group.is-open > .side-group-toggle { color: #fff; background: rgba(255,255,255,.04); }
.side-group.is-open > .side-group-toggle .side-chev { transform: rotate(90deg); }
.side-group[data-active] > .side-group-toggle { border-left-color: rgba(38,195,154,.5); }
.side-group-toggle > .side-flex { flex: 1; min-width: 0; }
.side-group-toggle .side-count, .side-group-toggle .side-dot, .side-group-toggle .side-alert { margin-left: 0; }
.side-group-toggle .side-chev { margin-left: .35rem !important; width: 12px; text-align: center; }
.side-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; background: rgba(0,0,0,.18); }
.side-sub > div { overflow: hidden; }
.side-group.is-open > .side-sub { grid-template-rows: 1fr; }
.side-sub .side-link { padding: .48rem 1.1rem .48rem 2.15rem; font-size: .83rem; color: rgba(255,255,255,.72); }
.side-sub .side-link i { font-size: .82rem; width: 16px; }
.side-sub .side-link.active { background: rgba(38,195,154,.14); }
.side-nav.is-searching .side-sub { transition: none; }
.side-none { padding: .75rem 1.25rem; font-size: .8rem; color: rgba(255,255,255,.5); }
.side-foot { padding: .6rem 1.1rem; border-top: 1px solid rgba(255,255,255,.06); font-size: .68rem; color: rgba(255,255,255,.35); display: flex; justify-content: space-between; }

/* ---------- Barra superior: usuario ---------- */
.top-user { display: inline-flex; align-items: center; gap: .55rem; color: #fff; border: 0; background: none; padding: .25rem .55rem .25rem .25rem; border-radius: 999px; font-size: .82rem; }
.top-user:hover, .top-user[aria-expanded="true"] { background: rgba(255,255,255,.14); }
.top-user .user-photo { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--adm-primary); display: grid; place-items: center; font-weight: 600; font-size: .8rem; position: relative; overflow: hidden; }
.top-user-menu { min-width: 250px; border: 0; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.18); padding: 0; overflow: hidden; }
.top-user-head { display: flex; gap: .75rem; align-items: center; padding: 1rem; background: var(--adm-primary); color: #fff; }
.top-user-head .user-photo { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--adm-primary); display: grid; place-items: center; font-weight: 700; position: relative; overflow: hidden; flex: none; }
.top-user-head small { display: block; opacity: .8; font-size: .75rem; }
.top-user-menu .dropdown-item { padding: .6rem 1rem; font-size: .85rem; display: flex; gap: .65rem; align-items: center; }
.top-user-menu .dropdown-item i { width: 16px; text-align: center; color: var(--adm-muted); }

/* ---------- Foto del usuario (ventana y perfil) ---------- */
.user-photo { position: relative; overflow: hidden; }
.photo-big { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto; background: var(--adm-primary-soft); color: var(--adm-primary); display: grid; place-items: center; font-size: 3.2rem; font-weight: 600; border: 5px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.photo-drop { position: relative; cursor: pointer; }
.photo-drop .photo-drop-hint { position: absolute; inset: 0; border-radius: 50%; background: rgba(16,25,54,.55); color: #fff; display: grid; place-items: center; text-align: center; font-size: .78rem; font-weight: 500; opacity: 0; transition: opacity .15s; padding: 1.5rem; }
.photo-drop:hover .photo-drop-hint, .photo-drop.is-over .photo-drop-hint { opacity: 1; }
.photo-drop .photo-drop-hint i { display: block; font-size: 1.6rem; margin-bottom: .35rem; }

/* ---------- Paneles: acciones a la derecha del encabezado ---------- */
.panel-head { min-height: 60px; }
.panel-head .panel-tools .btn { white-space: nowrap; }
.panel-sub { font-size: .78rem; color: var(--adm-muted); }
.adm-content .row.g-4 { margin-bottom: 1.5rem; }
.adm-content .row.g-4 > [class*="col-"] > .panel:only-child { height: 100%; margin-bottom: 0; display: flex; flex-direction: column; }
.adm-content .row.g-4 > [class*="col-"] > .panel:only-child > .table-responsive:last-child, .adm-content .row.g-4 > [class*="col-"] > .panel:only-child > .mini-list:last-child { flex: 1; }
.panel.h-100 { margin-bottom: 0; }

/* ---------- Tablas tipo datatable ---------- */
.table-adm { border-collapse: separate; border-spacing: 0; }
.table-adm > thead > tr > th { background: #f3f5f7; border-bottom: 2px solid #dde2e6; color: #3d454d; font-size: .8rem; text-transform: none; padding: .7rem .9rem; vertical-align: middle; }
.table-adm > tbody > tr > td { padding: .62rem .9rem; border-bottom: 1px solid #edf0f2; }
.table-adm > thead > tr > th + th, .table-adm > tbody > tr > td + td { border-left: 1px solid #e9ecef; }
.table-adm > tbody > tr:nth-child(even) > td { background: #f9fafb; }
.table-adm.table-hover > tbody > tr:hover > td { background: #eef3fe; }
.table-adm > tbody > tr:last-child > td { border-bottom: 0; }
.table-adm th.dt-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 1.6rem; white-space: nowrap; }
.table-adm th.dt-sortable a { color: inherit; text-decoration: none; display: block; }
.table-adm th.dt-sortable::after { content: "\f0dc"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .7rem; color: #b8c0c7; }
.table-adm th.dt-sortable.is-asc::after { content: "\f0de"; color: var(--adm-primary); }
.table-adm th.dt-sortable.is-desc::after { content: "\f0dd"; color: var(--adm-primary); }
.table-adm th.dt-sortable:hover { background: #eaeef1; }
.table-adm .dt-empty td { text-align: center; color: var(--adm-muted); padding: 2rem 1rem; background: #fff !important; }
.table-adm .dt-empty i { margin-right: .35rem; opacity: .6; }
.table-adm td.col-actions, .table-adm th.col-actions { width: 1%; white-space: nowrap; text-align: center; }
.table-adm td .btn-icon { width: 30px; height: 30px; font-size: .8rem; }
.table-adm .cell-main { font-weight: 500; color: var(--adm-ink); }
.table-adm .cell-sub { font-size: .76rem; color: var(--adm-muted); }
.table-adm .cell-flex { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.table-adm .cell-thumb { width: 46px; height: 34px; border-radius: 4px; object-fit: cover; background: #eef0f2; flex: none; display: grid; place-items: center; color: var(--adm-muted); }
.table-adm .cell-clip { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-adm tr.is-hidden > td { color: #9aa3ab; }
.table-adm tr.is-hidden .cell-main { color: #8a939b; }
.table-adm .sort-handle { padding: .2rem .35rem; }
.table-adm.is-filtered .sort-handle { visibility: hidden; }
.dt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--adm-line); background: #fff; }
.dt-len { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--adm-muted); margin: 0; }
.dt-len select { width: auto; padding-right: 1.8rem; }
.dt-filters { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; }
.dt-filters:empty { display: none; }
.dt-filters .form-select { width: auto; max-width: 220px; }
.dt-filters .nav-pills .nav-link { font-size: .8rem; }
.dt-search { position: relative; margin: 0 0 0 auto; }
.dt-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #a6aeb5; font-size: .78rem; }
.dt-search input { width: 260px; padding-left: 2rem; border-radius: 999px; }
.dt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem 1.25rem; border-top: 1px solid var(--adm-line); background: #fafbfc; border-radius: 0 0 var(--adm-radius) var(--adm-radius); }
.dt-info { font-size: .8rem; color: var(--adm-muted); }
.dt-info span { opacity: .8; }
.pagination-sm .page-link { color: var(--adm-ink); border-color: #dfe3e7; min-width: 32px; text-align: center; }
.pagination-sm .page-item.active .page-link { background: var(--adm-primary); border-color: var(--adm-primary); color: #fff; }
.pagination-sm .page-link:hover { background: var(--adm-primary-soft); color: var(--adm-primary-dark); }
@media (max-width: 767.98px) { .dt-search { width: 100%; margin: 0; } .dt-search input { width: 100%; } }

/* ---------- Contraseñas con ojo ---------- */
.pw-field { position: relative; }
.pw-field > .form-control { padding-right: 2.6rem; }
.pw-eye { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a939b; width: 34px; height: 30px; border-radius: 4px; }
.pw-eye:hover { color: var(--adm-primary); background: var(--adm-primary-soft); }
.form-control.is-invalid + .pw-eye { right: 1.9rem; }

/* ---------- Cargar con arrastrar y soltar ---------- */
.img-field { align-items: stretch; }
.img-drop { position: relative; width: 168px; height: 112px; border-radius: 8px; border: 2px dashed #c9d0d6; background: #f8f9fa center/cover no-repeat; display: grid; place-items: center; flex: 0 0 auto; cursor: pointer; margin: 0; overflow: hidden; transition: border-color .15s, background-color .15s; }
.img-drop:hover { border-color: var(--adm-primary); }
.img-drop.is-contain { background-size: contain; background-origin: content-box; padding: 8px; }
.img-drop.is-dark { background-color: #222a40; }
.img-drop.has-img { border-style: solid; border-color: #dfe3e7; }
.img-drop-empty { text-align: center; color: #9aa3ab; font-size: .72rem; line-height: 1.3; padding: .5rem; }
.img-drop-empty i { display: block; font-size: 1.4rem; margin-bottom: .3rem; color: #b5bdc4; }
.img-drop-empty b { display: block; font-weight: 600; color: #6c757d; }
.img-drop.has-img .img-drop-empty { display: none; }
.img-drop-over { position: absolute; inset: 0; display: none; place-items: center; background: rgba(47,91,234,.85); color: #fff; font-size: .8rem; font-weight: 500; }
.img-drop.is-over { border-color: var(--adm-primary); }
.img-drop.is-over .img-drop-over { display: grid; }
.img-drop.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%232f5bea' stroke-width='5' stroke-dasharray='90 40'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat; }
.img-drop .img-drop-video { text-align: center; font-size: .72rem; color: var(--adm-muted); padding: .5rem; }
.img-field-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.drop-area { border: 2px dashed #c9d0d6; border-radius: 10px; padding: 1.5rem 1rem; text-align: center; color: var(--adm-muted); background: #fafbfc; cursor: pointer; display: block; margin: 0; transition: background .15s, border-color .15s; }
.drop-area:hover, .drop-area.is-over { border-color: var(--adm-primary); background: var(--adm-primary-soft); }
.drop-area > i { font-size: 1.8rem; color: #b5bdc4; display: block; margin-bottom: .4rem; }
.drop-area.is-over > i { color: var(--adm-primary); }
.drop-area strong { color: var(--adm-ink); font-weight: 500; }
.drop-list { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .75rem; }
.drop-list:empty { display: none; }
.drop-file { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--adm-line); border-radius: 8px; padding: .3rem .6rem .3rem .3rem; font-size: .78rem; color: var(--adm-ink); text-align: left; max-width: 260px; }
.drop-file img, .drop-file > i { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: #f1f3f5; display: grid; place-items: center; font-size: 1rem; color: var(--adm-muted); flex: none; }
.drop-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-file small { display: block; color: var(--adm-muted); }

/* ---------- Tablero ---------- */
.kpi { position: relative; overflow: hidden; min-height: 112px; }
.kpi::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.1); }
.kpi-foot { display: block; font-size: .72rem; opacity: .9; margin-top: .3rem; text-align: right; }
.kpi-red { background: var(--adm-red); }
.dash-chart { padding: 1.1rem 1.25rem 1rem; }
.bars { display: grid; grid-template-columns: repeat(var(--n, 7), 1fr); gap: .65rem; align-items: end; height: 190px; padding-top: 1rem; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .3rem; text-decoration: none; }
.bar b { font-size: .75rem; font-weight: 600; color: var(--adm-ink); }
.bar span { width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #4aa3ee, var(--adm-blue)); min-height: 4px; transition: filter .15s; }
.bar:hover span { filter: brightness(1.08); }
.bar.is-today span { background: linear-gradient(180deg, #3dd3ab, var(--adm-teal)); }
.bar.is-zero span { background: #e7eaed; }
.bars-x { display: grid; grid-template-columns: repeat(var(--n, 7), 1fr); gap: .65rem; border-top: 1px solid var(--adm-line); padding-top: .45rem; }
.bars-x span { text-align: center; font-size: .72rem; color: var(--adm-muted); line-height: 1.2; }
.bars-x span strong { display: block; color: var(--adm-ink); font-weight: 500; }
.donut-wrap { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; align-items: center; padding: 1.25rem; }
.donut { width: 170px; height: 170px; border-radius: 50%; position: relative; }
.donut::after { content: ""; position: absolute; inset: 26px; border-radius: 50%; background: #fff; }
.donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.donut-center strong { font-size: 1.9rem; font-weight: 500; display: block; }
.donut-center small { color: var(--adm-muted); font-size: .72rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: .6rem; align-items: center; font-size: .84rem; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend b { font-weight: 600; }
.legend em { font-style: normal; color: var(--adm-muted); font-size: .76rem; margin-left: .35rem; }
@media (max-width: 575.98px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.25rem; border-bottom: 1px solid #edf0f2; }
.mini-list li:nth-child(even) { background: #f9fafb; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a.mini-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.mini-list .mini-main strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .mini-main small { display: block; color: var(--adm-muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--adm-primary-soft); color: var(--adm-primary); flex: none; font-size: .85rem; }
.mini-ico.is-red { background: #fdecea; color: var(--adm-red); }
.mini-ico.is-orange { background: #fff4e0; color: var(--adm-orange); }
.mini-ico.is-blue { background: #e3f0fc; color: var(--adm-blue); }
.mini-ico.is-purple { background: #efe8fa; color: var(--adm-purple); }
.mini-when { font-size: .74rem; color: var(--adm-muted); white-space: nowrap; text-align: right; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat-cell { padding: 1rem 1.25rem; border-bottom: 1px solid #edf0f2; display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; }
.stat-cell:nth-child(odd) { border-right: 1px solid #edf0f2; }
.stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
.stat-cell:hover { background: #f9fafb; color: inherit; }
.stat-cell strong { display: block; font-size: 1.35rem; font-weight: 500; line-height: 1.1; }
.stat-cell small { color: var(--adm-muted); font-size: .76rem; }
.status-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.25rem; border-bottom: 1px solid #edf0f2; }
.status-row:last-child { border-bottom: 0; }
.status-row .mini-main { flex: 1; min-width: 0; }
.status-row .mini-main small { display: block; color: var(--adm-muted); font-size: .76rem; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; padding: 1.25rem; }
.quick { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; padding: 1rem .5rem; border: 1px solid var(--adm-line); border-radius: 8px; color: var(--adm-ink); text-decoration: none; font-size: .8rem; transition: border-color .15s, background .15s, transform .15s; }
.quick i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--adm-primary-soft); color: var(--adm-primary); font-size: 1rem; }
.quick:hover { border-color: var(--adm-primary); background: #f6f8fd; color: var(--adm-ink); transform: translateY(-2px); }
@media (max-width: 575.98px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
.welcome { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: linear-gradient(120deg, var(--adm-primary-dark), var(--adm-primary)); color: #fff; border-radius: var(--adm-radius); padding: 1.1rem 1.4rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.07); }
.welcome .user-photo { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--adm-primary); display: grid; place-items: center; font-weight: 700; flex: none; border: 3px solid rgba(255,255,255,.35); }
.welcome h2 { font-size: 1.15rem; font-weight: 500; margin: 0; color: #fff; }
.welcome p { margin: 0; opacity: .85; font-size: .84rem; }
.welcome .welcome-chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; position: relative; z-index: 1; }
.welcome .chip { background: rgba(255,255,255,.15); border-radius: 999px; padding: .35rem .8rem; font-size: .78rem; color: #fff; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.welcome .chip:hover { background: rgba(255,255,255,.25); color: #fff; }
.side-group.is-open > .side-group-toggle .side-count, .side-group.is-open > .side-group-toggle .side-dot, .side-group.is-open > .side-group-toggle .side-alert { display: none; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-4 .stat-cell { border-bottom: 0; border-right: 1px solid #edf0f2; }
.stat-grid-4 .stat-cell:last-child { border-right: 0; }
.stat-cell small { display: block; }
@media (max-width: 991.98px) { .stat-grid-4 { grid-template-columns: repeat(2, 1fr); } .stat-grid-4 .stat-cell { border-bottom: 1px solid #edf0f2; } }
.min-w-0 { min-width: 0; }
.sort-list > li:nth-child(even) > .sort-item, .sort-list > .sort-item:nth-child(even) { background: #f9fafb; }
.mini-list .mini-main { flex: 1; min-width: 0; }
.mini-list span.mini-main strong { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list span.mini-main small { display: block; color: var(--adm-muted); font-size: .76rem; }
.side-avatar .user-photo { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; }
.side-search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(2); cursor: pointer; }

/* ---------- v1.6 · Galería del servicio y homenaje en Personal ---------- */
.svc-gal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }
.svc-gal-list:empty { display: block; border: 2px dashed var(--line, #e3e7ef); border-radius: 12px; min-height: 64px; }
.svc-gal-list:empty::before { content: 'Sin fotos. Usa «Agregar foto».'; display: block; padding: 1.25rem; text-align: center; color: #8a92a6; font-size: .9rem; }
.svc-gal-item { display: flex; gap: .6rem; align-items: center; margin: 0; }
.tm-memorial { background: var(--bg-soft, #f5f7fb); border-radius: 12px; padding: .9rem 1rem; }
.svc-gal-item .img-field { gap: .75rem; }
.svc-gal-item .img-field .form-text { display: none; }
.svc-gal-item .img-field-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.svc-gal-item .img-field-actions .btn { padding: .25rem .55rem; font-size: .8rem; white-space: nowrap; }
.svc-gal-item .img-field-actions .btn i { display: inline !important; margin: 0 .25rem 0 0 !important; font-size: inherit !important; }

/* ---------- v1.6 · SEO: vista al compartir (estilo WhatsApp) ---------- */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.share-card { display: flex; flex-direction: column; background: #e7f6dd; border-radius: 12px; padding: .45rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.share-img { display: block; aspect-ratio: 1200 / 630; border-radius: 8px 8px 0 0; overflow: hidden; background: #d5e3cf; }
.share-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-body { background: #d9edcc; border-radius: 0 0 8px 8px; padding: .55rem .7rem .6rem; }
.share-title { font-weight: 700; font-size: .9rem; line-height: 1.3; color: #111b21; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-desc { font-size: .8rem; color: #3b4a54; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-host { font-size: .75rem; color: #667781; margin-top: .3rem; }
.share-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .2rem 0; margin-top: auto; }

/* ---------- v1.6 · Núcleo clínico 2.0 ---------- */
.st-pending { background: #e5a12d; }
.pet-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .12rem .6rem; font-size: .72rem; font-weight: 600; background: #eef2f4; color: #4a565f; vertical-align: middle; }
.pet-chip.tp-aggressive { background: #fdecec; color: #b42323; }
.pet-chip.tp-nervous { background: #fff5e0; color: #9a6200; }
.pet-chip.tp-docile { background: #eaf0fe; color: #2f5bea; }
.pet-facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--adm-muted); font-size: .88rem; }
.pet-facts span { display: inline-flex; align-items: center; gap: .35rem; }
.pet-facts i { opacity: .7; font-size: .85em; }
.pet-avatar.is-dead img { filter: grayscale(1); }
tr.is-cancelled td { color: #9aa3ab; }
tr.is-cancelled td strong { text-decoration: line-through; font-weight: 500; }

/* Formularios de página completa */
.owner-pick { position: relative; }
.owner-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 320px; overflow: auto; }
.owner-results:empty { display: none; }
.owner-card { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border: 1px solid var(--adm-border, #e3e8ec); border-radius: 10px; background: #f7f9fd; }
.owner-card-ico { width: 42px; height: 42px; border-radius: 50%; background: #eaf0fe; color: #2f5bea; display: grid; place-items: center; flex: 0 0 auto; }
.pf .btn-group.w-100 > .btn { flex: 1 1 0; white-space: nowrap; padding-left: .4rem; padding-right: .4rem; }
.pf .btn-group:not(.w-100) > .btn { white-space: nowrap; }

/* Laboratorio */
.lab-flag { display: inline-block; border-radius: 4px; padding: .12rem .5rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.lab-flag.is-normal { background: #eaf0fe; color: #2f5bea; }
.lab-flag.is-low { background: #e8f0fb; color: #2a5ea8; }
.lab-flag.is-high { background: #fdecec; color: #b42323; }
.lab-table tr.is-off td { background: #fff8f6; }
.lab-table .form-control-sm, .lab-table .form-select-sm { max-width: 11rem; }
.lab-summary { display: flex; gap: .7rem; align-items: flex-start; color: #9a3a2a; }
.lab-summary i { margin-top: .2rem; }
.ref-table .input-group { max-width: 15rem; margin: 0 auto; }

/* Recetas */
.rx-items { display: grid; gap: .75rem; }
.rx-item { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem; border: 1px solid var(--adm-border, #e3e8ec); border-radius: 10px; background: #fbfcfc; margin: 0; }
.rx-num { width: 28px; height: 28px; border-radius: 50%; background: #2f5bea; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: 0 0 auto; margin-top: .35rem; }

/* Avisos */
.notice-tabs { gap: .25rem; flex-wrap: wrap; }
.notice-tabs .nav-link { padding: .35rem .8rem; font-size: .85rem; border-radius: 8px; color: var(--adm-text, #222a40); }
.notice-tabs .nav-link.active { background: #2f5bea; color: #fff; }
.notice-tabs .badge { font-size: .68rem; }
.channel-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; border: 1px solid rgba(0,0,0,.1); }
.dx-pick { border: 1px solid var(--adm-border, #dee2e6); border-radius: 8px; padding: .4rem; }
.dx-pick .form-control { border: 0; box-shadow: none; padding-left: .35rem; }
.dx-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.dx-chips:empty { display: none; }
.dx-chip { display: inline-flex; align-items: center; gap: .35rem; background: #eaf0fe; color: #1e3fb8; border-radius: 999px; padding: .2rem .35rem .2rem .7rem; font-size: .82rem; font-weight: 500; }
.dx-chip button { border: 0; background: rgba(15,90,60,.12); color: inherit; width: 18px; height: 18px; border-radius: 50%; line-height: 1; font-size: .8rem; display: grid; place-items: center; padding: 0; }

/* ---------- v1.7 · Internación y guardería (entrega 17) ---------- */
.st-late { background: var(--adm-red); }
.st-wait { background: var(--adm-orange); }
.stay-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 600; }
.stay-chip.is-hospital { background: #fdecea; color: #b42f2f; }
.stay-chip.is-boarding { background: #e3f0fc; color: #1565b0; }
.task-table td { vertical-align: middle; }
.task-row .task-time { font-size: 1rem; }
.task-row.is-overdue > td:first-child { box-shadow: inset 3px 0 0 var(--adm-red); }
.task-row.is-overdue .task-time { color: var(--adm-red); }
.task-row.is-pending > td:first-child { box-shadow: inset 3px 0 0 var(--adm-orange); }
.task-row.is-done > td, .task-row.is-skipped > td { background: #fafbfb; }
.task-row.is-done > td:not(:last-child):not([data-task-state]), .task-row.is-skipped > td:not(:last-child):not([data-task-state]) { color: #8a939b; }
.task-row.is-skipped > td:nth-last-child(3) { text-decoration: line-through; }
.space-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.space-tile { border: 1px dashed #cfd6dc; border-radius: 10px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .1rem; color: var(--adm-muted); min-width: 0; }
.space-tile i { font-size: 1rem; opacity: .6; }
.space-tile strong { color: var(--adm-ink); font-weight: 600; }
.space-tile span { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-tile.is-busy { border-style: solid; border-color: #bccbf5; background: var(--adm-primary-soft); }
.space-tile.is-busy span { color: var(--adm-primary-dark); font-weight: 600; }
.stay-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.stay-calc > div { background: #f6f8f9; border-radius: 10px; padding: .6rem .8rem; }
.stay-calc small { display: block; color: var(--adm-muted); font-size: .74rem; }
.stay-calc strong { font-size: 1.05rem; font-weight: 600; }
.stay-dl { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: .45rem 1rem; margin: 0; }
.stay-dl dt { color: var(--adm-muted); font-weight: 500; font-size: .82rem; }
.stay-dl dd { margin: 0; }
.stay-bill td { padding: .45rem 0; border-color: #edf0f2; }
.pet-head a.pet-avatar { text-decoration: none; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.legend-dot.is-hospital, .stat-bar .is-hospital { background: #e57373; }
.legend-dot.is-boarding, .stat-bar .is-boarding { background: #64a6e8; }
.stat-bar { display: flex; height: 10px; border-radius: 5px; background: #f0f2f4; overflow: hidden; }
.stat-bar span { display: block; height: 100%; }
@media (max-width: 575.98px) { .stay-dl { grid-template-columns: 1fr; gap: .1rem; } .stay-dl dd { margin-bottom: .5rem; } }
@media print { .adm-side, .adm-top, .panel-tools, .col-actions, .page-head .crumbs { display: none !important; } }

/* ---------- v1.8 · Caja, ventas y stock (entrega 18) ---------- */
.cash-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--adm-teal); display: inline-block; margin-right: 8px; box-shadow: 0 0 0 4px rgba(38,195,154,.18); vertical-align: 1px; }
.pos-lines td { vertical-align: middle; }
.pos-lines .form-control-sm, .pos-lines .form-select-sm { min-width: 70px; }
.pos-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.pos-totals > div { background: #f6f8f9; border-radius: 10px; padding: .55rem .75rem; text-align: right; }
.pos-totals small { display: block; color: var(--adm-muted); font-size: .72rem; }
.pos-totals strong { font-size: 1rem; font-weight: 600; white-space: nowrap; }
.pos-totals .is-total { background: var(--adm-primary); color: #fff; }
.pos-totals .is-total small { color: rgba(255,255,255,.8); }
.pos-totals .is-total strong { font-size: 1.2rem; }
.pay-row + .pay-row { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed #e3e8ec; }
.price-table th { font-size: .78rem; color: var(--adm-muted); font-weight: 500; }
.chip-debt { background: #fdecea !important; color: #b42f2f !important; }
.chip-credit { background: #e6edfd !important; color: #2549c9 !important; }
@media (max-width: 767.98px) { .pos-totals { grid-template-columns: repeat(2, 1fr); } }

/* ---------- v1.9 · Peluquería (entrega 19) ---------- */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; padding: .75rem 1.1rem; border-top: 1px solid var(--adm-line); }
.week-day { display: flex; flex-direction: column; align-items: center; padding: .45rem .25rem; border-radius: 10px; border: 1px solid #e6eaed; color: inherit; text-decoration: none; background: #fff; line-height: 1.2; }
.week-day small { color: var(--adm-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
.week-day strong { font-size: 1.15rem; font-weight: 600; }
.week-day em { font-style: normal; font-size: .7rem; color: var(--adm-purple); }
.week-day:hover { border-color: var(--adm-purple); }
.week-day.is-today strong { color: var(--adm-purple); }
.week-day.is-on { background: var(--adm-purple); border-color: var(--adm-purple); color: #fff; }
.week-day.is-on small, .week-day.is-on em, .week-day.is-on strong { color: #fff; }
.groom-table td { vertical-align: middle; }
.gr-row.is-done, .gr-row.is-cancelled, .gr-row.is-no_show { background: #fafbfb; }
.gr-row.is-done .cell-main, .gr-row.is-cancelled .cell-main, .gr-row.is-no_show .cell-main { color: var(--adm-muted) !important; }
.gr-row.is-ready { background: #f1f8ff; }
.gr-state { display: inline-flex; align-items: center; border-radius: 20px; padding: .2rem .65rem; font-size: .76rem; font-weight: 500; white-space: nowrap; background: #eef0f2; color: #5b6670; }
.gr-state.is-arrived { background: #fff4e0; color: #a5650a; }
.gr-state.is-in_progress { background: #efe8fa; color: #6a3fb0; }
.gr-state.is-ready { background: #e3f0fc; color: #1d6bb5; }
.gr-state.is-done { background: #e6edfd; color: #2549c9; }
.gr-state.is-cancelled, .gr-state.is-no_show { background: #fdecea; color: #b42f2f; }
.gr-services { display: flex; flex-direction: column; }
.gr-svc { display: flex; align-items: center; gap: .65rem; padding: .45rem .55rem; border-radius: 8px; }
.gr-svc + .gr-svc, [data-extras] .gr-svc { border-top: 1px solid #f0f2f4; }
.gr-svc label { cursor: pointer; }
.gr-svc.is-on { background: #f7f3fd; }
.gr-svc:not(.is-on) .input-group { opacity: .55; }
@media (max-width: 575.98px) { .week-strip { gap: .2rem; padding: .6rem; } .week-day em { display: none; } }

/* ---------- v1.9 · Tablas contenidas dentro de su sección ----------
   La tabla ya no llega a los bordes del panel: va dentro, con margen, su propio borde y esquinas
   redondeadas; la barra de búsqueda y el pie («Mostrando…») quedan como parte del panel. */
.panel > .table-responsive { margin: 1rem 1.25rem 1.25rem; border: 1px solid #e1e6ea; border-radius: 10px; width: auto; }
.panel > .table-responsive:first-child { margin-top: 1.25rem; }
.panel > .dt-tools { border-bottom: 0; padding: 1rem 1.25rem 0; background: transparent; }
.panel > .dt-tools + .table-responsive { margin-top: .85rem; }
.panel > .table-responsive + .dt-foot { margin-top: -.5rem; }
.panel > .dt-foot { border-top: 0; background: transparent; padding: .1rem 1.25rem 1rem; }
.panel > .dt-foot:empty { display: none; }
.table-adm > thead > tr > th { border-top: 0; }
.table-adm > thead > tr > th:first-child, .table-adm > tbody > tr > td:first-child { border-left: 0; }
@media (max-width: 575.98px) { .panel > .table-responsive { margin-left: .75rem; margin-right: .75rem; } .panel > .dt-tools, .panel > .dt-foot { padding-left: .75rem; padding-right: .75rem; } }
@media print { .panel > .table-responsive { margin: 0; border: 0; } }
.adm-content .row.g-4 > [class*="col-"] > .panel:only-child > .table-responsive:last-child { flex: 0 1 auto; }
.adm-content .row.g-3:not([class*="mb-"]) + .panel { margin-top: 1.5rem; }

/* ---------- v2.0 · Planes de salud (entrega 20) ---------- */
.plan-chip { display: inline-flex; align-items: center; gap: .35rem; border-radius: 20px; padding: .18rem .6rem; font-size: .76rem; font-weight: 500; white-space: nowrap;
    background: color-mix(in srgb, var(--c, #3d68f0) 12%, #fff); color: color-mix(in srgb, var(--c, #3d68f0) 85%, #000); }
.plan-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #3d68f0); }
.plan-detail { white-space: pre-line; font-size: .86rem; color: #4a525a; background: #f6f8f9; border-radius: 10px; padding: .75rem 1rem; margin: 0; }
.pet-pick { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid #e3e8ec; border-radius: 10px; cursor: pointer; }
.pet-pick + .pet-pick { margin-top: .5rem; }
.pet-pick:has(input:checked) { border-color: var(--adm-primary); background: #f2f5fe; }
.pet-pick .pet-avatar { width: 36px; height: 36px; font-size: .9rem; }
.inv-state { display: inline-block; border-radius: 20px; padding: .15rem .6rem; font-size: .74rem; font-weight: 500; white-space: nowrap; }
.inv-state.is-pending { background: #fff4e0; color: #a5650a; }
.inv-state.is-overdue { background: #fdecea; color: #b42f2f; }
.inv-state.is-paid { background: #e6edfd; color: #2549c9; }
.inv-state.is-void { background: #eef0f2; color: #7a838b; text-decoration: line-through; }
.collect-box { max-width: 520px; }
.collect-box .input-group-lg .form-control { font-size: 1.4rem; letter-spacing: .08em; }

/* ---------- v2.1 · Importador (entrega 21) ---------- */
.imp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; border: 2px dashed #cfd8de; border-radius: 12px; padding: 1.6rem 1rem; cursor: pointer; background: #fafbfc; position: relative; }
.imp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.imp-drop i { font-size: 2rem; color: var(--adm-primary); }
.imp-drop span { font-size: .8rem; color: var(--adm-muted); }
.imp-drop.is-over, .imp-drop.has-files { border-color: var(--adm-primary); background: #f2f5fe; }
.imp-drop .imp-files { color: var(--adm-ink); font-weight: 500; }
.imp-steps { padding-left: 1.1rem; margin: 0 0 1rem; font-size: .88rem; }
.imp-steps li + li { margin-top: .45rem; }
.imp-state { display: inline-block; border-radius: 20px; padding: .15rem .6rem; font-size: .74rem; font-weight: 500; white-space: nowrap; background: #eef0f2; color: #5b6670; }
.imp-state.is-running { background: #fff4e0; color: #a5650a; }
.imp-state.is-done { background: #e6edfd; color: #2549c9; }
.imp-state.is-undone { background: #fdecea; color: #b42f2f; }
.imp-map { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 1fr) minmax(120px, 1fr); gap: .5rem 1rem; align-items: center; }
.imp-map > .imp-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-muted); font-weight: 600; }
.imp-map label { font-size: .86rem; margin: 0; }
.imp-map .imp-sample { font-size: .8rem; color: var(--adm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #f6f8f9; border-radius: 6px; padding: .3rem .55rem; min-height: 1.9rem; }
.imp-map .is-set .form-select { border-color: var(--adm-primary); }
.imp-progress { height: 12px; border-radius: 6px; background: #edf0f2; overflow: hidden; }
.imp-progress span { display: block; height: 100%; width: 0; background: var(--adm-primary); transition: width .25s; }
.imp-raw td, .imp-raw th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
@media (max-width: 767.98px) { .imp-map { grid-template-columns: 1fr; } .imp-map > .imp-h { display: none; } .imp-map .imp-sample { margin-bottom: .6rem; } }

/* ---------- v2.2 · Recorrido guiado del administrador (entrega 23, tour.js) ---------- */
.cxv-tour { position: fixed; inset: 0; z-index: 2000; animation: cxv-tour-in .25s ease-out; }
.cxv-tour.is-closing { opacity: 0; transition: opacity .2s; }
.cxv-tour-block { position: absolute; inset: 0; }
.cxv-tour-hole {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(10, 30, 20, .62), 0 0 0 3px rgba(38, 195, 154, .9);
  transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease;
}
.cxv-tour-pop {
  position: fixed; width: min(340px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 14px;
  background: #fff; color: var(--adm-ink); box-shadow: 0 24px 60px rgba(10, 30, 20, .35);
  transition: top .35s ease, left .35s ease, opacity .2s;
}
.cxv-tour-pop.is-moving { opacity: 0; }
.cxv-tour-pop.is-center { width: min(420px, calc(100vw - 24px)); text-align: center; padding: 24px 24px 18px; }
.cxv-tour-pop.is-center .cxv-tour-foot { justify-content: center; }
.cxv-tour-pop.is-center .cxv-tour-title { font-size: 1.25rem; }
.cxv-tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; margin-bottom: 4px; }
.cxv-tour-count { font-size: .75rem; font-weight: 600; color: var(--adm-muted); }
.cxv-tour-skip { border: 0; background: none; padding: 0; font-size: .82rem; font-weight: 600; color: var(--adm-muted); }
.cxv-tour-skip:hover { color: var(--adm-primary); }
.cxv-tour-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.cxv-tour-text { font-size: .9rem; line-height: 1.5; color: var(--adm-muted); margin: 0 0 12px; }
.cxv-tour-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.cxv-tour-dots:empty { display: none; }
.cxv-tour-dots span { width: 6px; height: 6px; border-radius: 3px; background: #dfe5e9; transition: width .2s; }
.cxv-tour-dots span.on { width: 16px; background: var(--adm-primary); }
.cxv-tour-foot { display: flex; justify-content: flex-end; gap: 8px; }
.cxv-tour-foot .btn { min-width: 92px; }
body.cxv-tour-open { overflow-anchor: none; }
@keyframes cxv-tour-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cxv-tour, .cxv-tour-hole, .cxv-tour-pop { transition: none; animation: none; } }
.tour-again { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; }
.tour-again + .tour-again { border-top: 1px solid var(--adm-line); }
.tour-again .btn { white-space: nowrap; }

/* v2.3 · Pestañas de pantalla (catálogos, ficha del paciente, estadísticas, alojado) como mosaicos:
   cada una con su ícono en color, todas a la vista (en filas si no caben en una) y la activa
   rellena con su color. En celular se deslizan de lado con flechas (admin-ui.js arma .adm-tabs-wrap). */
.adm-tabs-wrap { position: relative; margin-bottom: 1.25rem; }
.adm-tabs { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: .6rem; }
.adm-tabs .nav-item { min-width: 0; }
.adm-tabs .nav-item:nth-child(8n+1) { --tone: #2f5bea; }
.adm-tabs .nav-item:nth-child(8n+2) { --tone: #1e88e5; }
.adm-tabs .nav-item:nth-child(8n+3) { --tone: #6f42c1; }
.adm-tabs .nav-item:nth-child(8n+4) { --tone: #e8890c; }
.adm-tabs .nav-item:nth-child(8n+5) { --tone: #0f9d7a; }
.adm-tabs .nav-item:nth-child(8n+6) { --tone: #d63384; }
.adm-tabs .nav-item:nth-child(8n+7) { --tone: #3f51b5; }
.adm-tabs .nav-item:nth-child(8n+8) { --tone: #e04646; }
.adm-tabs .nav-link { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: .9rem .5rem .8rem; border: 1px solid var(--adm-line); border-radius: 12px; background: #fff; color: var(--adm-ink);
  font-size: .85rem; font-weight: 500; line-height: 1.25; text-align: center; white-space: normal; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s, color .15s; }
.adm-tabs .nav-link > i.fa-solid, .adm-tabs .nav-link > i.fa-regular { display: grid !important; place-items: center; width: 42px; height: 42px; margin: 0 !important; border-radius: 13px;
  font-size: 1.1rem; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, #fff); transition: background .15s, color .15s; }
.adm-tabs .nav-link:hover { border-color: color-mix(in srgb, var(--tone) 45%, #fff); background: color-mix(in srgb, var(--tone) 5%, #fff); color: var(--adm-ink); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.adm-tabs .nav-link.active, .adm-tabs .nav-link.active:hover { background: var(--tone); border-color: var(--tone); color: #fff; transform: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--tone) 35%, transparent); }
.adm-tabs .nav-link.active > i.fa-solid, .adm-tabs .nav-link.active > i.fa-regular { background: rgba(255,255,255,.2); color: #fff; }
.adm-tabs .nav-link .badge { position: absolute; top: .45rem; right: .45rem; margin: 0; padding: .2rem .45rem; font-size: .68rem; font-weight: 600;
  background: color-mix(in srgb, var(--tone) 12%, #fff) !important; color: var(--tone) !important; }
.adm-tabs .nav-link.active .badge { background: rgba(255,255,255,.25) !important; color: #fff !important; }
.adm-tabs-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: var(--adm-ink);
  box-shadow: 0 1px 6px rgba(0,0,0,.2); display: none; place-items: center; font-size: .8rem; }
.adm-tabs-arrow.is-left { left: -6px; }
.adm-tabs-arrow.is-right { right: -6px; }
@media (max-width: 767.98px) {
  .adm-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: .5rem; padding: 2px 2px 6px; scrollbar-width: none; }
  .adm-tabs::-webkit-scrollbar { display: none; }
  .adm-tabs .nav-item { flex: 0 0 108px; }
  .adm-tabs .nav-link { padding: .7rem .4rem .6rem; font-size: .8rem; }
  .adm-tabs .nav-link > i.fa-solid, .adm-tabs .nav-link > i.fa-regular { width: 36px; height: 36px; font-size: 1rem; }
  .adm-tabs-wrap.can-left .adm-tabs-arrow.is-left, .adm-tabs-wrap.can-right .adm-tabs-arrow.is-right { display: grid; }
}

/* ---------- Listas desplegables con buscador (select-search.js) ---------- */
.cxv-sel { position: relative; display: block; min-width: 0; }
.cxv-sel.cxv-sel-inline { display: inline-block; vertical-align: middle; }
.cxv-sel-ig { flex: 1 1 auto; width: 1%; }
.input-group > .cxv-sel:not(:first-child) { margin-left: calc(-1 * var(--bs-border-width, 1px)); }
.input-group > .cxv-sel:not(:first-child) .cxv-sel-btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .cxv-sel:not(:last-child) .cxv-sel-btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cxv-sel-native { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.cxv-sel-btn { display: block; width: 100%; text-align: left; background-color: #fff; color: var(--adm-ink); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cxv-sel-btn.text-end { text-align: right; }
.cxv-sel-btn.is-placeholder .cxv-sel-text { color: var(--adm-muted); }
.cxv-sel-btn:disabled { background-color: #e9ecef; cursor: default; opacity: 1; }
.cxv-sel-btn.is-open { border-color: var(--adm-primary); box-shadow: 0 0 0 .2rem rgba(47,91,234,.15); }
.cxv-sel-text { display: block; overflow: hidden; text-overflow: ellipsis; }
.cxv-sel-drop { position: fixed; z-index: 2000; background: #fff; border: 1px solid var(--adm-primary); border-radius: var(--adm-radius); box-shadow: 0 10px 28px rgba(16,25,54,.18); overflow: hidden; font-size: .88rem; animation: cxvSelIn .12s ease-out; }
.cxv-sel-drop.is-up { animation-name: cxvSelUp; }
@keyframes cxvSelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes cxvSelUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cxv-sel-search { position: relative; padding: .5rem; border-bottom: 1px solid var(--adm-line); background: #f6f8fd; }
.cxv-sel-search i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: var(--adm-muted); font-size: .8rem; }
.cxv-sel-search input { width: 100%; border: 1px solid #d8dde2; border-radius: var(--adm-radius); padding: .38rem .6rem .38rem 1.9rem; font-size: .88rem; outline: 0; }
.cxv-sel-search input:focus { border-color: var(--adm-primary); box-shadow: 0 0 0 .15rem rgba(47,91,234,.12); }
.cxv-sel-list { list-style: none; margin: 0; padding: .3rem 0; overflow-y: auto; outline: 0; }
.cxv-sel-opt { display: flex; align-items: center; gap: .5rem; padding: .42rem .8rem; cursor: pointer; line-height: 1.3; }
.cxv-sel-opt i { margin-left: auto; font-size: .75rem; }
.cxv-sel-opt.in-group { padding-left: 1.4rem; }
.cxv-sel-opt.is-empty { color: var(--adm-muted); }
.cxv-sel-opt.is-selected { color: var(--adm-primary-dark); font-weight: 500; background: var(--adm-primary-soft); }
.cxv-sel-opt.is-active { background: var(--adm-primary); color: #fff; }
.cxv-sel-opt.is-disabled { color: #b6bcc2; cursor: default; }
.cxv-sel-group { padding: .5rem .8rem .2rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-muted); }
.cxv-sel-none { padding: .7rem .8rem; color: var(--adm-muted); }
.input-group > .cxv-sel-ig.cxv-sel-inline { flex: 0 0 auto; }

/* ---------- v2.4 · Seguridad y accesos (entrega 22) ---------- */
.mini-ico.is-gray { background: #eef0f2; color: #6c757d; }
.stat-mini { border-left: 1px solid var(--adm-line); }
.stat-mini strong { line-height: 1.1; }
@media (max-width: 767.98px) { .stat-mini { border-left: 0; flex: 1 1 40%; } }

/* ---------- v2.5 · Cuenta y portal de clientes (entrega 23) ---------- */
.pet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.pet-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--adm-line); border-radius: 10px; color: var(--adm-ink); text-decoration: none; background: #fff; transition: box-shadow .15s, border-color .15s, transform .15s; }
.pet-card:hover { border-color: var(--adm-primary); box-shadow: 0 6px 18px rgba(47,91,234,.12); transform: translateY(-1px); color: var(--adm-ink); }
.pet-card .pet-avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; }
.pet-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pet-card-body strong { font-weight: 600; font-size: 1.05rem; }
.pet-card-body small { color: var(--adm-muted); }
.pet-card.is-gone { opacity: .65; }
.pet-card.is-gone img { filter: grayscale(1); }
.weight-bars { display: flex; align-items: flex-end; gap: .6rem; height: 170px; padding-top: 1.2rem; overflow-x: auto; }
.weight-bars .wb { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .25rem; }
.weight-bars .wb-bar { width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--adm-teal), var(--adm-primary)); }
.weight-bars .wb-val { font-size: .75rem; font-weight: 600; }
.weight-bars small { font-size: .7rem; color: var(--adm-muted); }
.cred-box { display: grid; gap: .6rem; padding: 1rem; border-radius: 10px; background: var(--adm-primary-soft); }
.cred-box small { display: block; color: var(--adm-muted); font-size: .75rem; }
.cred-box strong { font-weight: 600; word-break: break-all; }
.cred-box .cred-pass { font-size: 1.35rem; letter-spacing: .06em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--adm-primary-dark); }
body.portal .side-group-toggle { cursor: default; }
body.portal .side-avatar, body.portal .side-avatar:hover { text-decoration: none; }

/* ---------- Tablero: fila de gráficos (hasta 3, mismo alto) ---------- */
.dash-charts > [class*="col-"] > .panel { height: 100%; }
.dash-charts .panel > .dash-chart, .dash-charts .panel > .donut-wrap, .dash-charts .panel > .empty { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.dash-charts .bars { height: 200px; }
.donut-wrap.is-stack { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 1.25rem 1.5rem; }
.donut-wrap.is-stack .donut { width: 160px; height: 160px; flex: none; }
.donut-wrap.is-stack .donut::after { inset: 24px; }
.donut-wrap.is-stack .legend { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.donut-wrap.is-stack .legend li { grid-template-columns: 12px 1fr auto; }
.panel-more { display: block; text-align: center; padding: .6rem; font-size: .8rem; border-top: 1px solid #edf0f2; text-decoration: none; }
/* Accesos rápidos: los botones crecen para llenar el panel cuando su pareja es más alta */
.adm-content .row.g-4 > [class*="col-"] > .panel:only-child > .quick-grid:last-child { flex: 1; grid-auto-rows: 1fr; }
.adm-content .row.g-4 > [class*="col-"] > .panel:only-child > .quick-grid:last-child .quick { justify-content: center; }
/* Gráficos angostos (3 por fila en pantallas medianas): título en una línea y leyenda en una columna */
@media (max-width: 1599.98px) {
    .dash-charts .panel-title small { display: none; }
    .dash-charts .donut-wrap.is-stack .legend { grid-template-columns: 1fr; }
}
.dash-charts .panel-head { flex-wrap: nowrap; }
.dash-charts .panel-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
