/*
 * MailHub Server Manager — Hoofd stylesheet
 * Versie: 1.0.0
 *
 * Structuur:
 *   1. CSS Variabelen (thema's)
 *   2. Reset & basis
 *   3. Topbalk
 *   4. Zijbalk
 *   5. Hoofdinhoud
 *   6. Componenten (cards, tabellen, knoppen, tags, formulieren)
 *   7. Animaties
 *   8. Responsief
 */

/* ═══════════════════════════════════════════════════════════════
   1. CSS VARIABELEN — licht thema (standaard)
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Merk / accent */
  --brand:          #1a6fc4;
  --brand-dark:     #155aa0;
  --brand-light:    #e8f1fb;
  --brand-mid:      #c5daf5;

  /* Topbalk */
  --top-bg:         #ffffff;
  --top-border:     #e0e4ea;
  --top-h:          52px;

  /* Zijbalk */
  --side-bg:        #ffffff;
  --side-border:    #e0e4ea;
  --side-w:         210px;
  --side-text:      #444c5a;
  --side-sub:       #8a93a2;
  --side-hover:     #f0f4fa;
  --side-active-bg: #e8f1fb;
  --side-active:    #1a6fc4;
  --side-icon:      #7a8494;

  /* Achtergrond & kaarten */
  --bg:             #f4f6f9;
  --card-bg:        #ffffff;
  --card-alt:       #f8fafc;

  /* Tekst */
  --text:           #1e2533;
  --text-sub:       #6b7585;

  /* Randen & schaduwen */
  --border:         #e2e6ed;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08);
  --radius:         6px;

  /* Status kleuren */
  --green:          #22c55e;
  --orange:         #f59e0b;
  --red:            #ef4444;

  /* Typografie */
  --font:           'Nunito Sans', -apple-system, sans-serif;
  --mono:           'IBM Plex Mono', monospace;
}

/* Donker thema — activeer via <html data-theme="dark"> */
[data-theme="dark"] {
  --top-bg:         #1e2533;
  --top-border:     #2d3748;
  --side-bg:        #1a1f2e;
  --side-border:    #2d3748;
  --side-text:      #a0aec0;
  --side-sub:       #4a5568;
  --side-hover:     rgba(255,255,255,0.05);
  --side-active-bg: rgba(26,111,196,0.18);
  --side-active:    #6fa8f5;
  --side-icon:      #6b7585;
  --bg:             #12161f;
  --card-bg:        #1e2533;
  --card-alt:       #252c3a;
  --text:           #e2e8f0;
  --text-sub:       #718096;
  --border:         #2d3748;
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASIS
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 13.5px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   3. TOPBALK
   ═══════════════════════════════════════════════════════════════ */
.msm-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-h);
  background: var(--top-bg);
  border-bottom: 1px solid var(--top-border);
  display: flex;
  align-items: center;
  z-index: 200;
  padding-right: 12px;
}

/* Logo-gebied (zelfde breedte als zijbalk) */
.msm-logo-area {
  width: var(--side-w);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 100%;
  border-right: 1px solid var(--top-border);
  text-decoration: none;
}

.msm-logo-mark {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.msm-logo-mark svg { width: 16px; height: 16px; fill: white; }
.msm-logo-img {
  max-height: 36px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}


.msm-logo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
  line-height: 1;
}

.msm-logo-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid var(--brand-mid);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 2px;
}

/* ── Klok & datum in topbalk ─────────────────────────────────── */
.msm-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 18px;
  flex-shrink: 0;
  padding: 4px 14px;
  border-left: 1px solid var(--top-border);
  border-right: 1px solid var(--top-border);
  height: 100%;
  gap: 1px;
}

.msm-clock-time {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.06em;
  line-height: 1;
}

.msm-clock-date {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  line-height: 1;
}

