:root {
  --bg-0: #040B1D;
  --bg-1: #091A36;
  --panel: rgba(8, 22, 49, 0.8);
  --panel-strong: rgba(7, 20, 44, 0.92);
  --border: rgba(105, 170, 255, 0.24);
  --primary: #00A8FF;
  --secondary: #F4B740;
  --tertiary: #071531;
  --accent: #00E6C3;
  --danger: #FF4A66;
  --success: #00D084;
  --warning: #F9B949;
  --text-hi: #F5FBFF;
  --text-mid: #BFD6F5;
  --text-low: #86A5CC;
  --surface: rgba(255, 255, 255, 0.05);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-soft: 0 22px 54px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 16px 36px rgba(3, 10, 24, 0.42);
  --glass-blur: blur(18px);
  --transition-fast: .18s ease;
  --transition-smooth: .25s cubic-bezier(.4, 0, .2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-mid);
  background:
    radial-gradient(circle at 8% 10%, rgba(0, 168, 255, 0.18), transparent 30%),
    radial-gradient(circle at 92% 20%, rgba(255, 74, 102, 0.12), transparent 28%),
    radial-gradient(circle at 60% 82%, rgba(0, 230, 195, 0.1), transparent 34%),
    linear-gradient(136deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(137, 187, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 187, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 92%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(8, 34, 74, 0.22), rgba(3, 8, 18, 0.6));
  z-index: -3;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  color: var(--text-hi);
  font-family: var(--font-display);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.glass {
  background: linear-gradient(156deg, rgba(12, 31, 67, 0.72), rgba(8, 20, 45, 0.78));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
}

.glass-strong {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 79, 232, .16);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-card p {
  color: var(--text-low);
  line-height: 1.6;
}

.field {
  margin-top: 14px;
}

.field label {
  display: block;
  font-size: .8rem;
  color: var(--text-low);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: var(--text-hi);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, .18);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-hi);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 79, 232, .28);
}

.btn:active {
  transform: translateY(0);
  opacity: .95;
}

.btn.secondary {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-weight: 500;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, .09);
}

.btn.small {
  padding: 6px 10px;
  font-size: .82rem;
  border-radius: 10px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 89, 44, .16);
  color: #ffb09d;
  border: 1px solid rgba(255, 89, 44, .2);
  display: none;
}

.error.show {
  display: block;
}

.app-shell {
  display: none;
  min-height: 100vh;
}

.app-shell.active {
  display: flex;
}

.sidebar {
  width: 260px;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(8, 21, 46, .95), rgba(7, 17, 36, .98));
  border-right: 1px solid rgba(117, 180, 255, .2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .02), 14px 0 30px rgba(2, 7, 18, .35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 800;
}

.brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand-copy strong {
  display: block;
  color: var(--text-hi);
  font-size: .95rem;
}

.brand-copy span {
  display: block;
  color: var(--text-low);
  font-size: .78rem;
}

.jai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(243, 177, 46, .24);
  background: rgba(243, 177, 46, .12);
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.jai-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 177, 46, .18);
  background: rgba(243, 177, 46, .1);
  color: #f8cf7a;
  font-size: .8rem;
  font-weight: 700;
  margin-top: 12px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.nav-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-mid);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(120deg, rgba(0, 168, 255, .2), rgba(0, 230, 195, .12));
  color: var(--text-hi);
  border-color: rgba(114, 205, 255, .42);
}

.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(113, 176, 255, .18);
  background: linear-gradient(145deg, rgba(6, 18, 39, .82), rgba(8, 23, 49, .76));
  backdrop-filter: blur(18px);
}

.search-wrap {
  flex: 1;
  max-width: 720px;
  position: relative;
}

.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(146, 209, 255, .2);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, .09);
}

.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-hi);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.search-wrap input {
  width: 100%;
  padding: 11px 44px;
  border-radius: 999px;
  border: 1px solid rgba(117, 190, 255, .22);
  background: rgba(8, 28, 60, .66);
  color: var(--text-hi);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, .18);
}

