:root {
  --ink: #151515;
  --muted: #626a71;
  --line: #dedede;
  --panel: #ffffff;
  --surface: #f5f5f5;
  --accent: #ed1c24;
  --accent-dark: #c9161d;
  --accent-soft: #fff0f1;
  --warning: #8a5a00;
  --good: #24713b;
  --proof-width: 360px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface); }
button, input { font: inherit; }
.topbar { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:18px 30px; background:#fff; border-bottom:4px solid var(--accent); }
h1,h2,p { margin:0; }
h1 { font-size:28px; font-weight:700; letter-spacing:-0.025em; color:#111; }
h2 { font-size:18px; font-weight:650; margin-top:3px; }
.topbar p { color:var(--muted); margin-top:5px; }
.eyebrow { font-size:11px; font-weight:800; letter-spacing:.14em; color:var(--accent); }
.top-actions { display:flex; gap:10px; }
.button { border:0; border-radius:5px; padding:10px 15px; background:var(--accent); color:white; cursor:pointer; font-weight:700; }
.button:hover { background:var(--accent-dark); }
.button.secondary { background:#111; color:#fff; border:1px solid #111; }
.button.secondary:hover { background:#2b2b2b; }
.upload-strip { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:14px 30px; background:#fff; border-bottom:1px solid var(--line); }
.upload-card { min-width:0; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; border:1px dashed #aeb8c0; border-radius:12px; padding:12px 14px; cursor:pointer; background:#fbfcfc; }
.upload-card:hover { border-color:var(--accent); background:var(--accent-soft); }
.upload-card input { display:none; }
.upload-card small { display:block; color:var(--muted); margin-top:2px; }
.step { width:28px; height:28px; border-radius:4px; display:grid; place-items:center; background:var(--accent); color:#fff; font-weight:800; }
.file-name { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:13px; }
.workspace { display:grid; grid-template-columns:280px minmax(360px,1fr) var(--proof-width); gap:12px; padding:12px; min-height:670px; }
.sidebar,.viewer-panel,.proof-panel { background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.sidebar,.proof-panel { display:flex; flex-direction:column; }
.proof-panel { position:relative; min-width:280px; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 18px 14px; border-bottom:1px solid var(--line); }
.badge { flex:none; border-radius:999px; background:var(--accent-soft); color:var(--accent); padding:6px 9px; font-size:12px; font-weight:700; }
.status { padding:10px 18px; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line); }
.position-list { padding:8px; overflow:auto; }
.position-item { width:100%; display:grid; grid-template-columns:1fr auto; gap:8px; text-align:left; border:1px solid transparent; background:transparent; border-radius:10px; padding:11px 10px; cursor:pointer; color:var(--ink); }
.position-item:hover { background:#f6f8f8; }
.position-item.active { background:var(--accent-soft); border-color:#bcdde0; }
.position-name { font-weight:750; }
.position-header { grid-column:1 / -1; font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.match-dot { width:9px; height:9px; border-radius:50%; margin-top:5px; background:#b5bdc4; }
.match-dot.good { background:var(--good); }
.match-dot.bad { background:#c5221f; }
.viewer-panel { position:relative; min-height:640px; }
.viewer { position:absolute; inset:0; background:linear-gradient(#fafafa,#e7e7e7); }
.viewer canvas { width:100%; height:100%; display:block; }
.viewer-help { position:absolute; left:50%; bottom:14px; transform:translateX(-50%); background:rgba(17,17,17,.88); color:#fff; backdrop-filter:blur(4px); border:1px solid #111; border-radius:999px; padding:7px 12px; font-size:12px; white-space:nowrap; }
.proof-meta { min-height:68px; padding:12px 18px; color:var(--muted); font-size:13px; line-height:1.45; border-bottom:1px solid var(--line); }
.canvas-wrap { padding:12px; overflow:auto; flex:1; display:flex; justify-content:center; align-items:flex-start; background:#e9edef; }
#pdfCanvas { max-width:100%; height:auto; background:white; box-shadow:0 3px 18px rgba(0,0,0,.12); }
.text-link { color:var(--accent); text-decoration:none; font-size:13px; font-weight:700; }
.text-link.disabled { opacity:.35; pointer-events:none; }
footer { padding:0 30px 20px; color:var(--muted); font-size:12px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns:250px 1fr; }
  .proof-panel { grid-column:1 / -1; min-height:500px; }
}
@media (max-width: 760px) {
  .topbar { align-items:flex-start; flex-direction:column; padding:20px; }
  .upload-strip { grid-template-columns:1fr; padding:12px 20px; }
  .workspace { grid-template-columns:1fr; padding:8px; }
  .viewer-panel { min-height:480px; }
  .sidebar { max-height:none; }
  .file-name { max-width:120px; }
}

.position-item.highlight-off { background:#f6f8f8; border-color:var(--line); }
.highlight-state { grid-column:1 / -1; min-height:14px; font-size:11px; font-weight:700; color:var(--accent); }
.position-item.highlight-off .highlight-state { color:var(--muted); }
.proof-actions { display:flex; align-items:center; gap:7px; }
.icon-button { min-width:32px; height:32px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--ink); cursor:pointer; font-weight:750; }
.icon-button:hover { border-color:var(--accent); background:var(--accent-soft); }
.icon-button.text-button { width:auto; padding:0 10px; font-size:12px; }
.proof-resize-handle { position:absolute; z-index:5; left:-7px; top:0; bottom:0; width:14px; cursor:col-resize; touch-action:none; }
.proof-resize-handle::after { content:""; position:absolute; left:6px; top:46%; width:2px; height:46px; border-radius:2px; background:#b9c2c8; }
.proof-resize-handle:hover::after, body.resizing-proof .proof-resize-handle::after { background:var(--accent); }
body.resizing-proof { cursor:col-resize; user-select:none; }
.workspace.proof-collapsed { grid-template-columns:280px minmax(360px,1fr); }
.workspace.proof-collapsed .proof-panel { display:none; }
.show-proof-button { position:absolute; z-index:4; top:14px; right:14px; border:1px solid var(--line); border-radius:9px; padding:9px 12px; background:rgba(255,255,255,.92); color:var(--ink); font-weight:700; cursor:pointer; }
.show-proof-button:hover { border-color:var(--accent); background:var(--accent-soft); }
@media (max-width: 1100px) {
  .proof-resize-handle { display:none; }
  .proof-actions .icon-button:not(.text-button) { display:none; }
  .workspace.proof-collapsed { grid-template-columns:250px 1fr; }
}

.sidebar-badges { display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.approval-badge { background:#f3f0ff; color:#5b43a5; }
.position-item { grid-template-columns:1fr auto auto; }
.position-decision { align-self:start; border-radius:999px; padding:3px 7px; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.position-decision.pending { background:#eef1f3; color:#69747d; }
.position-decision.approved { background:#e4f4e8; color:#137333; }
.position-decision.declined { background:#fce8e6; color:#b3261e; }
.approval-panel { padding:13px 18px; border-bottom:1px solid var(--line); background:#fbfcfc; }
.approval-copy { display:grid; grid-template-columns:1fr auto; gap:3px 12px; align-items:center; }
.approval-copy .eyebrow { grid-column:1 / -1; }
.approval-status { border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.approval-status.pending { background:#eef1f3; color:#69747d; }
.approval-status.approved { background:#e4f4e8; color:#137333; }
.approval-status.declined { background:#fce8e6; color:#b3261e; }
.approval-actions { display:grid; grid-template-columns:1fr 1fr auto; gap:7px; margin-top:11px; }
.decision-button { min-height:37px; border:1px solid var(--line); border-radius:8px; background:white; cursor:pointer; font-weight:750; }
.decision-button.approve { color:#137333; }
.decision-button.decline { color:#b3261e; }
.decision-button.clear { color:var(--muted); padding:0 10px; }
.decision-button.approve:hover, .decision-button.approve.selected { border-color:#6eb27c; background:#e4f4e8; }
.decision-button.decline:hover, .decision-button.decline.selected { border-color:#e3948d; background:#fce8e6; }
.decision-button:disabled { opacity:.4; cursor:not-allowed; }


/* Gielissen brand system */
.brand-lockup { display:flex; align-items:center; min-width:0; gap:20px; }
.brand-logo { width:290px; max-width:38vw; height:auto; display:block; }
.brand-divider { width:1px; align-self:stretch; min-height:56px; background:#d5d5d5; }
.product-title { min-width:0; }
.product-title p { white-space:nowrap; }
.sidebar,.viewer-panel,.proof-panel { border-radius:6px; }
.upload-card { border-radius:6px; }
.position-item { border-radius:5px; }
.position-item.active { border-left:4px solid var(--accent); }
.badge { border-radius:4px; }
.text-link { color:var(--accent); }
.icon-button { border-radius:4px; }
@media (max-width: 900px) {
  .brand-logo { width:230px; max-width:55vw; }
  .brand-divider { display:none; }
  .product-title p { white-space:normal; }
}
@media (max-width: 600px) {
  .brand-lockup { align-items:flex-start; flex-direction:column; gap:10px; }
  .brand-logo { width:240px; max-width:100%; }
}

/* Project section navigation */
.project-tabs { display:flex; gap:0; padding:0 30px; background:#111; border-bottom:1px solid #333; overflow-x:auto; }
.project-tab { position:relative; border:0; border-right:1px solid #333; background:#111; color:#d5d5d5; padding:15px 22px; cursor:pointer; font-weight:750; white-space:nowrap; }
.project-tab:first-child { border-left:1px solid #333; }
.project-tab:hover { color:#fff; background:#242424; }
.project-tab.active { color:#fff; background:#242424; }
.project-tab.active::after { content:""; position:absolute; left:0; right:0; bottom:0; height:4px; background:var(--accent); }
.tab-count { display:inline-grid; place-items:center; min-width:21px; height:21px; margin-left:7px; padding:0 6px; background:var(--accent); color:#fff; border-radius:999px; font-size:11px; }
.portal-section[hidden] { display:none !important; }
.standalone-section { margin:18px 30px; padding:24px; background:#fff; border:1px solid var(--line); border-radius:6px; min-height:580px; }
.section-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.section-intro h2 { font-size:25px; margin:4px 0 7px; }
.section-intro p { color:var(--muted); max-width:720px; }
.section-status { background:var(--accent-soft); color:var(--accent); padding:7px 10px; border-radius:4px; font-size:12px; font-weight:800; }
.render-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:20px; }
.render-card { border:1px solid var(--line); padding:12px; }
.render-card h3,.selection-card h3 { margin:12px 0 4px; font-size:16px; }
.render-card p,.selection-card p { margin:0; color:var(--muted); font-size:13px; }
.render-placeholder { aspect-ratio:4/3; display:grid; place-items:center; color:#fff; font-weight:800; text-transform:uppercase; letter-spacing:.08em; background:linear-gradient(135deg,#70777d,#171717); }
.render-placeholder.interior { background:linear-gradient(135deg,#8c8c8c,#252525); }
.render-placeholder.overhead { background:linear-gradient(135deg,#555,#111); }
.section-actions { display:flex; gap:10px; margin-top:22px; }
.selection-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:20px; }
.selection-card { display:grid; grid-template-columns:90px 1fr auto; align-items:center; gap:15px; border:1px solid var(--line); padding:14px; }
.selection-card h3 { margin-top:3px; }
.selection-swatch { width:90px; height:78px; border:1px solid #ccc; }
.furniture-swatch { background:linear-gradient(135deg,#a8a8a8,#5b5b5b); }
.flooring-swatch { background:repeating-linear-gradient(90deg,#aaa 0 18px,#999 18px 20px); }
.wood-swatch { background:repeating-linear-gradient(5deg,#c8a57c 0 8px,#b68f64 8px 10px); }
.metal-swatch { background:linear-gradient(135deg,#fff,#d7d7d7); }
.selection-state { align-self:start; padding:5px 8px; font-size:10px; font-weight:800; text-transform:uppercase; border-radius:4px; }
.selection-state.pending { background:#eee; color:#666; }
.selection-state.approved { background:#e4f4e8; color:#137333; }
body.templates-mode .approval-panel, body.templates-mode .approval-badge, body.templates-mode .position-decision { display:none; }
@media (max-width:850px) { .render-grid,.selection-grid { grid-template-columns:1fr; } .project-tabs { padding:0; } .project-tab { padding:13px 16px; } .standalone-section { margin:10px; } }