[data-theme="dark"] .msm-clock-time { color: #6fa8f5; }
[data-theme="dark"] .msm-clock-date { color: #4a5568; }

/* ── Avatar dropdown ─────────────────────────────────────────── */
.msm-user-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.msm-user-dropdown {
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 500;
  overflow: hidden;
  animation: msm-fadein 0.15s ease;
}

.msm-user-dropdown.is-open { display: block !important; }

.msm-user-dropdown-header {
  padding: 11px 14px;
  background: var(--card-alt);
  border-bottom: 1px solid var(--border);
}

.msm-user-dropdown-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msm-user-dropdown-email {
  font-size: 10.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.msm-user-dropdown-items { padding: 4px 0; }

.msm-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
  white-space: nowrap;
}

.msm-user-dropdown-item:hover {
  background: var(--side-hover);
  color: var(--brand);
  text-decoration: none;
}

.msm-user-dropdown-item svg {
  width: 14px;
  height: 14px;
  color: var(--side-icon);
  flex-shrink: 0;
}

.msm-user-dropdown-item:hover svg { color: var(--brand); }

.msm-user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.msm-user-dropdown-item.is-danger       { color: var(--red); }
.msm-user-dropdown-item.is-danger svg   { color: var(--red); }
.msm-user-dropdown-item.is-danger:hover { background: #fff1f2; color: var(--red); }

/* Rechter acties */
.msm-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Taal dropdown ───────────────────────────────────────────── */
.msm-lang-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.msm-lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-sub);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  margin-right: 4px;
  transition: all 0.12s;
}
.msm-lang-btn svg { width: 13px; height: 13px; }
.msm-lang-btn:hover { background: var(--side-hover); color: var(--text); }

.msm-lang-dropdown {
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 500;
  padding: 4px 0;
  animation: msm-fadein 0.15s ease;
}

.msm-lang-dropdown.is-open { display: block !important; }

.msm-lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.msm-lang-dropdown-item:hover {
  background: var(--side-hover);
  text-decoration: none;
}

.msm-lang-dropdown-item.is-active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.msm-lang-code {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  padding: 1px 5px;
  border-radius: 3px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.msm-lang-name { flex: 1; }

.msm-lang-check {
  width: 13px;
  height: 13px;
  color: var(--brand);
  flex-shrink: 0;
}

/* Instellingen icoon */
.msm-topbar-btn {
  width: 32px; height: 32px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--side-icon);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.msm-topbar-btn:hover { background: var(--side-hover); color: var(--brand); }
.msm-topbar-btn svg { width: 16px; height: 16px; }

/* Avatar */
.msm-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #5ba3f5);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: 2px;
  flex-shrink: 0;
  overflow: hidden;
}

.msm-avatar img { width: 100%; height: 100%; object-fit: cover; }

.msm-avatar-chevron {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  display: flex; align-items: center;
  padding: 0 2px;
}
.msm-avatar-chevron svg { width: 11px; height: 11px; }

/* ═══════════════════════════════════════════════════════════════
   4. ZIJBALK
   ═══════════════════════════════════════════════════════════════ */
.msm-sidebar {
  position: fixed;
  top: var(--top-h);
  left: 0; bottom: 0;
  width: var(--side-w);
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.msm-nav { flex: 1; padding: 6px 0; }

/* Groepslabel (inklapbaar) */
.msm-nav-group { margin-bottom: 2px; }

.msm-nav-section {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--side-text);
  font-size: 12.5px;
  font-weight: 600;
  user-select: none;
  transition: background 0.1s;
}
.msm-nav-section:hover { background: var(--side-hover); }

.msm-nav-section-arrow {
  width: 13px; height: 13px;
  color: var(--side-sub);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.msm-nav-section-arrow.is-open   { transform: rotate(0deg); }
.msm-nav-section-arrow.is-closed { transform: rotate(-90deg); }

/* Navigatie-item */
.msm-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 22px;
  color: var(--side-text);
  font-size: 12.5px;
  cursor: pointer;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: all 0.1s;
  white-space: nowrap;
}
.msm-nav-item:hover { background: var(--side-hover); color: var(--text); text-decoration: none; }
.msm-nav-item.is-active {
  background: var(--side-active-bg);
  color: var(--side-active);
  border-left-color: var(--side-active);
  font-weight: 600;
}
.msm-nav-item.is-active .msm-nav-icon { color: var(--side-active); }

/* Top-level item (geen inspringing) */
.msm-nav-item.is-top {
  padding-left: 12px;
  font-weight: 600;
}

.msm-nav-icon { width: 15px; height: 15px; color: var(--side-icon); flex-shrink: 0; }
.msm-nav-label { flex: 1; }

.msm-nav-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--brand);
  color: white;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}
