/* ════════════════════════════════════════════════════════════
   PresentTool™ — Ad & Content Studio · mockup stylesheet
   Self-contained. Mirrors /mockups/ui-redesign-2026-web tokens
   but adds studio-specific surfaces (canvas, timeline, copilot).
   ──────────────────────────────────────────────────────────── */

: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;
}

: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; }

/* MOCKUP flag ------------------------------------------------- */
.mockup-flag {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: repeating-linear-gradient(45deg,#1A1A1A,#1A1A1A 12px,#232220 12px,#232220 24px);
  color: #E9C9A8; font-family: var(--pt-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-align: center; padding: 5px 12px;
  border-top: 1px solid var(--pt-border-strong);
}

/* 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-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; }
.btn .cost {
  margin-left: 4px; font-family: var(--pt-mono); font-size: 10.5px; opacity: 0.9;
  background: rgba(255,255,255,0.18); border-radius: 4px; padding: 1px 5px;
}
.btn-outline .cost, .btn-ghost .cost { background: var(--pt-accent-soft); color: var(--pt-primary); }

/* 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); }
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--pt-border-strong); background: var(--pt-surface-0);
  color: var(--pt-text-muted);
}
.chip.sel { background: var(--pt-accent-soft); color: var(--pt-primary); border-color: var(--pt-accent-mid); }
.chip svg { width: 13px; height: 13px; }

.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); }
.seg { display: inline-flex; background: var(--pt-surface-2); border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--pt-text-muted); font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 5px; }
.seg button.on { background: var(--pt-surface-0); color: var(--pt-text); box-shadow: var(--pt-shadow-card); }

/* Asset thumbs ------------------------------------------------ */
.thumb {
  position: relative; border-radius: var(--pt-radius-md); overflow: hidden;
  border: 1px solid var(--pt-border); background: var(--pt-surface-2);
  aspect-ratio: 16/10;
}
.thumb.sel { outline: 2px solid var(--pt-primary); outline-offset: 1px; }
.thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--pt-text-subtle); }
.thumb .ph svg { width: 26px; height: 26px; opacity: 0.5; }
.thumb .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff; font-size: 10.5px; padding: 14px 8px 6px; font-family: var(--pt-mono);
}
.thumb .badge {
  position: absolute; top: 6px; left: 6px; font-size: 9.5px; font-family: var(--pt-mono);
  background: rgba(0,0,0,0.55); color: #fff; padding: 2px 6px; border-radius: 4px;
}

/* gradient placeholder "renders" so the mockup looks alive */
.ph-render { background:
  radial-gradient(120% 80% at 70% 20%, rgba(200,149,108,0.55), transparent 60%),
  linear-gradient(160deg,#caa078,#8b6b47 40%,#3a2f24); }
.ph-clay { background: linear-gradient(160deg,#e9e7e2,#cfccc4 60%,#b6b2a8); }
.ph-night { background: linear-gradient(160deg,#2a3550,#1a2238 60%,#0f1626); }
.ph-mood { background:
  conic-gradient(from 200deg at 50% 50%, #c8956c, #8b4513, #6b7a52, #3a4a55, #c8956c); }

/* Timeline / storyboard -------------------------------------- */
.timeline { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 14px; }
.tl-shot {
  flex: 0 0 200px; border: 1px solid var(--pt-border); border-radius: var(--pt-radius-md);
  background: var(--pt-surface-0); overflow: hidden;
}
.tl-shot .frame { aspect-ratio: 16/9; position: relative; }
.tl-shot .meta { padding: 9px 11px; }
.tl-shot .meta .t { font-size: 12.5px; font-weight: 600; }
.tl-shot .meta .d { font-size: 11px; color: var(--pt-text-muted); margin-top: 2px; line-height: 1.4; }
.tl-shot .meta .row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.tl-time { position: absolute; top: 6px; right: 6px; font-family: var(--pt-mono); font-size: 9.5px;
  background: rgba(0,0,0,0.5); color: #fff; padding: 2px 6px; border-radius: 4px; }
.tl-arrow { flex: 0 0 auto; align-self: center; color: var(--pt-text-subtle); }
.tl-arrow svg { width: 18px; height: 18px; }

/* Copilot chat ------------------------------------------------ */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-stream { flex: 1; overflow-y: auto; padding: 4px 2px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 92%; }
.msg .av { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .av { background: var(--pt-surface-3); color: var(--pt-text-muted); }
.msg.bot .av { background: linear-gradient(135deg,var(--pt-primary),var(--pt-secondary)); color: #fff; }
.msg .av svg { width: 15px; height: 15px; }
.msg .bubble { background: var(--pt-surface-2); border: 1px solid var(--pt-border); border-radius: var(--pt-radius-md); padding: 10px 13px; font-size: 13px; line-height: 1.55; }
.msg.user .bubble { background: var(--pt-accent-soft); border-color: var(--pt-accent-mid); }
.msg .bubble b { color: var(--pt-primary); }
.chat-compose { border-top: 1px solid var(--pt-border); padding-top: 12px; margin-top: 12px; }
.chat-compose .box { display: flex; gap: 8px; align-items: flex-end; }

/* Progress bar ------------------------------------------------ */
.bar { height: 6px; border-radius: 999px; background: var(--pt-surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg,var(--pt-primary),var(--pt-secondary)); border-radius: 999px; }

/* 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; }

/* 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); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--pt-surface-1); }

/* Phone / canvas frames -------------------------------------- */
.device-9x16 { width: 220px; aspect-ratio: 9/16; border-radius: 22px; border: 6px solid #1a1a1a; overflow: hidden; position: relative; box-shadow: var(--pt-shadow-pop); }
.device-16x9 { width: 100%; aspect-ratio: 16/9; border-radius: var(--pt-radius-md); overflow: hidden; position: relative; border: 1px solid var(--pt-border); }
.device-1x1 { width: 100%; aspect-ratio: 1/1; border-radius: var(--pt-radius-md); overflow: hidden; position: relative; border: 1px solid var(--pt-border); }
.cap-overlay {
  position: absolute; left: 8%; right: 8%; bottom: 12%; text-align: center;
  font-weight: 700; font-size: 15px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6); line-height: 1.3;
}
.endcard {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px;
  color: #fff; text-align: center;
}
.endcard .logo { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,0.16); display: grid; place-items: center; }
.endcard .logo svg { width: 26px; height: 26px; }
.endcard .l1 { font-family: var(--pt-serif); font-weight: 600; font-size: 18px; }
.endcard .l2 { font-family: var(--pt-mono); font-size: 11px; opacity: 0.9; }

/* 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; }
.kbd { font-family: var(--pt-mono); font-size: 11px; background: var(--pt-surface-2); border: 1px solid var(--pt-border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; }

/* 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; }

@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; }
}
