/*
  InformAR Studio UI Foundation
  Doel:
  - herbruikbare basis voor alle toekomstige Studio-pagina's
  - consistente tokens, buttons, cards, statuspills, spacing en empty states
  - geen framework, alleen gewone CSS
*/

/* =========================================================
   1. Design tokens
   ========================================================= */

:root {
  /* Brand */
  --studio-ink: #1c1f3d;
  --studio-ink-2: #252a4d;

  /* Backgrounds */
  --studio-bg: #f5f7fb;
  --studio-surface: #ffffff;
  --studio-surface-soft: #f8fafd;
  --studio-surface-blue: #f1f7ff;

  /* Borders */
  --studio-border: #dfe4ee;
  --studio-border-strong: #c9d2e3;

  /* Text */
  --studio-text: #1c1f3d;
  --studio-muted: #6d7892;
  --studio-muted-2: #8791a6;

  /* Accents */
  --studio-cyan: #37d5e8;
  --studio-blue: #4f7cff;
  --studio-violet: #8b5cf6;
  --studio-mint: #35d399;
  --studio-amber: #f5b84b;
  --studio-red: #d04437;

  /* Semantic */
  --studio-success: #1f8a5b;
  --studio-success-soft: #e9f7f0;
  --studio-info: #245b89;
  --studio-info-soft: #eaf3fb;
  --studio-warning: #b66a00;
  --studio-warning-soft: #fff4df;
  --studio-danger: #b42318;
  --studio-danger-soft: #fdeceb;
  --studio-neutral-soft: #f3f5f9;

  /* Radius */
  --studio-radius-sm: 10px;
  --studio-radius-md: 16px;
  --studio-radius-lg: 24px;
  --studio-radius-xl: 32px;
  --studio-radius-pill: 999px;

  /* Shadow */
  --studio-shadow-soft: 0 10px 30px rgba(28, 31, 61, 0.08);
  --studio-shadow-card: 0 16px 38px rgba(28, 31, 61, 0.12);
  --studio-shadow-hero: 0 24px 60px rgba(28, 31, 61, 0.11);

  /* Spacing */
  --studio-space-1: 4px;
  --studio-space-2: 8px;
  --studio-space-3: 12px;
  --studio-space-4: 16px;
  --studio-space-5: 24px;
  --studio-space-6: 32px;
  --studio-space-7: 48px;
  --studio-space-8: 64px;

  /* Layout */
  --studio-page-max: 1180px;
  --studio-content-max: 860px;

  /* Typography */
  --studio-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================================
   2. Page shell en basis
   ========================================================= */

html,
body {
  font-family: var(--studio-font);
  background: var(--studio-bg);
  color: var(--studio-text);
}

main,
.main,
.container {
  width: min(100% - 40px, var(--studio-page-max));
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 680px) {
  main,
  .main,
  .container {
    width: min(100% - 24px, var(--studio-page-max));
  }
}

h1,
h2,
h3 {
  color: var(--studio-ink);
}

p {
  color: inherit;
}

.muted {
  color: var(--studio-muted);
}

/* =========================================================
   3. Topbar
   ========================================================= */

.topbar,
header.topbar,
.site-header,
.navbar,
.header-bar {
  background:
    radial-gradient(circle at 75% 0%, rgba(55, 213, 232, 0.12), transparent 28%),
    linear-gradient(90deg, #1c1f3d 0%, #20264a 55%, #243056 100%) !important;
}

.nav a,
.nav-account {
  border-radius: var(--studio-radius-pill);
  padding: 7px 10px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.10);
  text-decoration: none;
}

.nav-account {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

/* =========================================================
   4. Sections
   ========================================================= */

.studio-section,
.dashboard-section {
  margin-top: var(--studio-space-6);
}

.studio-section-header,
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--studio-space-4);
  margin-bottom: var(--studio-space-4);
}

.studio-section-header h2,
.section-header h2 {
  margin: 0;
}

