/* ONGC Assam — Premium Enterprise IoT / SCADA Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ongc-bg-main: #020b17;
  --ongc-bg-sidebar: rgba(2, 11, 23, 0.85);
  --ongc-bg-header: rgba(2, 11, 23, 0.72);
  --ongc-glass: rgba(255, 255, 255, 0.04);
  --ongc-glass-hover: rgba(255, 255, 255, 0.07);
  --ongc-glass-border: rgba(255, 255, 255, 0.08);
  --ongc-text: #ffffff;
  --ongc-text-muted: #aab5c3;

  --glow-green: #8ef2b0;
  --glow-blue: #6fb5ff;
  --glow-pink: #f7a8c8;
  --glow-amber: #ffd76a;
  --glow-cyan: #5eead4;
  --glow-purple: #c4b5fd;
  --glow-red: #ff6b6b;

  /* Compact typography scale */
  --ongc-fs-xs: 0.5rem;
  --ongc-fs-sm: 0.5625rem;
  --ongc-fs-md: 0.625rem;
  --ongc-fs-base: 0.6875rem;
  --ongc-fs-lg: 0.875rem;
  --ongc-fs-xl: 1rem;
  --ongc-fs-2xl: 1.125rem;
}

[x-cloak] { display: none !important; }

/* ── Shell: deep navy + ambient glow ── */
html.ongc-theme,
html.ongc-theme body {
  background-color: var(--ongc-bg-main) !important;
  color: var(--ongc-text);
  font-family: 'Inter', system-ui, sans-serif;
}

html.ongc-theme .flex.h-screen.overflow-hidden {
  background: var(--ongc-bg-main);
}

html.ongc-theme .relative.flex.flex-1.flex-col {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(111, 181, 255, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(142, 242, 176, 0.04) 0%, transparent 50%),
    var(--ongc-bg-main) !important;
}

html.ongc-theme .sidebar {
  background: var(--ongc-bg-sidebar) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--ongc-glass-border) !important;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
}

html.ongc-theme header.sticky {
  background: var(--ongc-bg-header) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--ongc-glass-border) !important;
}

html.ongc-theme .ongc-main {
  background: transparent !important;
}

html.ongc-theme ::-webkit-scrollbar { width: 5px; }
html.ongc-theme ::-webkit-scrollbar-thumb {
  background: rgba(111, 181, 255, 0.25);
  border-radius: 6px;
}
html.ongc-theme ::-webkit-scrollbar-track { background: transparent; }

/* Sidebar active — red-blue gradient */
html.ongc-theme .dark .menu-item-active {
  position: relative;
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.14) 0%, rgba(111, 181, 255, 0.12) 100%) !important;
  color: var(--glow-blue) !important;
  border-radius: 12px;
}
html.ongc-theme .dark .menu-item-active::before {
  content: '';
  position: absolute;
  left: 0; top: 0.35rem; bottom: 0.35rem;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ff6b6b, var(--glow-blue));
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
}
html.ongc-theme .dark .menu-item-inactive { color: var(--ongc-text-muted); }

@media (min-width: 1280px) {
  .sidebar.ongc-sidebar-collapsed {
    width: 90px !important; min-width: 90px !important;
    padding-inline: 0.75rem !important;
  }
  .sidebar.ongc-sidebar-collapsed .menu-item { justify-content: center; }
}

/* Header notification btn */
.ongc-notify-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--ongc-glass-border);
  background: var(--ongc-glass);
  color: var(--ongc-text-muted);
  transition: all 0.25s ease;
}
.ongc-notify-btn:hover {
  background: var(--ongc-glass-hover);
  color: var(--glow-amber);
  box-shadow: 0 0 20px rgba(255, 215, 106, 0.15);
}
.ongc-notify-dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--glow-red);
  box-shadow: 0 0 8px var(--glow-red);
  animation: ongc-pulse 2s ease-in-out infinite;
}

@keyframes ongc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes ongc-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ongc-glow-pulse {
  0%, 100% { box-shadow: 0 0 12px currentColor; }
  50% { box-shadow: 0 0 20px currentColor; }
}

/* ── Main layout ── */
.ongc-main {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ongc-main-inner {
  flex: 1; min-height: 0; overflow: auto;
}

.ongc-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  height: 100%;
  font-size: var(--ongc-fs-base);
  animation: ongc-fade-up 0.5s ease-out;
}

