:root {
    --bg: #f6f8fb;
    --text: #1a1a1a;
    --accent: #0057AD;
    --accent-light: #41A0FF;
    --card-bg: #fbfbfb;
    --shadow: rgba(0,0,0,0.1);
    --radius: 8px;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
  }
  
  body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-top: 80px;
  }
  
  /* HEADER */
  .topbar {
    width: 100%;
    height: 80px;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
  }
  
  .topbar h1 { color: var(--accent); font-size: 1.8rem; }
  .topbar .profile { display: flex; align-items: center; gap: 0.8rem; }
  .topbar .profile img { width: 40px; height: 40px; border-radius: 50%; }
  
  /* DASHBOARD WRAPPER */
  .dashboard-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1300px;
    
    padding: 2rem;
  }
  
  /* SIDEBAR */
  .sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid #dadada;
    margin-left: 25px;
    padding: 0.6rem 0.6rem;
    width: 285px;
    flex-shrink: 0;
    height: fit-content;
  }
  
  .sidebar nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  
  .sidebar nav ul li a {
    display: flex;
    text-decoration: none;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
  }
  .sidebar nav ul li a:hover { background: var(--accent); color: #fff; }
  .sidebar nav ul li a.active { background: var(--accent); color: #fff; box-shadow: 0 0 10px rgba(0, 87, 173, 0.4); }
  
  /* MAIN CONTENT */
  .main-content { flex: 1; display: flex; flex-direction: column; }
  
  /* CARDS GRID */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }
  
  /* CARD STYLING */
  .card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    position: relative;
  }
  
  .card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-light);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    cursor: pointer;
  }
  
  .card-icon { font-size: 3rem; margin-bottom: 0.5rem; }
  .card h2 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--accent); position: relative; }
  .card h2::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--accent-light);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s ease-in-out;
  }
  .card:hover h2::after { transform: scaleX(1); }
  .card p { font-size: 1rem; color: #555; flex: 1; }
  
  .cardBtn {
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border: 0;
    border-radius: 0.4rem;
    background-color: rgba(65, 160, 255, 0.2);
    color: var(--accent);
    display: inline-block;
    margin-top: 1rem;
    transition: background 0.3s, color 0.1s;
    text-decoration: none;
  }
  .cardBtn:hover { background-color: var(--accent); color: #fff; }
  
  /* FOOTER */
  .dashboard-footer {
    margin-top: 2rem;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
    color: #555;
    flex-wrap: wrap;
  }
  .dashboard-footer .footer-links a {
    margin-left: 1rem;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
  }
  .dashboard-footer .footer-links a:hover { color: var(--accent); }
  
  /* RESPONSIVE */
  @media (max-width: 900px) {
    .dashboard-wrapper { flex-direction: column; margin-top: 120px; }
    .sidebar { width: 100%; flex-direction: row; justify-content: space-around; padding: 1rem 0; }
    .cards-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; height: auto; padding: 1rem 2rem; }
  }
  
  /* FLEX CONTAINER VOOR KNOPPEN */
.node-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* SWITCH STYLING */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 50px;
  transition: 0.4s;
}

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

input:checked + .slider {
  background: #0057AD;
}

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

/* NODE PANEL STYLING */
.node-grid {
  display: flex;
  flex-direction: column;  /* elk panel op een nieuwe rij */
}

.node-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  background: var(--card-bg);
  transition: background 0.2s;
}

.node-panel:hover {
  background: #f0f4fb;
}

.node-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.node-icon {
  font-size: 2rem;
}

.node-icon img {
  margin-top: 10px;
  height: 50px;
}

.node-text h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.node-text p {
  font-size: 0.9rem;
  color: #555;
}

/* FLEX VOOR KNOPPEN */
.node-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* SWITCH + LABEL FIX */
.switch-wrapper {
  position: relative;
  width: 50px;   /* vaste breedte voor slider */
  height: 26px;
  flex-shrink: 0;
}

.switch-wrapper .switch {
  position: absolute;  /* slider altijd links */
  top: 0;
  left: 0;
}

.toggle-label {
  display: inline-block;
  min-width: 80px; /* of iets breder dan "Niet Actief" */
  text-align: left;
  font-weight: 500;
  color: #555;
  margin-right: 50px;

}


/* SWITCH STYLING */
.switch { 
  position: relative; 
  display: inline-block; 
  width: 50px; 
  height: 26px; 
}
.switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
}
.slider { 
  position: absolute; 
  cursor: pointer; 
  top: 0; left: 0; right: 0; bottom: 0; 
  background-color: #ccc; 
  border-radius: 50px; 
  transition: 0.4s; 
}
.slider::before { 
  position: absolute; 
  content: ""; 
  height: 20px; 
  width: 20px; 
  left: 3px; 
  bottom: 3px; 
  background-color: white; 
  border-radius: 50%; 
  transition: 0.4s; 
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(24px); }

/* BUTTONS */
.actionBtn { 
  padding: 0.5rem 0.8rem; 
  font-size: 13px;
  font-weight: 400; 
  border-radius: 4px; 
  cursor: pointer; 
  transition: all 0.2s; 
  color: #fff; 
}
.actionBtn.restart { 
  background: var(--accent); 
  border: 1px solid var(--accent); 
}
.actionBtn.restart:hover { 
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.actionBtn.nodetop { 
  background: var(--accent); 
  border: 1px solid var(--accent);
  text-decoration: none;
}
.actionBtn.nodetop:hover { 
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.nginx-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: var(--card-bg);
  transition: background 0.2s;
}
.nginx-panel:hover { background: #f0f4fb; }

.nginx-actions { display: flex; gap: 1rem; }

.modal {
  display: none;
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.5);
  justify-content: center; align-items: center;
}
.modal-content {
  background: #fff; padding: 1.5rem; border-radius: 8px; width: 500px;
}
textarea { width: 100%; height: 300px; font-family: monospace; margin-top: 0.5rem; }
.modal-actions { margin-top: 1rem; display:flex; justify-content:flex-end; gap: 0.5rem; }

.return a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
  transition: all 0.3s ease;
}

.return:hover a {
  color: var(--accent-light);
}

.node-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #efefef;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  color: #444;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.node-top-left {
  font-size: 1.25rem;
  color: var(--accent);
}

.node-top-left-p {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 400;
  display: flex;
  flex-direction: column;
}

.node-top-right {
  display: flex;
  gap: 3.5rem; /* spacing matched met jouw switch + button afstand */
  font-size: 0.95rem;
  color: #777;
}

/* ========================== */
/* SSH PANEL - volledig autonoom */
/* ========================== */

.ssh-panel {
  padding: 1rem 1.5rem;
  background: #fbfbfb;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ssh-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ssh-item label {
  font-weight: 600;
  color: #1a1a1a;
  min-width: 120px;
}

.ssh-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ssh-value code,
.ssh-value input {
  background: #f6f8fb;
  border: 1px solid #dadada;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.ssh-value input {
  width: 220px;
}

.ssh-copy-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid #0057AD;
  background: #0057AD;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.ssh-copy-btn:hover {
  opacity: 0.85;
  background: #0057AD;
  border-color: #0057AD;
}


.ssh-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #efefef;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  color: #444;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  font-size: 1rem;
  color: var(--accent);
}