.studio-section-kicker,
.section-kicker {
  margin: 0 0 var(--studio-space-2);
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.studio-section-intro,
.section-intro {
  max-width: 720px;
  margin: var(--studio-space-2) 0 0;
  color: var(--studio-muted);
}

@media (max-width: 780px) {
  .studio-section-header,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   5. Cards
   ========================================================= */

.studio-card,
.card,
.panel,
.job-card,
.artifact-card,
.workflow-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  box-shadow: var(--studio-shadow-soft);
}

.studio-card {
  padding: var(--studio-space-5);
}

.studio-card--soft {
  background: var(--studio-surface-soft);
  box-shadow: none;
}

.studio-card--interactive,
.workflow-card {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}

.studio-card--interactive:hover,
.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--studio-shadow-card);
  border-color: rgba(55, 213, 232, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  .studio-card--interactive,
  .workflow-card,
  .studio-card--interactive:hover,
  .workflow-card:hover {
    transition: none;
    transform: none;
  }
}

/* =========================================================
   6. Buttons
   ========================================================= */

.studio-button,
.button-link,
button,
input[type="submit"],
input[type="button"] {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--studio-radius-pill);
  border: 1px solid var(--studio-ink);
  background: var(--studio-ink);
  color: #ffffff !important;
  font-family: var(--studio-font);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  padding: 11px 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.studio-button:hover,
.button-link:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: #171a33 !important;
  border-color: #171a33 !important;
  color: #ffffff !important;
  text-decoration: none;
}

.studio-button--secondary,
.secondary-link {
  background: #ffffff !important;
  color: var(--studio-ink) !important;
  border-color: var(--studio-border-strong) !important;
}

.studio-button--secondary:hover,
.secondary-link:hover {
  background: var(--studio-surface-blue) !important;
  color: var(--studio-ink) !important;
  border-color: var(--studio-ink) !important;
}

.studio-button--full,
.workflow-cta {
  width: 100%;
  min-height: 44px;
  white-space: nowrap;
}

.disabled-button,
.button-disabled,
.disabled-button:hover,
.button-disabled:hover {
  background: var(--studio-neutral-soft) !important;
  border-color: var(--studio-border) !important;
  color: var(--studio-muted) !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* =========================================================
   7. Statuspills
   ========================================================= */

.studio-pill,
.status-pill,
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: var(--studio-radius-pill);
  border: 1px solid var(--studio-border);
  background: var(--studio-neutral-soft);
  color: var(--studio-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.status-active,
.status-actief,
.status-running,
.status-queued,
.status-info {
  background: var(--studio-info-soft) !important;
  color: var(--studio-info) !important;
  border-color: #c7dff3 !important;
}

.status-completed,
.status-success {
  background: var(--studio-success-soft) !important;
  color: var(--studio-success) !important;
  border-color: #bfe8d2 !important;
}

.status-warning,
.status-needs_confirmation,
.status-attention,
.status-queue {
  background: var(--studio-warning-soft) !important;
  color: var(--studio-warning) !important;
  border-color: #f2d19a !important;
}

.status-failed,
.status-error,
.status-danger {
  background: var(--studio-danger-soft) !important;
  color: var(--studio-danger) !important;
  border-color: #f5c3bf !important;
}

.status-beta {
  background: #f0edff !important;
  color: #5742a8 !important;
  border-color: #d9d1ff !important;
}

.status-roadmap,
.status-soon {
  background: var(--studio-neutral-soft) !important;
  color: #667085 !important;
  border-color: #d8dce8 !important;
}

/* =========================================================
   8. Empty states
   ========================================================= */

.studio-empty,
.empty-state {
  padding: var(--studio-space-6);
  text-align: center;
  border-radius: var(--studio-radius-lg);
}

.studio-empty h3,
.empty-state h3 {
  margin-top: 0;
  margin-bottom: var(--studio-space-2);
}

.studio-empty p,
.empty-state p {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  color: var(--studio-muted);
}

/* =========================================================
   9. Forms en filters
   ========================================================= */

input,
textarea,
select {
  font-family: var(--studio-font);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(55, 213, 232, 0.32);
  outline-offset: 3px;
}

/* =========================================================
   10. Job detail foundation
   ========================================================= */

.job-hero-panel {
  border-radius: var(--studio-radius-xl);
  border: 1px solid var(--studio-border);
  box-shadow: var(--studio-shadow-hero);
}

.progress-card,
.progress-card-enhanced {
  border-radius: var(--studio-radius-lg);
  border: 1px solid var(--studio-border);
  box-shadow: var(--studio-shadow-soft);
}

.step-timeline li,
.progress-steps li {
  border-radius: var(--studio-radius-md);
}

/* =========================================================
   11. Responsive helpers
   ========================================================= */

.studio-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--studio-space-5);
}

