:root {
  --bg: #f4efe8;
  --bg-soft: #fbf8f4;
  --panel: #ffffff;
  --panel-2: #fffaf3;
  --text: #162033;
  --muted: #6f7a90;
  --line: #e7ddd1;
  --line-soft: #efe7dc;
  --primary: #ff7a00;
  --primary-dark: #dd6900;
  --success-bg: #edf9f0;
  --success-text: #176c37;
  --error-bg: #fff0f0;
  --error-text: #a32727;
  --warning-bg: #fff8ea;
  --warning-text: #9a5b00;
  --shadow: 0 20px 40px rgba(22, 32, 51, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f9f5ef 0%, #f2eee8 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { display: block; max-width: 100%; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.auth-shell { width: 100%; max-width: 450px; }
.auth-card, .card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(231, 221, 209, .9);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}
.auth-card { padding: 22px; }
.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.brand-icon, .brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(135deg, #ffe6c2, #ffbf69);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 900;
}
.muted { color: var(--muted); }
.auth-copy h1, .auth-copy h2, .page-head h1, .section-title, .card-head h2 { margin: 0; }
.auth-copy p { margin: 8px 0 0; }
.auth-form { display: grid; gap: 14px; margin-top: 20px; }
.auth-form label, .form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.auth-form input, .form-grid input, .form-grid select {
  width: 100%;
  border: 1px solid #d8dee9;
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
}
.auth-form input:focus, .form-grid input:focus, .form-grid select:focus {
  outline: 3px solid rgba(255, 122, 0, .18);
  border-color: var(--primary);
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border: 1px solid var(--line); }
.btn-danger { background: #fff1f1; color: #ab2a2a; border: 1px solid #f3c5c5; }
.btn-secondary { background: #f5f7fb; border: 1px solid #dde3ed; color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 12px; border-radius: 14px; font-size: .94rem; }

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: #bce5c6; }
.alert-error { background: var(--error-bg); color: var(--error-text); border-color: #f3c5c5; }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border-color: #f5dfab; }

.auth-demo {
  margin-top: 20px;
  padding: 14px;
  border-radius: 18px;
  background: #f7f8fb;
}
.auth-demo p { margin: 0; line-height: 1.55; }
.auth-demo p + p { margin-top: 6px; }

.app-shell {
  min-height: 100vh;
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(231, 221, 209, .9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 14px;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-user-card {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #111b33;
  color: #fff;
  border-radius: 16px;
}
.mini-user-name { font-weight: 800; }
.mini-user-role { color: rgba(255,255,255,.7); font-size: .88rem; }

.main-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 2px 4px;
  margin-top: 8px;
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-pill {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  color: #667085;
  font-weight: 800;
}
.nav-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.nav-pill.disabled {
  opacity: .55;
  pointer-events: none;
}

.app-main {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}
.page-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-head p { margin: 6px 0 0; }
.role-badge {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .92rem;
}
.role-admin { background: #ede9fe; color: #5b21b6; }
.role-empleado { background: #dcfce7; color: #166534; }

.dashboard-grid, .content-grid, .split-grid, .catalog-grid {
  display: grid;
  gap: 16px;
}
.dashboard-grid { grid-template-columns: 1fr; }
.content-grid, .split-grid { grid-template-columns: 1fr; }
.catalog-grid { grid-template-columns: 1fr; }

.card {
  padding: 18px;
}
.stat-card {
  display: grid;
  gap: 10px;
}
.stat-label { color: var(--muted); font-weight: 800; }
.stat-value { font-size: 1.4rem; }
.card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head p { margin: 6px 0 0; }

.info-list {
  display: grid;
  gap: 12px;
}
.info-list div, .phase-step, .table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #f7f8fb;
}
.info-list span, .phase-step span { color: var(--muted); }
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 16px;
  background: #f0fdf4;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .82rem;
}
.phase-steps { display: grid; gap: 12px; }
.phase-step { flex-direction: column; align-items: flex-start; background: #f8fafc; }
.phase-step.active {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fdba74;
}

.section-title { font-size: 1.25rem; }
.section-subtitle { color: var(--muted); margin: 6px 0 0; }
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.helper-text { color: var(--muted); font-size: .92rem; }

.table-stack {
  display: grid;
  gap: 12px;
}
.table-row {
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line-soft);
}
.table-row-top, .table-row-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.table-row-bottom { flex-wrap: wrap; }
.table-row-thumb { padding: 12px; }
.table-row-thumb-wrap { display: flex; gap: 12px; align-items: center; min-width: 0; }
.table-thumb { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 16px; overflow: hidden; background: #f3f4f6; border: 1px solid var(--line-soft); display: grid; place-items: center; }
.table-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.table-thumb span { color: var(--muted); font-size: 1.4rem; }
.table-row-thumb-content { min-width: 0; flex: 1; display: grid; gap: 10px; }
.table-row-thumb-content .table-row-top,
.table-row-thumb-content .table-row-bottom { min-width: 0; }
.table-row-thumb-content .table-row-top strong:first-child { min-width: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.table-row-thumb-content .table-row-bottom .helper-text:first-child { min-width: 0; flex: 1; }
.table-meta {
  display: grid;
  gap: 4px;
}
.table-meta small { color: var(--muted); }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
}
.status-active { background: #eaf8ee; color: #166534; }
.status-inactive { background: #fff1f1; color: #a32727; }

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: #f7f8fb;
  color: var(--muted);
  text-align: center;
}

.catalog-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.catalog-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f6efe4, #efe5d6);
  display: grid;
  place-items: center;
}
.catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-thumb span {
  font-size: 2rem;
  opacity: .55;
}
.catalog-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.catalog-price {
  font-size: 1.2rem;
  font-weight: 900;
}
.catalog-code {
  color: var(--muted);
  font-size: .92rem;
}
.catalog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.preview-box {
  border: 1px dashed #cfd7e4;
  border-radius: 18px;
  min-height: 160px;
  background: #fafbfd;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  text-align: center;
}
.preview-box img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
}

@media (min-width: 700px) {
  .mini-user-card { display: inline-flex; }
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 420px minmax(0, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dashboard-grid-4 {
  grid-template-columns: 1fr;
}

.page-head-pos {
  margin-bottom: 2px;
}

.empty-state-block {
  text-align: center;
}

.center-actions {
  justify-content: center;
}

.pos-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.pos-catalog-panel,
.cart-panel {
  padding: 18px;
}

.pos-head-row {
  align-items: flex-start;
}

.pos-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.pos-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.pos-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.pos-panel { display: none; }
.pos-panel.active { display: block; }

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

.product-tile {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.product-tile:hover,
.product-tile:focus {
  transform: translateY(-2px);
  border-color: #f6b167;
}

.tile-added {
  transform: scale(.985);
}

.product-tile-thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #fff4e4, #f4e5d1);
  display: grid;
  place-items: center;
}

.product-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tile-thumb span {
  font-size: 2rem;
  opacity: .7;
}

.product-tile-body {
  padding: 12px;
  display: grid;
  gap: 5px;
}

.product-tile-body strong {
  font-size: .98rem;
  line-height: 1.2;
}

.product-tile-body small {
  color: var(--muted);
}

.product-tile-price {
  font-size: 1rem;
  font-weight: 900;
}


.cart-mobile-bar {
  display: none;
}
.cart-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cart-collapse-btn {
  display: none;
}
.cart-panel {
  position: sticky;
  top: 110px;
}

.cart-list {
  display: grid;
  gap: 12px;
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.cart-item {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.cart-item-head,
.cart-item-foot,
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.cart-item-head small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.cart-remove {
  border: 0;
  background: #fff1f1;
  color: #a32727;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f7f8fb;
  border-radius: 999px;
  padding: 6px;
}

.cart-qty button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
}

.cart-summary-row span { color: var(--muted); }
.cart-summary-row.total strong { font-size: 1.45rem; }

.checkout-form {
  margin-top: 14px;
}

.payment-grid {
  display: grid;
  gap: 10px;
}

.payment-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.payment-btn span {
  font-weight: 900;
  font-size: 1rem;
}

.payment-btn small {
  color: var(--muted);
}

.payment-btn:hover,
.payment-btn:focus {
  border-color: var(--primary);
  outline: none;
}

@media (min-width: 700px) {
  .dashboard-grid-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pos-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1.3fr) 360px;
  }
  .pos-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.compact-stat {
  min-height: 100%;
}

.report-filter-form {
  align-items: end;
}

.reports-grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .reports-grid-2 {
    grid-template-columns: 1.05fr .95fr;
  }
}


/* ===== FASE 5 POS REDISEÑO ===== */
body {
  background:
    radial-gradient(circle at top left, rgba(255,122,0,.08), transparent 28%),
    linear-gradient(180deg, #f6f1ea 0%, #eef2f7 100%);
}
.topbar {
  border-radius: 22px;
  padding: 14px 16px;
}
.main-nav {
  gap: 8px;
}
.nav-pill {
  background: rgba(255,255,255,.92);
  color: #344054;
}
.compact-pos-head {
  margin-top: 6px;
}
.compact-pos-head h1 {
  font-size: 1.8rem;
}
.pos-toolbar {
  display: grid;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,250,243,.95));
}
.toolbar-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.toolbar-title h2 {
  margin: 0;
  font-size: 1.3rem;
}
.toolbar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.toolbar-stat {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ece3d8;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.toolbar-stat span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 4px;
}
.toolbar-stat strong {
  font-size: 1.22rem;
}
.modern-tools-grid {
  gap: 10px;
}
.quick-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.quick-search-box {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.quick-search-box input {
  width: 100%;
  border: 1px solid #d8dee9;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}
.quick-tools-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.search-results {
  display: grid;
  gap: 8px;
}
.search-result-item {
  border: 1px solid #eadfce;
  background: #fff;
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.search-result-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.search-empty {
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
  color: #9a5b00;
  border: 1px solid #fed7aa;
}
.hidden { display: none !important; }
.pos-layout-priority {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.pos-first-panel {
  order: 1;
}
.cart-panel {
  order: 2;
  padding-bottom: 16px;
}
.pos-catalog-panel {
  overflow: hidden;
}
.pos-head-sticky {
  position: sticky;
  top: 92px;
  z-index: 4;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  padding-bottom: 12px;
  margin: -4px -4px 14px;
  padding-left: 4px;
  padding-right: 4px;
}
.pos-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.pos-tabs::-webkit-scrollbar { display: none; }
.pos-tab {
  border: 1px solid #e5ddd4;
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.pos-tab.active {
  background: linear-gradient(135deg, #ff7a00, #ff9a3d);
  color: #fff;
  border-color: transparent;
}
.pos-panel { display: none; }
.pos-panel.active { display: block; }
.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.product-tile {
  position: relative;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, #fff 0%, #fff9f3 100%);
  border-radius: 22px;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
}
.product-tile:hover,
.product-tile:active {
  transform: translateY(-1px) scale(1.01);
  border-color: #ffb36b;
  box-shadow: 0 16px 28px rgba(255,122,0,.14);
}
.product-tile.tile-added {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.12), 0 18px 32px rgba(22,163,74,.18);
}
.product-tile.is-dimmed {
  opacity: .3;
}
.product-tile-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.tile-badge,
.tile-mini-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}
.tile-badge {
  background: #fff3cd;
  color: #9a6700;
}
.tile-mini-category {
  background: #f2f4f7;
  color: #344054;
}
.product-tile-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #f5efe7;
  display: grid;
  place-items: center;
}
.product-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-tile-thumb span {
  font-size: 2rem;
}
.product-tile-body {
  display: grid;
  gap: 4px;
}
.product-tile-body strong {
  font-size: 1rem;
  line-height: 1.2;
}
.product-tile-body small {
  color: var(--muted);
  font-size: .82rem;
}
.product-tile-price {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary-dark);
}
.cart-panel {
  position: sticky;
  bottom: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,252,255,.95));
}
.cart-head {
  align-items: center;
}
.cart-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 360px;
  overflow: auto;
}
.cart-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e8e2d9;
  background: #fff;
}
.cart-item-head,
.cart-item-foot,
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.cart-item-head small,
.table-row-bottom,
.empty-state {
  color: var(--muted);
}
.cart-item-head {
  align-items: flex-start;
}
.cart-item-head strong {
  display: block;
  margin-bottom: 3px;
}
.cart-remove {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff1f1;
  color: #b42318;
  font-weight: 900;
  cursor: pointer;
}
.cart-item-foot {
  margin-top: 12px;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #f5f7fb;
}
.cart-qty button {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(15,23,42,.08);
}
.modern-cart-summary {
  padding: 14px 16px;
  border-radius: 18px;
  background: #101828;
  color: #fff;
  margin-bottom: 14px;
}
.modern-cart-summary .cart-summary-row + .cart-summary-row {
  margin-top: 10px;
}
.modern-cart-summary .total strong {
  font-size: 1.35rem;
}
.modern-payment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.payment-btn {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: left;
  background: #fff;
  border: 1px solid #e6ddd2;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(15,23,42,.05);
}
.payment-btn span {
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
}
.payment-btn small {
  color: var(--muted);
}
.payment-btn.active,
.payment-btn:hover {
  border-color: #ffb36b;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}
.table-row-top,
.table-row-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.scanner-panel {
  padding-top: 4px;
}
.scanner-video {
  width: 100%;
  border-radius: 20px;
  background: #111827;
  margin: 10px 0;
  min-height: 220px;
  object-fit: cover;
}
@media (min-width: 768px) {
  .app-shell {
    padding: 22px;
  }
  .toolbar-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .quick-tools-grid {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: end;
  }
  .quick-tools-actions {
    grid-template-columns: 1fr 1fr;
    min-width: 220px;
  }
  .pos-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .modern-payment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .content-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .pos-layout-priority {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, .78fr);
  }
  .cart-panel {
    top: 155px;
    bottom: auto;
  }
  .pos-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


.page-pos .app-main {
  padding-bottom: 24px;
}

.page-pos .content-grid.two-up.pos-bottom-grid {
  align-items: start;
}

@media (max-width: 767px) {
  .page-pos .app-main {
    padding-bottom: 210px;
  }

  .page-pos .topbar {
    top: 8px;
  }

  .page-pos .main-nav {
    padding-bottom: 0;
    margin-bottom: 2px;
  }

  .page-pos .page-head,
  .page-pos .compact-pos-head,
  .page-pos .pos-toolbar,
  .page-pos .pos-bottom-grid {
    display: none;
  }

  .page-pos .pos-layout-priority {
    display: block;
  }

  .page-pos .pos-catalog-panel {
    padding: 12px;
    border-radius: 24px;
  }

  .page-pos .pos-head-sticky {
    position: sticky;
    top: 78px;
    z-index: 8;
    margin: -2px -2px 12px;
    padding: 0 2px 10px;
  }

  .page-pos .pos-tabs {
    gap: 10px;
  }

  .page-pos .pos-tab {
    padding: 12px 18px;
    font-size: .96rem;
  }

  .page-pos .pos-products-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .page-pos .product-tile {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-radius: 24px;
  }

  .page-pos .product-tile-topline {
    grid-column: 1 / -1;
    margin-bottom: -4px;
  }

  .page-pos .product-tile-thumb {
    aspect-ratio: 1 / 1;
    min-height: 120px;
    border-radius: 20px;
  }

  .page-pos .product-tile-body {
    align-content: center;
    gap: 6px;
  }

  .page-pos .product-tile-body strong {
    font-size: 1.18rem;
  }

  .page-pos .product-tile-body small {
    font-size: .9rem;
  }

  .page-pos .product-tile-price {
    font-size: 1.34rem;
  }

  .page-pos .cart-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 18;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  }

  .page-pos .cart-head {
    margin-bottom: 10px;
  }

  .page-pos .cart-head .section-subtitle,
  .page-pos .cart-list {
    display: none;
  }

  .page-pos .cart-head .section-title {
    font-size: 1.08rem;
  }

  .page-pos .btn.btn-secondary.btn-sm[data-clear-cart] {
    padding: 9px 12px;
    border-radius: 14px;
  }

  .page-pos .modern-cart-summary {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .page-pos .modern-cart-summary .total strong {
    font-size: 1.2rem;
  }

  .page-pos .modern-payment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .page-pos .payment-btn {
    padding: 10px 8px;
    min-height: 72px;
    border-radius: 16px;
  }

  .page-pos .payment-btn span {
    font-size: .95rem;
    margin-bottom: 3px;
  }

  .page-pos .payment-btn small {
    font-size: .74rem;
    line-height: 1.2;
  }
}


.report-chart-card {
  overflow: hidden;
}
.report-chart-head {
  align-items: flex-start;
}
.report-chart-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.report-switch-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
.report-switch-btn.active {
  background: linear-gradient(135deg, #ff8a1c, #ff6f00);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(255, 122, 0, .18);
}
.report-chart-stack {
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  padding: 18px;
}
.report-bars {
  display: none;
  gap: 14px;
  align-items: end;
  min-height: 320px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.report-bars.active {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
}
.report-bar-col {
  display: grid;
  gap: 10px;
  min-width: 72px;
}
.report-bar-value,
.report-bar-label {
  text-align: center;
}
.report-bar-value {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 800;
  min-height: 34px;
}
.report-bar-track {
  min-height: 240px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 10px 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, rgba(255, 122, 0, .05) 100%);
}
.report-bar-fill {
  width: 100%;
  max-width: 54px;
  min-height: 16px;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(180deg, #ffb25a 0%, #ff7a00 100%);
  box-shadow: 0 14px 26px rgba(255, 122, 0, .18);
}
.report-bar-label {
  font-size: .84rem;
  font-weight: 800;
}


@media (min-width: 768px) {
  .page-pos .pos-head-sticky {
    display: block;
    top: 112px;
    margin: -4px -4px 18px;
    padding: 0 4px 14px;
  }

  .page-pos .pos-head-sticky > div:first-child {
    margin-bottom: 12px;
  }

  .page-pos .pos-tabs {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    padding-right: 2px;
  }

  .page-pos .pos-products-grid {
    align-items: stretch;
  }

  .page-pos .product-tile {
    min-width: 0;
    height: 100%;
  }

  .page-pos .product-tile-thumb {
    aspect-ratio: 1.15 / 1;
  }

  .page-pos .product-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.report-chart-card {
  overflow: hidden;
}

.report-chart-stack {
  position: relative;
}

.report-chart-stack::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background:
    linear-gradient(to top, rgba(17, 27, 51, 0.05) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0));
  pointer-events: none;
}

.report-bars {
  position: relative;
  z-index: 1;
  padding-top: 8px;
}

.report-bar-col {
  align-self: stretch;
}

.report-bar-value {
  line-height: 1.2;
}

.report-bar-track {
  position: relative;
  border: 1px solid rgba(255, 186, 120, .35);
}

.report-bar-track::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 1px;
  background: rgba(17, 27, 51, .08);
}

.report-bar-fill {
  position: relative;
}

.report-bar-fill::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 28%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0));
}

.report-bar-label {
  display: grid;
  gap: 2px;
}

.report-bar-label small {
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--muted);
}


.is-active-filter {
  background: linear-gradient(135deg, #ff8a1c, #ff6f00);
  color: #fff;
  border-color: transparent;
}

.cart-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-notice-badge {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff1f1;
  color: #c1121f;
  border: 1px solid #f7c9ce;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(193, 18, 31, 0.12);
}

@media (min-width: 1100px) {
  .page-pos .app-main {
    padding-right: 372px;
  }

  .page-pos .pos-layout-priority {
    display: block;
  }

  .page-pos .pos-catalog-panel {
    overflow: visible;
  }

  .page-pos .pos-head-sticky {
    position: static;
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .page-pos .pos-panel {
    overflow: visible;
    padding-top: 2px;
  }

  .page-pos .pos-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }

  .page-pos .product-tile {
    min-width: 0;
    overflow: hidden;
  }

  .page-pos .cart-panel {
    position: fixed;
    top: 150px;
    right: max(16px, calc((100vw - 1220px) / 2 + 16px));
    width: 344px;
    max-height: calc(100vh - 168px);
    overflow: auto;
    z-index: 18;
    border-radius: 24px;
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.16);
  }

  .page-pos .cart-mobile-bar,
  .page-pos .cart-collapse-btn {
    display: none !important;
  }
}


.table-row-wrap { display:block; }
.section-subtitle { color: var(--muted); }
.helper-text { color: var(--muted); font-size: .9rem; }
.inline-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.empty-state { padding: 18px; border-radius: 16px; background: var(--bg-soft); color: var(--muted); border:1px dashed var(--line); }
.table-stack { display:grid; gap:12px; }
.dashboard-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.reports-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.report-bars { display:none; gap:12px; align-items:flex-end; min-height:300px; overflow-x:auto; overflow-y:hidden; padding:8px 4px 10px; scroll-behavior:smooth; }
.report-bars.active { display:flex; }
.report-bar-col { min-width:58px; display:grid; gap:8px; align-items:end; text-align:center; flex:0 0 auto; }
.report-bars[data-chart-series="compare"] .report-bar-col,
.report-bars[data-chart-series="percentage"] .report-bar-col { min-width:80px; }
.report-bar-track { height:220px; display:flex; align-items:flex-end; justify-content:center; padding:10px 8px; background:#f8f5ef; border-radius:16px; border:1px solid var(--line-soft); overflow:hidden; }
.report-bar-fill { width:18px; border-radius:12px 12px 6px 6px; background: linear-gradient(180deg, #ffb15e 0%, #ff7a00 100%); }
.report-bar-value { font-size:.72rem; color:var(--muted); line-height:1.15; min-height:38px; word-break:break-word; }
.report-bar-label { display:grid; gap:2px; font-weight:800; font-size:.78rem; }
.report-bar-label small { color: var(--muted); font-size:.66rem; }
.report-switch-btn { border:1px solid var(--line); background:#fff; border-radius:999px; padding:10px 12px; font-weight:800; cursor:pointer; }
.report-switch-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.report-chart-switch { display:flex; flex-wrap:wrap; gap:8px; }
.report-chart-stack { display:grid; gap:12px; }
.collapsible-card .inline-actions { align-items: center; }
.collapsible-content[hidden] { display: none !important; }
.collapse-toggle-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 1.35rem; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.collapse-toggle-btn:hover { border-color: #ffb36b; background: #fff7ed; }
.status-pill { padding:10px 12px; border-radius:999px; background:#f3f6fb; border:1px solid var(--line); font-weight:800; }
.compact-stat p { margin:0; }
.full { grid-column: 1 / -1; }
.form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:14px; }

.report-positive {
  color: #15803d !important;
}

.report-negative {
  color: #dc2626 !important;
}

.report-share-major {
  color: #c2410c !important;
}

.report-share-minor {
  color: #2563eb !important;
}

.report-bar-value-compare {
  min-height: 52px;
  display: grid;
  gap: 3px;
  align-content: end;
}

.report-bar-value-compare small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

.report-bar-track-compare {
  padding-left: 8px;
  padding-right: 8px;
}

.report-bar-dual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.report-bar-fill-default {
  background: linear-gradient(180deg, #ffb25a 0%, #ff7a00 100%);
  box-shadow: 0 14px 26px rgba(255, 122, 0, .18);
}

.report-bar-fill-income {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  box-shadow: 0 14px 26px rgba(22, 163, 74, .18);
}

.report-bar-fill-expense {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
  box-shadow: 0 14px 26px rgba(220, 38, 38, .18);
}

.report-bar-fill-share-major {
  background: linear-gradient(180deg, #fdba74 0%, #c2410c 100%);
  box-shadow: 0 14px 26px rgba(194, 65, 12, .20);
}

.report-bar-fill-share-minor {
  background: linear-gradient(180deg, #93c5fd 0%, #2563eb 100%);
  box-shadow: 0 14px 26px rgba(37, 99, 235, .18);
}

.report-muted {
  color: #94a3b8 !important;
}

.report-bar-fill-empty {
  background: linear-gradient(180deg, #d5dbe5 0%, #94a3b8 100%);
  box-shadow: 0 10px 18px rgba(148, 163, 184, .16);
}


/* Report chart pro candle upgrade */
.report-chart-card {
  background: linear-gradient(180deg, #fdfaf6 0%, #fff 100%);
}
.report-chart-stack {
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #101a31 100%);
  border: 1px solid #1e335e;
  border-radius: 28px;
  padding: 18px 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 36px rgba(15, 23, 42, .08);
}
.report-chart-stack::before {
  inset: 16px;
  border-radius: 22px;
  background:
    linear-gradient(to right, rgba(148,163,184,.08) 1px, transparent 1px) 0 0 / 44px 100%,
    linear-gradient(to top, rgba(148,163,184,.12) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
}
.report-bars {
  min-height: 338px;
  padding: 14px 6px 10px;
  gap: 14px;
}
.report-bars.active {
  display: flex;
}
.report-bar-col {
  min-width: 64px;
  gap: 9px;
}
.report-bars[data-chart-series="compare"] .report-bar-col,
.report-bars[data-chart-series="percentage"] .report-bar-col {
  min-width: 88px;
}
.report-bar-value,
.report-bar-label {
  text-align: center;
}
.report-bar-value {
  color: #dbe7ff;
  min-height: 40px;
  font-size: .74rem;
}
.report-bar-value-compare {
  min-height: 58px;
}
.report-bar-value-compare small {
  font-size: .66rem;
  letter-spacing: .01em;
}
.report-bar-label {
  color: #f8fafc;
  font-size: .78rem;
}
.report-bar-label small {
  color: #94a3b8;
}
.report-bar-track {
  height: 236px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.report-bar-track::after {
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(226,232,240,.12);
}
.report-bar-track-compare {
  padding-left: 4px;
  padding-right: 4px;
}
.report-bar-dual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
}
.report-candle {
  position: relative;
  width: 22px;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
}
.report-bars[data-chart-series="compare"] .report-candle,
.report-bars[data-chart-series="percentage"] .report-candle {
  width: 24px;
}
.report-candle-wick {
  position: absolute;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  opacity: .95;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04);
}
.report-bar-fill {
  width: 16px;
  max-width: none;
  min-height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 24px rgba(2, 6, 23, .26);
}
.report-bars[data-chart-series="compare"] .report-bar-fill,
.report-bars[data-chart-series="percentage"] .report-bar-fill {
  width: 18px;
}
.report-bar-fill::after {
  left: 2px;
  right: 2px;
  top: 2px;
  height: 34%;
  border-radius: 3px;
}
.report-candle-empty .report-candle-wick,
.report-bar-fill-empty,
.report-candle-default .report-candle-wick {
  opacity: .9;
}
.report-candle-default .report-candle-wick,
.report-bar-fill-default {
  background: linear-gradient(180deg, #f6ad55 0%, #f97316 100%);
}
.report-candle-income .report-candle-wick,
.report-bar-fill-income {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
}
.report-candle-expense .report-candle-wick,
.report-bar-fill-expense {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
}
.report-candle-share-major .report-candle-wick,
.report-bar-fill-share-major {
  background: linear-gradient(180deg, #fdba74 0%, #c2410c 100%);
}
.report-candle-share-minor .report-candle-wick,
.report-bar-fill-share-minor {
  background: linear-gradient(180deg, #93c5fd 0%, #2563eb 100%);
}
.report-candle-empty .report-candle-wick,
.report-bar-fill-empty {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}
.report-switch-btn {
  padding: 10px 16px;
}
@media (max-width: 767px) {
  .report-chart-stack {
    padding: 14px 12px 12px;
  }
  .report-bars {
    min-height: 312px;
    gap: 10px;
  }
  .report-bars[data-chart-series="compare"] .report-bar-col,
  .report-bars[data-chart-series="percentage"] .report-bar-col {
    min-width: 80px;
  }
}

/* Report chart pro bars + floating tooltip */
.report-chart-stack {
  background: linear-gradient(180deg, #0f172a 0%, #101a31 100%);
}
.report-bars {
  min-height: 338px;
  padding: 14px 6px 10px;
  gap: 14px;
}
.report-bars.active {
  display: flex;
}
.report-bar-col {
  min-width: 64px;
  gap: 9px;
  align-self: stretch;
  outline: none;
}
.report-bar-clickable {
  cursor: pointer;
}
.report-bar-clickable:focus-visible .report-bar-track,
.report-bar-clickable.is-tooltip-active .report-bar-track {
  box-shadow: 0 0 0 2px rgba(251, 146, 60, .65);
  border-radius: 14px;
}
.report-bars[data-chart-series="compare"] .report-bar-col,
.report-bars[data-chart-series="percentage"] .report-bar-col {
  min-width: 88px;
}
.report-bar-value,
.report-bar-label {
  text-align: center;
}
.report-bar-value {
  color: #dbe7ff;
  min-height: 40px;
  font-size: .74rem;
}
.report-bar-value-compare {
  min-height: 58px;
}
.report-bar-value-compare small {
  font-size: .66rem;
  letter-spacing: .01em;
}
.report-bar-label {
  color: #f8fafc;
  font-size: .78rem;
}
.report-bar-label small {
  color: #94a3b8;
}
.report-bar-track {
  height: 236px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0 4px;
  background: transparent;
  border: 0;
  border-radius: 14px;
  overflow: visible;
  transition: box-shadow .18s ease, background .18s ease;
}
.report-bar-track:hover {
  background: rgba(255,255,255,.02);
}
.report-bar-track::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(226,232,240,.12);
}
.report-bar-track-compare {
  padding-left: 4px;
  padding-right: 4px;
}
.report-bar-dual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
}
.report-bar-mini {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
}
.report-bar-fill {
  position: relative;
  width: 18px;
  max-width: none;
  min-height: 12px;
  border-radius: 6px 6px 4px 4px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 24px rgba(2, 6, 23, .26);
}
.report-bars[data-chart-series="compare"] .report-bar-fill,
.report-bars[data-chart-series="percentage"] .report-bar-fill {
  width: 14px;
}
.report-bar-fill::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 26%;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
}
.report-bar-fill-default {
  background: linear-gradient(180deg, #f6ad55 0%, #f97316 100%);
}
.report-bar-fill-income {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
}
.report-bar-fill-expense {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
}
.report-bar-fill-share-major {
  background: linear-gradient(180deg, #fdba74 0%, #c2410c 100%);
}
.report-bar-fill-share-minor {
  background: linear-gradient(180deg, #93c5fd 0%, #2563eb 100%);
}
.report-bar-fill-empty {
  background: linear-gradient(180deg, #cbd5e1 0%, #64748b 100%);
  box-shadow: 0 10px 18px rgba(148, 163, 184, .16);
}
.report-candle,
.report-candle-wick {
  display: none !important;
}

.report-chart-tooltip {
  position: fixed;
  z-index: 1200;
  min-width: 220px;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 146, 60, .24);
  background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(20, 31, 59, .98));
  color: #e5eefc;
  box-shadow: 0 18px 42px rgba(2, 6, 23, .35);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
}
.report-chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.report-chart-tooltip-title {
  margin: 0 0 8px;
  font-size: .92rem;
  font-weight: 900;
  color: #fff;
}
.report-chart-tooltip-line {
  display: block;
  font-size: .82rem;
  line-height: 1.35;
  color: #dbe7ff;
}
.report-chart-tooltip-line + .report-chart-tooltip-line {
  margin-top: 4px;
}
.report-chart-tooltip-line.is-positive {
  color: #4ade80;
}
.report-chart-tooltip-line.is-negative {
  color: #fb7185;
}
.report-chart-tooltip-line.is-major {
  color: #fdba74;
}
.report-chart-tooltip-line.is-minor {
  color: #93c5fd;
}


.role-superadmin { background: #e0f2fe; color: #075985; }
.super-stats-grid { grid-template-columns: 1fr; }
.superadmin-layout { align-items: start; }
.business-grid {
  display: grid;
  gap: 14px;
}
.business-card {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 14px;
}
.business-card.is-active {
  box-shadow: 0 14px 32px rgba(22, 32, 51, 0.08);
}
.business-card.is-inactive {
  background: #fcfcfd;
  opacity: .86;
}
.business-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.business-card-top p {
  margin: 4px 0 0;
}
.business-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex: 0 0 52px;
}
.compact-info-list div {
  padding: 12px 14px;
}
.truncate-inline {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 700px) {
  .super-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .business-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ===== SUPER ADMIN LACTO GENERAL ===== */
.super-hero {
  display: grid;
  gap: 18px;
  align-items: stretch;
  background:
    radial-gradient(circle at top right, rgba(255,122,0,.12), transparent 26%),
    linear-gradient(135deg, #ffffff, #f8fbff 55%, #fff8ef 100%);
  border: 1px solid rgba(231, 221, 209, .95);
}
.super-hero-copy {
  display: grid;
  gap: 12px;
}
.super-hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}
.super-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.super-hero-side {
  display: flex;
  align-items: stretch;
}
.super-glow-card {
  width: 100%;
  min-height: 170px;
  border-radius: 24px;
  padding: 22px;
  display: grid;
  align-content: end;
  gap: 8px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(135deg, #111b33, #18284b 55%, #2b4575 100%);
  box-shadow: 0 26px 60px rgba(17, 27, 51, 0.22);
}
.super-glow-card span {
  color: rgba(255,255,255,.72);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
}
.super-glow-card strong {
  font-size: 1.5rem;
}
.super-glow-card small {
  color: rgba(255,255,255,.76);
  line-height: 1.5;
}
.super-overview-stats {
  grid-template-columns: 1fr;
}
.super-inline-note {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f6f9ff;
  border: 1px solid #dce7f8;
  color: #344054;
  display: grid;
  gap: 4px;
}
.super-chart-card {
  overflow: hidden;
}

.superadmin-layout-wide {
  grid-template-columns: minmax(0, 1fr);
}
.superadmin-editor-card {
  margin-bottom: 18px;
}
.superadmin-businesses-card {
  min-width: 0;
}
.superadmin-businesses-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
.superadmin-add-btn {
  white-space: nowrap;
}
.superadmin-business-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .superadmin-business-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .superadmin-business-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.super-chart-stack {
  margin-top: 6px;
}
.super-ranking-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.page-super_panel .brand-mark,
.page-super_estadisticas .brand-mark {
  background: linear-gradient(135deg, #fff4d0, #ffd56f);
}
.page-super_panel .main-nav .nav-pill.active,
.page-super_estadisticas .main-nav .nav-pill.active {
  box-shadow: 0 14px 28px rgba(255, 122, 0, 0.18);
}
.page-super_panel .topbar,
.page-super_estadisticas .topbar {
  background: rgba(255,255,255,.96);
}
@media (min-width: 860px) {
  .super-hero {
    grid-template-columns: minmax(0, 1.2fr) 320px;
    padding: 26px;
  }
  .super-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .super-ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
