/* ════════════════════════════════════════════════════════════
   PresentTool™ — Project Studio · live stylesheet
   Copied 1-op-1 uit mockups/project-studio/studio.css (zelfde
   brand-tokens als de rest van PresentTool + Ad Studio). Zie
   mockups/project-studio/README.md voor de ontwerp-herkomst.
   ──────────────────────────────────────────────────────────── */

:root {
  --pt-primary:   #8B4513;
  --pt-secondary: #C8956C;

  --pt-text:        #1A1A1A;
  --pt-text-muted:  #6B6B6B;
  --pt-text-subtle: #9A9A95;

  --pt-bg-page:    #F8F6F1;
  --pt-surface-0:  #FFFFFF;
  --pt-surface-1:  #FAFAF8;
  --pt-surface-2:  #F4F3F0;
  --pt-surface-3:  #EEEDEA;

  --pt-accent-soft: rgba(139, 69, 19, 0.08);
  --pt-accent-mid:  rgba(139, 69, 19, 0.18);
  --pt-accent-deep: rgba(139, 69, 19, 0.40);

  --pt-success:     #2D7A4F;
  --pt-warning:     #A0722A;
  --pt-destructive: #B03A2E;
  --pt-info:        #3A6BB0;

  --pt-border:        #E5E5E0;
  --pt-border-strong: #D9D8D2;

  --pt-serif: 'Source Serif 4', Georgia, serif;
  --pt-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pt-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --pt-shadow-card:  0 1px 2px rgba(20,18,14,0.04), 0 8px 24px rgba(20,18,14,0.06);
  --pt-shadow-pop:   0 8px 24px rgba(20,18,14,0.10), 0 32px 80px rgba(20,18,14,0.18);

  --pt-radius-sm: 6px;
  --pt-radius-md: 10px;
  --pt-radius-lg: 14px;
  --pt-radius-xl: 20px;

  --pt-sidebar-w: 232px;
  --pt-topbar-h:  56px;

  /* Studio: beschikbaarheidsstatus-kleuren (unit_status) */
  --st-available: #2D7A4F;
  --st-option:    #A0722A;
  --st-sold:      #B03A2E;
}

:root[data-theme="dark"] {
  --pt-text:        #F2F0EB;
  --pt-text-muted:  #A09D96;
  --pt-text-subtle: #6B6B6B;

  --pt-bg-page:   #14120E;
  --pt-surface-0: #1C1C1A;
  --pt-surface-1: #1F1E1B;
  --pt-surface-2: #1A1A18;
  --pt-surface-3: #232220;

  --pt-border:        #2A2A28;
  --pt-border-strong: #3A3A38;

  --pt-accent-soft: rgba(200,149,108,0.12);
  --pt-accent-mid:  rgba(200,149,108,0.22);

  --pt-primary: #C8956C;
  --pt-shadow-card: 0 1px 2px rgba(0,0,0,0.30), 0 8px 24px rgba(0,0,0,0.35);
  --pt-shadow-pop:  0 8px 24px rgba(0,0,0,0.45), 0 32px 80px rgba(0,0,0,0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pt-sans);
  font-size: 14px; line-height: 1.5;
  color: var(--pt-text);
  background: var(--pt-bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11','ss01','ss03';
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--pt-primary); text-decoration: none; }
input, select, textarea { font-family: inherit; }

html.gate-pending body { visibility: hidden; }