.studio-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--studio-space-5);
}

.studio-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--studio-space-5);
}

@media (max-width: 1100px) {
  .studio-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .studio-grid-2,
  .studio-grid-3,
  .studio-grid-4 {
    grid-template-columns: 1fr;
  }

  .studio-button--full,
  .workflow-cta {
    white-space: normal;
  }
}

/* =========================================================
   Retention / storage status on job detail
   ========================================================= */

.storage-policy-panel {
  margin-bottom: var(--studio-space-6);
}

.storage-policy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--studio-space-4);
  margin-bottom: var(--studio-space-4);
}

.storage-policy-header h2 {
  margin: 0;
}

.storage-policy-message {
  max-width: 860px;
  color: var(--studio-muted);
  margin-bottom: var(--studio-space-5);
}

.storage-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--studio-space-3);
  margin-bottom: var(--studio-space-5);
}

.storage-policy-item {
  border: 1px solid rgba(223, 228, 238, 0.72);
  border-radius: var(--studio-radius-md);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-4);
}

.storage-policy-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.storage-policy-item strong {
  color: var(--studio-ink);
  font-size: 18px;
}

.storage-policy-next,
.storage-policy-warning {
  border-radius: var(--studio-radius-md);
  padding: var(--studio-space-4);
  margin-bottom: var(--studio-space-4);
}

.storage-policy-next {
  background: var(--studio-info-soft);
  border: 1px solid #c7dff3;
}

.storage-policy-warning {
  background: var(--studio-warning-soft);
  border: 1px solid #f2d19a;
}

.storage-policy-next strong,
.storage-policy-warning strong {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-ink);
}

.storage-policy-next p,
.storage-policy-warning p {
  margin: 0;
  color: var(--studio-muted);
}

.storage-policy-note {
  margin-bottom: 0;
  font-size: 13px;
}

@media (max-width: 900px) {
  .storage-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .storage-policy-header {
    flex-direction: column;
  }

  .storage-policy-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Jobs overview storage / retention columns
   ========================================================= */

.storage-cell,
.retention-cell {
  min-width: 118px;
}

.storage-cell strong,
.retention-cell strong {
  display: block;
  color: var(--studio-ink);
  font-weight: 850;
  white-space: nowrap;
}

.storage-cell small,
.retention-cell small {
  display: block;
  margin-top: 3px;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.retention-cell strong {
  font-size: 13px;
}

@media (max-width: 900px) {
  .jobs-table {
    min-width: 920px;
  }
}

/* =========================================================
   Jobs overview layout fix
   ========================================================= */

.jobs-table-compact {
  table-layout: fixed;
  width: 100%;
}

.jobs-table-compact th:nth-child(1),
.jobs-table-compact td:nth-child(1) {
  width: 110px;
}

.jobs-table-compact th:nth-child(2),
.jobs-table-compact td:nth-child(2) {
  width: 180px;
}

.jobs-table-compact th:nth-child(3),
.jobs-table-compact td:nth-child(3) {
  width: 170px;
}

.jobs-table-compact th:nth-child(4),
.jobs-table-compact td:nth-child(4) {
  width: 220px;
}

.jobs-table-compact th:nth-child(5),
.jobs-table-compact td:nth-child(5) {
  width: auto;
}

.jobs-table-compact th:nth-child(6),
.jobs-table-compact td:nth-child(6) {
  width: 90px;
}

.job-name-cell strong,
.module-cell,
.file-cell {
  overflow-wrap: anywhere;
}

.status-storage-cell {
  vertical-align: top;
}

.job-storage-meta {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.job-storage-meta span:first-child {
  color: var(--studio-ink);
  font-size: 13px;
  font-weight: 900;
}

.table-action {
  text-align: right;
}

@media (max-width: 900px) {
  .jobs-table-compact {
    min-width: 940px;
  }
}

/* =========================================================
   Account pages v0.1
   ========================================================= */

.nav-account {
  text-decoration: none;
}

.account-hero {
  margin-bottom: var(--studio-space-6);
}

.account-grid {
  align-items: start;
}

.account-detail-list {
  display: grid;
  gap: var(--studio-space-3);
  margin: var(--studio-space-5) 0 0;
}

.account-detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--studio-space-4);
  padding: var(--studio-space-3) 0;
  border-bottom: 1px solid var(--studio-border);
}

.account-detail-list dt {
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-detail-list dd {
  margin: 0;
  color: var(--studio-ink);
  font-weight: 750;
}

.settings-placeholder-list {
  display: grid;
  gap: var(--studio-space-3);
  margin-top: var(--studio-space-5);
}

.settings-placeholder-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--studio-space-4);
  padding: var(--studio-space-3) var(--studio-space-4);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: var(--studio-surface-soft);
}

