:root {
  --ink: #111418;
  --muted: #65717f;
  --line: #d9e0e8;
  --paper: #f5f1ea;
  --panel: #ffffff;
  --blue: #2f80ed;
  --yellow: #ffc400;
  --red: #e53935;
  --green: #16884a;
  --topbar-bg: rgba(248, 250, 252, 0.86);
  --topbar-ink: #1f2a37;
  --nav-pill: rgba(255, 255, 255, 0.72);
  --nav-pill-hover: #e9f8e5;
  --nav-menu-bg: rgba(255, 255, 255, 0.94);
  --shadow-soft: 0 18px 45px rgba(28, 46, 74, 0.12);
}

:root[data-theme="dark"] {
  --ink: #e7edf8;
  --muted: #9aa8bc;
  --line: #26364d;
  --paper: #0e1521;
  --panel: #141e2c;
  --topbar-bg: rgba(14, 21, 33, 0.88);
  --topbar-ink: #edf4ff;
  --nav-pill: rgba(30, 42, 60, 0.78);
  --nav-pill-hover: rgba(40, 74, 52, 0.76);
  --nav-menu-bg: rgba(18, 29, 44, 0.96);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background: radial-gradient(circle at top left, #fff7d4 0, transparent 34%), var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

:root[data-theme="dark"] body {
  background: radial-gradient(circle at top left, rgba(46, 128, 237, 0.18) 0, transparent 35%), var(--paper);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 62px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  color: var(--topbar-ink);
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(22px) saturate(1.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--topbar-ink);
  letter-spacing: -0.02em;
}

.status-bar.loading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-bar.loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2f80ed, #22c55e, rgba(47,128,237,0.08), #2f80ed);
  animation: marketPriceSpin 0.9s linear infinite;
}

body.app-is-busy,
body.app-is-busy * {
  cursor: progress !important;
}

.global-busy-indicator {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 15%, rgba(47,128,237,0.18), transparent 40%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: none;
}

.global-busy-indicator.visible {
  display: inline-flex;
}

.global-busy-indicator strong {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.global-busy-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, #2f80ed, #22c55e, rgba(47,128,237,0.08), #2f80ed);
  position: relative;
  animation: marketPriceSpin 0.9s linear infinite;
}

.global-busy-spinner::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.96);
}

:root[data-theme="dark"] .global-busy-indicator {
  color: #edf4ff;
  background:
    radial-gradient(circle at 18% 15%, rgba(47,128,237,0.24), transparent 40%),
    rgba(18, 29, 44, 0.88);
  border-color: rgba(116, 145, 180, 0.32);
}

:root[data-theme="dark"] .global-busy-spinner::after {
  background: #121d2d;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #21c773, #2f80ed);
  box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
}

.brand-logo-img {
  display: block;
  width: 142px;
  max-width: 18vw;
  height: 34px;
  object-fit: contain;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-wordmark {
  display: grid;
  gap: 1px;
  line-height: 0.95;
}

.brand-selenka {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-enerji {
  color: #718197;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.34em;
}

.brand-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f80ed, #13bba4);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 22px rgba(47, 128, 237, 0.18);
}

.topbar nav,
.ios-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: visible;
  overflow-y: visible;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.ios-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  padding: 8px 11px;
  color: var(--topbar-ink);
  background: var(--nav-pill);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover,
.nav-link.primary {
  color: #2f7d32;
  background: var(--nav-pill-hover);
}

.nav-link.primary:first-child {
  font-weight: 800;
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(21, 32, 54, 0.08);
}

.nav-group {
  position: relative;
  flex: 0 0 auto;
}

.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  padding: 8px 12px;
  color: var(--topbar-ink);
  background: var(--nav-pill);
  font: inherit;
  cursor: pointer;
}

