/* === Packaging Journal CI === */
:root {
  --pj-green: #24a27f;
  --pj-green-hover: #1d8a6b;
  --pj-terracotta: #C1674F;
  --pj-bg: #F7F5F2;
  --pj-text: #1a1a1a;
  --pj-muted: #666;
  --pj-border: #ddd;
  --pj-white: #fff;
  --pj-error: #d32f2f;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--pj-bg);
  color: var(--pj-text);
  line-height: 1.5;
}

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 700; }

/* --- Login --- */
.screen { min-height: 100vh; }

#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--pj-white);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  text-align: center;
  width: 360px;
}

.login-card h1 { color: var(--pj-green); margin-bottom: .25rem; }
.login-card p { color: var(--pj-muted); margin-bottom: 1.5rem; }

.login-card input {
  display: block;
  width: 100%;
  padding: .65rem .8rem;
  margin-bottom: .75rem;
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .95rem;
}

.login-card button {
  width: 100%;
  padding: .7rem;
  background: var(--pj-green);
  color: var(--pj-white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:hover { background: var(--pj-green-hover); }

.error { color: var(--pj-error); font-size: .85rem; margin-top: .5rem; }

/* --- Header --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--pj-white);
  border-bottom: 2px solid var(--pj-green);
}
header h1 { font-size: 1.25rem; color: var(--pj-green); }
.header-right { display: flex; align-items: center; gap: .75rem; }
#user-name { font-weight: 500; }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0;
  background: var(--pj-white);
  border-bottom: 1px solid var(--pj-border);
  padding: 0 2rem;
}

/* Main nav (top level) */
.tabs-main {
  background: var(--pj-bg);
  padding: 0 2rem;
  border-bottom: 1px solid var(--pj-border);
}
.tab-main {
  padding: .9rem 1.5rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  color: var(--pj-muted);
  text-decoration: none;
  display: inline-block;
}
.tab-main:hover { color: var(--pj-text); }
.tab-main.active {
  color: var(--pj-green);
  border-bottom-color: var(--pj-green);
}

/* Submenu (Messe-TV steps) */
.tabs-sub {
  background: var(--pj-white);
  padding: 0 2rem;
}

.tab {
  padding: .75rem 1.25rem;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  color: var(--pj-muted);
}
.tab:hover { color: var(--pj-text); }
.tab.active {
  color: var(--pj-green);
  border-bottom-color: var(--pj-green);
}

/* --- Main --- */
main { padding: 2rem; max-width: 1200px; margin: 0 auto; }

.tab-content[hidden] { display: none; }
.tab-content h2 { margin-bottom: 1.25rem; }

/* --- Buttons --- */
.btn-primary {
  padding: .6rem 1.5rem;
  background: var(--pj-green);
  color: var(--pj-white);
  border: none;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:hover { background: var(--pj-green-hover); }

.btn-sm {
  padding: .4rem .8rem;
  background: var(--pj-white);
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .8rem;
  cursor: pointer;
}
.btn-sm:hover { border-color: var(--pj-green); color: var(--pj-green); }
.btn-sm.btn-primary { background: var(--pj-green); color: var(--pj-white); border-color: var(--pj-green); }
.btn-sm.btn-primary:hover { background: var(--pj-green-hover); color: var(--pj-white); }

/* --- Glossary Tags --- */
.glossary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
  min-height: 2rem;
}
.glossary-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  background: rgba(36,162,127,.1);
  border: 1px solid rgba(36,162,127,.25);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--pj-text);
}
.glossary-tag .tag-context {
  font-size: .7rem;
  color: var(--pj-muted);
}
.glossary-tag .tag-del {
  cursor: pointer;
  color: var(--pj-muted);
  font-size: .7rem;
  margin-left: .15rem;
}
.glossary-tag .tag-del:hover { color: var(--pj-error); }
.glossary-stats { margin-top: .5rem; }

.iw-glossary-quick {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--pj-border);
}

.iw-step-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pj-border);
}

.iw-upload-done {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  background: var(--pj-white);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: .5rem;
}
.iw-upload-done span:not(.badge) {
  font-size: .85rem;
  color: var(--pj-muted);
}