.settings-placeholder-list span {
  color: var(--studio-muted);
  font-size: 13px;
  font-weight: 750;
}

.account-note {
  margin-top: var(--studio-space-5);
  margin-bottom: 0;
}

.account-session-list {
  display: grid;
  gap: var(--studio-space-3);
}

.account-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--studio-space-4);
  padding: var(--studio-space-4);
  border-radius: var(--studio-radius-md);
  background: var(--studio-surface-soft);
  border: 1px solid var(--studio-border);
}

.account-session-row div {
  display: grid;
  gap: 4px;
}

.account-session-row span {
  color: var(--studio-muted);
  font-size: 13px;
}

.admin-accounts-table {
  width: 100%;
}

.admin-accounts-table td,
.admin-accounts-table th {
  vertical-align: top;
}

@media (max-width: 760px) {
  .account-detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .settings-placeholder-list div,
  .account-session-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-accounts-table {
    min-width: 760px;
  }
}

/* =========================================================
   Admin account usage v0.1
   ========================================================= */

.admin-account-stats {
  margin-bottom: var(--studio-space-6);
}

.admin-account-stats h2 {
  margin: 0 0 var(--studio-space-2);
  font-size: clamp(24px, 2.5vw, 34px);
}

.admin-muted-line {
  display: block;
  margin-top: 4px;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-accounts-table th,
.admin-accounts-table td {
  white-space: nowrap;
}

.admin-accounts-table td:nth-child(2),
.admin-accounts-table td:nth-child(3) {
  white-space: normal;
}

.admin-accounts-table {
  min-width: 980px;
}

/* =========================================================
   Account polish
   ========================================================= */

.account-hero .hero-actions {
  margin-bottom: var(--studio-space-5);
}

.account-hero .hero-status-card {
  margin-top: var(--studio-space-2);
}

.admin-accounts-table td {
  line-height: 1.35;
}

/* =========================================================
   Hero spacing + account alignment polish
   ========================================================= */

/* Meer ademruimte onder knoppen in hero-blokken, o.a. /jobs, /account en /admin/accounts */
.hero .hero-actions,
.hero-panel .hero-actions,
.jobs-hero .hero-actions,
.account-hero .hero-actions {
  margin-top: var(--studio-space-5);
  margin-bottom: var(--studio-space-6) !important;
}

/* Statuskaart niet tegen de knoppen aan laten plakken */
.hero .hero-actions + .hero-status-card,
.hero-panel .hero-actions + .hero-status-card,
.jobs-hero .hero-actions + .hero-status-card,
.account-hero .hero-actions + .hero-status-card {
  margin-top: var(--studio-space-4) !important;
}

/* Als de statuskaart als aside direct na de tekstkolom komt */
.hero-status-card {
  margin-top: var(--studio-space-4);
}

/* Accountgegevens netter als label/waarde-lijst */
.account-detail-list {
  display: grid !important;
  gap: 0 !important;
  margin-top: var(--studio-space-5) !important;
}

.account-detail-list > div {
  display: grid !important;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: var(--studio-space-4) !important;
  padding: 14px 0 !important;
  border-bottom: 1px solid var(--studio-border) !important;
}

.account-detail-list > div:first-child {
  border-top: 1px solid var(--studio-border);
}

.account-detail-list dt {
  margin: 0 !important;
  color: var(--studio-muted) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.account-detail-list dd {
  margin: 0 !important;
  color: var(--studio-ink) !important;
  font-weight: 750 !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

/* Voorkeurenkaart beter leesbaar */
.settings-placeholder-list {
  display: grid !important;
  gap: var(--studio-space-3) !important;
}

.settings-placeholder-list > div {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto !important;
  align-items: center !important;
  gap: var(--studio-space-4) !important;
}

/* Sessieregel netter scheiden */
.account-session-row div {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: baseline !important;
}

.account-session-row div strong::after {
  content: "·";
  margin-left: 6px;
  color: var(--studio-muted);
}

@media (max-width: 760px) {
  .account-detail-list > div,
  .settings-placeholder-list > div {
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: 4px !important;
  }

  .account-session-row div {
    display: grid !important;
    gap: 4px !important;
  }

  .account-session-row div strong::after {
    content: "";
    margin: 0;
  }
}

/* =========================================================
   Role-aware job access v0.1
   ========================================================= */

.hero-status-card p {
  max-width: 520px;
}

.module-cell,
.job-name-cell,
.file-cell {
  line-height: 1.28;
}

/* =========================================================
   Empty states and access denied polish
   ========================================================= */

.empty-state-friendly {
  padding: clamp(32px, 5vw, 64px);
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--studio-space-4);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface-blue);
  border: 1px solid #c7dff3;
  font-size: 24px;
}

.empty-state-friendly h3 {
  margin-bottom: var(--studio-space-2);
}

.empty-state-friendly p {
  margin-bottom: var(--studio-space-5);
}

.access-denied-hero {
  margin-bottom: var(--studio-space-6);
}

/* =========================================================
   Audit logging / management access banner
   ========================================================= */

.management-access-panel {
  margin-bottom: var(--studio-space-5);
  background: var(--studio-warning-soft);
  border-color: #f2d19a;
}

.management-access-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--studio-space-5);
}

