@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #0b1112;
  --panel: #121a1c;
  --panel-soft: #192324;
  --ink: #f4f1ea;
  --muted: #94a3a4;
  --accent: #22c55e;
  --accent-2: #f97316;
  --alert: #f43f5e;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.15), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.15), transparent 45%),
    linear-gradient(120deg, #0b1112 0%, #111819 40%, #0c1314 100%);
  min-height: 100vh;
}

body.auth-shell {
  --bg: #f7f3ea;
  --panel: #ffffff;
  --panel-soft: #f3efe6;
  --ink: #1c2221;
  --muted: #5f6b67;
  --border: rgba(13, 17, 18, 0.08);
  --shadow: 0 24px 50px rgba(24, 30, 30, 0.12);
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.15), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.16), transparent 45%),
    linear-gradient(140deg, #f8f2e8 0%, #f4f7f2 40%, #f0f6f7 100%);
}

body.suite-shell {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --panel-soft: #f2eee4;
  --ink: #1b2120;
  --muted: #5c6763;
  --border: rgba(18, 24, 22, 0.1);
  --shadow: 0 24px 50px rgba(21, 28, 26, 0.12);
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, rgba(34, 197, 94, 0.16), transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(249, 115, 22, 0.12), transparent 40%),
    linear-gradient(140deg, #fbf7ef 0%, #f6faf5 45%, #f1f5f6 100%);
}

body.contadores-shell,
body.bombeos-shell {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --panel-soft: #f3efe6;
  --ink: #1b2120;
  --muted: #5c6763;
  --border: rgba(18, 24, 22, 0.1);
  --shadow: 0 22px 45px rgba(21, 28, 26, 0.12);
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.12), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.12), transparent 45%),
    linear-gradient(140deg, #fbf7ef 0%, #f6faf5 45%, #f1f5f6 100%);
}

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

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}

.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

body.contadores-shell .main,
body.bombeos-shell .main {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent), #14b8a6);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b1112;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  transition: all 0.2s ease;
}

body.contadores-shell .nav-link.active,
body.contadores-shell .nav-link:hover {
  color: var(--ink);
  background: rgba(12, 18, 16, 0.06);
}

.contadores-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(12, 18, 16, 0.08);
  box-shadow: 0 18px 35px rgba(16, 24, 22, 0.08);
  position: sticky;
  top: 16px;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.contadores-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.contadores-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.contadores-nav .nav-item {
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  padding-bottom: 6px;
}

.contadores-nav .nav-item.active {
  color: #0f766e;
  font-weight: 600;
}

.contadores-nav .nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #0f766e;
  border-radius: 999px;
}

.contadores-nav .nav-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

body.contadores-shell .btn.ghost {
  border: 1px solid rgba(12, 18, 16, 0.12);
}

.dashboard-hero {
  background: var(--panel);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 26px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}

.dashboard-hero h1 {
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  margin: 0 0 6px;
}

