@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --pos-navy: #0046ad;
  --pos-gold: #d4a017;
  --pos-accent: #00d4ff;
  --pos-bg: #f8fafc;
  --pos-white: #ffffff;
  --pos-text: #0f172a;
  --pos-muted: #64748b;
  --pos-border: #e2e8f0;
  --pos-sidebar-w: 260px;
  --pos-radius: 12px;
  --pos-success: #16a34a;
  --pos-danger: #dc2626;
  --pos-warning: #d97706;
  --igr-obsidian: #030712;
  --igr-blue: #0046ad;
  --igr-cyan: #00d4ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--pos-bg);
  color: var(--pos-text);
  font-size: 14px;
}

.pos-layout { display: flex; min-height: 100vh; }

.pos-sidebar {
  width: var(--pos-sidebar-w);
  background: linear-gradient(180deg, var(--pos-navy) 0%, #152a4a 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.pos-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.pos-brand .igr { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.pos-brand-logo {
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  display: block;
  margin: 0 auto .4rem;
  background: rgba(255,255,255,.95);
  border-radius: 8px;
  padding: .35rem .5rem;
}
.pos-brand-has-logo .pos-brand-name {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: .15rem;
}
.pos-brand .pos-label { font-size: .72rem; font-weight: 700; color: var(--pos-gold); letter-spacing: .14em; text-transform: uppercase; }

.pos-nav { padding: .75rem 0; flex: 1; }

.pos-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1.25rem;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.pos-nav a:hover, .pos-nav a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: var(--pos-gold);
}

.pos-nav-icon { width: 18px; text-align: center; opacity: .85; flex-shrink: 0; }
.pos-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pos-main {
  margin-left: var(--pos-sidebar-w);
  flex: 1;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left .2s ease;
}

.pos-header {
  background: var(--pos-white);
  border-bottom: 1px solid var(--pos-border);
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pos-header h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }

.pos-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: auto;
}
.pos-sidebar-logout {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  text-decoration: none;
  display: block;
  margin-top: .5rem;
}
.pos-sidebar-logout:hover { color: #fff; }

.pos-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 31, 61, .5);
  z-index: 199;
}
.pos-sidebar-backdrop.show { display: block; }
body.pos-menu-open { overflow: hidden; }

.pos-header-start {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.pos-header-start h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  background: var(--pos-bg);
  color: var(--pos-navy);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.pos-menu-btn:hover { background: #e2e8f0; }

.pos-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--pos-muted);
  flex-shrink: 0;
  text-align: right;
}

.pos-header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.pos-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.pos-page-head h2 { margin: 0; font-size: 1rem; }
.pos-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pos-select-inline { padding: .4rem .6rem; border-radius: 8px; border: 1px solid var(--pos-border); font-size: .9rem; }
.pos-btn-sm { padding: .25rem .5rem; font-size: .8rem; }

.pos-roles-ref { margin-bottom: 1rem; }
.pos-roles-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.pos-role-ref-card {
  padding: .85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: #f8fafc;
}
.pos-role-ref-head {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-bottom: .5rem;
}
.pos-role-ref-head strong { font-size: 1rem; color: var(--pos-navy); }
.pos-perm-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .88rem;
  line-height: 1.6;
}
.pos-perm-list li { margin-bottom: .2rem; }
.pos-perm-mod { color: var(--pos-navy); }
.pos-perm-tag {
  display: inline-block;
  font-size: .7rem;
  padding: .1rem .35rem;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
}
.pos-perm-tag.ver { background: #dbeafe; color: #1d4ed8; }
.pos-perm-tag.edit { background: #dcfce7; color: #15803d; }
.pos-rol-ocultos {
  margin: .6rem 0 0;
  font-size: .8rem;
  color: var(--pos-muted);
  line-height: 1.4;
}
.pos-rol-hint {
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--pos-muted);
  line-height: 1.4;
  padding: .5rem .65rem;
  background: #f1f5f9;
  border-radius: 8px;
}

.pos-quick-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.pos-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pos-card-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pos-card-table .pos-table { min-width: 520px; }

.pos-screen-tabs {
  display: none;
  gap: .5rem;
  margin-bottom: .75rem;
}
.pos-screen-tabs button {
  flex: 1;
  padding: .65rem .75rem;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  color: var(--pos-text);
}
.pos-screen-tabs button.active {
  background: var(--pos-navy);
  color: #fff;
  border-color: var(--pos-navy);
}
.pos-tab-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--pos-gold);
  color: var(--pos-navy);
  font-size: .72rem;
  margin-left: .25rem;
}
.pos-screen-tabs button.active .pos-tab-badge {
  background: #fff;
  color: var(--pos-navy);
}

.pos-content { padding: 1.5rem; flex: 1; min-width: 0; }

.pos-card {
  background: var(--pos-white);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(12,31,61,.04);
}

.pos-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.pos-kpi {
  background: var(--pos-white);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  padding: 1rem 1.15rem;
}