@media (min-width: 1100px) {
  .ongc-dashboard {
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto minmax(220px, 42vh) auto auto auto auto;
    gap: 0.75rem;
    align-items: stretch;
    height: auto;
    min-height: 100%;
  }
}
@media (min-width: 1400px) {
  .ongc-dashboard { grid-template-columns: 1fr 320px; }
}

.ongc-count-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto;
  gap: 0.5rem;
}
@media (max-width: 1099px) {
  .ongc-count-row {
    grid-template-columns: repeat(9, minmax(7.25rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
}

/* ── Count cards — 4 aligned rows inside each card (icon → label → count → sub) ── */
.ongc-count-card {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  gap: 0.35rem;
  padding: 0.625rem 0.5rem 0.75rem;
  min-width: 0;
  border-radius: 12px !important;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ongc-count-card:hover {
  transform: translateY(-2px);
  background: var(--ongc-glass-hover) !important;
}

.ongc-count-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--count-accent);
  box-shadow: 0 0 14px var(--count-accent);
}

.ongc-count-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  padding: 0 0.15rem;
}

.ongc-count-slot-icon  { min-height: 1.25rem; }
.ongc-count-slot-label { min-height: 1.1rem; }
.ongc-count-slot-value { min-height: 1.35rem; }
.ongc-count-slot-sub   { min-height: 1rem; }

.ongc-count-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--count-accent);
  box-shadow: 0 0 10px var(--count-accent);
}

.ongc-count-icon {
  display: flex; align-items: center; justify-content: center;
  width: 1.125rem; height: 1.125rem;
  color: var(--count-accent);
}
.ongc-count-icon svg { width: 100%; height: 100%; }

.ongc-count-label {
  font-size: var(--ongc-fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ongc-text);
  line-height: 1.2;
}

.ongc-count-value {
  display: block;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--count-accent);
}

.ongc-count-sub {
  font-size: var(--ongc-fs-xs);
  font-weight: 500;
  color: var(--ongc-text-muted);
  line-height: 1.3;
}

.ongc-count-card.accent-green  { --count-accent: var(--glow-green); border-color: rgba(142, 242, 176, 0.18) !important; }
.ongc-count-card.accent-red    { --count-accent: #ff6b6b; border-color: rgba(255, 107, 107, 0.18) !important; }
.ongc-count-card.accent-blue   { --count-accent: var(--glow-blue); border-color: rgba(111, 181, 255, 0.18) !important; }
.ongc-count-card.accent-amber  { --count-accent: var(--glow-amber); border-color: rgba(255, 215, 106, 0.18) !important; }
.ongc-count-card.accent-white  { --count-accent: #e2e8f0; border-color: rgba(226, 232, 240, 0.12) !important; }

.ongc-col-left {
  display: flex; flex-direction: column; gap: 0.75rem; min-height: 0;
}
@media (min-width: 1100px) {
  .ongc-col-left { height: 100%; min-height: 0; }
}

.ongc-col-right { min-height: 0; }
@media (min-width: 1100px) {
  .ongc-col-right {
    display: flex;
    flex-direction: column;
    height: 100%;
    align-self: stretch;
  }
}

/* ── Glass card base ── */
.ongc-card {
  background: var(--ongc-glass) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ongc-glass-border) !important;
  border-radius: 14px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ongc-metric-card.ongc-card {
  border-radius: 10px;
}

/* ── Status summary (legacy) ── */
.ongc-status-card {
  display: flex; overflow: hidden; padding: 0; flex-shrink: 0;
}
.ongc-status-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.25rem; padding: 0.875rem 0.5rem; text-align: center;
}
.ongc-status-value {
  font-size: var(--ongc-fs-2xl); font-weight: 800; line-height: 1;
  color: var(--ongc-text); letter-spacing: -0.02em;
}
.ongc-status-label {
  font-size: var(--ongc-fs-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.ongc-status-item.online .ongc-status-label { color: var(--glow-green); }
.ongc-status-item.offline .ongc-status-label { color: var(--glow-pink); }
.ongc-status-dot {
  width: 7px; height: 7px; border-radius: 50%; margin-bottom: 0.15rem;
}
.ongc-status-item.online .ongc-status-dot {
  background: var(--glow-green);
  box-shadow: 0 0 14px var(--glow-green);
  animation: ongc-pulse 2.5s ease-in-out infinite;
}
.ongc-status-item.offline .ongc-status-dot {
  background: var(--glow-pink);
  box-shadow: 0 0 14px var(--glow-pink);
  animation: ongc-pulse 2.5s ease-in-out infinite;
}
.ongc-status-divider {
  width: 1px; align-self: stretch; margin: 1rem 0;
  background: linear-gradient(180deg, transparent, var(--ongc-glass-border), transparent);
}

/* ── Map ── */
.ongc-map-card {
  display: flex; flex-direction: column; overflow: hidden;
  flex: 1; min-height: 0;
}
.ongc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--ongc-glass-border); flex-shrink: 0;
}
.ongc-panel-head h4 {
  margin: 0; font-size: var(--ongc-fs-sm); font-weight: 700;
  letter-spacing: 0.08em; color: var(--ongc-text-muted);
}
.ongc-map-well-count {
  font-size: var(--ongc-fs-xs);
  font-weight: 600;
  color: var(--glow-blue);
  letter-spacing: 0.04em;
}
.ongc-map-body {
  position: relative;
  flex: 1;
  min-height: 16rem;
  overflow: hidden;
  background: var(--ongc-bg-main);
}
.ongc-leaflet-map {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 16rem;
  background: var(--ongc-bg-main);
}
.ongc-leaflet-map::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(111, 181, 255, 0.55) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: screen;
}
.ongc-map-legend {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--ongc-glass-border);
  background: rgba(2, 11, 23, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ongc-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--ongc-fs-xs);
  font-weight: 600;
  color: var(--ongc-text-muted);
}
.ongc-map-legend-item .ongc-well-marker {
  position: static;
  transform: none;
}