.dashboard-hero p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ref-date {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-soft);
  border: 1px solid rgba(15, 75, 91, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

.ref-date label {
  font-weight: 600;
  color: var(--muted);
}

.ref-date input[type="date"] {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.detail-kpis .kpi-label,
.detail-kpis .kpi-value {
  display: block;
}

.detail-kpis .kpi-value {
  margin-top: 6px;
}

body.contadores-shell .kpi-card {
  box-shadow: 0 18px 32px rgba(15, 23, 21, 0.08);
}

body.contadores-shell .kpi-card.accent {
  background: linear-gradient(140deg, #f1fbf6, #ffffff);
  border-color: rgba(34, 197, 94, 0.25);
}

body.contadores-shell .kpi-card.alert {
  background: linear-gradient(140deg, #fff4f2, #ffffff);
  border-color: rgba(249, 115, 22, 0.25);
}

.table-stack {
  display: grid;
  gap: 18px;
}

.table-panel {
  padding: 18px 20px;
}

.panel-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

body.contadores-shell .data-table th {
  color: var(--ink);
  font-weight: 600;
}

body.contadores-shell .data-table td {
  color: #2f3635;
}

.trend-panel {
  padding: 20px 22px;
}

.perf-panel .panel-header {
  align-items: flex-start;
}

.perf-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.contadores-shell .perf-controls select {
  appearance: none;
  background-color: #f4f1e8;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.02));
}

.perf-controls select {
  background: var(--panel-soft);
  border: 1px solid rgba(15, 75, 91, 0.18);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.85rem;
}

.perf-controls .btn.ghost {
  border-color: rgba(15, 75, 91, 0.2);
}

.chart-wrap {
  background: var(--panel-soft);
  border-radius: 16px;
  border: 1px solid rgba(15, 75, 91, 0.12);
  padding: 12px;
  overflow: auto;
  position: relative;
  min-height: 220px;
}

.perf-bars {
  display: grid;
  gap: 12px;
  min-height: 200px;
}

.perf-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 2.4fr) 80px;
  align-items: center;
  gap: 12px;
}

.perf-label {
  font-size: 0.85rem;
  color: var(--ink);
}

.perf-bar {
  background: rgba(15, 75, 91, 0.12);
  border-radius: 999px;
  height: 10px;
  position: relative;
  overflow: hidden;
}

.perf-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #34d399);
}

.perf-value {
  text-align: right;
  font-weight: 600;
  color: #0f4b5b;
  font-size: 0.85rem;
}

.chart-empty,
.chart-error {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 24px;
}

.chart-empty[hidden],
.chart-error[hidden] {
  display: none;
}

.chart-error {
  margin-top: 12px;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 21, 0.35);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(15, 75, 91, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 21, 0.2);
  padding: 24px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.modal-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-close {
  border: none;
  background: rgba(15, 75, 91, 0.08);
  color: #0f4b5b;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-subtext {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.modal-value {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
  background: var(--panel-soft);
}

.nav-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-chip {
  padding: 12px;
  background: var(--panel-soft);
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logout {
  color: var(--muted);
  font-size: 0.85rem;
}

.main {
  padding: 24px 32px 40px;
}

body.suite-shell .main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 42px 32px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.4rem;
  font-family: "Fraunces", serif;
}

.status-pill {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table thead th {
  color: var(--muted);
  font-weight: 600;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
}

.kpi-card.accent {
  border-color: rgba(34, 197, 94, 0.4);
}

.kpi-card.alert {
  border-color: rgba(244, 63, 94, 0.4);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 6px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel.wide {
  grid-column: span 2;
}

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

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

.panel-actions select {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--ink);
  font: inherit;
}

.range-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  color: var(--muted);
}

.range-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.range-form input[type="date"] {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  color: var(--ink);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.utility-panel .panel-header {
  align-items: flex-start;
}

.utility-panel {
  scroll-margin-top: 120px;
}

.utility-index {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.4));
}

.utility-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.dashboard-index-grid {
  margin: 18px 0 24px;
}

.chart-studio {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(255, 255, 255, 0.6));
}

.chart-studio + .chart-studio {
  margin-top: 24px;
}

.chart-studio-body {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.5fr);
  gap: 18px;
}

.chart-output-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-controls {
  display: grid;
  gap: 16px;
}

.control-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 75, 91, 0.12);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.segmented-control {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(15, 75, 91, 0.12);
  background: var(--panel-soft);
  align-self: flex-start;
}

.segmented-control label {
  position: relative;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segmented-control input:checked + span {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(15, 118, 110, 0.9));
  color: #fff;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.control-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-card-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.control-actions {
  display: flex;
  gap: 6px;
}

.control-search {
  border: 1px solid rgba(15, 75, 91, 0.15);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--panel-soft);
}

.control-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.control-filters select {
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 75, 91, 0.15);
  background: var(--panel-soft);
}

.install-list {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.install-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink);
}

.install-item input {
  accent-color: #0f766e;
}

.tag-panes {
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.tag-pane {
  border: 1px solid rgba(15, 75, 91, 0.12);
  background: var(--panel-soft);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-pane[hidden] {
  display: none;
}

.tag-pane-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.tag-pane-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.tag-pane-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.tag-pane-caret {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.tag-pane-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 75, 91, 0.12);
  border-radius: 10px;
  padding: 6px 8px;
}

.tag-item input {
  accent-color: #0f766e;
}

.tag-item span {
  word-break: break-word;
}

.tag-pane.is-disabled {
  opacity: 0.45;
}

.tag-pane.is-collapsed .tag-pane-body {
  display: none;
}

.tag-pane.is-collapsed .tag-pane-caret {
  transform: rotate(-90deg);
}

body.premium-ui.contadores-shell , body.premium-ui.bombeos-shell {
  background: radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.16), transparent 42%),
    radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.14), transparent 42%),
    linear-gradient(140deg, #fbf7ef 0%, #f6faf5 46%, #f1f5f6 100%);
}