.search-wrap .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-low);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(11, 37, 75, .75), rgba(8, 28, 58, .62));
  border: 1px solid rgba(123, 194, 255, .26);
  color: var(--text-mid);
  font-size: .86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.content {
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.premium-command {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(128, 206, 255, .42);
  background: radial-gradient(circle at 0% 0%, rgba(244, 183, 64, .23), transparent 36%), linear-gradient(138deg, rgba(8, 27, 58, .97), rgba(8, 24, 49, .9));
  box-shadow: 0 18px 44px rgba(2, 8, 21, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.premium-command::before {
  content: '';
  position: absolute;
  inset: -35% auto auto -20%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(0, 114, 255, .22), transparent 65%);
  pointer-events: none;
}

.premium-command::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -60px;
  width: 320px;
  height: 200px;
  transform: rotate(-12deg);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  pointer-events: none;
}

.premium-headline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  margin-bottom: 12px;
}

.premium-headline h2 {
  margin-top: 8px;
  font-size: clamp(1.05rem, 2.1vw, 1.55rem);
  line-height: 1.25;
}

.premium-headline p {
  margin: 10px 0 0;
  color: var(--text-low);
  max-width: 62ch;
}

.premium-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.premium-kpi-card {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(146, 209, 255, .38);
  background: linear-gradient(145deg, rgba(16, 48, 96, .6), rgba(9, 28, 55, .4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.premium-kpi-card span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b9d8ff;
}

.premium-kpi-card strong {
  margin-top: 8px;
  display: block;
  font-size: 1.2rem;
  color: #fef8ea;
}

.premium-insights-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
}

.premium-pulse-card {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(128, 201, 255, .3);
  background: linear-gradient(150deg, rgba(7, 28, 56, .9), rgba(7, 18, 33, .8));
}

.pulse-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pulse-range-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(140, 206, 255, .28);
  background: rgba(255, 255, 255, .04);
}

.pulse-range-btn {
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text-mid);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.pulse-range-btn:hover {
  color: var(--text-hi);
}

