/* STANDALONE CLASSIC CINEMATIC UNRAID DASHBOARD STYLING */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&display=swap');

:root {
  --bg-color: #03010a;
  --card-bg: rgba(11, 7, 24, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-active: rgba(56, 189, 248, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #38bdf8;
  --accent-purple: #c084fc;
  --accent-orange: #fb923c;
  --accent-green: #34d399;
  --accent-pink: #f472b6;
  --accent-red: #f87171;
  --accent-yellow: #facc15;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: #03010a;
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 60px;
  overflow-x: hidden;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4%;
  background: rgba(3, 1, 10, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
  will-change: transform, backdrop-filter;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

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

.brand-title {
  font-size: 1.4em;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.4);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px var(--accent-green); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.status-text {
  font-size: 0.78em;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 0.5px;
}

/* CONTAINER */
.container {
  max-width: 2560px;
  width: 98%;
  margin: 20px auto;
  padding: 0 8px;
}

/* SECTIONS CONTAINER */
.sections-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.dashboard-section {
  background: var(--card-bg);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
  will-change: transform, backdrop-filter;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.dashboard-section.collapsed {
  padding-bottom: 12px;
}

.dashboard-section .ai-cards-grid,
.dashboard-section .system-matrix-grid,
.dashboard-section .category-pills,
.dashboard-section .discovery-grid,
.dashboard-section .category-columns-view,
.dashboard-section .bookmarks-grid {
  max-height: 10000px;
  opacity: 1;
  overflow: visible;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.4s ease, padding 0.4s ease;
}

.dashboard-section .led-matrix-wrapper-outer {
  max-height: 10000px;
  opacity: 1;
  overflow: visible;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.4s ease, padding 0.4s ease;
}

.dashboard-section.collapsed .ai-cards-grid,
.dashboard-section.collapsed .system-matrix-grid,
.dashboard-section.collapsed .category-pills,
.dashboard-section.collapsed .discovery-grid,
.dashboard-section.collapsed .category-columns-view,
.dashboard-section.collapsed .bookmarks-grid,
.dashboard-section.collapsed .led-matrix-wrapper-outer {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.dashboard-section.collapsed .discovery-controls {
  display: none !important;
}

/* Button arrows styling on hover */
.btn-arrow:hover {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.3) !important;
  color: var(--text-primary) !important;
}

/* Edit Layout Mode styling indicator */
body.edit-layout-active .webui-card,
body.edit-layout-active .matrix-card-ring,
body.edit-layout-active .matrix-card,
body.edit-layout-active .bookmark-link {
  border: 1px dashed rgba(56, 189, 248, 0.45) !important;
  cursor: grab !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.08) !important;
}

body.edit-layout-active .webui-card:hover,
body.edit-layout-active .matrix-card-ring:hover,
body.edit-layout-active .matrix-card:hover,
body.edit-layout-active .bookmark-link:hover {
  border-color: var(--accent-blue) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

body.edit-layout-active .webui-card:active,
body.edit-layout-active .matrix-card-ring:active,
body.edit-layout-active .matrix-card:active,
body.edit-layout-active .bookmark-link:active {
  cursor: grabbing !important;
}

.dashboard-section .section-header .section-collapse-btn i {
  transition: transform 0.3s ease;
}

.dashboard-section.collapsed .section-header .section-collapse-btn i {
  transform: rotate(-180deg);
}

.section-header:hover .section-collapse-btn i {
  color: var(--text-primary);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25em;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

/* AI GRID */
.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .ai-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 750px) {
  .ai-cards-grid {
    grid-template-columns: 1fr;
  }
}

.matrix-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px;
  transition: var(--transition-smooth);
}

.matrix-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-4px);
}

.card-header-inner {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.card-title-inner {
  font-weight: 800;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72em;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}

.status-pill.active-status {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
}

.status-pill.live-status {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
}

.card-body-inner {
  font-size: 0.86em;
  color: var(--text-secondary);
  line-height: 1.6;
}

.log-row, .activity-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.log-row:last-child, .activity-row:last-child {
  border-bottom: none;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-highlight {
  font-weight: 700;
  font-size: 0.9em;
}

.orange-glow { color: var(--accent-orange); }
.green-glow { color: var(--accent-green); }
.muted-glow { color: var(--text-muted); }

.log-stream-content {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  color: var(--accent-green);
  background: none;
  border: none;
  padding: 4px 0;
  border-radius: 10px;
  height: 90px;
  overflow-y: hidden;
  line-height: 1.5;
}

/* SYSTEM RINGS GRID & MATRIX */
.system-matrix-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 1250px) {
  .system-matrix-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .system-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .system-matrix-grid {
    grid-template-columns: 1fr;
  }
}

.matrix-card-ring {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  transition: var(--transition-smooth);
}

.matrix-card-ring:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-4px);
}

.ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible !important;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.02);
  stroke-width: 9;
}