.management-access-content h2 {
  margin: 0 0 var(--studio-space-2);
}

.management-access-content p {
  max-width: 760px;
  margin: 0;
  color: var(--studio-muted);
}

@media (max-width: 720px) {
  .management-access-content {
    flex-direction: column;
  }
}

/* =========================================================
   Support diagnostics v0.1
   ========================================================= */

.support-diagnostics-panel {
  margin-bottom: var(--studio-space-6);
}

.support-diagnostics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--studio-space-4);
  margin-bottom: var(--studio-space-4);
}

.support-diagnostics-header h2 {
  margin: 0;
}

.support-warning {
  margin-bottom: var(--studio-space-5);
  padding: var(--studio-space-4);
  border-radius: var(--studio-radius-md);
  background: var(--studio-warning-soft);
  border: 1px solid #f2d19a;
}

.support-warning strong {
  display: block;
  margin-bottom: 4px;
}

.support-warning p {
  margin: 0;
  color: var(--studio-muted);
}

.support-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--studio-space-3);
  margin-bottom: var(--studio-space-5);
}

.support-diagnostics-grid > div {
  padding: var(--studio-space-4);
  border-radius: var(--studio-radius-md);
  border: 1px solid var(--studio-border);
  background: var(--studio-surface-soft);
}

.support-diagnostics-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-diagnostics-grid strong {
  display: block;
  color: var(--studio-ink);
  font-size: 16px;
  font-weight: 900;
}

.support-diagnostics-grid small {
  display: block;
  margin-top: 4px;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.3;
}

.support-details {
  margin-top: var(--studio-space-3);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: var(--studio-surface);
  overflow: hidden;
}

.support-details summary {
  cursor: pointer;
  padding: var(--studio-space-4);
  font-weight: 850;
  color: var(--studio-ink);
  background: var(--studio-surface-soft);
}

.support-log-pre {
  margin: 0;
  padding: var(--studio-space-4);
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: var(--studio-ink);
}

.support-process-list {
  display: grid;
  gap: var(--studio-space-3);
  padding: var(--studio-space-4);
}

.support-process-list div {
  display: grid;
  gap: 4px;
}

.support-process-list span {
  color: var(--studio-muted);
  font-size: 12px;
}