.pulse-range-btn.active {
  color: #001329;
  background: linear-gradient(135deg, #7cc6ff, #00e6c3);
  box-shadow: 0 6px 16px rgba(0, 114, 255, .28);
}

.premium-pulse-bars {
  margin-top: 8px;
  min-height: 120px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.premium-pulse-bar {
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #f3b12e, #0072ff);
  min-height: 16px;
  border: 1px solid rgba(255, 255, 255, .18);
}

.premium-pulse-label {
  margin-top: 5px;
  text-align: center;
  color: var(--text-low);
  font-size: .68rem;
}

.global-filters-card {
  background: linear-gradient(130deg, rgba(9, 30, 58, .95), rgba(11, 33, 66, .88));
  border: 1px solid rgba(112, 183, 255, .32);
}

.global-filters-card input[type="text"],
.global-filters-card input[type="number"],
.global-filters-card input[type="date"],
.global-filters-card select {
  background: linear-gradient(145deg, rgba(10, 30, 58, .92), rgba(8, 24, 46, .92));
  color: var(--text-hi);
  border: 1px solid rgba(116, 183, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.global-filters-card input[type="text"]::placeholder,
.global-filters-card input[type="number"]::placeholder {
  color: rgba(191, 214, 245, .78);
}

.global-filters-card input[type="text"]:focus,
.global-filters-card input[type="number"]:focus,
.global-filters-card input[type="date"]:focus,
.global-filters-card select:focus {
  outline: none;
  border-color: #8ec2ff;
  box-shadow: 0 0 0 3px rgba(0, 114, 255, .22);
}

.global-filters-card select option {
  background: #0e223d;
  color: var(--text-hi);
}

.global-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.commerce-filter-shell {
  position: relative;
  min-width: 280px;
  max-width: 360px;
  flex: 1 1 320px;
}

.commerce-filter-toggle {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #4f79ab;
  background: linear-gradient(145deg, #0f2a4a, #0b2440);
  color: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.commerce-filter-toggle:hover {
  border-color: #78b9ff;
}

.commerce-filter-toggle:focus {
  outline: none;
  border-color: #8ec2ff;
  box-shadow: 0 0 0 3px rgba(74, 162, 255, .26);
}

.commerce-filter-caret {
  color: #9fd0ff;
  font-size: .8rem;
}

.commerce-filter-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: 100%;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(127, 194, 255, .28);
  background: linear-gradient(180deg, rgba(9, 24, 44, .98), rgba(6, 16, 31, .98));
  box-shadow: 0 22px 46px rgba(2, 8, 21, .38);
}

.commerce-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-hi);
  cursor: pointer;
}

.commerce-filter-option:hover {
  background: rgba(255, 255, 255, .04);
}

.commerce-filter-option input {
  accent-color: #00e6c3;
}

.commerce-filter-list {
  display: grid;
  gap: 4px;
}

.commerce-filter-all {
  border-bottom: 1px solid rgba(127, 194, 255, .14);
  margin-bottom: 8px;
  padding-bottom: 10px;
}

[id^="globalFilter"] {
  background: #0f2a4a !important;
  color: #f8fbff !important;
  border: 1px solid #4f79ab !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

[id^="globalFilter"]::placeholder {
  color: #cfe2ff !important;
  opacity: 1;
}

[id^="globalFilter"]:focus {
  outline: none;
  border-color: #8ec2ff !important;
  box-shadow: 0 0 0 3px rgba(74, 162, 255, .26) !important;
}

[id^="globalFilter"] option {
  background: #0d223d;
  color: #ffffff;
}

.overview-hero-hidden {
  display: none !important;
}

.profit-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.profit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profit-metric-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(16, 48, 96, .62), rgba(9, 28, 55, .42));
  border: 1px solid rgba(146, 209, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 24px rgba(2, 8, 23, .18);
}

.profit-metric-card span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b9d8ff;
}

.profit-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #fef8ea;
  font-size: 1.14rem;
}

.overview-kpi-band .kpi-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.overview-kpi-band {
  background: linear-gradient(120deg, rgba(8, 28, 60, .92), rgba(5, 20, 44, .88));
  border: 1px solid rgba(86, 162, 255, .28);
  padding: 12px 14px;
}

.overview-kpi-band .kpi {
  background: linear-gradient(145deg, rgba(16, 36, 72, .62), rgba(10, 23, 44, .42));
  border: 1px solid rgba(111, 184, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 8px 18px rgba(2, 8, 23, .26);
  min-height: 92px;
}

.overview-kpi-band .kpi .value {
  font-size: 1.2rem;
}

.overview-main-grid {
  grid-template-columns: 1.15fr .95fr .9fr;
  align-items: stretch;
}

.overview-main-grid>.card {
  min-height: 300px;
}

.overview-main-grid>.card:nth-child(1) {
  min-height: 380px;
}

.overview-main-grid>.card:nth-child(3) {
  background: linear-gradient(145deg, rgba(20, 24, 58, .92), rgba(16, 25, 48, .84));
  border: 1px solid rgba(139, 92, 246, .3);
}

.overview-main-grid .stacked-bars {
  min-height: 210px;
}

.overview-main-grid .bar-track {
  height: 146px;
}

.overview-main-grid .summary-grid {
  grid-template-columns: 1fr;
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  align-items: stretch;
}

.alert-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid #f97316;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-card.severity-warning {
  border-left-color: #f97316;
}

.alert-card.severity-info {
  border-left-color: #38bdf8;
}

.alert-card .alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-card .alert-icon {
  font-size: 1.4rem;
}

.alert-card .alert-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.alert-card .alert-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: auto;
}

.alert-card .alert-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.alert-card .alert-amount {
  font-weight: 600;
  font-size: 0.9rem;
  color: #facc15;
}

