/* SULONG STUDIO — guided studio redesign layer
   Preserves the original DOM IDs and generator logic. */
:root {
  --dp-shell: #050507;
  --dp-sidebar: #08080c;
  --dp-surface: #101014;
  --dp-surface-2: #15151b;
  --dp-border: rgba(255,255,255,.09);
  --dp-border-strong: rgba(255,255,255,.16);
  --dp-text: #f7f7fb;
  --dp-muted: #94949f;
  --dp-accent: #ff315d;
  --dp-accent-2: #8a6cff;
  --dp-success: #35d49a;
  --dp-warning: #f6b84a;
  --dp-sidebar-w: 248px;
}

body.dp-redesign {
  padding: 0 !important;
  background:
    radial-gradient(circle at 72% -10%, rgba(138,108,255,.10), transparent 34%),
    radial-gradient(circle at 28% 0%, rgba(255,49,93,.08), transparent 30%),
    var(--dp-shell) !important;
}

body.dp-redesign::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 70%);
}

.dp-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10020;
  width: var(--dp-sidebar-w);
  padding: 22px 16px;
  border-right: 1px solid var(--dp-border);
  background: rgba(8,8,12,.96);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--dp-border);
}

.dp-sidebar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(255,49,93,.14);
}

.dp-sidebar-brand strong {
  display: block;
  color: var(--dp-text);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1.7px;
  line-height: 1;
}

.dp-sidebar-brand span {
  display: block;
  margin-top: 5px;
  color: var(--dp-muted);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.dp-nav { display: grid; gap: 6px; }
.dp-nav-label {
  padding: 0 10px 6px;
  color: #5f5f6b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.dp-nav-button {
  appearance: none;
  width: 100%;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  padding: 11px 12px !important;
  background: transparent !important;
  color: #a7a7b2 !important;
  display: flex !important;
  align-items: center;
  gap: 11px;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: left;
  box-shadow: none !important;
  animation: none !important;
}

.dp-nav-button:hover {
  color: var(--dp-text) !important;
  border-color: var(--dp-border) !important;
  background: rgba(255,255,255,.035) !important;
  transform: none !important;
}

.dp-nav-button.active {
  color: #fff !important;
  border-color: rgba(255,49,93,.25) !important;
  background: linear-gradient(135deg, rgba(255,49,93,.17), rgba(138,108,255,.08)) !important;
  box-shadow: inset 3px 0 0 var(--dp-accent) !important;
}

.dp-nav-icon {
  width: 22px;
  text-align: center;
  font-size: 16px;
}

.dp-sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid var(--dp-border);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.dp-sidebar-footer strong {
  display: block;
  color: var(--dp-success);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dp-sidebar-footer span {
  display: block;
  margin-top: 6px;
  color: #777783;
  font-size: 10px;
  line-height: 1.5;
}

body.dp-redesign > .container {
  position: relative !important;
  z-index: 2 !important;
  width: calc(100% - var(--dp-sidebar-w));
  max-width: none !important;
  margin: 0 0 0 var(--dp-sidebar-w) !important;
  padding: 18px 28px 54px;
}

body.dp-redesign header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  min-height: 64px;
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--dp-border);
  border-radius: 15px;
  background: rgba(10,10,14,.84);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 55px rgba(0,0,0,.30);
}

body.dp-redesign header::after { display: none; }
body.dp-redesign header .logo { width: 42px; height: 42px; }
body.dp-redesign header h1 { font-size: 22px; animation: none; letter-spacing: 2px; }
body.dp-redesign header .subtitle { font-size: 9px; color: #71717c; }

.dp-top-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--dp-border);
  border-radius: 999px;
  color: #a9a9b4;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.dp-top-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dp-success);
  box-shadow: 0 0 12px rgba(53,212,154,.55);
}

.dp-mobile-menu {
  display: none !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.04) !important;
  border: 1px solid var(--dp-border) !important;
  color: #fff !important;
}

.dp-view-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 18px;
  padding: 18px 4px 2px;
}

