/* ----------------------------------------------------
   Surfies UI – Modern Flat
   File: assets/css/modern.css
   Sections:
   1. CSS Reset & Tokens
   2. Base Elements (typography, links)
   3. Layout (container, header/footer shell)
   4. Navigation (topbar, user menu)
   5. Forms (inputs, selects, checkboxes)
   6. Buttons
   7. Components (cards, alerts, modals, stats)
   8. Pages (landing, devices, settings)
   9. Utilities
  10. Responsive (sm/md/lg)
  11. Dark Mode (prefers-color-scheme)
-----------------------------------------------------*/

/* 1) RESET & TOKENS -------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  /* Palette */
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-elev: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;

  --accent: #2563eb;       /* primair */
  --accent-600: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #2563eb;

  /* Radii & Shadow */
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(17,24,39,.04);
  --shadow-2: 0 2px 8px rgba(17,24,39,.06);

  /* Spacing & Container */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --container: 1200px;

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --fz-xs: .75rem;
  --fz-sm: .875rem;
  --fz: 1rem;
  --fz-lg: 1.125rem;
  --fz-xl: 1.375rem;
  --fz-2xl: 1.75rem;
  --fz-3xl: 2.125rem;

  /* Transitions */
  --t: 180ms ease;
}

html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg-subtle);
  font: 400 var(--fz)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2) BASE ------------------------------------------ */
h1,h2,h3,h4 { margin: 0 0 var(--space-3); font-weight: 700; }
h1 { font-size: var(--fz-3xl); }
h2 { font-size: var(--fz-2xl); }
h3 { font-size: var(--fz-xl); }
p  { margin: 0 0 var(--space-4); color: var(--text); }
small { color: var(--text-muted); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--accent-600); }

img { display:block; max-width:100%; height:auto; }

/* 3) LAYOUT ---------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-4); }
.main-wrapper { padding-top: var(--space-6); }

/* Header shell */
.main-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.navbar { height: 64px; display:flex; align-items:center; }
.nav-container { width:100%; max-width: var(--container); margin:0 auto; padding:0 var(--space-4); display:flex; align-items:center; justify-content:space-between; }

/* 4) NAVIGATION ------------------------------------ */
.nav-brand .brand-link { display:flex; align-items:center; gap: .75rem; color: var(--text); }
.logo { width: 28px; height: 28px; border-radius: 6px; }
.brand-text { font-weight: 700; font-size: var(--fz-lg); letter-spacing:.2px; }