.msm-nav-badge.is-warn   { background: var(--orange); }
.msm-nav-badge.is-danger { background: var(--red); }

.msm-nav-divider { height: 1px; background: var(--side-border); margin: 5px 12px; }

/* ═══════════════════════════════════════════════════════════════
   5. HOOFDINHOUD
   ═══════════════════════════════════════════════════════════════ */
.msm-main {
  margin-left: var(--side-w);
  margin-top: var(--top-h);
  padding: 24px;
  min-height: calc(100vh - var(--top-h));
}

.msm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.msm-page-title { font-size: 17px; font-weight: 700; color: var(--text); }
.msm-page-sub   { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   6. COMPONENTEN
   ═══════════════════════════════════════════════════════════════ */

/* ── Knoppen ─────────────────────────────────────────────────── */
.msm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font);
  text-decoration: none;
  transition: all 0.13s;
  white-space: nowrap;
  line-height: 1;
}
.msm-btn svg { width: 13px; height: 13px; }

.msm-btn-primary { background: var(--brand);    color: white;          border-color: var(--brand-dark); }
.msm-btn-primary:hover { background: var(--brand-dark); text-decoration: none; }

.msm-btn-light   { background: var(--card-bg);  color: var(--text);    border-color: var(--border); }
.msm-btn-light:hover { background: var(--card-alt); text-decoration: none; }

.msm-btn-danger  { background: var(--card-bg);  color: var(--red);     border-color: #fecdd3; }
.msm-btn-danger:hover { background: #fff1f2; text-decoration: none; }

.msm-btn-icon    { padding: 5px 7px; background: var(--card-bg); color: var(--text-sub); border-color: var(--border); }
.msm-btn-icon:hover { background: var(--card-alt); color: var(--text); text-decoration: none; }

.msm-btn-sm { padding: 4px 9px; font-size: 11.5px; }

/* ── Cards ───────────────────────────────────────────────────── */
.msm-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.msm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-alt);
  gap: 12px;
}

.msm-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}
.msm-card-title svg { width: 14px; height: 14px; color: var(--brand); }

.msm-card-body { padding: 16px; }

/* ── Statistiekkaarten ───────────────────────────────────────── */
.msm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.msm-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.msm-stat::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.msm-stat.c-blue::after   { background: var(--brand); }
.msm-stat.c-green::after  { background: var(--green); }
.msm-stat.c-orange::after { background: var(--orange); }
.msm-stat.c-red::after    { background: var(--red); }

.msm-stat-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-sub); margin-bottom: 7px; }
.msm-stat-value { font-size: 28px; font-weight: 300; color: var(--text); font-family: var(--mono); line-height: 1; margin-bottom: 5px; }
.msm-stat-trend { font-size: 11px; color: var(--text-sub); }

