body.demo-body {
  background: hsl(var(--background));
  font-family: var(--font-display);
}

body.demo-body.ambient-bg {
  min-height: 100vh;
}

.demo-body .page-content {
  padding-top: var(--header-offset);
}

.demo-page {
  min-height: calc(100vh - var(--header-offset));
}

.lab-mode-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font-body);
}

.lab-mode-banner a {
  color: var(--brand-blue);
  font-weight: 600;
}

.lab-mode-demo {
  background: hsl(var(--warning) / 0.1);
  border: 1px solid hsl(var(--warning) / 0.35);
  color: hsl(var(--muted-foreground));
}

.lab-mode-app {
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.28);
  color: hsl(var(--muted-foreground));
}

.demo-loading {
  padding: 3rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-display);
  font-size: 14px;
}

.demo-showcase {
  margin-bottom: 0.75rem;
}

.layout-col-center .demo-showcase {
  margin-bottom: 0.5rem;
}

.layout-col-center #tour-panel-chart {
  margin-top: 0;
}

.demo-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.demo-showcase .demo-shot {
  width: 100%;
  margin-top: 0;
}

.method-tab.method-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.method-tab[data-method] {
  cursor: pointer;
}

.app {
  padding: 20px;
  color: hsl(var(--foreground));
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1.25rem;
}

.title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.subtitle {
  color: hsl(var(--muted-foreground));
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.help {
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.25);
  color: hsl(var(--foreground));
  padding: 14px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-family: var(--font-body);
  min-width: 180px;
  position: relative;
  z-index: 1;
}

.help .tour-launch-btn {
  width: 100%;
  margin-top: 10px;
}

.main-layout {
  display: grid;
  grid-template-columns: 320px 1fr 330px;
  gap: 1rem;
}

.layout-col-side,
.layout-col-center,
#tour-panel-methods {
  min-width: 0;
}

.layout-col-side {
  position: relative;
  z-index: 2;
}

.layout-col-center {
  position: relative;
  z-index: 1;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(8px);
  box-shadow: var(--panel-shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.step {
  background: var(--brand-blue);
  color: var(--brand-black);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

.upload-box {
  border: 2px dashed hsl(var(--primary) / 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  position: relative;
  z-index: 1;
  background: hsl(var(--surface) / 0.4);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.upload-box.is-loading {
  border-color: hsl(var(--primary) / 0.65);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.2), 0 8px 32px hsl(var(--primary) / 0.12);
  pointer-events: none;
}

.upload-box__idle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.lab-file-loader[hidden] {
  display: none !important;
}

.lab-file-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 1.25rem;
  text-align: center;
  background: hsl(var(--card) / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lab-file-loader__spinner {
  width: 52px;
  height: 52px;
  position: relative;
  margin-bottom: 6px;
}

.lab-file-loader__spinner::before,
.lab-file-loader__spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
}

.lab-file-loader__spinner::before {
  border-top-color: var(--brand-blue);
  border-right-color: var(--brand-blue-light);
  animation: lab-file-spin 0.9s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
  filter: drop-shadow(0 0 8px rgba(108, 174, 209, 0.45));
}

.lab-file-loader__spinner::after {
  inset: 9px;
  border-bottom-color: var(--brand-blue);
  border-left-color: rgba(108, 174, 209, 0.35);
  animation: lab-file-spin 1.25s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite reverse;
}

.lab-file-loader__bar {
  width: min(200px, 80%);
  height: 3px;
  margin: 4px 0 8px;
  border-radius: 999px;
  background: hsl(var(--border) / 0.5);
  overflow: hidden;
}

.lab-file-loader__bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--brand-blue), var(--brand-blue-light), transparent);
  animation: lab-file-bar 1.1s ease-in-out infinite;
}

.lab-file-loader__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
}

.lab-file-loader__file {
  margin: 0;
  max-width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-file-loader__stage {
  margin: 0;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  animation: lab-file-pulse 1.6s ease-in-out infinite;
}

@keyframes lab-file-spin {
  to { transform: rotate(360deg); }
}

@keyframes lab-file-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@keyframes lab-file-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.file-input { display: none; }

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--brand-blue);
  color: var(--brand-black);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0;
  font-family: var(--font-body);
  box-shadow: 0 0 16px rgba(108, 174, 209, 0.2);
}

.file-btn:hover { background: var(--brand-blue-hover); }

.file-card {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.25);
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.file-name {
  font-weight: 700;
  color: var(--brand-blue);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 210px;
}

label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  position: relative;
  z-index: 1;
}