/* Leaflet overrides */
.ongc-leaflet-map .leaflet-container {
  background: var(--ongc-bg-main) !important;
  font-family: 'Inter', system-ui, sans-serif;
}
.ongc-leaflet-map .leaflet-control-zoom {
  border: 1px solid var(--ongc-glass-border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.ongc-leaflet-map .leaflet-control-zoom a {
  background: rgba(2, 11, 23, 0.9) !important;
  color: var(--ongc-text-muted) !important;
  border-color: var(--ongc-glass-border) !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  font-size: 14px !important;
}
.ongc-leaflet-map .leaflet-control-zoom a:hover {
  background: rgba(111, 181, 255, 0.12) !important;
  color: var(--glow-blue) !important;
}
.ongc-leaflet-map .leaflet-popup-content-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  color: var(--ongc-text) !important;
  padding: 0 !important;
}
.ongc-leaflet-map .leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}
.ongc-leaflet-map .leaflet-popup-tip {
  background: rgba(2, 11, 23, 0.96) !important;
  border: 1px solid rgba(110, 231, 183, 0.35) !important;
  box-shadow: none !important;
}

/* Premium well info card (map tooltip) */
.ongc-map-popup {
  min-width: 17.5rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(18, 28, 45, 0.97) 0%, rgba(2, 11, 23, 0.98) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ongc-map-popup--online {
  border: 1px solid rgba(110, 231, 183, 0.45);
}
.ongc-map-popup--offline {
  border: 1px solid rgba(253, 164, 175, 0.45);
}
.ongc-map-popup--alert {
  border: 1px solid rgba(252, 211, 77, 0.45);
}

.ongc-map-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ongc-map-popup-titleblock {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.ongc-map-popup-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(110, 231, 183, 0.12);
  color: #6ee7b7;
}

.ongc-map-popup--offline .ongc-map-popup-pin {
  background: rgba(253, 164, 175, 0.12);
  color: #fda4af;
}
.ongc-map-popup--alert .ongc-map-popup-pin {
  background: rgba(252, 211, 77, 0.12);
  color: #fcd34d;
}

.ongc-map-popup-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ongc-text);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.ongc-map-popup-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--ongc-text-muted);
}

.ongc-map-popup-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ongc-map-popup-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ongc-map-popup-status--online { color: #6ee7b7; }
.ongc-map-popup-status--online i {
  background: #6ee7b7;
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.6);
}

.ongc-map-popup-status--offline { color: #fda4af; }
.ongc-map-popup-status--offline i {
  background: #fda4af;
  box-shadow: 0 0 8px rgba(253, 164, 175, 0.5);
}

.ongc-map-popup-status--alert { color: #fcd34d; }
.ongc-map-popup-status--alert i {
  background: #fcd34d;
  box-shadow: 0 0 8px rgba(252, 211, 77, 0.5);
}

.ongc-map-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}

.ongc-map-metric {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.ongc-map-metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ongc-text-muted);
}