.ring-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
  filter: drop-shadow(0 0 8px currentColor);
}

.ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.35em;
  font-weight: 800;
}

.ring-title {
  font-weight: 800;
  font-size: 0.95em;
  color: #ffffff;
}

.ring-subtitle {
  font-size: 0.8em;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* SERVER MATRIX LED DISPLAY WIDGET */
.server-led-matrix-wrapper {
  background: rgba(5, 2, 15, 0.45);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px;
  margin-top: 15px;
}

.led-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.led-grid-legend {
  display: flex;
  gap: 10px;
  font-size: 0.75em;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.led-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 16px);
  gap: 3px;
}

/* Pulsating "Lebensbit" LED styling - Direct squircle indicator bulbs */
.led-indicator {
  width: 16px;
  height: 16px;
  border-radius: 35%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.led-indicator.running-docker {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: led-pulse-active 1.4s infinite ease-in-out;
}

.led-indicator.stopped-docker {
  background: var(--accent-red);
  box-shadow: 0 0 4px rgba(248, 113, 113, 0.2);
}

.led-indicator.running-vm {
  background: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow);
  animation: led-pulse-active 1.4s infinite ease-in-out;
}

.led-indicator.stopped-vm {
  background: var(--accent-blue);
  box-shadow: 0 0 4px rgba(56, 189, 248, 0.2);
}

/* Dynamic activity-based stagger delays directly on element */
.led-indicator:nth-child(2n) { animation-delay: 0.2s; }
.led-indicator:nth-child(3n) { animation-delay: 0.4s; }
.led-indicator:nth-child(5n) { animation-delay: 0.6s; }
.led-indicator:nth-child(7n) { animation-delay: 0.8s; }

/* DISCOVERY CONTROLS & GLASS SELECTS */
.discovery-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8em;
  color: var(--text-secondary);
}

.glass-select {
  background: rgba(11, 7, 24, 0.45);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 8px;
  outline: none;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.glass-select:hover, .glass-select:focus {
  border-color: var(--card-border-active);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

.glass-select option {
  background: #0b0718;
  color: var(--text-primary);
}

@keyframes led-pulse-active {
  0% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; filter: brightness(1.2); }
  100% { transform: scale(0.85); opacity: 0.8; }
}

/* Glow-Style override animations - Fading brightness and opacity instead of scaling */
.led-matrix-grid.style-glow .led-indicator.running-docker {
  animation: led-pulse-glow-docker 1.6s infinite ease-in-out;
}

.led-matrix-grid.style-glow .led-indicator.running-vm {
  animation: led-pulse-glow-vm 1.6s infinite ease-in-out;
}

@keyframes led-pulse-glow-docker {
  0% { transform: scale(1.0); opacity: 0.45; filter: brightness(0.6); box-shadow: 0 0 3px var(--accent-green); }
  50% { transform: scale(1.0); opacity: 1; filter: brightness(1.3); box-shadow: 0 0 12px var(--accent-green); }
  100% { transform: scale(1.0); opacity: 0.45; filter: brightness(0.6); box-shadow: 0 0 3px var(--accent-green); }
}

@keyframes led-pulse-glow-vm {
  0% { transform: scale(1.0); opacity: 0.45; filter: brightness(0.6); box-shadow: 0 0 3px var(--accent-yellow); }
  50% { transform: scale(1.0); opacity: 1; filter: brightness(1.3); box-shadow: 0 0 12px var(--accent-yellow); }
  100% { transform: scale(1.0); opacity: 0.45; filter: brightness(0.6); box-shadow: 0 0 3px var(--accent-yellow); }
}

.led-tooltip {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 5, 20, 0.95);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  color: #ffffff;
  white-space: nowrap;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.led-indicator:hover .led-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* DISCOVERY FILTER & CATEGORIES WRAPPER */
.discovery-filter-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
}

