/* SAS-C — Sistema Administración del Salón Canino */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-bg:    #2d4f4b;
  --sidebar-text:  #d4e8da;
  --sidebar-hover: #36605b;
  --sidebar-active:#3f7069;
  --primary:       #488079;
  --primary-light: #5ba198;
  --accent:        #c97c3a;
  --accent-light:  #e8955a;
  --danger:        #c0392b;
  --warning:       #d4a017;
  --bg:            #f5f0eb;
  --card-bg:       #ffffff;
  --border:        #e2d9d0;
  --text:          #2c1a0e;
  --text-muted:    #7a6a5a;
  --radius:        8px;
  --shadow:        0 2px 8px rgba(0,0,0,.08);
}

body { font-family: 'Quicksand', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }
h1,h2,h3,h4,.page-title,.modal-title,.card-header,.kpi-value,.sidebar-header span { font-family: 'Baloo 2', system-ui, sans-serif; }

/* ── Row clickable ────────────────────────────────────────────── */
tr.tr-clickable { cursor: pointer; }
tr.tr-clickable:hover td { background: #ede8e3; }

/* ── Pet photo thumbnail ──────────────────────────────────────── */
.mascota-thumb { width:40px;height:40px;border-radius:50%;object-fit:cover;border:2px solid var(--border);background:var(--bg); }
.mascota-thumb-placeholder { width:40px;height:40px;border-radius:50%;background:var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:1.1rem; }

/* ── Photo upload preview ─────────────────────────────────────── */
.foto-preview-wrap { display:flex;align-items:center;gap:12px;margin-top:6px; }
.foto-preview-img  { width:72px;height:72px;border-radius:50%;object-fit:cover;border:2px solid var(--border); }

/* ── Service multi-select chips ───────────────────────────────── */
.srv-chips-box { min-height:42px;padding:6px 8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--card-bg);cursor:pointer;display:flex;flex-wrap:wrap;gap:6px;align-items:center; }
.srv-chip { display:inline-flex;align-items:center;gap:5px;padding:3px 10px;background:#dcfce7;color:#166534;border-radius:20px;font-size:.78rem;font-weight:600; }
.srv-chip button { background:none;border:none;cursor:pointer;color:#166534;font-size:.85rem;line-height:1;padding:0; }

/* ── Layout ───────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; transition: margin-left .25s; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width: 230px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: width .25s, transform .25s;
}
.sidebar-header {
  padding: 20px 16px; font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  overflow: hidden; white-space: nowrap;
}
.sidebar-logo-icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px;
  color: var(--sidebar-text); text-decoration: none; font-size: .875rem; transition: background .15s;
  white-space: nowrap; overflow: hidden;
}
.nav-item:hover  { background: var(--sidebar-hover); }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-item svg    { width: 16px; height: 16px; flex-shrink: 0; }
.nav-admin       { opacity: .85; }
.admin-badge     { width: 12px !important; height: 12px !important; margin-left: auto; opacity: .6; }
.sidebar-footer  { padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.1); }

/* Desktop sidebar collapse */
.layout.sidebar-collapsed .sidebar { width: 0; overflow: hidden; }

/* ── Topbar ───────────────────────────────────────────────────── */
.topbar {
  height: 52px; background: var(--card-bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
}
#topbar-clock { margin-left: auto; text-align: right; line-height: 1.25; }
#topbar-fecha { font-size: .7rem; color: var(--text-muted); font-weight: 600; text-transform: capitalize; }
#topbar-hora  { font-size: .85rem; color: var(--primary); font-weight: 700; letter-spacing: .3px; }
.sidebar-toggle { background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius); }
.sidebar-toggle svg { width: 20px; height: 20px; }

/* ── Page ─────────────────────────────────────────────────────── */
.page-content { flex: 1; padding: 28px 32px; }
.page-header  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title   { font-size: 1.75rem; font-weight: 700; }
.page-subtitle{ font-size: .875rem; color: var(--text-muted); margin-top: 2px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-body   { padding: 20px; }

/* ── KPI grid ─────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.kpi-card.green { border-left: 4px solid var(--primary-light); }
.kpi-card.amber { border-left: 4px solid var(--accent); }
.kpi-card.teal  { border-left: 4px solid #27ae60; }
.kpi-card.red   { border-left: 4px solid var(--danger); }
.kpi-label { font-size: .75rem; text-transform: uppercase; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.kpi-value { font-size: 2rem; font-weight: 700; }
.kpi-sub   { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ── Grid helpers ─────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media(max-width:900px) { .grid-2,.grid-3 { grid-template-columns: 1fr; } }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: var(--radius); border: none; cursor: pointer; font-size: .875rem; font-weight: 600;
  font-family: 'Quicksand', system-ui, sans-serif;
  text-decoration: none; transition: filter .15s;
}
.btn:hover    { filter: brightness(.92); }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-accent   { background: var(--accent);  color: #fff; }
.btn-amber    { background: #bc6c25;        color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-success  { background: #16a34a;        color: #fff; }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm       { padding: 5px 11px; font-size: .8rem; }
.btn svg      { width: 14px; height: 14px; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; padding: 10px 14px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); white-space: nowrap; background-color: #d9e9e7; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9f6f3; }
.text-right  { text-align: right; }
.text-center { text-align: center; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-confirmed  { background: #dbeafe; color: #1e40af; }
.badge-inprogress { background: #f3e8ff; color: #6b21a8; }
.badge-done       { background: #dcfce7; color: #166534; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }
.badge-paid       { background: #dcfce7; color: #166534; }
.badge-unpaid     { background: #fef3c7; color: #92400e; }
.badge-closed     { background: #dcfce7; color: #166534; }
.badge-open       { background: #fef3c7; color: #92400e; }
.badge-low        { background: #fee2e2; color: #991b1b; }
.badge-abierta    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-pagada     { background: #dcfce7; color: #166534; }
.badge-cancelada  { background: #fee2e2; color: #991b1b; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .875rem; background: var(--card-bg); color: var(--text); transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--primary-light); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a6a5a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
textarea.form-control { min-height: 80px; resize: vertical; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--card-bg); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0,0,0,.2); width: 90%; max-width: 540px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title  { font-weight: 700; font-size: 1.05rem; }
.modal-close  { background: none; border: none; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--text-muted); }
.modal-body   { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Calendar ─────────────────────────────────────────────────── */
.cal-nav  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-head { background: #f0ebe5; text-align: center; padding: 8px 4px; font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.cal-day  { background: var(--card-bg); min-height: 96px; padding: 6px; cursor: pointer; transition: background .1s; }
.cal-day:hover { background: #f9f6f3; }
.cal-day.today .cal-num { background: var(--primary); color: #fff; border-radius: 50%; }
.cal-day.selected { outline: 2px solid var(--primary-light) inset; }
.cal-day.other-month { opacity: .4; }
.cal-num  { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; margin-bottom: 2px; }
.cal-appt { font-size: .68rem; padding: 1px 4px; border-radius: 3px; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Alert banners ────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-warning { background: #fef9c3; border: 1px solid #fde047; color: #713f12; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.alert-orange  { background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; }

/* ── POS / Ventas ─────────────────────────────────────────────── */
.pos-grid { display: grid; grid-template-columns: 6fr 4fr; gap: 20px; }
@media(max-width:900px) { .pos-grid { grid-template-columns: 1fr; } }
.pos-item  { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.pos-total { font-size: 1.5rem; font-weight: 700; text-align: right; color: var(--primary); margin-top: 12px; }

/* ── Comandas grid (ventas) ───────────────────────────────────── */
.comandas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comanda-card {
  border: 2px solid #fed7aa; background: #fff7ed; border-radius: var(--radius);
  padding: 16px 20px;
}
.comanda-title { font-weight: 700; font-size: 1rem; color: #c2410c; }
.comanda-sub   { font-size: .82rem; color: #9a3412; margin-top: 2px; }

/* ── Tabs (Ventas / Historial) ────────────────────────────────── */
.tab-bar { display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:24px; }
.tab-btn { background:none; border:none; border-bottom:3px solid transparent; margin-bottom:-2px; padding:10px 20px; font-size:.9rem; font-weight:600; font-family:'Quicksand',system-ui,sans-serif; cursor:pointer; color:var(--text-muted); transition:color .15s,border-color .15s; }
.tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); }

/* ── Métodos de pago — botones ────────────────────────────────── */
.pago-btns { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:4px; }
.pago-btn {
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; padding:10px 14px; border-radius:10px; border:2px solid var(--border);
  background:var(--card-bg); cursor:pointer; font-size:.75rem; font-weight:700;
  font-family:'Quicksand',system-ui,sans-serif; color:var(--text-muted);
  transition:all .18s; min-width:72px;
}
.pago-btn svg { width:20px; height:20px; }
.pago-btn:hover { border-color:var(--primary); color:var(--primary); background:#f0f8f4; }
.pago-btn.selected { border-color:var(--primary); color:#fff; background:var(--primary); box-shadow:0 3px 10px rgba(45,106,79,.3); }
.pago-btn.selected svg { stroke:#fff; }

/* ── Ticket de impresión ──────────────────────────────────────── */
.ticket-wrap {
  font-family: 'Courier New', monospace; font-size: .82rem;
  max-width: 320px; margin: 0 auto; padding: 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; line-height: 1.55;
}
.ticket-title { text-align:center; font-size:1.1rem; font-weight:700; margin-bottom:2px; }
.ticket-sub   { text-align:center; font-size:.75rem; color:#555; margin-bottom:10px; }
.ticket-sep   { border:none; border-top:1px dashed #aaa; margin:8px 0; }
.ticket-row   { display:flex; justify-content:space-between; gap:6px; }
.ticket-total { font-weight:700; font-size:1.05rem; }

/* ── View toggle ──────────────────────────────────────────────── */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.view-toggle button { background: none; border: none; padding: 7px 14px; cursor: pointer; font-size: .875rem; display: flex; align-items: center; gap: 6px; }
.view-toggle button.active { background: var(--primary); color: #fff; }
.view-toggle button svg { width: 14px; height: 14px; }

/* ── Misc ─────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 12px; }
.mt-1 { margin-top: 4px; }  .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.font-bold { font-weight: 700; }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.text-success { color: #166534; }
.text-primary { color: var(--primary); }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; background: #1a1a1a; color: #fff; padding: 12px 20px; border-radius: var(--radius); z-index: 9999; font-size: .875rem; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.toast.hidden   { display: none; }
.toast.success  { background: var(--primary); }
.toast.error    { background: var(--danger); }

/* ── Admin lock ───────────────────────────────────────────────── */
.admin-lock { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.admin-lock-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 32px; width: 100%; max-width: 360px; text-align: center; box-shadow: var(--shadow); }
.admin-lock-icon { width: 56px; height: 56px; background: #e8f4ed; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.admin-lock-icon svg { width: 28px; height: 28px; color: var(--primary); }

/* ── Responsive sidebar (mobile) ──────────────────────────────── */
@media(max-width:768px) {
  .sidebar { position: fixed; left: -230px; top: 0; height: 100%; z-index: 100; transition: left .25s; }
  .sidebar.open { left: 0; }
  .page-content { padding: 20px 16px; }
  .layout.sidebar-collapsed .sidebar { width: 230px; }
  /* Calendario: scroll horizontal en móvil */
  .cal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid  { min-width: 560px; }
  /* Tabs con overflow horizontal */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Comandas: 1 columna en móvil */
  .comandas-grid { grid-template-columns: 1fr; }
}

/* ── Mobile responsivo adicional ─────────────────────────────── */
@media(max-width:768px) {
  /* Tipografía */
  .page-title { font-size: 1.3rem; }
  .page-header { margin-bottom: 16px; }

  /* KPI grid: 2 columnas en tablet, 1 en móvil */
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 1.5rem; }
  .kpi-card  { padding: 12px 14px; }

  /* Tablas */
  th, td { padding: 8px 10px; font-size: .8rem; }

  /* Modales: ancho completo en móvil */
  .modal { width: 96%; max-width: 96%; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 10px 16px; flex-wrap: wrap; }

  /* Grids dentro de modales/formularios: 1 columna en móvil */
  .modal-body [style*="grid-template-columns:1fr 1fr"],
  .modal-body [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Card headers con acciones */
  .card-header { flex-wrap: wrap; gap: 8px; }

  /* Botones en grupos */
  .page-header .btn { font-size: .8rem; padding: 7px 12px; }

  /* Pos / Ventas carrito sticky deshabilitado en móvil */
  .pos-grid > div:last-child > .card { position: static; }

  /* Comanda cards */
  .comanda-card { padding: 12px 14px; }
  /* Botones de métodos de pago: más compactos */
  .pago-btn { min-width: 58px; padding: 8px 8px; }
  /* Acciones de página */
  .page-header > div { flex: 1; min-width: 0; }

  /* Toast: centrado en móvil */
  .toast { right: 50%; transform: translateX(50%); bottom: 16px; }
}

@media(max-width:480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-content { padding: 14px 12px; }
  table { font-size: .75rem; }
  th, td { padding: 7px 8px; }
}

/* ── Sidebar overlay (móvil) ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,.45);
}
@media(max-width:768px) {
  .sidebar-overlay.active { display: block; }
}

/* ── Select buscable (mascota en citas) ──────────────────────── */
.custom-select-wrap { position: relative; }
.custom-select-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 240px; overflow-y: auto;
}
.csd-option {
  padding: 9px 14px; cursor: pointer; font-size: .875rem;
  border-bottom: 1px solid #f0ebe5; display: flex; align-items: center; gap: 6px;
}
.csd-option:last-child { border-bottom: none; }
.csd-option:hover { background: var(--bg); }
.csd-option.special { color: var(--primary); font-weight: 600; }
.csd-option.special .csd-icon { color: var(--accent); }
.csd-sep { border-top: 2px solid var(--border); margin: 2px 0; }
.csd-no-results { padding: 10px 14px; font-size: .8rem; color: var(--text-muted); }

/* ── Barra de búsqueda en listados ───────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.search-bar input { flex: 1; max-width: 340px; }
.search-bar .search-count { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }

/* ── Tarjetas de lealtad ─────────────────────────────────────── */
.stamp-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.stamp {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: transform .15s;
}
.stamp-filled { background: var(--primary); box-shadow: 0 2px 6px rgba(45,106,79,.35); }
.stamp-empty  { background: #f1f5f9; border: 2px dashed #cbd5e1; }
.stamp-filled:hover { transform: scale(1.15); }
.card-reward  { border: 2px solid #f59e0b !important; background: #fffdf5; }
.badge-reward {
  display: inline-block; background: #f59e0b; color: #fff;
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 12px; letter-spacing: .3px; animation: pulse-gold 1.8s infinite;
}
@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

/* ── Impresión / Exportar PDF ────────────────────────────────── */
/* Elimina la zona de márgenes donde el navegador imprime URL y fecha */
@page { margin: 0; }

@media print {
  .sidebar, .topbar, .sidebar-toggle,
  .no-print, .btn-print, form[method="GET"] { display: none !important; }

  .print-only { display: block !important; }

  .main-wrap  { margin-left: 0 !important; }
  body        { background: #fff !important; padding: 14mm !important; }
  .layout     { display: block !important; }

  .page-content { padding: 0 !important; }

  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    margin-bottom: 16px !important;
  }
  canvas { max-width: 100% !important; max-height: 220px !important; }

  .grid-2 { grid-template-columns: 1fr 1fr !important; }
  .kpi-grid{ grid-template-columns: repeat(4,1fr) !important; }

  /* Comisiones: evitar corte horizontal de tabla */
  table { font-size: .72rem !important; }
  th, td { padding: 5px 7px !important; white-space: normal !important; }
  .table-wrap { overflow: visible !important; }

  /* Ticket */
  .ticket-wrap { border: none; max-width: 100%; }
  .no-ticket-print { display: none !important; }
}
