/* ═══════════════════════════════════════════════════════════
   BPM Point — Adresboek (premium layout)
   ═══════════════════════════════════════════════════════════ */

body.page-adresboek {
  background:
    radial-gradient(ellipse 900px 420px at 100% 0%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(ellipse 700px 380px at 0% 20%, rgba(14, 165, 233, 0.1), transparent 50%),
    radial-gradient(ellipse 600px 320px at 85% 95%, rgba(244, 114, 182, 0.06), transparent 50%),
    var(--gray-100);
}

body.page-adresboek.ab-modal-open {
  overflow: hidden;
}

.ab-page-wrap {
  max-width: 1220px;
  padding-bottom: 3rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.ab-hero {
  position: relative;
  margin: 0 0 1.75rem;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.88) 48%, rgba(241, 245, 249, 0.92) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 50px -24px rgba(15, 23, 42, 0.18),
    0 8px 16px -8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

@supports (backdrop-filter: blur(12px)) {
  .ab-hero {
    backdrop-filter: blur(16px);
  }
}

.ab-hero__mesh {
  position: absolute;
  inset: -40% -20% auto -30%;
  height: 140%;
  background:
    radial-gradient(circle at 20% 40%, rgba(59, 130, 246, 0.09), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.07), transparent 38%);
  pointer-events: none;
}

.ab-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.ab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.ab-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.ab-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.15;
}

.ab-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-600);
}

.ab-lead strong {
  color: var(--gray-900);
  font-weight: 600;
}

.ab-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ab-hero__link {
  border-radius: 10px;
  padding: 0 18px;
  height: 38px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(26, 46, 74, 0.08);
}

.ab-hero__note {
  margin: 0;
  font-size: 12px;
  color: var(--gray-600);
  text-align: right;
  max-width: 14rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .ab-hero__aside {
    align-items: flex-start;
    width: 100%;
  }
  .ab-hero__note {
    text-align: left;
    max-width: none;
  }
}

/* ── Panel (zoeken & knoppen) ─────────────────────────────── */
.ab-panel {
  margin-bottom: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.ab-panel__head {
  padding: 0.65rem 1.25rem;
  background: linear-gradient(180deg, var(--gray-50) 0%, #fafbfc 100%);
  border-bottom: 1px solid var(--gray-200);
}

.ab-panel__title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.ab-panel__body {
  padding: 1.1rem 1.25rem 1.15rem;
}

.ab-toolbar-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ab-search-field {
  margin: 0;
  max-width: 100%;
}

.ab-search-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-900);
}

.ab-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  font-size: 14px;
  font-family: inherit;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px 50%;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.ab-search-input:hover {
  border-color: var(--gray-400);
}

.ab-search-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 3px rgba(37, 99, 235, 0.14);
}

.ab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.ab-toolbar-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-right: auto;
}

.ab-toolbar__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-btn-pri {
  border-radius: 10px;
  padding: 0 16px;
  height: 32px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 46, 74, 0.2);
}

.ab-btn-pri::before {
  content: '+';
  margin-right: 4px;
  font-weight: 700;
  opacity: 0.95;
}

.ab-btn-sec {
  border-radius: 10px;
}

.ab-status {
  font-size: 13px;
  min-height: 0;
  margin: 12px 0 0;
  padding: 0;
  line-height: 1.45;
  transition: all 0.2s ease;
}

.ab-status:not(:empty) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
}

.ab-status.ok:not(:empty) {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.ab-status.err:not(:empty) {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

/* ── Tabel-shell ──────────────────────────────────────────── */
.ab-data {
  margin-top: 0.25rem;
}

.ab-table-shell {
  position: relative;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.12));
  box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.25);
}

.ab-table-wrap {
  overflow: auto;
  max-height: min(68vh, 760px);
  border-radius: 17px;
  border: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* ── Avatars ──────────────────────────────────────────────── */
.ab-avatar {
  --ab-hue: 215;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  background: linear-gradient(
    145deg,
    hsl(var(--ab-hue), 72%, 52%) 0%,
    hsl(calc(var(--ab-hue) + 36), 62%, 42%) 100%
  );
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.ab-avatar--sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 12px;
}

/* ── Tabel ─────────────────────────────────────────────────── */
table.ab-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.ab-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.95);
}

@supports (backdrop-filter: blur(8px)) {
  .ab-table thead th {
    backdrop-filter: blur(10px);
  }
}

.ab-table th {
  text-align: left;
  white-space: nowrap;
}

.ab-th-sort {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.ab-th-sort:hover {
  color: var(--navy);
  background: rgba(37, 99, 235, 0.06);
}

.ab-th-sort.is-active {
  color: var(--blue);
}

.ab-th-static {
  display: block;
  padding: 12px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.ab-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  vertical-align: middle;
}

.ab-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.55);
}