.discovery-filter-wrapper.hidden {
  display: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* CATEGORIES */
.category-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

/* DISCOVERY GRID & CATEGORY COLUMNS VIEW */
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.category-columns-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--category-col-min-width, 290px), 1fr));
  gap: var(--category-col-gap, 18px);
  align-items: start;
  width: 100%;
}

.category-column {
  background: rgba(11, 16, 38, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: var(--category-col-padding, 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
}

.category-column:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.category-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2px;
  gap: 8px;
}

.category-column-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.category-column-title {
  font-size: var(--category-header-title-size, 0.92em);
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-transform: uppercase;
}

.category-column-title i {
  color: var(--accent-blue);
  font-size: 1.05em;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.category-column-count {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.75em;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.category-column-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-column-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  transition: all 0.2s;
}

.category-column-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.category-column-btn.btn-delete:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #f43f5e;
}

.category-column-cards {
  display: flex;
  flex-direction: column;
  gap: var(--webui-cards-gap, 10px);
  min-height: 48px;
  border-radius: 10px;
  transition: background-color 0.2s, outline 0.2s;
  padding: 2px;
}

.category-column-cards.drag-over {
  background: rgba(56, 189, 248, 0.08);
  outline: 2px dashed var(--accent-blue);
  border-radius: 10px;
}

.category-column-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.85em;
  font-style: italic;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.webui-card {
  background: rgba(9, 14, 36, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: var(--webui-card-padding, 10px 14px);
  display: flex;
  align-items: center;
  gap: var(--webui-card-gap, 12px);
  transition: var(--transition-smooth);
  position: relative;
  text-decoration: none;
}

.webui-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
  transform: translateY(-3px);
}

.webui-card.no-link {
  cursor: default;
}

.webui-card.no-link:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.1);
  transform: translateY(-1px);
}

.webui-icon-box {
  width: var(--webui-icon-box-size, 36px);
  height: var(--webui-icon-box-size, 36px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--webui-icon-size, 1.1em);
  color: var(--accent-blue);
  flex-shrink: 0;
}

.webui-details {
  flex: 1;
  min-width: 0;
}

.webui-title {
  font-weight: 700;
  font-size: var(--link-font-size, 1.05em);
  color: #fff;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.2s ease;
}

.webui-title.has-link {
  color: var(--accent-blue) !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.webui-desc {
  display: none;
}

/* Glowing icon box status borders */
.webui-icon-box.status-running {
  border: 1px solid rgba(74, 222, 128, 0.85) !important;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.45) !important;
}

.webui-icon-box.status-stopped {
  border: 1px solid rgba(248, 113, 113, 0.4) !important;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.15) !important;
}

/* BOOKMARKS GRID */
.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.bookmark-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
  position: relative;
}

.bookmark-link:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.btn-add-bm {
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #f3e8ff;
  padding: 6px 14px;
  font-size: 0.82em;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-add-bm:hover {
  background: rgba(192, 132, 252, 0.25);
  transform: translateY(-2px);
}

/* MODAL / DIALOG */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 1, 8, 0.88);
  backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #060410;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 40px rgba(192, 132, 252, 0.15);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent-purple);
}

.btn {
  padding: 10px 20px;
  font-size: 0.85em;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* CATEGORY FOLDERS & COLLAPSIBLE STYLING */
.category-folder {
  background: rgba(11, 7, 24, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  margin-bottom: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

.category-folder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
}

.category-folder-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.folder-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05em;
  color: var(--text-primary);
}

.folder-title i {
  color: var(--accent-orange);
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.folder-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--text-secondary);
}