.alert-card .alert-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.alert-card .btn-resolve {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #f1f5f9;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: 0.2s;
}

.alert-card .btn-resolve:hover {
  background: rgba(255, 255, 255, 0.25);
}

.overview-top-proc {
  padding-top: 12px;
  padding-bottom: 12px;
}

.overview-top-proc .list {
  max-height: 180px;
  overflow-y: auto;
}

.overview-sales-week .card:first-child {
  min-height: 300px;
}

.overview-sales-week .card:last-child {
  min-height: 300px;
}

.overview-sales-week .stacked-bars {
  min-height: 170px;
}

.overview-ops-compare .card {
  min-height: 250px;
}

.overview-live-table .card:first-child {
  min-height: 290px;
}

.overview-live-table .card:last-child {
  min-height: 290px;
}

.overview-recommendations {
  background: linear-gradient(145deg, rgba(10, 24, 48, .92), rgba(15, 34, 68, .78));
  border: 1px solid rgba(103, 178, 255, .24);
}

#overviewTxTable td,
#overviewTxTable th {
  padding: 7px 8px;
  font-size: .72rem;
}

.overview-action-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.action-tile {
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(116, 164, 255, .2);
  background: linear-gradient(140deg, rgba(9, 28, 58, .9), rgba(12, 32, 66, .74));
  color: var(--text-hi);
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.overview-action-strip {
  margin-top: 2px;
}

.action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 198, 255, .42);
  box-shadow: 0 12px 20px rgba(2, 8, 23, .3);
}

.action-tile-primary {
  border-color: rgba(116, 90, 255, .35);
  background: linear-gradient(140deg, rgba(56, 45, 138, .9), rgba(20, 41, 96, .8));
}

.action-tile-warm {
  border-color: rgba(245, 177, 46, .45);
  background: linear-gradient(140deg, rgba(95, 65, 14, .9), rgba(35, 49, 84, .76));
}

.tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
}

.tile-title {
  font-weight: 700;
  color: var(--text-hi);
  font-size: .9rem;
}

.tile-sub {
  margin-top: 2px;
  color: var(--text-low);
  font-size: .75rem;
}

.tile-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .68rem;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: var(--text-mid);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 79, 232, .25), rgba(0, 22, 54, .95));
  border: 1px solid rgba(0, 114, 255, .22);
}

.hero p {
  color: var(--text-mid);
  line-height: 1.6;
}

.note-text {
  margin-top: 12px;
  color: var(--text-low);
  font-size: .84rem;
}

.stat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stat-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .86rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(118, 183, 255, .2);
  box-shadow: 0 14px 30px rgba(2, 8, 20, .4), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 32, 64, .72), rgba(7, 21, 43, .6));
  border: 1px solid rgba(128, 196, 255, .2);
  transition: transform var(--transition-fast);
}

.kpi:hover {
  transform: translateY(-2px);
}

.kpi .label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-low);
}

.kpi .value {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-hi);
  margin-top: 6px;
}

.kpi .note {
  font-size: .78rem;
  color: var(--text-low);
  margin-top: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.status.good {
  background: rgba(34, 197, 94, .16);
  color: #8ef1b6;
}

.status.warn {
  background: rgba(245, 158, 11, .16);
  color: #ffd58f;
}

.status.bad {
  background: rgba(255, 89, 44, .16);
  color: #ffb09d;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 180, 255, .12);
  text-align: left;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(19, 58, 108, .34);
}

th {
  color: var(--text-low);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(12, 35, 70, .68), rgba(8, 23, 44, .6));
  border: 1px solid rgba(117, 184, 255, .2);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.list-item:hover {
  border-color: rgba(255, 255, 255, .1);
  transform: translateY(-1px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--text-mid);
  background: rgba(255, 255, 255, .05);
  font-size: .76rem;
}

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

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-inline label {
  font-size: .78rem;
  color: var(--text-low);
}

.field-inline input,
.field-inline select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: var(--text-hi);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field-inline input:focus,
.field-inline select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, .18);
}