/* --- Config Sections --- */
.config-section {
  background: var(--pj-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.config-section h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--pj-border);
}
.config-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.config-section-header h3 { flex: 1; }

/* Messen Grid */
.messen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.messe-card {
  background: var(--pj-bg);
  border: 2px solid var(--pj-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.messe-card:hover {
  border-color: var(--pj-green);
}
.messe-card.active {
  border-color: var(--pj-green);
  box-shadow: 0 0 0 2px rgba(36,162,127,.15);
}
.messe-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  margin-bottom: .25rem;
}
.messe-card .messe-meta {
  font-size: .8rem;
  color: var(--pj-muted);
}
.messe-card-actions {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}
.messe-card .badge {
  margin-left: .5rem;
}

.config-actions {
  margin-top: .5rem;
}

.hint {
  font-size: .8rem;
  color: var(--pj-muted);
  margin-bottom: .75rem;
}

.jingle-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
}
.jingle-upload input[type="file"] {
  font-size: .85rem;
}

/* --- Forms --- */
.form-row { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 500; }
.form-row input, .form-row select {
  padding: .5rem .6rem;
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .9rem;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background: var(--pj-white);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--pj-border); }
th { background: var(--pj-bg); font-size: .8rem; text-transform: uppercase; color: var(--pj-muted); }
td { font-size: .9rem; }

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed var(--pj-border);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: var(--pj-muted);
  cursor: pointer;
  transition: border-color .2s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--pj-green);
  color: var(--pj-green);
}