body.premium-ui.contadores-shell .dashboard-hero , body.premium-ui.bombeos-shell .dashboard-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf8 55%, #f3f2ec 100%);
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 28px 64px rgba(15, 118, 110, 0.14);
}

body.premium-ui.contadores-shell .dashboard-hero::after , body.premium-ui.bombeos-shell .dashboard-hero::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto 50%;
  height: 180%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12), transparent 65%);
  pointer-events: none;
}

body.premium-ui.contadores-shell .dashboard-hero > * , body.premium-ui.bombeos-shell .dashboard-hero > * {
  position: relative;
  z-index: 1;
}

body.premium-ui.contadores-shell .ref-date , body.premium-ui.bombeos-shell .ref-date {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 118, 110, 0.2);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .btn.ghost , body.premium-ui.bombeos-shell .btn.ghost {
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: #0f4b5b;
}

body.premium-ui.contadores-shell .kpi-card , body.premium-ui.bombeos-shell .kpi-card {
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f7f5ee 100%);
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .kpi-card.accent , body.premium-ui.bombeos-shell .kpi-card.accent {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), #ffffff 60%);
  border-color: rgba(16, 185, 129, 0.28);
}

body.premium-ui.contadores-shell .kpi-card.alert , body.premium-ui.bombeos-shell .kpi-card.alert {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.14), #ffffff 60%);
  border-color: rgba(249, 115, 22, 0.28);
}

body.premium-ui.contadores-shell .utility-index-card , body.premium-ui.bombeos-shell .utility-index-card {
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 244, 236, 0.96));
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 20px 42px rgba(15, 118, 110, 0.14);
}

body.premium-ui.contadores-shell .utility-index-icon , body.premium-ui.bombeos-shell .utility-index-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(15, 118, 110, 0.12));
}

body.premium-ui.contadores-shell .panel , body.premium-ui.bombeos-shell .panel {
  border-radius: 20px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8f6f0 100%);
  box-shadow: 0 22px 50px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .data-table thead th , body.premium-ui.bombeos-shell .data-table thead th {
  background: linear-gradient(135deg, #0f4b5b, #0c3b45);
  color: #f3f6f6;
}

body.premium-ui.contadores-shell .data-table tbody tr:hover , body.premium-ui.bombeos-shell .data-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.06);
}

body.premium-ui.contadores-shell .filter-bar , body.premium-ui.bombeos-shell .filter-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 244, 236, 0.95));
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .filters input, body.premium-ui.bombeos-shell .filters input,
body.premium-ui.contadores-shell .filters select , body.premium-ui.bombeos-shell .filters select {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.premium-ui.contadores-shell .filters input:focus, body.premium-ui.bombeos-shell .filters input:focus,
body.premium-ui.contadores-shell .filters select:focus , body.premium-ui.bombeos-shell .filters select:focus {
  outline: 2px solid rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.35);
}

body.premium-ui.contadores-shell .detail-hero , body.premium-ui.bombeos-shell .detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf8 55%, #f3f2ec 100%);
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 24px 52px rgba(15, 118, 110, 0.14);
}

body.premium-ui.contadores-shell .detail-hero::after , body.premium-ui.bombeos-shell .detail-hero::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto 50%;
  height: 180%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12), transparent 65%);
  pointer-events: none;
}

body.premium-ui.contadores-shell .detail-hero > * , body.premium-ui.bombeos-shell .detail-hero > * {
  position: relative;
  z-index: 1;
}

body.premium-ui.contadores-shell .chart-wrap , body.premium-ui.bombeos-shell .chart-wrap {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 244, 236, 0.95));
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

body.premium-ui.contadores-shell .range-form input[type="date"] , body.premium-ui.bombeos-shell .range-form input[type="date"] {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

body.premium-ui.contadores-shell .modal-card , body.premium-ui.bombeos-shell .modal-card {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8f6f0 100%);
  box-shadow: 0 26px 60px rgba(15, 118, 110, 0.18);
}

body.premium-ui.contadores-shell .utility-panel.utility-index , body.premium-ui.bombeos-shell .utility-panel.utility-index {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 118, 110, 0.14);
}

body.premium-ui.contadores-shell .chart-studio , body.premium-ui.bombeos-shell .chart-studio {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(255, 255, 255, 0.85));
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: 0 20px 44px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .control-card , body.premium-ui.bombeos-shell .control-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 244, 236, 0.96));
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .chart-output , body.premium-ui.bombeos-shell .chart-output {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 244, 236, 0.96));
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.12);
}

