/* att-site-beheer — tokens 1-op-1 overgenomen uit apps/web/app/globals.css (:root-blok),
   de After The Table merk-palette. Geen Tailwind hier (standalone paneel, geen build-stap),
   maar dezelfde custom-property namen + waarden zodat het een familie blijft. */

:root {
  --brand: #2c8166;
  --brand-tint: #d0ebe3;
  --background: #ffffff;
  --foreground: #2f2f2d;
  --card: #ffffff;
  --card-foreground: #2f2f2d;
  --primary: #2c8166;
  --primary-foreground: #ffffff;
  --secondary: #d0ebe3;
  --secondary-foreground: #1f5e4a;
  --muted: #f5f5f2;
  --muted-foreground: #6b6b69;
  --accent: #d0ebe3;
  --accent-foreground: #1f5e4a;
  --destructive: #b14545;
  --destructive-tint: #f6e6e6;
  --border: #e6e7e3;
  --input: #e6e7e3;
  --ring: #2c8166;
  --radius: 10px;
  --radius-card: 16px; /* rounded-2xl, zoals de Card-kaarten in EditPanel */
  --radius-pill: 9999px;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 1px 4px rgba(133, 146, 173, 0.2);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "DM Sans", Helvetica, Arial, sans-serif;
  /* Geen Google Fonts-link (geen externe calls) — DM Sans/Geist zijn het merk-lettertype
     in het product; hier vallen we terug op de dichtstbijzijnde systeem-sans. */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--muted);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-weight: 600; margin: 0; }

a { color: var(--brand); }

.shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* ── Kop: mirror van RoomHeader.tsx — avatar-bubbel + naam + subtitel + control-slot ── */
.top-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.avatar-bubble {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.top-header .titles { min-width: 0; }
.top-header .titles .name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.top-header .titles .subtitle { font-size: 12px; color: var(--muted-foreground); }
.top-header .right { margin-left: auto; flex-shrink: 0; }

/* ── Klant-switch ── */
.customer-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--brand-tint);
  border-radius: var(--radius-pill);
}

.customer-switch button {
  border: none;
  background: transparent;
  color: var(--secondary-foreground);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.customer-switch button.active {
  background: var(--brand);
  color: #fff;
}

/* ── Banner (notice) — mirror van de tint-notice-div in WesRoom/EditPanel ── */
.banner {
  border-radius: 12px;
  border: 1px solid var(--brand-tint);
  background: var(--brand-tint);
  color: var(--secondary-foreground);
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 12px;
}

.banner.warn {
  border-color: #ecd9b0;
  background: #fbf3df;
  color: #7a5a12;
}

.banner.error {
  border-color: #edd0d0;
  background: var(--destructive-tint);
  color: var(--destructive);
}

/* ── Tabs — mirror van TabsList/TabsTrigger (tint-achtergrond, pill-active-state) ── */
.tabs-list {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--brand-tint);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.tabs-list button {
  border: none;
  background: transparent;
  color: var(--secondary-foreground);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tabs-list button.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.tabs-list .count-badge {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.4;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Card — mirror van Card/CardContent (rounded-xl, ring-1, py-4/px-4 bij size=sm) ── */
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
}

.card .card-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card .card-hint {
  margin-top: 2px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}

.card .row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.card .row:first-of-type { border-top: none; padding-top: 0; }

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* ── Inputs — mirror van [data-slot=input]/[data-slot=textarea] ── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}

textarea { resize: vertical; min-height: 60px; font-family: monospace; }

.field-row {
  display: flex;
  gap: 8px;
}

.field-row > * { flex: 1; }

/* ── Kleur-invoer ── */
.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-field .swatch {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.color-field input[type="text"] {
  font-family: monospace;
  font-size: 12px;
}

/* ── Knoppen — mirror van de pill-buttons (bg-brand, rounded-full, text-white) ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--brand-tint);
  color: var(--brand);
}
.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: var(--muted);
  color: var(--muted-foreground);
}

.btn-sm { padding: 5px 12px; font-size: 11.5px; }

/* ── Badges — mirror van Badge (rounded-4xl pill, secondary tint) ── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.badge.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}

.badge.warn { background: #fbf3df; color: #7a5a12; }
.badge.live { background: var(--brand); color: #fff; }

/* ── Switch (toggle) ── */
.switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.switch.on { background: var(--brand); }

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.15s ease;
}

.switch.on::after { transform: translateX(16px); }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Revisie-lijst (git-achtig) ── */
.revision-list { display: flex; flex-direction: column; gap: 8px; }

.revision-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.revision-row.is-live { border-color: var(--brand); background: var(--brand-tint); }

.revision-row .rev-id {
  font-family: monospace;
  font-size: 11.5px;
  color: var(--muted-foreground);
}

.revision-row .rev-meta {
  flex: 1;
  min-width: 0;
}

.revision-row .rev-note {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.revision-row .rev-time {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* ── Overige utility ── */
.section-list { display: flex; flex-direction: column; gap: 6px; }
.section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.section-item .count { color: var(--muted-foreground); font-size: 12px; }

.muted { color: var(--muted-foreground); }
.small { font-size: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

.footer-note {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--brand-tint);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