.nav-group-btn b {
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.nav-group.open .nav-group-btn {
  color: #2f7d32;
  background: var(--nav-pill-hover);
}

.nav-group.open .nav-group-btn b {
  transform: rotate(-90deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  display: none;
  min-width: 230px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: var(--nav-menu-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.nav-group.open .nav-menu,
.nav-group:hover .nav-menu {
  display: grid;
  gap: 6px;
}

.nav-menu .nav-link {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.nav-menu .nav-link:hover {
  background: var(--nav-pill-hover);
  box-shadow: none;
}

.actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
  min-width: 0;
  max-width: 46vw;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.actions::-webkit-scrollbar {
  display: none;
}

.user-badge {
  max-width: 170px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1360px) {
  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand-logo-img {
    width: 124px;
    max-width: 22vw;
  }

  .brand-ai-badge {
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .topbar nav,
  .ios-nav {
    gap: 6px;
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
  }

  .ios-nav::-webkit-scrollbar,
  .actions::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .nav-group-btn,
  .actions button {
    min-height: 32px;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 12px;
  }

  .actions {
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .user-badge {
    max-width: 126px;
  }
}

.version-pill {
  min-width: 58px;
  border-color: #373b42;
  background: #15181d;
  color: #ffdd43;
  font-weight: 800;
}

.version-clock-stack {
  display: grid;
  gap: 2px;
  justify-items: stretch;
}

.server-clock-btn {
  min-width: 58px;
  padding: 2px 5px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 7px;
  background: #eef7ff;
  color: #0f5fb8;
  font: 800 10px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.15px;
}

.server-clock-btn:hover { border-color: #0f5fb8; background: #dcefff; }

.server-clock-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f8ff, #f5fffb);
}

.server-clock-settings strong,
.server-clock-settings small { display: block; }
.server-clock-settings small { color: var(--muted); font-size: 12px; }
.server-clock-settings > small { grid-column: 1 / -1; }
.server-clock-settings output { color: #0f5fb8; font: 800 20px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }

:root[data-theme="dark"] .server-clock-btn { background: #122b48; border-color: #2f6a9b; color: #9cd5ff; }
:root[data-theme="dark"] .server-clock-settings { background: linear-gradient(135deg, #152a45, #12362f); border-color: #315a7c; }
:root[data-theme="dark"] .server-clock-settings output { color: #9cd5ff; }

.health-menu-wrap {
  position: relative;
}

.health-top-btn {
  border-color: rgba(37, 99, 235, 0.18);
  border-radius: 13px;
  background: linear-gradient(135deg, #e9f8e5, #dff1ff);
  color: #256c2b;
  box-shadow: 0 8px 20px rgba(47, 128, 237, 0.10);
  font-weight: 800;
}

.ai-agent-top-btn {
  border-color: rgba(47, 128, 237, 0.22);
  border-radius: 13px;
  background: linear-gradient(135deg, #eef6ff, #e9fff5);
  color: #0f5fb8;
  box-shadow: 0 8px 20px rgba(47, 128, 237, 0.12);
  font-weight: 900;
}

:root[data-theme="dark"] .ai-agent-top-btn {
  background: linear-gradient(135deg, #132f55, #12382c);
  color: #eaf6ff;
}

.whatsapp-agent-top-btn {
  border-color: rgba(34, 197, 94, 0.28);
  border-radius: 13px;
  background: linear-gradient(135deg, #ecfdf5, #e0f2fe);
  color: #047857;
  font-weight: 800;
}

:root[data-theme="dark"] .whatsapp-agent-top-btn {
  background: linear-gradient(135deg, #0f3a2d, #12304d);
  color: #d9fff0;
}

:root[data-theme="dark"] .health-top-btn {
  background: linear-gradient(135deg, #123826, #163b62);
  color: #fff;
}

.system-health-popover {
  position: fixed;
  top: 66px;
  right: 12px;
  z-index: 1200;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 88px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(31, 99, 233, 0.14);
  border-radius: 18px;
  background: var(--nav-menu-bg);
  box-shadow: 0 24px 60px rgba(15, 31, 55, 0.22);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.health-recovery-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.health-recovery-entry > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.health-recovery-entry strong { color: #9a3412; font-size: 12px; }
.health-recovery-entry small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.health-recovery-entry button { flex: 0 0 auto; border-color: #fdba74; color: #9a3412; background: #fff7ed; font-weight: 800; }

.system-recovery-modal.hidden { display: none; }

.system-recovery-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 22, 38, 0.46);
  backdrop-filter: blur(9px);
}

.system-recovery-window {
  width: min(900px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff, #f2f9ff 66%, #ecfdf5);
  box-shadow: 0 30px 90px rgba(9, 37, 64, 0.30);
}

.system-recovery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 17px;
  border-bottom: 1px solid #dbeafe;
}

.system-recovery-head small { color: #0f766e; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.system-recovery-head h2 { margin: 4px 0 5px; color: #123a5a; font-size: 24px; }
.system-recovery-head p { max-width: 650px; margin: 0; color: #526a82; font-size: 13px; line-height: 1.5; }
.system-recovery-head > button { flex: 0 0 auto; }

.system-recovery-runtime {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border: 1px solid #c7dff2;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  color: #315574;
  font-size: 12px;
}

.system-recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.system-recovery-start { border-color: #0f766e; background: linear-gradient(135deg, #0f766e, #159a6a); color: #fff; font-weight: 900; }

.system-recovery-notice,
.system-recovery-host-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #79510a;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  line-height: 1.45;
}

.system-recovery-progress { margin-top: 16px; }
.system-recovery-progress-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #bae6fd;
  border-radius: 15px;
  background: linear-gradient(135deg, #effaff, #f0fdf4);
}
.system-recovery-progress-card strong { color: #12425f; }
.system-recovery-progress-card small { color: #5c7185; }
.system-recovery-progress-bar { grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 999px; background: #dbe7ef; }
.system-recovery-progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #22c55e); transition: width .35s ease; }

.system-recovery-steps { display: grid; gap: 8px; margin-top: 14px; }
.system-recovery-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe7ef;
  border-radius: 13px;
  background: rgba(255,255,255,.75);
}
.system-recovery-step-index { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e5eef6; color: #426179; font-size: 11px; font-weight: 900; }
.system-recovery-step strong { display: block; color: #1d405e; font-size: 13px; }
.system-recovery-step small { display: block; margin-top: 2px; color: #6a7d8e; font-size: 11px; }
.system-recovery-step-status { padding: 3px 7px; border-radius: 999px; color: #426179; background: #edf2f7; font-size: 10px; font-weight: 900; white-space: nowrap; }
.system-recovery-step.success .system-recovery-step-status { color: #166534; background: #dcfce7; }
.system-recovery-step.warning .system-recovery-step-status,
.system-recovery-step.skipped_active .system-recovery-step-status { color: #92400e; background: #fef3c7; }
.system-recovery-step.failed .system-recovery-step-status,
.system-recovery-step.timeout .system-recovery-step-status,
.system-recovery-step.force_closed .system-recovery-step-status { color: #991b1b; background: #fee2e2; }

.system-recovery-ai {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid #c7ddf7;
}
.system-recovery-ai strong { color: #0f5fb8; }
.system-recovery-ai span { flex: 1 1 360px; color: #526a82; font-size: 12px; }
.system-recovery-ai button { color: #0f5fb8; border-color: #a8cdf6; background: #fff; font-weight: 800; }

:root[data-theme="dark"] .system-recovery-window { border-color: #315576; background: linear-gradient(145deg, #102033, #132c3a); }
:root[data-theme="dark"] .system-recovery-head { border-color: #315576; }
:root[data-theme="dark"] .system-recovery-head h2,
:root[data-theme="dark"] .system-recovery-step strong { color: #eaf4ff; }
:root[data-theme="dark"] .system-recovery-runtime,
:root[data-theme="dark"] .system-recovery-step { border-color: #315576; background: rgba(16, 36, 55, .88); color: #d7e9f8; }
:root[data-theme="dark"] .system-recovery-head p,
:root[data-theme="dark"] .system-recovery-step small,
:root[data-theme="dark"] .system-recovery-runtime,
:root[data-theme="dark"] .system-recovery-ai span { color: #aac2d4; }

@media (max-width: 640px) {
  .system-recovery-modal { padding: 10px; }
  .system-recovery-window { max-height: calc(100vh - 20px); padding: 16px; border-radius: 18px; }
  .system-recovery-head { gap: 10px; }
  .system-recovery-head h2 { font-size: 20px; }
  .system-recovery-step { grid-template-columns: 25px minmax(0, 1fr); }
  .system-recovery-step-status { grid-column: 2; justify-self: start; }
}

.ai-agent-modal.hidden {
  display: none;
}

.ai-agent-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 30px;
}

.ai-agent-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(47, 128, 237, 0.22), transparent 28%),
    rgba(20, 27, 38, 0.42);
  backdrop-filter: blur(8px) saturate(0.92);
}

.ai-agent-window {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(1040px, calc(100vw - 56px));
  height: min(780px, calc(100vh - 70px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 8%, rgba(47, 128, 237, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 36px 100px rgba(15, 31, 55, 0.30);
}

.ai-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.ai-agent-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-agent-orb {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #2f80ed, #7457ff);
  box-shadow: 0 12px 28px rgba(47, 128, 237, 0.32);
  font-weight: 900;
}

.ai-agent-title strong {
  display: block;
  font-size: 18px;
}

.ai-agent-title small,
.ai-agent-head-actions .ai-agent-model-pill {
  color: var(--muted);
  font-size: 12px;
}

.ai-agent-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-agent-head-actions button,
.ai-agent-model-pill {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 7px 10px;
  background: rgba(246, 250, 255, 0.86);
}

.ai-agent-history {
  overflow-y: auto;
  min-height: 0;
  padding: 22px 26px 24px;
  scroll-behavior: smooth;
}

.ai-agent-daily-synthesis {
  margin: 14px 22px 0;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(246, 250, 255, 0.86);
}

.ai-agent-daily-synthesis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-agent-daily-synthesis-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ai-agent-daily-synthesis-body:empty {
  display: none;
}

.ai-agent-daily-synthesis-text {
  margin: 12px 0 0;
  padding: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-agent-suggested-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ai-agent-suggested-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.06);
}

.ai-agent-suggested-action strong {
  display: block;
  font-size: 13px;
}

.ai-agent-suggested-action small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ai-agent-run-suggested-btn {
  flex: none;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
}

:root[data-theme="dark"] .ai-agent-daily-synthesis {
  background: rgba(20, 30, 45, 0.94);
  border-color: #30445f;
}

:root[data-theme="dark"] .ai-agent-suggested-action {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.4);
}

.ai-agent-empty {
  margin: 70px auto;
  max-width: 560px;
  padding: 28px;
  border: 1px dashed rgba(47, 128, 237, 0.28);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(247, 250, 252, 0.82);
  text-align: center;
}

.ai-agent-message {
  display: grid;
  gap: 14px;
  margin: 0 auto 18px;
  max-width: 850px;
  min-width: 0;
}

.ai-agent-question {
  justify-self: end;
  max-width: min(720px, 86%);
  padding: 12px 15px;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, #2f80ed, #13bba4);
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 128, 237, 0.22);
}

.ai-agent-question small {
  display: block;
  margin-bottom: 5px;
  opacity: 0.78;
  font-size: 11px;
}

.ai-agent-question strong {
  white-space: pre-wrap;
}

.ai-agent-answer {
  width: 100%;
  max-width: 850px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 14px 34px rgba(15, 31, 55, 0.08);
}

.ai-agent-answer pre {
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-agent-answer small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.ai-agent-compose {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 48px;
  align-items: end;
  gap: 10px;
  margin: 0 64px 18px;
  padding: 10px;
  border: 1px solid rgba(47, 128, 237, 0.36);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(47, 128, 237, 0.16);
}

.ai-agent-compose textarea {
  min-height: 42px;
  max-height: 128px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
}

.ai-agent-file-btn,
.ai-agent-compose button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  border: 0;
  background: #eef6ff;
  color: #2f80ed;
  font-weight: 900;
  cursor: pointer;
}

.ai-agent-file-btn input {
  display: none;
}

.ai-agent-compose button {
  background: linear-gradient(135deg, #2f80ed, #13bba4);
  color: #fff;
}

:root[data-theme="dark"] .ai-agent-window {
  border-color: #314762;
  background:
    radial-gradient(circle at 12% 8%, rgba(47, 128, 237, 0.18), transparent 28%),
    rgba(17, 27, 42, 0.98);
}

:root[data-theme="dark"] .ai-agent-head,
:root[data-theme="dark"] .ai-agent-compose,
:root[data-theme="dark"] .ai-agent-answer,
:root[data-theme="dark"] .ai-agent-empty {
  background: rgba(20, 30, 45, 0.94);
  border-color: #30445f;
}

:root[data-theme="dark"] .ai-agent-answer pre,
:root[data-theme="dark"] .ai-agent-title strong {
  color: #f2f7ff;
}

:root[data-theme="dark"] .ai-agent-head-actions button,
:root[data-theme="dark"] .ai-agent-model-pill,
:root[data-theme="dark"] .ai-agent-file-btn {
  background: #172438;
  color: #eaf2ff;
  border-color: #30445f;
}

.theme-toggle-btn {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  color: var(--topbar-ink);
  background: var(--nav-pill);
  font-weight: 700;
}

:root[data-theme="dark"] .feature-card,
:root[data-theme="dark"] .chart-panel,
:root[data-theme="dark"] .learning-panel,
:root[data-theme="dark"] .module-detail,
:root[data-theme="dark"] .modal-panel,
:root[data-theme="dark"] .daily-report-card,
:root[data-theme="dark"] .progress-panel,
:root[data-theme="dark"] .aril-live-table-wrap,
:root[data-theme="dark"] .aril-live-toolbar {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  color: var(--ink);
  background: #0f1826;
  border-color: var(--line);
}

:root[data-theme="dark"] table th,
:root[data-theme="dark"] table td,
:root[data-theme="dark"] .module-table td,
:root[data-theme="dark"] .module-table th {
  border-color: var(--line);
}

:root[data-theme="dark"] table th,
:root[data-theme="dark"] .aril-live-table th {
  color: #aab8cd;
  background: #121d2b;
}

:root[data-theme="dark"] pre,
:root[data-theme="dark"] .job-list {
  color: var(--ink);
  background: #0f1826;
  border-color: var(--line);
}

:root[data-theme="dark"] .status-bar {
  color: #bdebc7;
  background: #10291d;
  border-bottom-color: #1d5c36;
}

:root[data-theme="dark"] button {
  color: #eef5ff;
  background: #182438;
  border-color: #33465f;
}

.whatsapp-agent-window {
  max-width: 760px;
}

.whatsapp-agent-status {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.whatsapp-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.whatsapp-agent-grid article {
  border: 1px solid rgba(125, 174, 221, 0.35);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(236, 253, 245, 0.58));
}

.whatsapp-agent-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.whatsapp-agent-callback {
  border: 1px dashed rgba(14, 116, 144, 0.35);
  border-radius: 16px;
  padding: 12px;
  background: rgba(240, 249, 255, 0.72);
  word-break: break-all;
}

.whatsapp-agent-compose {
  border-top: 1px solid rgba(125, 174, 221, 0.22);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 10px;
  align-items: center;
}

.whatsapp-agent-compose input,
.whatsapp-agent-compose textarea {
  width: 100%;
}

@media (max-width: 760px) {
  .whatsapp-agent-compose {
    grid-template-columns: 1fr;
  }
}

.aril-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.aril-hero-copy {
  flex: 1 1 320px;
  min-width: 260px;
}

.aril-hero-tools {
  flex: 0 1 540px;
  display: grid;
  gap: 12px;
  min-width: 300px;
}

.aril-period-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.aril-period-stack label,
.aril-action-grid button {
  width: 100%;
}

.aril-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

#piyasaSourceList {
  display: grid;
  gap: 8px;
}

#piyasaSourceList div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

#piyasaSourceList span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

#piyasaSourceList strong {
  flex: 0 0 auto;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .aril-period-stack,
  .aril-action-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] button.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.40);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.62), rgba(69, 10, 10, 0.46));
}

:root[data-theme="dark"] button:hover:not([disabled]) {
  background: #20304a;
}

:root[data-theme="dark"] button[disabled] {
  opacity: 0.72;
  color: #8798ad;
  background: #131d2b;
  border-color: #26364d;
  cursor: not-allowed;
}

:root[data-theme="dark"] .gauge-card,
:root[data-theme="dark"] .recommendations,
:root[data-theme="dark"] .ops-grid article {
  color: #eef5ff;
  background:
    radial-gradient(circle at 24% 10%, rgba(47, 128, 237, 0.12), transparent 32%),
    linear-gradient(145deg, #172337, #101a29);
  border-color: #2d3f58;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .gauge-card small,
:root[data-theme="dark"] .signal-card small,
:root[data-theme="dark"] .inline-controls,
:root[data-theme="dark"] .data-stamp {
  color: #d6e0ec;
}

:root[data-theme="dark"] .metric-mini-chart {
  background: radial-gradient(circle at 50% 42%, rgba(96, 165, 250, 0.20), rgba(15, 23, 42, 0.70) 70%);
}

:root[data-theme="dark"] .metric-mini-chart span {
  color: rgba(226, 232, 240, 0.82);
}

:root[data-theme="dark"] .gauge-card strong,
:root[data-theme="dark"] .signal-card strong,
:root[data-theme="dark"] #mwValue,
:root[data-theme="dark"] #coverageValue,
:root[data-theme="dark"] #hourForecast,
:root[data-theme="dark"] #gopForecast {
  color: #f8fafc;
  text-shadow: 0 1px 16px rgba(15, 23, 42, 0.38);
}

:root[data-theme="dark"] .yellow {
  color: #07111f;
}

:root[data-theme="dark"] .yellow small,
:root[data-theme="dark"] .yellow .data-stamp,
:root[data-theme="dark"] .yellow #hourForecastMeta {
  color: #07111f;
}

:root[data-theme="dark"] .yellow strong,
:root[data-theme="dark"] .compact-signal strong,
:root[data-theme="dark"] .compact-signal small {
  color: #07111f;
  text-shadow: none;
}

:root[data-theme="dark"] .blue,
:root[data-theme="dark"] .blue small,
:root[data-theme="dark"] .blue .data-stamp {
  color: #ffffff;
}

:root[data-theme="dark"] #gopSignalCard .data-stamp {
  color: rgba(255, 255, 255, 0.92);
}

:root[data-theme="dark"] .compact-signal .data-stamp {
  color: #07111f;
}

:root[data-theme="dark"] .series-toggle {
  color: #e9f1ff;
  background: #162236;
  border-color: #31445f;
}

:root[data-theme="dark"] .series-toggle.inactive {
  opacity: 0.68;
  color: #8fa0b6;
}

:root[data-theme="dark"] .health-resource-grid article,
:root[data-theme="dark"] .health-company-card {
  color: #eaf2ff;
  background: #182438;
  border: 1px solid #2b3f59;
}

:root[data-theme="dark"] .health-resource-grid span,
:root[data-theme="dark"] .health-company-card small,
:root[data-theme="dark"] .health-loading {
  color: #a7b6cc;
}

:root[data-theme="dark"] .health-company-card strong,
:root[data-theme="dark"] .health-resource-grid strong {
  color: #f1f6ff;
}

:root[data-theme="dark"] .admin-ios-hero,
:root[data-theme="dark"] .admin-ios-launchpad,
:root[data-theme="dark"] .live-hero-card,
:root[data-theme="dark"] .live-summary-grid,
:root[data-theme="dark"] .live-insight-strip,
:root[data-theme="dark"] .ptf-performance-panel {
  color: #edf5ff;
  border-color: #2e425e;
  background:
    radial-gradient(circle at 92% 8%, rgba(47, 128, 237, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(22, 34, 52, 0.98), rgba(15, 25, 40, 0.94));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .admin-ios-hero h1,
:root[data-theme="dark"] .admin-ios-hero h2,
:root[data-theme="dark"] .admin-ios-hero h3,
:root[data-theme="dark"] .live-hero-card h1,
:root[data-theme="dark"] .live-summary-grid strong,
:root[data-theme="dark"] .ptf-performance-panel strong {
  color: #f4f8ff;
}

:root[data-theme="dark"] .admin-ios-hero p,
:root[data-theme="dark"] .admin-ios-hero small,
:root[data-theme="dark"] .admin-ios-hero .eyebrow,
:root[data-theme="dark"] .live-hero-card p,
:root[data-theme="dark"] .live-hero-card small,
:root[data-theme="dark"] .live-kpi-card span,
:root[data-theme="dark"] .live-kpi-card small {
  color: #aabbd2;
}

:root[data-theme="dark"] .admin-ios-card,
:root[data-theme="dark"] .live-kpi-card,
:root[data-theme="dark"] .summary-grid > div {
  color: #eaf2ff;
  border-color: #314762;
  background:
    radial-gradient(circle at 90% 12%, rgba(38, 132, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #19263b, #121d2d);
}

:root[data-theme="dark"] .admin-ios-card strong,
:root[data-theme="dark"] .live-kpi-card strong,
:root[data-theme="dark"] .summary-grid strong {
  color: #f2f7ff;
}

:root[data-theme="dark"] .admin-ios-card span,
:root[data-theme="dark"] .admin-ios-card small,
:root[data-theme="dark"] .summary-grid small,
:root[data-theme="dark"] .summary-grid em {
  color: #a8b7cc;
}

:root[data-theme="dark"] .admin-ios-actions button,
:root[data-theme="dark"] .live-pill-button {
  color: #edf5ff;
  background: rgba(31, 46, 69, 0.82);
  border-color: #334b68;
}

:root[data-theme="dark"] .automation-ios-section,
:root[data-theme="dark"] .settings-group,
:root[data-theme="dark"] .distribution-account-card,
:root[data-theme="dark"] .distribution-plant-card {
  color: #eaf2ff;
  border-color: #314762;
  background:
    radial-gradient(circle at 92% 10%, rgba(38, 132, 255, 0.14), transparent 30%),
    linear-gradient(145deg, #19263b, #121d2d);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .distribution-account-card.default {
  border-color: rgba(55, 214, 139, 0.42);
  background:
    radial-gradient(circle at 92% 10%, rgba(55, 214, 139, 0.13), transparent 30%),
    linear-gradient(145deg, #172b2a, #111e2b);
}

:root[data-theme="dark"] .automation-ios-section strong,
:root[data-theme="dark"] .settings-group summary,
:root[data-theme="dark"] .distribution-account-card strong,
:root[data-theme="dark"] .distribution-plant-card strong {
  color: #f2f7ff;
}

:root[data-theme="dark"] .automation-ios-section small,
:root[data-theme="dark"] .distribution-account-card span,
:root[data-theme="dark"] .distribution-account-card small,
:root[data-theme="dark"] .distribution-plant-card span,
:root[data-theme="dark"] .distribution-plant-card small {
  color: #a8b7cc;
}

:root[data-theme="dark"] .automation-icon {
  background: linear-gradient(145deg, #213554, #18302e);
  color: #6df2a6;
}

:root[data-theme="dark"] .automation-fields label {
  background: rgba(15, 24, 38, 0.72);
  border-color: #2f435e;
}

.health-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.health-popover-head strong {
  color: #1cbf34;
  font-size: 16px;
}

.health-popover-head small {
  color: var(--muted);
  text-align: right;
}

.health-service-list {
  display: grid;
  gap: 7px;
}

.health-service-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

button.health-service-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.health-service-action {
  cursor: pointer;
  border-radius: 10px !important;
  padding: 8px !important;
  transition: background .16s ease, transform .16s ease;
}

.health-service-action:hover,
.health-service-action:focus-visible {
  background: rgba(28, 191, 52, .09);
  outline: 2px solid rgba(28, 191, 52, .24);
  transform: translateX(2px);
}

.operations-center-panel { display: grid; gap: 16px; }
.operations-center-heading { align-items: start; }
.operations-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.operations-summary-card,
.operations-job-card,
.operations-scheduled-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(239,249,255,.7));
  padding: 14px;
}
.operations-summary-card { display: grid; gap: 5px; min-height: 84px; }
.operations-summary-card small,
.operations-summary-card em,
.operations-job-card small,
.operations-scheduled-card small { color: var(--muted); font-style: normal; }
.operations-summary-card strong { color: #123451; font-size: 28px; line-height: 1; }
.operations-summary-card.running { border-color: rgba(30, 144, 255, .4); }
.operations-summary-card.queued { border-color: rgba(245, 158, 11, .5); }
.operations-summary-card.cancel { border-color: rgba(239, 68, 68, .45); }
.operations-summary-card.bad { border-color: rgba(239, 68, 68, .5); }
.operations-center-notice { padding: 12px 14px; border-radius: 12px; background: #fff7df; color: #755307; border: 1px solid #f7d478; font-size: 13px; line-height: 1.45; }
.operations-job-list { display: grid; gap: 10px; }
.operations-job-card { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(140px, .8fr) minmax(160px, 1fr) auto; gap: 12px; align-items: center; }
.operations-job-card > div { display: grid; gap: 3px; min-width: 0; }
.operations-job-card strong { overflow-wrap: anywhere; }
.operations-job-card.running { border-left: 4px solid #1687d1; }
.operations-job-card.queued { border-left: 4px solid #f59e0b; }
.operations-job-card.cancel_requested { border-left: 4px solid #dc2626; }
.operations-job-actions { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; }
.operations-job-actions button { padding: 6px 9px; white-space: nowrap; }
.operations-scheduled-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 10px; }
.operations-scheduled-card { display: grid; gap: 5px; }
.operations-scheduled-card.paused { opacity: .65; border-color: #f59e0b; }
.operations-empty-state { padding: 18px; border: 1px dashed #b8cfe0; border-radius: 12px; color: var(--muted); text-align: center; }
.operations-table-wrap { max-height: 420px; overflow: auto; }
.operations-table-wrap table { min-width: 1050px; }
.operations-table-wrap td { vertical-align: top; max-width: 260px; overflow-wrap: anywhere; }
.operation-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #edf2f7; }
.operation-status.running { color: #075985; background: #e0f2fe; }
.operation-status.queued { color: #92400e; background: #fef3c7; }
.operation-status.cancel_requested,
.operation-status.failed,
.operation-status.timeout { color: #991b1b; background: #fee2e2; }
.operation-status.success { color: #166534; background: #dcfce7; }

@media (max-width: 900px) {
  .operations-summary-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .operations-job-card { grid-template-columns: 1fr 1fr; }
  .operations-job-actions { grid-column: 1 / -1; }
}

.health-service-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.health-service-row.ok .health-service-icon {
  background: #44ce2f;
}

.health-service-row.warn .health-service-icon {
  background: #f59e0b;
}

.health-service-row.bad .health-service-icon {
  background: #ef4444;
}

.health-service-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.health-service-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-service-title small,
.health-service-time {
  color: var(--muted);
  font-size: 11px;
}

.health-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.health-resource-grid article {
  padding: 10px;
  border-radius: 14px;
  background: #eff8ff;
}

.health-resource-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.health-resource-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.health-company-block {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.health-connection-block {
  margin: 4px 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.health-section-head,
.health-connection-top,
.health-company-card > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-section-head {
  justify-content: space-between;
  margin-bottom: 9px;
}

.health-section-head > strong {
  color: #0e5a88;
  font-size: 13px;
}

.health-section-head > small {
  color: var(--muted);
  font-size: 11px;
}

.health-connection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.health-connection-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce7ef;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfdff, #eff8ff);
}

.health-connection-card.ok { border-color: #a7e7c2; }
.health-connection-card.warn { border-color: #f7d68b; }
.health-connection-card.bad { border-color: #f4b6b6; }

.health-connection-top .health-service-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  font-size: 11px;
}

.health-connection-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-connection-card > small {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-status-badge {
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.health-status-badge.ok { background: #dcfce7; color: #15803d; }
.health-status-badge.warn { background: #fef3c7; color: #a16207; }
.health-status-badge.bad { background: #fee2e2; color: #b91c1c; }

.health-company-block > strong {
  display: block;
  margin-bottom: 8px;
  color: #44ce2f;
}

.health-company-list {
  display: grid;
  gap: 10px;
}

.health-company-card {
  padding: 10px;
  border-radius: 12px;
  background: #f7fafc;
}

.health-company-card.ok { border-left: 3px solid #22c55e; }
.health-company-card.warn { border-left: 3px solid #f59e0b; }
.health-company-card.bad { border-left: 3px solid #ef4444; }

.health-company-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.health-company-dot.ok { background: #22c55e; }
.health-company-dot.warn { background: #f59e0b; }

.health-company-card strong {
  display: block;
  font-size: 13px;
}

:root[data-theme="dark"] .health-connection-card {
  background: linear-gradient(145deg, #17263a, #142235);
  border-color: #2d4664;
}

:root[data-theme="dark"] .health-section-head > strong,
:root[data-theme="dark"] .health-connection-top strong {
  color: #eaf2ff;
}

.health-company-card small,
.health-loading {
  color: var(--muted);
  font-size: 12px;
}

button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.55;
  cursor: wait;
}

button.danger {
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.46);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.92), rgba(255, 247, 247, 0.96));
}

button.mini {
  padding: 7px 10px;
  font-size: 12px;
}

.selenka-blue-btn {
  border-color: #0f5fb8;
  background: linear-gradient(135deg, #2f80ed, #0f5fb8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.24);
}

.selenka-blue-btn:hover {
  filter: brightness(1.05);
}

.status-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 30px;
  padding: 7px 22px;
  border-bottom: 1px solid #ecd36a;
  background: #fff5bd;
  color: #5c4700;
  font-size: 13px;
}

.status-bar.error {
  border-color: #ffc4c4;
  background: #fff0f0;
  color: #9b1c1c;
}

.status-bar.ok {
  border-color: #bfe6cd;
  background: #effaf2;
  color: #146b35;
}

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px;
}

.page-panel {
  display: none;
  scroll-margin-top: 86px;
}

.page-panel.active {
  display: block;
}

.production-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.production-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid rgba(42, 111, 151, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(24, 166, 106, 0.22), transparent 34rem),
    linear-gradient(135deg, rgba(8, 33, 61, 0.96), rgba(42, 111, 151, 0.88));
  color: #fff;
  box-shadow: 0 22px 60px rgba(8, 33, 61, 0.16);
}

.production-hero small {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  opacity: 0.72;
}

.production-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.production-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.production-hero button,
.production-form-actions button {
  border: 0;
  border-radius: 18px;
  padding: 12px 18px;
  font-weight: 900;
  color: #07321f;
  background: linear-gradient(135deg, #b8f7dc, #68d8ff);
  box-shadow: 0 14px 34px rgba(11, 99, 206, 0.18);
}

.production-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.production-kpi-grid article {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.production-kpi-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.production-kpi-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--ink);
}

.production-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
}

:root[data-theme="dark"] .production-tabs {
  background: rgba(15, 23, 42, 0.72);
}

.production-tabs button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.production-tabs button.active,
.production-tabs button:hover {
  color: #075033;
  border-color: rgba(24, 166, 106, 0.34);
  background: rgba(24, 166, 106, 0.12);
}

:root[data-theme="dark"] .production-tabs button.active,
:root[data-theme="dark"] .production-tabs button:hover {
  color: #a7f3d0;
}

.production-tab-panel {
  display: none;
}

.production-tab-panel.active {
  display: block;
}

.production-placeholder,
.production-empty,
.production-form-card,
.production-match-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.production-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  color: var(--ink);
}

.production-empty {
  text-align: center;
  color: var(--muted);
}

.production-empty.compact {
  padding: 16px;
}

.production-match-empty {
  display: grid;
  gap: 6px;
  text-align: left;
  border: 1px dashed rgba(11, 99, 206, 0.25);
  border-radius: 18px;
  background: rgba(11, 99, 206, 0.05);
}

.production-match-empty strong {
  color: var(--ink);
}

.production-match-empty span {
  color: var(--muted);
  font-size: 13px;
}

.production-cache-status,
.production-current-match,
.production-candidates {
  margin-top: 12px;
}

.production-match-guidance {
  margin: 12px 0 0;
  border-radius: 16px;
  padding: 12px 14px;
  color: #075985;
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(14, 165, 233, 0.18);
  font-weight: 800;
  font-size: 13px;
}

.production-match-guidance.matched {
  color: #047857;
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.20);
}

.production-cache-grid,
.production-match-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(11, 99, 206, 0.05);
}

.production-cache-note,
.production-cache-error {
  margin-top: 10px;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
}

.production-cache-note {
  color: #075985;
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.production-cache-error {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.10);
  border: 1px solid rgba(244, 63, 94, 0.20);
}

:root[data-theme="dark"] .production-cache-note {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
}

:root[data-theme="dark"] .production-cache-error {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
}

.production-match-info.matched {
  background: rgba(24, 166, 106, 0.08);
  border-color: rgba(24, 166, 106, 0.22);
}

.production-match-info small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.production-match-info strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.production-match-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.production-match-search input {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--input-bg, #fff);
}

.production-score {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #075033;
  background: rgba(24, 166, 106, 0.14);
  font-weight: 900;
}

.production-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.production-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.production-data-grid .production-form-card {
  min-width: 0;
}

.production-advanced-block {
  grid-column: 1 / -1;
  border: 1px solid rgba(11, 99, 206, 0.14);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(11, 99, 206, 0.055), rgba(24, 166, 106, 0.045));
}

.production-advanced-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.production-advanced-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.production-advanced-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.production-advanced-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  white-space: nowrap;
}

.production-advanced-toggle input {
  width: auto !important;
}

.production-epias-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.production-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-form input,
.production-form select,
.production-form textarea,
#productionPlantSearch {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--input-bg, #fff);
  outline: none;
}

.production-form input:focus,
.production-form select:focus,
.production-form textarea:focus,
#productionPlantSearch:focus {
  border-color: rgba(11, 99, 206, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 99, 206, 0.10);
}

.production-form input[readonly],
.production-form select:disabled {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.10);
  cursor: not-allowed;
}

.wide-table td:last-child {
  min-width: 280px;
}

.wide-table td:last-child .tiny-btn {
  margin: 3px 4px 3px 0;
  white-space: nowrap;
}

.production-notes,
.production-form-actions {
  grid-column: 1 / -1;
}

.production-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.production-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.production-badge.ok { color: #047857; background: rgba(16, 185, 129, 0.14); }
.production-badge.warn { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.production-badge.bad { color: #be123c; background: rgba(244, 63, 94, 0.14); }

.muted-row {
  opacity: 0.58;
}

.tiny-btn {
  margin: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--card);
  color: var(--ink);
  font-weight: 800;
}

.danger-outline {
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.28);
}

@media (max-width: 980px) {
  .production-hero,
  .production-kpi-grid,
  .production-form,
  .production-data-grid,
  .production-cache-grid,
  .production-match-info,
  .production-epias-fields,
  .production-match-search {
    grid-template-columns: 1fr;
  }
  .production-advanced-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .production-advanced-toggle {
    width: 100%;
    justify-content: space-between;
    white-space: normal;
  }
  .production-hero {
    flex-direction: column;
  }
}

.hero {
  display: grid;
  grid-template-columns: 180px 180px 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.gauge-card,
.signal-card,
.chart-panel,
.recommendations,
.ops-grid article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(20, 24, 30, 0.07);
}

.gauge-card {
  padding: 16px;
  text-align: center;
  overflow: visible;
}

.mobile-nav-btn {
  display: none;
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  padding: 8px 12px;
  color: var(--topbar-ink);
  background: var(--nav-pill);
  font-weight: 800;
  cursor: pointer;
}

.metric-echart-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  overflow: visible;
}

.metric-mini-chart {
  width: 100%;
  height: 112px;
  min-height: 112px;
  border-radius: 24px;
  overflow: visible;
  position: relative;
  z-index: 2;
  background: radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.10), rgba(226, 232, 240, 0.36) 68%, rgba(255, 255, 255, 0.18));
}

.energy-gauge-tooltip {
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.metric-mini-chart span {
  display: grid;
  place-items: center;
  height: 100%;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 900;
}

.metric-sparkline {
  width: min(220px, 72%);
  height: 64px;
  min-height: 64px;
  margin: 8px auto 0;
  opacity: 0.95;
}

.gauge {
  width: 130px;
  height: 130px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 12px solid #e7e9ed;
  background: conic-gradient(from 220deg, #cb5a3d 0 32%, #eef1f5 32% 100%);
}

.gauge span {
  font-size: 20px;
  font-weight: 800;
}

.capacity {
  background: conic-gradient(from 220deg, #2472d8 0 54%, #eef1f5 54% 100%);
}

.gauge-card strong {
  display: block;
  font-size: 26px;
}

.gauge-card small,
.signal-card small {
  color: var(--muted);
}

.signal-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.signal-card strong {
  margin-top: 12px;
  font-size: 34px;
}

#gopSignalCard strong {
  font-size: 24px;
}

#gopSignalCard .data-stamp,
.compact-signal .data-stamp {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #12333f;
}

.signal-card.trade-buy {
  animation: tradeBuyPulse 1.4s ease-in-out infinite;
}

.signal-card.trade-sell {
  animation: tradeSellPulse 1.4s ease-in-out infinite;
}

@keyframes tradeBuyPulse {
  0%, 100% { box-shadow: 0 14px 28px rgba(36, 114, 216, 0.15); }
  50% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2), 0 18px 34px rgba(22, 163, 74, 0.32); }
}

@keyframes tradeSellPulse {
  0%, 100% { box-shadow: 0 14px 28px rgba(36, 114, 216, 0.15); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.22), 0 18px 34px rgba(220, 38, 38, 0.34); }
}

.compact-signal {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) 1.3fr;
  gap: 14px;
  align-items: start;
  text-align: left;
}

.data-stamp {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.yellow {
  background: linear-gradient(135deg, #ffd629, #ffb300);
}

.blue {
  background: linear-gradient(135deg, #3f92ff, #1f6fe5);
  color: #fff;
}

.blue small {
  color: rgba(255, 255, 255, 0.8);
}

.chart-panel,
.recommendations,
.ops-grid {
  margin-top: 20px;
}

.chart-panel {
  position: relative;
  padding: 18px;
}

.chart-settings-anchor {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
}

.chart-settings-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  border: 2px solid #f59e0b;
  background: #fffdf4;
  color: #9a5b00;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.18);
}

.chart-settings-btn:hover,
.chart-settings-btn[aria-expanded="true"] {
  background: #f59e0b;
  color: #fff;
}

.chart-settings-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: min(520px, calc(100vw - 34px));
  max-height: min(74vh, 720px);
  overflow: auto;
  padding: 14px;
  border: 1px solid #bfd8e8;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 24px 55px rgba(15, 45, 68, 0.24);
}

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

.chart-settings-popover > header,
.chart-settings-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.chart-settings-popover > header { justify-content: flex-end; min-height: 24px; }
.chart-settings-section strong { display: block; }
.chart-settings-section > .hint { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }

.icon-close-btn {
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  font-size: 20px;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chart-settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.chart-settings-fields label,
.chart-settings-section label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.chart-settings-fields select { width: 100%; }

.chart-settings-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(110, 142, 165, 0.25);
}

.link-button {
  min-width: 0;
  padding: 2px 0;
  color: #0f766e;
  background: transparent;
  border: 0;
  text-decoration: underline;
  font-weight: 700;
}

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

.chart-series-setting {
  display: grid !important;
  grid-template-columns: auto 18px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(110, 142, 165, 0.28);
  border-radius: 10px;
  background: #f8fbfd;
  color: var(--ink) !important;
}

.chart-series-setting.inactive { opacity: 0.58; }
.chart-series-setting.selected-bot-line { border-color: rgba(0, 168, 107, 0.55); background: #edfff7; }
.chart-series-setting input[type="checkbox"] { width: 15px; height: 15px; margin: 0; }
.chart-series-setting input[type="color"] { width: 30px; height: 26px; padding: 1px; border: 0; background: transparent; cursor: pointer; }
.chart-series-setting > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.chart-series-swatch { width: 18px; height: 4px; border-radius: 999px; background: var(--series-color); }

.chart-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.chart-settings-actions button { font-size: 12px; }

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

textarea {
  font-family: Consolas, "Courier New", monospace;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

canvas {
  width: 100%;
  height: 420px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.chart-wrap {
  position: relative;
}

.dashboard-hourly-chart {
  width: 100%;
  height: 460px;
  min-height: 380px;
}

@media (max-width: 760px) {
  .dashboard-hourly-chart {
    height: 390px;
    min-height: 330px;
  }
}

.hidden {
  display: none !important;
}

body.auth-locked .topbar,
body.auth-locked .status-bar {
  display: none !important;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 14% 18%, rgba(29, 191, 115, 0.18), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(47, 128, 237, 0.30), transparent 32%),
    linear-gradient(145deg, #07111d, #0f2941 52%, #113255);
}

.login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid rgba(138, 168, 203, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 10%, rgba(47, 128, 237, 0.18), transparent 28%),
    linear-gradient(160deg, rgba(8, 20, 33, 0.96), rgba(12, 36, 58, 0.94));
  box-shadow: 0 30px 70px rgba(4, 10, 20, 0.34);
  backdrop-filter: blur(16px);
}

.login-card h1 {
  margin: 4px 0;
  font-size: 32px;
  color: #f7fbff;
}

.login-card p,
.login-card small,
.login-card label {
  color: #b8c8d9;
}

.login-brand-block {
  display: grid;
  gap: 10px;
}

.login-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(209, 222, 238, 0.72);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.10);
}

.login-brand-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #2f80ed, #13bba4);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 16px 32px rgba(47, 128, 237, 0.26);
}

.login-logo-img {
  display: block;
  width: 100%;
  max-height: 74px;
  object-fit: contain;
}

.login-ai-badge {
  display: inline-grid;
  min-width: 48px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #00589f, #14b98f);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.login-brand-copy {
  display: grid;
  gap: 2px;
}

.login-brand-title {
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.login-brand-subtitle {
  color: #92a4ba;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
}

.login-brand-subtitle b {
  color: #ffffff;
  letter-spacing: 0.16em;
}

.login-card input {
  background: rgba(248, 252, 255, 0.96);
}

.login-text-action {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #77d7cc;
  font-size: 13px;
  font-weight: 700;
}

.login-text-action:hover { color: #b6fff5; text-decoration: underline; }

.password-reset-panel {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(116, 220, 200, 0.34);
  border-radius: 16px;
  background: rgba(11, 54, 72, 0.52);
}

.password-reset-panel p,
.password-reset-message { margin: 0; font-size: 12px; line-height: 1.45; color: #c6d6e4; }
.password-reset-confirm { display: grid; gap: 10px; padding-top: 4px; }
.password-reset-message.ok { color: #8de3be; }
.password-reset-message.error { color: #ffb4ac; }

.login-meta {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(160, 187, 214, 0.18);
  color: #94a6bb;
  font-size: 12px;
}

.gip-market-card {
  border: 1px solid rgba(16, 185, 129, .45);
  background: linear-gradient(135deg, #0f766e 0%, #0b9f78 52%, #24b36b 100%);
  color: #fff;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
  gap: 8px;
}
.gip-market-card small, .gip-market-card .data-stamp { color: rgba(255,255,255,.82); }
.gip-market-card strong { margin: 0; font-size: 30px; }
.gip-market-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(5, 150, 105, .28); }
.gip-market-card-head { display:flex; justify-content:space-between; gap:12px; font-size:12px; font-weight:800; }
.gip-market-mini-rows { max-height: 88px; overflow-y:auto; padding-right:4px; }
.gip-mini-row { display:grid; grid-template-columns:42px 1fr 1.45fr; gap:6px; align-items:center; font-size:11px; padding:4px 0; border-top:1px solid rgba(255,255,255,.18); }
.gip-mini-row i { font-style:normal; font-size:10px; color:rgba(255,255,255,.88); white-space:nowrap; }
.gip-market-hero { display:flex; justify-content:space-between; gap:22px; align-items:center; padding:28px 32px; border:1px solid #b7d8f7; border-radius:26px; background:linear-gradient(120deg,#f8fffd,#e5f5ff); }
.gip-market-hero h1 { margin:4px 0 8px; color:#0f2e4d; }
.gip-market-hero p { margin:0; color:#49657f; max-width:720px; }
.gip-market-detail-card { margin-top:18px; }
.gip-market-table td { white-space:nowrap; }
.gip-source-control { display:grid; gap:4px; color:#36556d; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }.gip-source-control select { min-width:126px; padding:7px 9px; border:1px solid #b9d7ea; border-radius:10px; background:#fff; color:#12344f; font:inherit; text-transform:none; letter-spacing:0; }
.gip-date-control { display:grid; gap:4px; color:#36556d; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }.gip-date-control input { min-width:142px; min-height:32px; padding:6px 8px; border:1px solid #b9d7ea; border-radius:10px; background:#fff; color:#12344f; font:inherit; text-transform:none; letter-spacing:0; }
.gip-buy-price { color:#087a48; font-weight:800; }
.gip-sell-price { color:#c2410c; font-weight:800; }
.gip-direction { display:inline-flex; padding:4px 7px; border-radius:999px; font-size:11px; font-weight:850; }.gip-direction.surplus { color:#0b6b47; background:#e3f8eb; }.gip-direction.shortage { color:#b54708; background:#fff1e8; }.gip-direction.balanced { color:#315878; background:#eaf4fb; }.gip-direction.unknown { color:#64748b; background:#f1f5f9; }
.gip-contract-row { cursor:pointer; }
.gip-contract-row:hover td { background:#f0f9ff; }
.gip-market-table td.gip-cell-up { animation:gipCellUp 1.8s ease-out; }
.gip-market-table td.gip-cell-down { animation:gipCellDown 1.8s ease-out; }
.gip-market-table td.gip-cell-changed { animation:gipCellChanged 1.8s ease-out; }
@keyframes gipCellUp { 0% { background:#baf3d0; color:#075c37; box-shadow:inset 0 0 0 1px #34b978; } 100% { background:inherit; color:inherit; box-shadow:none; } }
@keyframes gipCellDown { 0% { background:#ffd0c7; color:#9a2f18; box-shadow:inset 0 0 0 1px #eb765f; } 100% { background:inherit; color:inherit; box-shadow:none; } }
@keyframes gipCellChanged { 0% { background:#fff0ad; color:#765600; box-shadow:inset 0 0 0 1px #e7bd36; } 100% { background:inherit; color:inherit; box-shadow:none; } }
.gip-contract-link { border:0; padding:0; background:transparent; color:#0f5da8; font-weight:900; cursor:pointer; text-decoration:underline; }
.modal { position:fixed; inset:0; z-index:10050; display:grid; place-items:center; padding:24px; background:rgba(8,24,42,.36); backdrop-filter:blur(12px) saturate(1.1); }
.modal-card { position:relative; width:min(1120px,96vw); border:1px solid rgba(151,204,240,.85); border-radius:26px; background:linear-gradient(145deg,#ffffff 0%,#eff9ff 100%); box-shadow:0 30px 80px rgba(11,39,67,.3); color:var(--ink); }
.gip-depth-modal-card { max-height:88vh; overflow:hidden; display:flex; flex-direction:column; padding:24px; }
.gip-depth-modal-card .modal-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.gip-depth-modal-card h2 { margin:4px 0; }.gip-depth-modal-card p { margin:0; color:var(--muted); }
.gip-depth-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.gip-depth-summary > div { padding:13px; border:1px solid #d8e7f3; border-radius:15px; background:#f8fcff; }.gip-depth-summary > div:first-child strong { color:#087a48; }.gip-depth-summary > div:nth-child(2) strong { color:#c2410c; }.gip-depth-summary small,.gip-depth-summary strong { display:block; }.gip-depth-summary strong { margin-top:4px; color:#0f2e4d; }
.gip-depth-grids { display:grid; grid-template-columns:1fr 1fr; gap:16px; min-height:0; }.gip-depth-grids section { min-width:0; }.gip-depth-grids h3 { margin:0 0 8px; font-size:15px; }
.gip-depth-scroll { max-height:46vh; overflow:auto; border:1px solid #d8e7f3; border-radius:15px; }.gip-depth-scroll table { min-width:620px; }
.depth-loading { min-height:180px; display:grid; place-items:center; padding:18px; color:#315878; font-weight:700; background:linear-gradient(120deg,#f7fcff,#e9f7ff,#f7fcff); background-size:200% 100%; animation:gipDepthShimmer 1.25s linear infinite; }
.depth-history-note { min-height:180px; display:grid; place-items:center; padding:20px; text-align:center; line-height:1.55; color:#315878; border:1px dashed #b7d6ed; border-radius:15px; background:#f8fcff; }
@keyframes gipDepthShimmer { to { background-position:-200% 0; } }

/* GIP Faz 2: mevcut render hedeflerini koruyan yoğun masaustu operasyon yerlesimi. */
.gip-workspace { display:grid; gap:14px; min-width:0; color:#18354f; }
.gip-toolbar { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:18px 20px; border:1px solid #b8d8eb; border-radius:18px; background:linear-gradient(118deg,#fdfefe 0%,#eef8ff 58%,#eaf8f1 100%); box-shadow:0 12px 30px rgba(24,73,105,.08); }
.gip-toolbar-title { min-width:0; }.gip-toolbar-title h1 { margin:3px 0 5px; color:#113a5d; font-size:24px; letter-spacing:-.03em; }.gip-toolbar-title p { max-width:650px; margin:0; color:#587087; font-size:13px; line-height:1.45; }
.gip-toolbar-controls { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:flex-end; gap:8px 10px; max-width:680px; }
.gip-toolbar-status { display:grid; gap:2px; min-width:156px; padding:8px 10px; border-left:2px solid #76b8e2; }.gip-toolbar-status strong { color:#1f4b6b; font-size:11px; line-height:1.25; font-variant-numeric:tabular-nums; }
.gip-toolbar-label,.gip-section-kicker { color:#66829a; font-size:10px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.gip-source-control { min-width:135px; }.gip-source-control select { min-width:145px; }
.gip-source-note { flex:0 1 220px; color:#577088; font-size:11px; line-height:1.3; }
.gip-toolbar-actions { display:flex; gap:7px; }.gip-toolbar-actions button { white-space:nowrap; }
.gip-realized-summary { display:grid; grid-template-columns:minmax(220px,1.35fr) repeat(4,minmax(150px,1fr)); gap:10px; padding:11px 13px; border:1px solid #c9dfe9; border-radius:14px; background:linear-gradient(105deg,#f7fcff,#edf8f3); box-shadow:0 1px 2px rgba(25,45,57,.06); }
.gip-realized-title,.gip-realized-card { display:grid; gap:4px; min-width:0; padding:8px 10px; border-left:2px solid #74b9dc; }
.gip-realized-title strong,.gip-realized-card strong { color:#193d56; font-size:14px; font-variant-numeric:tabular-nums; }.gip-realized-title small,.gip-realized-card small { color:#657d8f; font-size:10px; line-height:1.35; }
.gip-realized-card > span { color:#66829a; font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }.gip-realized-net { border-left-color:#159669; background:rgba(255,255,255,.45); }.gip-realized-net strong.positive { color:#087f59; }.gip-realized-net strong.negative { color:#bf3b32; }
.gip-status-badge { display:inline-flex; align-items:center; justify-content:center; min-height:28px; padding:5px 9px; border:1px solid #b9d9e9; border-radius:999px; background:#f6fbff; color:#285d7f; font-size:10px; font-weight:850; line-height:1; white-space:nowrap; }
.gip-main-grid { display:grid; grid-template-columns:minmax(0,3fr) minmax(300px,1fr); gap:14px; align-items:start; min-width:0; }
.gip-contract-area,.gip-side-panel,.gip-activity-panel,.gip-bottom-area { min-width:0; border:1px solid #c7deeb; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(31,77,109,.06); }
.gip-contract-area { display:flex; flex-direction:column; min-height:520px; overflow:hidden; }
.gip-section-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 15px; border-bottom:1px solid #deebf2; background:linear-gradient(100deg,#fbfdff,#f2f9fd); }.gip-section-head h2 { margin:2px 0 0; color:#153a59; font-size:15px; }
.gip-position-readout { display:grid; gap:2px; text-align:right; }.gip-position-readout span { color:#647f93; font-size:10px; }.gip-position-readout strong { color:#113a5d; font-size:18px; font-variant-numeric:tabular-nums; }
.gip-contract-head-actions { position:relative; display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.gip-column-chooser { position:absolute; z-index:12; top:calc(100% + 8px); right:0; display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)); gap:5px 12px; width:min(420px,92vw); max-height:400px; padding:13px; overflow:auto; border:1px solid #bcd9e9; border-radius:14px; background:rgba(255,255,255,.98); box-shadow:0 18px 42px rgba(21,58,89,.2); }
.gip-column-chooser-title { grid-column:1/-1; display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:1px 3px 7px; border-bottom:1px solid #dbeaf2; color:#1c4767; }.gip-column-chooser-title strong { font-size:12px; }.gip-column-chooser-title small { color:#6b8598; font-size:9px; }.gip-column-chooser-all { grid-column:1/-1; justify-self:start; min-height:28px; padding:4px 9px; border:1px solid #b8d9e9; border-radius:8px; background:#eef9f5; color:#167152; font-size:10px; font-weight:800; }
.gip-column-chooser label { display:flex; align-items:center; gap:8px; min-height:31px; padding:5px 7px; border-radius:8px; color:#294d67; font-size:11px; font-weight:750; cursor:pointer; }
.gip-column-chooser label:hover { background:#eef8fd; }.gip-column-chooser input { margin:0; accent-color:#158c83; }.gip-column-hidden { display:none!important; }
.gip-contract-scroll { min-height:0; flex:1; overflow:hidden; }.gip-contract-scroll .gip-market-table { height:100%; max-height:calc(100vh - 320px); min-height:390px; margin:0; border:0; border-radius:0; overflow:auto; overscroll-behavior:contain; scroll-behavior:smooth; }
.gip-market-table table { min-width:1510px; border-collapse:separate; border-spacing:0; font-size:11px; }.gip-market-table th { position:sticky; top:0; z-index:3; padding:8px 9px; border-bottom:1px solid #bfd9e8; background:#eaf5fb; color:#244b68; font-size:10px; font-weight:850; text-align:left; white-space:nowrap; }.gip-market-table td { height:30px; padding:5px 9px; border-bottom:1px solid #e5eef4; color:#213e55; vertical-align:middle; text-align:right; font-variant-numeric:tabular-nums; }.gip-market-table td[data-gip-column="hour"],.gip-market-table td[data-gip-column="contract"],.gip-market-table td[data-gip-column="status"],.gip-market-table td[data-gip-column="direction"] { text-align:left; }
.gip-market-table th:nth-child(1),.gip-market-table td:nth-child(1) { position:sticky; left:0; z-index:2; background:#fff; box-shadow:2px 0 0 #e4eef4; }.gip-market-table th:nth-child(2),.gip-market-table td:nth-child(2) { position:sticky; left:128px; z-index:2; background:#fff; box-shadow:2px 0 0 #e4eef4; }.gip-market-table th:nth-child(1),.gip-market-table th:nth-child(2) { z-index:4; background:#eaf5fb; }.gip-contract-row:hover td,.gip-contract-row:focus-within td { background:#edf8ff; }.gip-contract-row:hover td:nth-child(1),.gip-contract-row:hover td:nth-child(2),.gip-contract-row:focus-within td:nth-child(1),.gip-contract-row:focus-within td:nth-child(2) { background:#edf8ff; }
.gip-contract-row.gip-contract-past td { background:#fafbfc; color:#708195; }.gip-contract-row.gip-contract-open td { border-left:3px solid #2c9c7f; }.gip-contract-row.gip-contract-current td { background:#e8f7ff; box-shadow:inset 0 1px 0 #73bfe5, inset 0 -1px 0 #73bfe5; }.gip-contract-row.gip-contract-current td:nth-child(1),.gip-contract-row.gip-contract-current td:nth-child(2) { background:#e8f7ff; }.gip-contract-row.gip-contract-upcoming td { background:#f9fcff; }.gip-contract-row.gip-contract-selected td { background:#e1f4ff; outline:1px solid #6eadd4; }.gip-contract-status { display:inline-flex; gap:5px; align-items:center; font-size:10px; }.gip-contract-status::before { content:""; width:7px; height:7px; border-radius:50%; background:#7891a4; }.gip-contract-status.open::before { background:#21845f; }.gip-contract-status.past::before { background:#708195; }.gip-contract-status.upcoming::before { background:#4686bd; }
.gip-market-table small { color:#678096; font-size:9px; white-space:nowrap; }.gip-contract-link { font-size:11px; }.gip-safety-note { margin:0; padding:10px 14px; border-top:1px solid #e0edf4; background:#fffaf0; color:#786023; font-size:11px; line-height:1.4; }
.gip-system-direction { display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border-radius:999px; font-size:10px; font-weight:800; white-space:nowrap; }.gip-system-direction.energy_deficit { background:#fff0ec; color:#b8442c; }.gip-system-direction.energy_surplus { background:#eaf9f1; color:#16734f; }.gip-system-direction.balanced { background:#edf5fb; color:#3a6682; }.gip-own-position { color:#315d79; font-weight:750; white-space:nowrap; }
.gip-side-column { display:grid; gap:14px; min-width:0; }.gip-side-panel,.gip-activity-panel { padding:14px; }.gip-depth-header { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; }.gip-depth-header h2 { margin:2px 0 4px; color:#153a59; font-size:16px; }.gip-depth-header p { margin:0; color:#607b91; font-size:11px; line-height:1.4; }
.gip-order-draft { border-color:#b7ded2; background:linear-gradient(155deg,#ffffff 0%,#f0fbf6 100%); }.gip-draft-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }.gip-draft-head h2 { margin:2px 0 0; color:#164a3d; font-size:17px; }.gip-draft-badge { border-color:#9bd6bd; background:#e8f8ee; color:#176044; }.gip-draft-hint { min-height:31px; margin:7px 0 10px; color:#52776c; font-size:11px; line-height:1.4; }.gip-draft-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.gip-draft-grid label { display:grid; gap:4px; color:#54746a; font-size:10px; font-weight:800; }.gip-draft-grid input,.gip-draft-grid select { width:100%; min-height:33px; border:1px solid #b9ddcf; border-radius:8px; background:#fff; color:#173f34; font-size:12px; }.gip-draft-impact { display:grid; gap:4px; margin-top:10px; padding:9px; border:1px solid #c8e8d9; border-radius:10px; background:rgba(255,255,255,.78); color:#315f50; font-size:10px; line-height:1.35; }.gip-draft-impact strong { color:#164a3d; font-size:11px; }.gip-draft-impact small { color:#6a887e; font-size:9px; }.gip-draft-actions { display:grid; grid-template-columns:1fr 1.2fr 1fr; gap:7px; margin-top:10px; }.gip-draft-actions button { min-height:34px; padding:6px; font-size:10px; }.gip-draft-actions .primary { border-color:#0b8d75; background:#078b78; color:#fff; }
.gip-depth-columns { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }.gip-depth-columns > div { min-width:0; }.gip-depth-columns h3 { margin:0 0 6px; color:#2e4d65; font-size:12px; }.gip-depth-column-head,.gip-depth-modal-columns { display:grid; grid-template-columns:1.2fr .8fr 1fr; gap:5px; padding:7px; border:1px solid #d8e7f1; border-radius:8px 8px 0 0; background:#f2fbf6; color:#216544; font-size:9px; font-weight:850; }.gip-depth-column-head span:nth-child(n+2),.gip-depth-modal-columns span:nth-child(n+2) { text-align:right; }.gip-depth-column-head.gip-sell,.gip-depth-modal-columns.gip-sell { background:#fff7f4; color:#a64a2a; }.gip-depth-columns .gip-empty-state { min-height:70px; border-top:0; border-radius:0 0 8px 8px; font-size:10px; }
.gip-depth-chart { display:grid; min-height:218px; height:218px; margin-top:12px; place-items:center; overflow:hidden; border:1px solid #c9e0ee; border-radius:10px; background:linear-gradient(135deg,#fbfdff,#f2f9fc); color:#688198; font-size:10px; text-align:center; line-height:1.4; }.gip-depth-chart .gip-empty-state { width:100%; min-height:100%; border:0; }.gip-activity-panel { min-height:140px; }.gip-activity-panel .gip-section-head { margin:-14px -14px 0; padding:11px 14px; }.gip-activity-list { padding-top:10px; }
.gip-bottom-area { overflow:hidden; }.gip-detail-tabs { display:flex; align-items:center; gap:0; overflow-x:auto; border-bottom:1px solid #dcebf3; background:#f8fcff; }.gip-detail-tabs button { flex:0 0 auto; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:#5d7890; font-size:12px; font-weight:800; padding:11px 15px; }.gip-detail-tabs button:hover { background:#eff8fd; color:#204e70; }.gip-detail-tabs button.active { border-bottom-color:#1185b6; color:#0c527b; background:#fff; }.gip-bottom-content { min-height:92px; padding:12px; }
.gip-empty-state { display:grid; min-height:84px; place-items:center; padding:14px; border:1px dashed #c2dbe9; border-radius:10px; background:#fbfdff; color:#668198; font-size:11px; line-height:1.45; text-align:center; }
.gip-side-data-time,.gip-side-depth-message { margin-top:9px; padding:7px 9px; border-radius:8px; background:#f6fbfe; color:#59758c; font-size:10px; line-height:1.35; }.gip-side-depth-message { border-left:3px solid #8dc5e6; }
.gip-side-ptf { display:grid; grid-template-columns:1fr auto; gap:2px 10px; align-items:center; margin-top:9px; padding:9px 10px; border:1px solid #cde4ef; border-radius:10px; background:linear-gradient(105deg,#f8fcff,#eef9f6); }.gip-side-ptf span { color:#607c91; font-size:10px; font-weight:800; }.gip-side-ptf strong { color:#173f5d; font-size:15px; font-variant-numeric:tabular-nums; }.gip-side-ptf small { grid-column:1/-1; color:#71889a; font-size:9px; }
.gip-side-depth-table { max-height:210px; overflow:auto; border:1px solid #d8e7f1; border-top:0; border-radius:0 0 8px 8px; }.gip-side-depth-table table { width:100%; border-collapse:collapse; font-size:10px; }.gip-side-depth-table td { padding:6px; border-bottom:1px solid #e5eef4; text-align:right; font-variant-numeric:tabular-nums; }.gip-side-depth-table tbody tr:last-child td { border-bottom:0; }.gip-side-depth-table .gip-empty-state { min-height:70px; }
.gip-price-vs-ptf { position:relative; isolation:isolate; overflow:hidden; font-weight:850; }.gip-price-vs-ptf::before { content:""; position:absolute; z-index:-1; top:2px; bottom:2px; width:var(--gip-price-gap,8%); max-width:100%; border-radius:5px; opacity:.18; }.gip-price-vs-ptf.below { color:#08764f; }.gip-price-vs-ptf.below::before { right:2px; background:#12a66f; }.gip-price-vs-ptf.above { color:#b4432c; }.gip-price-vs-ptf.above::before { left:2px; background:#ef6245; }.gip-price-vs-ptf.equal { color:#315b76; }.gip-price-vs-ptf.equal::before { inset-inline:2px; width:auto; background:#5aa1c9; }
.gip-activity-item { display:grid; grid-template-columns:auto 1fr; gap:7px; padding:8px 0; border-bottom:1px solid #e6eff5; color:#557187; font-size:10px; line-height:1.35; }.gip-activity-item:last-child { border-bottom:0; }.gip-activity-item time { color:#6a8498; font-variant-numeric:tabular-nums; white-space:nowrap; }.gip-activity-item strong { display:block; color:#284c67; font-size:11px; }.gip-activity-item.warn strong { color:#a45a22; }.gip-activity-item.error strong { color:#a23f3f; }.gip-activity-item.ok strong { color:#267154; }
.gip-detail-grid { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:10px; }.gip-detail-grid > div { padding:10px; border:1px solid #dbeaf3; border-radius:10px; background:#fbfdff; }.gip-detail-grid small,.gip-detail-grid strong { display:block; }.gip-detail-grid small { color:#698399; font-size:10px; }.gip-detail-grid strong { margin-top:4px; color:#173c59; font-size:13px; font-variant-numeric:tabular-nums; }.gip-detail-note { margin:0; color:#58748a; font-size:11px; line-height:1.45; }.gip-detail-tabs button:focus-visible,.gip-contract-row:focus-visible { outline:2px solid #1c86bc; outline-offset:-2px; }
@media (max-width:1024px) { .gip-detail-grid { grid-template-columns:repeat(3,minmax(120px,1fr)); } }
@media (max-width:760px) { .gip-detail-grid { grid-template-columns:repeat(2,minmax(120px,1fr)); }.gip-side-depth-table { max-height:180px; } }
.gip-depth-modal-card { width:min(1180px,96vw); }.gip-depth-modal-card .gip-depth-modal-columns { margin-bottom:0; border-bottom:0; }.gip-depth-modal-card .gip-depth-scroll { border-radius:0 0 15px 15px; }.gip-depth-modal-chart { min-height:58px; margin-top:14px; }
@media (max-width:1366px) { .gip-toolbar { align-items:flex-start; }.gip-toolbar-controls { max-width:560px; }.gip-main-grid { grid-template-columns:minmax(0,2.55fr) minmax(280px,1fr); }.gip-contract-scroll .gip-market-table { min-height:330px; max-height:calc(100vh - 280px); } }
@media (max-width:1024px) { .gip-toolbar { flex-direction:column; }.gip-toolbar-controls { max-width:none; width:100%; justify-content:flex-start; }.gip-realized-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }.gip-main-grid { grid-template-columns:1fr; }.gip-side-column { grid-template-columns:1fr 1fr; }.gip-contract-scroll .gip-market-table { max-height:460px; } }
@media (max-width:760px) { .gip-toolbar { padding:15px; }.gip-toolbar-title h1 { font-size:21px; }.gip-toolbar-controls { align-items:stretch; }.gip-source-note { flex-basis:100%; }.gip-toolbar-actions { width:100%; }.gip-toolbar-actions button { flex:1; }.gip-side-column,.gip-depth-columns { grid-template-columns:1fr; }.gip-contract-area { min-height:420px; }.gip-contract-scroll .gip-market-table { min-height:310px; max-height:58vh; }.gip-position-readout { text-align:left; }.gip-section-head { align-items:flex-start; flex-direction:column; }.gip-depth-modal-card { padding:16px; }.gip-depth-modal-card .modal-head { gap:8px; }.gip-bottom-content { padding:10px; } }
@media (max-width:420px) { .gip-draft-grid,.gip-draft-actions { grid-template-columns:1fr; } }

/* GIP terminal: compact market-desk hierarchy, intentionally distinct from dashboard cards. */
.shell.gip-screen-active { max-width:none; padding:8px 10px 18px; background:#edf1f3; }
.gip-screen-active .gip-workspace { gap:8px; color:#1f2f39; }
.gip-screen-active .gip-toolbar { min-height:0; padding:13px 16px; border:0; border-radius:4px; background:#f9fbfc; box-shadow:0 1px 3px rgba(29,48,61,.18); }
.gip-screen-active .gip-toolbar-title h1 { margin:3px 0; color:#263b47; font-size:22px; letter-spacing:-.025em; }
.gip-screen-active .gip-toolbar-title p { max-width:570px; color:#6d7d87; font-size:11px; }
.gip-screen-active .gip-toolbar-controls { max-width:700px; gap:5px; }
.gip-screen-active .gip-toolbar-status { min-width:124px; padding:5px 7px; border:1px solid #d7e0e4; border-left:2px solid #37a26d; border-radius:3px; background:#fff; }
.gip-screen-active .gip-toolbar-status.gip-snapshot-status { min-width:175px; max-width:210px; }
.gip-screen-active .gip-toolbar-label,.gip-screen-active .gip-section-kicker { color:#7b8992; font-size:9px; }
.gip-screen-active .gip-toolbar-actions button,.gip-screen-active .gip-contract-head-actions button { min-height:30px; border-radius:3px; font-size:10px; }
.gip-terminal-commandbar { display:grid; grid-template-columns:175px 175px minmax(240px,1fr) auto auto; align-items:end; gap:8px; padding:9px 12px; border:1px solid #dde5e8; border-radius:4px; background:#fff; box-shadow:0 1px 2px rgba(25,45,57,.08); }
.gip-terminal-commandbar label { display:grid; gap:3px; color:#697b87; font-size:9px; font-weight:800; text-transform:uppercase; }
.gip-terminal-commandbar select { min-height:31px; border:1px solid #d4dfe4; border-radius:3px; background:#f9fbfc; color:#30434e; font-size:11px; }
.gip-terminal-command-note { display:grid; gap:2px; align-self:center; padding-left:9px; border-left:2px solid #3bb376; color:#6b7b84; font-size:10px; line-height:1.25; }
.gip-terminal-command-note strong { color:#2e5e49; font-size:10px; }.gip-terminal-commandbar button { min-height:31px; padding:6px 10px; border-radius:3px; color:#36505e; font-size:10px; white-space:nowrap; }
.gip-terminal-commandbar button:last-child { border-color:#54a975; background:#e7f6ec; color:#236344; }
.gip-screen-active .gip-main-grid { grid-template-columns:minmax(0,1fr) 348px; gap:8px; align-items:stretch; }
.gip-screen-active .gip-contract-area,.gip-screen-active .gip-side-panel,.gip-screen-active .gip-activity-panel,.gip-screen-active .gip-bottom-area { border:1px solid #d7e0e4; border-radius:4px; box-shadow:0 1px 3px rgba(31,55,70,.1); }
.gip-screen-active .gip-contract-area { min-height:650px; background:#fff; }.gip-screen-active .gip-section-head { min-height:50px; padding:8px 11px; border-bottom:1px solid #dfe7ea; background:#f8fafb; }
.gip-screen-active .gip-section-head h2 { margin:2px 0 0; color:#344955; font-size:14px; }.gip-screen-active .gip-position-readout { padding:5px 8px; border:1px solid #d5e2e6; border-radius:3px; background:#fff; }.gip-screen-active .gip-position-readout strong { color:#233d4b; font-size:12px; }
.gip-screen-active .gip-contract-scroll .gip-market-table { min-height:565px; max-height:calc(100vh - 235px); border:0; border-radius:0; }
.gip-screen-active .gip-market-table table { font-size:10px; border-collapse:separate; border-spacing:0; }.gip-screen-active .gip-market-table thead th { position:sticky; top:0; z-index:2; padding:7px 6px; border-bottom:1px solid #c9d5da; background:#eef2f4; color:#526671; font-size:9px; font-weight:850; white-space:nowrap; }
.gip-screen-active .gip-market-table td { height:28px; padding:4px 6px; border-bottom:1px solid #e4eaed; color:#344852; font-variant-numeric:tabular-nums; white-space:nowrap; }.gip-screen-active .gip-market-table tbody tr:nth-child(even) td { background:#fafcfc; }.gip-screen-active .gip-market-table tbody tr:hover td { background:#e9f4f8; }
.gip-screen-active .gip-contract-row.gip-contract-selected td { border-top:2px solid #ef5555; border-bottom:2px solid #ef5555; background:#eaf5f9 !important; }.gip-screen-active .gip-contract-row.gip-contract-selected td:first-child { border-left:2px solid #ef5555; }.gip-screen-active .gip-contract-row.gip-contract-selected td:last-child { border-right:2px solid #ef5555; }
.gip-screen-active .gip-contract-link { color:#2063b1; font-size:10px; font-weight:850; text-decoration:underline; }.gip-screen-active .gip-contract-status.open { color:#347d42; font-weight:850; }.gip-screen-active .gip-contract-status.past { color:#8e9ba2; }
.gip-screen-active .gip-ptf-price { background:#f2ecfe; color:#4e00d4; font-weight:850; text-align:right; box-shadow:inset 3px 0 0 #7c3aed; }.gip-screen-active .gip-smf-price { background:#eaeef2; color:#1c2c3a; font-weight:850; text-align:right; box-shadow:inset 3px 0 0 #253849; }.gip-screen-active .gip-energyai-smf { background:#f0eaff; color:#4e2f8b; font-weight:850; text-align:right; }.gip-screen-active .gip-buy-price { color:#1d8957; font-weight:850; text-align:right; }.gip-screen-active .gip-sell-price { color:#dc4949; font-weight:850; text-align:right; }
.gip-screen-active .gip-side-column { position:sticky; top:8px; gap:8px; align-self:start; }.gip-screen-active .gip-side-panel,.gip-screen-active .gip-activity-panel { padding:11px; background:#fff; }.gip-screen-active .gip-order-draft { border-top:3px solid #32ae73; background:#f7fcf8; }.gip-screen-active .gip-draft-head h2 { color:#285a43; font-size:14px; }.gip-screen-active .gip-draft-grid { gap:6px; }.gip-screen-active .gip-draft-grid input,.gip-screen-active .gip-draft-grid select { min-height:29px; border-radius:2px; font-size:11px; }.gip-screen-active .gip-draft-impact { border-radius:3px; font-size:9px; }.gip-screen-active .gip-draft-actions { gap:5px; }.gip-screen-active .gip-draft-actions button { min-height:30px; border-radius:3px; font-size:9px; }
.gip-screen-active .gip-depth-preview { border-top:3px solid #2286b8; }.gip-screen-active .gip-depth-header h2 { font-size:14px; }.gip-screen-active .gip-side-ptf { margin:8px 0; padding:7px; border:1px solid #d9e2e6; border-radius:3px; background:#f5f8f9; }.gip-screen-active .gip-depth-columns { gap:6px; margin-top:8px; }.gip-screen-active .gip-depth-column-head { padding:6px; border-radius:2px 2px 0 0; font-size:8px; }.gip-screen-active .gip-side-depth-table { max-height:170px; border-color:#e0e7ea; }.gip-screen-active .gip-depth-chart { min-height:160px; height:160px; }.gip-screen-active .gip-activity-panel { display:none; }
.gip-screen-active .gip-bottom-area { margin-top:0; background:#fff; }.gip-screen-active .gip-detail-tabs { min-height:42px; padding:6px 9px; gap:4px; border-bottom:1px solid #dce5e8; background:#f5f7f8; }.gip-screen-active .gip-detail-tabs button { min-height:27px; padding:5px 10px; border-radius:3px; font-size:10px; }.gip-screen-active .gip-detail-tabs button.active { background:#dff5ba; color:#426d24; }.gip-screen-active .gip-bottom-content { min-height:115px; padding:9px; }
.gip-screen-active .gip-safety-note { margin:0; padding:7px 10px; border-top:1px solid #dfe7ea; background:#fffbe8; color:#7d7042; font-size:9px; }
@media (max-width:1180px) { .gip-terminal-commandbar { grid-template-columns:1fr 1fr; }.gip-terminal-command-note { grid-column:1 / -1; }.gip-screen-active .gip-main-grid { grid-template-columns:minmax(0,1fr) 300px; } }
@media (max-width:860px) { .gip-screen-active .gip-main-grid { grid-template-columns:1fr; }.gip-screen-active .gip-side-column { position:static; grid-template-columns:1fr 1fr; }.gip-screen-active .gip-activity-panel { display:block; }.gip-screen-active .gip-contract-scroll .gip-market-table { min-height:420px; max-height:58vh; } }
@media (max-width:620px) { .gip-terminal-commandbar,.gip-screen-active .gip-side-column { grid-template-columns:1fr; }.gip-terminal-command-note { grid-column:auto; }.gip-screen-active .gip-toolbar { padding:11px; } }
@media (max-width:620px) { .gip-realized-summary { grid-template-columns:1fr; }.gip-realized-title,.gip-realized-card { border-left:0; border-top:2px solid #74b9dc; }.gip-realized-net { border-top-color:#159669; } }
@media (max-width:760px) { .gip-depth-summary,.gip-depth-grids { grid-template-columns:1fr; }.gip-depth-scroll { max-height:28vh; } }
@media (max-width: 760px) { .gip-market-hero { padding:20px; flex-direction:column; align-items:flex-start; } .gip-market-hero .inline-controls { width:100%; } .gip-market-card { min-height:190px; } }

/* Canli GIP, dashboard karti degil; genis operasyon calisma alani. */
.shell.gip-screen-active { max-width:none; padding:18px clamp(18px, 2.3vw, 46px) 30px; }
.gip-screen-active .gip-workspace { gap:16px; }
.gip-screen-active .gip-toolbar { min-height:116px; padding:21px 24px; border-radius:22px; }
.gip-screen-active .gip-toolbar-title h1 { font-size:28px; }
.gip-screen-active .gip-toolbar-controls { max-width:880px; }
.gip-toolbar-status { min-width:142px; border:1px solid #d5e6f0; border-left:3px solid #67add7; border-radius:12px; background:rgba(255,255,255,.72); }
.gip-toolbar-status.gip-snapshot-status { min-width:210px; max-width:260px; }
.gip-toolbar-status small { color:#647f93; font-size:10px; line-height:1.3; }
.gip-main-grid { grid-template-columns:minmax(0,1fr) minmax(340px,430px); gap:16px; }
.gip-contract-area { min-height:610px; }
.gip-contract-scroll .gip-market-table { min-height:476px; max-height:calc(100vh - 294px); }
.gip-market-table table { min-width:1740px; font-size:12px; }
.gip-market-table th { padding:10px 11px; font-size:10px; }
.gip-market-table td { height:34px; padding:6px 11px; }
.gip-market-table th:nth-child(1),.gip-market-table td:nth-child(1) { min-width:132px; }
.gip-market-table th:nth-child(2),.gip-market-table td:nth-child(2) { min-width:118px; }
.gip-contract-row.gip-contract-selected td { background:#d8f0ff; box-shadow:inset 0 1px 0 #75b9df, inset 0 -1px 0 #75b9df; }
.gip-contract-row.gip-contract-selected td:nth-child(1),.gip-contract-row.gip-contract-selected td:nth-child(2) { background:#d8f0ff; }
.gip-side-column { position:sticky; top:14px; }
.gip-side-panel { padding:16px; }
.gip-depth-chart { min-height:250px; height:250px; }
.gip-activity-panel { max-height:260px; overflow:auto; }
.gip-bottom-content { min-height:112px; padding:15px; }

@media (min-width:1600px) {
  .gip-main-grid { grid-template-columns:minmax(0,1fr) 410px; }
  .gip-contract-area { min-height:660px; }
  .gip-contract-scroll .gip-market-table { min-height:530px; max-height:calc(100vh - 282px); }
}
@media (min-width:1200px) and (max-width:1599px) {
  .gip-main-grid { grid-template-columns:minmax(0,1fr) minmax(330px,370px); }
}
@media (min-width:992px) and (max-width:1199px) {
  .shell.gip-screen-active { padding-left:18px; padding-right:18px; }
  .gip-main-grid { grid-template-columns:minmax(0,1fr) 310px; }
  .gip-toolbar-controls { max-width:620px; }
  .gip-toolbar-status.gip-snapshot-status { min-width:190px; }
}
@media (max-width:991px) {
  .shell.gip-screen-active { padding:14px; }
  .gip-screen-active .gip-toolbar { align-items:flex-start; flex-direction:column; }
  .gip-screen-active .gip-toolbar-controls { width:100%; max-width:none; justify-content:flex-start; }
  .gip-main-grid { grid-template-columns:1fr; }
  .gip-side-column { position:static; grid-template-columns:1fr 1fr; }
  .gip-contract-scroll .gip-market-table { max-height:54vh; }
}
@media (max-width:767px) {
  .shell.gip-screen-active { padding:10px; }
  .gip-screen-active .gip-toolbar { padding:16px; }
  .gip-screen-active .gip-toolbar-title h1 { font-size:23px; }
  .gip-toolbar-controls,.gip-toolbar-actions { width:100%; }
  .gip-toolbar-status,.gip-toolbar-status.gip-snapshot-status,.gip-source-control { flex:1 1 150px; min-width:0; }
  .gip-toolbar-actions button { flex:1 1 0; }
  .gip-side-column,.gip-depth-columns { grid-template-columns:1fr; }
  .gip-contract-area { min-height:440px; }
  .gip-contract-scroll .gip-market-table { min-height:330px; max-height:52vh; }
  .gip-depth-chart { min-height:210px; height:210px; }
  .gip-activity-panel { max-height:none; }
}

/* GIP terminal uses a dedicated desktop desk theme, so it needs explicit
   dark-mode tokens instead of falling back to the light terminal palette. */
:root[data-theme="dark"] .shell.gip-screen-active { background:#0a121b; }
:root[data-theme="dark"] .gip-screen-active .gip-workspace { color:#d9e6ee; }
:root[data-theme="dark"] .gip-screen-active .gip-toolbar,
:root[data-theme="dark"] .gip-terminal-commandbar,
:root[data-theme="dark"] .gip-screen-active .gip-contract-area,
:root[data-theme="dark"] .gip-screen-active .gip-side-panel,
:root[data-theme="dark"] .gip-screen-active .gip-activity-panel,
:root[data-theme="dark"] .gip-screen-active .gip-bottom-area { border-color:#284050; background:#101b26; box-shadow:0 2px 8px rgba(0,0,0,.28); }
:root[data-theme="dark"] .gip-screen-active .gip-toolbar-title h1,
:root[data-theme="dark"] .gip-screen-active .gip-section-head h2,
:root[data-theme="dark"] .gip-screen-active .gip-draft-head h2,
:root[data-theme="dark"] .gip-screen-active .gip-depth-header h2 { color:#e7f2f8; }
:root[data-theme="dark"] .gip-screen-active .gip-toolbar-title p,
:root[data-theme="dark"] .gip-screen-active .gip-toolbar-label,
:root[data-theme="dark"] .gip-screen-active .gip-section-kicker,
:root[data-theme="dark"] .gip-terminal-commandbar label,
:root[data-theme="dark"] .gip-terminal-command-note,
:root[data-theme="dark"] .gip-terminal-command-note strong { color:#9fb5c4; }
:root[data-theme="dark"] .gip-screen-active .gip-toolbar-status,
:root[data-theme="dark"] .gip-screen-active .gip-position-readout,
:root[data-theme="dark"] .gip-date-control input,
:root[data-theme="dark"] .gip-source-control select,
:root[data-theme="dark"] .gip-terminal-commandbar select { border-color:#345062; background:#142332; color:#e1edf5; }
:root[data-theme="dark"] .gip-realized-summary { border-color:#29485a; background:linear-gradient(105deg,#101f2a,#112820); }
:root[data-theme="dark"] .gip-realized-title strong,
:root[data-theme="dark"] .gip-realized-card strong { color:#e7f2f8; }
:root[data-theme="dark"] .gip-realized-title small,
:root[data-theme="dark"] .gip-realized-card small,
:root[data-theme="dark"] .gip-realized-card > span { color:#a8c1cf; }
:root[data-theme="dark"] .gip-screen-active .gip-section-head,
:root[data-theme="dark"] .gip-screen-active .gip-detail-tabs { border-color:#284050; background:#12202b; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table thead th { border-color:#345062; background:#172936; color:#bcd2df; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table td { border-color:#213746; background:#101b26; color:#d8e6ee; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table tbody tr:nth-child(even) td { background:#13212c; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table tbody tr:hover td,
:root[data-theme="dark"] .gip-screen-active .gip-contract-row.gip-contract-selected td { background:#193345 !important; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table th:nth-child(1),
:root[data-theme="dark"] .gip-screen-active .gip-market-table th:nth-child(2) { background:#172936; box-shadow:2px 0 0 #233c4b; }
:root[data-theme="dark"] .gip-screen-active .gip-market-table td:nth-child(1),
:root[data-theme="dark"] .gip-screen-active .gip-market-table td:nth-child(2) { background:#101b26; box-shadow:2px 0 0 #233c4b; }
:root[data-theme="dark"] .gip-screen-active .gip-contract-row.gip-contract-current td { background:#173545; box-shadow:inset 0 1px 0 #4fa5ca,inset 0 -1px 0 #4fa5ca; }
:root[data-theme="dark"] .gip-screen-active .gip-contract-row.gip-contract-past td { background:#101923; color:#8298a8; }
:root[data-theme="dark"] .gip-screen-active .gip-ptf-price { background:#2b2152; color:#d5bcff; box-shadow:inset 3px 0 0 #a78bfa; }
:root[data-theme="dark"] .gip-screen-active .gip-smf-price { background:#263441; color:#dceaf3; box-shadow:inset 3px 0 0 #8da4b6; }
:root[data-theme="dark"] .gip-screen-active .gip-energyai-smf { background:#2a2448; color:#d8c6ff; }
:root[data-theme="dark"] .gip-screen-active .gip-order-draft { border-top-color:#35b779; background:#10251d; }
:root[data-theme="dark"] .gip-screen-active .gip-side-ptf,
:root[data-theme="dark"] .gip-screen-active .gip-draft-impact,
:root[data-theme="dark"] .gip-screen-active .gip-side-data-time,
:root[data-theme="dark"] .gip-screen-active .gip-side-depth-message,
:root[data-theme="dark"] .gip-screen-active .gip-detail-grid > div,
:root[data-theme="dark"] .gip-empty-state { border-color:#2c4a5c; background:#132330; color:#aec2cf; }
:root[data-theme="dark"] .gip-screen-active .gip-detail-tabs button { color:#aac2d0; }
:root[data-theme="dark"] .gip-screen-active .gip-detail-tabs button.active { background:#26442c; color:#d5f6b0; }
:root[data-theme="dark"] .gip-screen-active .gip-safety-note { border-color:#594e28; background:#2b2615; color:#ddce8d; }

/* Kontrat tahtası içerik boyu kadar uzamamalı. EPİAŞ benzeri dikey
   operasyonda geçmiş/aktif/ileri saatler tek sabit viewport içinde kalır. */
.gip-screen-active .gip-contract-area { height:min(650px,calc(100vh - 190px)); min-height:0; }
.gip-screen-active .gip-contract-scroll { min-height:0; flex:1 1 auto; }
.gip-screen-active .gip-contract-scroll .gip-market-table { height:100%; min-height:0; max-height:none; overflow-x:auto; overflow-y:scroll; scrollbar-gutter:stable both-edges; }
@media (max-width:991px) { .gip-screen-active .gip-contract-area { height:min(620px,68vh); } }
@media (max-width:767px) { .gip-screen-active .gip-contract-area { height:62vh; min-height:390px; } }

.login-error-box {
  padding: 11px 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-only.hidden-by-role {
  display: none !important;
}

.hidden-by-role {
  display: none !important;
}

body.super-admin-mode .nav-link.super-admin-only {
  display: inline-flex !important;
}

body.super-admin-mode section.super-admin-only.active {
  display: block !important;
}

body.super-admin-mode .nav-menu .super-admin-only {
  display: flex !important;
}

.empty-state-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.error-soft {
  border-color: rgba(239, 68, 68, 0.28) !important;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.8)) !important;
  color: #7f1d1d;
}

.mini-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-kpi-row span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.78);
  color: #065f46;
  font-size: 12px;
}

.full-width-field {
  display: block;
  margin: 12px 0;
}

.full-width-field textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  resize: vertical;
  background: rgba(255,255,255,0.88);
}

  .etso-viewer-mode .actions .health-menu-wrap,
  .etso-viewer-mode .actions .version-pill {
  display: none;
}

.viewer-side-nav {
  display: none;
}

.etso-viewer-mode .ios-nav {
  display: none;
}

.etso-viewer-mode .shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  max-width: 1500px;
  align-items: start;
}

.etso-viewer-mode .page-panel {
  grid-column: 2;
  min-width: 0;
}

.etso-viewer-mode .viewer-side-nav {
  grid-column: 1;
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - 118px);
  padding: 18px 12px;
  border: 1px solid rgba(170, 190, 215, 0.55);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 255, 0.84));
  box-shadow: 0 22px 54px rgba(15, 55, 100, 0.10);
}

.viewer-side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-weight: 900;
  color: #0f2842;
}

.viewer-side-brand img {
  width: 112px;
  height: auto;
}

.viewer-side-brand span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0b88d0;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
}

.viewer-side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  justify-content: flex-start;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  color: #64748b;
  background: transparent;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
}

.viewer-side-nav button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.viewer-side-nav button.active,
.viewer-side-nav button:hover {
  color: #166534;
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.90), rgba(239, 246, 255, 0.72));
}

.viewer-side-nav button.active::before,
.viewer-side-nav button:hover::before {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.etso-viewer-mode .live-cockpit {
  max-width: none;
  margin: 0;
}

.etso-viewer-mode .live-hero-card {
  min-height: 270px;
}

.etso-viewer-mode .live-ptf-projection {
  width: 100%;
  max-width: 100%;
}

.etso-viewer-mode .ptf-projection-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  align-items: stretch;
}

.etso-viewer-mode .ptf-projection-head h3 {
  max-width: 520px;
}

.etso-viewer-mode .ptf-projection-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.etso-viewer-mode .ptf-projection-month {
  min-width: 0;
}

.viewer-section-card {
  margin-top: 18px;
  border: 1px solid rgba(170, 190, 215, 0.50);
  border-radius: 26px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 255, 0.82));
  box-shadow: 0 18px 46px rgba(15, 55, 100, 0.08);
}

.viewer-section-card h3 {
  margin: 0 0 8px;
}

.viewer-section-card p {
  margin: 0;
  color: var(--muted);
}

:root[data-theme="dark"] .etso-viewer-mode .viewer-side-nav,
:root[data-theme="dark"] .viewer-section-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 36, 58, 0.84));
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .viewer-side-brand {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme="dark"] .viewer-side-nav button {
  color: #b6c2d1;
}

:root[data-theme="dark"] .viewer-side-nav button.active,
:root[data-theme="dark"] .viewer-side-nav button:hover {
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.40), rgba(15, 23, 42, 0.76));
}

.title-access-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0 8px;
}

.title-access-picker select {
  min-height: 160px;
}

.etso-monitor-shell {
  display: grid;
  gap: 18px;
  max-width: 1320px;
  margin: 0 auto;
}

.etso-monitor-hero,
.etso-monitor-card,
.etso-monitor-kpis article {
  border: 1px solid rgba(170, 190, 215, 0.5);
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(236,246,255,0.76));
  box-shadow: 0 18px 45px rgba(42, 73, 110, 0.10);
  border-radius: 28px;
}

.etso-monitor-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  align-items: center;
}

.etso-monitor-hero .eyebrow {
  color: #157ad7;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.etso-monitor-hero h2 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 46px);
}

.etso-monitor-notice {
  margin: 14px 0 4px;
  padding: 12px 16px;
  border: 1px solid rgba(21, 122, 215, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 247, 255, 0.96), rgba(255, 248, 218, 0.9));
  color: #23415f;
  font-weight: 750;
  box-shadow: 0 12px 30px rgba(42, 73, 110, 0.08);
}

.etso-monitor-footnote {
  margin: -4px 8px 0;
  color: #7b8da3;
  font-size: 12px;
  text-align: right;
  letter-spacing: 0.01em;
}

.etso-monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.etso-monitor-actions label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #62738a;
}

.etso-monitor-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.etso-monitor-kpis article {
  padding: 18px;
}

.etso-monitor-kpis span,
.etso-monitor-kpis small {
  color: #708197;
}

.etso-monitor-kpis strong {
  display: block;
  margin: 7px 0;
  font-size: 22px;
  color: #0b2745;
}

.etso-monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.etso-monitor-card {
  padding: 20px;
  overflow: hidden;
}

.etso-monitor-card canvas {
  width: 100%;
  max-height: 390px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(250,253,255,0.9), rgba(238,247,255,0.8));
}

.etso-monitor-chart-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 14px;
}

.etso-monitor-chart-stats article {
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(196, 214, 232, 0.88);
}

.etso-monitor-chart-stats span,
.etso-monitor-chart-stats small {
  display: block;
  color: #6f8095;
  font-size: 11px;
}

.etso-monitor-chart-stats strong {
  display: block;
  margin: 4px 0;
  color: #0b2745;
  font-size: 18px;
}

.etso-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.etso-tag {
  border: 1px solid rgba(61, 110, 255, 0.18);
  background: rgba(61, 110, 255, 0.08);
  color: #12497f;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

.etso-tag.passive {
  cursor: default;
  background: rgba(17, 24, 39, 0.05);
  color: #5f7085;
}

.etso-monitor-card tr.is-selected {
  background: rgba(20, 184, 166, 0.08);
}

.etso-alert-list {
  display: grid;
  gap: 10px;
}

.etso-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: #fff7df;
  color: #7a4e00;
}

.etso-alert.danger {
  background: #ffe7e8;
  color: #9b111e;
}

.etso-alert.ok {
  background: #e7faef;
  color: #086b38;
}

.viewer-settings-profile-card {
  min-height: 96px;
}

.viewer-settings-wide-card {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(239,248,255,0.82));
  border: 1px solid rgba(198, 218, 238, 0.9);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(42, 73, 110, 0.08);
}

.viewer-settings-wide-card h3 {
  margin: 0 0 8px;
}

.viewer-password-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.viewer-password-grid label {
  display: grid;
  gap: 6px;
  color: #61738a;
  font-size: 12px;
}

.viewer-password-grid input {
  width: 100%;
}

.viewer-etso-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.viewer-etso-list article {
  border: 1px solid rgba(180, 202, 225, 0.75);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,0.82);
}

.viewer-etso-list strong,
.viewer-etso-list span,
.viewer-etso-list small {
  display: block;
}

.viewer-etso-list span {
  margin: 5px 0;
  color: #243d5b;
  font-weight: 750;
}

.viewer-etso-list small {
  color: #74859a;
}

:root[data-theme="dark"] .full-width-field textarea,
:root[data-theme="dark"] .etso-monitor-hero,
:root[data-theme="dark"] .etso-monitor-card,
:root[data-theme="dark"] .etso-monitor-kpis article,
:root[data-theme="dark"] .login-card {
  background: linear-gradient(145deg, rgba(16,31,50,0.94), rgba(18,48,70,0.82));
  border-color: rgba(108, 138, 174, 0.55);
  color: #eaf4ff;
}

:root[data-theme="dark"] .etso-monitor-kpis strong,
:root[data-theme="dark"] .etso-monitor-hero h2,
:root[data-theme="dark"] .etso-monitor-card h3,
:root[data-theme="dark"] .etso-monitor-chart-stats strong {
  color: #f5fbff;
}

:root[data-theme="dark"] .etso-monitor-notice {
  background: linear-gradient(135deg, rgba(18, 43, 66, 0.96), rgba(58, 50, 22, 0.78));
  border-color: rgba(118, 171, 220, 0.42);
  color: #eaf6ff;
}

:root[data-theme="dark"] .etso-monitor-footnote {
  color: #90a4bb;
}

:root[data-theme="dark"] .etso-monitor-kpis span,
:root[data-theme="dark"] .etso-monitor-kpis small,
:root[data-theme="dark"] .etso-monitor-hero p,
:root[data-theme="dark"] .etso-monitor-chart-stats span,
:root[data-theme="dark"] .etso-monitor-chart-stats small,
:root[data-theme="dark"] .login-card p,
:root[data-theme="dark"] .login-card small,
:root[data-theme="dark"] .login-card label {
  color: #b7c8dc;
}

:root[data-theme="dark"] .viewer-settings-wide-card,
:root[data-theme="dark"] .viewer-etso-list article {
  background: rgba(10, 23, 38, 0.86);
  border-color: rgba(79, 112, 147, 0.72);
}

:root[data-theme="dark"] .viewer-etso-list span {
  color: #edf7ff;
}

:root[data-theme="dark"] .viewer-etso-list small {
  color: #aebfd3;
}

:root[data-theme="dark"] .viewer-password-grid label {
  color: #b7c8dc;
}

:root[data-theme="dark"] .login-card input,
:root[data-theme="dark"] .title-access-picker select,
:root[data-theme="dark"] .title-access-picker input {
  background: rgba(8, 19, 31, 0.92);
  color: #f3f8ff;
  border-color: rgba(110, 139, 173, 0.65);
}

:root[data-theme="dark"] .brand-enerji {
  color: #9eb1c7;
}

:root[data-theme="dark"] .brand-logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 8px 18px rgba(0,0,0,0.28));
}

:root[data-theme="dark"] .login-panel {
  background:
    radial-gradient(circle at 14% 18%, rgba(29, 191, 115, 0.14), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(47, 128, 237, 0.22), transparent 32%),
    linear-gradient(145deg, #07111d, #0b1829 52%, #0e2137);
}

:root[data-theme="dark"] .etso-monitor-card canvas {
  background: linear-gradient(180deg, rgba(9,20,34,0.98), rgba(12,31,48,0.92));
}

:root[data-theme="dark"] .etso-monitor-chart-stats article {
  background: rgba(10, 23, 38, 0.86);
  border-color: rgba(79, 112, 147, 0.72);
}

.live-energy-bubble {
  border: 1px solid rgba(160, 197, 228, 0.52);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(234,245,255,0.88));
  box-shadow: 0 18px 48px rgba(42, 73, 110, 0.08);
}

.live-energy-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.live-energy-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(260px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.live-energy-chart {
  min-width: 0;
}

.live-energy-chart svg {
  width: 100%;
  height: auto;
}

.live-energy-chart svg text {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.live-energy-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.live-energy-legend i,
.live-energy-mix-list i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 8px;
}

.live-energy-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
}

.live-energy-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.live-energy-toolbar input {
  min-width: 180px;
}

.live-energy-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.live-energy-kpis article {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.live-energy-kpis span,
.live-energy-kpis small {
  display: block;
  color: var(--muted);
}

.live-energy-kpis strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  color: var(--ink);
}

.live-energy-mix {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.live-energy-mix-list {
  display: grid;
  gap: 8px;
}

.live-energy-mix-list div,
.live-energy-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.live-energy-source-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 8px;
}

.live-energy-source-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.live-energy-source-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-energy-source-list strong {
  flex: 0 0 auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-energy-note,
.live-energy-error,
.live-energy-loading {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.live-energy-note {
  background: rgba(255, 244, 204, 0.82);
  color: #8a5a00;
}

.live-energy-error {
  background: rgba(254, 226, 226, 0.88);
  color: #991b1b;
}

.live-energy-loading {
  background: rgba(255,255,255,0.78);
  color: var(--muted);
}

.live-energy-bubble.viewer-mode .live-energy-mini-table {
  display: grid;
  gap: 10px;
}

.live-energy-empty {
  color: var(--muted);
}

:root[data-theme="dark"] .live-energy-bubble {
  background: linear-gradient(145deg, rgba(16,31,50,0.94), rgba(18,48,70,0.82));
  border-color: rgba(108, 138, 174, 0.55);
}

:root[data-theme="dark"] .live-energy-kpis article,
:root[data-theme="dark"] .live-energy-loading {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .live-energy-kpis strong {
  color: #f8fbff;
}

:root[data-theme="dark"] .live-energy-note {
  background: rgba(120, 53, 15, 0.46);
  color: #fde68a;
}

:root[data-theme="dark"] .live-energy-error {
  background: rgba(127, 29, 29, 0.44);
  color: #fecaca;
}

@media (max-width: 900px) {
  .etso-monitor-hero,
  .etso-monitor-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .etso-monitor-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .etso-monitor-chart-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .title-access-picker,
  .live-energy-grid {
    grid-template-columns: 1fr;
  }
  .live-energy-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .etso-monitor-kpis {
    grid-template-columns: 1fr;
  }
  .etso-monitor-chart-stats {
    grid-template-columns: 1fr;
  }
  .live-energy-kpis {
    grid-template-columns: 1fr;
  }
}

.chart-table-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compact-title {
  align-items: baseline;
  gap: 10px;
}

.wide-table {
  max-height: 360px;
}

.series-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  border: 1px solid var(--line);
}

.series-toggle::before {
  content: "";
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--series-color);
}

.series-toggle.inactive {
  opacity: 0.42;
  text-decoration: line-through;
}

.series-toggle.selected-bot-line {
  border-color: rgba(0, 168, 107, 0.42);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
  font-weight: 800;
}

.chart-tooltip {
  position: fixed;
  z-index: 30;
  display: none;
  min-width: 160px;
  padding: 9px 11px;
  pointer-events: none;
  border: 1px solid rgba(17, 20, 24, 0.18);
  border-radius: 12px;
  background: rgba(17, 20, 24, 0.92);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.zoom-box {
  position: fixed;
  z-index: 25;
  display: none;
  border: 1px dashed #111418;
  background: rgba(47, 128, 237, 0.14);
  pointer-events: none;
}

.recommendations {
  padding: 18px;
}

.agent-panel {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 221, 0.9));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(20, 24, 30, 0.07);
}

.asof-shadow-panel {
  margin-top: 20px;
  border: 1px solid rgba(21, 94, 117, .28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 249, 255, .96), rgba(236, 253, 245, .88));
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.asof-shadow-panel > summary { padding: 18px; }
.asof-shadow-panel .eyebrow { color: #0e7490; font-size: 11px; font-weight: 800; }
.asof-shadow-body { border-top: 1px solid rgba(21, 94, 117, .18); padding: 18px; }
.asof-period-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(210px, .7fr); gap: 12px; align-items: stretch; }
.asof-period-card, .asof-period-actions, .asof-result-card { border: 1px solid rgba(65, 135, 170, .25); border-radius: 14px; background: rgba(255, 255, 255, .8); padding: 14px; }
.asof-period-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.asof-period-card > div { grid-column: 1 / -1; }
.asof-period-card strong, .asof-period-card small, .asof-period-actions small { display: block; }
.asof-period-card small, .asof-period-actions small, .asof-shadow-note, .asof-result-card p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.asof-period-card label { display: grid; gap: 4px; color: #36546d; font-size: 11px; font-weight: 700; }
.asof-period-card input { min-width: 0; }
.asof-period-actions { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.asof-period-actions button { background: #0f766e; color: #fff; border-color: #0f766e; }
.asof-shadow-status { margin-top: 12px; padding: 10px 12px; border-left: 4px solid #0e7490; border-radius: 8px; background: rgba(255, 255, 255, .65); color: #164e63; font-size: 13px; }
.asof-shadow-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.asof-result-card.ok { border-color: rgba(16, 185, 129, .45); }
.asof-result-card.warn { border-color: rgba(245, 158, 11, .52); }
.asof-result-card header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.asof-result-card header small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.asof-coverage-table { max-height: 310px; margin-top: 10px; }
.asof-coverage-table table { min-width: 520px; }
.asof-coverage-table td:first-child { text-transform: capitalize; }
.asof-shadow-note { margin: 12px 2px 0; }

@media (max-width: 980px) {
  .asof-period-grid, .asof-shadow-results { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .asof-period-card { grid-template-columns: 1fr; }
}

.collapsible-panel > summary,
.collapsible-ops-card summary {
  cursor: pointer;
  list-style: none;
}

.collapsible-panel > summary::-webkit-details-marker,
.collapsible-ops-card summary::-webkit-details-marker { display: none; }

.collapsible-summary-action,
.collapsible-ops-card summary > b {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.32);
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 12px;
}

.collapsible-panel[open] .collapsible-summary-action::after,
.collapsible-ops-card details[open] summary > b::after { content: "Kapat"; }
.collapsible-panel[open] .collapsible-summary-action,
.collapsible-ops-card details[open] summary > b { font-size: 0; }
.collapsible-panel[open] .collapsible-summary-action::after,
.collapsible-ops-card details[open] summary > b::after { font-size: 12px; }

.collapsible-panel-body { padding-top: 14px; }
.collapsible-panel-body > .inline-controls { justify-content: flex-end; }

.agent-panel p {
  margin: 0;
  color: var(--muted);
}

.agent-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(120px, 0.55fr));
  gap: 12px;
  margin-top: 12px;
}

.agent-card {
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.agent-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.agent-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.agent-card.metric strong {
  font-size: 30px;
}

.agent-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.agent-tables {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.learning-panel,
.agent-chat {
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.learning-grid div {
  padding: 10px;
  border-radius: 12px;
  background: #f7f9fc;
}

.learning-grid small,
.agent-chat small {
  display: block;
  color: var(--muted);
}

.learning-grid strong {
  display: block;
  margin-top: 4px;
}

.agent-chat textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font: inherit;
}

.agent-chat button {
  margin-top: 8px;
}

.chat-answer {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f7f9fc;
  color: #26313e;
  white-space: pre-wrap;
}

.ops-agent-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111418;
  color: #fff;
}

.ops-agent-strip small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
}

.ops-agent-strip strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
}

.ops-agent-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.ops-agent-health.healthy {
  color: #76e59a;
}

.ops-agent-health.needs_aril,
.ops-agent-health.watch {
  color: #ffd75d;
}

.scroll-table {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.scroll-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.compact-pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
}

.sub-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.hidden {
  display: none !important;
}

.scroll-table th,
.scroll-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
}

.risk-yuksek {
  color: var(--red);
  font-weight: 800;
}

.risk-orta {
  color: #b77900;
  font-weight: 800;
}

.risk-dusuk {
  color: var(--green);
  font-weight: 800;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
}

.mini-rec-wrap small {
  display: block;
  margin-bottom: 7px;
}

.mini-rec-grid {
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 6px;
}

.rec {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.mini-rec-grid .rec {
  padding: 7px;
  border-radius: 10px;
  font-size: 11px;
}

.mini-rec-grid .rec strong {
  margin: 0;
  color: #111418;
  font-size: 15px;
}

.rec .al {
  color: var(--red);
  font-weight: 900;
}

.rec .sat {
  color: var(--green);
  font-weight: 900;
}

.rec.rec-buy {
  animation: gipBuyPulse 1.35s ease-in-out infinite;
}

.rec.rec-sell {
  animation: gipSellPulse 1.35s ease-in-out infinite;
}

@keyframes gipBuyPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(220, 38, 38, 0); border-color: var(--line); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18); border-color: rgba(220, 38, 38, 0.5); }
}

@keyframes gipSellPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(22, 163, 74, 0); border-color: var(--line); }
  50% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18); border-color: rgba(22, 163, 74, 0.55); }
}

.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ops-grid article {
  padding: 18px;
}

.collapsible-ops-card { padding: 0 !important; }
.collapsible-ops-card details { padding: 18px; }
.collapsible-ops-card summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.collapsible-ops-card summary strong,
.collapsible-ops-card summary small { display: block; }
.collapsible-ops-card summary small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.collapsible-ops-card pre,
.collapsible-ops-card .job-list { margin-top: 14px; }

:root[data-theme="dark"] .chart-settings-popover { background: #152238; border-color: #35516c; }
:root[data-theme="dark"] .chart-settings-btn { background: #3f2d05; color: #fcd34d; }
:root[data-theme="dark"] .chart-settings-btn:hover,
:root[data-theme="dark"] .chart-settings-btn[aria-expanded="true"] { background: #b45309; color: #fff; }
:root[data-theme="dark"] .chart-series-setting { background: #1b2b43; border-color: #37516d; color: #e8f1fb !important; }
:root[data-theme="dark"] .chart-series-setting.selected-bot-line { background: #114236; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.legacy-card {
  grid-column: 1 / -1;
}

.collapsible-card.collapsed .collapsible-body {
  display: none;
}

.collapsible-card .panel-title {
  margin-bottom: 0;
}

.settings-card {
  display: none;
}

.legacy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legacy-links a,
.feature-card a,
.link-button {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #1b5dbf;
  text-decoration: none;
}

.admin-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(20, 24, 30, 0.07);
}

.feature-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(20, 24, 30, 0.07);
}

.admin-card,
.feature-card {
  min-width: 0;
  overflow: hidden;
}

.settings-form,
.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.automation-ios-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.automation-ios-section {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(190, 205, 220, 0.75);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 252, 0.9));
  box-shadow: 0 14px 35px rgba(12, 36, 54, 0.08);
  overflow: hidden;
}

.automation-ios-section summary {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.automation-ios-section summary::-webkit-details-marker {
  display: none;
}

.automation-ios-section summary::after {
  content: "›";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--muted);
  font-size: 26px;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.automation-ios-section[open] summary::after {
  transform: rotate(270deg);
}

.automation-icon {
  grid-row: 1 / span 2;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #e8f4ff, #eaf8ef);
  color: #087647;
  font-weight: 900;
}

.automation-ios-section strong {
  font-weight: 900;
  color: var(--text);
}

.automation-ios-section small {
  color: var(--muted);
  font-size: 12px;
}

.automation-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 12px;
  padding: 0 16px 16px;
}

.automation-fields label {
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(210, 224, 236, 0.82);
}

.settings-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid rgba(190, 205, 220, 0.8);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 252, 0.96));
  box-shadow: 0 14px 35px rgba(12, 36, 54, 0.08);
}

.settings-group summary {
  grid-column: 1 / -1;
  margin: 0;
  color: #1c2c3b;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  padding: 2px 0 8px;
}

.settings-group summary::-webkit-details-marker {
  display: none;
}

.settings-group summary::after {
  content: "Aç";
  float: right;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #0b69b7;
  font-size: 11px;
}

.settings-group[open] summary::after {
  content: "Kapat";
  background: #eef8ef;
  color: #087647;
}

.settings-group:not([open]) label {
  display: none;
}

.settings-group:not([open]) button {
  display: none;
}

.settings-group:not([open]) > :not(summary) {
  display: none;
}

.setting-key {
  display: block;
  margin-bottom: 4px;
  color: #26313e;
  font-weight: 700;
}

.hint {
  padding: 10px 12px;
  border: 1px solid #ffe08a;
  border-radius: 12px;
  background: #fff8dc;
  color: #5c4700;
}

.settings-form label,
.date-grid label {
  color: var(--muted);
  font-size: 12px;
}

#forecastSourceVersion:empty {
  display: none;
}

#forecastSourceVersion {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 360px;
  padding: 8px 11px;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(239, 246, 255, 0.92));
  color: #0f5132;
  font-size: 12px;
  white-space: normal;
}

.boolean-select-native {
  display: none !important;
}

.ios-switch {
  width: 112px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: linear-gradient(135deg, #eef2f7, #ffffff);
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.ios-switch .ios-switch-knob {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.ios-switch strong {
  font-size: 12px;
  line-height: 1;
}

.ios-switch.on {
  border-color: rgba(34, 197, 94, 0.34);
  background: linear-gradient(135deg, #34d399, #16a34a);
  color: #ffffff;
}

.ios-switch.on .ios-switch-knob {
  transform: translateX(4px);
}

:root[data-theme="dark"] #forecastSourceVersion {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.72), rgba(15, 23, 42, 0.86));
  color: #bbf7d0;
}

:root[data-theme="dark"] .ios-switch {
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(135deg, #1f2937, #0f172a);
  color: #cbd5e1;
}

:root[data-theme="dark"] .ios-switch.on {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
}

:root[data-theme="dark"] .series-toggle.selected-bot-line {
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.75), rgba(15, 23, 42, 0.84));
  color: #d1fae5;
}

.settings-form label.full,
.date-grid label.full {
  grid-column: 1 / -1;
}

.database-access-gate, .database-module-card {
  border: 1px solid #cfe1ee;
  border-radius: 20px;
  background: linear-gradient(145deg, #f9fdff, #eef7fb);
  padding: 18px;
  margin-top: 16px;
}
.database-access-gate p, .database-module-card p { color: #60758a; margin: 7px 0 14px; }
.database-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.database-summary-grid article { padding:17px; border-radius:18px; border:1px solid #d5e5f1; background:#fff; display:grid; gap:6px; }
.database-summary-grid small, .database-module-card small { color:#6a7f92; }
.database-summary-grid strong { font-size:22px; color:#13385a; }
.database-module-list { display:grid; gap:14px; }
.database-module-card header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.database-module-card h3 { margin:0; color:#13385a; }.database-module-card header>strong { white-space:nowrap; color:#00736a; font-size:20px; }
.database-module-card ul { list-style:none; padding:0; margin:14px 0; border-top:1px solid #e3edf4; }
.database-module-card li { display:grid; grid-template-columns:1fr auto auto; gap:12px; padding:9px 0; border-bottom:1px solid #e3edf4; }
.database-table-row > div { display:flex; gap:8px; flex-wrap:wrap; grid-column:1 / -1; }
.database-table-row button.small { font-size:12px; padding:6px 9px; }
.database-risk-note { flex-basis:100%; color:#8a4b18; line-height:1.45; }
.database-coverage-detail { grid-column:1 / -1; padding:10px; border-radius:10px; background:#f2f8fc; color:#36546d; line-height:1.55; overflow-wrap:anywhere; }
.database-retention-progress { grid-column:1 / -1; display:grid; gap:7px; padding:11px 12px; border:1px solid #bde5db; border-radius:12px; background:linear-gradient(135deg,#f4fffb,#eef8ff); color:#254d66; }
.database-retention-progress > div { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }.database-retention-progress strong { color:#126c61; }.database-retention-progress small { color:#587488; overflow-wrap:anywhere; }.database-retention-progress progress { width:100%; height:8px; accent-color:#18a98b; }
.database-module-card li b { color:#183b58; }.database-purge { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }.database-purge input { min-width:200px; }
.database-protected { padding:10px 12px; background:#fff7de; border-radius:12px; color:#775a14 !important; }
@media (max-width: 760px) { .database-summary-grid { grid-template-columns:1fr; }.database-module-card li { grid-template-columns:1fr auto; }.database-module-card li small { grid-column:1 / -1; }.database-module-card header { display:block; }.database-module-card header>strong { display:block; margin-top:8px; } }

.bot-settings-panel {
  grid-column: 1 / -1;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(125, 185, 220, 0.55);
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(248, 252, 255, 0.98), rgba(238, 249, 243, 0.92));
  box-shadow: 0 18px 45px rgba(12, 36, 54, 0.10);
}

.bot-settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.bot-settings-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}

.bot-settings-hero p {
  max-width: 760px;
  color: var(--muted);
}

.bot-version-card {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.94));
}

.bot-version-card small,
.bot-version-card em {
  display: block;
  color: var(--muted);
}

.bot-version-card strong {
  display: block;
  margin: 6px 0;
  color: #064e3b;
  word-break: break-word;
}

.bot-settings-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.bot-settings-tabs button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.bot-settings-tabs button.active {
  border-color: rgba(16, 185, 129, 0.48);
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(219, 234, 254, 0.92));
  color: #064e3b;
}

.bot-settings-tabs small {
  color: var(--muted);
}

.bot-settings-section-card {
  padding: 16px;
  border: 1px solid rgba(190, 205, 220, 0.65);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
}

.bot-settings-section-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.bot-settings-section-head p {
  margin: 0 0 14px;
  color: var(--muted);
}

.bot-settings-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
}

.bot-setting-card {
  display: grid;
  gap: 8px;
  min-height: 178px;
  padding: 14px;
  border: 1px solid rgba(199, 213, 225, 0.76);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 252, 0.78));
}

.bot-setting-card .bot-setting-key {
  font-size: 12px;
  color: #0369a1;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.bot-setting-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.bot-setting-card small {
  color: var(--muted);
}

.bot-setting-card input,
.bot-setting-card select {
  width: 100%;
}

.bot-settings-actions {
  margin-top: 14px;
}

.focus-ring-soft {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 0 8px rgba(20, 184, 166, 0.12);
}

:root[data-theme="dark"] .bot-settings-panel {
  border-color: rgba(56, 189, 248, 0.25);
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(6, 78, 59, 0.62));
}

:root[data-theme="dark"] .bot-version-card,
:root[data-theme="dark"] .bot-settings-tabs button,
:root[data-theme="dark"] .bot-settings-section-card,
:root[data-theme="dark"] .bot-setting-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.70));
}

:root[data-theme="dark"] .bot-settings-tabs button.active {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.82), rgba(15, 23, 42, 0.88));
  color: #d1fae5;
}

:root[data-theme="dark"] .bot-setting-card .bot-setting-key,
:root[data-theme="dark"] .bot-version-card strong {
  color: #7dd3fc;
}

.job-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.job-buttons button,
.module-actions button,
.inline-controls button,
.inline-controls a {
  min-width: 0;
  white-space: normal;
}

.inline-controls button.secondary-action,
button.secondary-action {
  background: rgba(15, 88, 132, 0.08);
  color: var(--ink);
  border: 1px solid rgba(49, 112, 151, 0.24);
  box-shadow: none;
}

.inline-controls button.secondary-action:hover,
button.secondary-action:hover {
  background: rgba(14, 165, 164, 0.14);
  border-color: rgba(14, 165, 164, 0.36);
}

.advanced-jobs {
  margin-top: 14px;
}

.advanced-jobs summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 10px;
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.module-card {
  border: 1px solid rgba(187, 213, 232, 0.76);
  border-radius: 24px;
  padding: 16px;
  background:
    radial-gradient(circle at 92% 10%, rgba(48, 145, 255, 0.18), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.9));
  text-align: left;
  box-shadow: 0 14px 36px rgba(16, 52, 78, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(38, 132, 255, 0.46);
  box-shadow: 0 20px 48px rgba(16, 52, 78, 0.14);
}

.module-card strong {
  display: block;
  font-size: 16px;
}

.module-card small {
  color: var(--muted);
}

.module-card .meter {
  height: 8px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 235, 244, 0.9);
}

.module-card .meter span {
  display: block;
  height: 100%;
  background: var(--green);
}

.module-card.warning .meter span,
.module-card.running .meter span {
  background: var(--yellow);
}

.module-card.empty .meter span,
.module-card.failed .meter span {
  background: var(--red);
}

.module-detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #f9fbfd;
  overflow: auto;
}

.module-actions,
.module-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.module-links a {
  color: #1b5dbf;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.module-table td,
.module-table th {
  border-bottom: 1px solid var(--line);
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice {
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.notice.bad {
  border-left-color: var(--red);
}

.notice.ok {
  border-left-color: var(--green);
}

.notice-head,
.notice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.notice-head span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  color: var(--muted);
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.notice-grid span,
.notice-detail {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 9px 10px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.88), rgba(255, 255, 255, 0.86));
}

.notice-ai-comment {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.55;
}

.notice-ai-comment small {
  white-space: pre-wrap;
}

.notice-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

:root[data-theme="dark"] .notice {
  background: linear-gradient(145deg, rgba(20, 32, 50, 0.96), rgba(12, 22, 36, 0.94));
  border-color: rgba(96, 165, 250, 0.25);
  color: #edf5ff;
}

:root[data-theme="dark"] .notice-head span,
:root[data-theme="dark"] .notice-grid span,
:root[data-theme="dark"] .notice-detail {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
  color: #cbd7e8;
}

:root[data-theme="dark"] .notice-ai-comment small {
  color: #d7e4f5;
}

.notification-top-btn {
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(236, 253, 245, 0.94));
  color: #0f3b5f;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.08);
}

.notification-top-btn.alert {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, #fff1f2, #fee2e2);
  color: #991b1b;
}

.progress-panel {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #f7fcff, #f7fff9);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.progress-track {
  height: 10px;
  background: #e7eef5;
  border-radius: 999px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15b88a, #2d7ff9);
  transition: width 0.35s ease;
}

.page-with-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.main-card {
  min-width: 0;
}

.side-rail {
  position: sticky;
  top: 70px;
  display: grid;
  gap: 12px;
}

.side-rail h3 {
  margin: 0 0 4px;
}

.vertical-actions {
  display: grid;
  gap: 8px;
}

.daily-report-list {
  display: grid;
  gap: 10px;
}

.daily-report-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffdf5;
}

.daily-report-card small {
  color: var(--muted);
  line-height: 1.35;
}

.compact-jobs {
  max-height: 240px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 10, 18, 0.55);
}

.modal-panel {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}

.large-modal {
  width: min(1180px, 96vw);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal-head h3 {
  margin: 0;
}

.modal-panel .aril-feature-content {
  margin: 0;
  border: 0;
  border-radius: 0 0 20px 20px;
}

.active-aril-job-panel {
  width: min(720px, 94vw);
  overflow: hidden;
}

.active-huawei-backfill-panel {
  max-height: min(92vh, 920px);
  overflow-y: auto;
  overflow-x: hidden;
}

.active-huawei-backfill-panel .active-aril-job-body {
  max-height: none;
}

.active-aril-job-body {
  padding: 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(42, 181, 124, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(247, 252, 255, 0.98), rgba(255, 252, 241, 0.96));
}

.active-aril-job-lead {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.active-aril-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.active-aril-job-grid div,
.active-aril-progress-card {
  border: 1px solid rgba(104, 143, 176, 0.22);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 42px rgba(28, 57, 86, 0.08);
}

.active-aril-job-grid span,
.active-aril-progress-head span,
.active-aril-progress-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.active-aril-job-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
}

.active-aril-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.active-aril-progress-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 132, 166, 0.16);
}

.active-aril-progress-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2ab57c, #3aa7ff);
}

.active-aril-progress-bar.indeterminate i {
  animation: aril-progress-slide 1.35s ease-in-out infinite alternate;
}

.active-huawei-backfill-banner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 360px) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(42, 177, 126, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(235, 255, 246, 0.96), rgba(239, 248, 255, 0.94));
  box-shadow: 0 18px 36px rgba(13, 71, 112, 0.08);
}

.active-huawei-backfill-banner strong,
.active-huawei-backfill-banner span {
  display: block;
}

.active-huawei-backfill-banner span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.active-huawei-banner-actions,
.modal-head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.active-huawei-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
}

.active-huawei-progress i {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18bf7a, #22a7f0);
}

.active-huawei-progress.indeterminate i {
  animation: aril-progress-slide 1.35s ease-in-out infinite alternate;
}

.active-huawei-backfill-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.active-huawei-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.active-huawei-detail-grid span {
  border: 1px solid rgba(23, 96, 128, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #52627a;
  padding: 10px 12px;
  font-size: 12px;
}

.active-huawei-detail-grid strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  margin-top: 3px;
}

.active-huawei-backfill-detail h4 {
  margin: 2px 0 0;
  color: #12314a;
  font-size: 14px;
}

.active-huawei-completed-list {
  max-height: 190px;
  overflow: auto;
  border: 1px solid rgba(23, 96, 128, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.active-huawei-completed-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.active-huawei-completed-list th,
.active-huawei-completed-list td {
  border-bottom: 1px solid rgba(23, 96, 128, 0.1);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.active-huawei-completed-list th {
  position: sticky;
  top: 0;
  background: rgba(240, 249, 255, 0.95);
  color: #31516b;
}

.active-huawei-completed-list p {
  margin: 0;
  padding: 12px;
  color: #64748b;
}

@keyframes aril-progress-slide {
  from { transform: translateX(-10%); }
  to { transform: translateX(150%); }
}

.active-aril-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .active-aril-job-grid {
    grid-template-columns: 1fr;
  }
}

/* EPDK lisans sorgulama: harita ve tabloyu ayni calisma yuzeyinde tutar. */
.license-query-shell { max-width: 1500px; margin: 0 auto; padding: 24px; color: #17364d; }
.license-query-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px; border: 1px solid #b9d8e9; border-radius: 24px; background: linear-gradient(120deg, #f8fcff 0%, #e7f5fc 54%, #dceeff 100%); box-shadow: 0 18px 46px rgba(31, 77, 110, .09); }
.license-query-hero h1 { margin: 5px 0 8px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -1.8px; }
.license-query-hero p { max-width: 650px; margin: 0; color: #55738a; font-size: 15px; line-height: 1.55; }
.license-query-hero-actions, .license-query-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.license-query-hero button, .license-query-actions button, .license-query-import button { border: 1px solid #9bcce5; border-radius: 11px; padding: 10px 14px; background: #fff; color: #0f4f76; font-weight: 800; cursor: pointer; }
.license-query-hero button:first-child, .license-query-actions button:first-child { color: #fff; border-color: #087e81; background: #078b8c; }
.license-query-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0; }
.license-query-kpis article { min-height: 100px; padding: 17px; border: 1px solid #c8e1ee; border-radius: 18px; background: linear-gradient(135deg, #fff, #edf8fc); }
.license-query-kpis span, .license-query-kpis small { display: block; color: #628197; font-size: 12px; }
.license-query-kpis strong { display: block; margin: 9px 0 3px; color: #123b59; font-size: 27px; }
.license-query-controls { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(145px, 1fr)) auto auto; gap: 10px; align-items: end; padding: 16px; border: 1px solid #d1e5ef; border-radius: 18px; background: rgba(255,255,255,.84); }
.license-query-controls label { display: grid; gap: 5px; color: #5d778b; font-size: 12px; font-weight: 700; }
.license-query-controls input, .license-query-controls select, .license-query-import input, .license-query-import select { min-height: 38px; border: 1px solid #c5dce9; border-radius: 9px; padding: 0 10px; color: #193e57; background: #fff; }
.license-query-controls .license-check { display: flex; align-items: center; gap: 7px; padding-bottom: 10px; white-space: nowrap; }
.license-query-import { display: grid; grid-template-columns: auto 1fr 150px auto; align-items: center; gap: 12px; margin-top: 13px; padding: 13px 16px; border: 1px solid #a7dbd2; border-radius: 15px; background: #effbf7; }
.license-query-import span { color: #52716e; font-size: 12px; }
.license-query-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .65fr); gap: 16px; margin-top: 16px; }
.license-query-table-card, .license-query-detail-card, .license-query-map-card, .license-query-runs-card { padding: 18px; border: 1px solid #cae0ec; border-radius: 20px; background: rgba(255,255,255,.86); box-shadow: 0 12px 30px rgba(35, 81, 109, .06); }
.license-query-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.license-query-section-head h2 { margin: 3px 0 0; color: #143c58; font-size: 18px; }
.license-query-section-head small { color: #647f91; text-align: right; }
.license-query-table-card .scroll-table { min-height: 370px; max-height: 560px; }
.license-query-table-card table { min-width: 980px; }
.license-query-table-card tbody tr { cursor: pointer; }
.license-query-table-card tbody tr:hover, .license-query-table-card tbody tr.active { background: #e5f7f5; }
.license-query-empty { display: grid; min-height: 260px; place-items: center; padding: 18px; border: 1px dashed #b7d8e7; border-radius: 14px; color: #6a8497; line-height: 1.6; text-align: center; }
.license-query-detail-card h3 { margin: 5px 0 13px; color: #143c58; font-size: 21px; }
.license-query-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.license-query-detail-grid div { padding: 9px; border-radius: 10px; background: #f3f9fc; }
.license-query-detail-grid span, .license-query-detail-grid strong { display: block; }
.license-query-detail-grid span { color: #6d8798; font-size: 11px; }
.license-query-detail-grid strong { margin-top: 3px; color: #204c66; font-size: 13px; word-break: break-word; }
.license-query-detail-actions { display: flex; gap: 8px; margin-top: 14px; }
.license-query-detail-actions a { padding: 8px 10px; border: 1px solid #8ecbbb; border-radius: 9px; color: #08756d; background: #f5fffb; font-size: 12px; font-weight: 800; text-decoration: none; }
.license-query-map-card, .license-query-runs-card { margin-top: 16px; }
.license-query-map { min-height: 460px; overflow: hidden; border: 1px solid #b7d9e9; border-radius: 16px; background: radial-gradient(circle at 30% 18%, #e9f9ef 0, #d9eef7 36%, #b8d5e5 100%); }
.license-query-map svg { display: block; width: 100%; height: 460px; }
.license-query-map .map-grid { stroke: rgba(38, 104, 133, .18); stroke-width: 1; }
.license-query-map .map-point { cursor: pointer; stroke: #fff; stroke-width: 1.3; opacity: .9; }
.license-query-map .map-point:hover { stroke: #123b59; stroke-width: 3; }
.license-query-map .map-label { fill: #4d7187; font-size: 13px; font-weight: 700; }
.license-query-map .map-polygon { fill: rgba(8,139,140,.18); stroke: #087e81; stroke-width: 1.4; }
.license-query-runs-card .scroll-table { max-height: 210px; }
@media (max-width: 1050px) { .license-query-kpis { grid-template-columns: repeat(2, 1fr); } .license-query-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } .license-query-workspace { grid-template-columns: 1fr; } .license-query-import { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .license-query-shell { padding: 12px; } .license-query-hero { align-items: flex-start; flex-direction: column; padding: 22px; } .license-query-kpis { grid-template-columns: 1fr; } .license-query-controls { grid-template-columns: 1fr; } .license-query-map, .license-query-map svg { min-height: 330px; height: 330px; } }

/* EPDK kaynak uygulamasıyla uyumlu gerçek Leaflet çalışma yüzeyi. */
.shell.license-map-active { max-width: none; padding: 0; }
.license-source-shell { max-width: none; min-height: calc(100vh - 95px); padding: 0; color: #17364d; }
#panel-licenseQuery.active { display: block !important; }
.license-reference-bar { display: flex; position: relative; z-index: 900; align-items: center; gap: 18px; min-height: 52px; padding: 0 16px; color: #fff; background: #0c6874; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.license-reference-bar > strong { white-space: nowrap; font-size: 16px; }
.license-reference-nav, .license-type-toggle { display: flex; align-items: center; gap: 4px; }
.license-reference-bar button { min-height: 34px; border: 0; border-radius: 7px; padding: 7px 13px; color: #fff; background: rgba(255,255,255,.12); font-weight: 800; cursor: pointer; }
.license-reference-bar button.active { color: #0b5360; background: #fff; }
.license-coordinate-btn { margin-left: 2px; background: #16a34a !important; }
.license-map-count { margin-left: auto; border-radius: 18px; padding: 6px 11px; color: #fff; background: #064e5a; font-size: 12px; font-weight: 800; white-space: nowrap; }
.license-reference-table-view { padding: 16px; }
.license-table-toolbar { display: grid; gap: 12px; }
.license-table-toolbar .license-source-actions { align-items: center; justify-content: flex-start; }
.license-table-toolbar select { min-height: 38px; border: 1px solid #c5dce9; border-radius: 9px; padding: 0 10px; background: #fff; }
.license-source-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 20px 24px; border: 1px solid #b9d9e6; border-radius: 18px; background: linear-gradient(120deg, #f8fcff 0%, #e8f7fb 55%, #d9edf4 100%); }
.license-source-header h1 { margin: 4px 0 7px; color: #0e3b54; font-size: clamp(28px, 3vw, 40px); letter-spacing: -1.4px; }
.license-source-header p { margin: 0; max-width: 720px; color: #527388; }
.license-source-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.license-source-actions button, .license-source-tabs button, .license-draw-tools button, .license-draw-export button { border: 1px solid #a9cddd; border-radius: 9px; padding: 8px 12px; color: #124c6d; background: #fff; font-weight: 800; cursor: pointer; }
.license-source-tabs { display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 12px 0; padding: 7px 10px; border: 1px solid #cae1eb; border-radius: 14px; background: #f8fcfe; }
.license-source-tabs button.active { color: #fff; border-color: #087e81; background: #087e81; }
.license-source-tabs span { margin-left: auto; color: #56748a; font-size: 12px; font-weight: 800; }
.license-source-map-card { position: relative; min-height: calc(100vh - 147px); margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #dcecf4; box-shadow: none; }
.license-map-filter-toolbar { display: flex; position: absolute; z-index: 830; top: 12px; left: 12px; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 72vw; padding: 9px; border: 1px solid #c8dce8; border-radius: 9px; color: #173e56; background: rgba(255,255,255,.95); box-shadow: 0 3px 12px rgba(25,68,95,.18); }
.license-map-filter-toolbar strong { margin-right: 4px; color: #076e73; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.license-map-filter-toolbar label { display: grid; gap: 4px; color: #42667b; font-size: 11px; font-weight: 800; }
.license-map-filter-toolbar select { min-width: 154px; height: 31px; border: 1px solid #a9c8d8; border-radius: 7px; padding: 0 8px; color: #163c52; background: #fff; font: inherit; }
.license-map-filter-toolbar input[type="search"] { width: 190px; height: 31px; border: 1px solid #a9c8d8; border-radius: 7px; padding: 0 9px; }
.license-map-filter-toolbar button { min-height: 31px; padding: 6px 10px; border-color: #91c9bf; color: #08756d; background: #f3fffb; font-size: 12px; }
.license-leaflet-map { min-height: calc(100vh - 147px); height: calc(100vh - 147px); width: 100%; background: #d8ebf3; }
.license-leaflet-map .leaflet-control-zoom a { color: #124c6d; }
.license-map-legend { position: absolute; z-index: 820; right: 12px; bottom: 18px; width: min(230px, calc(100% - 24px)); display: grid; gap: 5px; padding: 11px; border: 1px solid #cae1eb; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(27,70,99,.18); }
.license-map-legend strong { color: #173e56; font-size: 12px; }
.license-legend-item, .license-legend-all { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; padding: 3px 1px; color: #254d64; background: transparent; font-size: 12px; text-align: left; cursor: pointer; }
.license-legend-item.off { opacity: .4; text-decoration: line-through; }
.license-legend-item span { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.license-legend-all { margin-top: 3px; color: #087e81; font-weight: 800; }
.license-draw-tools { position: absolute; z-index: 820; top: 12px; left: 50%; display: flex; align-items: center; gap: 4px; padding: 7px; border: 1px solid #c7dbe5; border-radius: 11px; background: rgba(255,255,255,.95); box-shadow: 0 5px 14px rgba(25,68,95,.19); transform: translateX(-50%); }
.license-draw-tools button { display: grid; width: 32px; height: 31px; place-items: center; padding: 0; font-size: 15px; }
.license-draw-tools i { width: 1px; height: 23px; background: #d4e1e8; }
.license-draw-export { position: absolute; z-index: 820; top: 54px; right: 12px; display: grid; gap: 7px; padding: 10px; border: 1px solid #c7dbe5; border-radius: 11px; background: rgba(255,255,255,.95); box-shadow: 0 5px 14px rgba(25,68,95,.19); }
.license-map-error { display: grid; height: 100%; min-height: 520px; place-content: center; gap: 9px; color: #7b2630; text-align: center; background: #fff6f3; }
.license-map-error button { justify-self: center; border: 1px solid #cf9297; border-radius: 8px; padding: 8px 12px; background: #fff; cursor: pointer; }
.license-draw-export strong { color: #214a62; font-size: 12px; }
.license-draw-export div { display: flex; gap: 6px; }
.license-draw-export select { min-width: 78px; border: 1px solid #bdd7e4; border-radius: 7px; color: #173e56; background: #fff; }
.license-draw-export button { padding: 6px 8px; font-size: 12px; }
.license-leaflet-marker { background: transparent; border: 0; }
.license-leaflet-marker span { display: block; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px rgba(15,42,59,.35); }
.license-leaflet-popup { min-width: 255px; color: #1d435b; font-family: inherit; }
.license-leaflet-popup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.license-leaflet-popup-head strong { color: #113e58; font-size: 14px; line-height: 1.3; }
.license-leaflet-popup-head span { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.license-leaflet-popup dl { display: grid; gap: 5px; margin: 0; }
.license-leaflet-popup dl div { display: grid; grid-template-columns: 78px 1fr; gap: 7px; }
.license-leaflet-popup dt { color: #698294; font-size: 11px; }
.license-leaflet-popup dd { margin: 0; color: #234e67; font-size: 12px; font-weight: 700; }
.license-leaflet-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.license-leaflet-popup-actions a, .license-leaflet-popup-actions button { border: 1px solid #9ccfc3; border-radius: 7px; padding: 6px 8px; color: #08756d; background: #f4fffb; font-size: 11px; font-weight: 800; text-decoration: none; cursor: pointer; }
@media (max-width: 900px) { .license-reference-bar { align-items: flex-start; flex-wrap: wrap; gap: 7px; padding: 9px 10px; } .license-reference-bar > strong { width: 100%; } .license-map-count { position: absolute; top: 10px; right: 10px; } .license-map-filter-toolbar { right: 9px; max-width: none; } .license-map-filter-toolbar input[type="search"], .license-map-filter-toolbar select { width: 100%; } .license-source-map-card, .license-leaflet-map { min-height: calc(100vh - 205px); height: calc(100vh - 205px); } .license-draw-tools { top: 150px; max-width: calc(100% - 18px); overflow-x: auto; } .license-draw-export { top: auto; right: 9px; bottom: 9px; } .license-map-legend { right: 9px; bottom: 102px; } }

/* Huawei v0.8.340 operation layer */
#panel-huaweiFusionSolar .huawei-alarm-kpis {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  gap: 9px;
  overflow-x: auto;
  margin: 14px 0;
}
#panel-huaweiFusionSolar .huawei-alarm-kpis article {
  min-width: 118px;
  padding: 11px;
  border: 1px solid var(--huawei-border, rgba(113,157,194,.26));
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f4fbff);
}
#panel-huaweiFusionSolar .huawei-alarm-kpis small { display: block; color: #61788d; font-size: 11px; font-weight: 800; }
#panel-huaweiFusionSolar .huawei-alarm-kpis strong { display: block; margin-top: 4px; color: #173b57; font-size: 18px; }
.huawei-operation-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0 14px; }
.huawei-alarm-detail { margin-top: 14px; padding: 16px; border: 1px solid rgba(38, 148, 165, .32); border-radius: 16px; background: linear-gradient(135deg, #f0fbfb, #fff); }
.huawei-alarm-detail.hidden { display: none; }
.huawei-alarm-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.huawei-alarm-detail-head strong, .huawei-alarm-detail-head span { display: block; }
.huawei-alarm-detail-head strong { color: #143a56; font-size: 17px; }
.huawei-alarm-detail-head span, .huawei-alarm-detail p, .huawei-alarm-repeats { color: #5c7288; font-size: 13px; line-height: 1.55; }
.huawei-alarm-detail button { border: 1px solid rgba(47, 125, 166, .25); border-radius: 10px; background: #fff; color: #15536f; padding: 7px 10px; font-weight: 800; cursor: pointer; }
.huawei-alarm-action-form { grid-template-columns: repeat(3, minmax(0,1fr)); }
.huawei-alarm-action-form .wide { grid-column: 1 / -1; }
.huawei-alarm-repeats ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 720px) {
  .huawei-operation-filters, .huawei-alarm-action-form { grid-template-columns: 1fr; }
  .huawei-alarm-detail-head { flex-direction: column; }
}

.commission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.commission-grid .feature-card {
  min-width: 0;
}

.commission-tabs {
  margin: 14px 0;
}

.commission-tab-panel {
  display: none;
}

.commission-tab-panel.active {
  display: block;
}

.file-upload-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.file-upload-pill input[type="file"] {
  max-width: 230px;
  font-size: 12px;
}

.chart-wrap {
  position: relative;
}

.dashboard-chart-loading {
  position: absolute;
  inset: 12px;
  z-index: 8;
  border-radius: 24px;
  background: rgba(248, 252, 255, 0.92);
  backdrop-filter: blur(12px);
  display: grid;
  align-content: center;
  padding: 20px;
}

.dashboard-chart-loading.hidden {
  display: none;
}

:root[data-theme="dark"] .dashboard-chart-loading,
:root[data-theme="dark"] .file-upload-pill {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(96, 165, 250, 0.24);
}

.commission-hero {
  background:
    radial-gradient(circle at 12% 10%, rgba(25, 132, 196, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(247, 252, 255, 0.98), rgba(241, 252, 245, 0.94));
}

.license-free-hero {
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(22, 136, 74, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(232,247,241,0.88));
}

.license-free-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(240, 249, 255, 0.88));
  color: #15452f;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.license-free-status-strip strong {
  min-width: 210px;
  font-weight: 800;
}

.license-free-status-strip.info {
  border-color: rgba(59, 130, 246, 0.28);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(240, 253, 244, 0.86));
  color: #173c68;
}

.license-free-status-strip.error {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 251, 235, 0.88));
  color: #7f1d1d;
}

.license-free-executive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.license-free-executive div {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.9), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(240,248,255,0.88));
  box-shadow: 0 15px 36px rgba(15, 23, 42, 0.07);
}

.license-free-executive span,
.license-free-executive small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.license-free-executive strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
  color: var(--ink);
}

#licenseFreeKpis {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.license-free-kpi-card {
  min-height: 116px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(125, 181, 226, 0.36);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .95), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,248,255,.9));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.license-free-kpi-card span,
.license-free-kpi-card small {
  display: block;
}

.license-free-kpi-card span {
  color: #5c7088;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 8px;
}

.license-free-kpi-card strong {
  display: block;
  color: #0f172a;
  font-size: clamp(1.08rem, 1.5vw, 1.45rem);
  line-height: 1.12;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.license-free-kpi-card small {
  color: #64748b;
  font-size: .79rem;
  line-height: 1.45;
}

.license-free-progress {
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .22);
  margin: 10px 0 8px;
}

.license-free-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

.capacity-card {
  display: grid;
  align-content: start;
  gap: 7px;
}

.capacity-factor-row {
  display: grid;
  grid-template-columns: 66px 54px minmax(50px, 1fr);
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 0.76rem;
}

.capacity-factor-row b,
.capacity-factor-row em {
  font-style: normal;
  font-weight: 800;
  color: #123047;
}

.capacity-factor-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .22);
}

.capacity-factor-row u {
  display: block;
  height: 100%;
  border-radius: inherit;
  text-decoration: none;
  background: linear-gradient(90deg, #14b8a6, #22c55e);
}

#licenseFreeTariffPlantSelect {
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 16px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.license-free-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  margin: 0 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 12px 30px rgba(15,23,42,.06);
}

.license-free-tabs button {
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.license-free-tabs button.active {
  color: #07543a;
  border-color: rgba(34, 197, 94, 0.34);
  background: linear-gradient(135deg, rgba(220, 252, 231, .95), rgba(240, 253, 250, .92));
  box-shadow: 0 10px 24px rgba(22, 163, 74, .12);
}

.license-free-subpanel {
  display: none;
}

.license-free-subpanel.active {
  display: block;
}

.license-free-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.license-free-card {
  min-width: 0;
}

.mini-title {
  margin-top: 18px;
}

.mini-title h3 {
  margin: 0;
  font-size: 1rem;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.field-stack button {
  width: 100%;
}

.license-free-plant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.license-free-plant-pills button {
  min-width: 180px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 18px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(240,253,244,.94), rgba(239,246,255,.88));
  text-align: left;
  cursor: pointer;
}

.license-free-plant-pills button.passive {
  opacity: .58;
}

.license-free-plant-pills strong,
.license-free-plant-pills span {
  display: block;
}

.license-free-plant-pills span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}

.license-free-settings-plants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.license-free-layout.collapsed {
  display: none;
}

.history-actions {
  margin: -4px 0 16px;
}

.paste-grid-box {
  width: 100%;
  min-height: 170px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-family: Consolas, "Cascadia Mono", monospace;
  resize: vertical;
}

.license-free-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin: 14px 0 18px;
}

.license-free-chart-grid.stacked {
  grid-template-columns: 1fr;
}

.license-free-chart-grid.stacked .license-free-chart {
  min-height: 340px;
}

.license-free-chart {
  min-height: 280px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #123047;
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.12), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,248,255,.94));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.license-free-chart.small {
  min-height: 280px;
}

:root[data-theme="dark"] .license-free-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 197, 94, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(17, 27, 42, 0.94), rgba(18, 45, 37, 0.88));
}

:root[data-theme="dark"] .license-free-status-strip,
:root[data-theme="dark"] .license-free-executive div {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(16, 42, 35, 0.76));
  color: #dffbea;
  border-color: rgba(96, 165, 250, 0.22);
}

:root[data-theme="dark"] .license-free-tabs,
:root[data-theme="dark"] .license-free-plant-pills button {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(96, 165, 250, 0.22);
}

:root[data-theme="dark"] .license-free-tabs button.active {
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(20,83,45,.78), rgba(15,23,42,.72));
}

:root[data-theme="dark"] .paste-grid-box {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
}

@media (max-width: 1100px) {
  .license-free-layout,
  .license-free-executive,
  .license-free-chart-grid,
  #licenseFreeKpis {
    grid-template-columns: 1fr;
  }
}

.role-permission-table td:first-child {
  min-width: 220px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  font-size: 0.82rem;
  color: var(--text);
}

@media (max-width: 980px) {
  .commission-grid {
    grid-template-columns: 1fr;
  }
}

.market-report-modal-panel {
  width: min(1180px, calc(100vw - 34px));
  max-height: min(88vh, 920px);
  overflow: auto;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.94), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 248, 255, 0.96));
}

.market-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 10px 16px 16px;
  padding: 12px;
  border: 1px solid rgba(190, 216, 235, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.market-report-toolbar label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.market-report-toolbar input,
.market-report-toolbar select {
  min-width: 150px;
}

.market-report-toolbar button {
  min-height: 40px;
}

.market-report-content {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.market-report-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-radius: 30px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(43, 142, 255, 0.28), transparent 34%),
    radial-gradient(circle at 8% 90%, rgba(34, 197, 94, 0.25), transparent 28%),
    linear-gradient(135deg, #07182b, #0d4770 58%, #20a77e);
  box-shadow: 0 20px 45px rgba(8, 36, 66, 0.18);
}

.market-report-hero h2 {
  margin: 6px 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.market-report-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.market-report-badge {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 900;
}

.market-report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.market-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.market-report-card {
  border: 1px solid rgba(190, 216, 235, 0.8);
  border-radius: 26px;
  padding: 16px;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 255, 0.9));
  box-shadow: 0 14px 34px rgba(18, 55, 83, 0.08);
}

.market-report-card.wide {
  min-width: 0;
}

.market-report-card h3 {
  margin: 4px 0 12px;
}

.market-report-commentary {
  color: #223248;
  line-height: 1.58;
}

.report-chart {
  min-height: 320px;
}

.report-pie {
  min-height: 300px;
}

:root[data-theme="dark"] .market-report-modal-panel,
:root[data-theme="dark"] .market-report-card,
:root[data-theme="dark"] .market-report-toolbar {
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.08), transparent 32%),
    linear-gradient(145deg, rgba(20, 32, 50, 0.98), rgba(10, 20, 33, 0.96));
  border-color: rgba(96, 165, 250, 0.3);
  color: #f4f8ff;
}

:root[data-theme="dark"] .market-report-commentary,
:root[data-theme="dark"] .market-report-toolbar label {
  color: #d7e3f4;
}

@media (max-width: 980px) {
  .market-report-kpis,
  .market-report-grid {
    grid-template-columns: 1fr;
  }

  .market-report-toolbar {
    align-items: stretch;
  }

  .market-report-toolbar label,
  .market-report-toolbar button {
    width: 100%;
  }
}

.aril-live-status-card {
  display: grid;
  gap: 12px;
  color: #07152a;
}

.aril-live-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #dfe8f4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 34px rgba(25, 55, 95, 0.08);
}

.aril-live-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dce7f5;
  border-radius: 11px;
  color: #2563eb;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.10);
}

.aril-live-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.aril-live-filters input,
.aril-live-filters select {
  min-height: 36px;
  border: 1px solid #dbe5f1;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: #0f2137;
  font: inherit;
}

.search-field,
.date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe5f1;
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
}

.search-field span,
.date-field span {
  color: #8fa2bc;
}

.search-field input,
.date-field input {
  border: 0;
  padding: 0;
  min-width: 170px;
  outline: 0;
}

.date-field input {
  min-width: 126px;
  font-weight: 700;
}

.aril-live-table-wrap {
  overflow: auto;
  border: 1px solid #dfe8f4;
  border-radius: 14px;
  background: #fff;
}

.aril-live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.aril-live-table th {
  padding: 14px 16px;
  color: #94a3bd;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: left;
  background: #fff;
  border-bottom: 1px solid #e7edf5;
}

.aril-live-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.aril-live-table tr:hover td {
  background: #f8fbff;
}

.aril-live-count {
  display: inline-block;
  color: #009c72;
  font-weight: 800;
  min-width: 30px;
}

.aril-live-table td small {
  display: block;
  margin-top: 2px;
  color: #8290a6;
}

.aril-live-empty {
  color: #a8b3c4;
  font-weight: 800;
}

.aril-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.aril-live-pill.ok {
  color: #00935f;
  background: #e7fbf2;
}

.aril-live-pill.warn {
  color: #b36b00;
  background: #fff3d8;
}

.aril-live-pill.bad {
  color: #e02020;
  background: #fff0f0;
}

.aril-live-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  color: #7a8ba3;
  font-size: 12px;
}

.aril-live-footer select {
  height: 30px;
  margin: 0 4px;
  border: 1px solid #dde7f4;
  border-radius: 9px;
  background: #fff;
}

.aril-live-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aril-live-pagination button {
  min-width: 30px;
  height: 30px;
  border: 1px solid #e4ebf5;
  border-radius: 9px;
  color: #4f6178;
  background: #fff;
}

.aril-live-pagination button:disabled {
  opacity: 0.42;
}

.aril-live-pagination strong {
  min-width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dfe8f4;
  border-radius: 9px;
  color: #12233b;
  background: #fff;
}

.aril-alarm-notice .notice {
  margin: 0;
}

pre,
.job-list {
  max-height: 260px;
  overflow: auto;
  color: #26313e;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

#changelogText {
  max-height: 620px;
}

.job {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.epys-actions {
  margin: 12px 0 16px;
}

.panel-title {
  flex-wrap: wrap;
}

.panel-title > div:first-child {
  min-width: 220px;
}

.panel-title .inline-controls {
  flex: 1;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .topbar nav {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-signal {
    grid-template-columns: 1fr;
  }

  .rec-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .shell {
    max-width: 100%;
    padding: 18px;
  }

  .panel-title .inline-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .hero,
  .ops-grid,
  .rec-grid,
  .agent-grid,
  .agent-tables {
    grid-template-columns: 1fr;
  }

  .ops-agent-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar nav,
  .ios-nav {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    z-index: 10030;
    display: none;
    width: auto;
    max-height: calc(100vh - 92px);
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 22px;
    background: var(--nav-menu-bg);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    backdrop-filter: blur(22px) saturate(1.25);
  }

  body.mobile-nav-open .topbar nav,
  body.mobile-nav-open .ios-nav {
    display: grid;
    gap: 8px;
  }

  .topbar nav .nav-link,
  .topbar nav .nav-group,
  .topbar nav .nav-group-btn {
    width: 100%;
  }

  .topbar nav .nav-link {
    justify-content: flex-start;
  }

  .nav-menu {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 6px;
    overflow: visible;
    border-radius: 16px;
    box-shadow: none;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .actions > * {
    flex: 0 0 auto;
  }

  .health-menu-wrap {
    position: static;
  }

  .system-health-popover {
    position: fixed;
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 88px);
    overflow: auto;
  }

  .health-connection-grid {
    grid-template-columns: 1fr;
  }

  .user-badge {
    max-width: 220px;
  }

  .shell {
    padding: 14px;
  }

  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-title > div:first-child {
    min-width: 0;
  }

  .inline-controls,
  .date-grid,
  .two-col-grid,
  .settings-form,
  .job-buttons {
    grid-template-columns: 1fr;
  }

  .inline-controls {
    align-items: stretch;
    width: 100%;
  }

  .inline-controls label,
  .inline-controls button,
  .inline-controls a,
  .job-buttons button {
    width: 100%;
  }

  .module-cards {
    grid-template-columns: 1fr;
  }

  .module-actions button,
  .module-links a {
    flex: 1 1 100%;
    text-align: center;
  }

  .scroll-table,
  .module-detail,
  pre,
  .job-list {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .scroll-table table,
  .module-table {
    min-width: 720px;
  }

  .chart-panel {
    padding: 14px;
  }

  canvas {
    height: min(360px, 66vh);
  }

  .series-toggles {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .series-toggles button {
    flex: 0 0 auto;
  }

  .rec-grid,
  .mini-rec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .chart-settings-fields,
  .chart-series-settings { grid-template-columns: 1fr; }
  .chart-settings-popover { right: -5px; }
}

@media (max-width: 560px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 10010;
    padding: 7px 10px;
  }

  .brand {
    width: auto;
    max-width: 48vw;
  }

  .brand-logo-img {
    width: 112px;
    max-width: 38vw;
  }

  .brand-ai-badge {
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .topbar nav,
  .ios-nav {
    top: 66px;
    left: 8px;
    right: 8px;
    width: auto;
    flex: none;
    padding: 10px;
  }

  .actions {
    width: auto;
    flex: 1 1 42%;
    justify-content: flex-end;
  }

  .nav-menu {
    padding: 8px;
  }

  .status-bar {
    top: 0;
    padding: 8px 12px;
    font-size: 12px;
  }

  .shell {
    padding: 10px;
  }

  .hero {
    gap: 12px;
  }

  .gauge-card,
  .signal-card,
  .chart-panel,
  .recommendations,
  .ops-grid article,
  .feature-card,
  .admin-card {
    border-radius: 14px;
  }

  .gauge-card {
    padding: 12px;
  }

  .gauge {
    width: 104px;
    height: 104px;
    border-width: 10px;
  }

  .gauge-card strong,
  .signal-card strong {
    font-size: 24px;
  }

  .signal-card {
    min-height: 128px;
    padding: 16px;
  }

  .login-panel {
    padding: 14px;
  }

  .login-card {
    padding: 20px;
    border-radius: 18px;
  }

  button,
  input,
  select,
  textarea {
    min-height: 42px;
    font-size: 15px;
  }

  .module-table td,
  .module-table th,
  .scroll-table th,
  .scroll-table td {
    padding: 9px 10px;
    font-size: 12px;
  }

.rec-grid,
.mini-rec-grid {
    grid-template-columns: 1fr;
  }
}

.status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0 16px;
}

.status-filter label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.aril-summary-table tbody tr {
  cursor: pointer;
}

.aril-summary-table tbody tr:hover {
  background: #fff8d9;
}

.tiny-button {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

.osos-bar {
  position: relative;
  min-width: 180px;
  height: 20px;
  border: 1px solid #8fa0a8;
  background: #f6f8f9;
  overflow: hidden;
}

.osos-bar span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(45deg, #39c5ab 0, #39c5ab 6px, #65d7c5 6px, #65d7c5 12px);
}

.osos-bar.danger span {
  background: repeating-linear-gradient(45deg, #ff5b72 0, #ff5b72 6px, #ff8798 6px, #ff8798 12px);
}

.osos-bar b {
  position: absolute;
  left: 6px;
  top: 1px;
  font-size: 12px;
  color: #003d33;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.status-pill.ok {
  background: #c7f5d5;
  color: #066122;
}

.status-pill.warn {
  background: #fff2bd;
  color: #765100;
}

.status-pill.bad {
  background: #ffd6dc;
  color: #8a1022;
}

.status-pill.neutral {
  background: #e9eef5;
  color: #445064;
}

.aril-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.aril-side-rail .aril-feature-card {
  width: 100%;
}

.aril-feature-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid rgba(71, 164, 204, 0.35);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 16%, rgba(70, 199, 217, 0.22), transparent 34%),
    linear-gradient(145deg, #071929, #0d2035 58%, #102a43);
  color: #f5fbff;
  text-align: left;
  box-shadow: 0 16px 42px rgba(2, 17, 34, 0.18);
}

.aril-feature-card:hover,
.aril-feature-card.active {
  transform: translateY(-2px);
  border-color: rgba(97, 220, 255, 0.78);
  box-shadow: 0 18px 48px rgba(0, 82, 132, 0.28), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.aril-feature-card .feature-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: rgba(91, 206, 240, 0.18);
  color: #79e4ff;
  font-weight: 900;
}

.aril-feature-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.aril-feature-card small {
  display: block;
  color: #d6e8f2;
  line-height: 1.45;
}

.aril-feature-card em {
  display: block;
  margin-top: 12px;
  color: #8ef7c7;
  font-style: normal;
  font-weight: 800;
}

.aril-feature-content {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.aril-feature-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.aril-feature-head div {
  padding: 12px;
  border-radius: 14px;
  background: #eef9ff;
}

.aril-feature-head small {
  display: block;
  color: var(--muted);
}

.aril-feature-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.aril-heatmap-wrap {
  overflow-x: auto;
}

.aril-heatmap {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 3px;
}

.aril-heatmap th,
.aril-heatmap td {
  min-width: 34px;
  padding: 6px 5px;
  border: 0;
  border-radius: 7px;
  text-align: center;
  font-size: 11px;
}

.aril-heatmap td.ok {
  background: rgba(33, 176, 124, var(--heat));
  color: #05281c;
}

.aril-heatmap td.warn {
  background: rgba(255, 190, 64, 0.82);
  color: #553800;
}

.aril-heatmap td.bad {
  background: rgba(239, 76, 97, 0.88);
  color: #fff;
}

.imbalance-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.report-heatmap-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(245, 252, 255, .96), rgba(237, 249, 244, .84));
}

.report-heatmap-card h3 { margin: 0; font-size: 15px; }
.report-heatmap-card p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; }
.imbalance-heatmap-chart { min-height: 290px; }

@media (max-width: 900px) {
  .imbalance-heatmap-grid { grid-template-columns: 1fr; }
}

.danger-outline {
  border-color: #ffb6bf !important;
  color: #b4233a !important;
  background: #fff6f7 !important;
}

.aril-portfolio-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) 180px repeat(3, auto);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.aril-portfolio-toolbar label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.aril-portfolio-toolbar input,
.aril-portfolio-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.aril-portfolio-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
}

.aril-portfolio-table td {
  vertical-align: top;
}

.aril-custom-export-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 10%, rgba(16, 185, 129, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.aril-custom-export-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.aril-custom-export-head small {
  color: #0f766e;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aril-custom-export-head h4 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.aril-custom-export-head p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

.aril-custom-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.aril-custom-export-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.aril-custom-export-grid .span-2 {
  grid-column: span 2;
}

.aril-custom-export-grid input,
.aril-custom-export-grid textarea,
.aril-custom-export-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.aril-custom-export-actions {
  margin: 14px 0 10px;
}

.aril-custom-export-actions button.action-primary {
  border: 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  font-weight: 900;
}

.aril-custom-export-actions button.action-success {
  border: 0;
  background: linear-gradient(135deg, #059669, #22c55e);
  color: #fff;
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.22);
  font-weight: 900;
}

.aril-custom-progress {
  margin: 12px 0;
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.96));
}

.aril-custom-progress.success {
  border-color: rgba(34, 197, 94, 0.36);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 253, 244, 0.98));
}

.aril-custom-progress.failed {
  border-color: rgba(239, 68, 68, 0.34);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 247, 237, 0.98));
}

.aril-custom-progress .progress-track span {
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.aril-custom-progress.indeterminate .progress-track span {
  width: 42% !important;
  animation: arilCustomProgressSweep 1.25s ease-in-out infinite;
}

@keyframes arilCustomProgressSweep {
  0% { transform: translateX(-115%); }
  50% { transform: translateX(35%); }
  100% { transform: translateX(165%); }
}

.aril-meter-detail-empty,
.aril-meter-detail-card {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.aril-meter-detail-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.aril-meter-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.aril-meter-detail-title h4 {
  margin: 3px 0 5px;
  font-size: 18px;
}

.aril-meter-detail-title p {
  margin: 0;
  color: var(--muted);
}

.aril-meter-chart-wrap {
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid #dce9f6;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fcff, #eef7ff);
}

.aril-meter-chart {
  width: 100%;
  height: 260px;
  display: block;
}

.aril-chart-metrics,
.aril-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #567085;
  font-size: 12px;
}

.aril-chart-metrics span {
  border: 1px solid #dce9f6;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.8);
}

.aril-chart-metrics b {
  color: #09263f;
}

.aril-chart-grid {
  stroke: #d9e7f3;
  stroke-width: 1;
}

.aril-chart-y-label,
.aril-chart-x-label,
.aril-chart-axis-title {
  fill: #63758a;
  font-size: 11px;
  font-weight: 700;
}

.aril-chart-y-label {
  text-anchor: end;
}

.aril-chart-x-label {
  text-anchor: end;
}

.aril-chart-dot {
  stroke: #ffffff;
  stroke-width: 1.8;
}

.aril-chart-dot.real,
.aril-chart-legend i.real {
  fill: #0b8f6a;
  background: #0b8f6a;
}

.aril-chart-dot.estimated,
.aril-chart-legend i.estimated {
  fill: #f59e0b;
  background: #f59e0b;
}

.aril-chart-legend {
  margin-top: 6px;
}

.aril-chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.aril-chart-legend small {
  color: var(--muted);
}

.aril-meter-hourly {
  max-height: 270px;
}

@media (max-width: 900px) {
  .page-with-side {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
  }

  .aril-feature-grid,
  .aril-feature-head {
    grid-template-columns: 1fr;
  }

  .aril-portfolio-toolbar,
  .aril-portfolio-layout {
    grid-template-columns: 1fr;
  }

  .aril-custom-export-head,
  .aril-custom-export-grid {
    grid-template-columns: 1fr;
  }

  .aril-custom-export-grid .span-2 {
    grid-column: auto;
  }

  .smartlogger-scada-grid,
  .smartlogger-detail-layout {
    grid-template-columns: 1fr;
  }
}

.report-section {
  margin-top: 14px;
  border: 1px solid #d6e0ec;
  border-radius: 16px;
  padding: 10px 14px 14px;
  background: #fbfdff;
}
.report-section summary {
  cursor: pointer;
  font-weight: 800;
  padding: 8px 0;
}
.missing-data-page {
  background: linear-gradient(135deg, #f9fcff 0%, #ffffff 45%, #f2fbf7 100%);
}
.missing-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.summary-grid > div {
  background: #eef8ff;
  border: 1px solid #d2e7f3;
  border-radius: 12px;
  padding: 10px;
}

.summary-grid small,
.summary-grid strong {
  display: block;
}

.summary-grid em {
  display: block;
  color: #476173;
  font-size: 11px;
  font-style: normal;
  margin-top: 3px;
}

.distribution-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.distribution-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.distribution-account-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(180, 199, 218, 0.75);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.92));
  box-shadow: 0 12px 28px rgba(12, 36, 54, 0.08);
}

.distribution-account-card.default {
  border-color: rgba(20, 163, 101, 0.45);
  background: linear-gradient(145deg, rgba(239, 255, 246, 0.98), rgba(230, 248, 255, 0.94));
}

.distribution-account-card span,
.distribution-account-card small {
  display: block;
  color: var(--muted);
}

.distribution-account-card strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
}

.distribution-account-card em {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 131, 79, 0.12);
  color: #087647;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.distribution-account-card .inline-controls {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.distribution-account-editor {
  margin-bottom: 16px;
}

.distribution-plant-card {
  text-align: left;
  border: 1px solid #b9d8ee;
  border-radius: 18px;
  padding: 14px;
  color: #08283d;
  background:
    radial-gradient(circle at 92% 12%, rgba(40, 167, 220, 0.22), transparent 26%),
    linear-gradient(135deg, #f7fcff 0%, #e9f8f0 100%);
  box-shadow: 0 14px 30px rgba(14, 57, 82, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.distribution-plant-card:hover {
  transform: translateY(-2px);
  border-color: #2389d7;
  box-shadow: 0 18px 38px rgba(14, 57, 82, 0.14);
}

.distribution-plant-card span,
.distribution-plant-card small {
  display: block;
  color: #587083;
  font-size: 12px;
}

.distribution-plant-card strong {
  display: block;
  margin: 4px 0 10px;
  font-size: 16px;
}

.distribution-plant-card b {
  color: #00885d;
}

.smartlogger-group-card {
  cursor: default;
}

.smartlogger-group-card:hover {
  transform: none;
}

.compact-launchpad {
  margin-bottom: 16px;
}

.smartlogger-grid {
  margin-bottom: 16px;
}

.aril-live-strip {
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 253, 245, 0.86));
}

[data-theme="dark"] .aril-live-strip {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(22, 78, 99, 0.42));
  border-color: rgba(125, 211, 252, 0.22);
  color: #e5eef9;
}

.smartlogger-scada-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.smartlogger-scada-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-bottom: 16px;
}

.smartlogger-section {
  display: none;
}

.smartlogger-section.active {
  display: block;
}

.smartlogger-tabs .admin-ios-card {
  cursor: pointer;
}

.smartlogger-tabs .admin-ios-card.active {
  border-color: rgba(14, 165, 233, 0.62);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.18);
  transform: translateY(-1px);
}

.smartlogger-kpi-panel,
.smartlogger-control-panel,
.smartlogger-form-card,
.smartlogger-detail-block {
  border: 1px solid rgba(183, 211, 232, 0.8);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(255,255,255,0.97), rgba(235,246,255,0.9));
  box-shadow: 0 18px 44px rgba(10, 40, 68, 0.10);
}

.smartlogger-kpi-panel,
.smartlogger-control-panel {
  padding: 18px;
}

.smartlogger-kpi-panel h3,
.smartlogger-control-panel h3 {
  margin-top: 0;
}

.smartlogger-control-form,
.smartlogger-device-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.smartlogger-bars {
  display: grid;
  gap: 12px;
}

.smartlogger-bar-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(239, 246, 255, 0.94));
}

.smartlogger-bar-row strong {
  display: block;
  color: #0f2f4a;
}

.smartlogger-bar-row small {
  color: #53657a;
}

.smartlogger-bar-track {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.smartlogger-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.smartlogger-bar-track.load span {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.smartlogger-form-card {
  margin-bottom: 14px;
  padding: 0 16px 16px;
}

.smartlogger-form-card summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 800;
}

.smartlogger-detail-sheet {
  width: min(1240px, calc(100vw - 32px));
  max-height: min(92vh, 920px);
  overflow: auto;
}

.smartlogger-detail-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(420px, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}

.smartlogger-detail-block {
  padding: 16px;
}

.smartlogger-detail-block h4,
.smartlogger-detail-block h5 {
  margin: 0 0 10px;
}

.smartlogger-mini-grid {
  display: grid;
  gap: 14px;
}

.smartlogger-etso-input {
  min-height: 36px;
  width: 100%;
  border: 1px solid #cad9ea;
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.9);
}

[data-theme="dark"] .smartlogger-kpi-panel,
[data-theme="dark"] .smartlogger-control-panel,
[data-theme="dark"] .smartlogger-form-card,
[data-theme="dark"] .smartlogger-detail-block {
  background: linear-gradient(155deg, rgba(22,34,50,0.96), rgba(28,46,68,0.94));
  border-color: rgba(71, 102, 136, 0.65);
}

[data-theme="dark"] .smartlogger-bar-row {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .smartlogger-bar-row strong {
  color: #e5eef9;
}

[data-theme="dark"] .smartlogger-bar-row small {
  color: #aebbd0;
}

[data-theme="dark"] .smartlogger-etso-input {
  background: rgba(14, 24, 38, 0.92);
  border-color: rgba(77, 104, 131, 0.7);
  color: #eef4fb;
}

.linklike {
  border: 0;
  background: transparent;
  color: #0b69b7;
  cursor: pointer;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.linklike:hover {
  text-decoration: underline;
}

.live-cockpit {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.55fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.live-cockpit > .live-energy-bubble,
.live-cockpit > #liveNationalEnergyPanel,
.live-cockpit > #liveGopBotLearningPanel,
.live-cockpit > .live-ptf-projection,
.live-cockpit > .live-market-price-bubble,
.live-cockpit > #liveMarketPricePanel {
  grid-column: 1 / -1;
}

#liveGopBotLearningPanel,
.live-cockpit > #liveGopBotLearningPanel {
  width: 100%;
  max-width: 100%;
}

.live-market-price-bubble {
  padding: 18px;
  border: 1px solid rgba(47, 128, 237, 0.20);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 8%, rgba(47, 128, 237, 0.18), transparent 34%),
    radial-gradient(circle at 8% 96%, rgba(16, 185, 129, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.94), rgba(239,248,255,0.86));
  box-shadow: 0 24px 65px rgba(31, 58, 94, 0.14);
  backdrop-filter: blur(18px) saturate(1.12);
}

.market-price-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.7fr);
  gap: 16px;
  margin-top: 14px;
}

.market-price-map-card,
.market-price-rank-card,
.market-price-hourly-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,0.95), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,0.84), rgba(241,247,255,0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 16px 38px rgba(30, 64, 100, 0.08);
}

.market-price-map {
  min-height: 520px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(238,246,255,0.9), rgba(255,255,255,0.75));
}

.market-price-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.market-price-map-head small,
.market-price-map-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.market-price-map-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.market-price-map-skeleton {
  width: 100%;
  min-height: 520px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 28% 36%, rgba(47,128,237,0.16), transparent 18%),
    radial-gradient(circle at 58% 42%, rgba(16,185,129,0.13), transparent 20%),
    linear-gradient(90deg, rgba(226,232,240,0.35), rgba(255,255,255,0.78), rgba(226,232,240,0.35));
  background-size: 100% 100%, 100% 100%, 220% 100%;
  animation: marketPriceShimmer 1.35s ease-in-out infinite;
}

.market-price-rank-card h3,
.market-price-hourly-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
}

.market-price-ranking {
  max-height: 470px;
  overflow: auto;
}

.market-price-ranking table {
  width: 100%;
}

.market-price-ranking tr {
  cursor: pointer;
}

.market-price-ranking tr:hover {
  background: rgba(47, 128, 237, 0.08);
}

.market-price-badge {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.market-price-empty {
  color: var(--muted);
}

.market-price-hourly-card {
  margin-top: 16px;
}

.market-price-hourly-chart {
  min-height: 260px;
}

.app-loading,
.market-price-loading {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 18%, rgba(47,128,237,0.15), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(238,248,255,0.78));
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 20px 48px rgba(30, 64, 100, 0.10);
}

.app-loading strong,
.app-loading span,
.market-price-loading strong,
.market-price-loading span {
  display: block;
}

.app-loading strong,
.market-price-loading strong {
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 4px;
}

.app-loading span,
.market-price-loading span {
  color: var(--muted);
  font-size: 13px;
}

.app-loading-spinner,
.market-price-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background:
    conic-gradient(from 0deg, #2f80ed, #22c55e, rgba(47,128,237,0.08), #2f80ed);
  position: relative;
  animation: marketPriceSpin 0.95s linear infinite;
}

.app-loading-spinner::after,
.market-price-spinner::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: rgba(255,255,255,0.96);
}

.app-loading-grid,
.market-price-loading-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.app-loading-grid i,
.market-price-loading-grid i {
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(226,232,240,0.45), rgba(255,255,255,0.86), rgba(226,232,240,0.45));
  background-size: 220% 100%;
  animation: marketPriceShimmer 1.35s ease-in-out infinite;
}

.gop-offer-live-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(47,128,237,0.10), rgba(34,197,94,0.10));
  border: 1px solid rgba(47,128,237,0.18);
  color: var(--ink);
}

.gop-offer-live-status strong,
.gop-offer-live-status small {
  display: block;
}

.gop-offer-live-status small {
  color: var(--muted);
  margin-top: 2px;
}

.health-loading,
.live-energy-loading {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(47,128,237,0.12), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(238,248,255,0.78));
  color: var(--muted);
  box-shadow: 0 14px 32px rgba(30, 64, 100, 0.08);
}

.health-loading::before,
.live-energy-loading::before {
  content: "";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, #2f80ed, #22c55e, rgba(47,128,237,0.08), #2f80ed);
  animation: marketPriceSpin 0.95s linear infinite;
}

@keyframes marketPriceSpin {
  to { transform: rotate(360deg); }
}

@keyframes marketPriceShimmer {
  0% { background-position: 110% 0; }
  100% { background-position: -110% 0; }
}

:root[data-theme="dark"] .live-market-price-bubble,
:root[data-theme="dark"] .market-price-map-card,
:root[data-theme="dark"] .market-price-rank-card,
:root[data-theme="dark"] .market-price-hourly-card {
  color: #eaf2ff;
  border-color: #314762;
  background:
    radial-gradient(circle at 92% 10%, rgba(38, 132, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #19263b, #121d2d);
}

:root[data-theme="dark"] .market-price-map,
:root[data-theme="dark"] .market-price-map-head,
:root[data-theme="dark"] .app-loading,
:root[data-theme="dark"] .health-loading,
:root[data-theme="dark"] .live-energy-loading,
:root[data-theme="dark"] .market-price-loading {
  background:
    radial-gradient(circle at 18% 18%, rgba(47,128,237,0.12), transparent 34%),
    linear-gradient(145deg, rgba(22,34,52,0.94), rgba(14,25,40,0.86));
  border-color: #314762;
}

:root[data-theme="dark"] .app-loading-spinner::after,
:root[data-theme="dark"] .market-price-spinner::after {
  background: #121d2d;
}

.live-hero-card,
.live-summary-grid,
.live-insight-strip,
.admin-ios-hero,
.admin-ios-launchpad,
.ptf-chart-card,
.ptf-performance-panel {
  border: 1px solid rgba(183, 211, 232, 0.74);
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 247, 255, 0.88));
  box-shadow: 0 22px 55px rgba(18, 55, 83, 0.11);
  backdrop-filter: blur(18px) saturate(1.12);
}

.live-hero-card {
  border-radius: 32px;
  padding: 24px;
  min-height: 230px;
  background:
    radial-gradient(circle at 88% 12%, rgba(43, 142, 255, 0.28), transparent 34%),
    radial-gradient(circle at 14% 92%, rgba(34, 197, 94, 0.24), transparent 32%),
    linear-gradient(145deg, #07182b 0%, #0e3555 56%, #eaf7ff 170%);
  color: #fff;
}

.live-hero-card small,
.admin-ios-hero .eyebrow,
.ptf-chart-head .eyebrow,
.ptf-performance-head .eyebrow {
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-hero-card h1 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.live-hero-card p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
}

.live-shortcut-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.live-pill-button,
.admin-ios-actions button,
.admin-ios-card {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 8px 20px rgba(4, 20, 37, 0.12);
}

.live-pill-button {
  padding: 10px 14px;
  color: #fff;
}

.market-report-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(31, 159, 117, 0.34));
  border-color: rgba(255, 255, 255, 0.82);
}

.live-pill-button:hover,
.admin-ios-actions button:hover,
.admin-ios-card:hover {
  transform: translateY(-2px);
}

.live-summary-grid {
  border-radius: 30px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.live-summary-grid > article,
.live-kpi-card {
  min-height: 112px;
  border-radius: 24px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 255, 0.86));
  border: 1px solid rgba(207, 224, 238, 0.82);
}

.live-kpi-card span,
.live-kpi-card small {
  display: block;
  color: #607086;
  font-size: 12px;
}

.live-kpi-card strong {
  display: block;
  margin: 9px 0;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: #07182b;
}

.live-kpi-card.blue {
  background: linear-gradient(145deg, rgba(229, 243, 255, 0.95), rgba(255, 255, 255, 0.9));
  border-color: rgba(92, 164, 255, 0.44);
}

.live-kpi-card.green {
  background: linear-gradient(145deg, rgba(229, 252, 241, 0.95), rgba(255, 255, 255, 0.9));
  border-color: rgba(57, 197, 122, 0.42);
}

.live-kpi-card.orange {
  background: linear-gradient(145deg, rgba(255, 242, 218, 0.96), rgba(255, 255, 255, 0.9));
  border-color: rgba(255, 176, 65, 0.5);
}

:root[data-theme="dark"] .live-summary-grid > article,
:root[data-theme="dark"] .live-kpi-card,
:root[data-theme="dark"] .live-kpi-card.blue,
:root[data-theme="dark"] .live-kpi-card.green,
:root[data-theme="dark"] .live-kpi-card.orange {
  background:
    radial-gradient(circle at 86% 12%, rgba(52, 211, 153, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(24, 38, 58, 0.96), rgba(13, 24, 39, 0.94));
  border-color: rgba(96, 165, 250, 0.30);
  color: #eef6ff;
}

:root[data-theme="dark"] .live-kpi-card span,
:root[data-theme="dark"] .live-kpi-card small,
:root[data-theme="dark"] .live-summary-grid span,
:root[data-theme="dark"] .live-summary-grid small {
  color: #b9c8dc;
}

:root[data-theme="dark"] .live-kpi-card strong,
:root[data-theme="dark"] .live-summary-grid strong {
  color: #f8fbff;
}

.live-insight-strip {
  grid-column: 1 / -1;
  border-radius: 24px;
  padding: 14px 18px;
  color: #15334d;
}

.admin-ios-hero {
  border-radius: 32px;
  padding: 22px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background:
    radial-gradient(circle at 94% 8%, rgba(41, 140, 255, 0.24), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 247, 255, 0.92));
}

.admin-ios-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3.5vw, 40px);
  letter-spacing: -0.04em;
}

.admin-ios-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-ios-actions button {
  padding: 10px 14px;
  color: #0c3556;
  background: rgba(255, 255, 255, 0.68);
}

.admin-ios-launchpad {
  border-radius: 28px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-ios-card {
  border-radius: 24px;
  padding: 16px;
  text-align: left;
  color: #09283f;
  background:
    radial-gradient(circle at 90% 12%, rgba(35, 137, 215, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(238, 249, 255, 0.86));
}

.admin-ios-card span,
.admin-ios-card small {
  display: block;
  color: #6a7b8e;
  font-size: 12px;
}

.admin-ios-card strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 16px;
}

.admin-focus-pulse {
  animation: adminFocusPulse 0.9s ease;
}

@keyframes adminFocusPulse {
  0%, 100% { box-shadow: 0 14px 36px rgba(18, 55, 83, 0.08); }
  45% { box-shadow: 0 0 0 5px rgba(38, 132, 255, 0.18), 0 22px 58px rgba(18, 55, 83, 0.18); }
}

.ptf-performance-panel {
  border-radius: 26px;
  padding: 16px;
  margin: 12px 0;
}

.ptf-chart-card {
  border-radius: 30px;
  padding: 18px;
  margin: 16px 0;
  overflow: hidden;
}

.ptf-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ptf-chart-head h3 {
  margin: 4px 0 6px;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.ptf-chart-head p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.45;
}

.ptf-chart-head strong {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  color: #075e54;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ptf-actual-forecast-chart {
  min-height: 430px;
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.10), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(246, 251, 255, 0.72));
}

:root[data-theme="dark"] .ptf-chart-card {
  background:
    radial-gradient(circle at 16% 8%, rgba(56, 189, 248, 0.11), transparent 32%),
    linear-gradient(145deg, rgba(17, 31, 50, 0.96), rgba(12, 22, 36, 0.9));
  border-color: rgba(96, 165, 250, 0.22);
}

:root[data-theme="dark"] .ptf-chart-head strong {
  color: #bdf3dc;
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.58), rgba(30, 58, 138, 0.34));
  border-color: rgba(52, 211, 153, 0.22);
}

:root[data-theme="dark"] .ptf-actual-forecast-chart {
  border-color: rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.10), transparent 34%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(16, 32, 52, 0.62));
}

.ptf-performance-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.ptf-performance-head h3 {
  margin: 4px 0;
}

.ptf-performance-head p {
  margin: 0;
  color: #66758a;
}

.ptf-performance-head strong {
  font-size: 30px;
  color: #0a72d9;
}

.ptf-performance-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.kpi-card {
  min-height: 92px;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 255, 0.86));
  border: 1px solid rgba(207, 224, 238, 0.82);
}

.kpi-card span {
  display: block;
  color: #607086;
  font-size: 12px;
}

.kpi-card strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #07182b;
}

.kpi-card small {
  display: block;
  color: #8394a8;
  font-size: 11px;
}

.kpi-card.accent {
  background: linear-gradient(145deg, rgba(229, 243, 255, 0.95), rgba(255, 255, 255, 0.9));
  border-color: rgba(92, 164, 255, 0.44);
}

:root[data-theme="dark"] .kpi-card {
  background:
    radial-gradient(circle at 86% 12%, rgba(52, 211, 153, 0.10), transparent 30%),
    linear-gradient(145deg, rgba(24, 38, 58, 0.96), rgba(13, 24, 39, 0.94));
  border-color: rgba(96, 165, 250, 0.28);
}

:root[data-theme="dark"] .kpi-card span,
:root[data-theme="dark"] .kpi-card small {
  color: #b9c8dc;
}

:root[data-theme="dark"] .kpi-card strong {
  color: #f8fbff;
}

.ptf-bot-compare {
  margin: 4px 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 255, 0.86));
  border: 1px solid rgba(207, 224, 238, 0.82);
}

.ptf-bot-compare-head h4 {
  margin: 2px 0 10px;
}

.ptf-bot-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ptf-bot-compare-table th,
.ptf-bot-compare-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(207, 224, 238, 0.6);
}

.ptf-bot-compare-table th {
  color: #607086;
  font-weight: 600;
  font-size: 12px;
}

.ptf-bot-compare-best {
  background: rgba(57, 197, 122, 0.10);
  font-weight: 700;
}

.ptf-bot-compare-note {
  margin: 10px 0 0;
  color: #8394a8;
  font-size: 12px;
}

:root[data-theme="dark"] .ptf-bot-compare {
  background:
    radial-gradient(circle at 86% 12%, rgba(52, 211, 153, 0.10), transparent 30%),
    linear-gradient(145deg, rgba(24, 38, 58, 0.96), rgba(13, 24, 39, 0.94));
  border-color: rgba(96, 165, 250, 0.28);
  color: #eef6ff;
}

:root[data-theme="dark"] .ptf-bot-compare-table th,
:root[data-theme="dark"] .ptf-bot-compare-table td {
  border-bottom-color: rgba(96, 165, 250, 0.2);
}

:root[data-theme="dark"] .ptf-bot-compare-table th {
  color: #b9c8dc;
}

:root[data-theme="dark"] .ptf-bot-compare-best {
  background: rgba(52, 211, 153, 0.14);
}

.gop-learning-live {
  display: grid;
  gap: 14px;
}

.gop-learning-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.gop-learning-live-head h3 {
  margin: 5px 0 7px;
  color: #123653;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.03em;
}

.gop-learning-live-head p,
.gop-learning-live-empty p {
  margin: 0;
  max-width: 760px;
  color: #65778d;
  line-height: 1.45;
}

.gop-learning-snapshot-meta {
  min-width: 132px;
  padding: 12px 14px;
  text-align: right;
  border: 1px solid rgba(37, 151, 214, 0.22);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(237, 253, 245, 0.95), rgba(235, 248, 255, 0.86));
}

.gop-learning-snapshot-meta strong {
  display: block;
  color: #047857;
  font-size: 26px;
  line-height: 1;
}

.gop-learning-snapshot-meta span,
.gop-learning-snapshot-meta small {
  display: block;
  margin-top: 4px;
  color: #5d7187;
  font-size: 11px;
}

.gop-learning-reference {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px dashed rgba(27, 136, 94, 0.35);
  border-radius: 16px;
  background: rgba(245, 253, 250, 0.72);
  color: #486176;
}

.gop-learning-reference strong {
  color: #123653;
}

.gop-learning-reference small {
  margin-left: auto;
  color: #718198;
}

.gop-learning-bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 10px;
}

.gop-learning-bot-card {
  min-width: 0;
  min-height: 112px;
  padding: 12px;
  border: 1px solid rgba(118, 165, 204, 0.32);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 255, 0.78));
  box-shadow: 0 9px 22px rgba(32, 83, 120, 0.06);
}

.gop-learning-bot-card.good { border-color: rgba(16, 185, 129, 0.44); }
.gop-learning-bot-card.watch { border-color: rgba(245, 158, 11, 0.48); }
.gop-learning-bot-card.risk { border-color: rgba(239, 68, 68, 0.36); }
.gop-learning-bot-card.selected { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14), 0 12px 28px rgba(32, 83, 120, 0.10); }

.gop-learning-bot-top {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  justify-content: space-between;
  color: #4c6680;
  font-size: 12px;
  line-height: 1.25;
}

.gop-learning-bot-top em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: #047857;
  background: #dff8ec;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.gop-learning-bot-card > strong {
  display: block;
  margin-top: 12px;
  color: #102d48;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.gop-learning-bot-card > small {
  display: block;
  margin-top: 5px;
  color: #6c8197;
  font-size: 11px;
}

.gop-learning-live-empty {
  padding: 8px 2px;
}

:root[data-theme="dark"] .gop-learning-live-head h3,
:root[data-theme="dark"] .gop-learning-reference strong,
:root[data-theme="dark"] .gop-learning-bot-card > strong {
  color: #f4f8ff;
}

:root[data-theme="dark"] .gop-learning-live-head p,
:root[data-theme="dark"] .gop-learning-live-empty p,
:root[data-theme="dark"] .gop-learning-reference,
:root[data-theme="dark"] .gop-learning-reference small,
:root[data-theme="dark"] .gop-learning-bot-top,
:root[data-theme="dark"] .gop-learning-bot-card > small {
  color: #b9c8dc;
}

:root[data-theme="dark"] .gop-learning-snapshot-meta,
:root[data-theme="dark"] .gop-learning-reference,
:root[data-theme="dark"] .gop-learning-bot-card {
  background: linear-gradient(145deg, rgba(20, 37, 58, 0.92), rgba(13, 28, 46, 0.85));
  border-color: rgba(96, 165, 250, 0.26);
}

.ptf-hour-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(66px, 1fr));
  gap: 8px;
}

.ptf-hour-chip {
  border-radius: 16px;
  padding: 9px;
  border: 1px solid #d7e5ef;
  background: #fff;
}

.ptf-hour-chip span,
.ptf-hour-chip small {
  display: block;
  color: #6c7a8e;
  font-size: 11px;
}

.ptf-hour-chip strong {
  display: block;
  margin: 3px 0;
  color: #0f2f47;
}

.ptf-hour-chip.bad {
  background: linear-gradient(145deg, #fff4f1, #fff);
  border-color: #ffb8aa;
}

.ptf-hour-chip.ok {
  background: linear-gradient(145deg, #edfdf4, #fff);
  border-color: #aee7c3;
}

.ptf-worst-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ptf-worst-strip span {
  border-radius: 999px;
  padding: 8px 10px;
  background: #eef6ff;
  color: #21435c;
  font-size: 12px;
  font-weight: 800;
}

.ptf-analysis-page,
.agent-performance-page,
.smf-analysis-page {
  border-radius: 34px;
  background:
    radial-gradient(circle at 92% 4%, rgba(18, 129, 255, 0.18), transparent 30%),
    radial-gradient(circle at 8% 96%, rgba(35, 197, 129, 0.15), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 250, 255, 0.94));
}

.ptf-page-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 28px;
  margin-bottom: 14px;
  color: #08283e;
  background:
    radial-gradient(circle at 88% 12%, rgba(0, 123, 255, 0.24), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(231, 246, 255, 0.72));
  border: 1px solid rgba(189, 215, 234, 0.72);
}

.ptf-page-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.ptf-page-hero p {
  margin: 0;
  max-width: 760px;
  color: #5b6c7d;
}

.ptf-page-hero > strong {
  flex: 0 0 auto;
  border-radius: 22px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(145deg, #0077d9, #00a985);
  box-shadow: 0 16px 32px rgba(0, 117, 217, 0.22);
}

.ptf-toolbar {
  padding: 12px;
  border: 1px solid rgba(203, 221, 236, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
}

.smf-page-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid #9ed5cf;
  border-radius: 28px;
  color: #073b45;
  background: radial-gradient(circle at 88% 8%, rgba(12, 167, 144, .23), transparent 28%), linear-gradient(145deg, #f4fffc, #e9f7ff);
}
.smf-page-hero h2 { margin: 5px 0 8px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }
.smf-page-hero p { margin: 0; max-width: 760px; color: #416779; }
.smf-page-hero > strong { border-radius: 18px; padding: 14px 18px; color: #fff; background: #0b3a53; }
.smf-toolbar { margin-bottom: 12px; padding: 12px; border: 1px solid #c7ddeb; border-radius: 18px; background: rgba(255,255,255,.78); }
.smf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.smf-card { margin: 14px 0; padding: 16px; border: 1px solid #cbe0eb; border-radius: 20px; background: rgba(255,255,255,.82); }
.smf-card h3 { margin: 0 0 12px; color: #163f59; }
.smf-chart { min-height: 340px; width: 100%; }
.smf-point { display: grid; grid-template-columns: 76px 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e2edf3; }
.smf-point small { grid-column: 2 / -1; color: #617589; }
#smfForecastPoints { max-height: 540px; overflow-y: auto; padding-right: 6px; }
.smf-freshness, .smf-job { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e2edf3; }
.smf-job small { color: #66798b; }
.smf-disclaimer { margin: 14px 0 0; color: #5d7182; font-size: 12px; }
@media (max-width: 760px) { .smf-page-hero { align-items: flex-start; flex-direction: column; } .smf-grid { grid-template-columns: 1fr; } .smf-point { grid-template-columns: 64px 1fr; } .smf-point b { grid-column: 2; } }

.ptf-trade-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px;
  width: fit-content;
  border: 1px solid rgba(143, 183, 214, 0.66);
  border-radius: 18px;
  background: rgba(244, 251, 255, 0.82);
}

.ptf-trade-tabs button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #31576e;
  background: transparent;
  font-weight: 800;
}

.ptf-trade-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #008c88, #1378bd);
  box-shadow: 0 8px 18px rgba(13, 105, 142, 0.2);
}

.ptf-trade-analysis-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 1100px) {
  .shell.ptf-trade-fullscreen {
    max-width: none;
    width: 100%;
    padding: 14px 24px 32px;
  }

  .shell.ptf-trade-fullscreen .ptf-trade-analysis-workspace:not(.hidden) {
    width: 100%;
    margin: 0;
  }
}

.ptf-trade-training {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 16px;
  margin: 12px 0;
  padding: 13px 16px;
  border: 1px solid #93c5fd;
  border-left: 5px solid #0f766e;
  border-radius: 12px;
  background: linear-gradient(100deg, #ecfeff, #eff6ff);
  color: #17324d;
}

.ptf-trade-training strong { font-size: 15px; }
.ptf-trade-training span, .ptf-trade-training small { color: #45627e; }
.ptf-trade-training small { grid-column: 1 / -1; }

.ptf-trade-learning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ptf-trade-learning-head h4 { margin: 2px 0 0; }

.ptf-trade-learning-level {
  min-width: 190px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0f766e;
  color: #fff;
  text-align: right;
}

.ptf-trade-learning-level span,
.ptf-trade-learning-level strong { display: block; color: inherit; }
.ptf-trade-learning-level strong { font-size: 24px; }
.ptf-trade-learning-level small { display: block; margin-top: 4px; color: inherit; opacity: 0.92; font-size: 11px; font-weight: 700; }
.ptf-trade-learning-level.low-sample { background: #b45309; }

.ptf-trade-learning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
}

.ptf-trade-learning-metric {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}

.ptf-trade-learning-metric > strong { font-size: 19px; color: #123a59; }
.ptf-trade-learning-metric > small { grid-column: auto; }
.ptf-trade-learning-metric.ready { border-color: #86efac; background: #f0fdf4; }
.ptf-trade-learning-metric.warning { border-color: #fbbf24; background: #fffbeb; }

@media (max-width: 900px) {
  .ptf-trade-learning-head { align-items: stretch; flex-direction: column; }
  .ptf-trade-learning-level { min-width: 0; text-align: left; }
  .ptf-trade-learning-grid { grid-template-columns: 1fr; }
}

.ptf-trade-analysis-workspace.hidden {
  display: none;
}

.ptf-trade-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(112, 183, 175, 0.6);
  border-radius: 24px;
  background: linear-gradient(130deg, rgba(228, 253, 244, 0.94), rgba(233, 246, 255, 0.92));
}

.ptf-trade-intro h3,
.ptf-trade-card h4 {
  margin: 4px 0 7px;
  color: #0a354e;
}

.ptf-trade-intro p {
  max-width: 760px;
  margin: 0;
  color: #46657a;
}

.ptf-trade-intro > strong {
  max-width: 230px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #73411b;
  background: #fff4db;
  font-size: 12px;
  text-align: center;
}

.ptf-trade-controls label {
  min-width: 0;
}

.ptf-trade-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 10px;
  align-items: end;
}

.ptf-trade-controls label,
.ptf-trade-controls button {
  width: 100%;
}

.ptf-trade-controls input,
.ptf-trade-controls select {
  width: 100%;
  box-sizing: border-box;
}

.ptf-trade-controls button {
  min-height: 38px;
}

.ptf-trade-view-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #cfe2ef);
}

.ptf-trade-view-tabs button {
  border: 1px solid #9bc7df;
  border-radius: 999px;
  background: #fff;
  color: #123a55;
  font-weight: 700;
  padding: 8px 13px;
}

.ptf-trade-view-tabs button.active {
  background: #008d8a;
  border-color: #008d8a;
  color: #fff;
}

.ptf-trade-outlook-help {
  color: #49677d;
  margin: 0 0 12px;
}

.ptf-trade-positive {
  color: #047857;
  font-weight: 800;
}

.ptf-trade-kpis {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(190px, 0.55fr) minmax(190px, 0.55fr);
  gap: 10px;
}

.ptf-trade-kpi,
.ptf-trade-card {
  border: 1px solid rgba(180, 211, 232, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.83);
}

.ptf-trade-kpi {
  padding: 14px;
}

.ptf-trade-cost-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(180, 211, 232, 0.9);
  border-radius: 18px;
  background: #fff;
}

.ptf-trade-cost-panel.agent { border-color: #7bd6bd; }

.ptf-trade-cost-panel header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: #0b3853;
  background: #edf6fb;
  font-size: 12px;
  font-weight: 800;
}

.ptf-trade-cost-panel.agent header { background: #e8fbf3; }
.ptf-trade-cost-panel header strong { font-size: 17px; white-space: nowrap; }

.ptf-trade-cost-panel > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid #e5eef5;
  color: #5a7185;
  font-size: 12px;
}

.ptf-trade-cost-panel > div b { color: #0a354e; text-align: right; }
.ptf-trade-cost-panel footer { padding: 10px 14px; color: #08725a; background: #f0fdf7; font-size: 12px; font-weight: 800; }

.ptf-trade-kpi span,
.ptf-trade-kpi small {
  display: block;
  color: #60768a;
  font-size: 12px;
}

.ptf-trade-kpi strong {
  display: block;
  margin: 6px 0;
  color: #082f49;
  font-size: 20px;
}

.ptf-trade-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.ptf-trade-card {
  padding: 16px;
}

.ptf-trade-chart {
  height: 290px;
}

.ptf-trade-evidence {
  display: grid;
  gap: 9px;
}

.ptf-trade-evidence > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #f1f8fc;
  color: #547087;
}

.ptf-trade-evidence strong {
  color: #083a59;
}

.ptf-trade-evidence p {
  margin: 4px 0 0;
  color: #60768a;
  font-size: 12px;
  line-height: 1.5;
}

.ptf-trade-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ptf-trade-card td small {
  display: block;
  margin-top: 3px;
  color: #627b8c;
  font-size: 11px;
}

.ptf-trade-opportunity td {
  background: rgba(221, 252, 236, 0.42);
}

.ptf-trade-evidence-pill {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 999px;
  color: #6b4b18;
  background: #fff1cf;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .ptf-trade-kpis { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .ptf-trade-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .ptf-trade-tabs { width: 100%; }
  .ptf-trade-tabs button { flex: 1; padding: 9px; font-size: 12px; }
  .ptf-trade-intro { align-items: flex-start; flex-direction: column; }
  .ptf-trade-kpis { grid-template-columns: 1fr; }
  .ptf-trade-cost-panel header, .ptf-trade-cost-panel > div { align-items: flex-start; flex-direction: column; }
  .ptf-trade-cost-panel > div b { text-align: left; }
}

.ptf-dataset-card {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(183, 215, 234, 0.78);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 4%, rgba(24, 183, 123, 0.16), transparent 30%),
    radial-gradient(circle at 8% 98%, rgba(31, 182, 255, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(242, 250, 255, 0.9));
  box-shadow: 0 18px 36px rgba(18, 55, 84, 0.08);
}

.ptf-dataset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ptf-dataset-head h3 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.035em;
  color: #08283e;
}

.ptf-dataset-head p {
  margin: 0;
  max-width: 820px;
  color: #5b6c7d;
}

.ptf-dataset-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ptf-dataset-kpis article,
.ptf-dataset-sources article {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(198, 221, 236, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ptf-dataset-kpis span,
.ptf-dataset-kpis small,
.ptf-dataset-sources small,
.ptf-dataset-features small {
  display: block;
  color: #587085;
  font-weight: 700;
}

.ptf-dataset-kpis strong {
  display: block;
  margin: 8px 0 3px;
  color: #07324a;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.04em;
}

.ptf-dataset-sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ptf-dataset-sources article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ptf-dataset-sources strong {
  color: #0b344b;
}

.ptf-dataset-sources span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: #1fb6ff;
  font-size: 11px;
  font-weight: 900;
}

.ptf-dataset-sources article.ready span,
.ptf-dataset-features button.ready {
  background: linear-gradient(145deg, rgba(24, 183, 123, 0.18), rgba(255, 255, 255, 0.76));
  border-color: rgba(24, 183, 123, 0.45);
}

.ptf-dataset-sources article.ready span {
  background: #18b77b;
}

.ptf-dataset-sources article.missing span {
  background: #ef4444;
}

.ptf-dataset-sources p {
  min-height: 40px;
  margin: 10px 0 8px;
  color: #35556c;
}

.ptf-dataset-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.ptf-dataset-features button {
  min-height: 56px;
  border: 1px solid rgba(198, 221, 236, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #0b344b;
  font-weight: 900;
  text-align: center;
}

.ptf-dataset-features button.planned {
  background: rgba(255, 255, 255, 0.56);
}

.ptf-dataset-features button.missing {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(254, 226, 226, 0.5);
}

.ptf-dataset-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 14px;
}

.ptf-dataset-chart {
  min-height: 280px;
  padding: 12px;
  border: 1px solid rgba(198, 221, 236, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
}

.ptf-dataset-jobs {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #123e5b;
  background: rgba(226, 244, 255, 0.7);
  border: 1px solid rgba(164, 211, 239, 0.8);
}

:root[data-theme="dark"] .ptf-dataset-card {
  background:
    radial-gradient(circle at 92% 4%, rgba(24, 183, 123, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.9));
}

:root[data-theme="dark"] .ptf-dataset-head h3,
:root[data-theme="dark"] .ptf-dataset-kpis strong,
:root[data-theme="dark"] .ptf-dataset-sources strong,
:root[data-theme="dark"] .ptf-dataset-features button {
  color: #e8f6ff;
}

:root[data-theme="dark"] .ptf-dataset-head p,
:root[data-theme="dark"] .ptf-dataset-sources p,
:root[data-theme="dark"] .ptf-dataset-kpis span,
:root[data-theme="dark"] .ptf-dataset-kpis small,
:root[data-theme="dark"] .ptf-dataset-sources small,
:root[data-theme="dark"] .ptf-dataset-features small {
  color: #b7c9d8;
}

:root[data-theme="dark"] .ptf-dataset-kpis article,
:root[data-theme="dark"] .ptf-dataset-sources article,
:root[data-theme="dark"] .ptf-dataset-features button,
:root[data-theme="dark"] .ptf-dataset-chart,
:root[data-theme="dark"] .ptf-dataset-jobs {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(125, 174, 203, 0.42);
}

.learning-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 8px;
  border-radius: 999px;
  background: rgba(232, 243, 252, 0.76);
  width: max-content;
  max-width: 100%;
}

.learning-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: #315067;
  font-weight: 900;
}

.learning-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #0077d9, #00a985);
  box-shadow: 0 10px 22px rgba(0, 119, 217, 0.2);
}

.epias-page {
  border-radius: 34px;
  background:
    radial-gradient(circle at 92% 2%, rgba(0, 119, 217, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 250, 255, 0.94));
}

.epias-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.epias-module-card {
  text-align: left;
  border: 1px solid rgba(190, 214, 232, 0.78);
  border-radius: 26px;
  padding: 18px;
  color: #0d3048;
  background:
    radial-gradient(circle at 90% 12%, rgba(48, 145, 255, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 249, 255, 0.88));
  box-shadow: 0 16px 40px rgba(16, 52, 78, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.epias-module-card:hover,
.epias-module-card.active {
  transform: translateY(-2px);
  border-color: rgba(0, 119, 217, 0.52);
  box-shadow: 0 22px 54px rgba(16, 52, 78, 0.15);
}

.epias-module-card.active {
  background:
    radial-gradient(circle at 92% 14%, rgba(35, 197, 129, 0.2), transparent 30%),
    linear-gradient(145deg, #eef9ff, #ffffff);
}

.epias-module-card span,
.epias-module-card small {
  display: block;
  color: #617287;
  font-size: 12px;
}

.epias-module-card strong {
  display: block;
  margin: 9px 0 7px;
  font-size: 17px;
}

.epias-section {
  display: none;
  border: 1px solid rgba(202, 221, 236, 0.76);
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.epias-section.active {
  display: block;
  animation: iosSheetIn 0.18s ease-out;
}

.mail-page {
  max-width: 1280px;
  margin: 0 auto;
}

.mail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 18px;
  padding: 22px;
  border: 1px solid rgba(180, 205, 225, 0.78);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 18%, rgba(28, 148, 255, 0.20), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 249, 255, 0.9));
  box-shadow: 0 18px 46px rgba(12, 41, 68, 0.10);
}

.mail-hero h3 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 3vw, 34px);
}

.mail-hero strong {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #0078d4, #00a98f);
  box-shadow: 0 18px 38px rgba(0, 120, 212, 0.24);
}

.mail-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.mail-section {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(202, 221, 236, 0.76);
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.mail-section.active {
  display: block;
  animation: iosSheetIn 0.18s ease-out;
}

.mail-template-grid,
.mail-bi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mail-template-grid article,
.mail-bi-grid article {
  border: 1px solid rgba(190, 214, 232, 0.78);
  border-radius: 24px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 255, 0.86));
  box-shadow: 0 14px 30px rgba(16, 52, 78, 0.07);
}

.mail-template-grid small,
.mail-bi-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.secret-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.secret-input-wrap input {
  min-width: 0;
}

.secret-eye-btn {
  white-space: nowrap;
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(142, 171, 196, 0.72);
  background: linear-gradient(145deg, #ffffff, #eef7ff);
  color: #0b5f96;
  font-weight: 800;
}

:root[data-theme="dark"] .mail-hero,
:root[data-theme="dark"] .mail-section,
:root[data-theme="dark"] .mail-template-grid article,
:root[data-theme="dark"] .mail-bi-grid article {
  background: linear-gradient(145deg, rgba(15, 35, 56, 0.96), rgba(11, 26, 43, 0.92));
  border-color: rgba(112, 145, 174, 0.45);
  color: #eaf4ff;
}

:root[data-theme="dark"] .mail-hero p,
:root[data-theme="dark"] .mail-template-grid small,
:root[data-theme="dark"] .mail-bi-grid small {
  color: #b9c9d8;
}

:root[data-theme="dark"] .secret-eye-btn {
  background: linear-gradient(145deg, #18304c, #10243a);
  border-color: rgba(142, 171, 196, 0.42);
  color: #d7ecff;
}

.distribution-detail-panel {
  margin: 0;
  padding: 18px;
  border: 1px solid #c8d9e8;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(232, 247, 255, 0.96), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 88% 16%, rgba(54, 211, 153, 0.2), transparent 24%);
  box-shadow: 0 18px 42px rgba(12, 45, 64, 0.11);
}

.ios-sheet {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ios-sheet.hidden {
  display: none;
}

.ios-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 31, 0.34);
  backdrop-filter: blur(14px) saturate(1.25);
}

.ios-sheet-card {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 34px));
  max-height: min(86vh, 860px);
  overflow: auto;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(145deg, rgba(250, 253, 255, 0.96), rgba(235, 246, 255, 0.96));
  box-shadow: 0 30px 90px rgba(5, 21, 35, 0.28);
  animation: iosSheetIn 0.22s ease-out;
}

@keyframes iosSheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.distribution-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.distribution-detail-head .eyebrow {
  color: #0b7db5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.distribution-detail-head h3 {
  margin: 4px 0;
}

.distribution-mini-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.distribution-bar-card {
  border: 1px solid #d3e5ef;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.distribution-bar-card strong,
.distribution-bar-card span {
  display: block;
}

.distribution-bar-card span {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 999px;
  background: #e7f8ef;
  font-size: 12px;
}

.distribution-bar-card span.consumption {
  background: #eaf3ff;
}

.distribution-bar-card span i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(24, 175, 111, 0.35), rgba(24, 175, 111, 0.1));
}

.distribution-bar-card span.consumption i {
  background: linear-gradient(90deg, rgba(26, 115, 232, 0.34), rgba(26, 115, 232, 0.1));
}

.distribution-bar-card span b {
  position: relative;
  z-index: 1;
  float: right;
}
.missing-summary-grid > div {
  border: 1px solid #d6e0ec;
  border-radius: 18px;
  padding: 14px;
  background: white;
  box-shadow: 0 12px 30px rgba(15, 38, 50, 0.06);
}
.missing-summary-grid small,
.missing-summary-grid em {
  display: block;
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}
.missing-summary-grid strong {
  display: block;
  font-size: 22px;
  margin: 5px 0;
}
.missing-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
.missing-layout aside,
.missing-layout section {
  border: 1px solid #d6e0ec;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.9);
}
.missing-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.missing-day {
  min-height: 46px;
  border: 1px solid #dde7f1;
  border-radius: 12px;
  background: #f8fafc;
  cursor: default;
  padding: 5px;
}
.missing-day b,
.missing-day small {
  display: block;
}
.missing-day.ok { background: #e9fbf2; color: #067647; }
.missing-day.warn { background: #fff7df; color: #a15c00; }
.missing-day.bad { background: #fff0f0; color: #c82424; }
.missing-hourly-bars {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.missing-hour-row {
  display: grid;
  grid-template-columns: 48px 1fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.mini-bar {
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}
.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #08956b;
}
.mini-bar i.warn { background: #f59e0b; }
.mini-bar i.bad { background: #ef4444; }
.missing-distribution-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  margin: 10px 0 16px;
}
.missing-distribution-item {
  text-align: left;
  border: 1px solid #d6e0ec;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
  cursor: pointer;
}
.missing-distribution-item:hover {
  border-color: #0097b2;
  box-shadow: 0 8px 20px rgba(0, 151, 178, 0.10);
}
.missing-distribution-item strong,
.missing-distribution-item small {
  display: block;
}
.missing-distribution-item small {
  margin-top: 4px;
  color: #64748b;
}
.compact-controls {
  justify-content: flex-start;
}
.compact-controls input {
  min-width: 260px;
}
@media (max-width: 900px) {
  .ai-agent-modal {
    padding: 12px;
  }

  .ai-agent-window {
    width: calc(100vw - 18px);
    height: calc(100vh - 28px);
    border-radius: 22px;
  }

  .ai-agent-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-agent-compose {
    margin: 0 12px 12px;
    grid-template-columns: 38px 1fr 42px;
  }

  .ai-agent-history {
    padding: 16px 14px 18px;
  }

  .ai-agent-question {
    max-width: 94%;
  }

  .missing-summary-grid,
  .missing-layout {
    grid-template-columns: 1fr;
  }

  .live-cockpit,
  .live-summary-grid,
  .market-price-layout,
  .admin-ios-launchpad {
    grid-template-columns: 1fr;
  }

  .admin-ios-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .market-price-loading-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ptf-hour-grid {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
  }

  .gop-learning-live-head {
    flex-direction: column;
  }

  .gop-learning-snapshot-meta {
    width: 100%;
    text-align: left;
  }

  .gop-learning-reference small {
    width: 100%;
    margin-left: 0;
  }

  .ptf-dataset-head {
    flex-direction: column;
  }

  .ptf-dataset-kpis,
  .ptf-dataset-sources,
  .ptf-dataset-features,
  .ptf-dataset-grid {
    grid-template-columns: 1fr;
  }

  .epias-module-grid {
    grid-template-columns: 1fr;
  }
}


/* ECharts visual layer */
.echarts-live-energy-grid {
  align-items: stretch;
}

.echart-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 248, 255, 0.70));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.echart-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 128, 237, 0.16), transparent 68%);
  pointer-events: none;
}

.echart-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.echart-title-row strong {
  color: var(--ink);
  font-size: 15px;
}

.echart-title-row span {
  color: var(--muted);
  font-size: 12px;
}

.live-energy-echart {
  position: relative;
  z-index: 1;
  min-height: 320px;
  width: 100%;
  padding: 4px 8px 8px;
}

.live-energy-echart.xl {
  min-height: 380px;
}

.live-energy-echart.compact {
  min-height: 260px;
}

.live-energy-mix-echart-card {
  display: grid;
  grid-template-rows: auto 250px minmax(0, 1fr);
  min-height: 520px;
  max-height: 520px;
  overflow: hidden;
}

.live-energy-mix-echart-card .echart-title-row {
  align-items: flex-start;
}

.live-energy-mix-echart-card .echart-title-row span {
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.live-energy-mix-echart-card #piyasaMixChart {
  min-height: 250px;
  height: 250px;
}

.live-energy-mix-echart-card .live-energy-source-list {
  min-height: 0;
  max-height: 190px;
  overflow-y: auto;
  padding: 10px 2px 2px;
  scrollbar-width: thin;
}

.live-energy-mix-echart-card .live-energy-source-list div {
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px 0;
  font-size: 13px;
}

.piyasa-ozet-price-card #piyasaOzetPriceChart,
.market-price-hourly-card #marketPriceHourlyChart {
  min-height: 340px;
  height: 340px;
}

.piyasa-fallback-chart {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
}

.piyasa-fallback-chart svg {
  width: 100%;
  min-height: 240px;
  overflow: visible;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, 0.08));
}

.piyasa-stacked-fallback-chart {
  justify-content: flex-start;
  padding-top: 2px;
}

.piyasa-stacked-fallback-chart svg {
  min-height: 300px;
}

.piyasa-fallback-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.piyasa-fallback-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.piyasa-fallback-legend i {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
}

.piyasa-mix-fallback {
  width: min(210px, 90%);
  margin: 20px auto 8px;
  padding: 26px 18px;
  border-radius: 28px;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), rgba(239, 246, 255, 0.76));
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.piyasa-mix-fallback strong {
  display: block;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.piyasa-mix-fallback span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.piyasa-mix-fallback div {
  height: 7px;
  margin-top: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
}

.piyasa-mix-fallback i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b86b, #2563eb);
}

.piyasa-ozet-price-table {
  margin-top: 16px;
}

.piyasa-ozet-price-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 10px;
  color: var(--text);
}

.piyasa-ozet-price-table-head span {
  color: var(--muted);
  font-size: 12px;
}

.piyasa-ozet-price-table .scroll-table {
  max-height: 300px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 255, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 16px 38px rgba(15, 23, 42, 0.07);
}

.piyasa-ozet-price-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.94);
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.piyasa-ozet-price-table td {
  font-variant-numeric: tabular-nums;
}

:root[data-theme="dark"] .piyasa-ozet-price-table .scroll-table {
  border-color: rgba(96, 165, 250, 0.22);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(17, 34, 54, 0.86));
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.10), 0 18px 42px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .piyasa-ozet-price-table th {
  background: rgba(15, 23, 42, 0.96);
  color: #b6c2d1;
}

:root[data-theme="dark"] .echart-card {
  background: linear-gradient(145deg, rgba(20, 30, 44, 0.94), rgba(11, 22, 36, 0.86));
  border-color: rgba(99, 179, 237, 0.18);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .piyasa-mix-fallback {
  background: linear-gradient(145deg, rgba(20, 83, 45, 0.24), rgba(30, 64, 175, 0.18));
  border-color: rgba(74, 222, 128, 0.20);
}

:root[data-theme="dark"] .echart-card::before {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 68%);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-actions button,
.danger-soft {
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

.danger-soft {
  border-color: rgba(239, 68, 68, 0.36);
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.76));
}

:root[data-theme="dark"] .danger-soft {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.34);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.32), rgba(30, 41, 59, 0.78));
}

.compact-summary {
  margin: 14px 0;
}

.live-ptf-projection {
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.82));
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.ptf-projection-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.ptf-projection-head h3 {
  margin: 4px 0 4px;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.04em;
}

.ptf-projection-head p,
.ptf-projection-note {
  color: #5f6f82;
}

.ptf-projection-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  min-width: min(360px, 100%);
}

.ptf-projection-kpis article,
.ptf-projection-month {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ptf-projection-kpis article {
  padding: 12px 14px;
}

.ptf-projection-kpis small,
.ptf-projection-month span,
.ptf-projection-month small {
  display: block;
  font-size: 12px;
  color: #64748b;
}

.ptf-projection-kpis strong,
.ptf-projection-month strong {
  display: block;
  margin: 2px 0;
  color: #0f172a;
  font-size: 22px;
}

.ptf-projection-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 10px;
}

.ptf-projection-month {
  padding: 12px;
}

.ptf-projection-month.system {
  border-color: rgba(34, 197, 94, 0.28);
}

.ptf-projection-month.seasonal {
  border-color: rgba(245, 158, 11, 0.28);
}

.ptf-projection-bar {
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.ptf-projection-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #0ea5e9, #2563eb);
}

.ptf-projection-note {
  display: block;
  margin-top: 12px;
}

:root[data-theme="dark"] .live-ptf-projection {
  border-color: rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(13, 31, 50, 0.88));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .ptf-projection-head p,
:root[data-theme="dark"] .ptf-projection-note,
:root[data-theme="dark"] .ptf-projection-kpis small,
:root[data-theme="dark"] .ptf-projection-month span,
:root[data-theme="dark"] .ptf-projection-month small {
  color: #b6c2d1;
}

:root[data-theme="dark"] .ptf-projection-head h3,
:root[data-theme="dark"] .ptf-projection-kpis strong,
:root[data-theme="dark"] .ptf-projection-month strong {
  color: #f8fafc;
}

:root[data-theme="dark"] .ptf-projection-kpis article,
:root[data-theme="dark"] .ptf-projection-month {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.10), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.compact-summary > div {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.74));
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

:root[data-theme="dark"] .compact-summary > div {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
  border-color: rgba(96, 165, 250, 0.20);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

@media (max-width: 900px) {
  .etso-viewer-mode .shell {
    display: block;
    max-width: none;
  }

  .etso-viewer-mode .page-panel {
    grid-column: auto;
  }

  .etso-viewer-mode .viewer-side-nav {
    position: sticky;
    top: 64px;
    z-index: 20;
    min-height: auto;
    margin: 0 0 14px;
    padding: 10px;
    border-radius: 20px;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .viewer-side-brand {
    display: none;
  }

  .viewer-side-nav button {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
    border-radius: 999px;
  }

  .echart-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .live-energy-echart.xl,
  .piyasa-ozet-price-card #piyasaOzetPriceChart,
  .market-price-hourly-card #marketPriceHourlyChart {
    min-height: 300px;
    height: 300px;
  }

  .live-energy-mix-echart-card {
    min-height: 460px;
    max-height: none;
  }

  .live-energy-mix-echart-card .live-energy-source-list {
    max-height: 170px;
  }

  .ptf-projection-head {
    flex-direction: column;
  }

  .etso-viewer-mode .ptf-projection-head {
    display: flex;
    flex-direction: column;
  }

  .ptf-projection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ptf-projection-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}


/* v0.8.87 live UI repair: ECharts, viewer cards, PTF projection */
#livePtfProjectionPanel,
.live-cockpit > #livePtfProjectionPanel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#liveNationalEnergyPanel,
#liveMarketPricePanel {
  min-width: 0;
}

#piyasaGenerationChart,
#piyasaMixChart,
#piyasaOzetPriceChart,
#marketPriceHourlyChart,
.live-energy-echart,
.market-price-hourly-chart {
  width: 100%;
  min-height: 320px;
  box-sizing: border-box;
}

#piyasaMixChart.live-energy-echart,
.live-energy-echart.compact {
  min-height: 240px;
}

#viewerInvoicesCard,
#viewerSettingsSummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.viewer-settings-profile-card {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(190, 213, 235, 0.78);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,255,255,0.94), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(239,248,255,0.84));
  box-shadow: 0 14px 30px rgba(42, 73, 110, 0.08);
}

.viewer-settings-profile-card small,
.viewer-settings-profile-card strong,
.viewer-settings-profile-card em {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.viewer-settings-profile-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.viewer-settings-profile-card strong {
  color: #0f1d33;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 900;
}

.viewer-settings-profile-card em {
  color: #53677f;
  font-size: 12px;
  font-style: normal;
}

.viewer-settings-wide-card {
  min-width: 0;
}

.viewer-settings-wide-card .job-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.etso-viewer-mode #livePtfProjectionPanel .ptf-projection-head {
  grid-template-columns: minmax(260px, 0.9fr) repeat(2, minmax(170px, 0.55fr));
  align-items: stretch;
}

.etso-viewer-mode #livePtfProjectionPanel .ptf-projection-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

:root[data-theme="dark"] .viewer-settings-profile-card {
  border-color: rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 12% 12%, rgba(56,189,248,0.12), transparent 34%),
    linear-gradient(145deg, rgba(15,23,42,0.94), rgba(13,31,50,0.88));
  box-shadow: 0 16px 34px rgba(0,0,0,0.24);
}

:root[data-theme="dark"] .viewer-settings-profile-card small,
:root[data-theme="dark"] .viewer-settings-profile-card em {
  color: #b8c7d9;
}

:root[data-theme="dark"] .viewer-settings-profile-card strong {
  color: #f8fbff;
}

/* v0.8.88 ARIL and viewer report repair */
#panel-aril .panel-title {
  align-items: flex-start;
  gap: 18px;
}

#panel-aril .panel-title .inline-controls {
  min-width: min(360px, 100%);
  justify-content: flex-end;
  align-items: end;
}

#panel-aril .panel-title .inline-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

#panel-aril .panel-title .inline-controls button {
  min-height: 34px;
}

#panel-aril .aril-live-strip {
  margin-top: 14px;
}

.viewer-report-actions {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(178, 210, 238, 0.78);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(238,248,255,0.82));
}

.viewer-report-actions small {
  color: #607089;
  line-height: 1.45;
}

.soft-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(240, 253, 244, 0.86));
  color: #10233f;
}

.soft-loading small {
  color: #607089;
}

.spinner-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, #2f80ed, #22c55e, rgba(47,128,237,0.08), #2f80ed);
  position: relative;
  animation: spin 0.9s linear infinite;
}

.spinner-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255,255,255,0.96);
}

@media (max-width: 860px) {
  #panel-aril .panel-title,
  #panel-aril .panel-title .inline-controls,
  .viewer-report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] .viewer-report-actions {
  border-color: rgba(96, 165, 250, 0.24);
  background: linear-gradient(145deg, rgba(15,23,42,0.94), rgba(13,31,50,0.86));
}

:root[data-theme="dark"] .soft-loading {
  border-color: rgba(96, 165, 250, 0.24);
  background: linear-gradient(135deg, rgba(15,23,42,0.94), rgba(13,31,50,0.88));
  color: #e5edf9;
}

:root[data-theme="dark"] .spinner-dot::after {
  background: #121d2d;
}

/* Huawei FusionSolar SCADA dashboard */
.huawei-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.huawei-quick-plant-select small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
.huawei-selected-plant-context {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) minmax(320px, 1fr) minmax(250px, .8fr);
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(235,248,255,.9));
  box-shadow: 0 14px 36px rgba(30, 64, 175, 0.08);
}
.huawei-selected-plant-context > div,
.huawei-selected-plant-state {
  min-width: 0;
}
.huawei-selected-plant-context small,
.huawei-selected-plant-context span {
  display: block;
  color: #64748b;
}
.huawei-selected-plant-context strong {
  display: block;
  margin: 3px 0;
  color: #0f2942;
  font-size: 18px;
}
.huawei-selected-plant-main > strong {
  font-size: 23px;
  letter-spacing: -0.025em;
}
.huawei-selected-plant-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.huawei-selected-plant-metrics > span {
  padding: 9px 10px;
  border: 1px solid rgba(125, 174, 218, .24);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.huawei-selected-plant-metrics b {
  display: block;
  margin-top: 3px;
  color: #0f2942;
}
.huawei-selected-plant-state {
  position: relative;
  padding: 10px 12px 10px 42px;
  border-radius: 16px;
  background: rgba(16,185,129,.08);
}
.huawei-selected-plant-context.loading .huawei-selected-plant-state {
  background: rgba(14,165,233,.09);
}
.huawei-selected-plant-context.error .huawei-selected-plant-state {
  background: rgba(245,158,11,.11);
}
.huawei-context-spinner {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(14,165,233,.2);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: huaweiContextSpin .8s linear infinite;
}
@keyframes huaweiContextSpin { to { transform: rotate(360deg); } }
.huawei-section[data-huawei-panel="plants"].active {
  display: flex;
  flex-direction: column;
}
.huawei-section[data-huawei-panel="plants"] .huawei-plant-picker-card { order: -30; }
.huawei-section[data-huawei-panel="plants"] .huawei-detail-hero-card { order: -20; }
.huawei-section[data-huawei-panel="plants"] .huawei-detail-hero-card + .feature-card { order: -10; }
.huawei-clickable-plant-row {
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.huawei-clickable-plant-row:hover,
.huawei-clickable-plant-row:focus-visible {
  outline: none;
  background: rgba(224, 242, 254, .68);
  box-shadow: inset 4px 0 0 #0ea5e9;
}
.huawei-clickable-plant-row.is-selected {
  background: linear-gradient(90deg, rgba(209,250,229,.8), rgba(239,246,255,.72));
  box-shadow: inset 4px 0 0 #10b981;
}
.huawei-clickable-plant-row td strong,
.huawei-clickable-plant-row td small {
  display: block;
}
.huawei-clickable-plant-row td small {
  margin-top: 3px;
  color: #64748b;
}
.huawei-open-plant-button {
  white-space: nowrap;
  border-color: rgba(14,165,233,.32) !important;
  background: linear-gradient(135deg, #effaff, #e9fff5) !important;
  color: #075985 !important;
  font-weight: 800;
}
:root[data-theme="dark"] .huawei-selected-plant-context {
  border-color: rgba(96,165,250,.28);
  background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(13,42,62,.9));
}
:root[data-theme="dark"] .huawei-selected-plant-context strong,
:root[data-theme="dark"] .huawei-selected-plant-metrics b {
  color: #e5f2ff;
}
:root[data-theme="dark"] .huawei-selected-plant-context small,
:root[data-theme="dark"] .huawei-selected-plant-context span,
:root[data-theme="dark"] .huawei-clickable-plant-row td small {
  color: #9fb3c8;
}
:root[data-theme="dark"] .huawei-selected-plant-metrics > span {
  border-color: rgba(96,165,250,.2);
  background: rgba(15,23,42,.55);
}
:root[data-theme="dark"] .huawei-clickable-plant-row:hover,
:root[data-theme="dark"] .huawei-clickable-plant-row:focus-visible {
  background: rgba(14,165,233,.12);
}
:root[data-theme="dark"] .huawei-clickable-plant-row.is-selected {
  background: linear-gradient(90deg, rgba(16,185,129,.15), rgba(37,99,235,.12));
}
.huawei-filter-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.huawei-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(90, 160, 220, 0.28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(231,247,255,0.74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.huawei-tabbar button {
  border: 1px solid rgba(77, 146, 210, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.75);
  color: #143552;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.huawei-tabbar button.active {
  background: linear-gradient(135deg, #e7fff4, #dcecff);
  border-color: rgba(0, 168, 107, 0.45);
  color: #006b46;
  box-shadow: 0 10px 28px rgba(18, 116, 164, 0.13);
}
.huawei-segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(77, 146, 210, 0.24);
  border-radius: 14px;
  background: rgba(238, 247, 255, 0.8);
}
.huawei-segmented-control button {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: transparent;
  color: #48647d;
  font-weight: 800;
}
.huawei-segmented-control button.active {
  background: #fff;
  color: #075985;
  box-shadow: 0 5px 14px rgba(30, 64, 175, 0.12);
}
.huawei-plant-route-nav {
  position: sticky;
  top: 58px;
  z-index: 18;
  display: flex;
  gap: 7px;
  margin: 0 0 16px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(90, 160, 220, 0.25);
  border-radius: 18px;
  background: rgba(250, 253, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(35, 85, 124, 0.08);
}
.huawei-plant-route-nav.hidden { display: none; }
.huawei-plant-route-nav button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 11px;
  background: transparent;
  color: #49657d;
  font-size: 12px;
  font-weight: 800;
}
.huawei-plant-route-nav button.active {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, #e8fff5, #e5f2ff);
  color: #066647;
}
.huawei-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f8ff;
  color: #075985;
  font-size: 10px;
  font-weight: 900;
}
.huawei-chart-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 28px;
  text-align: center;
  color: #64748b;
  border: 1px dashed rgba(100, 116, 139, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(248,250,252,.9), rgba(239,248,255,.76));
}
.huawei-chart-empty strong { color: #17324a; font-size: 15px; }
.huawei-chart-empty span { max-width: 520px; line-height: 1.5; }
.huawei-group-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.huawei-group-report-grid button {
  display: grid;
  gap: 5px;
  padding: 15px;
  text-align: left;
  border: 1px solid rgba(77, 146, 210, 0.22);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f0f9ff);
  color: #17324a;
}
.huawei-group-report-grid span { color: #64748b; font-size: 12px; }
#panel-huaweiFusionSolar .table-wrap,
#panel-huaweiFusionSolar .feature-card > table { overflow-x: auto; }
:root[data-theme="dark"] .huawei-segmented-control,
:root[data-theme="dark"] .huawei-plant-route-nav,
:root[data-theme="dark"] .huawei-chart-empty,
:root[data-theme="dark"] .huawei-group-report-grid button {
  border-color: rgba(96,165,250,.22);
  background: rgba(15,23,42,.9);
  color: #dcecff;
}
:root[data-theme="dark"] .huawei-chart-empty strong { color: #e5f2ff; }
.huawei-section {
  display: none;
  margin-top: 16px;
}
.huawei-section.active {
  display: block;
}
.huawei-report-note {
  border: 1px solid rgba(0, 168, 107, 0.24);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(235,255,246,0.9), rgba(242,249,255,0.88));
}
.huawei-report-note p {
  margin: 6px 0 0;
  color: #35516a;
}
#panel-huaweiFusionSolar .feature-card {
  overflow: hidden;
}
#panel-huaweiFusionSolar .live-energy-echart {
  min-height: 320px;
}
#panel-huaweiFusionSolar textarea {
  min-height: 96px;
  resize: vertical;
}
@media (max-width: 980px) {
  .huawei-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
  .huawei-tabbar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .huawei-tabbar button {
    white-space: nowrap;
  }
  .huawei-selected-plant-context {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .huawei-filter-grid {
    grid-template-columns: 1fr;
  }
  .huawei-selected-plant-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* Huawei portfolio operations redesign */
#panel-huaweiFusionSolar .admin-ios-hero { display: none; }
.huawei-ops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 14px 0 12px;
  padding: 16px 18px;
  border: 1px solid rgba(122, 174, 222, 0.35);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(235,248,255,0.86));
  box-shadow: 0 14px 38px rgba(35, 85, 124, 0.08);
}
.huawei-ops-header span {
  display: block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.huawei-ops-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
  color: #111827;
}
.huawei-ops-header p {
  margin: 6px 0 0;
  color: #52677d;
  max-width: 760px;
}
#panel-huaweiFusionSolar #huaweiKpis {
  display: grid;
  grid-template-columns: repeat(9, minmax(156px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}
#panel-huaweiFusionSolar #huaweiKpis .license-free-kpi-card {
  min-width: 156px;
  padding: 14px;
  border-radius: 20px;
}
.huawei-fusion-overview {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
}
.huawei-fusion-overview-bg {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(260px, 0.8fr) minmax(260px, 0.8fr);
  gap: 18px;
  padding: 26px 30px;
  border-radius: 26px;
  background:
    linear-gradient(115deg, rgba(2, 41, 78, 0.96), rgba(0, 78, 132, 0.92)),
    radial-gradient(circle at 25% 75%, rgba(56, 189, 248, 0.28), transparent 42%);
  box-shadow: 0 24px 60px rgba(2, 41, 78, 0.22);
  color: #eef7ff;
}
.huawei-fusion-overview .panel-title h2,
.huawei-fusion-overview .panel-title p {
  color: #eef7ff;
}
.huawei-fusion-kpi-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  margin-top: 20px;
}
.huawei-fusion-kpi-tiles article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: end;
}
.huawei-fusion-kpi-tiles article::before {
  content: "";
  grid-row: span 3;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(219, 234, 254, 0.88);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
}
.huawei-fusion-kpi-tiles span {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
}
.huawei-fusion-kpi-tiles strong {
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.huawei-fusion-kpi-tiles small {
  color: #dbeafe;
  font-weight: 800;
}
.huawei-fusion-donut {
  min-height: 230px;
}
.huawei-status-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: -1px;
  background: #94a3b8;
}
.huawei-status-dot.healthy { background: #32c759; }
.huawei-status-dot.watch { background: #ff9500; }
.huawei-status-dot.critical { background: #ff3b30; }
.huawei-status-dot.offline,
.huawei-status-dot.no_data { background: #94a3b8; }
.link-button {
  border: 0;
  background: transparent;
  color: #007aff;
  font-weight: 850;
  cursor: pointer;
  padding: 0;
}
.huawei-trend-tabs {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(125, 177, 219, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(30, 76, 118, 0.08);
}
.huawei-trend-tabs button {
  min-width: 82px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid rgba(125, 177, 219, 0.24);
  background: transparent;
  color: #12324f;
  font-weight: 850;
  cursor: pointer;
}
.huawei-trend-tabs button:last-child { border-right: 0; }
.huawei-trend-tabs button.active {
  background: linear-gradient(135deg, #0a84ff, #38bdf8);
  color: #fff;
}
.huawei-trend-yield {
  display: grid;
  place-items: center;
  margin: 4px 0 10px;
  color: #94a3b8;
}
.huawei-trend-yield span {
  color: #9aa9bb;
  font-size: 12px;
  font-weight: 900;
}
.huawei-trend-yield strong {
  color: #0f172a;
  font-size: 18px;
}
.huawei-trend-yield small {
  color: #64748b;
}
.huawei-trend-card {
  grid-column: 1 / -1;
}
.huawei-priority-card {
  margin-bottom: 14px;
}
.huawei-ops-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.huawei-op-item {
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 13px 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(247,251,255,0.92));
  cursor: pointer;
}
.huawei-op-item span {
  grid-row: span 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
}
.huawei-op-item strong { color: #102033; }
.huawei-op-item em { font-style: normal; color: #334155; font-weight: 800; }
.huawei-op-item small { color: #64748b; }
.huawei-op-item.critical { border-color: rgba(239, 68, 68, 0.34); background: linear-gradient(135deg, #fff7f7, #fff); }
.huawei-op-item.watch { border-color: rgba(245, 158, 11, 0.36); background: linear-gradient(135deg, #fffaf0, #fff); }
.huawei-good-state {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #edfff6, #f8fbff);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.24);
}
.huawei-plant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.huawei-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.huawei-group-card {
  text-align: left;
  border: 1px solid rgba(125, 177, 219, 0.3);
  border-radius: 22px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(239,249,255,0.86));
  box-shadow: 0 14px 34px rgba(30, 76, 118, 0.07);
  cursor: pointer;
}
.huawei-group-card strong,
.huawei-group-card b,
.huawei-group-card span,
.huawei-group-card small {
  display: block;
}
.huawei-group-card strong {
  color: #102033;
  font-size: 16px;
}
.huawei-group-card span,
.huawei-group-card small {
  margin-top: 5px;
  color: #64748b;
}
.huawei-group-card b {
  margin-top: 10px;
  color: #0f766e;
  font-size: 26px;
}
.huawei-group-card.critical { border-color: rgba(239, 68, 68, 0.36); }
.huawei-group-card.watch { border-color: rgba(245, 158, 11, 0.36); }
.huawei-group-card.healthy { border-color: rgba(16, 185, 129, 0.28); }
.huawei-group-card.no_data { border-color: rgba(100, 116, 139, 0.28); }
.huawei-group-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.8fr) minmax(360px, 1.6fr);
  gap: 14px;
  align-items: stretch;
}
.huawei-group-manager {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.1fr) minmax(300px, 1fr);
  gap: 14px;
}
.huawei-group-panel,
.huawei-group-members-wrap {
  border: 1px solid rgba(125, 177, 219, 0.28);
  border-radius: 22px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(242,249,255,0.84));
  box-shadow: 0 14px 34px rgba(30, 76, 118, 0.06);
}
.huawei-group-panel h3,
.huawei-group-members-wrap h3 {
  margin: 0 0 12px;
  color: #102033;
  letter-spacing: -0.02em;
}
.huawei-group-tree {
  display: grid;
  gap: 9px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}
.huawei-group-tree button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 10px 11px;
  background: rgba(255,255,255,0.72);
  cursor: pointer;
}
.huawei-group-tree button.active {
  border-color: rgba(0, 168, 107, 0.42);
  background: linear-gradient(135deg, #e7fff4, #eef7ff);
  box-shadow: 0 12px 26px rgba(20, 116, 96, 0.1);
}
.huawei-group-tree button span {
  grid-row: span 2;
  width: 14px;
  height: 32px;
  border-radius: 999px;
}
.huawei-group-tree strong { color: #102033; }
.huawei-group-tree small {
  color: #64748b;
  font-weight: 750;
}
.huawei-group-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.huawei-group-form .wide { grid-column: 1 / -1; }
.huawei-group-assign-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  margin: 10px 0;
  padding-right: 4px;
}
.huawei-assign-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.72);
}
.huawei-assign-row strong,
.huawei-assign-row small { display: block; }
.huawei-assign-row strong { color: #102033; }
.huawei-assign-row small { color: #64748b; }
.huawei-group-members-wrap { margin-top: 14px; }
.huawei-detail-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(125, 177, 219, 0.22);
}
.huawei-detail-subtabs button {
  border: 1px solid rgba(77, 146, 210, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.78);
  color: #164e83;
  font-weight: 850;
}
.huawei-detail-subtabs button.active {
  background: linear-gradient(135deg, #dcfce7, #e0f2fe);
  color: #065f46;
}
.huawei-detail-subtabs button:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}
.huawei-plant-card {
  border: 1px solid rgba(136, 173, 203, 0.38);
  border-radius: 28px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(244,250,255,0.9));
  box-shadow: 0 20px 44px rgba(33, 75, 115, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.huawei-plant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 58px rgba(33, 75, 115, 0.14);
}
.huawei-plant-card.healthy { border-color: rgba(16, 185, 129, 0.34); }
.huawei-plant-card.watch { border-color: rgba(245, 158, 11, 0.46); }
.huawei-plant-card.critical { border-color: rgba(239, 68, 68, 0.48); }
.huawei-plant-card.offline, .huawei-plant-card.no_data { border-color: rgba(100, 116, 139, 0.35); }
.huawei-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.huawei-card-top strong {
  display: block;
  font-size: 17px;
  color: #102033;
  letter-spacing: -0.02em;
}
.huawei-card-top span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
}
.huawei-card-top em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e2e8f0;
  color: #334155;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.huawei-plant-card.healthy .huawei-card-top em { background: #dcfce7; color: #166534; }
.huawei-plant-card.watch .huawei-card-top em { background: #fef3c7; color: #92400e; }
.huawei-plant-card.critical .huawei-card-top em { background: #fee2e2; color: #991b1b; }
.huawei-main-metric {
  margin: 18px 0 12px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(232,247,255,0.92), rgba(239,255,247,0.78));
}
.huawei-main-metric small, .huawei-metric-grid small { display: block; color: #64748b; font-weight: 800; font-size: 11px; }
.huawei-main-metric b { font-size: 28px; color: #0f172a; letter-spacing: -0.04em; }
.huawei-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.huawei-metric-grid span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.72);
}
.huawei-metric-grid b { display: block; margin-top: 3px; color: #102033; font-size: 14px; }
.huawei-sparkline {
  width: 100%; height: 56px; margin: 14px 0 10px;
  border-radius: 16px; background: rgba(241, 248, 255, 0.8);
}
.huawei-mini-empty {
  margin: 14px 0 10px;
  padding: 15px;
  border-radius: 16px;
  color: #64748b;
  background: rgba(241, 245, 249, 0.82);
  text-align: center;
  font-weight: 700;
}
.huawei-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.huawei-card-actions button {
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  padding: 8px 11px;
  color: #164e83;
  font-weight: 850;
  cursor: pointer;
}
.huawei-detail-hero-card {
  background: radial-gradient(circle at 12% 15%, rgba(186, 230, 253, 0.52), transparent 34%), linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,249,255,0.9));
}
.huawei-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 0.8fr) minmax(320px, 1.6fr);
  gap: 14px;
  align-items: stretch;
}
.huawei-detail-title,
.huawei-detail-meter,
.huawei-detail-stats span,
.huawei-coverage-card,
.huawei-inverter-summary article,
.huawei-inverter-card {
  border: 1px solid rgba(125, 177, 219, 0.28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(243,250,255,0.86));
  box-shadow: 0 14px 34px rgba(30, 76, 118, 0.07);
}
.huawei-detail-title {
  padding: 18px;
}
.huawei-detail-title span {
  display: block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.huawei-detail-title h2 {
  margin: 4px 0;
  color: #0f172a;
  font-size: clamp(22px, 2.2vw, 34px);
  letter-spacing: -0.04em;
}
.huawei-detail-title p {
  margin: 0;
  color: #64748b;
}
.huawei-group-edit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
  align-items: end;
}
.huawei-group-edit label {
  color: #50677e;
  font-size: 12px;
  font-weight: 850;
}
.huawei-group-edit input {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid rgba(125, 177, 219, 0.35);
  border-radius: 13px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.86);
}
.huawei-group-edit button {
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 999px;
  padding: 10px 13px;
  background: linear-gradient(135deg, #dcfce7, #e0f2fe);
  color: #065f46;
  font-weight: 900;
  cursor: pointer;
}
.huawei-detail-meter {
  padding: 18px;
}
.huawei-detail-meter small,
.huawei-detail-stats small,
.huawei-coverage-card small,
.huawei-inverter-summary small {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}
.huawei-detail-meter strong {
  display: block;
  margin: 6px 0 10px;
  font-size: 32px;
  letter-spacing: -0.05em;
  color: #082f49;
}
.huawei-detail-meter div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.huawei-detail-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}
.huawei-detail-meter em {
  display: block;
  margin-top: 8px;
  color: #475569;
  font-style: normal;
  font-weight: 800;
}
.huawei-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.huawei-detail-stats span {
  padding: 14px;
}
.huawei-detail-stats b {
  display: block;
  margin-top: 4px;
  color: #102033;
  font-size: 16px;
}
.huawei-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.huawei-chart-grid > div,
.huawei-wide-chart {
  border: 1px solid rgba(125, 177, 219, 0.22);
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(242,249,255,0.78));
}
.huawei-chart-grid h3,
.huawei-wide-chart h3 {
  margin: 0 0 8px;
  color: #143552;
  font-size: 15px;
}
.huawei-wide-chart {
  margin-top: 14px;
}
.huawei-inverter-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.huawei-inverter-summary article {
  padding: 14px;
}
.huawei-inverter-summary strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 24px;
}
.huawei-inverter-summary span {
  color: #64748b;
}
.huawei-inverter-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.huawei-inverter-card {
  padding: 13px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.huawei-inverter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .10);
}
.huawei-inverter-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.huawei-inverter-card strong {
  color: #102033;
}
.huawei-inverter-card em {
  border-radius: 999px;
  padding: 5px 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.huawei-inverter-card b {
  display: block;
  margin: 10px 0 4px;
  color: #0f766e;
  font-size: 22px;
}
.huawei-inverter-card span,
.huawei-inverter-card small {
  display: block;
  color: #64748b;
}
.huawei-inverter-card.critical,
.huawei-inverter-card.underperformance,
.huawei-inverter-card.possible_fault {
  border-color: rgba(239, 68, 68, 0.38);
  background: linear-gradient(145deg, rgba(255,247,247,0.96), rgba(255,255,255,0.9));
}
.huawei-inverter-card.watch {
  border-color: rgba(245, 158, 11, 0.38);
}
.huawei-heatmap-chart {
  min-height: 420px !important;
}
.huawei-coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.huawei-coverage-card {
  padding: 13px;
}
.huawei-coverage-card strong {
  display: block;
  margin: 4px 0;
  color: #0f172a;
  font-size: 20px;
}
.huawei-coverage-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.huawei-coverage-card.ok {
  border-color: rgba(16, 185, 129, 0.28);
}
.huawei-coverage-card.empty {
  opacity: 0.76;
}
.huawei-coverage-card.error {
  border-color: rgba(239, 68, 68, 0.32);
}
.huawei-coverage-card em {
  display: block;
  margin-top: 6px;
  color: #991b1b;
  font-style: normal;
  font-size: 11px;
}
.huawei-map-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 24px;
  color: #31516d;
  background: radial-gradient(circle at 30% 20%, rgba(191, 219, 254, 0.35), transparent 35%), linear-gradient(135deg, #f8fbff, #eef8ff);
}
@media (min-width: 1680px) {
  .huawei-plant-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .huawei-plant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .huawei-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .huawei-fusion-overview-bg { grid-template-columns: 1fr; }
  .huawei-ops-header { align-items: flex-start; flex-direction: column; }
  .huawei-detail-hero,
  .huawei-group-detail-hero,
  .huawei-group-manager,
  .huawei-chart-grid {
    grid-template-columns: 1fr;
  }
  .huawei-inverter-summary,
  .huawei-inverter-card-grid,
  .huawei-coverage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .huawei-plant-grid { grid-template-columns: 1fr; }
  .huawei-group-grid { grid-template-columns: 1fr; }
  .huawei-fusion-kpi-tiles { grid-template-columns: 1fr; }
  .huawei-trend-tabs { width: 100%; overflow-x: auto; }
  .huawei-trend-tabs button { min-width: 96px; }
  .huawei-metric-grid { grid-template-columns: 1fr; }
  .huawei-group-edit { grid-template-columns: 1fr; }
  .huawei-group-form { grid-template-columns: 1fr; }
  .huawei-detail-stats,
  .huawei-inverter-summary,
  .huawei-inverter-card-grid,
  .huawei-coverage-grid {
    grid-template-columns: 1fr;
  }
}

/* Huawei history coverage badges */
#panel-huaweiFusionSolar .huawei-table .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(241, 245, 249, 0.86);
  color: #475569;
}
#panel-huaweiFusionSolar .huawei-table .pill.success {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.35);
  color: #047857;
}
#panel-huaweiFusionSolar .huawei-table .pill.warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.36);
  color: #92400e;
}
#panel-huaweiFusionSolar .huawei-table .pill.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.32);
  color: #b91c1c;
}
#panel-huaweiFusionSolar .huawei-table .pill.muted {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.26);
  color: #475569;
}

/* Huawei SCADA v0.8.330: compact, data-first portfolio cockpit. */
#panel-huaweiFusionSolar {
  --huawei-space-1: 8px;
  --huawei-space-2: 12px;
  --huawei-space-3: 18px;
  --huawei-radius: 18px;
  --huawei-border: rgba(113, 157, 194, 0.26);
  --huawei-panel: rgba(255, 255, 255, 0.9);
  --huawei-ink: #12324f;
}
#panel-huaweiFusionSolar .huawei-fusion-overview-bg {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--huawei-space-3);
  padding: 20px;
  border: 1px solid var(--huawei-border);
  border-radius: 24px;
  background: linear-gradient(135deg, #f8fcff 0%, #edf8f6 56%, #f5fbff 100%);
  box-shadow: 0 14px 36px rgba(30, 76, 118, 0.08);
  color: var(--huawei-ink);
}
#panel-huaweiFusionSolar .huawei-fusion-overview .panel-title h2 { color: #163a58; font-size: 18px; }
#panel-huaweiFusionSolar .huawei-fusion-overview .panel-title p { color: #5c7389; font-size: 12px; line-height: 1.45; }
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles { gap: 10px; margin-top: 12px; }
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles article {
  min-height: 72px;
  padding: 10px;
  border: 1px solid rgba(106, 165, 197, 0.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
}
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles article::before { width: 24px; height: 24px; border-color: rgba(18, 119, 155, 0.35); background: rgba(34, 197, 94, 0.1); }
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles span,
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles small { color: #5c7389; }
#panel-huaweiFusionSolar .huawei-fusion-kpi-tiles strong { color: #12324f; font-size: 21px; }
#panel-huaweiFusionSolar .huawei-fusion-donut { min-height: 190px; }
#panel-huaweiFusionSolar .huawei-group-card {
  display: flex;
  min-height: 296px;
  flex-direction: column;
  gap: 11px;
  padding: 16px;
  border-radius: var(--huawei-radius);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
#panel-huaweiFusionSolar .huawei-group-card:hover,
#panel-huaweiFusionSolar .huawei-group-card:focus-visible { transform: translateY(-2px); border-color: rgba(14, 116, 144, 0.52); box-shadow: 0 18px 38px rgba(30, 76, 118, 0.13); outline: none; }
.huawei-group-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.huawei-group-card-head em { padding: 5px 8px; border-radius: 999px; background: #edf7f1; color: #15734f; font-size: 11px; font-style: normal; font-weight: 850; white-space: nowrap; }
.huawei-group-card.critical .huawei-group-card-head em { background: #fff0ef; color: #bd3128; }
.huawei-group-card.watch .huawei-group-card-head em { background: #fff6df; color: #9b6100; }
.huawei-group-primary { padding: 10px 0; border-top: 1px solid rgba(125, 177, 219, 0.22); border-bottom: 1px solid rgba(125, 177, 219, 0.22); }
.huawei-group-primary b { margin: 0; color: #0b5877; font-size: 28px; }
.huawei-group-primary small { margin: 3px 0 0; }
.huawei-group-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.huawei-group-metrics span { padding: 7px; border-radius: 11px; background: rgba(240, 249, 255, 0.76); }
.huawei-group-metrics b { margin: 2px 0 0; color: #183f5d; font-size: 14px; }
.huawei-group-alerts { color: #4e657b; font-size: 12px; font-weight: 750; line-height: 1.45; }
.huawei-group-footer { margin-top: auto; }
.huawei-group-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.huawei-group-actions button { min-height: 34px; border: 1px solid rgba(72, 132, 174, 0.26); border-radius: 10px; background: #fff; color: #12526f; font-weight: 800; cursor: pointer; }
.huawei-group-actions button:hover { background: #eaf7f5; border-color: rgba(16, 185, 129, 0.4); }
.huawei-table-toolbar,
.huawei-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; color: #587188; font-size: 12px; font-weight: 750; }
.huawei-table-toolbar label { display: inline-flex; align-items: center; gap: 7px; }
.huawei-table-toolbar select { min-height: 32px; border: 1px solid var(--huawei-border); border-radius: 9px; background: #fff; padding: 4px 7px; color: var(--huawei-ink); }
.huawei-operation-table { width: 100%; min-width: 1260px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.huawei-operation-table th { position: sticky; top: 0; z-index: 1; background: #f0f8fb; text-align: left; white-space: nowrap; }
.huawei-operation-table th button { border: 0; background: transparent; color: #45627a; font-size: 11px; font-weight: 900; cursor: pointer; }
.huawei-operation-table th,
.huawei-operation-table td { padding: 10px 9px; border-bottom: 1px solid rgba(125, 177, 219, 0.2); white-space: nowrap; }
.huawei-operation-table tbody tr { cursor: pointer; }
.huawei-operation-table tbody tr:hover,
.huawei-operation-table tbody tr:focus-visible { background: #eefaf8; outline: 0; }
.huawei-range-inputs { display: inline-flex; gap: 5px; align-items: center; }
.huawei-range-inputs input { width: 66px; min-height: 34px; border: 1px solid var(--huawei-border); border-radius: 9px; padding: 4px 7px; }
.huawei-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; color: #6b7d8e; font-size: 12px; }
.huawei-breadcrumb button { padding: 0; border: 0; background: transparent; color: #087b9f; font-weight: 850; cursor: pointer; }
.huawei-detail-status { display: inline-flex !important; width: fit-content; margin-top: 9px; padding: 5px 9px; border-radius: 999px; background: #edf7f1; color: #15734f !important; letter-spacing: normal !important; text-transform: none !important; }
.huawei-detail-status.watch { background: #fff6df; color: #9b6100 !important; }
.huawei-detail-status.critical,
.huawei-detail-status.offline { background: #fff0ef; color: #bd3128 !important; }
.huawei-detail-status.no_data { background: #eef2f7; color: #64748b !important; }
.huawei-device-category-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.huawei-device-category { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--huawei-border); border-radius: 999px; padding: 6px 9px; background: #f8fcff; color: #5a7087; font-size: 11px; }
.huawei-device-category b { color: #15516d; }
.huawei-trend-period-controls { display: inline-flex; align-items: center; gap: 7px; padding: 4px; border: 1px solid var(--huawei-border); border-radius: 13px; background: rgba(255,255,255,.72); }
.huawei-trend-period-controls button { min-height: 34px; border: 0; border-radius: 9px; padding: 6px 10px; background: #eef8fb; color: #15516d; font-weight: 850; cursor: pointer; }
.huawei-trend-period-controls button:disabled { opacity: .45; cursor: not-allowed; }
.huawei-trend-period-controls input { min-height: 34px; max-width: 130px; border: 0; border-radius: 9px; padding: 5px 8px; color: #193e5a; background: #fff; font-weight: 800; }
.huawei-inverter-empty { margin-top: 14px; padding: 18px; border: 1px dashed rgba(14,116,144,.38); border-radius: 16px; background: #f7fcff; color: #587188; }
.huawei-inverter-empty strong, .huawei-inverter-empty span { display: block; }
.huawei-inverter-empty strong { color: #163a58; font-size: 16px; }
.huawei-inverter-empty span { margin: 5px 0 12px; }
.huawei-inverter-empty button { margin-right: 8px; border: 1px solid rgba(47,125,166,.28); border-radius: 10px; padding: 8px 10px; background: #fff; color: #15516d; font-weight: 800; cursor: pointer; }
.huawei-inline-note { padding: 13px; border-radius: 13px; background: #f2faf9; color: #28606b; font-weight: 750; }

/* Paper-only market analysis stays visually separate from execution controls. */
.trade-analysis-shell { margin-top: 22px; padding: 20px; border: 1px solid rgba(61, 138, 183, .26); border-radius: 22px; background: linear-gradient(135deg, #f8fcff 0%, #eef9f6 100%); box-shadow: 0 15px 34px rgba(37, 82, 116, .08); }
.ptf-subnav { display: flex; gap: 9px; margin: 18px 0; padding: 7px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid rgba(48, 124, 171, .18); border-radius: 15px; background: rgba(245, 251, 255, .82); }
.ptf-subnav button { white-space: nowrap; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; color: #28516f; background: transparent; font-weight: 700; }
.ptf-subnav button.active { color: #fff; border-color: #087d88; background: linear-gradient(135deg, #087d88, #16a58d); box-shadow: 0 5px 13px rgba(8, 125, 136, .22); }
.trade-analysis-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.trade-analysis-head h3 { margin: 3px 0 5px; color: #123d5e; font-size: 22px; }
.trade-analysis-head p { max-width: 700px; margin: 0; color: #5e7488; line-height: 1.55; }
.trade-analysis-filters { align-items: flex-end; justify-content: flex-end; }
.trade-analysis-filters label { display: grid; gap: 4px; color: #5a7185; font-size: 11px; font-weight: 800; }
.trade-analysis-filters input { min-width: 132px; }
.trade-analysis-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 19px -2px 14px; padding: 2px; scrollbar-width: thin; }
.trade-analysis-tabs button { flex: 0 0 auto; min-height: 34px; border: 1px solid #c8deee; border-radius: 999px; padding: 6px 11px; background: #fff; color: #24536f; font-size: 12px; font-weight: 800; cursor: pointer; }
.trade-analysis-tabs button:hover, .trade-analysis-tabs button.active { border-color: #139d8a; background: #ddf7ee; color: #126656; }
.trade-analysis-content { min-height: 112px; }
.trade-analysis-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.trade-analysis-kpis article { min-height: 92px; padding: 13px; border: 1px solid #d0e2ef; border-radius: 15px; background: rgba(255,255,255,.78); }
.trade-analysis-kpis span, .trade-analysis-kpis small { display: block; color: #667d91; font-size: 11px; font-weight: 750; }
.trade-analysis-kpis strong { display: block; margin: 7px 0 3px; color: #153b5b; font-size: 20px; }
.trade-analysis-table { width: 100%; min-width: 830px; border-collapse: collapse; font-size: 12px; }
.trade-analysis-table th, .trade-analysis-table td { padding: 9px 8px; border-bottom: 1px solid rgba(119,159,187,.24); text-align: left; white-space: nowrap; }
.trade-analysis-table th { color: #48657a; background: rgba(227,242,248,.74); font-size: 11px; }
.trade-grade { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; background: #eaf5ff; color: #176589; font-size: 11px; font-weight: 850; }
.trade-grade.verified { background: #daf7e9; color: #13734e; }
.trade-grade.theoretical { background: #fff2de; color: #9a5e00; }
.trade-analysis-note { margin: 0 0 12px; padding: 13px 15px; border: 1px solid #b8ddec; border-radius: 14px; background: linear-gradient(135deg, #f4fbff, #f0faf5); color: #315b72; font-size: 12px; line-height: 1.55; }
.trade-analysis-note strong { color: #0e5e69; }
.gip-energyai-smf { color: #7c3aed; font-weight: 850; background: rgba(124, 58, 237, .07); }
.market-research-control { margin: 22px 0; padding: 19px; border: 1px solid #b9dfe2; border-radius: 18px; background: linear-gradient(135deg, #f5fcff, #effbf5); box-shadow: 0 10px 24px rgba(37, 89, 114, .06); }
.market-research-control .panel-title { margin-bottom: 13px; }
.market-research-control .panel-title h3 { margin: 3px 0 6px; color: #123e5d; font-size: 19px; }
.market-research-control .panel-title p { max-width: 800px; margin: 0; color: #58728a; line-height: 1.5; }
.market-research-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 12px 0; }
.market-research-controls label { display: grid; gap: 5px; min-width: 160px; color: #41647a; font-size: 12px; font-weight: 800; }
.market-research-datasets { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 8px; margin: 12px 0; }
.market-research-datasets label { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 9px 11px; border: 1px solid #d0e5ed; border-radius: 11px; background: rgba(255,255,255,.72); color: #24546d; font-size: 12px; font-weight: 750; }
.market-research-datasets input { accent-color: #0c9986; }
  .market-research-actions { margin: 13px 0; }
  .market-research-manual-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; margin: 12px 0; border: 1px solid #b7dfd1; border-radius: 12px; background: linear-gradient(135deg, #effbf7, #f7fcff); }
  .market-research-manual-import > div { flex: 1 1 360px; display: grid; gap: 3px; color: #24546d; }
  .market-research-manual-import strong { color: #08766a; font-size: 13px; }
  .market-research-manual-import small { color: #58728a; line-height: 1.45; }
  #marketResearchManualGipStatus { margin: 9px 0; }
.market-research-plan { padding: 10px 12px; border: 1px dashed #a9d5e5; border-radius: 11px; background: rgba(255,255,255,.6); line-height: 1.55; }
.market-research-control .compact-jobs { margin-top: 11px; max-height: 150px; overflow: auto; }
.trade-analysis-chart { width: 100%; min-height: 330px; margin: 14px 0; border: 1px solid rgba(128, 173, 202, .3); border-radius: 16px; background: rgba(255,255,255,.64); }
.trade-analysis-chart-short { min-height: 260px; }
.trade-analysis-kpis-compact article { min-height: 104px; }
.trade-analysis-details { margin-top: 12px; border: 1px solid rgba(128, 173, 202, .32); border-radius: 14px; background: rgba(255,255,255,.56); }
.trade-analysis-details summary { padding: 12px 14px; cursor: pointer; color: #17466b; font-weight: 800; }
.trade-analysis-details .scroll-table { margin: 0 12px 12px; }
.trade-analysis-empty, .trade-empty-state { padding: 22px; border: 1px dashed #b8d5e7; border-radius: 14px; background: rgba(255,255,255,.7); color: #5f778c; text-align: center; }
.trade-empty-state strong, .trade-empty-state span { display: block; }
.trade-empty-state strong { margin-bottom: 5px; color: #1d4b68; }
.trade-explain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.trade-explain-grid article { min-height: 76px; padding: 13px; border: 1px solid #d3e5ee; border-radius: 14px; background: rgba(255,255,255,.76); }
.trade-explain-grid strong, .trade-explain-grid span { display: block; }
.trade-explain-grid strong { margin-bottom: 6px; color: #1a4965; font-size: 12px; }
.trade-explain-grid span { color: #5f778b; font-size: 12px; line-height: 1.45; }
@media (max-width: 1180px) {
  #panel-huaweiFusionSolar .huawei-fusion-overview-bg { grid-template-columns: 1fr; }
  #panel-huaweiFusionSolar .huawei-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade-analysis-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade-explain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #panel-huaweiFusionSolar .huawei-group-grid { grid-template-columns: 1fr; }
  #panel-huaweiFusionSolar .huawei-fusion-overview-bg { padding: 14px; border-radius: 18px; }
  #panel-huaweiFusionSolar .huawei-fusion-donut { min-height: 160px; }
  .huawei-trend-period-controls { width: 100%; justify-content: space-between; }
  .huawei-trend-period-controls input { flex: 1; }
  .huawei-table-toolbar, .huawei-pagination { align-items: flex-start; flex-direction: column; }
  .huawei-group-card { min-height: 0; }
  .trade-analysis-shell { padding: 14px; border-radius: 17px; }
  .trade-analysis-head { flex-direction: column; }
  .trade-analysis-kpis { grid-template-columns: 1fr; }
  .trade-explain-grid { grid-template-columns: 1fr; }
  .trade-analysis-filters { justify-content: flex-start; }
  .market-research-datasets { grid-template-columns: 1fr; }
}
.turkiye-market-outlook { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.25); display: grid; gap: 4px; font-size: 11px; }
.turkiye-market-outlook-title { font-weight: 800; font-size: 11px; }
.turkiye-market-outlook-row { display: grid; grid-template-columns: 36px 1fr 1fr 1.1fr; gap: 5px; align-items: center; }
.turkiye-market-outlook-row b { font-size: 10px; white-space: nowrap; }
.turkiye-market-outlook-row em { font-style: normal; font-weight: 800; font-size: 10px; }
.turkiye-market-outlook-row.energy_deficit em { color: #7f1d1d; }
.turkiye-market-outlook-row.energy_surplus em { color: #064e3b; }