body.premium-ui.contadores-shell .chart-shell , body.premium-ui.bombeos-shell .chart-shell {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.premium-ui.contadores-shell .utility-form input, body.premium-ui.bombeos-shell .utility-form input,
body.premium-ui.contadores-shell .utility-form select, body.premium-ui.bombeos-shell .utility-form select,
body.premium-ui.contadores-shell .month-display, body.premium-ui.bombeos-shell .month-display,
body.premium-ui.contadores-shell .control-search, body.premium-ui.bombeos-shell .control-search,
body.premium-ui.contadores-shell .alarm-search , body.premium-ui.bombeos-shell .alarm-search {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.premium-ui.contadores-shell .utility-form input:focus, body.premium-ui.bombeos-shell .utility-form input:focus,
body.premium-ui.contadores-shell .utility-form select:focus, body.premium-ui.bombeos-shell .utility-form select:focus,
body.premium-ui.contadores-shell .month-display:focus-visible, body.premium-ui.bombeos-shell .month-display:focus-visible,
body.premium-ui.contadores-shell .control-search:focus, body.premium-ui.bombeos-shell .control-search:focus,
body.premium-ui.contadores-shell .alarm-search:focus , body.premium-ui.bombeos-shell .alarm-search:focus {
  outline: 2px solid rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.35);
}

body.premium-ui.contadores-shell .month-panel , body.premium-ui.bombeos-shell .month-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8f6f0 100%);
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 20px 44px rgba(15, 118, 110, 0.16);
}

body.premium-ui.contadores-shell .month-nav , body.premium-ui.bombeos-shell .month-nav {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

body.premium-ui.contadores-shell .panel-jump , body.premium-ui.bombeos-shell .panel-jump {
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #0f4b5b;
}


.compare-years-row {
  margin-top: -4px;
}

.compare-years-field {
  width: 100%;
}

.compare-years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  padding: 8px;
  max-height: 140px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 75, 91, 0.12);
  background: var(--panel-soft);
}

.compare-years-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--ink);
}

.compare-years-grid input {
  accent-color: #0f766e;
}

.selection-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.chart-output {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 75, 91, 0.12);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip.soft {
  background: rgba(15, 118, 110, 0.1);
  color: #0f4b5b;
}

.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.chart-shell {
  position: relative;
  border-radius: 16px;
  background: var(--panel-soft);
  padding: 12px;
}

.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-tab {
  border: 1px solid rgba(15, 75, 91, 0.18);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(15, 118, 110, 0.9));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.chart-panel {
  display: none;
}

.chart-panel.active {
  display: block;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.snapshot-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.snapshot-panel {
  display: none;
}

.snapshot-panel.active {
  display: block;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.snapshot-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 75, 91, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.snapshot-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}

.snapshot-icon svg {
  width: 20px;
  height: 20px;
}

.snapshot-card.status.on .snapshot-icon {
  color: #0f766e;
  background: rgba(16, 185, 129, 0.18);
}

.snapshot-card.status.off .snapshot-icon {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.12);
}

.snapshot-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.snapshot-card strong {
  font-size: 1.4rem;
  color: var(--ink);
}

.snapshot-card.status.on strong {
  color: #0f766e;
}

.snapshot-card.status.off strong {
  color: #b91c1c;
}

.freq-bar {
  margin-top: 8px;
  background: rgba(15, 75, 91, 0.1);
  border-radius: 999px;
  height: 10px;
  position: relative;
  overflow: hidden;
}

.freq-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399 0%, #0f766e 100%);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.freq-bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
}

.chart-loading {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #0f4b5b;
  z-index: 2;
}

.chart-loading[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .chart-studio-body {
    grid-template-columns: 1fr;
  }
}

.utility-index-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 75, 91, 0.15);
  box-shadow: 0 18px 40px rgba(15, 75, 91, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.utility-index-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(15, 75, 91, 0.16);
}

.utility-index-card:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.4);
  outline-offset: 2px;
}

.utility-index-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 118, 110, 0.12));
  display: grid;
  place-items: center;
  color: #0f766e;
}

.utility-index-icon svg {
  width: 22px;
  height: 22px;
}

.utility-index-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.utility-index-text span {
  font-weight: 600;
  color: var(--ink);
}

.utility-index-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.panel-jump {
  font-size: 0.78rem;
  padding: 6px 12px;
}

.info-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(15, 75, 91, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #0f4b5b;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px rgba(15, 75, 91, 0.12);
}

