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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.connection-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #334155;
  color: #94a3b8;
}

.connection-badge.live {
  background: #14532d;
  color: #86efac;
}

.connection-badge.offline {
  background: #450a0a;
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

/* Login */
.login-section {
  text-align: center;
  padding: 4rem 2rem;
}

.login-section p {
  margin-bottom: 1.5rem;
  color: #94a3b8;
}

.btn-login {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #1d4ed8;
}

.koppeling-info {
  margin-top: 1.5rem;
  background: #1e293b;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: left;
}

.koppeling-info p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.koppeling-info small {
  color: #64748b;
}

.koppeling-info code {
  background: #0f1117;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-family: monospace;
  color: #94a3b8;
}

.koppeling-info input {
  width: 100%;
  background: #0f1117;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  margin: 0.5rem 0 0.75rem;
}

.btn-open {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}

.btn-open:hover {
  text-decoration: underline;
}

.koppeling-status {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Status card */
.status-card {
  background: #1e293b;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 2px solid #334155;
  transition: border-color 0.3s;
}

.status-card.actief {
  border-color: #2563eb;
}

.status-card.klaar {
  border-color: #16a34a;
}

.status-card.fout {
  border-color: #dc2626;
}

.status-card.actievereist {
  border-color: #d97706;
}

.status-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.status-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid #334155;
  border-radius: 0.5rem;
  background: transparent;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  border-color: #2563eb;
  color: #f1f5f9;
  background: #1e3a8a22;
}

.tab-btn:hover:not(.active) {
  border-color: #475569;
  color: #e2e8f0;
}

/* Bedieningsknoppen */
.controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-control {
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-control:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-start   { background: #16a34a; color: #fff; }
.btn-start:hover:not(:disabled)   { background: #15803d; }
.btn-stop    { background: #dc2626; color: #fff; }
.btn-stop:hover:not(:disabled)    { background: #b91c1c; }
.btn-standby { background: #334155; color: #e2e8f0; }
.btn-standby:hover:not(:disabled) { background: #475569; }

.control-status {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-left: 0.5rem;
}

/* Grid met info kaarten */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.info-card {
  background: #1e293b;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.info-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.progress-bar {
  margin-top: 0.5rem;
  height: 6px;
  background: #334155;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