.dp-eyebrow {
  color: var(--dp-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.dp-view-hero h2 {
  margin: 7px 0 4px;
  color: var(--dp-text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -.8px;
}

.dp-view-hero p {
  max-width: 680px;
  color: var(--dp-muted);
  font-size: 12px;
  line-height: 1.65;
}

.dp-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.dp-primary-action,
.dp-secondary-action {
  min-width: 120px;
  padding: 11px 15px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  animation: none !important;
}
.dp-primary-action {
  border: 1px solid rgba(255,49,93,.42) !important;
  background: linear-gradient(135deg, #ff315d, #c71f62) !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(255,49,93,.16) !important;
}
.dp-secondary-action {
  border: 1px solid var(--dp-border) !important;
  background: rgba(255,255,255,.035) !important;
  color: #d5d5dc !important;
  box-shadow: none !important;
}

.dp-stepbar {
  display: none;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 7px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--dp-border);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}

body[data-dp-view="create"] .dp-stepbar { display: grid; }

.dp-step {
  position: relative;
  padding: 10px 10px 10px 34px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #6f6f7a !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .5px;
  text-align: left;
  box-shadow: none !important;
  animation: none !important;
}

.dp-step span {
  position: absolute;
  left: 9px;
  top: 50%;
  translate: 0 -50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  font-size: 8px;
}

.dp-step.active {
  color: #fff !important;
  border-color: rgba(255,49,93,.26) !important;
  background: rgba(255,49,93,.08) !important;
}
.dp-step.active span {
  border-color: var(--dp-accent);
  background: var(--dp-accent);
  box-shadow: 0 0 16px rgba(255,49,93,.36);
}
.dp-step.complete { color: #aaaab5 !important; }
.dp-step.complete span { border-color: rgba(53,212,154,.5); color: var(--dp-success); }

.dp-step-context {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 16px;
  padding: 13px 15px;
  border-left: 3px solid var(--dp-accent);
  border-radius: 0 11px 11px 0;
  background: linear-gradient(90deg, rgba(255,49,93,.07), rgba(255,255,255,.015));
}
body[data-dp-view="create"] .dp-step-context { display: flex; }
.dp-step-context strong { color: #f0f0f5; font-size: 11px; }
.dp-step-context p { margin-top: 3px; color: #83838e; font-size: 10px; }
.dp-step-controls { display: flex; gap: 7px; flex-shrink: 0; }
.dp-step-controls button { padding: 7px 11px !important; font-size: 9px !important; animation: none !important; }

body.dp-redesign .layout {
  grid-template-columns: minmax(340px, .82fr) minmax(470px, 1.18fr);
  gap: 18px;
}

body.dp-redesign .panel {
  border: 1px solid var(--dp-border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(20,20,26,.96), rgba(10,10,14,.98));
  box-shadow: 0 20px 60px rgba(0,0,0,.24);
  animation: none;
}

body.dp-redesign .panel::before {
  opacity: .5;
  background: linear-gradient(90deg, var(--dp-accent), var(--dp-accent-2), transparent 72%);
}

body.dp-redesign .panel h2 {
  margin-bottom: 16px;
  color: #f5f5f8;
  font-size: 10px;
  letter-spacing: 1.5px;
}

body.dp-redesign .panel h2 .num {
  color: var(--dp-accent);
  border-color: rgba(255,49,93,.3);
  background: rgba(255,49,93,.08);
}

body.dp-redesign input,
body.dp-redesign textarea,
body.dp-redesign select {
  border-color: var(--dp-border) !important;
  background-color: #0a0a0f !important;
}
body.dp-redesign input:focus,
body.dp-redesign textarea:focus,
body.dp-redesign select:focus {
  border-color: rgba(255,49,93,.55) !important;
  box-shadow: 0 0 0 3px rgba(255,49,93,.08) !important;
}

body.dp-redesign .big-btn {
  animation: none;
  background: linear-gradient(135deg, #ff315d, #bf235e) !important;
  border-color: rgba(255,255,255,.10) !important;
  box-shadow: 0 15px 38px rgba(255,49,93,.18) !important;
}

body.dp-redesign .mode-tab-bar {
  border: 1px solid var(--dp-border);
  border-radius: 14px;
  padding: 7px;
  background: rgba(255,255,255,.018);
}
body.dp-redesign .mode-btn {
  border-radius: 10px !important;
  animation: none !important;
}
body.dp-redesign .mode-btn.active {
  background: linear-gradient(135deg, rgba(255,49,93,.16), rgba(138,108,255,.09)) !important;
  border-color: rgba(255,49,93,.27) !important;
}

.dp-dashboard {
  display: none;
  gap: 16px;
}
body[data-dp-view="dashboard"] .dp-dashboard { display: grid; }

.dp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}

.dp-stat-card,
.dp-dashboard-card {
  border: 1px solid var(--dp-border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(20,20,26,.88), rgba(10,10,14,.96));
  box-shadow: 0 18px 50px rgba(0,0,0,.20);
}

.dp-stat-card { padding: 17px; }
.dp-stat-label { color: #777783; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.dp-stat-value { margin-top: 10px; color: #f8f8fb; font-size: 27px; font-weight: 900; letter-spacing: -1px; }
.dp-stat-note { margin-top: 6px; color: #666672; font-size: 9px; }

.dp-dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 16px;
}
.dp-dashboard-card { padding: 20px; }
.dp-dashboard-card h3 { color: #f5f5f8; font-size: 14px; }
.dp-dashboard-card > p { margin-top: 7px; color: #777783; font-size: 10px; line-height: 1.6; }

.dp-pipeline {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 8px;
  margin-top: 18px;
}
.dp-pipeline-item {
  position: relative;
  padding: 14px 10px;
  border: 1px solid var(--dp-border);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
  text-align: center;
}
.dp-pipeline-item b { display:block; color:#fff; font-size:10px; }
.dp-pipeline-item span { display:block; margin-top:5px; color:#666672; font-size:8px; }
.dp-pipeline-item:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -9px;
  top: 50%;
  translate: 0 -50%;
  color: #555560;
  z-index: 2;
}

.dp-quick-list { display:grid; gap:8px; margin-top:16px; }
.dp-quick-item {
  width:100%;
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px !important;
  border:1px solid var(--dp-border) !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.025) !important;
  color:#d8d8df !important;
  font-size:10px !important;
  box-shadow:none !important;
  animation:none !important;
}
.dp-quick-item:hover { border-color: var(--dp-border-strong) !important; transform:none !important; }
.dp-quick-item span:last-child { color:var(--dp-accent); }

.dp-settings-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(246,184,74,.22);
  border-radius: 11px;
  background: rgba(246,184,74,.055);
  color: #bcb19a;
  font-size: 10px;
  line-height: 1.6;
}
.dp-settings-notice strong { color: #f6c96e; }

/* View routing */
body.dp-redesign .panel,
body.dp-redesign .mode-tab-bar,
body.dp-redesign .calendar-panel { display: none; }

body[data-dp-view="create"] [data-dp-role="preview"] { display: block; }
body[data-dp-view="create"][data-dp-step="idea"] .mode-tab-bar,
body[data-dp-view="create"][data-dp-step="idea"] [data-dp-role="config"] { display: block; }
body[data-dp-view="create"][data-dp-step="script"] [data-dp-role="script"] { display: block; }
body[data-dp-view="create"][data-dp-step="visuals"] [data-dp-role="assets"] { display: block; }
body[data-dp-view="create"][data-dp-step="voice"] [data-dp-role="config"],
body[data-dp-view="create"][data-dp-step="voice"] [data-dp-role="assets"] { display: block; }
body[data-dp-view="create"][data-dp-step="video"] [data-dp-role="assets"],
body[data-dp-view="create"][data-dp-step="video"] [data-dp-role="export"] { display: block; }
body[data-dp-view="create"][data-dp-step="publish"] [data-dp-role="bundle"],
body[data-dp-view="create"][data-dp-step="publish"] [data-dp-role="export"] { display: block; }

body[data-dp-view="projects"] [data-dp-role="projects"] { display: block; }
body[data-dp-view="settings"] [data-dp-role="settings"] { display: block; }
body[data-dp-view="calendar"] [data-dp-role="calendar"] { display: block; }

body[data-dp-view="dashboard"] .layout,
body[data-dp-view="dashboard"] > .container > .calendar-panel,
body[data-dp-view="projects"] .layout > div:first-child,
body[data-dp-view="settings"] .layout > div:first-child,
body[data-dp-view="calendar"] .layout { display: none !important; }

body[data-dp-view="projects"] .layout,
body[data-dp-view="settings"] .layout { grid-template-columns: minmax(0,900px); }
body[data-dp-view="projects"] .layout > div:last-child,
body[data-dp-view="settings"] .layout > div:last-child { width: 100%; }

body[data-dp-view="calendar"] > .container > [data-dp-role="calendar"] { display:block; max-width:1100px; }

/* Step-specific emphasis */
body[data-dp-step="visuals"] [data-dp-role="assets"] details { open: true; }
body[data-dp-step="voice"] [data-dp-role="config"] .big-btn,
body[data-dp-step="voice"] [data-dp-role="config"] .row-3 > .field:first-child,
body[data-dp-step="voice"] [data-dp-role="config"] .row-3 > .field:nth-child(n+3) { opacity:.34; }
body[data-dp-step="voice"] [data-dp-role="config"] .row-3 > .field:nth-child(2) {
  opacity:1;
  border:1px solid rgba(255,49,93,.2);
  border-radius:10px;
  padding:10px;
  background:rgba(255,49,93,.045);
}

.dp-redesign-badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-left:8px;
  padding:4px 7px;
  border:1px solid rgba(138,108,255,.25);
  border-radius:999px;
  color:#aa9cff;
  font-size:8px;
  font-weight:800;
  letter-spacing:.8px;
  text-transform:uppercase;
}

@media (max-width: 1120px) {
  :root { --dp-sidebar-w: 214px; }
  body.dp-redesign .layout { grid-template-columns: minmax(300px,.8fr) minmax(400px,1.2fr); }
  .dp-stepbar { overflow-x:auto; grid-template-columns:repeat(6,130px); }
  .dp-stat-grid { grid-template-columns:repeat(2,1fr); }
  .dp-pipeline { grid-template-columns:repeat(3,1fr); }
  .dp-pipeline-item:nth-child(3)::after { display:none; }
}

@media (max-width: 860px) {
  .dp-sidebar {
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 24px 0 70px rgba(0,0,0,.55);
  }
  body.dp-nav-open .dp-sidebar { transform: translateX(0); }
  body.dp-redesign > .container {
    width:100%;
    margin-left:0 !important;
    padding:12px 14px 42px;
  }
  .dp-mobile-menu { display:grid !important; place-items:center; }
  body.dp-redesign header { top:8px; }
  body.dp-redesign .layout { grid-template-columns:1fr; }
  .dp-view-hero { align-items:flex-start; flex-direction:column; }
  .dp-hero-actions { width:100%; }
  .dp-hero-actions button { flex:1; }
  .dp-dashboard-grid { grid-template-columns:1fr; }
}

@media (max-width: 560px) {
  body.dp-redesign header .brand-text .subtitle { display:none; }
  .dp-top-status { display:none; }
  .dp-stat-grid { grid-template-columns:1fr 1fr; }
  .dp-pipeline { grid-template-columns:1fr 1fr; }
  .dp-pipeline-item:nth-child(2n)::after { display:none; }
  .dp-view-hero h2 { font-size:27px; }
  .dp-view-hero p { font-size:11px; }
  .dp-step-context { align-items:flex-start; flex-direction:column; }
  .dp-step-controls { width:100%; }
  .dp-step-controls button { flex:1; }
}

/* Smart timestamp visual engine */
.visual-timing-controls {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(45, 122, 98, 0.32);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(11, 31, 27, 0.68), rgba(7, 12, 14, 0.82));
}
.visual-timing-controls .field { margin-bottom: 9px; }
.visual-timing-controls .row-2 { align-items: end; }
.visual-count-note {
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.22);
  color: #9fb7b0;
  font-size: 10px;
  line-height: 1.5;
}
.visual-generation-actions { margin-top: 10px; }
.visual-generation-actions button { width: 100%; }
.thumb { position: relative; }
.visual-scene-badge {
  position: absolute;
  left: 5px;
  bottom: 5px;
  z-index: 3;
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.76);
  border: 1px solid rgba(255,255,255,0.13);
  color: #b6d5cc;
  font: 700 8px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: .05em;
  text-align: center;
}
.visual-empty-label {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255,255,255,.25);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.scene-nav {
  max-height: 92px;
  overflow-y: auto;
  align-content: flex-start;
  scrollbar-width: thin;
}