.ongc-map-metric-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ongc-map-metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ongc-text-muted);
  line-height: 1.2;
}

.ongc-map-metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ongc-text);
  line-height: 1.25;
}

.ongc-map-metric-value--online { color: #6ee7b7; }
.ongc-map-metric-value--offline { color: #fda4af; }
.ongc-map-metric-value--alert { color: #fcd34d; }

.ongc-map-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.ongc-map-signal i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: rgba(170, 181, 195, 0.35);
}

.ongc-map-signal i:nth-child(1) { height: 4px; }
.ongc-map-signal i:nth-child(2) { height: 7px; }
.ongc-map-signal i:nth-child(3) { height: 10px; }
.ongc-map-signal i:nth-child(4) { height: 13px; }

.ongc-map-signal i.is-on {
  background: #6ee7b7;
  box-shadow: 0 0 6px rgba(110, 231, 183, 0.45);
}

.ongc-map-popup--offline .ongc-map-signal i.is-on {
  background: #fda4af;
  box-shadow: 0 0 6px rgba(253, 164, 175, 0.4);
}

.ongc-map-popup--alert .ongc-map-signal i.is-on {
  background: #fcd34d;
  box-shadow: 0 0 6px rgba(252, 211, 77, 0.4);
}

/* Well markers */
.ongc-well-marker-wrap {
  background: transparent !important;
  border: none !important;
}
.ongc-well-marker {
  --well-size: 8px;
  display: block;
  width: var(--well-size);
  height: var(--well-size);
  border-radius: 50%;
  position: relative;
  transition: transform 0.2s ease;
}
.ongc-well-marker::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  opacity: 0.45;
  animation: ongc-well-pulse 2.4s ease-in-out infinite;
}
.ongc-well-marker--online {
  background: var(--glow-green);
  box-shadow: 0 0 10px var(--glow-green), 0 0 18px rgba(142, 242, 176, 0.35);
}
.ongc-well-marker--online::before {
  background: radial-gradient(circle, rgba(142, 242, 176, 0.5) 0%, transparent 70%);
}
.ongc-well-marker--offline {
  background: var(--glow-red);
  box-shadow: 0 0 10px var(--glow-red), 0 0 18px rgba(255, 107, 107, 0.35);
}
.ongc-well-marker--offline::before {
  background: radial-gradient(circle, rgba(255, 107, 107, 0.5) 0%, transparent 70%);
}
.ongc-well-marker--alert {
  background: var(--glow-amber);
  box-shadow: 0 0 10px var(--glow-amber), 0 0 18px rgba(255, 215, 106, 0.35);
}
.ongc-well-marker--alert::before {
  background: radial-gradient(circle, rgba(255, 215, 106, 0.5) 0%, transparent 70%);
}
.ongc-well-marker-wrap--active .ongc-well-marker {
  transform: scale(1.35);
}
.ongc-well-marker-wrap--active .ongc-well-marker::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid var(--glow-blue);
  box-shadow: 0 0 14px rgba(111, 181, 255, 0.55);
  animation: ongc-well-ring 1.8s ease-in-out infinite;
}

@keyframes ongc-well-pulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.6); opacity: 0.15; }
}
@keyframes ongc-well-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.12); }
}

@media (min-width: 1100px) {
  .ongc-map-body,
  .ongc-leaflet-map { min-height: 100%; }
}

/* ── Live alerts — full column height on desktop ── */
.ongc-alerts-card {
  display: flex; flex-direction: column; overflow: hidden;
  width: 100%; max-height: 22rem;
}
@media (min-width: 1100px) {
  .ongc-alerts-card {
    flex: 1;
    min-height: 0;
    max-height: none;
    height: 100%;
  }
}

.ongc-alerts-title { display: flex; align-items: center; gap: 0.5rem; }
.ongc-alerts-title h4 {
  font-size: var(--ongc-fs-sm); font-weight: 800;
  letter-spacing: 0.07em; color: var(--ongc-text);
}
.ongc-alerts-title svg { filter: drop-shadow(0 0 8px rgba(255, 215, 106, 0.5)); }

