body {
  font-family: system-ui, sans-serif;
  margin: 20px;
  background-color: #ffffff;      /* normal background */
  transition: background-color 0.25s ease;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: -20px -20px 20px;
  background: #0b1220;
  color: #e8eefc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.site-topbar a {
  color: inherit;
  text-decoration: none;
}

.site-topbar-wrap {
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.site-brand-logo {
  display: block;
  height: 30px;
  width: auto;
}

.site-brand span {
  color: #7db0ff;
}

.site-nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  color: #a7b4d3;
  font-size: 0.96rem;
}

.site-nav-links > a:hover,
.site-nav-links > a:focus-visible,
.site-nav-dropdown-trigger:hover,
.site-nav-dropdown-trigger:focus-visible {
  color: #ffffff;
}

.site-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: max(100%, 280px);
  height: 12px;
}

.site-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 280px;
  padding: 10px;
  border: 1px solid rgba(125, 176, 255, 0.22);
  border-radius: 16px;
  background: rgba(7, 15, 28, 0.96);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 120;
}

.site-nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #eef4ff;
  white-space: nowrap;
}

.site-nav-dropdown-menu a:hover,
.site-nav-dropdown-menu a:focus-visible {
  background: rgba(125, 176, 255, 0.12);
  color: #ffffff;
}

.site-nav-dropdown:hover .site-nav-dropdown-menu,
.site-nav-dropdown:focus-within .site-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-nav-button:hover,
.site-nav-button:focus-visible {
  transform: translateY(-1px);
}

.page-back-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

/* when disconnected, make background pale red */
body.disconnected {
  background-color: #fee2e2;      /* light red */
}

header { display:flex; justify-content:space-between; align-items:center; margin-bottom: 16px; }
main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-feed{
  /* this is the “red box” area */
  height: 160px;              /* pick the height you want for the box */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feed-link{
  display: block;
  height: 100%;
}

.feed-img{
  height: 100%;
  object-fit: contain;        /* contain = no crop; use cover if you want fill/crop */
  background: #222;           /* matches your older page’s gray fallback */
  display: block;
  cursor: pointer;
}


/* Full-screen overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* Hidden state */
.overlay.hidden {
  display: none;
}

.overlay-icon {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 12px auto; /* centered, with space below */
}


.overlay-card {
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 20px 22px;
  background: #1f1f1f;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.overlay-card h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.overlay-card p {
  margin: 0 0 16px 0;
  opacity: 0.9;
}

.overlay-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.overlay-actions button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 32px;
  background: #1f1f1f;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 16px 0;
  font-size: 24px;
}