.folder-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1em;
  transition: transform 0.3s ease;
}

.category-folder.collapsed .folder-toggle-btn {
  transform: rotate(-90deg);
}

.category-folder-content {
  padding: 20px;
  transition: max-height 0.4s cubic-bezier(0, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  max-height: 10000px;
  opacity: 1;
}

.category-folder.collapsed .category-folder-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
}

/* DRAGGABLE CARDS & DROP OVERLAYS */
.webui-card[draggable="true"] {
  cursor: grab;
}

.webui-card[draggable="true"]:active {
  cursor: grabbing;
}

.webui-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent-blue);
  background: rgba(56, 189, 248, 0.05);
}

.webui-card.drag-target-hover {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25) !important;
  transform: scale(1.03) translateY(-2px);
  background: rgba(56, 189, 248, 0.05) !important;
}

#logStreamContent::-webkit-scrollbar {
  display: none;
}

.discovery-grid.drag-over {
  background: rgba(56, 189, 248, 0.03);
  border-radius: 18px;
  box-shadow: inset 0 0 15px rgba(56, 189, 248, 0.08);
}

/* CARD EDIT BUTTON */
.card-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 10;
}

.webui-card:hover .card-edit-btn {
  opacity: 1;
}

.card-edit-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* RESPONSIVE COLUMN GRID FOR SIDE-BY-SIDE CATEGORIES */
.folders-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 24px;
  align-items: start;
}

@media (max-width: 992px) {
  .folders-container {
    grid-template-columns: 1fr;
  }
}

/* DRAGGABLE METRICS RING WIDGETS */
.matrix-card-ring[draggable="true"] {
  cursor: grab;
  transition: var(--transition-smooth);
}

.matrix-card-ring[draggable="true"]:active {
  cursor: grabbing;
}

.matrix-card-ring.dragging-widget {
  opacity: 0.3;
  border: 1px dashed var(--accent-blue);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* BOOKMARK HOVER EDIT BUTTONS */
.bookmark-link {
  position: relative;
  padding-right: 40px !important;
}

.bookmark-edit-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
}

.bookmark-link:hover .bookmark-edit-btn {
  opacity: 1;
}

.bookmark-edit-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* =========================================================
   HEADER WIDGETS INTEGRATION STYLES (NEW PORTED)
   ========================================================= */

.navbar-widgets-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-grow: 1;
  margin: 0 20px;
  overflow: visible;
}

/* Glassmorphic Cards hanging down from Navbar */
.header-widget-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  top: 14px; /* Hangs down out of the navbar slightly less */
  margin-bottom: -14px;
  transition: var(--transition-smooth);
  cursor: pointer;
  z-index: 10;
  white-space: nowrap;
}

.header-widget-card:hover {
  transform: translateY(3px); /* Move down slightly when hovered, accentuating physical layering */
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.header-widget-title {
  font-size: 0.7em;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-widget-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72em;
}

.hw-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hw-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.hw-val {
  color: var(--text-primary);
  font-weight: 700;
}

/* Weather Day Card / 7-Day Forecast Modal styling */
.weather-forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .weather-forecast-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .weather-forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.weather-day-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.weather-day-card.today {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.1);
}

.weather-day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.weather-day-title {
  font-weight: 800;
  font-size: 0.85em;
  color: var(--text-primary);
}

.weather-day-date {
  font-weight: 500;
  font-size: 0.75em;
  color: var(--text-muted);
}

.weather-day-icon {
  font-size: 1.6em;
  margin: 4px 0;
}

.weather-day-desc {
  font-size: 0.72em;
  color: var(--text-secondary);
  font-weight: 600;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.weather-day-temps {
  display: flex;
  gap: 6px;
  font-size: 0.78em;
  font-weight: 700;
}

.temp-max {
  color: var(--accent-orange);
}

.temp-min {
  color: var(--accent-blue);
}

.weather-day-rain {
  font-size: 0.7em;
  color: #818cf8;
  font-weight: 700;
}

/* Service Matrix Widget inside Navbar Card */
.service-matrix-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 0;
}