.support-process-list code,
.support-path-list code {
  white-space: pre-wrap;
  word-break: break-word;
}

.support-path-list {
  margin: 0;
  padding: var(--studio-space-4) var(--studio-space-6);
}

@media (max-width: 1050px) {
  .support-diagnostics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .support-diagnostics-header {
    flex-direction: column;
  }

  .support-diagnostics-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Supportdiagnose UX polish
   ========================================================= */

#supportdiagnose {
  scroll-margin-top: 96px;
}

.inline-anchor-link {
  color: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-anchor-link:hover {
  text-decoration-thickness: 2px;
}

.support-diagnostics-header .status-roadmap {
  background: var(--studio-surface-soft);
  border-color: var(--studio-border);
  color: var(--studio-muted);
}

/* =========================================================
   Failed job progress header polish
   ========================================================= */

/* De statuskaart rechtsboven blijft zichtbaar.
   Alleen het kleine 'failed'-label in de voortgangskaart verbergen. */
.progress-card .progress-header .status-pill.status-failed,
.progress-card-enhanced .progress-header .status-pill.status-failed {
  display: none !important;
}


/* =========================================================
   Kaart naar 3D module v0.1
   ========================================================= */

.workflow-map-to-3d .workflow-visual,
.visual-map-3d {
  position: relative;
  overflow: hidden;
}

.visual-map-3d {
  background:
    radial-gradient(circle at 70% 30%, rgba(55, 213, 232, 0.24), transparent 26%),
    linear-gradient(135deg, #eef7ff 0%, #f7fbff 55%, #edf4ff 100%);
}

.visual-map-3d .map-layer {
  position: absolute;
  border-radius: 18px;
  transform: rotate(-10deg) skewX(-8deg);
  border: 1px solid rgba(28, 31, 61, 0.12);
}

.visual-map-3d .map-layer-base {
  width: 58%;
  height: 46%;
  left: 19%;
  top: 28%;
  background:
    linear-gradient(90deg, rgba(28, 31, 61, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(28, 31, 61, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(53, 211, 153, 0.18), rgba(79, 124, 255, 0.12));
  background-size: 18px 18px, 18px 18px, auto;
}

.visual-map-3d .map-layer-photo {
  width: 48%;
  height: 36%;
  left: 28%;
  top: 20%;
  background:
    radial-gradient(circle at 25% 30%, rgba(53, 211, 153, 0.35), transparent 18%),
    radial-gradient(circle at 70% 62%, rgba(245, 184, 75, 0.32), transparent 20%),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 28px rgba(28, 31, 61, 0.12);
}

.visual-map-3d .map-terrain-grid {
  position: absolute;
  left: 30%;
  top: 54%;
  display: grid;
  grid-template-columns: repeat(3, 18px);
  gap: 5px;
  transform: rotate(-10deg) skewX(-8deg);
}

.visual-map-3d .map-terrain-grid i {
  display: block;
  width: 18px;
  height: 12px;
  border-radius: 4px;
  background: rgba(28, 31, 61, 0.72);
  box-shadow: 0 -5px 0 rgba(55, 213, 232, 0.35);
}

.visual-map-3d .map-pin {
  position: absolute;
  left: 54%;
  top: 23%;
  width: 16px;
  height: 16px;
  background: var(--studio-ink);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 8px 18px rgba(28, 31, 61, 0.25);
}

.visual-map-3d .map-pin::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: #ffffff;
}

.map-to-3d-panel .panel-header {
  align-items: flex-start;
}

.map-to-3d-form {
  display: grid;
  gap: var(--studio-space-5);
}

.map-to-3d-form .field {
  display: grid;
  gap: 8px;
}

.map-to-3d-form label {
  color: var(--studio-ink);
  font-weight: 850;
}

.map-to-3d-form input,
.map-to-3d-form select {
  width: 100%;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: #ffffff;
  color: var(--studio-ink);
  padding: 12px 13px;
  font: inherit;
}

.map-to-3d-form .field p {
  margin: 0;
}

.map-preview-placeholder {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: var(--studio-space-5);
  align-items: center;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-5);
}

.map-preview-art {
  position: relative;
  min-height: 180px;
  border-radius: var(--studio-radius-lg);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(28, 31, 61, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(28, 31, 61, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 35% 35%, rgba(53, 211, 153, 0.28), transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(79, 124, 255, 0.20), transparent 24%),
    #ffffff;
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  border: 1px solid var(--studio-border);
}

.map-preview-pin {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 22px;
  height: 22px;
  background: var(--studio-ink);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 12px 22px rgba(28, 31, 61, 0.24);
}

.map-preview-pin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: #ffffff;
}

.map-preview-placeholder h3 {
  margin: 0 0 var(--studio-space-2);
}

.map-preview-placeholder p {
  margin: 0;
  color: var(--studio-muted);
}

.detail-choice-card {
  cursor: pointer;
  min-height: 190px;
  position: relative;
}

.detail-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.detail-choice-card.is-selected {
  border-color: rgba(28, 31, 61, 0.58);
  box-shadow: 0 0 0 3px rgba(28, 31, 61, 0.11), var(--studio-shadow-soft);
}

.detail-choice-card.is-recommended {
  background:
    radial-gradient(circle at 100% 0%, rgba(55, 213, 232, 0.10), transparent 35%),
    #ffffff;
}

.panel-inner {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-4);
}

.panel-inner summary {
  cursor: pointer;
  color: var(--studio-ink);
  font-weight: 850;
}

.panel-inner .details {
  margin-top: var(--studio-space-4);
}

.map-to-3d-dev-note {
  margin: 0;
}

.notification-banner {
  display: flex;
  align-items: center;
  gap: var(--studio-space-3);
  border-radius: var(--studio-radius-md);
  padding: var(--studio-space-4);
}

.notification-info {
  background: var(--studio-info-soft);
  border: 1px solid #c7dff3;
  color: var(--studio-info);
}

@media (max-width: 760px) {
  .map-preview-placeholder {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Kaart naar 3D resultaat v0.2
   ========================================================= */

.map-to-3d-output-panel {
  margin-bottom: var(--studio-space-6);
}

.map-result-preview {
  margin: var(--studio-space-5) 0;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background:
    radial-gradient(circle at 80% 20%, rgba(55, 213, 232, 0.08), transparent 30%),
    var(--studio-surface-soft);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-result-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
}

.map-download-grid {
  margin-top: var(--studio-space-5);
}

.map-result-details {
  margin-top: var(--studio-space-5);
}


/* =========================================================
   Kaart naar 3D rechthoeken v0.3
   ========================================================= */

.shape-choice-card {
  cursor: pointer;
  min-height: 170px;
  position: relative;
}

.shape-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shape-choice-card.is-selected {
  border-color: rgba(28, 31, 61, 0.58);
  box-shadow: 0 0 0 3px rgba(28, 31, 61, 0.11), var(--studio-shadow-soft);
}

.shape-fields[hidden] {
  display: none !important;
}

.shape-fields {
  display: grid;
  gap: var(--studio-space-4);
}


/* =========================================================
   Kaart naar 3D kaartselectie v0.4
   ========================================================= */

.map-selector-panel {
  display: grid;
  gap: var(--studio-space-4);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-5);
}

.map-selector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--studio-space-4);
}