/* App shell --------------------------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--pt-sidebar-w); flex: 0 0 var(--pt-sidebar-w);
  background: var(--pt-surface-0);
  border-right: 1px solid var(--pt-border);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 14px 12px;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--pt-border);
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg,var(--pt-primary),var(--pt-secondary));
  display: grid; place-items: center; color: #fff;
}
.brand .mark svg { width: 17px; height: 17px; }
.brand .who { line-height: 1.1; }
.brand .who .name { font-family: var(--pt-serif); font-weight: 600; font-size: 15px; }
.brand .who .sub  { font-family: var(--pt-mono); font-size: 9.5px; color: var(--pt-text-muted); letter-spacing: 0.04em; }

.nav-group-label {
  font-family: var(--pt-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pt-text-subtle);
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--pt-radius-sm);
  color: var(--pt-text-muted); font-size: 13px; font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav-item svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.85; }
.nav-item:hover { background: var(--pt-surface-2); color: var(--pt-text); text-decoration: none; }
.nav-item.active { background: var(--pt-accent-soft); color: var(--pt-primary); }
.nav-item .step { margin-left: auto; font-family: var(--pt-mono); font-size: 10px; opacity: 0.7; }
.nav-spacer { flex: 1; }

.sidebar-foot {
  border-top: 1px solid var(--pt-border); padding-top: 10px; margin-top: 10px;
  font-family: var(--pt-mono); font-size: 10px; color: var(--pt-text-subtle);
}

/* Main column ------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--pt-topbar-h); flex: 0 0 var(--pt-topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; background: var(--pt-surface-0);
  border-bottom: 1px solid var(--pt-border);
  position: sticky; top: 0; z-index: 50;
}
.topbar .crumb { font-family: var(--pt-mono); font-size: 11px; color: var(--pt-text-muted); }
.topbar .crumb b { color: var(--pt-text); font-weight: 600; }
.topbar .spring { flex: 1; }
.topbar .meter {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--pt-mono); font-size: 11px; color: var(--pt-text-muted);
  padding: 5px 10px; border: 1px solid var(--pt-border); border-radius: 999px;
}
.topbar .meter b { color: var(--pt-text); }
.topbar .meter .ind { width: 6px; height: 6px; border-radius: 50%; background: var(--pt-success); }

.content { padding: 28px 32px 96px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* Page header ------------------------------------------------- */
.page-head { margin-bottom: 26px; }
.eyebrow {
  font-family: var(--pt-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--pt-text-muted);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pt-primary); }
.h1 {
  font-family: var(--pt-serif); font-weight: 600; font-size: 30px; line-height: 1.15;
  letter-spacing: -0.018em; margin: 0 0 8px;
}
.h1 em { font-style: italic; font-weight: 500; color: var(--pt-primary); }
.lede { color: var(--pt-text-muted); max-width: 720px; font-size: 14.5px; }

.section-title {
  font-family: var(--pt-serif); font-style: italic; font-weight: 500;
  font-size: 20px; margin: 32px 0 14px; letter-spacing: -0.01em;
}

/* Cards ------------------------------------------------------- */
.card {
  background: var(--pt-surface-0); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); box-shadow: var(--pt-shadow-card);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--pt-border);
}
.card-head .ct { font-weight: 600; font-size: 14px; }
.card-head .cs { font-size: 12px; color: var(--pt-text-muted); }
.card-head .spring { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.cols { display: flex; gap: 20px; align-items: flex-start; }
.cols > .grow { flex: 1; min-width: 0; }

/* Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent; border-radius: var(--pt-radius-sm);
  padding: 8px 13px; transition: transform 0.1s, background 0.12s, border-color 0.12s;
  white-space: nowrap; color: var(--pt-text);
}
.btn svg { width: 14px; height: 14px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-primary { background: var(--pt-primary); color: #fff; border-color: var(--pt-primary); }
.btn-primary:hover { background: #6E3610; }
.btn-outline { background: transparent; border-color: var(--pt-border-strong); }
.btn-outline:hover { background: var(--pt-surface-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--pt-text-muted); }
.btn-ghost:hover { background: var(--pt-surface-2); color: var(--pt-text); }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }

/* Pills / chips ------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 500; padding: 2px 9px 2px 7px;
  border-radius: 999px; white-space: nowrap;
}
.pill .ind { width: 5px; height: 5px; border-radius: 50%; }
.pill.running { background: var(--pt-accent-soft); color: var(--pt-primary); }
.pill.running .ind { background: var(--pt-primary); animation: pulse 2s ease-out infinite; }
.pill.ok      { background: rgba(45,122,79,0.10); color: var(--pt-success); }
.pill.ok .ind { background: var(--pt-success); }
.pill.warn    { background: rgba(160,114,42,0.10); color: var(--pt-warning); }
.pill.warn .ind { background: var(--pt-warning); }
.pill.fail    { background: rgba(176,58,46,0.08); color: var(--pt-destructive); }
.pill.fail .ind { background: var(--pt-destructive); }
.pill.idle    { background: var(--pt-surface-2); color: var(--pt-text-muted); }
.pill.idle .ind { background: var(--pt-text-subtle); }
.pill.info    { background: rgba(58,107,176,0.10); color: var(--pt-info); }
.pill.info .ind { background: var(--pt-info); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(139,69,19,0.45); }
  70% { box-shadow: 0 0 0 6px rgba(139,69,19,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,69,19,0); }
}

.tag { font-family: var(--pt-mono); font-size: 10px; color: var(--pt-text-muted);
  background: var(--pt-surface-2); border-radius: 4px; padding: 2px 6px; }

/* Form bits ----------------------------------------------------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--pt-text-muted); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; background: var(--pt-surface-2); color: var(--pt-text);
  border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm);
  padding: 9px 11px; font-size: 13px;
}
.textarea { resize: vertical; min-height: 72px; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--pt-accent-mid); border-color: var(--pt-primary); }

/* Table --------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pt-text-muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--pt-border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--pt-border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--pt-surface-1); }

/* Helpers --------------------------------------------------------------- */
.muted { color: var(--pt-text-muted); }
.small { font-size: 12px; }
.mono { font-family: var(--pt-mono); }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt16{margin-top:16px;} .mt24{margin-top:24px;}
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spring { flex: 1; }
.divider { height: 1px; background: var(--pt-border); margin: 16px 0; }

/* Dropzone / intake ----------------------------------------------------- */
.dropzone {
  border: 1.5px dashed var(--pt-border-strong); border-radius: var(--pt-radius-lg);
  padding: 34px 20px; text-align: center; color: var(--pt-text-muted);
  background: var(--pt-surface-1); transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover { border-color: var(--pt-accent-mid); background: var(--pt-accent-soft); }
.dropzone.drag { border-color: var(--pt-primary); background: var(--pt-accent-soft); cursor: copy; }
.dropzone { cursor: pointer; }
.dropzone .ic { width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 12px; background: var(--pt-accent-soft); color: var(--pt-primary); display: grid; place-items: center; }
.dropzone .ic svg { width: 20px; height: 20px; }
.file-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm); background: var(--pt-surface-0);
}
.file-row .name { font-family: var(--pt-mono); font-size: 12.5px; flex: 1; }
.file-row .sz { font-size: 11px; color: var(--pt-text-subtle); }