.service-matrix-mini-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

@keyframes mini-led-pulse-green {
  0%, 100% {
    box-shadow: 0 0 2px #34d399, 0 0 4px rgba(52, 211, 153, 0.4);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 5px #34d399, 0 0 9px rgba(52, 211, 153, 0.9);
    opacity: 1;
  }
}

@keyframes mini-led-pulse-red {
  0%, 100% {
    box-shadow: 0 0 2px #ef4444, 0 0 4px rgba(239, 68, 68, 0.4);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 6px #ef4444, 0 0 10px rgba(239, 68, 68, 0.9);
    opacity: 1;
  }
}

.service-matrix-mini-dot.online {
  background: #34d399;
  animation: mini-led-pulse-green 2.2s infinite ease-in-out;
}

.service-matrix-mini-dot.offline {
  background: #ef4444;
  animation: mini-led-pulse-red 1.5s infinite ease-in-out;
}

.service-matrix-mini-dot:nth-child(2n) { animation-delay: 0.35s; }
.service-matrix-mini-dot:nth-child(3n) { animation-delay: 0.7s; }
.service-matrix-mini-dot:nth-child(5n) { animation-delay: 1.05s; }

/* Custom settings alignment */
.settings-checkbox-group label {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

/* Hover Tooltip inside Header Cards */
.header-widget-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(11, 7, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  width: 260px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  margin-top: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Arrow for tooltip pointing upwards */
.header-widget-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(255, 255, 255, 0.15) transparent;
}

.header-widget-card:hover .header-widget-tooltip {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pulsing text effect for pending game updates */
.update-pulse {
  animation: text-pulse-amber 1.8s infinite ease-in-out;
}

@keyframes text-pulse-amber {
  0%, 100% {
    opacity: 0.8;
    text-shadow: 0 0 4px rgba(249, 115, 22, 0.3);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.8);
  }
}

/* Wizard rows and candidates */
.wizard-row {
  transition: var(--transition-smooth);
}
.wizard-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.wizard-candidate-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.wizard-candidate-btn:hover {
  border-color: var(--accent-purple) !important;
  transform: scale(1.1);
  background: rgba(192, 132, 252, 0.08) !important;
}


/* ==========================================================================
   ADMIN CONTROL PANEL & MODAL STYLING
   ========================================================================== */

.custom-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: radial-gradient(circle at 50% 0%, rgba(25, 12, 50, 0.35), rgba(3, 1, 10, 0.85)), url('/bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: opacity 0.4s ease, filter 0.4s ease;
  pointer-events: none;
}

.btn-admin-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(127, 0, 255, 0.15);
  border: 1px solid rgba(127, 0, 255, 0.35);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(127, 0, 255, 0.2);
}

.btn-admin-trigger:hover {
  background: rgba(127, 0, 255, 0.3);
  border-color: rgba(127, 0, 255, 0.6);
  box-shadow: 0 0 18px rgba(127, 0, 255, 0.4);
  transform: translateY(-1px);
}

.modal-card-small {
  max-width: 420px;
}

.modal-card-large {
  max-width: 1150px;
  width: 94vw;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.admin-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
}

.admin-tab-content,
.admin-panel-tab {
  display: none !important;
}

.admin-tab-content.active,
.admin-panel-tab.active {
  display: block !important;
}

.admin-section-box {
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}