.ongc-alert-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1rem; height: 1rem; padding: 0 0.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ff6b6b, #e53e3e);
  color: #fff; font-size: var(--ongc-fs-xs); font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
}

.ongc-view-all {
  font-size: var(--ongc-fs-sm); font-weight: 600;
  color: var(--glow-blue); text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.ongc-view-all:hover {
  color: var(--glow-cyan);
  text-shadow: 0 0 12px rgba(111, 181, 255, 0.4);
}

.ongc-alerts-list {
  flex: 1; overflow-y: auto; min-height: 0; max-height: 18rem;
}
@media (min-width: 1100px) {
  .ongc-alerts-list { max-height: none; }
}
.ongc-alert-item {
  display: flex; gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--ongc-glass-border);
  transition: background 0.2s ease;
}
.ongc-alert-item:hover { background: rgba(255, 255, 255, 0.03); }
.ongc-alert-item:last-child { border-bottom: none; }

.ongc-alert-dot {
  width: 8px; height: 8px; margin-top: 0.35rem;
  border-radius: 50%; flex-shrink: 0;
}
.ongc-alert-item.high .ongc-alert-dot {
  background: var(--glow-red);
  box-shadow: 0 0 10px var(--glow-red);
}
.ongc-alert-item.med .ongc-alert-dot {
  background: var(--glow-amber);
  box-shadow: 0 0 10px var(--glow-amber);
}
.ongc-alert-item.low .ongc-alert-dot {
  background: var(--glow-green);
  box-shadow: 0 0 10px var(--glow-green);
}

.ongc-alert-msg {
  margin: 0; font-size: var(--ongc-fs-base); font-weight: 500;
  line-height: 1.4; color: var(--ongc-text);
}
.ongc-alert-time {
  margin: 0.15rem 0 0.3rem; font-size: var(--ongc-fs-xs); color: var(--ongc-text-muted);
}
.ongc-alert-tag {
  display: inline-block; font-size: var(--ongc-fs-xs); font-weight: 800; letter-spacing: 0.07em;
}
.ongc-alert-tag.high { color: var(--glow-red); }
.ongc-alert-tag.med  { color: var(--glow-amber); }
.ongc-alert-tag.low  { color: var(--glow-green); }

/* ── All Wells (below map + alerts) ── */
.ongc-all-wells {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ongc-all-wells-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.875rem;
  flex-shrink: 0;
}

.ongc-all-wells-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ongc-text);
  flex-shrink: 0;
}

.ongc-well-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.ongc-well-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ongc-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ongc-well-filter:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ongc-text);
}

.ongc-well-filter.is-active {
  background: rgba(111, 181, 255, 0.12);
  border-color: rgba(147, 197, 253, 0.35);
  color: var(--ongc-text);
}

.ongc-well-filter-count {
  font-size: 10px;
  font-weight: 800;
  color: inherit;
}

.ongc-well-filter[data-filter="flowing"] .ongc-well-filter-count { color: #6ee7b7; }
.ongc-well-filter[data-filter="non-flowing"] .ongc-well-filter-count { color: #fcd34d; }
.ongc-well-filter[data-filter="offline"] .ongc-well-filter-count { color: #fda4af; }
.ongc-well-filter[data-filter="battery"] .ongc-well-filter-count { color: #93c5fd; }

.ongc-well-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
  max-height: 16rem;
  overflow-y: auto;
}

.ongc-well-tile {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.6rem 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--well-border);
  background: linear-gradient(165deg, var(--well-bg-top) 0%, rgba(2, 11, 23, 0.5) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}

.ongc-well-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ongc-well-tile.is-hidden { display: none; }

.ongc-well-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.ongc-well-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: var(--well-icon-bg);
  color: var(--well-accent);
}

.ongc-well-tile-body {
  text-align: left;
}

.ongc-well-tile-id {
  display: block;
  font-size: var(--ongc-fs-sm);
  font-weight: 800;
  color: var(--ongc-text);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.ongc-well-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--well-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.ongc-well-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--well-accent);
  box-shadow: 0 0 8px var(--well-accent);
  animation: ongc-pulse 2s ease-in-out infinite;
}

/* Well tile status — pastel */
.ongc-well-tile--flowing {
  --well-accent: #6ee7b7;
  --well-border: rgba(110, 231, 183, 0.28);
  --well-bg-top: rgba(134, 239, 172, 0.14);
  --well-icon-bg: rgba(167, 243, 208, 0.2);
}

.ongc-well-tile--non-flowing {
  --well-accent: #fcd34d;
  --well-border: rgba(252, 211, 77, 0.28);
  --well-bg-top: rgba(253, 230, 138, 0.14);
  --well-icon-bg: rgba(254, 240, 138, 0.2);
}

.ongc-well-tile--offline {
  --well-accent: #fda4af;
  --well-border: rgba(253, 164, 175, 0.28);
  --well-bg-top: rgba(254, 205, 211, 0.12);
  --well-icon-bg: rgba(254, 205, 211, 0.18);
}

.ongc-well-tile--battery {
  --well-accent: #93c5fd;
  --well-border: rgba(147, 197, 253, 0.28);
  --well-bg-top: rgba(191, 219, 254, 0.12);
  --well-icon-bg: rgba(191, 219, 254, 0.2);
}

/* ── Asset metrics — 7 KPI cards below ALL WELLS ── */
.ongc-metrics-panel {
  grid-column: 1 / -1;
}

.ongc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.ongc-metric-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  min-width: 0;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(var(--metric-rgb), 0.1) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(2, 11, 23, 0.5) 100%) !important;
  border: 1px solid rgba(var(--metric-rgb), 0.2) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ongc-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--metric-rgb), 0.38) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32), 0 0 20px rgba(var(--metric-rgb), 0.08);
}

