/* app.css — VidForge app dashboard styles */
/* Extends theme.css variables — never redefines them */

/* NAV app variant */
.nav-inner--app {
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.nav-app-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--orange); background: var(--orange-dim); }

/* APP LAYOUT */
.app-main { min-height: 100vh; background: var(--bg); }
.app-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}
.page-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-intro {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 40px;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.btn-copy {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-copy:hover { background: var(--surface); }

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}
.stat-tile-number {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text);
}
.stat-tile-number.orange { color: var(--orange); }
.stat-tile-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* DASH CARD */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px;
}
.dash-card-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* CHECKLIST */
.checklist { display: flex; flex-direction: column; gap: 12px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.check-done .check-dot {
  background: var(--orange);
  border-color: var(--orange);
  position: relative;
}
.check-done .check-dot::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.check-done { color: var(--text); }
.check-pending .check-dot { border-color: rgba(255,92,26,0.4); }

/* QUICK ACTIONS */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.qa-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.qa-item:hover { border-color: var(--orange); background: var(--orange-dim); }
.qa-icon {
  width: 36px;
  height: 36px;
  background: var(--orange-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.qa-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.qa-desc { font-size: 12px; color: var(--text-muted); }

/* DATA TABLE */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.video-title { font-weight: 500; font-size: 14px; }
.video-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* BADGES */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}
.badge-platform { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.badge-published { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-planned { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.badge-filmed { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-edited { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-hook { background: var(--orange-dim); color: var(--orange); }
.badge-draft { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.badge-approved { background: rgba(34,197,94,0.12); color: #4ade80; }

/* INLINE INPUTS */
.inline-select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.inline-select:focus { outline: none; border-color: var(--orange); }

.metric-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  width: 70px;
  padding: 4px 6px;
  border-radius: 6px;
  text-align: right;
}
.metric-input:focus {
  outline: none;
  border-color: var(--border);
  background: var(--surface-2);
}

/* ICON BUTTON */
.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s;
}
.icon-btn:hover { color: var(--orange); }

/* LINK */
.link-more {
  display: inline-block;
  font-size: 13px;
  color: var(--orange);
  text-decoration: none;
  margin-top: 16px;
}
.link-more:hover { text-decoration: underline; }
.inline-link { color: var(--orange); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* PROGRESS BAR */
.progress-bar-wrap { margin-bottom: 24px; }
.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.progress-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 100px;
  transition: width 0.5s ease;
  min-width: 4px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 480px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--orange);
}
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; }
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
  display: none;
}

/* GEN FORM OUTPUT */
.gen-form { }
.divider { border: none; border-top: 1px solid var(--border); margin: 0 0 24px; }
.output-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.script-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.script-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.script-section:last-child { border-bottom: none; }
.script-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.script-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.output-actions { display: flex; gap: 10px; }

/* TWO COL */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* SCRIPTS LIST */
.scripts-list { display: flex; flex-direction: column; gap: 10px; max-height: 600px; overflow-y: auto; }
.script-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.script-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.script-topic {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-left: 6px;
}
.script-item-actions { display: flex; align-items: center; gap: 8px; }
.script-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.script-aff { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* HOOKS GRID */
.hooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.hook-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hook-number {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.hook-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.hook-template {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--orange);
}
.hook-example {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.hook-ex-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.hook-use-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  margin-top: auto;
}
.hook-use-btn:hover { text-decoration: underline; }

/* WORKFLOW */
.workflow-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.workflow-step:last-of-type { border-bottom: none; }
.wf-step-num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  padding-top: 4px;
}
.wf-step-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.wf-step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.wf-instructions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.wf-instruction {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
}
.wf-inst-num {
  min-width: 24px;
  height: 24px;
  background: var(--orange-dim);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.wf-tips { display: flex; flex-direction: column; gap: 6px; }
.wf-tip {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.wf-loop {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 40px;
  padding: 36px;
  text-align: center;
}
.wf-loop-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* EMPTY STATE */
.empty-state {
  font-size: 14px;
  color: var(--text-muted);
  padding: 20px 0;
}
.empty-state-center {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 2;
}

/* ERROR STATE */
.error-state { padding: 60px 0; }
.error-msg {
  font-size: 14px;
  color: var(--text-muted);
  margin: 12px 0 24px;
  font-family: monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

/* CODE */
code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--orange);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hooks-grid { grid-template-columns: 1fr; }
  .workflow-step { grid-template-columns: 1fr; gap: 12px; }
  .nav-app-links { display: none; }
  .app-page { padding: 32px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