.map-selector-header h2 {
  margin: 0 0 var(--studio-space-2);
}

.map-selector-header p {
  margin: 0;
}

.map-search-field {
  display: grid;
  gap: var(--studio-space-2);
}

.map-search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--studio-space-3);
}

.map-search-controls .button-link {
  margin-top: 0;
}

.map-search-results {
  display: grid;
  gap: var(--studio-space-2);
  margin-top: var(--studio-space-2);
}

.map-search-result {
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: 4px;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: #ffffff !important;
  color: var(--studio-ink) !important;
  padding: var(--studio-space-3) var(--studio-space-4);
  text-align: left;
}

.map-search-result:hover {
  background: var(--studio-surface-blue) !important;
  color: var(--studio-ink) !important;
  border-color: rgba(55, 213, 232, 0.55) !important;
}

.map-search-result span {
  color: var(--studio-muted);
  font-size: 13px;
  font-weight: 650;
}

.map-to-3d-map {
  width: 100%;
  height: min(62vh, 560px);
  min-height: 380px;
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-lg);
  overflow: hidden;
  background: #eef3f8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.map-missing-note {
  padding: var(--studio-space-5);
}

.map-selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--studio-space-3);
}

.map-selection-summary div {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: #ffffff;
  padding: var(--studio-space-4);
}