.nav-toggle { display:none; background:none; border:0; padding: .5rem; }
.hamburger-line { width: 22px; height: 2px; background:#9ca3af; margin: 3px 0; }

.nav-menu { display:flex; align-items:center; gap: var(--space-6); }
.nav-list { list-style:none; display:flex; align-items:center; gap: var(--space-4); margin:0; padding:0; }

.nav-link {
  position:relative;
  display:flex; align-items:center; gap:.5rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  color: #374151;
  transition: background var(--t), color var(--t), transform var(--t);
}
.nav-link:hover { background:#f3f4f6; color:#111827; }
.nav-link.active {
  background:#eef2ff;
  color:#111827;
}
.nav-link .icon { width: 18px; height: 18px; display:inline-block; color: currentColor; }

.nav-user { position:relative; }
.user-toggle {
  display:flex; align-items:center; gap:.5rem;
  background:none; border:0; padding:.375rem .5rem; border-radius:8px;
}
.user-toggle:hover { background:#f3f4f6; }
.user-avatar {
  width:28px;height:28px;border-radius:50%;
  display:grid;place-items:center;background:#111827;color:#fff;font-size: var(--fz-xs); font-weight:700;
}
.user-name { color:#111827; font-weight:600; font-size: var(--fz-sm); }
.dropdown-arrow { font-size: var(--fz-xs); color:#9ca3af; }

.user-menu {
  position:absolute; top: calc(100% + 8px); right:0; width: 280px;
  background: var(--bg);
  border:1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: var(--space-4);
  opacity:0; visibility:hidden; transform: translateY(-6px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.user-menu.active { opacity:1; visibility:visible; transform: translateY(0); }
.user-info { display:flex; gap:.75rem; margin-bottom: .75rem; }
.user-avatar-large { width:40px;height:40px;border-radius:50%; display:grid;place-items:center;background:#111827;color:#fff;font-weight:700; }
.user-details strong { display:block; }
.menu-divider { border:0; height:1px; background: var(--border); margin:.75rem 0; }
.menu-link { display:flex; align-items:center; gap:.5rem; padding:.5rem .5rem; border-radius:8px; color:#111827; }
.menu-link:hover { background:#f3f4f6; }
.menu-link.logout-link { color: var(--danger); }
.menu-icon { width:18px;height:18px; }

/* Language chip row in menu */
.language-selector .language-options { display:flex; gap:.5rem; flex-wrap:wrap; }
.lang-option {
  display:inline-flex; align-items:center; justify-content:center;
  height:28px; padding: 0 .6rem; border:1px solid var(--border); border-radius: 999px;
  color:#374151; background: #fff;
  font-size: var(--fz-xs); text-transform: uppercase; font-weight:600;
}
.lang-option.active { border-color:#c7d2fe; background:#eef2ff; }

/* 5) FORMS ----------------------------------------- */
.form-group { margin-bottom: var(--space-5); }
.form-row { display:grid; grid-template-columns: 1fr; gap: var(--space-4); }
label { display:block; font-weight:600; color:#111827; margin-bottom:.35rem; }
input, select, textarea {
  width:100%; border:1px solid var(--border); border-radius: 8px;
  padding:.625rem .75rem; font-size: var(--fz);
  background:#fff; color:var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color:#c7d2fe; box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.form-group small { color: var(--text-muted); font-size: var(--fz-xs); }

/* Checkbox (custom) */
.checkbox-group { display:flex; gap:.75rem; }
.checkbox-label { display:flex; gap:.75rem; align-items:flex-start; cursor:pointer; }
.checkmark {
  width: 18px; height:18px; border:1.5px solid var(--border); border-radius:4px; background:#fff;
  position:relative; margin-top:.2rem;
}
.checkbox-label input[type="checkbox"] { display:none; }
.checkbox-label input[type="checkbox"]:checked + .checkmark { border-color:#4f46e5; background:#4f46e5; }
.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content:''; position:absolute; inset:0; background:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px 14px no-repeat;
}

/* 6) BUTTONS --------------------------------------- */
.btn {
  --_bg: #111827; --_fg: #fff; --_bd: transparent;
  display:inline-flex; align-items:center; gap:.5rem; justify-content:center;
  padding:.6rem .9rem; border-radius:10px; border:1px solid var(--_bd);
  background: var(--_bg); color: var(--_fg);
  font-weight:600; font-size: var(--fz-sm);
  transition: transform var(--t), background var(--t), border-color var(--t), color var(--t);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { --_bg: var(--accent); }
.btn-primary:hover { --_bg: var(--accent-600); }

.btn-secondary { --_bg:#f3f4f6; --_fg:#111827; --_bd: var(--border); }
.btn-secondary:hover { --_bg:#edeff2; }

.btn-outline { --_bg:#fff; --_fg:#111827; --_bd: var(--border); }
.btn-outline:hover { --_bg:#f9fafb; }

.btn-success { --_bg: var(--success); }
.btn-danger  { --_bg: var(--danger); }

.btn-sm { padding:.45rem .7rem; border-radius:8px; }
.btn-lg { padding:.8rem 1.2rem; font-size: var(--fz); border-radius:12px; }

.btn-icon { display:inline-grid; place-items:center; }
.btn-icon .icon { width:18px;height:18px; }

/* 7) COMPONENTS ------------------------------------ */
.card {
  background: var(--bg-elev);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-header, .card-body, .card-footer { padding: var(--space-6); }
.card-header { border-bottom:1px solid var(--border); }
.card-footer { border-top:1px solid var(--border); background: var(--bg-subtle); }

/* Alerts (toast) */
.alert-container { position: fixed; right: 16px; top: 72px; z-index: 1100; display:grid; gap:10px; width:min(360px, 90vw); }
.alert {
  display:flex; gap:.75rem; align-items:flex-start; padding:.8rem .9rem;
  border-radius:12px; border:1px solid var(--border); background:#fff; box-shadow: var(--shadow-2);
}
.alert-success { border-color:#bbf7d0; background:#f0fdf4; color:#14532d; }
.alert-error   { border-color:#fecaca; background:#fef2f2; color:#7f1d1d; }
.alert-warning { border-color:#fde68a; background:#fffbeb; color:#78350f; }
.alert-info    { border-color:#bfdbfe; background:#eff6ff; color:#1e3a8a; }
.alert-icon { font-size: 18px; }
.alert-message { flex:1; font-weight:600; }
.alert-close { background:none; border:0; font-size:20px; line-height:1; cursor:pointer; }

/* Modals */
.modal { position:fixed; inset:0; display:none; place-items:center; padding: var(--space-4); background: rgba(0,0,0,.32); z-index: 1200; }
.modal-content { width:100%; max-width: 600px; background:#fff; border:1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-2); overflow:hidden; }
.modal-header, .modal-body, .modal-footer { padding: var(--space-6); }
.modal-header { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); }
.modal-footer { display:flex; gap:.5rem; justify-content:flex-end; border-top:1px solid var(--border); background: var(--bg-subtle); }
.modal-close { background:none;border:0;font-size:22px;color:#9ca3af; cursor:pointer; }
.modal.show { display:grid; }

/* Stats row */
.devices-stats { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.stat-item { background:#fff; border:1px solid var(--border); border-radius:12px; padding: 14px; text-align:center; }
.stat-number { font-size: 1.6rem; font-weight:800; }
.stat-label  { color: var(--text-muted); font-size: var(--fz-xs); text-transform:uppercase; letter-spacing:.4px; }

/* Device cards */
.devices-grid { display:grid; grid-template-columns: 1fr; gap: 16px; }
.device-card { border:1px solid var(--border); border-radius:12px; background:#fff; padding: 16px; transition: box-shadow var(--t), transform var(--t); }
.device-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.device-card.active { outline: 2px solid #c7d2fe; outline-offset: 2px; }

.device-header { display:flex; justify-content:space-between; gap: 12px; margin-bottom:12px; }
.device-status { display:flex; gap:6px; flex-wrap:wrap; }

.status-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; font-size: var(--fz-xs); font-weight:700; letter-spacing:.2px; }
.status-badge.active    { background:#ecfdf5; color:#065f46; border:1px solid #bbf7d0; }
.status-badge.verified  { background:#eff6ff; color:#1e3a8a; border:1px solid #bfdbfe; }
.status-badge.unverified{ background:#fff7ed; color:#7c2d12; border:1px solid #fed7aa; }

.detail-grid { display:grid; gap:10px; }
.detail-item { display:flex; justify-content:space-between; gap:10px; padding-bottom:10px; border-bottom:1px dashed var(--border); }
.detail-item:last-child { border-bottom:0; padding-bottom:0; }
.detail-label { color: var(--text-muted); font-size: var(--fz-sm); }
.sync-status { font-weight:700; }
.status-pending { color: var(--warning); }
.status-synced  { color: var(--success); }
.status-error   { color: var(--danger); }
.status-not_found { color:#9ca3af; }

.device-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* 8) PAGES ----------------------------------------- */
/* Landing */
.landing-page { background: var(--bg-subtle); }
.landing-nav { position:fixed; top:0; left:0; right:0; z-index:1000; background: var(--bg); border-bottom:1px solid var(--border); }
.landing-nav .nav-container { height:64px; }
.landing-nav .brand-text { color:#111827; }
.language-switcher .lang-option { color:#374151; background:#fff; border:1px solid var(--border); }
.language-switcher .lang-option.active { background:#eef2ff; border-color:#c7d2fe; color:#111827; }
.auth-buttons .btn-outline { --_bg:#fff; --_bd: var(--border); }

.hero { padding: 96px 0 48px; min-height: 80vh; display:flex; align-items:center; }
.hero-title { color:#111827; font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.15; }
.hero-subtitle { color:#4b5563; font-size: var(--fz-lg); }
.hero-features .feature-item { color:#374151; }
.device-mockup { background:#fff; border:1px solid var(--border); border-radius: 16px; padding: 18px; }

.features { background:#fff; padding: 64px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.section-header { text-align:center; max-width: 720px; margin: 0 auto 28px; }
.features-grid { display:grid; grid-template-columns: 1fr; gap: 16px; }
.feature-card { border:1px solid var(--border); border-radius: 14px; padding: 18px; background:#fff; }
.feature-card:hover { transform:none; box-shadow: var(--shadow-1); }
.feature-icon-large { font-size: 28px; margin-bottom: 6px; color:#111827; }

.how-it-works { background: var(--bg-subtle); padding: 64px 0; }
.steps { display:grid; grid-template-columns: 1fr; gap: 24px; max-width:900px; margin: 0 auto; }
.step { text-align:center; }
.step-number { width: 44px; height:44px; border-radius:999px; display:grid;place-items:center; background:#111827; color:#fff; font-weight:800; margin: 0 auto 10px; }

.cta { background:#111827; color:#fff; padding: 64px 0; }
.cta-content h2 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); }

/* Settings */
.settings-container { max-width: 880px; }
.settings-section { border:1px solid var(--border); border-radius: 14px; background:#fff; }
.settings-header { padding: 20px; border-bottom:1px solid var(--border); }
.settings-form { padding: 20px; }


/* ----------------------------------------------------
   Dashboard
-----------------------------------------------------*/
.dashboard-page .dashboard-header {
  display: grid;
  gap: 10px;
  align-items: start;
  padding: 18px 0 8px;
}
.dashboard-page .welcome-section h1 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  letter-spacing: .1px;
}
.dashboard-page .welcome-subtitle { color: var(--text-muted); margin-top: 4px; }
.dashboard-page .quick-actions { display:flex; gap: 8px; flex-wrap: wrap; }

.stats-grid {
  display: grid; gap: 12px; margin: 12px 0 18px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.stat-card {
  display:flex; align-items:center; gap: 12px;
  background:#fff; border:1px solid var(--border); border-radius: 12px; padding: 14px;
}
.stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display:grid; place-items:center; background: var(--bg-subtle); color:#111827;
  flex: 0 0 36px;
}
.stat-icon .icon { width: 20px; height: 20px; }
.stat-content .stat-number { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.stat-content .stat-label { color: var(--text-muted); font-size: var(--fz-xs); letter-spacing:.35px; text-transform:uppercase; margin-top: 4px; }

/* Lege staat */
.dashboard-empty-state { margin: 8px 0 20px; }
.empty-state-card {
  text-align:center; background:#fff; border:1px solid var(--border); border-radius:16px;
  padding: 28px; max-width: 720px; margin: 0 auto;
}
.empty-state-card h2 { margin-bottom: 4px; }
.empty-state-card p { color: var(--text-muted); }
.getting-started-steps {
  display:grid; gap: 14px; grid-template-columns: 1fr; justify-items:center; margin: 16px 0 18px;
}
.getting-started-steps .step { display:grid; justify-items:center; gap: 6px; }
.getting-started-steps .step-number {
  width: 36px; height: 36px; border-radius: 50%; display:grid; place-items:center;
  font-weight: 800; color:#fff; background:#111827;
}
.getting-started-steps .step-text { color:#374151; font-size: var(--fz-sm); }

/* Content + Sidebar layout */
.dashboard-content { display:grid; gap: 14px; grid-template-columns: 1fr; }
.sidebar { display:grid; gap: 12px; }
.sidebar-card {
  background:#fff; border:1px solid var(--border); border-radius:12px; padding: 16px;
}
.sidebar-card h3 { font-size: 1rem; margin-bottom: 10px; }

/* Active device */
.active-device-card {
  background:#fff; border:1px solid var(--border); border-radius:12px; padding: 16px;
  display:grid; gap: 10px;
}
.active-device-card .device-info h3 { margin-bottom: 2px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 8px; }
.section-link { font-size: var(--fz-sm); }

.device-alert { margin-top: 10px; }

/* Devices list (compact) */
.devices-list { display:grid; gap: 8px; }
.device-list-item {
  display:flex; gap: 12px; align-items:center;
  background:#fff; border:1px solid var(--border); border-radius:12px; padding: 12px;
}
.device-list-item .device-icon { width: 34px; height:34px; border-radius: 10px; display:grid; place-items:center; background: var(--bg-subtle); color:#111827; }
.device-list-item .device-info h4 { margin-bottom: 2px; font-size: 1rem; }
.device-status-text { display:flex; gap: 10px; flex-wrap: wrap; }
.device-status-text .status-active   { color: var(--success); font-weight:700; }
.device-status-text .status-verified { color: #2563eb; font-weight:700; }
.device-status-text .status-pending  { color: var(--warning); font-weight:700; }
.device-added { color: var(--text-muted); font-size: var(--fz-xs); }
.view-more { text-align:center; }
.view-more-link { font-size: var(--fz-sm); }

/* Quick actions in sidebar */
.quick-actions-list { display:grid; gap: 8px; }
.action-item {
  display:grid; grid-template-columns: 28px 1fr 18px; gap: 10px; align-items:center;
  padding: 10px; border:1px solid var(--border); border-radius:10px; background:#fff;
  transition: background var(--t), border-color var(--t);
}
.action-item:hover { background:#f9fafb; border-color:#d1d5db; }
.action-icon { display:grid; place-items:center; width:28px; height:28px; border-radius: 8px; background: var(--bg-subtle); }
.action-icon .icon { width:18px; height:18px; }
.action-text { font-weight:600; color:#111827; }
.action-arrow { color:#9ca3af; }

/* Status indicators (sidebar) */
.status-items { display:grid; gap: 8px; margin-bottom: 6px; }
.status-item { display:flex; gap: 10px; align-items:center; }
.status-indicator { width:10px; height:10px; border-radius: 50%; background:#9ca3af; }
.status-indicator.online { background: var(--success); }
.status-indicator.offline{ background: var(--danger); }
.system-info small { color: var(--text-muted); }

/* Responsiveness */
@media (min-width: 700px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .getting-started-steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 980px) {
  .dashboard-content { grid-template-columns: 1fr 320px; align-items:start; }
}



/* 9) UTILITIES ------------------------------------- */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 18px; }
.page-title p { color: var(--text-muted); }
.hidden { display:none!important; }


/* 10 DEVICES */

/* ----------------------------------------------------
   Devices (flat, mobile-first)
-----------------------------------------------------*/
.devices-page .page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 18px 0 8px;
}
.devices-page .page-title h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.devices-page .page-title p  { color: var(--text-muted); margin-top: 4px; }
.devices-page .page-actions { display:flex; gap: 8px; flex-wrap: wrap; }

/* Header stats (indien er apparaten zijn) */
.devices-header { margin: 10px 0 14px; }
.devices-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.devices-stats .stat-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; text-align: center;
}
.stat-number { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.stat-label  { color: var(--text-muted); font-size: var(--fz-xs); letter-spacing: .35px; text-transform: uppercase; margin-top: 4px; }

/* Lege staat (geen apparaten) */
.empty-state {
  background:#fff; border:1px solid var(--border); border-radius:16px;
  padding: 22px; max-width: 820px; margin: 8px auto 18px;
  text-align: left;
}
.empty-state .empty-icon { display:none; } /* weg met emoji */
.empty-state h2 { margin-bottom: 6px; }
.empty-state p  { color: var(--text-muted); margin-bottom: 14px; }

/* “Hoe werkt het?” als strakke verticale stappenlijn */
.setup-help { margin-top: 8px; }
.help-steps { display: grid; gap: 14px; }
.help-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.help-step .step-number {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color:#fff; background:#0f172a;
}
.help-step .step-content h4 { margin: 0 0 4px 0; }
.help-step .step-content p  { margin: 0; color: var(--text-muted); }

/* Devices grid */
.devices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}
@media (min-width: 780px) {
  .devices-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1140px) {
  .devices-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.device-card {
  background:#fff; border:1px solid var(--border); border-radius: 14px;
  padding: 14px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.device-card:hover { border-color:#cbd5e1; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.device-card.active { box-shadow: 0 0 0 3px rgba(37,99,235,.12); border-color:#c7d2fe; }
.device-card.unverified { border-style: dashed; }

.device-header {
  display:grid; grid-template-columns: 1fr auto; gap: 12px; align-items:start; margin-bottom: 10px;
}
.device-info h3 { margin-bottom: 4px; font-size: 1rem; }
.device-meta { display:flex; gap: 12px; flex-wrap: wrap; color:#475569; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fz-xs); }
.device-id, .device-imei { opacity:.9; }

/* Badges (monochroom) */
.device-status { display:flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.status-badge {
  display:flex; align-items:center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: var(--fz-xs); font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--border); background: var(--bg);
}
.status-badge .status-dot { width:8px; height:8px; border-radius:50%; background: currentColor; display:inline-block; }
.status-badge.active    { color: var(--success); border-color: rgba(16,185,129,.35); }
.status-badge.verified  { color: #2563eb; border-color: rgba(37,99,235,.35); }
.status-badge.unverified{ color: var(--warning); border-color: rgba(245,158,11,.35); }

/* Details */
.device-details { margin-top: 6px; }
.detail-grid {
  display: grid; gap: 8px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
.detail-item { display:flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.detail-item:last-child { border-bottom: none; padding-bottom: 0; }
.detail-label { color: var(--text-muted); font-size: var(--fz-sm); }
.detail-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fz-sm); color: #111827; }

/* Foutmelding in card */
.error-message {
  display:flex; gap: 10px; margin-top: 10px; padding: 10px;
  background:#fff7ed; border:1px solid #fed7aa; color:#7c2d12; border-radius: 10px;
}
.error-icon .icon { width:18px; height:18px; }

/* Actions */
.device-actions { display:flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn.btn-sm { padding: 8px 10px; border-radius: 10px; }
.btn .icon { width: 16px; height: 16px; }

/* Modals – kleine polish */
.modal-content { border-radius: 16px; }
.modal-header h2 { font-size: 1.1rem; }


/* Donkere modus */
@media (prefers-color-scheme: dark) {
  .device-card.unverified { border-color: #475569; }
  .detail-value { color: #e5e7eb; }
}



/* ----------------------------------------------------
   Footer (flat, responsive, mobile-first)
-----------------------------------------------------*/
.main-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text);
}

.footer-container { max-width: var(--container); margin: 0 auto; padding: var(--space-8) var(--space-4) var(--space-6); }
.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

/* Secties */
.footer-section h4 {
  margin-bottom: var(--space-3);
  font-size: var(--fz-sm);
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #111827;
}
.footer-section p { color: var(--text-muted); }

/* Brand blok */
.footer-brand { max-width: 340px; }
.footer-logo { width: 40px; height: 40px; margin-bottom: var(--space-3); border-radius: 8px; }
.footer-brand h3 { font-size: var(--fz-lg); margin-bottom: .25rem; }
.footer-brand p  { font-size: var(--fz-sm); }

/* Links */
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-links a {
  color: #374151;
  font-size: var(--fz-sm);
  padding: .2rem 0;
  display: inline-block;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--accent); }

/* System info */
.system-status { display: grid; gap: .35rem; font-size: var(--fz-sm); }
.status-item { display:flex; justify-content: space-between; gap: .75rem; }
.status-label { color: var(--text-muted); }
.status-value { color: #374151; font-weight: 600; }
.status-value.online  { color: var(--success); }
.status-value.offline { color: var(--danger); }

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
}
.footer-bottom-content {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-4);
}
.copyright p { color: var(--text-muted); font-size: var(--fz-sm); margin: 0; }

/* Language select */
.language-select {
  appearance: none;
  background: var(--bg);
  color: #374151;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem .9rem;
  font-size: var(--fz-sm);
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  background-size: 18px 18px;
  padding-right: 2rem;
}
.language-select:focus {
  outline: none;
  border-color:#c7d2fe;
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

/* Responsiveness */
@media (min-width: 700px) {
  .footer-content {
    grid-template-columns: 1.2fr .8fr .8fr .9fr;
    align-items: start;
  }
  .footer-bottom-content {
    grid-template-columns: 1fr auto;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .footer-section h4 { color: #e5e7eb; }
  .footer-links a { color: #cbd5e1; }
  .footer-links a:hover { color: #93c5fd; }
  .status-value { color: #e5e7eb; }
  .language-select { background: var(--bg-subtle); color: var(--text); border-color: var(--border); }
}




/* 10) RESPONSIVE ----------------------------------- */
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 768px) {
  .nav-toggle { display:flex; flex-direction:column; }
  .nav-menu { gap: var(--space-6); }
  .devices-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0,1fr)); align-items:start; }
}
@media (min-width: 1024px) {
  .devices-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .devices-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero { min-height: 70vh; }
}

/* Mobile menu behaviour */
@media (max-width: 900px) {
  .nav-menu {
	position:absolute; left:0; right:0; top:64px;
	background:#fff; border-top:1px solid var(--border);
	display:grid; gap:0; grid-auto-rows:min-content;
	max-height: 0; overflow:hidden; transition: max-height var(--t);
  }
  .nav-menu.active { max-height: 360px; }
  .nav-list { flex-direction:column; padding: 8px; }
  .nav-link { width:100%; border-radius: 10px; }
  .nav-user { padding: 8px; border-top:1px solid var(--border); }
  .user-menu { position: static; transform:none; opacity:1; visibility:visible; box-shadow:none; border:0; padding:0; background: var(--bg-subtle); margin-top:6px; }
}

/* 11) DARK MODE (auto) ----------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
	--bg: #0b0f17;
	--bg-subtle: #0e131c;
	--bg-elev: #111826;
	--text: #e5e7eb;
	--text-muted: #9ca3af;
	--border: #1f2937;
  }
  .nav-link:hover { background:#161d2a; color:#fff; }
  .lang-option { background:#0e131c; border-color:#1f2937; color:#e5e7eb; }
  .lang-option.active { background:#1c2335; border-color:#2a3580; }
  .feature-card:hover { box-shadow:none; }
  .modal-content { background:#0e131c; }
  .status-badge.active    { background:#052e1a; border-color:#0b5d35; color:#9fe7bf; }
  .status-badge.verified  { background:#0b1937; border-color:#14306f; color:#c5dbff; }
  .status-badge.unverified{ background:#2b1b07; border-color:#6b3e10; color:#ffd7b2; }
}