.ongc-metric-action {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ongc-text-muted);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.ongc-metric-action:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ongc-text);
}

.ongc-metric-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 12px;
  background: var(--metric-icon-bg);
  color: var(--metric-accent);
  box-shadow: 0 0 18px rgba(var(--metric-rgb), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ongc-metric-content {
  flex: 1;
  min-width: 0;
  padding-right: 1.25rem;
}

.ongc-metric-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ongc-text-muted);
  line-height: 1.2;
}

.ongc-metric-value {
  display: block;
  margin: 0.22rem 0 0.12rem;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ongc-text);
}

.ongc-metric-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--metric-rgb), 0.85);
  line-height: 1.25;
}

.metric-blue   { --metric-accent: #60a5fa; --metric-rgb: 96, 165, 250;  --metric-icon-bg: rgba(96, 165, 250, 0.18); }
.metric-green  { --metric-accent: #4ade80; --metric-rgb: 74, 222, 128;  --metric-icon-bg: rgba(74, 222, 128, 0.18); }
.metric-cyan   { --metric-accent: #22d3ee; --metric-rgb: 34, 211, 238;  --metric-icon-bg: rgba(34, 211, 238, 0.16); }
.metric-orange { --metric-accent: #fb923c; --metric-rgb: 251, 146, 60;  --metric-icon-bg: rgba(251, 146, 60, 0.18); }
.metric-purple { --metric-accent: #c084fc; --metric-rgb: 192, 132, 252; --metric-icon-bg: rgba(192, 132, 252, 0.18); }
.metric-yellow { --metric-accent: #facc15; --metric-rgb: 250, 204, 21;  --metric-icon-bg: rgba(250, 204, 21, 0.18); }
.metric-red    { --metric-accent: #f87171; --metric-rgb: 248, 113, 113; --metric-icon-bg: rgba(248, 113, 113, 0.18); }

@media (max-width: 899px) {
  .ongc-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .ongc-metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .ongc-well-grid { max-height: 13.5rem; }
}

@media (max-width: 1099px) {
  .ongc-all-wells-head { flex-direction: column; align-items: stretch; }
  .ongc-well-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.15rem; }
}

@media (max-width: 1099px) {
  .ongc-main { overflow: auto; }
  .ongc-dashboard { height: auto; }
}

/* ── Monitoring charts — 2×2 grid below ALL WELLS ── */
.ongc-charts-panel {
  grid-column: 1 / -1;
}

.ongc-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ongc-chart-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.ongc-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--ongc-glass-border);
}

.ongc-chart-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ongc-text);
  line-height: 1.3;
}

.ongc-chart-sub {
  margin: 0.2rem 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--ongc-text-muted);
  line-height: 1.3;
}

.ongc-chart-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ongc-chart-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--ongc-glass-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ongc-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ongc-chart-action-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ongc-text);
}

.ongc-chart-body {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  min-height: 11rem;
}

.ongc-chart-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ongc-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.ongc-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 10px;
  font-weight: 600;
  color: var(--ongc-text-muted);
}