.info-btn:hover {
  background: rgba(15, 118, 110, 0.12);
}

.modal-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.utility-card {
  background: var(--panel-soft);
  border: 1px solid rgba(15, 75, 91, 0.12);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 130px;
}

.utility-card h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--ink);
}

.utility-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.utility-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.utility-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.utility-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.utility-field input,
.utility-field select {
  border: 1px solid rgba(15, 75, 91, 0.15);
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
}

.utility-field select[data-locked="true"] {
  pointer-events: none;
  opacity: 0.7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(15, 75, 91, 0.04));
}

.utility-field input[type="date"],
.utility-field input[type="month"] {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(15, 75, 91, 0.04));
  border: 1px solid rgba(15, 75, 91, 0.2);
  box-shadow: 0 6px 14px rgba(15, 75, 91, 0.08);
  font-weight: 600;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.utility-field input[type="date"]:focus,
.utility-field input[type="month"]:focus {
  outline: 2px solid rgba(52, 211, 153, 0.4);
  outline-offset: 2px;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.18);
}

.utility-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.utility-actions-top {
  justify-content: flex-end;
  margin-bottom: 4px;
}

.utility-info {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  color: var(--muted);
}

.utility-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.utility-info strong {
  color: var(--ink);
}
.utility-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.month-input {
  position: relative;
}

.month-display {
  width: 100%;
  text-align: left;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(15, 75, 91, 0.04));
  border: 1px solid rgba(15, 75, 91, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(15, 75, 91, 0.08);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.month-display:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.4);
  outline-offset: 2px;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.18);
}

.month-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 600;
}

.month-nav {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
}

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

.month-cell {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}

.month-cell:hover {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.08);
}

.month-cell.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.18);
  color: #0f766e;
}