.field-inline select option {
  background: var(--tertiary);
  color: var(--text-hi);
}

/* High-contrast filter controls for transaction and merchant dashboards */
[id^="txFilter"],
[id^="merchantFilter"] {
  background: #10233d !important;
  color: #ffffff !important;
  border: 1px solid #3a5a86 !important;
}

[id^="txFilter"]::placeholder,
[id^="merchantFilter"]::placeholder {
  color: #c9d6ea !important;
}

[id^="txFilter"]:focus,
[id^="merchantFilter"]:focus {
  outline: none;
  border-color: #6ea8ff !important;
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.24) !important;
}

[id^="txFilter"] option,
[id^="merchantFilter"] option {
  background: #0d1a2e;
  color: #ffffff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-end;
}

.filter-bar .field-inline {
  flex: 1 1 150px;
  min-width: 130px;
}

.filter-bar .field-inline.field-actions {
  flex: 0 0 auto;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.output-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.output-card:hover {
  border-color: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.mini-label {
  font-size: .72rem;
  text-transform: uppercase;
  color: var(--text-low);
  letter-spacing: .08em;
}

.mini-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-hi);
  margin-top: 6px;
}

.chart-box {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.chart-donut {
  min-height: 280px;
}

.chart-donut.compact {
  min-height: 220px;
}

.donut-wrap {
  display: grid;
  gap: 12px;
  place-items: center;
}

.donut-ring {
  width: 188px;
  height: 188px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 18px 32px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.donut-hole {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(7, 20, 44, .98), rgba(11, 28, 54, .94));
  border: 1px solid rgba(146, 209, 255, .18);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.donut-hole span {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-low);
}

.donut-hole strong {
  display: block;
  margin-top: 6px;
  color: var(--text-hi);
  font-size: 1.05rem;
}

.donut-legend {
  width: 100%;
  display: grid;
  gap: 8px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.report-shell {
  display: grid;
  gap: 16px;
}

.report-hero {
  background: linear-gradient(145deg, rgba(11, 34, 68, .92), rgba(8, 24, 49, .9));
  border: 1px solid rgba(128, 206, 255, .28);
}

.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.report-stat-card {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(16, 48, 96, .62), rgba(9, 28, 55, .42));
  border: 1px solid rgba(146, 209, 255, .26);
}

.report-stat-card span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b9d8ff;
}

.report-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.08rem;
  color: #fef8ea;
}

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

.report-action-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.report-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-insight-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 48, 96, .62), rgba(9, 28, 55, .42));
  border: 1px solid rgba(146, 209, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 18px rgba(2, 8, 23, .16);
  display: grid;
  gap: 8px;
}

.report-insight-index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(0, 114, 255, .24), rgba(0, 230, 195, .16));
  color: #fef8ea;
  font-weight: 900;
  letter-spacing: .08em;
  font-size: .78rem;
}

.report-insight-text {
  color: #dbeafe;
  line-height: 1.5;
}

.action-stack.compact {
  margin-top: 0;
}

.analytics-grid .card {
  min-height: 320px;
}

.analytics-grid .chart-box {
  min-height: 280px;
}

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

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  margin-top: 8px;
}

.bar>div {
  height: 100%;
  border-radius: inherit;
  transition: width var(--transition-smooth);
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.tooltip-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: var(--text-hi);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tooltip-btn:hover {
  background: rgba(255, 255, 255, .08);
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 240px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tertiary);
  color: var(--text-hi);
  border: 1px solid var(--primary);
  box-shadow: 0 16px 24px rgba(0, 0, 0, .28);
  font-size: .8rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 30;
}

.tooltip-wrap:hover .tooltip,
.tooltip-wrap:focus-within .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stacked-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 220px;
}

.bar-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  min-height: 180px;
}

.bar-track {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  max-width: 44px;
  height: 160px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
}