/* Checklist --------------------------------------------------- */
.checklist { display: flex; flex-direction: column; }
.check-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--pt-border);
}
.check-item:last-child { border-bottom: 0; }
.check-item .box {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; margin-top: 1px;
  display: grid; place-items: center; border: 1.5px solid var(--pt-border-strong); color: transparent;
}
.check-item.done .box { background: var(--pt-success); border-color: var(--pt-success); color: #fff; }
.check-item.done .box svg { width: 13px; height: 13px; }
.check-item .body { flex: 1; }
.check-item .t { font-weight: 600; font-size: 13.5px; }
.check-item .d { font-size: 12.5px; color: var(--pt-text-muted); margin-top: 2px; }

/* index hub ----------------------------------------------------------- */
.hub-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.hub-card {
  display: block; padding: 20px; border: 1px solid var(--pt-border); border-radius: var(--pt-radius-lg);
  background: var(--pt-surface-0); box-shadow: var(--pt-shadow-card); transition: transform 0.12s, border-color 0.12s;
}
.hub-card:hover { transform: translateY(-2px); border-color: var(--pt-accent-mid); text-decoration: none; }
.hub-card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--pt-accent-soft); color: var(--pt-primary); display: grid; place-items: center; margin-bottom: 12px; }
.hub-card .ic svg { width: 20px; height: 20px; }
.hub-card .num { font-family: var(--pt-mono); font-size: 10px; color: var(--pt-text-subtle); letter-spacing: 0.08em; }
.hub-card .t { font-family: var(--pt-serif); font-weight: 600; font-size: 17px; margin: 3px 0 6px; color: var(--pt-text); }
.hub-card .d { font-size: 13px; color: var(--pt-text-muted); line-height: 1.5; }

/* Stat tiles -------------------------------------------------------- */
.stat { padding: 14px 16px; }
.stat .k { font-family: var(--pt-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pt-text-muted); }
.stat .v { font-family: var(--pt-serif); font-size: 26px; font-weight: 600; margin-top: 4px; }
.stat .v small { font-size: 13px; color: var(--pt-text-muted); font-family: var(--pt-sans); font-weight: 400; }

@media (max-width: 1100px) {
  .hub-grid { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .cols { flex-direction: column; }
  .grid-2, .grid-3, .grid-4, .hub-grid { grid-template-columns: 1fr; }
}
