/* styles.css */
:root {
  --bg: #0b1220;
  --panel: #111a2b;
  --muted: #8ea0b8;
  --text: #e6eefc;
  --brand: #3b82f6;
  --brand-600: #2563eb;
  --accent: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --ring: rgba(59, 130, 246, 0.45);
  --card-shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --panel: #ffffff;
    --muted: #5b6b7d;
    --text: #0e141b;
    --card-shadow: 0 10px 30px rgba(18, 38, 63, .08);
  }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 900px at 20% -10%, rgba(59,130,246,.12), transparent 60%),
              radial-gradient(900px 700px at 120% 10%, rgba(34,197,94,.10), transparent 60%),
              var(--bg);
  line-height: 1.35;
}
.shell {
  max-width: 1100px;
  margin: 10px auto 56px;
  padding: 0 16px;
}
header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand .title {
  font-weight: 700;
  font-size: 1.15rem;
}
.chip {
  font-size: .72rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.25);
}
.tabs {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(128,145,171,.25);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 10px;
}
.tablist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.tab-btn {
  border: 1px solid rgba(128,145,171,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, border-color .15s ease, background .15s ease;
}
.tab-btn[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(59,130,246,.22), rgba(59,130,246,.12));
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}
.tab-btn:hover {
  transform: translateY(-1px);
}
.panel {
  margin-top: 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(128,145,171,.25);
  box-shadow: var(--card-shadow);
  padding: 18px 16px;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.muted { color: var(--muted); }
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.col {
  flex: 1 1 320px;
  min-width: 260px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(128,145,171,.25);
  border-radius: var(--radius);
  padding: 14px;
}
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
}
.stat .k { font-size: .75rem; color: var(--muted); }
.stat .v { font-weight: 700; }
/*.btn {*/
button, .btn {
  border: 1px solid rgba(128,145,171,.3);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  color: var(--text);
  transition: transform .06s ease, border-color .2s ease;
}
button:hover, .btn:hover { 
  transform: translateY(-1px);
  /* rgba(59,130,246,0.06) 
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  background: rgba(59, 130, 246, 0.45);*/
  background: linear-gradient(180deg, rgba(59,130,246,.32), rgba(255,255,255,.04));
}
button.primary, .btn.primary {
  border-color: var(--brand-600);
  background: linear-gradient(180deg, rgba(59,130,246,.25), rgba(59,130,246,.12));
}
button.danger, .btn.danger {
  border-color: rgba(239,68,68,.65);
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(239,68,68,.12));
}
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 700; }
th, td { padding: 10px 12px; border-bottom: 1px solid rgba(128,145,171,.25); }
/* Style a td itself if its first child is a span I.e indicator lights */
/*td:has(> span:first-child) { text-align: center; }*/
tr:hover td { background: rgba(59,130,246,.06); }
input, select {
  width: 70px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(128,145,171,.35);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
}
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}
/* Open dropdown list items */
select option {
  background-color: var(--panel);
  color: var(--text);
}
/* Selected option in the list */
select option:checked {
  background-color: color-mix(in srgb, var(--panel) 40%, white);
}

/* Fallback for browsers without color-mix() */
@supports not (color-mix(in srgb, white, black)) {
  select option:checked {
    background-color: #2a3550; /* manually chosen lighter shade */
  }
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .74rem;
  border: 1px solid rgba(128,145,171,.3);
}
.badge.ok { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); }
.badge.warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.4); }
.badge.err { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .tablist { grid-template-columns: 1fr 1fr; }
  header.app-header { flex-direction: column; align-items: flex-start; }
}

.table-wrapper {
  width: 100%;
  /* max-width: 600px; Restrict max width on larger screens */
  /* overflow-x: auto; Enable horizontal scrolling for overflow */
  margin: 0 auto; /* Center the table */
}
.feed-plan {
  width: 550px;
  display: flex;
  flex-direction: column;
}
.feed-plan-body {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  text-align: left;
}
.feed-plan-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.feed-plan-row {
  min-height: 21px;
}
.div-container {
  width: 100%; 
}

.message-area {
  width: 100%;
  height: 200px;
  border: 1px solid #ccc;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f4f4f4;
  font-family: monospace;
  overflow-y: scroll;
}
#controls {
  margin-top: 5px;
}
/* Styling for different table cell backgrounds*/
.hidden {
  display: none;
  visibility: hidden
}
/* Title styling to indicate it's clickable */
.header-cickable {
  cursor: pointer;
  color: #0066cc;
}
.status-green {
  background-color: green;
  color: white;
}
.status-orange {
  background-color: orange;
  color: black;
}
.status-red {
  background-color: red;
  color: black;
}
.warning-banner {
  position: sticky;
  top: 8px;
  z-index: 1000;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  /*background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));*/
  background: linear-gradient(180deg, rgba(59,130,246,.25), rgba(59,130,246,.12));
  color: var(--text);
  border: 1px solid rgba(128,145,171,.28);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(6px);
  margin: 8px 0 10px;
  border-left: 30px solid var(--warning); /* default tone */
  opacity: 0.8;
}

.warning-banner .wb-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--warning);
}

.warning-banner .wb-body strong {
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}

.warning-banner .wb-body {
  font-size: .92rem;
}

/* Variants */
.warning-banner.warning {
  border-left-color: var(--warning);
  /* This makes the whole banner a color instread of just the left */
  /*background-color: var(--warning);*/
}
.warning-banner.error {
  border-left-color: var(--danger);
  /* This makes the whole banner a color instread of just the left */
  /*background-color: var(--danger);*/
}
.warning-banner.error .wb-icon { color: var(--danger); }
/* Ensure tables are responsive on smaller screens (600px or less) */
@media (max-width: 600px) {
  body {
    align-items: normal;
  }
  table {
    /*width: 100%;*/
    font-size: smaller;  /* Reduce text size on small screens */
  }

  th, td {
    padding: 0px;  /* Adjust padding for smaller screens */
  }

 .sticky-banner {
    position: fixed;
    width: calc(100% - 20px); /* Adjust width to account for margins */
    left: 10px;
    right: 10px;
  }
}

.colored-dot-red {
  font-size: 24px;
  color: red;
}
.colored-dot-green {
  font-size: 24px;
  color: green;
}
.colored-dot-black {
  font-size: 24px;
  color: black;
}

/* Tailwind css styling */
.text-center { text-align: center; }

/* Toast notifications */
.toast-stack {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none; /* allow clicks to pass unless on toast */
}
.toast {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: start;
  gap: 10px;
  min-width: 240px;
  max-width: min(90vw, 380px);
  padding: 10px 12px;
  border: 1px solid rgba(128,145,171,.28);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
  pointer-events: auto; /* clickable */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.enter { opacity: 1; transform: translateY(0); }
.toast.leaving { opacity: 0; transform: translateY(-6px); }
.toast .toast-icon { font-size: 16px; line-height: 1; margin-top: 2px; }
.toast .toast-body { font-size: .92rem; }
.toast .toast-close {
  background: transparent;
  border: none;
  color: var(--text);
  opacity: .8;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}
.toast .toast-close:hover { opacity: 1; }

/* Variants */
.toast.info { border-left: 4px solid var(--brand); }
.toast.success { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }

.toast.info .toast-icon { color: var(--brand); }
.toast.success .toast-icon { color: var(--accent); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.error .toast-icon { color: var(--danger); }

@media (max-width: 600px) {
  .toast-stack { left: 10px; right: 10px; }
  .toast { max-width: 100%; }
}