.admin-section-box h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.05em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-desc {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.sections-config-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-config-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.section-config-inputs {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 10px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Color input styling */
.color-picker-input {
  width: 100%;
  height: 38px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

/* File Upload Dropzone */
.file-upload-dropzone {
  position: relative;
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(56, 189, 248, 0.03);
  transition: all 0.3s ease;
}

.file-upload-dropzone:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.file-upload-dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.upload-icon {
  font-size: 2em;
  color: #38bdf8;
}

.bg-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-status-msg {
  font-size: 0.85em;
  margin-top: 8px;
  font-weight: 600;
}

.form-status-msg.success { color: var(--accent-green); }
.form-status-msg.error { color: var(--accent-red); }
.form-error-msg {
  font-size: 0.85em;
  color: var(--accent-red);
  margin-top: 6px;
}


/* Modal Overlay Active Fix */
.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  background: #0b0718;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 0 40px rgba(192, 132, 252, 0.2);
  position: relative;
  color: var(--text-primary);
}


/* Ultra Widescreen Admin Modal Layout (No-Scroll 2-Column Grid) */
.modal-card-large {
  max-width: 1480px;
  width: 96vw;
  max-height: 90vh;
  height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-card-large .admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.modal-card-large .admin-tabs {
  padding: 14px 32px;
  gap: 14px;
}

.modal-card-large .admin-tab-btn {
  padding: 10px 24px;
  font-size: 0.95em;
}

.modal-card-large .admin-section-box {
  padding: 24px;
  margin-bottom: 0;
  border-radius: 12px;
  height: 100%;
}

.modal-card-large .admin-section-box h4 {
  font-size: 1.15em;
  margin-bottom: 16px;
}

/* 2-Column Grid for Section Cards in Tab 2 */
.modal-card-large .sections-config-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-card-large .section-config-card {
  padding: 18px;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-card-large .section-config-inputs {
  grid-template-columns: 2fr 1.5fr 0.8fr;
  gap: 14px;
}

/* 2-Column Layout for Background Tab */
.admin-bg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.modal-card-large input[type="text"],
.modal-card-large input[type="password"] {
  padding: 12px 14px;
  font-size: 0.95em;
}


/* 3-Column Widescreen Layout */
.container {
  max-width: 2560px !important;
  width: 98% !important;
  margin: 20px auto !important;
  padding: 0 8px !important;
}

.sections-grid-layout {
  display: grid !important;
  grid-template-columns: 460px 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
}

.grid-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  min-width: 0 !important;
}

.grid-col-left .ai-cards-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

@media (max-width: 1050px) {
  .sections-grid-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Glass Modal Dialogs */
.glass-modal {
  background: rgba(11, 7, 24, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  position: relative;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--accent-red, #f43f5e);
}

.matrix-card-ring .ring-container {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  margin-bottom: 0;
}

.matrix-card-ring .ring-svg {
  width: 64px;
  height: 64px;
  overflow: visible;
}

.matrix-card-ring .ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.82em;
  font-weight: 800;
}

.matrix-card-ring .ring-title {
  font-size: 0.88em;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: var(--text-primary);
}

.matrix-card-ring .ring-subtitle {
  font-size: 0.75em;
  color: var(--text-secondary);
}

/* Select & Option dropdown visibility fix for categories and modals */
select, .form-group select, .glass-select {
  background-color: #120c24 !important;
  color: #ffffff !important;
}

select option, .form-group select option, .glass-select option {
  background-color: #120c24 !important;
  color: #ffffff !important;
  padding: 8px 12px;
}

select option:hover, select option:focus, select option:checked {
  background-color: #2b1c4e !important;
  color: #00f2fe !important;
}

.category-manage-row:hover {
  background: rgba(255,255,255,0.06) !important;
}

/* Background preset cards styles */
.bg-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue, #00f2fe) !important;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}
.bg-preset-card:active {
  transform: translateY(0);
}

/* LIVE LOG STREAM WIDGET STYLES */
.log-stream-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.82em;
  padding: 4px 0;
  background: transparent !important;
  border: none !important;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-timestamp {
  color: var(--text-muted, #71717a);
  font-size: 0.85em;
  white-space: nowrap;
}

.log-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.log-badge-docker { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.log-badge-game, .log-badge-gameserver { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.log-badge-stream { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.log-badge-obs { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.log-badge-printer, .log-badge-3d-druck, .log-badge-tracker { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.log-badge-ai, .log-badge-agent { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4); }
.log-badge-system { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.4); }

.log-level-info { color: var(--text-primary, #ffffff); }
.log-level-success { color: #4ade80; font-weight: 600; }
.log-level-warn { color: #fbbf24; font-weight: 600; }
.log-level-error { color: #f43f5e; font-weight: 700; }