select,
input[type=number] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border) / 0.6);
  margin-bottom: 12px;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 14px;
  background: hsl(var(--surface) / 0.6);
  color: hsl(var(--foreground));
  position: relative;
  z-index: 1;
}

select:focus,
input[type=number]:focus {
  outline: none;
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
}

button {
  width: 100%;
  border: none;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

button.lab-action-btn,
label.lab-action-btn {
  margin-top: 0;
  min-height: 38px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.2;
}

.btn-primary {
  background: var(--brand-blue);
  color: var(--brand-black);
  box-shadow: 0 0 16px rgba(108, 174, 209, 0.2);
}

.btn-primary:hover { background: var(--brand-blue-hover); }

.btn-success {
  background: hsl(var(--success));
  color: #fff;
}

.btn-light {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border) / 0.5);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metrics .metric {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(8px);
  box-shadow: var(--panel-shadow);
  padding: 0.875rem;
}

.metrics .metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.metric {
  position: relative;
  z-index: 1;
}

.metric-title {
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-display);
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-blue);
}

.chart {
  height: 650px;
  min-height: 650px;
  max-width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.table-wrap {
  max-height: 350px;
  overflow: auto;
  position: relative;
  z-index: 1;
}

#tablaResultados {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13px;
}

#tablaResultados th,
#tablaResultados td {
  border: 1px solid hsl(var(--border) / 0.5);
  padding: 8px 10px;
  text-align: left;
}

#tablaResultados th {
  background: hsl(var(--surface));
  font-family: var(--font-display);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
}

.method-tab {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  position: relative;
  z-index: 1;
  transition: all 0.15s ease;
}

.method-tab:hover {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.05);
}

.method-block {
  margin-bottom: 8px;
}

.method-block .method-tab {
  margin-bottom: 0;
}

.method-block.is-open .method-tab {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.methods-panel {
  position: relative;
}

.method-tab.active {
  background: hsl(var(--primary) / 0.15);
  border-color: hsl(var(--primary) / 0.4);
  color: var(--brand-blue);
}

.method-config {
  display: none;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid hsl(var(--border) / 0.5);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: hsl(var(--surface) / 0.5);
  position: relative;
  z-index: 1;
}

.method-block.is-open .method-config {
  display: block;
}

.method-hint {
  margin-top: 0;
  margin-bottom: 12px;
}

.info-box-runtime:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.info-box {
  background: hsl(var(--primary) / 0.06);
  border: 1px solid hsl(var(--primary) / 0.2);
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.panel-title-row .panel-title {
  margin-bottom: 0;
}

.panel-title-row .btn-pro,
.panel-title-row .lab-action-btn {
  width: auto;
  margin-top: 0;
}

.panel-actions,
.methods-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.panel-actions .lab-action-btn,
.methods-actions .lab-action-btn {
  width: 100%;
  margin-top: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
  margin-top: 0;
}

.visual-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

html.light .chart {
  background: #ffffff;
}

html.dark .chart {
  background: hsl(0, 0%, 9%);
}

html.light .visual-empty {
  background: #ffffff;
  border: 1px dashed hsl(210, 16%, 88%);
}

html.dark .visual-empty {
  background: hsl(0, 0%, 9%);
  border: 1px dashed hsl(0, 0%, 20%);
  color: hsl(var(--muted-foreground));
}

.pro-ai-compact {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: hsl(var(--surface) / 0.4);
}

.pro-ai-compact__body {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.btn-pro-ai-discusion.btn-pro {
  width: 100%;
  margin-top: 12px;
}

.btn-pro-ai-discusion:disabled,
.btn-pro-ai-discusion.is-locked {
  cursor: pointer;
  filter: saturate(0.9);
  opacity: 0.88;
}

.pro-ai-discusion {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: hsl(var(--surface));
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.pro-ai-discusion__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 10px;
  font-family: var(--font-display);
}

html.dark .pro-ai-discusion__meta {
  color: #fcd34d;
}

.pro-ai-discusion__text {
  font-size: 14px;
  line-height: 1.65;
  color: hsl(var(--foreground));
  font-family: var(--font-body);
}

.pro-ai-discusion__text p {
  margin: 0 0 12px;
}

.pro-ai-discusion__text p:last-child {
  margin-bottom: 0;
}

.pro-ai-discusion__loading {
  margin: 0;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.pro-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: auto;
}

.pro-ai-modal.is-open {
  display: flex;
}

.pro-ai-modal[hidden] {
  display: none !important;
}

body.pro-ai-modal-open {
  overflow: hidden;
}

.pro-ai-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.pro-ai-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 22px 22px 18px;
  border-radius: var(--radius-xl);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--panel-shadow);
}

.pro-ai-modal__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.pro-ai-modal__lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.pro-ai-modal__dialog label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.pro-ai-modal__dialog input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 13px;
}