.utility-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.utility-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.utility-total strong {
  font-size: 1.2rem;
  color: var(--ink);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.badge {
  background: var(--panel-soft);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}

.chip.alert {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
}

.chip.warn {
  background: rgba(249, 115, 22, 0.2);
  color: #fed7aa;
}

.chip.ok {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

body.contadores-shell .chip {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

body.contadores-shell .chip.alert {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.contadores-shell .chip.warn {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(140deg, var(--accent), #14b8a6);
  color: #0b1112;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.btn.suite-btn {
  border: 1px solid rgba(15, 118, 110, 0.35);
  background: linear-gradient(140deg, rgba(15, 118, 110, 0.12), rgba(52, 211, 153, 0.22));
  color: #0f4b5b;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.suite-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.18);
}

.btn.ghost.active {
  border-color: var(--accent);
  color: #86efac;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.link {
  color: #7dd3fc;
  font-size: 0.85rem;
}

.filter-bar {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.filters input,
.filters select {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.contadores-shell .data-table {
  border-collapse: separate;
  border-spacing: 0;
}

body.contadores-shell .data-table thead th {
  background: #0f4b5b;
  color: #f3f6f6;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px 14px;
}

body.contadores-shell .data-table thead th:first-child {
  border-top-left-radius: 10px;
}

body.contadores-shell .data-table thead th:last-child {
  border-top-right-radius: 10px;
}

body.contadores-shell .data-table tbody tr {
  background: rgba(255, 255, 255, 0.96);
}

body.contadores-shell .data-table tbody tr:nth-child(even) {
  background: rgba(244, 248, 246, 0.96);
}

body.contadores-shell .data-table td {
  border-bottom: 1px solid rgba(15, 75, 91, 0.15);
}

.summary-table td:first-child {
  font-weight: 600;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-chip.status-action {
  cursor: pointer;
  border: 1px solid currentColor;
  appearance: none;
  font: inherit;
}

.status-chip.status-action:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.3);
  outline-offset: 2px;
}

.status-chip.ok {
  background: rgba(34, 197, 94, 0.18);
  color: #0f7a45;
  border-color: rgba(34, 197, 94, 0.35);
}

.status-chip.stopped {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.35);
}

.status-chip.missing {
  background: rgba(148, 163, 164, 0.2);
  color: #4b5452;
  border-color: rgba(148, 163, 164, 0.4);
}

.cell-title {
  font-weight: 600;
}

.cell-sub {
  color: var(--muted);
  font-size: 0.75rem;
}

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

.flash-stack {
  display: grid;
  gap: 12px;
}

.flash {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f4b5b;
  border: 1px solid rgba(15, 118, 110, 0.18);
  font-weight: 600;
}

.flash.success {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
  color: #064e3b;
}

.flash.error {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.35);
  color: #7f1d1d;
}

.flash.info {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1e3a8a;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.suite-hero {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.9));
  border-radius: 28px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  padding: 32px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.12);
}

.suite-logos {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

body.suite-shell .suite-logos img {
  height: 36px;
  object-fit: contain;
}

.suite-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f4b5b;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.suite-hero h1 {
  font-family: "Fraunces", serif;
  font-size: 2.4rem;
  margin: 0 0 8px;
}

body.suite-shell .app-card {
  border: 1px solid rgba(12, 18, 16, 0.12);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.08);
}

body.suite-shell .btn.ghost {
  border: 1px solid rgba(12, 18, 16, 0.15);
  color: var(--ink);
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.hero-badge {
  background: rgba(34, 197, 94, 0.2);
  padding: 12px 18px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

body.suite-shell .app-grid {
  max-width: 980px;
  margin: 18px auto 0;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.app-card {
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
  min-height: 220px;
  overflow: hidden;
}

body.suite-shell .app-card {
  padding: 18px;
}

.app-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(12, 18, 16, 0.08);
  background: #f5f7f2;
}

.app-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.suite-shell .app-media {
  min-height: 180px;
  background: radial-gradient(circle at top, rgba(15, 118, 110, 0.2), rgba(255, 255, 255, 0.85));
}

body.suite-shell .app-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

body.suite-shell .app-card:nth-child(even) {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

body.suite-shell .app-card:nth-child(even) .app-media {
  order: 2;
}

body.suite-shell .app-card:nth-child(even) .app-body {
  order: 1;
}

@media (max-width: 820px) {
  body.suite-shell .app-card {
    grid-template-columns: 1fr;
  }

  body.suite-shell .app-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  body.suite-shell .app-card:nth-child(even) .app-media,
  body.suite-shell .app-card:nth-child(even) .app-body {
    order: initial;
  }
}

.app-card.disabled {
  opacity: 0.45;
}

.auth-wrap {
  width: min(420px, 92vw);
}

.auth-card {
  background: var(--panel);
  padding: 32px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-header {
  display: grid;
  gap: 10px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.auth-brand img {
  height: 42px;
  object-fit: contain;
}

.brand-divider {
  font-weight: 600;
  color: var(--muted);
  font-size: 1rem;
}

.auth-header h1 {
  font-family: "Fraunces", serif;
  margin: 0 0 6px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form input {
  width: 100%;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
}

.auth-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
}


.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.detail-hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
  }

  .panel.wide {
    grid-column: span 1;
  }

  .auth-wrap {
    width: min(420px, 92vw);
  }
}

@media (max-width: 820px) {
  body.contadores-shell .contadores-topbar,
  body.bombeos-shell .contadores-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  body.contadores-shell .contadores-nav,
  body.bombeos-shell .contadores-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  body.contadores-shell .contadores-nav::-webkit-scrollbar,
  body.bombeos-shell .contadores-nav::-webkit-scrollbar {
    height: 6px;
  }

  body.contadores-shell .contadores-nav::-webkit-scrollbar-thumb,
  body.bombeos-shell .contadores-nav::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.2);
    border-radius: 999px;
  }

  body.contadores-shell .contadores-actions,
  body.bombeos-shell .contadores-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .dashboard-hero,
  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .ref-date {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar label,
  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .panel-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-actions .btn,
  .panel-actions select,
  .panel-actions input {
    width: 100%;
  }

  .range-form {
    flex-direction: column;
    align-items: stretch;
  }

  .range-form label {
    width: 100%;
    justify-content: space-between;
  }

  .chart-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .chart-summary {
    width: 100%;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
}
.panel-toggle {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.collapsible-body.is-collapsed {
  display: none;
}

/* Bombeos */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-bar select,
.filter-bar input[type="date"] {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.kpi-value {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 4px;
}

.kpi-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.panel {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

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

.bar-list.compact .bar-label {
  width: 110px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 110px;
  gap: 8px;
  align-items: center;
}

.bar-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.bar-track {
  width: 100%;
  height: 10px;
  background: var(--panel-soft);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.bar-value {
  text-align: right;
  font-weight: 600;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.tag-card {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  min-width: 0;
}

.tag-label {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
}

.tag-value {
  font-weight: 600;
  margin-top: 4px;
  word-break: break-word;
}

.empty-state {
  padding: 16px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px dashed var(--border);
  color: var(--muted);
}