.pos-kpi-label { font-size: .75rem; color: var(--pos-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pos-kpi-value { font-size: 1.6rem; font-weight: 800; color: var(--pos-navy); margin-top: .25rem; }
.pos-kpi-value.gold { color: var(--pos-gold); }
.pos-kpi-value.accent { color: var(--pos-accent); }

.pos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}

.pos-btn-primary { background: var(--pos-navy); color: #fff; }
.pos-btn-primary:hover { background: #152a4a; }
.pos-btn-gold { background: var(--pos-gold); color: var(--pos-navy); }
.pos-btn-gold:hover { filter: brightness(1.05); }
.pos-btn-accent { background: var(--pos-accent); color: #fff; }
.pos-btn-outline { background: transparent; border: 1px solid var(--pos-border); color: var(--pos-text); }
.pos-btn-danger { background: var(--pos-danger); color: #fff; }
.pos-btn-sm { padding: .35rem .7rem; font-size: .8rem; }

.pos-form-group { margin-bottom: 1rem; }
.pos-form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .85rem; }
.pos-form-group input, .pos-form-group select, .pos-form-group textarea {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  font: inherit;
}

.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th, .pos-table td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--pos-border); }
.pos-table th { font-size: .75rem; text-transform: uppercase; color: var(--pos-muted); font-weight: 700; }

.pos-badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pos-badge-success { background: #dcfce7; color: #166534; }
.pos-badge-warning { background: #fef3c7; color: #92400e; }
.pos-badge-danger { background: #fee2e2; color: #991b1b; }

.pos-alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.pos-alert-error { background: #fee2e2; color: #991b1b; }

/* Auth — identidad IGRTEC / POSMART (fondo claro) */
body.pos-auth { background: #ffffff; }

.pos-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; position: relative; overflow: hidden;
  background: #ffffff;
}
.pos-login-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(0, 212, 255, .14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(0, 70, 173, .06) 0%, transparent 55%);
  pointer-events: none;
}
.pos-login-wrap {
  position: relative; z-index: 1; width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center;
}
.pos-auth-header {
  position: relative; z-index: 1;
  text-align: center; margin-bottom: 1.25rem; width: 100%;
}
.pos-auth-header .pos-demo-company-line { margin-bottom: .65rem; }
.pos-auth-logo {
  max-width: 140px; height: auto; display: block; margin: 0 auto;
}
.pos-login-card {
  position: relative; z-index: 1; width: 100%;
  background: #fff;
  border: 1px solid var(--pos-border);
  border-radius: 12px; padding: 2.25rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 70, 173, .12);
}
.pos-login-card h1 { margin: 0 0 .35rem; font-size: 1.45rem; color: var(--pos-text); font-weight: 800; }
.pos-login-card .sub { color: var(--pos-muted); margin-bottom: 1.5rem; font-size: .9rem; }
.pos-auth .pos-form-group label { color: var(--pos-text); font-weight: 600; }
.pos-auth .pos-form-group input {
  background: #fff; border: 1px solid var(--pos-border); color: var(--pos-text);
}
.pos-auth .pos-form-group input:focus {
  border-color: var(--igr-blue); box-shadow: 0 0 0 3px rgba(0, 70, 173, .12);
}
.pos-login-demo { margin-top: 1.25rem; font-size: .85rem; color: var(--pos-muted); text-align: center; }
.pos-login-demo a { color: var(--igr-blue); font-weight: 600; text-decoration: none; }
.pos-login-demo a:hover { text-decoration: underline; }
.pos-auth .pos-btn-primary {
  background: var(--igr-blue); border: none; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 70, 173, .15);
}
.pos-auth .pos-btn-primary:hover { background: #003d94; }
.pos-auth a[style*="igr-cyan"], .pos-auth a[style*="pos-accent"] { color: var(--igr-blue) !important; }

/* Demo landing — claro corporativo IGRTEC */
.pos-demo-page {
  min-height: 100vh; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem 1.5rem 1.5rem;
  overflow: hidden; background: #ffffff;
}
.pos-demo-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% 30%, rgba(0, 212, 255, .12) 0%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 15% 85%, rgba(0, 70, 173, .05) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.pos-demo-content {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem; max-width: 1040px; width: 100%; align-items: center;
}
.pos-demo-content--center { grid-template-columns: 1fr; max-width: 480px; }
.pos-demo-hero { color: var(--pos-text); }
.pos-demo-company-line {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--igr-blue);
  border: 1px solid rgba(0, 70, 173, .2); padding: .35rem .75rem; border-radius: 4px;
  margin-bottom: 1rem; background: rgba(0, 70, 173, .04);
}
.pos-demo-hero-logo {
  max-width: 140px; height: auto; display: block;
  margin: 0 auto .75rem;
}
.pos-auth-header--demo { margin-bottom: 2rem; }
.pos-demo-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(0, 70, 173, .08); border: 1px solid rgba(0, 70, 173, .15);
  color: var(--igr-blue); font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: .4rem .85rem; border-radius: 4px; margin-bottom: 1.25rem;
}
.pos-demo-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.5rem); font-weight: 800; line-height: 1.15;
  margin: 0 0 1rem; letter-spacing: -.02em; color: #0f172a;
}
.pos-demo-hero h1 span { color: var(--igr-blue); }
.pos-demo-lead {
  font-size: 1rem; color: var(--pos-muted); line-height: 1.65;
  margin-bottom: 1.75rem; max-width: 420px;
}
.pos-demo-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pos-demo-features li {
  padding: .5rem 0; font-size: .9rem; color: #334155;
  border-bottom: 1px solid var(--pos-border); display: flex; align-items: center; gap: .6rem;
}
.pos-demo-features li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--igr-blue); flex-shrink: 0;
}
.pos-demo-trust {
  display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .72rem; color: var(--pos-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.pos-demo-trust span { display: flex; align-items: center; gap: .35rem; }
.pos-demo-card {
  background: #fff; border-radius: 12px; padding: 2rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 70, 173, .1);
  border: 1px solid var(--pos-border);
}
.pos-demo-card h2 { margin: 0 0 .35rem; font-size: 1.35rem; color: #0f172a; font-weight: 800; }
.pos-demo-card .sub { color: var(--pos-muted); margin-bottom: 1.5rem; font-size: .88rem; line-height: 1.5; }
.pos-demo-cta {
  width: 100%; padding: .9rem !important; font-size: .95rem !important; margin-top: .5rem;
  background: var(--igr-blue) !important; color: #fff !important;
  border: none !important; font-weight: 700 !important;
  box-shadow: 0 10px 30px rgba(0, 70, 173, .15) !important;
}
.pos-demo-cta:hover { background: #003d94 !important; }
.pos-demo-switch { margin-top: 1.25rem; text-align: center; font-size: .85rem; color: var(--pos-muted); }
.pos-demo-switch a { color: var(--igr-blue); font-weight: 600; text-decoration: none; }
.pos-demo-switch a:hover { text-decoration: underline; }
.pos-demo-footer {
  position: relative; z-index: 1; margin-top: 2.5rem; text-align: center;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pos-muted);
}
.pos-demo-footer span { color: var(--igr-blue); font-weight: 600; }
.pos-demo-card--success { text-align: center; }
.pos-demo-success-icon { font-size: 3rem; margin-bottom: .5rem; }
.pos-demo-hero-logo--center { margin-left: auto; margin-right: auto; }
@media (max-width: 900px) {
  .pos-demo-content { grid-template-columns: 1fr; gap: 2rem; max-width: 480px; }
  .pos-demo-hero { text-align: center; }
  .pos-demo-company-line { margin-left: auto; margin-right: auto; }
  .pos-demo-lead, .pos-demo-features, .pos-demo-trust { margin-left: auto; margin-right: auto; }
  .pos-demo-features { max-width: 280px; text-align: left; }
  .pos-demo-trust { justify-content: center; }
}

/* POS Screen */
.pos-screen { display: grid; grid-template-columns: 1fr 380px; gap: 1rem; height: calc(100vh - 80px); }
.pos-products-panel, .pos-cart-panel { display: flex; flex-direction: column; min-height: 0; }
.pos-search-bar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.pos-search-bar input { flex: 1; padding: .7rem 1rem; border: 1px solid var(--pos-border); border-radius: 10px; font-size: 1rem; }
.pos-categories { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pos-cat-btn { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--pos-border); background: #fff; cursor: pointer; font-weight: 600; font-size: .8rem; }
.pos-cat-btn.active { background: var(--pos-navy); color: #fff; border-color: var(--pos-navy); }
.pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; overflow-y: auto; flex: 1; padding-right: .25rem; }
.pos-product-card {
  background: #fff;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  padding: .85rem;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.pos-product-card:hover { border-color: var(--pos-accent); box-shadow: 0 4px 12px rgba(8,145,178,.15); transform: translateY(-1px); }
.pos-product-card .name { font-weight: 600; font-size: .85rem; margin: .5rem 0 .25rem; line-height: 1.2; }
.pos-product-card .price { color: var(--pos-gold); font-weight: 800; font-size: 1rem; }
.pos-product-card .stock { font-size: .72rem; color: var(--pos-muted); }

.pos-cart-panel .pos-card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pos-cart-items { flex: 1; overflow-y: auto; margin: 0 -1.25rem; padding: 0 1.25rem; }
.pos-cart-item { display: flex; align-items: center; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--pos-border); }
.pos-cart-item-info { flex: 1; min-width: 0; }
.pos-cart-item-info .name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cart-item-info .sub { font-size: .75rem; color: var(--pos-muted); }
.pos-qty-control { display: flex; align-items: center; gap: .25rem; }
.pos-qty-control button { width: 28px; height: 28px; border: 1px solid var(--pos-border); background: #fff; border-radius: 6px; cursor: pointer; font-weight: 700; }
.pos-qty-control span { min-width: 24px; text-align: center; font-weight: 700; }

.pos-cart-totals { border-top: 2px solid var(--pos-border); padding-top: 1rem; margin-top: .5rem; }
.pos-total-row { display: flex; justify-content: space-between; margin-bottom: .35rem; }
.pos-total-row.grand { font-size: 1.25rem; font-weight: 800; color: var(--pos-navy); margin-top: .5rem; }

.pos-modal-overlay {
  position: fixed; inset: 0; background: rgba(12,31,61,.55);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 1rem;
}
.pos-modal-overlay.open { display: flex; }
.pos-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 440px; padding: 1.5rem; }
.pos-modal h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.pos-pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.pos-pay-btn { padding: .75rem; border: 2px solid var(--pos-border); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 700; }
.pos-pay-btn.active { border-color: var(--pos-accent); background: #ecfeff; color: var(--pos-accent); }

.pos-cambio-box {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
}
.pos-cambio-box.insufficient {
  background: #fef2f2;
  border-color: #fca5a5;
}
.pos-cambio-box.insufficient .pos-cambio-amount { color: var(--pos-danger); }
.pos-cambio-label { font-weight: 600; color: var(--pos-navy); font-size: .95rem; }
.pos-cambio-amount { font-size: 1.5rem; font-weight: 800; color: var(--pos-success); }

.pos-pay-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.pos-pay-toggles label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem .65rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  background: var(--pos-bg);
  cursor: pointer;
}
.pos-transfer-hint {
  display: none;
  margin-bottom: 1rem;
  padding: .75rem .85rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  font-size: .85rem;
}
.pos-transfer-hint pre {
  margin: .35rem 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: .85rem;
  color: var(--pos-navy);
}
.pos-terminal-box {
  margin-bottom: 1rem;
  padding: .75rem .85rem;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  font-size: .85rem;
}
.pos-terminal-modes {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: .5rem 0;
}
.pos-terminal-mode {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}
.pos-terminal-status {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  color: var(--pos-navy);
  font-weight: 600;
}
.pos-terminal-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #86efac;
  border-top-color: var(--pos-navy);
  border-radius: 50%;
  animation: pos-spin .8s linear infinite;
}
@keyframes pos-spin { to { transform: rotate(360deg); } }
.pos-terminal-list {
  font-size: .8rem;
  background: #f8fafc;
  padding: .5rem;
  border-radius: 8px;
  white-space: pre-wrap;
}
.pos-ticket-transfer {
  margin-top: .5rem;
  padding: .5rem 0;
  font-size: .78rem;
  line-height: 1.35;
  text-align: center;
  border-top: 1px dashed var(--pos-border);
}

.pos-caja-banner {
  background: linear-gradient(90deg, var(--pos-navy), #152a4a);
  color: #fff;
  padding: .65rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}
.pos-caja-banner.closed { background: linear-gradient(90deg, #991b1b, #dc2626); }

/* ── Responsive ── */

/* Tablet / ventana mediana: sidebar compacto solo iconos */
@media (max-width: 1200px) {
  :root { --pos-sidebar-w: 76px; }
  .pos-brand { padding: .85rem .5rem; text-align: center; }
  .pos-brand .pos-label,
  .pos-brand-has-logo .pos-brand-name { display: none; }
  .pos-brand .igr { font-size: 1.1rem; }
  .pos-brand-logo { max-height: 40px; padding: .25rem .35rem; margin-bottom: 0; }
  .pos-nav a {
    justify-content: center;
    padding: .75rem .5rem;
    gap: 0;
    border-left: none;
    border-radius: 8px;
    margin: 0 .35rem;
  }
  .pos-nav a.active { border-left: none; background: rgba(255,255,255,.12); }
  .pos-nav-label { display: none; }
  .pos-sidebar-footer { padding: .75rem .35rem; }
  .pos-pwa-install { font-size: .7rem; padding: .4rem; }
  .pos-sidebar-logout { font-size: .7rem; text-align: center; }
  .pos-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-screen { grid-template-columns: 1fr 340px; }
}

/* App escritorio (WebView2): logo visible aunque el sidebar esté compacto */
body.igr-desktop .pos-brand-logo {
  display: block !important;
  max-height: 44px;
  margin: 0 auto .35rem;
}
body.igr-desktop .pos-brand-has-logo .pos-brand-name {
  display: block !important;
  font-size: .78rem;
}
body.igr-desktop .pos-brand .pos-label {
  display: block !important;
  font-size: .6rem;
}

/* Móvil / ventana pequeña: menú hamburguesa */
@media (max-width: 900px) {
  :root { --pos-sidebar-w: 260px; }

  .pos-menu-btn { display: inline-flex; }

  .pos-sidebar {
    width: min(280px, 88vw);
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: none;
  }
  .pos-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 28px rgba(0,0,0,.28);
  }
  .pos-sidebar.open .pos-nav-label,
  .pos-sidebar.open .pos-brand .pos-label,
  .pos-sidebar.open .pos-brand-has-logo .pos-brand-name { display: block; }
  .pos-sidebar.open .pos-nav a {
    justify-content: flex-start;
    gap: .65rem;
    padding: .7rem 1.25rem;
    margin: 0;
    border-left: 3px solid transparent;
  }
  .pos-sidebar.open .pos-nav a.active { border-left-color: var(--pos-gold); }
  .pos-sidebar.open .pos-brand { text-align: left; padding: 1.25rem; }
  .pos-sidebar.open .pos-brand .igr { font-size: 1.5rem; }
  .pos-sidebar.open .pos-sidebar-footer { padding: 1rem 1.25rem; }
  .pos-sidebar.open .pos-sidebar-logout { text-align: left; font-size: .85rem; }

  .pos-main { margin-left: 0; }
  .pos-header {
    flex-wrap: wrap;
    padding: .65rem 1rem;
    gap: .5rem;
  }
  .pos-header-meta {
    width: 100%;
    justify-content: space-between;
    font-size: .78rem;
    text-align: left;
  }
  .pos-content { padding: 1rem; }
  .pos-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .pos-kpi { padding: .85rem; }
  .pos-kpi-value { font-size: 1.35rem; }
  .pos-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }
  .pos-quick-actions .pos-btn { width: 100%; justify-content: center; }
  .pos-screen {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100dvh - 140px);
  }
  .pos-screen-tabs { display: flex; }
  .pos-screen .pos-products-panel,
  .pos-screen .pos-cart-panel { display: none; min-height: 0; }
  .pos-screen.tab-products .pos-products-panel,
  .pos-screen.tab-cart .pos-cart-panel { display: flex; }
  .pos-screen.tab-cart .pos-cart-panel .pos-card { min-height: 50dvh; }
  .pos-product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .pos-search-bar { flex-wrap: wrap; }
  .pos-search-bar input { min-width: 0; flex: 1 1 100%; }
  .pos-caja-banner {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    text-align: center;
  }
  .pos-caja-banner .pos-btn { align-self: center; }
  .pos-page-head .pos-btn { width: 100%; }
  .pos-report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pos-kpi-grid { grid-template-columns: 1fr; }
  .pos-kpi-value { font-size: 1.5rem; }
  .pos-quick-actions { grid-template-columns: 1fr; }
  .pos-header-start h1 { font-size: .95rem; }
  .pos-header-meta { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .pos-pay-methods { grid-template-columns: 1fr; }
  .pos-modal { padding: 1.15rem; max-height: 90dvh; overflow-y: auto; }
  .pos-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
  .pos-content { padding: .75rem; }
  .pos-card { padding: 1rem; }
}

/* Ticket térmico */
.pos-ticket-print-area { display: none; }
.pos-ticket { font-family: 'Courier New', Courier, monospace; font-size: 12px; color: #000; line-height: 1.35; }
.pos-ticket-58 { max-width: 58mm; }
.pos-ticket-80 { max-width: 80mm; }
.pos-ticket-header { text-align: center; margin-bottom: 6px; }
.pos-ticket-header strong { font-size: 14px; display: block; }
.pos-ticket-logo img { max-width: 60px; max-height: 60px; margin: 0 auto 4px; display: block; }
.pos-ticket-sep { border-top: 1px dashed #000; margin: 6px 0; }
.pos-ticket-title { text-align: center; font-weight: 700; margin: 4px 0; }
.pos-ticket-meta { font-size: 11px; }
.pos-ticket-item { margin-bottom: 4px; }
.pos-ticket-item-name { font-weight: 600; }
.pos-ticket-item-row { display: flex; justify-content: space-between; font-size: 11px; }
.pos-ticket-line { display: flex; justify-content: space-between; margin: 2px 0; }
.pos-ticket-total { font-size: 14px; font-weight: 800; margin-top: 4px; }
.pos-ticket-footer { text-align: center; margin-top: 8px; font-size: 11px; }
.pos-ticket-footer-small { text-align: center; font-size: 9px; color: #555; margin-top: 4px; }

.pos-ticket-preview-wrap {
  background: #f8fafc; border: 1px solid var(--pos-border); border-radius: 8px;
  padding: 1rem; max-height: 320px; overflow-y: auto; margin: 1rem 0;
}
.pos-ticket-preview-wrap .pos-ticket { margin: 0 auto; background: #fff; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

@media print {
  .pos-print-overlay { display: none !important; }
  body * { visibility: hidden !important; }
  .pos-ticket-print-area, .pos-ticket-print-area * { visibility: visible !important; }
  .pos-ticket-print-area {
    display: block !important; position: fixed; left: 0; top: 0;
    margin: 0; padding: 0; background: #fff;
  }
  .ticket-width-58 .pos-ticket { width: 58mm; max-width: 58mm; }
  .ticket-width-80 .pos-ticket { width: 80mm; max-width: 80mm; }
  @page { margin: 2mm; size: auto; }
}

/* Animación imprimiendo ticket */
.pos-print-overlay {
  position: fixed; inset: 0; background: rgba(12, 31, 61, .82);
  display: none; align-items: center; justify-content: center; z-index: 2000;
  backdrop-filter: blur(4px);
}
.pos-print-overlay.active { display: flex; animation: printOverlayIn .25s ease; }
@keyframes printOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.pos-print-anim { text-align: center; color: #fff; }
.pos-printer-unit { position: relative; width: 140px; margin: 0 auto 1.25rem; }
.pos-printer-top {
  height: 28px; background: linear-gradient(180deg, #4a5568, #2d3748);
  border-radius: 10px 10px 4px 4px; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.pos-printer-slot {
  height: 6px; background: #1a202c; margin: 0 12px; border-radius: 0 0 3px 3px;
}
.pos-printer-paper-track {
  height: 90px; overflow: hidden; margin: 0 22px; position: relative;
}
.pos-printer-paper {
  width: 100%; background: #fff; border-radius: 0 0 4px 4px;
  padding: 8px 10px; box-shadow: 0 4px 8px rgba(0,0,0,.2);
  animation: paperEject 1.4s ease-in-out infinite;
}
@keyframes paperEject {
  0% { transform: translateY(-100%); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translateY(0); }
  100% { transform: translateY(18px); }
}
.pos-printer-paper-line {
  height: 4px; background: #e2e8f0; border-radius: 2px; margin-bottom: 5px;
}
.pos-printer-paper-line.short { width: 65%; }
.pos-printer-base {
  height: 14px; background: linear-gradient(180deg, #2d3748, #1a202c);
  border-radius: 0 0 8px 8px; margin: 0 8px;
}
.pos-printer-light {
  position: absolute; top: 10px; right: 14px; width: 8px; height: 8px;
  background: #22c55e; border-radius: 50%;
  animation: printerBlink 1s ease-in-out infinite;
  box-shadow: 0 0 8px #22c55e;
}
@keyframes printerBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}
.pos-print-label {
  font-size: 1.15rem; font-weight: 700; margin: 0 0 .35rem;
  letter-spacing: .02em;
}
.pos-print-folio { font-size: .9rem; color: rgba(255,255,255,.75); margin: 0; }
.pos-print-cancel {
  margin-top: 1.25rem;
  padding: .75rem 1.5rem;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.pos-print-cancel:hover { background: rgba(255,255,255,.22); }
.pos-print-dots i {
  display: inline-block; width: 4px; height: 4px; background: var(--pos-gold);
  border-radius: 50%; margin-left: 3px; vertical-align: middle;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.pos-print-dots i:nth-child(2) { animation-delay: .2s; }
.pos-print-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: .2; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Banner online/offline */
.pos-offline-banner {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem 1rem; font-size: .85rem; font-weight: 600;
}
.pos-offline-banner.offline { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d; }
.pos-offline-banner.syncing { background: #dbeafe; color: #1e40af; border-bottom: 1px solid #93c5fd; }
.pos-offline-banner.warning { background: #fee2e2; color: #991b1b; border-bottom: 1px solid #fca5a5; }
.pos-offline-btn {
  margin-left: .5rem; padding: .2rem .55rem; font-size: .75rem; font-weight: 600;
  border: 1px solid currentColor; border-radius: 6px; background: rgba(255,255,255,.25); color: inherit;
}
.pos-offline-btn:hover { background: rgba(255,255,255,.45); }

.pos-conn-status {
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.pos-conn-status.online {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.pos-conn-status.offline {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  animation: pos-conn-pulse 2s ease-in-out infinite;
}
.pos-conn-status.local {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
@keyframes pos-conn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}

.pos-pwa-install {
  width: 100%; padding: .5rem .75rem; font-size: .8rem; font-weight: 700;
  background: rgba(212,160,23,.2); color: #f5d77a; border: 1px solid rgba(212,160,23,.5);
  border-radius: 8px; cursor: pointer; margin-bottom: .25rem;
}
.pos-pwa-install:hover { background: rgba(212,160,23,.35); }

/* Configuración */
.pos-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pos-config-preview { grid-column: 1 / -1; }
.pos-section-title { margin: 0 0 1rem; font-size: 1rem; }
.pos-hint { color: var(--pos-muted); font-size: .8rem; display: block; margin-top: .35rem; line-height: 1.4; }

.pos-branding-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.pos-branding-colors label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
}
.pos-branding-colors input[type="color"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  padding: .15rem;
  cursor: pointer;
  background: #fff;
}
.pos-branding-logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.pos-branding-logo-preview {
  width: 120px;
  height: 72px;
  border: 1px dashed var(--pos-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pos-bg);
  overflow: hidden;
}
.pos-branding-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pos-branding-logo-preview.empty {
  color: var(--pos-muted);
  font-size: .75rem;
  text-align: center;
  padding: .5rem;
}
.pos-config-branding { grid-column: 1 / -1; }

.pos-ui-mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.pos-ui-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  padding: 1rem;
  border: 2px solid var(--pos-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.pos-ui-mode-btn:hover { border-color: var(--pos-accent); }
.pos-ui-mode-btn.active {
  border-color: var(--pos-gold);
  background: #fffbeb;
  box-shadow: 0 0 0 1px var(--pos-gold);
}
.pos-ui-mode-icon { font-size: 1.5rem; }
.pos-ui-mode-name { font-weight: 700; font-size: .95rem; color: var(--pos-navy); }
.pos-ui-mode-desc { font-size: .75rem; color: var(--pos-muted); line-height: 1.3; }

.pos-ui-toggle {
  padding: .35rem .65rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  background: var(--pos-bg);
  font-size: .78rem;
  font-weight: 600;
  color: var(--pos-navy);
  cursor: pointer;
  white-space: nowrap;
}
.pos-ui-toggle:hover { background: #e2e8f0; }
body.pos-touch .pos-ui-toggle {
  background: #fffbeb;
  border-color: var(--pos-gold);
  color: #92400e;
}

.pos-home-btn {
  padding: .35rem .65rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  background: var(--pos-bg);
  font-size: .78rem;
  font-weight: 600;
  color: var(--pos-navy);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
}
.pos-home-btn:hover { background: #e2e8f0; }

@media (max-width: 900px) {
  .pos-config-grid, .pos-ui-mode-picker { grid-template-columns: 1fr; }
}

.pos-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}
.pos-btn-cobrar {
  width: 100%;
  margin-top: 1rem;
  padding: .85rem;
  font-size: 1rem;
}

/* Dock y hoja táctil (eliminados) */

.pos-touch-hero-card,
.pos-touch-hero-btn { display: none; }

/* ── Modo táctil kiosco (simplificado) ── */
body.pos-touch {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

/* Botón regresar al menú (modo normal y táctil) */
.pos-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: .35rem;
  min-width: 44px;
  height: 44px;
  padding: 0 .75rem;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: var(--pos-bg);
  color: var(--pos-navy);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.pos-back-btn:hover { background: #e2e8f0; }
.pos-back-wide {
  width: auto;
  min-height: 48px;
  padding: 0 1.15rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.pos-page-back {
  display: block;
  margin-bottom: .5rem;
}

/* Sin menú lateral: barra inferior fija */
body.pos-touch .pos-sidebar,
body.pos-touch .pos-sidebar-backdrop { display: none !important; }
body.pos-touch .pos-main {
  margin-left: 0 !important;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.pos-touch .pos-main:has(.pos-touch-pos-wrap) {
  max-height: 100dvh;
  overflow: hidden;
}
body.pos-touch .pos-menu-btn { display: none !important; }

body.pos-touch .pos-ui-toggle {
  min-height: 40px;
  min-width: 90px;
  padding: .35rem .7rem;
  font-size: .85rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 2px solid var(--pos-gold);
  color: #92400e;
}

body.pos-touch .pos-home-btn {
  min-height: 40px;
  padding: .35rem .7rem;
  font-size: .85rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 2px solid var(--pos-navy);
  color: var(--pos-navy);
}
body.pos-touch .pos-home-btn:active { transform: scale(.97); }

/* Barra inferior */
body.pos-touch .pos-content {
  padding: .4rem .75rem .75rem;
  max-width: none !important;
  width: 100%;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.pos-touch .pos-header {
  flex-shrink: 0;
}

/* Encabezado táctil */
body.pos-touch .pos-header {
  padding: .4rem .75rem;
  min-height: 48px;
  flex-shrink: 0;
}
body.pos-touch .pos-header h1 {
  font-size: 1.05rem;
}
body.pos-touch .pos-touch-hide-meta { display: none !important; }

body.pos-touch .pos-back-btn {
  min-width: 52px;
  height: 52px;
  border: 2px solid var(--pos-navy);
  background: var(--pos-navy);
  color: #fff;
  border-radius: 14px;
  font-size: 1.35rem;
}
body.pos-touch .pos-back-btn:hover { background: #152a4a; }
body.pos-touch .pos-back-btn:active { transform: scale(.97); }

/* Ocultar extras */
body.pos-touch .pos-touch-secondary,
body.pos-touch .pos-touch-hide { display: none !important; }
body.pos-touch .pos-touch-hide-detail { display: none !important; }

/* Botones grandes */
body.pos-touch .pos-btn {
  min-height: 48px;
  padding: .65rem 1.15rem;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: 700;
}
body.pos-touch .pos-btn-sm { min-height: 40px; font-size: .9rem; }

/* Panel inicio simplificado */
body.pos-touch .pos-touch-hero-card {
  display: block;
  margin-bottom: .5rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
body.pos-touch .pos-touch-hero-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: .65rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pos-gold), #e8b82a);
  color: var(--pos-navy);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(212,160,23,.35);
}
body.pos-touch .pos-kpi-grid {
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin-bottom: .5rem;
}
body.pos-touch .pos-kpi {
  padding: .55rem .45rem;
  border-radius: 10px;
  text-align: center;
}
body.pos-touch .pos-kpi-label { font-size: .7rem; }
body.pos-touch .pos-kpi-value { font-size: 1.35rem; }
body.pos-touch .pos-quick-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
body.pos-touch .pos-quick-actions .pos-btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: 1rem;
}
body.pos-touch .pos-touch-quick-card {
  margin-top: 0;
  padding: .55rem !important;
}

.pos-touch-home-grid { display: none; }
body.pos-touch .pos-touch-home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .35rem;
}
body.pos-touch .pos-touch-home-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-height: 50px;
  padding: .4rem .35rem;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: var(--pos-bg);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pos-navy);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
body.pos-touch .pos-touch-home-tile span {
  font-size: .72rem;
  font-weight: 700;
}
body.pos-touch .pos-touch-home-tile:active {
  transform: scale(.98);
  background: #e2e8f0;
}
body.pos-touch .pos-touch-home-tile-muted {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Punto de venta táctil: productos izquierda | carrito derecha */
body.pos-touch .pos-caja-banner {
  flex-shrink: 0;
  margin-bottom: .5rem;
  padding: .5rem .75rem;
  font-size: .8rem;
}

body.pos-touch .pos-touch-pos-wrap {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

body.pos-touch .pos-screen-tabs {
  display: none !important;
  flex-shrink: 0;
}

body.pos-touch .pos-screen {
  display: grid !important;
  grid-template-columns: 1fr minmax(300px, 34%);
  gap: .65rem;
  flex: 1;
  min-height: 0;
  height: auto !important;
  max-height: 100%;
  align-items: stretch;
  overflow: hidden;
}

body.pos-touch .pos-screen .pos-products-panel,
body.pos-touch .pos-screen .pos-cart-panel {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  gap: .5rem;
}

body.pos-touch .pos-products-panel {
  background: var(--pos-white);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  padding: .65rem;
}

.pos-cart-line-total { font-weight: 700; min-width: 72px; text-align: right; }
.pos-cart-empty { color: var(--pos-muted); text-align: center; padding: 2rem 0; margin: 0; }
.pos-cart-remove-sm {
  border: none; background: none; cursor: pointer; color: var(--pos-danger);
  font-size: 1.1rem; padding: .25rem;
}
.pos-cart-cliente label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .85rem; }
.pos-btn-vaciar { flex-shrink: 0; }

/* Carrito táctil */
body.pos-touch .pos-screen {
  grid-template-columns: 1fr minmax(320px, 36%) !important;
}
body.pos-touch .pos-cart-panel {
  min-height: 0;
}
body.pos-touch .pos-cart-panel .pos-cart-card {
  flex: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem;
  border-radius: 12px;
  border-width: 1px;
  box-shadow: 0 2px 12px rgba(12,31,61,.06);
  overflow: hidden;
}
body.pos-touch .pos-cart-head {
  padding-bottom: 0;
  margin-bottom: 0;
  flex-shrink: 0;
}
body.pos-touch .pos-cart-head strong { font-size: 1.1rem; }
body.pos-touch .pos-btn-vaciar {
  min-height: 40px;
  padding: .4rem .75rem;
  font-size: .85rem;
}
body.pos-touch .pos-cart-cliente {
  margin-bottom: 0;
  flex-shrink: 0;
}
body.pos-touch .pos-cart-cliente label {
  font-size: .85rem;
  margin-bottom: .3rem;
}
body.pos-touch .pos-cart-cliente select {
  min-height: 42px;
  font-size: .9rem;
  padding: .5rem .75rem;
  border-radius: 10px;
  border-width: 1px;
  width: 100%;
}
body.pos-touch .pos-cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  margin: 0;
  padding: .15rem .1rem .15rem 0;
  -webkit-overflow-scrolling: touch;
}
body.pos-touch .pos-cart-item-touch {
  display: block;
  padding: .65rem .75rem;
  margin-bottom: .5rem;
  background: var(--pos-bg);
  border: 1px solid var(--pos-border);
  border-radius: 10px;
}
body.pos-touch .pos-cart-item-row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}
body.pos-touch .pos-cart-item-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
body.pos-touch .pos-cart-item-touch .name {
  font-size: .95rem;
  line-height: 1.25;
  white-space: normal;
}
body.pos-touch .pos-cart-item-touch .sub {
  font-size: .8rem;
  margin-top: .15rem;
}
body.pos-touch .pos-cart-remove {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fee2e2;
  color: var(--pos-danger);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
body.pos-touch .pos-qty-control button {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  border-radius: 10px;
  border-width: 1px;
}
body.pos-touch .pos-qty-control span {
  min-width: 32px;
  font-size: 1.05rem;
}
body.pos-touch .pos-cart-line-total {
  font-size: 1.05rem;
  min-width: 72px;
}
body.pos-touch .pos-cart-empty {
  font-size: .95rem;
  padding: 1.5rem .5rem;
}

body.pos-touch .pos-search-bar {
  flex-shrink: 0;
  margin-bottom: 0;
}
body.pos-touch .pos-search-bar input {
  min-height: 44px;
  font-size: .95rem;
  padding: .55rem .85rem;
  border-radius: 10px;
  border-width: 1px;
  width: 100%;
}

body.pos-touch .pos-categories {
  flex-shrink: 0;
  gap: .4rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}
body.pos-touch .pos-cat-btn {
  min-height: 36px;
  padding: .4rem .85rem;
  font-size: .82rem;
}

body.pos-touch .pos-product-grid {
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .5rem;
  overflow-y: auto;
  min-height: 0;
  padding-right: .15rem;
  align-content: start;
}
body.pos-touch .pos-product-card {
  min-height: 100px;
  padding: .55rem .5rem;
  border-radius: 10px;
  border-width: 1px;
}
body.pos-touch .pos-product-card .name { font-size: .82rem; }
body.pos-touch .pos-product-card .price { font-size: 1.05rem; }

body.pos-touch .pos-cart-totals {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: .65rem;
  border-top: 2px solid var(--pos-border);
  background: var(--pos-white);
}
body.pos-touch .pos-cart-totals .pos-total-row.grand {
  font-size: 1.35rem;
  margin-bottom: .35rem;
}
body.pos-touch .pos-btn-cobrar {
  min-height: 50px !important;
  font-size: 1.05rem !important;
  margin-top: .5rem;
  padding: .65rem !important;
}

body.pos-touch .pos-content:has(.pos-touch-pos-wrap) {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* POS táctil en pantalla estrecha: pestañas */
@media (max-width: 860px) {
  body.pos-touch .pos-screen-tabs {
    display: flex !important;
    gap: .5rem;
    flex-shrink: 0;
  }
  body.pos-touch .pos-screen-tabs button {
    min-height: 44px;
    flex: 1;
    font-size: .9rem;
  }
  body.pos-touch .pos-screen {
    grid-template-columns: 1fr !important;
    flex: 1;
    min-height: 0;
    height: auto !important;
    max-height: 100%;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }
  body.pos-touch .pos-screen .pos-products-panel,
  body.pos-touch .pos-screen .pos-cart-panel {
    display: none !important;
    flex: 1;
    min-height: 0;
    max-height: 100%;
  }
  body.pos-touch .pos-screen.tab-products .pos-products-panel,
  body.pos-touch .pos-screen.tab-cart .pos-cart-panel {
    display: flex !important;
  }
  body.pos-touch .pos-products-panel {
    background: transparent;
    border: none;
    padding: 0;
  }
}

/* Modal cobro */
body.pos-touch .pos-pay-methods {
  grid-template-columns: 1fr !important;
  gap: .65rem;
}
body.pos-touch .pos-pay-btn {
  min-height: 68px;
  font-size: 1.15rem;
  border-radius: 14px;
  border-width: 2px;
}
body.pos-touch .pos-modal {
  max-width: 96vw;
  padding: 1.5rem;
  border-radius: 18px;
}
body.pos-touch .pos-form-group input,
body.pos-touch .pos-form-group select {
  min-height: 56px;
  font-size: 1.1rem;
  padding: .85rem 1rem;
}
body.pos-touch .pos-cambio-box {
  padding: 1rem 1.15rem;
  border-radius: 14px;
  margin-bottom: 1.15rem;
}
body.pos-touch .pos-cambio-label { font-size: 1.05rem; }
body.pos-touch .pos-cambio-amount { font-size: 1.85rem; }

/* Tablas → tarjetas más legibles */
body.pos-touch .pos-table th { font-size: .85rem; padding: 1rem; }
body.pos-touch .pos-table td { font-size: 1rem; padding: 1rem; }

body.pos-touch .pos-caja-banner {
  font-size: 1rem;
  padding: 1rem;
  border-radius: 14px;
  flex-direction: column;
  gap: .75rem;
  text-align: center;
}
body.pos-touch .pos-caja-banner .pos-btn { min-height: 52px; width: 100%; max-width: 280px; }

body.pos-touch .pos-card {
  border-radius: 12px;
  padding: .75rem;
}
body.pos-touch .pos-caja-status-card {
  margin-top: .5rem !important;
  padding: .55rem .65rem !important;
}
body.pos-touch .pos-tab-badge {
  font-size: .85rem;
  min-width: 1.5rem;
  padding: .15rem .45rem;
}
body.pos-touch .pos-screen-tabs button.has-items,
body.pos-touch .pos-screen-tabs button.active {
  border-color: var(--pos-gold);
  background: #fffbeb;
}
body.pos-touch #cajaStatus {
  font-size: .85rem;
  padding: .55rem .65rem !important;
  text-align: center;
  margin-top: .5rem !important;
}