.pro-ai-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.pro-ai-modal__actions .btn-light,
.pro-ai-modal__actions .btn-pro {
  flex: 1;
  margin-top: 0;
  height: 44px;
}

/* Plotly: fondo del contenedor alineado al tema */
html.dark #chartLab .main-svg,
html.dark #chartLab .bg {
  background: transparent !important;
}

.estado-error {
  border-color: hsl(var(--destructive) / 0.4);
  color: hsl(var(--destructive));
}

.arima-workflow-panel {
  margin-top: 0;
}

.arima-diag-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.arima-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--surface) / 0.35);
  position: relative;
  z-index: 1;
}

.arima-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--brand-blue);
  color: var(--brand-black);
}

.arima-step-body h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
}

.arima-step-body p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--foreground));
  font-family: var(--font-body);
}

.arima-step-meta {
  font-size: 12px !important;
  color: hsl(var(--muted-foreground)) !important;
}

.diag-ok {
  color: hsl(142, 55%, 42%) !important;
  font-weight: 600;
}

.diag-warn {
  color: hsl(38, 92%, 45%) !important;
  font-weight: 600;
}

.arima-verdict {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.25);
  font-size: 13px;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
}

.arima-diag-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.arima-diag-chart-wrap {
  border: 1px solid hsl(var(--border) / 0.45);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: hsl(var(--card) / 0.5);
}

.arima-diag-chart-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 4px;
  font-family: var(--font-display);
}

.arima-subchart {
  height: 220px;
  min-height: 220px;
}

@media (max-width: 900px) {
  .arima-diag-charts {
    grid-template-columns: 1fr;
  }
}

  background: hsl(var(--primary) / 0.06);
  border: 1px solid hsl(var(--primary) / 0.2);
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
}

#infoModelo {
  font-family: var(--font-body);
  line-height: 1.6;
  position: relative;
  z-index: 1;
  color: hsl(var(--foreground));
}

.filter-card {
  background: hsl(var(--surface) / 0.5);
  border: 1px solid hsl(var(--border) / 0.4);
  padding: 10px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

#tour-panel-chart {
  display: flex;
  flex-direction: column;
}

.filter-summary-bar {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary) / 0.05);
  border: 1px solid hsl(var(--primary) / 0.16);
}

.filter-summary-label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
}

.filter-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.22);
  font-size: 11px;
  line-height: 1.3;
  color: hsl(var(--foreground));
  font-family: var(--font-body);
}

.filter-summary-chip__field {
  font-weight: 600;
  color: hsl(var(--primary));
}

.filter-summary-chip__sep {
  opacity: 0.45;
  font-size: 10px;
}

.filter-summary-chip__arrow {
  opacity: 0.55;
  font-size: 10px;
  padding: 0 1px;
}

.filter-summary-chip__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.filter-summary-meta {
  margin: 8px 0 0;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
}

.filter-card--date-range {
  border-color: hsl(var(--primary) / 0.22);
  background: hsl(var(--primary) / 0.04);
}

.filter-date-col {
  font-weight: 400;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.filter-date-hint {
  margin: 4px 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

.filter-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.filter-date-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
}

.filter-date-field input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 12px;
  font-family: var(--font-body);
}

.filter-date-reset {
  white-space: nowrap;
  padding: 8px 10px !important;
  font-size: 11px !important;
}

.filter-date-bounds {
  margin: 8px 0 0;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 600px) {
  .filter-date-range {
    grid-template-columns: 1fr;
  }

  .filter-date-reset {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .main-layout:not(.gl-main-layout) {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center {
    order: 1;
    display: flex;
    flex-direction: column;
  }

  .main-layout:not(.gl-main-layout) .layout-col-side {
    order: 2;
  }

  .main-layout:not(.gl-main-layout) #tour-panel-methods {
    order: 3;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center .demo-showcase {
    order: 1;
    margin-bottom: 0.5rem;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center #tour-panel-chart {
    order: 2;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center .metrics {
    order: 0;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center #tour-panel-info {
    order: 3;
  }

  .main-layout:not(.gl-main-layout) .layout-col-center > .panel:last-of-type {
    order: 4;
  }

  .metrics { grid-template-columns: repeat(3, 1fr); }
  .chart { height: 480px; min-height: 480px; }
}

@media (max-width: 600px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .header { flex-direction: column; }
}

/* GameLab: nunca apilar en 1200px (SeriesLab sí) */
#gl-main-layout.main-layout {
  display: grid !important;
  flex-direction: unset !important;
}