.map-selection-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-selection-summary strong {
  color: var(--studio-ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .map-selector-header,
  .map-search-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .map-search-controls .button-link {
    width: 100%;
  }

  .map-selection-summary {
    grid-template-columns: 1fr;
  }

  .map-to-3d-map {
    min-height: 320px;
  }
}


/* =========================================================
   Kaart naar 3D schaalhandvatten v0.5
   ========================================================= */

.map-resize-handle {
  width: 14px !important;
  height: 14px !important;
  border: 2px solid #1c1f3d;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(28, 31, 61, 0.24);
}

.map-resize-handle:hover {
  background: #37d5e8;
}


/* =========================================================
   Kaart naar 3D zoekdropdown v0.6
   ========================================================= */

.map-search-field {
  position: relative;
}

.map-search-results {
  position: absolute;
  z-index: 1400;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  max-height: 360px;
  overflow-y: auto;
  padding: var(--studio-space-2);
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--studio-shadow-card);
}

.map-search-results[hidden] {
  display: none !important;
}

.map-search-loading {
  margin: 0;
  padding: var(--studio-space-3);
}

.map-search-result + .map-search-result {
  margin-top: var(--studio-space-2);
}


/* =========================================================
   Kaart naar 3D preview cleanup fallback v0.1
   ========================================================= */

.map-result-preview-missing {
  display: none;
  max-width: 620px;
  padding: var(--studio-space-5);
  text-align: center;
}

.map-result-preview.is-missing {
  min-height: 220px;
}

.map-result-preview.is-missing .map-result-preview-missing {
  display: block;
}

.map-result-preview-missing strong {
  display: block;
  margin-bottom: var(--studio-space-2);
  color: var(--studio-ink);
}

.map-result-preview-missing p {
  margin: 0;
  color: var(--studio-muted);
}


/* =========================================================
   Kaart naar 3D extra lagen v0.1
   ========================================================= */

.extra-layer-panel {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-5);
}

.toggle-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: var(--studio-space-4);
  align-items: center;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: var(--studio-radius-pill);
  background: #d8dce8;
  border: 1px solid var(--studio-border-strong);
  transition: background 160ms ease, border-color 160ms ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(28, 31, 61, 0.22);
  transition: transform 160ms ease;
}

.toggle-row input:checked + .toggle-switch {
  background: var(--studio-ink);
  border-color: var(--studio-ink);
}

.toggle-row input:checked + .toggle-switch::after {
  transform: translateX(22px);
}

.toggle-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--studio-ink);
}

.toggle-row small {
  display: block;
  color: var(--studio-muted);
  line-height: 1.45;
}

.extra-layer-note {
  margin: var(--studio-space-4) 0 0;
}


/* =========================================================
   Kaart naar 3D resultaat uit resultaat.json v0.1
   ========================================================= */

.map-result-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--studio-space-3);
  margin: var(--studio-space-5) 0;
}

.map-result-summary-grid div {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  background: var(--studio-surface-soft);
  padding: var(--studio-space-4);
}

.map-result-summary-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-result-summary-grid strong {
  color: var(--studio-ink);
  font-size: 16px;
}

.map-result-warning-list {
  align-items: flex-start;
  margin: var(--studio-space-5) 0;
}

.map-result-warning-list p {
  margin: 0 0 6px;
}

.map-result-warning-list p:last-child {
  margin-bottom: 0;
}

.map-buildings-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--studio-space-5);
  margin: var(--studio-space-5) 0;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(55, 213, 232, 0.10), transparent 34%),
    var(--studio-surface-soft);
  padding: var(--studio-space-5);
}

.map-buildings-summary h3 {
  margin: 0 0 var(--studio-space-2);
}

.map-buildings-summary p {
  margin: 0;
  color: var(--studio-muted);
}

.map-buildings-summary small {
  max-width: 360px;
  color: var(--studio-muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .map-result-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-buildings-summary {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .map-result-summary-grid {
    grid-template-columns: 1fr;
  }
}