.ongc-chart-legend-item i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--legend-color, #60a5fa);
  box-shadow: 0 0 8px var(--legend-color, #60a5fa);
}

.ongc-chart-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 8.5rem;
}

.ongc-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.ongc-chart-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  flex-shrink: 0;
  width: 7.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--ongc-glass-border);
}

.ongc-chart-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--ongc-text-muted);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.ongc-chart-stat-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ongc-chart-stat-value small {
  font-size: 0.65em;
  font-weight: 600;
  opacity: 0.75;
}

.ongc-chart-stat-value.stat-green  { color: #4ade80; }
.ongc-chart-stat-value.stat-blue   { color: #60a5fa; }
.ongc-chart-stat-value.stat-yellow { color: #facc15; }
.ongc-chart-stat-value.stat-orange { color: #fb923c; }

@media (max-width: 1099px) {
  .ongc-charts-grid {
    grid-template-columns: 1fr;
  }

  .ongc-chart-body {
    flex-direction: column;
    min-height: auto;
  }

  .ongc-chart-stats {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 0;
    padding-top: 0.75rem;
    border-left: none;
    border-top: 1px solid var(--ongc-glass-border);
  }

  .ongc-chart-stat {
    flex: 1;
    min-width: 6rem;
  }
}

/* ── Well Health + AI Diagnostic cards ── */
.ongc-insight-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ongc-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ongc-insight-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ongc-health-card {
  border-color: rgba(74, 222, 128, 0.22) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(74, 222, 128, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.ongc-ai-card {
  border-color: rgba(96, 165, 250, 0.22) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(96, 165, 250, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.ongc-insight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.ongc-insight-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ongc-glass-border);
}

.ongc-insight-head-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.ongc-insight-head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.ongc-insight-head-icon.icon-green {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.15);
}

.ongc-insight-head-icon.icon-blue {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.15);
}

.ongc-insight-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--ongc-text);
}

.ongc-insight-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ongc-text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.ongc-insight-expand:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ongc-text);
}

.ongc-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.28);
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  flex-shrink: 0;
}

.ongc-ai-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: ongc-pulse 2s ease-in-out infinite;
}

/* Health score card */
.ongc-health-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1rem;
  gap: 1rem;
}

.ongc-health-gauge-wrap {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
}

.ongc-health-gauge {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.35));
}

.ongc-health-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ongc-health-score {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ongc-text);
  letter-spacing: -0.03em;
}

.ongc-health-score-max {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ongc-text-muted);
}

.ongc-health-status-block {
  text-align: center;
}

.ongc-health-status-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ongc-text-muted);
  margin-bottom: 0.35rem;
}

.ongc-health-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ongc-health-status-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: -0.02em;
}

.ongc-health-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.ongc-health-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 1rem 1rem;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.18);
  background: rgba(74, 222, 128, 0.04);
}

.ongc-health-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0 0.35rem;
  min-width: 0;
}

.ongc-health-meta + .ongc-health-meta {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.ongc-health-meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ongc-health-meta-icon.icon-green { color: #4ade80; }
.ongc-health-meta-icon.icon-blue  { color: #60a5fa; }

.ongc-health-meta-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ongc-text-muted);
  line-height: 1.2;
}

.ongc-health-meta-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 11px;
  font-weight: 700;
  color: var(--ongc-text);
  line-height: 1.2;
}

/* AI diagnostic card */
.ongc-ai-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.85rem 1rem 1rem;
}

.ongc-ai-section-title {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.02em;
}

.ongc-ai-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ongc-ai-checklist li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ongc-ai-checklist li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ongc-ai-check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #4ade80;
}

.ongc-ai-check-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ongc-text);
  line-height: 1.35;
}

.ongc-ai-check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ongc-text-muted);
  opacity: 0.6;
}

.ongc-ai-rec-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ongc-ai-rec {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(96, 165, 250, 0.05);
}

.ongc-ai-rec-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

.ongc-ai-rec-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ongc-text);
  line-height: 1.35;
}

.ongc-ai-rec-sub {
  margin: 0.2rem 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--ongc-text-muted);
  line-height: 1.35;
}

/* Page footer — simple copyright bar */
.ongc-page-footer {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--ongc-glass-border);
  text-align: center;
}

.ongc-page-footer p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ongc-text-muted);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