.bar-stack .segment {
  border-radius: 8px 8px 0 0;
  min-height: 8px;
  width: 100%;
  transition: height var(--transition-smooth);
}

.bar-stack .approved {
  background: linear-gradient(180deg, var(--success), var(--accent));
}

.bar-stack .declined {
  background: linear-gradient(180deg, var(--danger), #7f1d1d);
}

.bar-stack .label {
  margin-top: 2px;
  font-size: .72rem;
  color: var(--text-low);
  text-align: center;
}

.area-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.area-chart-svg {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(10, 33, 66, .42), rgba(6, 19, 39, .2));
  border: 1px solid rgba(126, 194, 255, .14);
  box-shadow: inset 0 -30px 60px rgba(0, 0, 0, .18);
}

.area-chart-labels {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}

.area-chart-labels span {
  font-size: .68rem;
  color: var(--text-low);
  text-align: center;
}

.area-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.area-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-mid);
  font-size: .78rem;
}

.area-chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 10px currentColor;
}

.heat-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.heat-cell {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.heat-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.heat-cell strong {
  display: block;
  color: var(--text-hi);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.feed-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(12, 34, 68, .7), rgba(8, 22, 44, .6));
  border: 1px solid rgba(120, 188, 255, .2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  transition: transform var(--transition-fast);
}

.feed-row:hover {
  transform: translateX(2px);
}

.feed-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .76rem;
  font-weight: 600;
}

.feed-pill.approved {
  color: #8ef1b6;
  background: rgba(34, 197, 94, .16);
}

.feed-pill.declined {
  color: #ffb09d;
  background: rgba(255, 89, 44, .16);
}

.feed-pill.review {
  color: #ffd58f;
  background: rgba(245, 158, 11, .16);
}

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

.summary-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 22, 54, .95);
  color: var(--text-hi);
  border: 1px solid rgba(255, 255, 255, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .2s ease;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.executive-mode .hidden-in-exec {
  display: none !important;
}

.drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: min(480px, 100%);
  height: 100%;
  background: rgba(7, 17, 31, .98);
  border-left: 1px solid rgba(255, 255, 255, .08);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 80;
  padding: 18px;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .35);
}

.drawer.open {
  transform: translateX(0);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .62);
  z-index: 70;
  display: none;
}

.overlay.show {
  display: block;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.search-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 17, 31, .96);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.search-item:hover {
  border-color: rgba(0, 114, 255, .4);
  transform: translateX(2px);
}

.watermark {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 50;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(8, 24, 50, .92), rgba(8, 26, 53, .78));
  border: 1px solid rgba(127, 194, 255, .28);
  color: var(--text-mid);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 0 12px 24px rgba(2, 8, 21, .45);
}

/* Dense transaction grid typography */
#transaccionesView table {
  font-size: .72rem;
}

#transaccionesView th,
#transaccionesView td {
  padding: 7px 8px;
  white-space: nowrap;
  line-height: 1.2;
}

#transaccionesView th {
  font-size: .62rem;
}

#transaccionesView td {
  font-size: .7rem;
}

#transaccionesView .feed-pill {
  font-size: .64rem;
  padding: 3px 6px;
}

