/* ============================================================================
   VETE Suite · Sistema de diseño
   ========================================================================== */
:root {
  --brand: #2f6df6;
  --brand-dark: #1d4ed8;
  --brand-soft: #e8f0ff;
  --teal: #0ea5a4;
  --violet: #7c3aed;
  --pink: #db2777;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --danger: #e11d48;
  --danger-soft: #ffe4e6;
  --info-soft: #e0f2fe;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --border: #e3e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --side-bg: #0f172a;
  --side-bg-2: #16233f;
  --side-text: #cbd5e1;
  --side-active: #2f6df6;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .18);
  --sidebar-w: 254px;
  --header-h: 60px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111a2e;
  --surface-2: #16223a;
  --border: #24324e;
  --border-strong: #33425f;
  --text: #e8eefc;
  --text-2: #a5b4cd;
  --text-3: #6b7d9b;
  --brand-soft: #16294d;
  --ok-soft: #10321f;
  --warn-soft: #3a2c0c;
  --danger-soft: #3d1420;
  --info-soft: #10293f;
  --side-bg: #070d19;
  --side-bg-2: #0d1729;
  --shadow: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .6rem; }
svg { display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px;
  border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ------------------------------------------------------------- utilidades - */
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: .82rem; }
.tiny { font-size: .74rem; }
.bold { font-weight: 650; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: .02em; }
.right { text-align: right; }
.center-text { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .danger { color: var(--danger); }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mb { margin-bottom: 12px; }
.gap0 { gap: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1150px) { .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr !important; } }

/* ---------------------------------------------------------------- botones - */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 560;
  cursor: pointer; transition: .13s ease; white-space: nowrap; line-height: 1.2;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.success:hover { filter: brightness(.93); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.93); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--brand); }
.btn.sm { padding: 5px 10px; font-size: .82rem; border-radius: 7px; }
.btn.lg { padding: 12px 22px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.icon { padding: 7px; width: 34px; height: 34px; }
.btn.icon.sm { width: 28px; height: 28px; padding: 5px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--brand); border-color: var(--brand); color: #fff; z-index: 1; }

/* ---------------------------------------------------------------- campos -- */
label.field { display: flex; flex-direction: column; gap: 5px; font-size: .8rem;
  font-weight: 600; color: var(--text-2); }
label.field > span.req::after { content: " *"; color: var(--danger); }
input, select, textarea {
  font: inherit; padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  width: 100%; transition: .13s; font-weight: 450;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 109, 246, .16);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-3); }
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500;
  color: var(--text); cursor: pointer; }
.inline-form { display: grid; gap: 12px; }
.field-error { border-color: var(--danger) !important; }
.hint { font-size: .74rem; color: var(--text-3); font-weight: 450; }

/* --------------------------------------------------------------- tarjetas - */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.card-head h3 { font-size: .98rem; }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 16px; }

.kpi { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; position: relative;
  overflow: hidden; }
.kpi .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); font-weight: 700; }
.kpi .value { font-size: 1.62rem; font-weight: 700; letter-spacing: -.02em; }
.kpi .sub { font-size: .78rem; color: var(--text-2); }
.kpi .kpi-icon { position: absolute; right: 12px; top: 12px; opacity: .16; }
.kpi.accent { border-left: 3px solid var(--brand); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-size: .78rem; }
.trend.up { color: var(--ok); } .trend.down { color: var(--danger); }

/* ---------------------------------------------------------------- tablas -- */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th {
  text-align: left; padding: 9px 12px; background: var(--surface-2); color: var(--text-2);
  font-weight: 650; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2;
  white-space: nowrap;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tfoot td { font-weight: 700; background: var(--surface-2);
  border-top: 2px solid var(--border-strong); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; opacity: .5; }

/* --------------------------------------------------------------- badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: .73rem; font-weight: 700; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); white-space: nowrap; letter-spacing: .01em;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: #b45309; border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-soft); color: #0369a1; border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
.badge.violet { background: #ede9fe; color: #6d28d9; border-color: transparent; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------------------ chips - */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .78rem; cursor: pointer; transition: .12s; }
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip .x { opacity: .6; font-weight: 700; }