.ab-table tbody tr:last-child td {
  border-bottom: none;
}

.ab-data-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.ab-data-row:focus {
  outline: none;
}

.ab-data-row:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 0 var(--blue);
}

.ab-table tbody tr:hover td {
  background: rgba(219, 234, 254, 0.45) !important;
}

.ab-cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.ab-cell-name__text strong {
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.ab-table .ab-mono {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--gray-900);
}

.ab-table .ab-actions {
  white-space: nowrap;
  text-align: right;
}

.ab-btn-tbl {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

.ab-btn-tbl.ab-btn-del {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.6);
}

.ab-btn-tbl.ab-btn-del:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.ab-cell-muted {
  color: var(--gray-600);
  max-width: 200px;
}

.ab-cell-muted a,
.ab-table .ab-mono a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.ab-cell-muted a:hover,
.ab-table .ab-mono a:hover {
  text-decoration: underline;
}

.ab-cell-datum {
  font-size: 12px;
  color: var(--gray-600);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── Lege staten ───────────────────────────────────────────── */
.ab-empty {
  padding: 3rem 1.5rem 3.25rem;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--gray-50) 100%);
}

.ab-empty__orb {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.1));
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.12);
}

.ab-empty__orb--muted {
  background: linear-gradient(145deg, rgba(148, 163, 184, 0.2), rgba(226, 232, 240, 0.5));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ab-empty__icon {
  font-size: 2.25rem;
  line-height: 1;
}

.ab-empty__title {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}

.ab-empty__text {
  margin: 0 auto 1.25rem;
  max-width: 22rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-600);
}

.ab-empty .btn {
  border-radius: 10px;
}

/* ── Kaarten (mobiel) ─────────────────────────────────────── */
.ab-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.ab-card {
  position: relative;
  border-radius: 16px;
  padding: 16px 16px 14px;
  border: 1px solid var(--gray-200);
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #22d3ee);
  opacity: 0.85;
}

.ab-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow:
    0 12px 36px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(59, 130, 246, 0.08);
}

.ab-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  padding-top: 4px;
}

.ab-card__top-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ab-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.ab-card__datum {
  font-size: 12px;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
}

.ab-card__dl {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.ab-card__dl > div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: baseline;
}

.ab-card__dl dt {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.ab-card__dl dd {
  margin: 0;
  word-break: break-word;
  color: var(--gray-900);
}

.ab-card__dl a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.ab-card__dl a:hover {
  text-decoration: underline;
}

.ab-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.ab-card__actions .btn {
  flex: 1 1 auto;
  min-width: 112px;
  border-radius: 10px;
  font-weight: 600;
}

.ab-card .ab-btn-del {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.65);
}

.ab-card .ab-btn-del:hover {
  background: #fee2e2;
}

/* ── Modal ─────────────────────────────────────────────────── */
.ab-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ab-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ab-modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-top: min(5vh, 48px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.ab-modal-overlay.is-open .ab-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ab-modal__ribbon {
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #0ea5e9, #db2777);
}

.ab-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--gray-200);
}

.ab-modal__head-text {
  flex: 1;
  min-width: 0;
}

.ab-modal__kicker {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.ab-modal__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.ab-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.ab-modal__close:hover {
  background: var(--gray-200);
  color: var(--navy);
}

.ab-modal__close:active {
  transform: scale(0.95);
}

.ab-modal__body {
  padding: 1.1rem 1.25rem 1.15rem;
}

.ab-modal__err {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #991b1b;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.ab-modal__err::before {
  content: '!';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: #fecaca;
  color: #b91c1c;
}

.ab-label-muted {
  font-weight: 400;
  color: var(--gray-600);
}

.ab-modal .field {
  margin-bottom: 12px;
}

.ab-modal .field input {
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ab-modal .field input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ab-modal .g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ab-modal-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--gray-600);
}

.ab-modal-hint__keys {
  display: block;
  margin-top: 10px;
}

.ab-modal-hint__keys kbd,
.ab-modal-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 1px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: #fff;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  color: var(--gray-800);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.ab-modal-hint__of {
  margin: 0 4px;
  font-size: 11px;
  color: var(--gray-400);
}

.ab-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 1.25rem 1.25rem;
}

.ab-modal__btn-cancel {
  border-radius: 10px;
}

.ab-modal__btn-save {
  border-radius: 10px;
  font-weight: 600;
  padding: 0 22px;
  box-shadow: 0 4px 14px rgba(26, 46, 74, 0.22);
}

@media (max-width: 520px) {
  .ab-modal .g2 {
    grid-template-columns: 1fr;
  }
}