@media (max-width: 980px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    max-width: 82vw;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    z-index: 95;
    box-shadow: 24px 0 48px rgba(0, 0, 0, .38);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .app-shell.active {
    flex-direction: column;
  }

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

  .overview-main-grid {
    grid-template-columns: 1fr;
  }

  .premium-headline,
  .premium-insights-grid {
    grid-template-columns: 1fr;
  }

  .overview-action-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-main-grid>.card,
  .overview-sales-week .card,
  .overview-ops-compare .card,
  .overview-live-table .card {
    min-height: auto;
  }

  .kpi-row,
  .output-grid,
  .chart-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stacked-bars {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .area-chart-labels {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .feed-row {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .content {
    padding: 14px;
  }

  .global-filter-grid {
    gap: 8px;
  }

  .hero {
    padding: 16px;
  }

  .card {
    padding: 14px;
  }

  .simulator-grid {
    grid-template-columns: 1fr;
  }

  .kpi-row,
  .output-grid,
  .chart-grid,
  .summary-grid,
  .heat-map,
  .stacked-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .area-chart-svg {
    height: 180px;
  }

  .overview-kpi-band .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premium-kpi-grid,
  .premium-pulse-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premium-pulse-chart .area-chart-svg {
    height: 180px;
    filter: drop-shadow(0 10px 24px rgba(0, 230, 195, .08));
  }

  .premium-pulse-metrics {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pulse-chip {
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(145deg, rgba(16, 48, 96, .58), rgba(9, 28, 55, .36));
    border: 1px solid rgba(146, 209, 255, .2);
  }

  .pulse-chip span {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-low);
  }

  .pulse-chip strong {
    display: block;
    margin-top: 6px;
    color: var(--text-hi);
    font-size: 1rem;
  }

  .pulse-chip.positive {
    border-color: rgba(0, 208, 132, .32);
  }

  .pulse-chip.positive strong {
    color: #7ff7c2;
  }

  .pulse-chip.negative {
    border-color: rgba(255, 74, 102, .32);
  }

  .pulse-chip.negative strong {
    color: #ff93a6;
  }

  .stacked-bars {
    min-height: 180px;
  }

  .bar-track {
    max-width: 100%;
    height: 120px;
  }

  .bar-stack {
    min-height: 140px;
  }

  .login-card {
    padding: 22px;
  }

  .login-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-stack {
    flex-direction: column;
  }

  .search-wrap input {
    padding-left: 40px;
  }

  .watermark {
    position: static;
    margin: 0 14px 14px;
    width: fit-content;
  }

  #transaccionesView .table-wrap table,
  #transaccionesView .table-wrap thead,
  #transaccionesView .table-wrap tbody,
  #transaccionesView .table-wrap tr,
  #transaccionesView .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #transaccionesView .table-wrap thead {
    display: none;
  }

  #transaccionesView .table-wrap tr {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(146, 209, 255, .14);
  }

  #transaccionesView .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    text-align: right;
  }

  #transaccionesView .table-wrap td:last-child {
    border-bottom: none;
  }

  #transaccionesView .table-wrap td::before {
    content: attr(data-label);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-low);
    text-align: left;
    flex-shrink: 0;
  }

  #transaccionesView .table-wrap td.td-mobile-hide {
    display: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp .4s ease both;
}

/* === Panel de Usuarios: modal y componentes === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 20, .68);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  width: 92%;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--text-hi);
  animation: fadeInUp .28s ease both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.modal-close {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  color: var(--text-hi);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, .12);
}

.modal-body {
  color: var(--text-mid);
}

.modal-footer {
  border-top: 1px solid var(--border);
}

.form-section h3 {
  margin: 0 0 16px;
  font-size: .92rem;
  color: var(--text-hi);
  font-family: var(--font-display);
}

.form-group label {
  color: var(--text-mid);
  font-size: .84rem;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="date"],
.modal-content input[type="tel"],
.modal-content select {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-hi) !important;
  font-family: var(--font-body);
}

.modal-content input::placeholder {
  color: var(--text-low);
}

.modal-content label:has(input[type="radio"]) {
  background: rgba(255, 255, 255, .03);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.modal-content label:has(input[type="radio"]:checked) {
  border-color: var(--primary) !important;
  background: rgba(0, 168, 255, .12);
}

.permission-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.permission-granted {
  background: rgba(0, 208, 132, .16);
  color: var(--success);
  border: 1px solid rgba(0, 208, 132, .3);
}

.permission-denied {
  background: rgba(255, 74, 102, .12);
  color: var(--danger);
  border: 1px solid rgba(255, 74, 102, .26);
}

.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.permission-item:last-child {
  border-bottom: none;
}

@media (max-width: 760px) {
  .modal-content {
    width: 96%;
  }

  .modal-body .form-section > div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}