/* --- Card Grid --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }
.card {
  background: var(--pj-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border-left: 4px solid var(--pj-green);
}
.card.approved { border-left-color: var(--pj-terracotta); }
.card h3 { font-size: 1rem; margin-bottom: .5rem; }

/* --- Status Badges --- */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-waiting  { background: #eee; color: #666; }
.badge-cutting  { background: #fff3cd; color: #856404; }
.badge-transcribing { background: #d1ecf1; color: #0c5460; }
.badge-ai       { background: #e8daef; color: #6c3483; }
.badge-done     { background: #d4edda; color: #155724; }
.badge-error    { background: #f8d7da; color: #721c24; }
.badge-skipped  { background: #eee; color: #999; }
.badge-running  { background: #fff3cd; color: #856404; }

/* --- Format Add Row --- */
.format-add-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: .5rem;
}
.format-add-row input {
  padding: .45rem .6rem;
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .85rem;
  flex: 1;
  max-width: 280px;
}

/* Format table jingle cells */
.jingle-cell { display: flex; align-items: center; gap: .5rem; }
.jingle-cell .badge { font-size: .7rem; }
.jingle-cell input[type="file"] { font-size: .75rem; max-width: 140px; }

/* === Interview Editor === */

/* Wizard Steps */
.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background: var(--pj-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.wizard-step {
  flex: 1;
  padding: .75rem 1rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  color: var(--pj-muted);
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.wizard-step.active {
  color: var(--pj-green);
  border-bottom-color: var(--pj-green);
  background: rgba(36,162,127,.05);
}
.wizard-step.done {
  color: var(--pj-green);
  border-bottom-color: var(--pj-green);
}
.wizard-step.clickable {
  cursor: pointer;
}
.wizard-step.clickable:hover {
  background: rgba(36,162,127,.08);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--pj-border);
  color: var(--pj-muted);
  font-size: .75rem;
  font-weight: 700;
  margin-right: .35rem;
}
.wizard-step.active .step-num,
.wizard-step.done .step-num {
  background: var(--pj-green);
  color: var(--pj-white);
}

/* Steps visibility */
.iw-step { display: none; }
.iw-step.active { display: block; }

/* Drop zone large */
.drop-zone-lg { padding: 4rem 3rem; font-size: 1rem; }
.drop-zone-lg small { font-size: .8rem; display: block; margin-top: .5rem; }

/* Context form */
.iw-context-form {
  margin-top: 1.5rem;
  background: var(--pj-white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.iw-context-form .form-row label { flex: 1; min-width: 200px; }

/* Video Player */
.iw-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.iw-player-wrap video {
  width: 100%;
  max-height: 500px;
  display: block;
}

/* Trim Controls */
.iw-trim-controls {
  background: var(--pj-white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.trim-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.trim-row label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 500;
  flex: 1;
  min-width: 250px;
}
.trim-input-group {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.time-input {
  width: 100px;
  padding: .45rem .5rem;
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: monospace;
  text-align: center;
}
.trim-info {
  margin-bottom: 1rem;
  font-size: .9rem;
  color: var(--pj-muted);
}

/* Processing Status */
.iw-processing-status {
  background: var(--pj-white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.proc-step {
  padding: .75rem 0;
  border-bottom: 1px solid var(--pj-border);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.proc-step:last-child { border-bottom: none; }
.proc-icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }
.proc-step.done { color: var(--pj-green); }
.proc-step.running { color: #856404; }
.proc-step.error { color: var(--pj-error); }
.proc-step.skipped { color: #999; }

/* Review Layout */
.iw-review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .iw-review-layout { grid-template-columns: 1fr; }
}
.iw-review-video {
  position: sticky;
  top: 1rem;
}
.iw-review-video video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}
.iw-review-form {
  background: var(--pj-white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 80vh;
  overflow-y: auto;
}
.review-field {
  padding: 0 0 1.5rem 0;
}
.review-field + .review-field {
  border-top: 1px solid var(--pj-border);
  padding-top: 1.5rem;
}
.review-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--pj-text);
}
.review-title-input {
  font-size: 1rem !important;
  padding: 0.6rem 0.75rem !important;
}
.review-desc-input {
  font-size: 0.95rem !important;
  padding: 0.6rem 0.75rem !important;
  line-height: 1.6;
  min-height: 120px;
}
.review-blog-input {
  font-size: 0.95rem !important;
  padding: 0.75rem !important;
  line-height: 1.6;
  min-height: 400px;
}
.review-summary {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--pj-green);
  padding: 0.3rem 0;
}
.review-summary:hover { color: var(--pj-green-hover); }
.iw-review-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pj-border);
}
.full-width {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--pj-border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: 'DM Sans', sans-serif;
}
textarea.full-width { resize: vertical; }

/* SRT Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal-content {
  background: var(--pj-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.srt-modal-content {
  width: 80vw;
  height: 70vh;
  max-width: 1200px;
  padding: 1.5rem;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.modal-header h3 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--pj-text);
  padding: 0 0.25rem;
  line-height: 1;
}
.modal-close:hover { color: var(--pj-terracotta); }
.srt-modal-content .srt-editor {
  flex: 1;
  min-height: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pj-border);
}
.modal-footer .hint { margin-right: auto; }
.iw-review-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .5rem;
}

/* Publish Status */
.iw-publish-status {
  background: var(--pj-white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 1.5rem;
}
.pub-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--pj-border);
}
.pub-row:last-child { border-bottom: none; }
.pub-row > span:first-child { min-width: 180px; font-weight: 500; font-size: .9rem; }

/* Progress Bar */
.progress-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--pj-border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--pj-green);
  border-radius: 4px;
  width: 0%;
  transition: width .3s;
}

/* Publish Links */
.iw-publish-links {
  background: var(--pj-white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.pub-link-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  font-size: .9rem;
}
.pub-link-row a { color: var(--pj-green); word-break: break-all; }

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 420px;
}
.toast {
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  animation: toast-in .25s ease-out;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.toast-body { flex: 1; }
.toast-success { background: #d4edda; color: #155724; border-left: 4px solid var(--pj-green); }
.toast-error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--pj-error); }
.toast-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.toast-warn    { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* === Subtitle Style Editor === */
.subtitle-style-editor {
  padding: 1rem 0;
}
.subtitle-style-editor h4 {
  margin: 0 0 0.75rem 0;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
}
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.style-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--pj-text);
}
.style-grid input[type="number"],
.style-grid select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}
.style-grid input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}
.ss-preview-box {
  background: #111;
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
}
.ss-preview-text {
  display: inline-block;
  font-weight: 500;
}
.fmt-style-row td {
  padding: 0 1rem 1rem 1rem;
  border-top: none;
}
.fmt-style-toggle {
  color: var(--pj-green);
}

/* === SRT Editor === */
.srt-editor {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre;
  tab-size: 4;
}
.btn-accent {
  background: var(--pj-terracotta);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-accent:hover { background: #a8563f; }
.btn-accent:disabled { opacity: 0.6; cursor: wait; }

/* Publish Success */
.publish-success-box {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.publish-success-msg {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2e7d32;
  margin: 0 0 1rem 0;
}
.vimeo-url-display { margin-top: 0.75rem; }
.url-copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.url-copy-row input { flex: 1; }

/* Archive */
.archive-card {
  background: var(--pj-white);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.archive-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  gap: 1rem;
}
.archive-card-header:hover { background: var(--pj-bg); }
.archive-meta strong { display: block; margin-bottom: 0.15rem; }
.archive-meta-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.archive-card-detail {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--pj-border);
}
.archive-field {
  padding: 0.75rem 0;
}
.archive-field + .archive-field {
  border-top: 1px solid var(--pj-border);
}
.archive-field p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.review-field-buttons {
  border-top: none !important;
  padding-top: 0 !important;
}

/* Processing Slots */
.proc-slot-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--pj-border);
}
.proc-slot-time { font-weight: 600; min-width: 50px; }
.proc-slot-title { flex: 1; }
.proc-slot-error { color: var(--pj-terracotta); font-size: 0.8rem; }

/* Review Cards */
.review-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.card-grid { display: flex; flex-direction: column; gap: 1rem; }
.review-card {
  background: var(--pj-white);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.review-card-approved { border-left: 4px solid var(--pj-green); }
.review-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; background: var(--pj-bg);
}
.review-card-time { font-weight: 600; }
.review-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.review-card-actions {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid var(--pj-border); justify-content: flex-end;
}

/* Publish Slots */
.pub-slot-row {
  background: var(--pj-white);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.pub-slot-info { flex: 1; font-weight: 500; }
.pub-slot-url { display: flex; gap: 0.5rem; width: 100%; align-items: center; }
.pub-slot-url input { flex: 1; }
.pub-slot-progress { display: flex; gap: 0.5rem; align-items: center; width: 100%; }
.pub-slot-progress .progress-bar { flex: 1; }

/* Badge variants */
.badge-running { background: #fff3cd; color: #856404; }
.badge-ai { background: #e8daef; color: #6c3483; }

/* Tab numbers */
.tab-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--pj-border); color: var(--pj-text);
  font-size: 0.7rem; font-weight: 600; margin-right: 4px;
}
.tab.active .tab-num { background: var(--pj-green); color: #fff; }

/* Tab groups */
.tab-group-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #999; font-weight: 600; padding: 0 0.5rem; align-self: center;
}
.tab-divider {
  width: 1px; height: 24px; background: var(--pj-border);
  margin: 0 0.25rem; align-self: center;
}

/* Tab back/forward navigation */
.tab-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--pj-border);
}
.tab-nav-prev { opacity: 0.7; }
.tab-nav-prev:hover { opacity: 1; }

/* Review trim cards */
.review-card-trim { border-left: 4px solid var(--pj-terracotta); }
.review-video { width: 100%; max-height: 400px; background: #000; border-radius: var(--radius); }
.trim-controls { margin-top: 0.75rem; }

/* Thumbnail grid */
.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.thumb-candidate { width: 100%; border-radius: var(--radius); cursor: pointer; border: 3px solid transparent; transition: border-color 0.2s; }
.thumb-candidate:hover { border-color: var(--pj-green); opacity: 0.9; }
.thumb-selected { border-color: var(--pj-green) !important; box-shadow: 0 0 0 2px var(--pj-green); }

/* Thumbnail Grid */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.thumb-grid img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.15s;
}
.thumb-grid img:hover {
  border-color: var(--pj-green);
  opacity: 0.9;
}
.thumb-grid img.thumb-selected {
  border-color: var(--pj-green);
  box-shadow: 0 0 0 2px var(--pj-green);
}
.thumb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Thumbnail Lightbox */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: var(--pj-white);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1;
}
.lightbox-footer {
  margin-top: 1rem;
}