.modal-content p {
  margin: 0 0 24px 0;
  opacity: 0.9;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btn-primary {
  border: 0;
  border-radius: 10px;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: #4CAF50;
  color: #fff;
  transition: background 0.2s ease;
}

.modal-btn-primary:hover {
  background: #45a049;
}

.card { border: 1px solid #000000; border-radius: 14px; padding: 14px; }

.clock-label {
  font-family: monospace;
  margin-right: 12px;
  opacity: 0.9;
}

/* old group style (still fine to keep) */
.group {margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #bdbdbd;}
.group:last-child {border-bottom: none;}

.device { border: 1px solid #000000; border-radius: 12px; padding: 10px; margin: 10px 0; }
.status-line {
  flex-basis: 100%;   /* take full width of the .row */
  margin-bottom: 4px; /* optional spacing above buttons */
}

.row { display:flex; gap: 10px; align-items:center; flex-wrap: wrap; }
button { padding: 8px 10px; border-radius: 10px; border: 1px solid #ccc; cursor: pointer; }
pre { background:#f7f7f7; padding: 12px; border-radius: 12px; overflow:auto; height: 320px; }
small { color: #666; }
#conn { font-size: 0.95rem; color:#666; }

/* === NEW: group clusters === */

/* container for group cards */
#devices {  display: grid;  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));  gap: 16px;}

/* group “cluster” card */
.group-card { border: 1px solid #000000;  border-radius: 16px;  padding: 12px 14px;  background: #8d8d8d;}

/* group header row */
.group-header { display: flex;  justify-content: space-between;  align-items: baseline;  margin-bottom: 8px;}

/* Collapsible group header */

.group-header {
  margin-bottom: 0.25rem;
}

.group-header-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;

  width: 100%;
  padding: 0.25rem 0.4rem;

  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.group-header-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.group-chevron {
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

.group-title {
  font-weight: 600;
  flex: 1;
}

.group-count {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Optional: subtle style change when collapsed */
.group-card.group-collapsed {
  opacity: 0.9;
}


.group-header h3 {margin: 0;}

/* devices inside each group */
.group-devices .device { border: 1px solid #f0f0f0; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px;}

.group-devices .device:last-child {margin-bottom: 0;}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-ok {
  background: #dcfce7; /* light green */
  color: #166534;      /* dark green */
}

.status-bad {
  background: #fee2e2; /* light red */
  color: #b91c1c;      /* dark red */
}

.status-warn {
  background: #fef3c7; /* light yellow/orange */
  color: #92400e;      /* dark orange-brown */
}

.status-neutral {
  background: #e5e7eb; /* light gray */
  color: #374151;      /* dark gray */
}


.apc-outlets {
  margin-top: 8px;
  overflow-x: auto;
}

.apc-row-on {
  background-color: #dcfce7;  /* light green */
}

.apc-row-off {
  background-color: #fee2e2;  /* light red */
}
/* APC table layout – keep it narrow and avoid horizontal scroll */
.apc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;        /* avoid crazy column growth */
}

/* Smaller text in APC table */
.apc-table th,
.apc-table td {
  font-size: 0.78rem;
}

/* # column: just wide enough for 2 digits */
.apc-table th:nth-child(1),
.apc-table td:nth-child(1) {
  width: 2.6ch;        /* ~2 digits + a bit of padding */
  text-align: right;
  padding-right: 0.25rem;
}

/* Actions column a bit narrower */
.apc-table th:nth-child(3),
.apc-table td:nth-child(3) {
  width: 3.5rem;
}

/* Actions: keep buttons in a single row, right-aligned */
.apc-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;   /* <-- force them to stay on one line */
  gap: 2px;
}

/* Tiny I/O/R buttons */
.apc-actions button {
  min-width: 1.2rem;
  padding: 0.05rem 0.2rem;
  font-size: 0.65rem;
  line-height: 1.1;
}

.control-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2937;
}

.control-btn.control-on.is-active {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
}

.control-btn.control-off.is-active {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
}

.control-btn.control-reboot {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #7c2d12;
}


.device-name-ok {
  color: #166534;   /* dark green */
}

.device-name-bad {
  color: #b91c1c;   /* dark red (when not pinging) */
}


.dut-details {
  margin-top: 8px;
  overflow-x: auto;        /* allow wide tables to scroll inside the card */
}

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

.dut-table th,
.dut-table td {
  padding: 2px 4px;
  border-bottom: 1px solid #eee;
}

.dut-row-ok {
  background-color: #dcfce7;  /* light green */
}

.dut-row-bad {
  background-color: #fee2e2;  /* light red */
}

.dut-name-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.dut-status-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 6px 0 8px 0;
}

.dut-status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  font-size: 0.85rem;
}

.dut-icon {
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.dut-icon:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
}


.dut-title {
  font-size: 0.75rem;
  color: #555;
}

.dut-value {
  font-weight: 600;
}


header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.raw-toggle {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.raw-toggle input {
  cursor: pointer;
  accent-color: #16a34a; /* green */
}

/* optional: slightly smaller / lighter raw text */
.raw-line {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #555;
}

.numato-outlets {
  margin-top: 8px;
  overflow-x: auto;
}

/* make the Numato table more compact */
.numato-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;      /* smaller text */
  table-layout: fixed;
}

/* First column: just wide enough for numbers */
.numato-table th:first-child,
.numato-table td:first-child {
  width: 2.5rem;         /* or `3ch` if you prefer */
  text-align: right;
  padding-right: 6px;
}

/* Second column (Name) gets the rest */
.numato-table th:nth-child(2),
.numato-table td:nth-child(2) {
  width: auto;
}

/* Optional: keep Actions relatively tight */
.numato-table th:last-child,
.numato-table td:last-child {
  white-space: nowrap;
}

/* row colors */
.numato-row-on {
  background-color: #dcfce7;  /* light green */
}

.numato-row-off {
  background-color: #fee2e2;  /* light red */
}

/* smaller buttons just inside the Numato table */
.numato-table button {
  padding: 2px 6px;        /* smaller than global button rule */
  font-size: 0.7rem;
  line-height: 1.1;
}

.numato-name-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 0.85rem;
}

.toolbar-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.toolbar-button-warning {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
  font-weight: 500;
}

.toolbar-button-warning:hover:not(:disabled) {
  background: #fde68a;
  border-color: #f59e0b;
}

.toolbar-button-warning:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.page-index .header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.page-index .toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-index .toolbar-row-bottom {
  gap: 10px;
}

@media (max-width: 1200px) {
  .page-index .header-right {
    align-items: stretch;
  }

  .page-index .toolbar-row {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .site-topbar-wrap {
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav-links {
    gap: 14px;
  }

  .site-nav-dropdown-menu {
    min-width: 240px;
  }
}

.logs-page {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

.logs-sidebar h2,
.logs-content h2 {
  margin-top: 0;
}

.logs-dir-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.logs-dir-filter {
  border: 1px solid #d1d5db;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.logs-dir-filter:hover {
  background: #ebebeb;
}

.logs-dir-filter.active {
  border-color: #16a34a;
  background: #ecfdf3;
  color: #14532d;
}

.logs-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow-y: auto;
}

.logs-file-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #f8f8f8;
  cursor: pointer;
  text-align: left;
}

.logs-file-item:hover {
  background: #efefef;
}

.logs-file-item.active {
  border-color: #16a34a;
  background: #ecfdf3;
}

.logs-file-path {
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-all;
}

.logs-file-meta {
  font-size: 0.8rem;
  color: #555;
}

.logs-empty {
  color: #555;
  font-size: 0.9rem;
}

.logs-output {
  margin: 0;
  min-height: 70vh;
  max-height: 70vh;
  overflow: auto;
  background: #121212;
  color: #f1f1f1;
  border-radius: 10px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .logs-page {
    grid-template-columns: 1fr;
  }

  .logs-files,
  .logs-output {
    max-height: 50vh;
  }
}

.dut-reservation {
  margin: 2px 0 6px 0;
}

/* base device */
.device {
  --device-hue: 200;  /* default hue, overridden from JS */
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
}

/* clickable device header */
.device-header-row {
  cursor: pointer;
  user-select: none;
}

/* chevron indicator on the right of the header */
.device-header-row::after {
  content: "▾";
  float: right;
  opacity: 0.7;
  font-size: 0.9em;
}

/* collapsed state: change chevron and hide all rows except header */
.device.device-collapsed .device-header-row::after {
  content: "▶";
}

/* hide everything except the first header row when collapsed */
.device.device-collapsed > :not(.device-header-row) {
  display: none;
}


/* use hue as a soft card accent */
.device-colored {
  background-color: hsl(var(--device-hue), 70%, 80%);
  border-color: hsl(var(--device-hue), 70%, 75%);
}

.kind-current_sensor.device-colored {
  background-color: hsl(var(--device-hue), 65%, 82%);
  border-color: hsl(var(--device-hue), 65%, 74%);
}


/* make the name use the accent color */
/* .device-colored .row:first-child strong {
  color: hsl(var(--device-hue), 60%, 30%);
} */

/* keep your existing status/row/apc/dut colors as-is */

/* ==== Cisco switch table ==== */

/* Switch table layout */
.switch-ports {
  margin-top: 8px;
  overflow-x: auto;
}

.switch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.switch-table th,
.switch-table td {
  padding: 2px 6px;
}

/* narrow index column + border between index and name */
.switch-index-cell {
  width: 2.2rem;
  text-align: right;
  border-right: 1px solid #ddd;
}

.switch-name-cell {
  padding-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row colors based on effective_state */
.switch-row-up {
  background-color: #dcfce7;   /* greenish */
}

.switch-row-down {
  background-color: #fee2e2;   /* reddish */
}

.switch-row-shutdown {
  background-color: #bbbbbb;   /* gray */
}

.apc-name-cell {
  cursor: pointer;
}

.apc-name-cell:hover {
  text-decoration: underline;
}

/* SNMP Section */

.snmp-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.snmp-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

/* SNMP walk table styling */
.snmp-table {
  width: 100%;
  border-collapse: collapse;        /* makes gridlines continuous */
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* header + body cells share same border so we get a full grid */
.snmp-table th,
.snmp-table td {
  border: 1px solid #c0c0c0;       /* gridline color */
  padding: 4px 6px;
  text-align: left;
}

/* optional: slightly different header background */
.snmp-table thead th {
  background-color: #f2f2f2;
  font-weight: 600;
}

/* optional: zebra rows */
.snmp-table tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

.snmp-status {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.snmp-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.snmp-filter label {
  font-size: 0.9rem;
  color: #333;
}

.snmp-filter input {
  flex: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

/* Drop page styles */
.drop-top-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.drop-top-grid .drop-section {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .drop-top-grid {
    grid-template-columns: 1fr;
  }
}

.drop-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: #f9f9f9;
}

.drop-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #333;
}

.drop-form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.drop-form label {
  font-weight: 500;
  color: #333;
}

.drop-form select {
  flex: 1;
  max-width: 400px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  background-color: #fff;
  cursor: pointer;
}

.drop-form select:hover {
  border-color: #999;
}

.drop-form select:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 4px rgba(0, 102, 204, 0.5);
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.jobs-empty {
  margin: 0;
  color: #666;
  font-size: 0.95em;
}

.job-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.job-title {
  font-weight: 600;
  color: #333;
}

.job-meta {
  color: #666;
  font-size: 0.9em;
}

.job-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
}

.job-status.running {
  background: #fef9c3;
  color: #a16207;
}

.job-status.complete {
  background: #dcfce7;
  color: #166534;
}

.job-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

.job-progress {
  height: 10px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}

.job-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  width: 0%;
  transition: width 0.2s ease;
}

.job-log {
  font-size: 0.9em;
  color: #444;
}

.job-load-map {
  display: grid;
  gap: 8px;
}

.job-load-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.job-load-block {
  flex: 1;
  min-width: 140px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-load-index {
  font-size: 0.75em;
  color: #4b5563;
  font-weight: 600;
}

.job-load-label {
  font-size: 0.86em;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.2;
}

.job-load-block.state-staging {
  background: #ffffff;
}

.job-load-block.state-in-progress {
  background: #fef08a;
}

.job-load-block.state-rebooting {
  background: #bfdbfe;
}

.job-load-block.state-validating {
  background: #d1d5db;
}

.job-load-block.state-done {
  background: #86efac;
}

.job-load-block.state-error {
  background: #fecaca;
}

.job-load-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8em;
  color: #4b5563;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #9ca3af;
  border-radius: 3px;
  display: inline-block;
}

.legend-swatch.state-staging {
  background: #ffffff;
}

.legend-swatch.state-in-progress {
  background: #fef08a;
}

.legend-swatch.state-rebooting {
  background: #bfdbfe;
}

.legend-swatch.state-validating {
  background: #d1d5db;
}

.legend-swatch.state-done {
  background: #86efac;
}

.legend-swatch.state-error {
  background: #fecaca;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-cancel-btn {
  padding: 4px 10px;
  font-size: 0.8em;
  border: 1px solid #dc2626;
  background: transparent;
  color: #dc2626;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.job-cancel-btn:hover {
  background: #dc2626;
  color: white;
}

.job-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.deploy-cancel {
  padding: 10px 18px;
  font-size: 1em;
  border: 1px solid #dc2626;
  background: transparent;
  color: #dc2626;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.deploy-cancel:hover:not(:disabled) {
  background: #dc2626;
  color: white;
}

.deploy-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Inline reservation display */
.reservation-display {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reservation-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reservation-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 32pt;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: 1px solid;
  transition: transform 0.2s, box-shadow 0.2s;
  pointer-events: auto;
}

a.reservation-badge {
  color: inherit;
  text-decoration: none;
}

a.reservation-badge:visit {
  color: inherit;
}

.reservation-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.reservation-badge.status-free {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.reservation-badge.status-reserved {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.reservation-reason {
  font-size: 32pt;
  font-weight: bold;
  color: #555;
  font-style: italic;
  padding: 0.25rem 0.5rem;
  background-color: #f0f0f0;
  border-radius: 4px;
  border-left: 3px solid #ccc;
}
.info-section {
  margin-top: 1rem;
}

.info-section h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.info-section pre {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* DUT card wrapper for side-by-side layout */
.dut-card-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100%;
}

.dut-device-card {
  flex: 1;
  min-width: 0;
}

.software-dict-section {
  flex: 1;
  min-width: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background-color: #f9f9f9;
}

.software-dict-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #333;
}

.software-dict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.software-dict-table thead {
  background-color: #e8f4f8;
}

.software-dict-table th {
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
  color: #333;
}

.software-dict-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.software-dict-table tbody tr:nth-child(odd) {
  background-color: #f5fafb;
}

.software-dict-table tbody tr:nth-child(even) {
  background-color: #fff;
}

.software-name-cell {
  font-weight: 500;
  color: #333;
}

.software-version-cell,
.software-update-cell {
  color: #555;
  font-family: monospace;
  font-size: 0.85rem;
}

/* Selected drop info */
.selected-drop-info {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #e8f5e9;
  border-left: 4px solid #4caf50;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #2e7d32;
}

.selected-drop-info p {
  margin: 0;
}

/* Raw data display */
.raw-data-section {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.raw-data-section h4 {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: #333;
}

.raw-data-section pre {
  margin: 0;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333;
}

/* Software Versions Table - Desired Version Column Integration */
.software-dict-table {
  width: 100%;
  border-collapse: collapse;
}

.software-dict-table thead {
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.software-dict-table th {
  padding: 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
}

.software-dict-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.software-dict-table tbody tr:hover {
  background-color: #fafafa;
}

/* Row coloring based on update status */
.desired-version-update {
  background-color: #f8d7da !important;
}

.desired-version-update:hover {
  background-color: #f1b0b7 !important;
}

.desired-version-nochange {
  background-color: #f5f5f5;
}

.software-dict-table td {
  padding: 12px 10px;
  font-size: 0.9em;
  color: #333;
}

.software-name-cell {
  font-weight: 500;
  min-width: 200px;
}

.software-version-cell,
.software-update-cell {
  font-family: "Courier New", Courier, monospace;
  color: #666;
  word-break: break-all;
  min-width: 200px;
}

.desired-version-header {
  background: #e8f5e9 !important;
  font-weight: 600;
  min-width: 200px;
}

.desired-version-cell {
  font-family: "Courier New", Courier, monospace;
  min-width: 200px;
}

.load-version-header {
  background: #eef5ff !important;
  font-weight: 600;
  text-align: center;
}

.load-version-cell {
  text-align: center;
}

.load-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.load-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.load-checkbox-label input[type="checkbox"][disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.desired-version-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.desired-version-value {
  color: #333;
  word-break: break-all;
  font-weight: 500;
}

.update-badge {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  animation: pulse-badge 1.5s ease-in-out infinite;
}

.no-update-badge {
  color: #999;
  font-size: 0.85em;
}

@keyframes pulse-badge {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.deployment-controls {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.deploy-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.deploy-meta-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.deploy-meta-select {
  min-width: 90px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.9em;
}

.deploy-meta-select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.deployment-action {
  display: flex;
  gap: 12px;
  align-items: center;
}

.deploy-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1em;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  background-color: #4CAF50;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.deploy-primary:hover:not(:disabled) {
  background-color: #45a049;
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.deploy-primary:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

.deploy-cancel {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  background-color: #f44336;
  color: #fff;
  cursor: pointer;
}

.deploy-cancel:hover {
  background-color: #da190b;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.deployment-messages {
  margin-top: 10px;
  color: #b91c1c;
  font-size: 0.9em;
}

@media (max-width: 640px) {
  .deploy-meta-row {
    flex-wrap: wrap;
  }
}

.optional-packages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.optional-package-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.optional-package-item:hover {
  background: #f3f4f6;
}

.optional-package-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.optional-package-name {
  flex: 1;
  font-family: monospace;
  font-size: 0.9em;
  color: #374151;
}

.packages-selection {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  max-height: 200px;
  overflow-y: auto;
}

.package-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin: 0;
}

.package-checkbox:hover {
  opacity: 0.8;
}

#progressLog {
  background: #1e1e1e;
  color: #b7bcc2;
  padding: 12px;
  border-radius: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  line-height: 1.5;
  overflow-y: auto;
  height: 240px;
  border: 1px solid #404040;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#overallProgress {
  background: #e0e0e0;
  border-radius: 4px;
  height: 24px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#progressBar {
  background: linear-gradient(90deg, #4CAF50, #45a049);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

#deployBtn, #cancelDeployBtn {
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  margin-right: 8px;
}

#deployBtn {
  background-color: #4CAF50;
  color: white;
}

#deployBtn:hover:not(:disabled) {
  background-color: #45a049;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#deployBtn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
}

#cancelDeployBtn {
  background-color: #f44336;
  color: white;
}

#cancelDeployBtn:hover {
  background-color: #da190b;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