/* ----------------------------------------------------------------- layout - */
#app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: linear-gradient(175deg,
  var(--side-bg), var(--side-bg-2)); color: var(--side-text); display: flex;
  flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.sidebar.master { background: linear-gradient(175deg, #1b1035, #2a1a52); }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem;
  flex: 0 0 36px; box-shadow: 0 4px 12px rgba(47, 109, 246, .4); }
.sidebar.master .brand .logo { background: var(--violet); box-shadow: 0 4px 12px rgba(124, 58, 237, .45); }
.brand .name { color: #fff; font-weight: 700; font-size: .98rem; line-height: 1.15; }
.brand .sub { font-size: .7rem; color: #8ea3c4; text-transform: uppercase; letter-spacing: .08em; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-color: transparent; }
.nav-group { margin-top: 12px; padding: 0 8px 5px; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .1em; color: #64769a; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px;
  color: var(--side-text); font-weight: 520; font-size: .875rem; margin-bottom: 1px;
  transition: .13s; text-decoration: none; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.active { background: var(--side-active); color: #fff; box-shadow: 0 4px 12px rgba(47, 109, 246, .35); }
.sidebar.master .nav a.active { background: var(--violet); box-shadow: 0 4px 12px rgba(124, 58, 237, .4); }
.nav a .ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav a.active .ico { opacity: 1; }
.nav a .count { margin-left: auto; background: rgba(255, 255, 255, .14); padding: 1px 7px;
  border-radius: 999px; font-size: .7rem; font-weight: 700; }
.nav a.locked { opacity: .42; }
.nav a.locked:hover { background: transparent; cursor: not-allowed; }
.side-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .74rem;
  color: #7e91b3; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 9px 11px; margin: 0 10px 8px;
  border-radius: 10px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.side-user:hover { background: rgba(255, 255, 255, .1); }
.side-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; flex: 0 0 30px; }
.side-user .u-name { color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.1; }
.side-user .u-role { font-size: .7rem; color: #8ea3c4; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0;
  z-index: 30; box-shadow: var(--shadow-sm);
}
.topbar .title { font-weight: 680; font-size: 1.06rem; }
.topbar .crumb { color: var(--text-3); font-size: .8rem; }
.content { padding: 20px; flex: 1; max-width: 1680px; width: 100%; margin: 0 auto; }
.content.wide { max-width: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  margin-bottom: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); font-size: .86rem; margin-top: 2px; }
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: .22s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 14px; }
}

/* ---------------------------------------------------------------- modales - */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 200;
  padding: 40px 16px; overflow-y: auto; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; animation: slideUp .18s ease; border: 1px solid var(--border);
  display: flex; flex-direction: column; max-height: calc(100vh - 80px);
}
.modal.sm { max-width: 420px; } .modal.lg { max-width: 860px; }
.modal.xl { max-width: 1180px; } .modal.full { max-width: 1500px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.04rem; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex;
  justify-content: flex-end; gap: 9px; background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.close-x { background: none; border: none; font-size: 1.35rem; color: var(--text-3);
  cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.close-x:hover { background: var(--surface-2); color: var(--danger); }

/* ---------------------------------------------------------------- toasts -- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 400; display: flex;
  flex-direction: column; gap: 9px; align-items: flex-end; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: 10px; padding: 11px 15px; box-shadow: var(--shadow); min-width: 260px;
  max-width: 400px; animation: slideIn .2s ease; font-size: .88rem;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast .t-title { font-weight: 680; margin-bottom: 1px; }

/* ----------------------------------------------------------------- login -- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg);
}
.login-art {
  background: linear-gradient(150deg, #12203c 0%, #1e3a8a 55%, #2f6df6 100%);
  color: #fff; padding: 54px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-art::after {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .13), transparent 68%);
  right: -220px; bottom: -240px;
}
.login-art h1 { font-size: 2.35rem; line-height: 1.13; margin-bottom: 14px; }
.login-art .lead { font-size: 1.02rem; opacity: .9; max-width: 460px; }
.login-features { display: grid; gap: 11px; margin-top: 28px; position: relative; z-index: 2; }
.login-features div { display: flex; gap: 10px; align-items: center; font-size: .93rem; opacity: .95; }
.login-features .tick { width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: 0 0 22px;
  font-size: .75rem; }
.login-form-wrap { display: grid; place-items: center; padding: 30px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .logo-big { width: 54px; height: 54px; border-radius: 15px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.4rem;
  margin-bottom: 16px; box-shadow: 0 8px 22px rgba(47, 109, 246, .35); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px;
  margin-bottom: 18px; border: 1px solid var(--border); }
.tabs button { flex: 1; padding: 8px; border: none; background: none; border-radius: 7px;
  font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; font-size: .85rem; }
.tabs button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
@media (max-width: 940px) { .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; } }

/* ------------------------------------------------------------------- POS -- */
.pos { display: grid; grid-template-columns: 1fr 400px; gap: 14px; height: calc(100vh - var(--header-h) - 28px); }
.pos-left { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pos-search { display: flex; gap: 9px; }
.pos-search input { font-size: 1.02rem; padding: 11px 14px; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
.pos-grid { flex: 1; overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; align-content: start;
  padding-right: 4px; }
.prod-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 10px;
  cursor: pointer; transition: .13s; display: flex; flex-direction: column; gap: 4px;
  position: relative; min-height: 96px;
}
.prod-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.prod-card .p-name { font-weight: 600; font-size: .82rem; line-height: 1.28;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prod-card .p-price { font-weight: 750; color: var(--brand); font-size: 1.02rem; margin-top: auto; }
.prod-card .p-stock { font-size: .7rem; color: var(--text-3); }
.prod-card .p-tag { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
  border-radius: 50%; }
.prod-card.out { opacity: .55; }

.cart { display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.cart-items { flex: 1; overflow-y: auto; min-height: 120px; }
.cart-item { padding: 9px 13px; border-bottom: 1px solid var(--border); display: grid;
  grid-template-columns: 1fr auto; gap: 4px 8px; }
.cart-item:hover { background: var(--surface-2); }
.cart-item .ci-name { font-weight: 590; font-size: .84rem; }
.cart-item .ci-meta { font-size: .74rem; color: var(--text-3); }
.cart-item .ci-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-ctl { display: inline-flex; align-items: center; border: 1px solid var(--border-strong);
  border-radius: 7px; overflow: hidden; }
.qty-ctl button { border: none; background: var(--surface-2); width: 25px; height: 25px;
  cursor: pointer; font-weight: 700; color: var(--text-2); font-size: .9rem; }
.qty-ctl button:hover { background: var(--brand); color: #fff; }
.qty-ctl input { width: 46px; border: none; text-align: center; padding: 3px; font-size: .82rem;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; }
.cart-foot { border-top: 1px solid var(--border); padding: 12px 14px; background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius); }
.totals-row { display: flex; justify-content: space-between; font-size: .84rem; padding: 2px 0;
  color: var(--text-2); }
.totals-row.grand { font-size: 1.5rem; font-weight: 750; color: var(--text); padding-top: 7px;
  margin-top: 5px; border-top: 1px dashed var(--border-strong); }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 9px 0; }
.pay-methods .btn { flex-direction: column; gap: 2px; padding: 9px 4px; font-size: .74rem; }
.pay-methods .btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
@media (max-width: 1250px) { .pos { grid-template-columns: 1fr; height: auto; }
  .pos-grid { max-height: 420px; } }

/* --------------------------------------------------------------- ticket --- */
.ticket { font-family: var(--mono); font-size: 11.5px; width: 300px; margin: 0 auto;
  background: #fff; color: #000; padding: 12px; line-height: 1.42; }
.ticket .t-center { text-align: center; }
.ticket hr { border: none; border-top: 1px dashed #999; margin: 6px 0; }
.ticket table { width: 100%; font-size: 11px; }
.ticket td { padding: 1px 0; vertical-align: top; }
.ticket .t-tot { font-size: 14px; font-weight: 700; }

/* --------------------------------------------------------------- agenda --- */
.calendar { display: grid; grid-template-columns: 62px 1fr; gap: 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-hours { border-right: 1px solid var(--border); background: var(--surface-2); }
.cal-hour { height: 54px; padding: 3px 7px; font-size: .7rem; color: var(--text-3);
  border-bottom: 1px solid var(--border); text-align: right; }
.cal-cols { display: grid; position: relative; overflow-x: auto; }
.cal-col { border-right: 1px solid var(--border); position: relative; min-width: 150px; }
.cal-col-head { padding: 7px; text-align: center; font-size: .78rem; font-weight: 650;
  border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky;
  top: 0; z-index: 2; }
.cal-slot { height: 54px; border-bottom: 1px solid var(--border); }
.cal-slot:hover { background: var(--brand-soft); cursor: pointer; }
.cal-event { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 4px 7px;
  font-size: .73rem; color: #fff; overflow: hidden; cursor: pointer; z-index: 3;
  box-shadow: var(--shadow-sm); border-left: 3px solid rgba(0, 0, 0, .22); }
.cal-event:hover { filter: brightness(1.08); z-index: 5; }
.cal-event .ev-time { font-weight: 700; opacity: .92; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.month-cell { min-height: 108px; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 5px; font-size: .76rem; }
.month-cell.other { background: var(--surface-2); color: var(--text-3); }
.month-cell.today { background: var(--brand-soft); }
.month-cell .d-num { font-weight: 700; margin-bottom: 3px; }
.month-cell .m-ev { background: var(--brand); color: #fff; border-radius: 4px; padding: 1px 5px;
  margin-bottom: 2px; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: .7rem; }
.month-head { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-head div { padding: 7px; text-align: center; font-size: .73rem; font-weight: 700;
  color: var(--text-2); text-transform: uppercase; }

/* ------------------------------------------------------------ expediente -- */
.pet-header { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pet-avatar { width: 74px; height: 74px; border-radius: 18px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 2.1rem; flex: 0 0 74px; overflow: hidden; }
.pet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 5px; bottom: 5px; width: 2px;
  background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 11px;
  height: 11px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border); }
.tl-item.vac::before { background: var(--ok); }
.tl-item.groom::before { background: var(--pink); }
.tl-item.hosp::before { background: var(--warn); }
.tl-date { font-size: .74rem; color: var(--text-3); font-weight: 650; }
.soap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 800px) { .soap-grid { grid-template-columns: 1fr; } }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 8px; }
.vital { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px; text-align: center; }
.vital .v-lab { font-size: .68rem; text-transform: uppercase; color: var(--text-3);
  font-weight: 700; letter-spacing: .04em; }
.vital .v-val { font-size: 1.06rem; font-weight: 700; }

/* --------------------------------------------------------------- tabsbar -- */
.tabbar { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 16px;
  overflow-x: auto; }
.tabbar button { border: none; background: none; padding: 9px 15px; font: inherit;
  font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap; font-size: .88rem; }
.tabbar button:hover { color: var(--brand); }
.tabbar button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------------------------------------------------------- charts -- */
.chart { width: 100%; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 10px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linejoin: round;
  stroke-linecap: round; }
.chart .area { fill: url(#gradBrand); opacity: .85; }
.chart .bar { fill: var(--brand); }
.chart .bar:hover { fill: var(--brand-dark); }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: .84rem; }
.bar-track { grid-column: 1 / -1; height: 7px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }

/* --------------------------------------------------------------- licencia - */
.license-banner {
  padding: 10px 18px; display: flex; align-items: center; gap: 12px; font-size: .86rem;
  font-weight: 560; border-bottom: 1px solid var(--border);
}
.license-banner.warn { background: var(--warn-soft); color: #92400e; }
.license-banner.danger { background: var(--danger-soft); color: #9f1239; }
.license-banner.info { background: var(--info-soft); color: #075985; }
.license-key { font-family: var(--mono); font-size: 1.02rem; letter-spacing: .1em;
  background: var(--surface-2); padding: 11px 15px; border-radius: 10px;
  border: 1px dashed var(--border-strong); text-align: center; font-weight: 700;
  word-break: break-all; }
.plan-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 9px; position: relative; background: var(--surface); }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.plan-card .price { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; }
.plan-card .price small { font-size: .8rem; font-weight: 500; color: var(--text-3); }
.plan-card ul { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--text-2); }
.plan-card li { margin-bottom: 3px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
.feat { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .81rem; }
.feat.on { background: var(--ok-soft); border-color: transparent; color: #14532d; }
.feat.off { opacity: .55; }

/* ------------------------------------------------------------- utilidades - */
.loading { display: grid; place-items: center; padding: 56px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%,
  var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite;
  border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: .72rem; font-weight: 700; flex: 0 0 28px; }
.search-box { position: relative; }
.search-box input { padding-left: 33px; }
.search-box .s-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none; }
.dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60;
  max-height: 320px; overflow-y: auto; }
.dropdown div.opt { padding: 8px 12px; cursor: pointer; font-size: .86rem;
  border-bottom: 1px solid var(--border); }
.dropdown div.opt:last-child { border-bottom: none; }
.dropdown div.opt:hover, .dropdown div.opt.sel { background: var(--brand-soft); }
.stat-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: .86rem;
  border-bottom: 1px dashed var(--border); }
.stat-line:last-child { border-bottom: none; }
.stat-line b { font-variant-numeric: tabular-nums; }
.notif { padding: 10px 13px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--brand-soft); }
.dot-badge { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface); }

@media print {
  .sidebar, .topbar, .no-print, #toasts, .overlay { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { border: none; box-shadow: none; }
  .ticket { width: auto; }
}