@media (max-width: 1099px) {
  .ongc-insight-grid {
    grid-template-columns: 1fr;
  }

  .ongc-health-footer {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .ongc-health-meta + .ongc-health-meta {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.65rem;
  }
}

/* ── Well List — full width below charts ── */
.ongc-well-list-card {
  margin-top: 0.75rem;
  overflow: hidden;
}

.ongc-well-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--ongc-glass-border);
}

.ongc-well-list-head-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ongc-well-list-head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
  flex-shrink: 0;
}

.ongc-well-list-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--ongc-text);
}

.ongc-well-list-sub {
  margin: 0.2rem 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ongc-text-muted);
}

.ongc-well-list-viewall {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.08);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.ongc-well-list-viewall:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
}

.ongc-well-list-table-head {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr 0.8fr 2.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--ongc-glass-border);
}

.ongc-wl-th {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ongc-text-muted);
}

.ongc-wl-th svg { flex-shrink: 0; opacity: 0.7; }
.ongc-wl-sort { opacity: 0.45; margin-left: 0.15rem; }

.ongc-well-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 1rem 1rem;
  max-height: 22rem;
  overflow-y: auto;
}

.ongc-well-list-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr 0.8fr 2.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--wl-border);
  background: linear-gradient(135deg, var(--wl-bg) 0%, rgba(2, 11, 23, 0.5) 100%);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ongc-well-list-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.ongc-well-list-col {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ongc-wl-icon-box,
.ongc-wl-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--wl-icon-bg);
  color: var(--wl-accent);
  box-shadow: 0 0 16px var(--wl-glow);
  flex-shrink: 0;
}

.ongc-wl-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wl-accent);
  flex-shrink: 0;
}

.ongc-wl-cell-text {
  min-width: 0;
}

.ongc-wl-cell-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--wl-accent);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.ongc-wl-cell-text > span {
  display: block;
  margin-top: 0.1rem;
  font-size: 10px;
  font-weight: 600;
  color: var(--ongc-text-muted);
}

.ongc-wl-sub-status {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
}

.ongc-wl-sub-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wl-accent);
  box-shadow: 0 0 6px var(--wl-accent);
}

.ongc-wl-score-ring {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto;
}

.ongc-wl-score-ring svg {
  width: 100%;
  height: 100%;
}

.ongc-wl-score-ring strong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--wl-accent);
}

.ongc-wl-score-arc {
  stroke: var(--wl-accent);
  filter: drop-shadow(0 0 4px var(--wl-accent));
}

.ongc-wl-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ongc-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ongc-wl-menu:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ongc-text);
}

/* Well list status colors */
.ongc-well-list-row--info {
  --wl-accent: #60a5fa;
  --wl-border: rgba(96, 165, 250, 0.22);
  --wl-bg: rgba(96, 165, 250, 0.08);
  --wl-icon-bg: rgba(96, 165, 250, 0.15);
  --wl-glow: rgba(96, 165, 250, 0.2);
}

.ongc-well-list-row--healthy {
  --wl-accent: #4ade80;
  --wl-border: rgba(74, 222, 128, 0.22);
  --wl-bg: rgba(74, 222, 128, 0.08);
  --wl-icon-bg: rgba(74, 222, 128, 0.15);
  --wl-glow: rgba(74, 222, 128, 0.2);
}

.ongc-well-list-row--warning {
  --wl-accent: #fbbf24;
  --wl-border: rgba(251, 191, 36, 0.22);
  --wl-bg: rgba(251, 191, 36, 0.08);
  --wl-icon-bg: rgba(251, 191, 36, 0.15);
  --wl-glow: rgba(251, 191, 36, 0.2);
}

.ongc-well-list-row--alarm {
  --wl-accent: #f87171;
  --wl-border: rgba(248, 113, 113, 0.22);
  --wl-bg: rgba(248, 113, 113, 0.08);
  --wl-icon-bg: rgba(248, 113, 113, 0.15);
  --wl-glow: rgba(248, 113, 113, 0.2);
}

@media (max-width: 1099px) {
  .ongc-well-list-table-head { display: none; }

  .ongc-well-list-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .ongc-well-list-col-score {
    justify-content: flex-start;
  }

  .ongc-wl-score-ring {
    margin: 0;
  }

  .ongc-wl-menu {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
  }

  .ongc-well-list-row {
    position: relative;
    padding-right: 2.75rem;
  }
}
