/* BillBoard Theme — Cyber-Minimalist Dark Terminal CSS */
:root {
  --bg-primary: #0a0d14;
  --bg-surface: #111726;
  --bg-surface-elevated: #192238;
  --bg-input: #080c13;
  
  --border-subtle: #1e293b;
  --border-focus: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;
  --text-bill: #00ffcc;

  --status-ok: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;

  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-glow: 0 0 25px rgba(0, 255, 204, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 23, 38, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bill);
}

.brand-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: rgba(56, 189, 248, 0.15);
  color: var(--text-accent);
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--status-ok);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--status-ok);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--status-ok);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-logout {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-logout:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Status Bar & Alert feed */
.status-bar-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-glow);
}

.status-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.status-bar-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.alert-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--border-subtle);
  animation: fadeIn 0.3s ease-in;
}

.alert-item.info { border-left-color: var(--status-info); }
.alert-item.warning { border-left-color: var(--status-warning); }
.alert-item.error { border-left-color: var(--status-error); }
.alert-item.success { border-left-color: var(--status-ok); }

.alert-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Tile Grid */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.tile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.tile-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 4px 20px var(--border-glow);
}

.tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tile-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tile-icon {
  font-size: 1.4rem;
}

.tile-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tile-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.tile-body {
  margin: 1rem 0;
}

.live-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bill);
  word-break: break-word;
  transition: color 0.3s ease;
}

.live-value.flash-update {
  color: #fff;
  text-shadow: 0 0 10px var(--text-bill);
}

.tile-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Detail Page */
.page-container {
  max-width: 900px;
  margin: 0 auto;
}

.back-nav {
  margin-bottom: 1.5rem;
}

.back-link {
  color: var(--text-accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-glow);
}

.json-viewer {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.85rem;
  color: #38bdf8;
  overflow-x: auto;
  margin-top: 1rem;
}

/* Login Page & ASCII Art */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 0 40px rgba(0, 255, 204, 0.08);
}

.ascii-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-x: auto;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.1;
  color: var(--text-bill);
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
  white-space: pre;
}

/* Security & Encryption Matrix Container (Strak uitgelijnd in terminal-stijl) */
.matrix-box {
  width: 100%;
  max-width: 520px;
  margin-top: 0.75rem;
  background: rgba(10, 15, 25, 0.85);
  border: 1px dashed rgba(0, 255, 204, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(0, 255, 204, 0.2);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}

.matrix-title {
  color: var(--text-bill);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.matrix-badge {
  font-weight: 700;
}

.matrix-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.matrix-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.matrix-label {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.matrix-val {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  min-width: 280px;
  justify-content: flex-start;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Security & MITM Detection Matrix */
.security-matrix {
  background: rgba(10, 15, 25, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.sec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.sec-title {
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.sec-badge {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.sec-badge-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sec-badge-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sec-badge-err {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.6);
  animation: pulse-danger 2s infinite;
}

.sec-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.sec-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sec-num {
  color: var(--text-accent);
  font-weight: bold;
}

.sec-val {
  color: var(--text-primary);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.tag-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.tag-lan {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.tag-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.tag-err {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.tag-pending {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.7rem;
}

.sec-alert {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.75rem;
  line-height: 1.4;
}

.sec-alert-desc {
  color: #fee2e2;
  font-size: 0.7rem;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--border-glow);
}

.btn-submit {
  background: #0284c7;
  background: linear-gradient(135deg, #0284c7 0%, #00ffcc 100%);
  color: #030712;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover {
  opacity: 0.95;
  transform: scale(0.99);
}

.error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--status-error);
  color: #fca5a5;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsiveness voor Telemetrie & Sessie Tabellen */
.sessions-desktop-table {
  display: table;
}

.sessions-mobile-cards {
  display: none;
}

@media (max-width: 768px) {
  .sessions-desktop-table,
  .sessions-table-wrapper {
    display: none !important;
  }
  .sessions-mobile-cards {
    display: flex !important;
    flex-direction: column;
  }
}

/* ==========================================================================
   WOL (Wake-on-LAN) & Hosts Grid & Cards (Mobile-First Cyber Dark)
   ========================================================================== */
.wol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .wol-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.wol-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wol-card-online {
  border-left: 3px solid var(--status-ok);
}

.wol-card-offline {
  border-left: 3px solid var(--status-error);
}

.wol-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.wol-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wol-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.wol-hostname {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wol-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wol-badge-online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.wol-badge-offline {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

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

.wol-dot-online {
  background-color: var(--status-ok);
  box-shadow: 0 0 8px #10b981;
}

.wol-dot-offline {
  background-color: var(--status-error);
}

.wol-card-body {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wol-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  gap: 0.5rem;
}

.wol-data-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wol-data-val {
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.wol-history-banner {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border-subtle);
}

.wol-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wol-action-subgroup {
  display: flex;
  gap: 0.4rem;
}

.btn-wol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-wol:active {
  transform: scale(0.97);
}

.btn-wol-primary {
  background: #0284c7;
  background: linear-gradient(135deg, #0284c7 0%, #00ffcc 100%);
  color: #030712;
  border: none;
  font-weight: 700;
}

.btn-wol-primary:hover {
  opacity: 0.92;
}

.btn-wol-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-wol-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-wol-wake {
  flex: 1;
  background: #1d4ed8;
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

.btn-wol-wake:hover:not(:disabled) {
  background: #2563eb;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.5);
}

.btn-wol-wake.disabled,
.btn-wol-wake:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: transparent;
  box-shadow: none;
  cursor: default;
  opacity: 0.6;
}

.btn-wol-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-wol-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

.btn-wol-icon {
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
}

/* Modal Styling */
.wol-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.wol-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 460px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.2s ease-out;
}

.wol-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wol-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.wol-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.wol-form-group {
  margin-bottom: 1rem;
}

.wol-form-group label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.wol-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.wol-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px var(--border-glow);
}

.wol-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* Toast Alerts */
.wol-toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.3s;
}

.wol-toast-success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--status-ok);
  color: #34d399;
}

.wol-toast-error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--status-error);
  color: #f87171;
}