.msm-stat-icon {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.msm-stat-icon svg { width: 15px; height: 15px; }
.msm-stat.c-blue .msm-stat-icon   { background: var(--brand-light); color: var(--brand); }
.msm-stat.c-green .msm-stat-icon  { background: #dcfce7; color: #16a34a; }
.msm-stat.c-orange .msm-stat-icon { background: #fef9c3; color: #d97706; }
.msm-stat.c-red .msm-stat-icon    { background: #fee2e2; color: var(--red); }

/* ── Tabel ───────────────────────────────────────────────────── */
.msm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.msm-table thead th {
  background: var(--card-alt);
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.msm-table tbody tr { border-bottom: 1px solid #f1f4f8; transition: background 0.1s; }
.msm-table tbody tr:nth-child(even) { background: #fafbfd; }
.msm-table tbody tr:hover { background: var(--brand-light); }
.msm-table tbody td { padding: 10px 14px; vertical-align: middle; }

/* ── Tags ────────────────────────────────────────────────────── */
.msm-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.msm-tag.is-active  { background: #dcfce7; color: #15803d; }
.msm-tag.is-warn    { background: #fef9c3; color: #92400e; }
.msm-tag.is-danger  { background: #fee2e2; color: #991b1b; }
.msm-tag.is-neutral { background: #f1f5f9; color: #475569; }

/* DNS chips */
.msm-dns { font-size: 9.5px; font-weight: 700; font-family: var(--mono); padding: 2px 5px; border-radius: 3px; display: inline-block; }
.msm-dns.ok   { background: #dcfce7; color: #166534; }
.msm-dns.warn { background: #fef9c3; color: #713f12; }
.msm-dns.err  { background: #fee2e2; color: #991b1b; }

/* ── Services grid ───────────────────────────────────────────── */
.msm-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }

.msm-service {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.msm-service-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.msm-service-dot.is-on   { background: var(--green);  box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
.msm-service-dot.is-warn { background: var(--orange); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.msm-service-dot.is-off  { background: var(--red);    box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

.msm-service-name   { font-size: 12px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.msm-service-detail { font-size: 10.5px; color: var(--text-sub); margin-top: 1px; }

/* ── Log viewer ──────────────────────────────────────────────── */
.msm-log {
  background: #1e2533;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  color: #a0aec0;
  padding: 14px 16px;
  max-height: 200px;
  overflow-y: auto;
}
.msm-log .l-time { color: #4a5568; }
.msm-log .l-ok   { color: #68d391; }
.msm-log .l-warn { color: #f6e05e; }
.msm-log .l-err  { color: #fc8181; }
.msm-log .l-ip   { color: #b794f4; }
.msm-log .l-host { color: #76e4f7; }

/* ── Formulieren ─────────────────────────────────────────────── */
.msm-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.msm-input, .msm-select, .msm-textarea {
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  font-family: var(--font);
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.13s, box-shadow 0.13s;
}
.msm-input, .msm-select { height: 34px; }
.msm-textarea { padding: 8px 10px; resize: vertical; min-height: 80px; }

.msm-input:focus,
.msm-select:focus,
.msm-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,111,196,0.1);
}

.msm-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7585' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 26px;
}

.msm-form-group { margin-bottom: 14px; }
.msm-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msm-form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.msm-checkbox-row { display: flex; gap: 18px; flex-wrap: wrap; }
.msm-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}

.msm-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Fout / succes melding ───────────────────────────────────── */
.msm-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.msm-alert svg { width: 15px; height: 15px; flex-shrink: 0; }
.msm-alert.is-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.msm-alert.is-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.msm-alert.is-info    { background: var(--brand-light); color: var(--brand-dark); border: 1px solid var(--brand-mid); }

/* ── Tabs ────────────────────────────────────────────────────── */
.msm-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.msm-tab {
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}
.msm-tab:hover    { color: var(--brand); }
.msm-tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.msm-tab svg { width: 13px; height: 13px; }

/* ── DNS record card ─────────────────────────────────────────── */
.msm-dns-card { border: 1px solid var(--border); border-radius: 5px; overflow: hidden; margin-bottom: 8px; }
.msm-dns-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  background: var(--card-alt);
  border-bottom: 1px solid var(--border);
}
.msm-dns-type {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-light);
  padding: 2px 6px;
  border-radius: 3px;
}
.msm-dns-status-ok  { font-size: 11px; color: #15803d; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.msm-dns-status-err { font-size: 11px; color: var(--red); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.msm-dns-value { font-family: var(--mono); font-size: 10.5px; color: var(--text-sub); padding: 8px 11px; word-break: break-all; line-height: 1.5; }

/* ── Acties ──────────────────────────────────────────────────── */
.msm-actions { display: flex; gap: 4px; align-items: center; }

/* ── Hulproosters ────────────────────────────────────────────── */
.msm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.msm-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* ── Domeinnaam stijl ────────────────────────────────────────── */
.msm-domain { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--brand); }

/* ═══════════════════════════════════════════════════════════════
   7. ANIMATIES
   ═══════════════════════════════════════════════════════════════ */
@keyframes msm-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.msm-pulse { animation: msm-pulse 2s ease-in-out infinite; }

@keyframes msm-spin {
  to { transform: rotate(360deg); }
}
.msm-spin { animation: msm-spin 0.8s linear infinite; }

@keyframes msm-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msm-fadein { animation: msm-fadein 0.2s ease; }

/* ═══════════════════════════════════════════════════════════════
   8. SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8d0dd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* ── Profiel avatar (groot) ──────────────────────────────────── */
.msm-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #5ba3f5);
  color: white;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.msm-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Thema toggle ────────────────────────────────────────────── */
.msm-theme-toggle {
  display: flex;
  gap: 8px;
}

.msm-theme-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-sub);
  transition: all 0.12s;
  user-select: none;
}
.msm-theme-option input { display: none; }
.msm-theme-option:hover { background: var(--side-hover); color: var(--text); }
.msm-theme-option.is-active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

/* ── Formulier hint tekst ────────────────────────────────────── */
.msm-form-hint {
  font-size: 10.5px;
  color: var(--text-sub);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Modals ──────────────────────────────────────────────────── */
.msm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.msm-modal.is-open { display: flex; }

.msm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
}

.msm-modal-box {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-lg, 10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: msm-fadein 0.15s ease;
  margin: 16px;
}

.msm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.msm-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.msm-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-sub);
  flex-shrink: 0;
}
.msm-modal-close:hover { background: var(--side-hover); color: var(--text); }
.msm-modal-close svg { width: 15px; height: 15px; }

.msm-modal-body   { padding: 20px; }
.msm-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Wizard stappen indicator ────────────────────────────────── */
.msm-wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.msm-wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.msm-wizard-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  transition: all 0.2s;
}
.msm-wizard-step-icon svg { width: 15px; height: 15px; }

.msm-wizard-step.is-active .msm-wizard-step-icon {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.msm-wizard-step.is-done .msm-wizard-step-icon {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.msm-wizard-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}
.msm-wizard-step.is-active .msm-wizard-step-label { color: var(--brand); }
.msm-wizard-step.is-done .msm-wizard-step-label   { color: var(--green); }

.msm-wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 22px;
  transition: background 0.2s;
}
.msm-wizard-step-line.is-done { background: var(--green); }

.msm-wizard-card { max-width: 700px; }

/* ── DNS resultaten ──────────────────────────────────────────── */
.msm-dns-results {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.msm-dns-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.msm-dns-row:last-child { border-bottom: none; }

.msm-dns-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.msm-dns-status svg { width: 12px; height: 12px; }
.msm-dns-status.is-ok   { background: #dcfce7; color: #15803d; }
.msm-dns-status.is-fail { background: #fee2e2; color: #991b1b; }

.msm-dns-info { flex: 1; min-width: 0; }

.msm-dns-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.msm-dns-found {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msm-dns-found code {
  font-size: 11px;
  color: var(--text-sub);
  word-break: break-all;
}

.msm-dns-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.msm-dns-badge.is-ok   { background: #dcfce7; color: #15803d; }
.msm-dns-badge.is-fail { background: #fee2e2; color: #991b1b; }

.msm-dns-expected {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.msm-dns-expected-label { flex-shrink: 0; font-weight: 600; }
.msm-dns-expected code { word-break: break-all; color: var(--brand); }

/* ── DKIM DNS record box ─────────────────────────────────────── */
.msm-dns-record-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.msm-dns-record-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card-alt);
  border-bottom: 1px solid var(--border);
}

.msm-dns-record-type {
  font-size: 10px;
  font-weight: 700;
  background: var(--brand);
  color: white;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}

.msm-dns-record-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  flex: 1;
  word-break: break-all;
}

.msm-dns-record-value {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-sub);
  word-break: break-all;
  line-height: 1.5;
  background: var(--card-bg);
}

/* ── Overzicht (stap 4) ──────────────────────────────────────── */
.msm-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}

.msm-summary-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.msm-summary-row:last-child { border-bottom: none; }

.msm-summary-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
}

.msm-summary-value {
  font-size: 13px;
  color: var(--text);
}
.msm-summary-value code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand);
}

/* ── Actie items (stap 4) ────────────────────────────────────── */
.msm-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-sub);
}
.msm-action-item svg { color: var(--green); flex-shrink: 0; }

/* ── Input varianten ─────────────────────────────────────────── */
.msm-input-mono { font-family: var(--mono); }
.msm-input-lg   { font-size: 15px; height: 40px; }

/* ── Label optional ──────────────────────────────────────────── */
.msm-label-optional {
  font-weight: 400;
  color: var(--text-sub);
  font-size: 10.5px;
}

/* ── Paginering ──────────────────────────────────────────────── */
.msm-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
