/* ============================================================
   SocialHub – Haupt-Stylesheet
   Dark Theme | Indigo Akzent | Inter Font
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f0f1a;
  --bg-2:        #1a1a2e;
  --bg-3:        #1e1e30;
  --bg-4:        #13131f;
  --border:      #2d2d45;
  --border-2:    #3a3a55;
  --text:        #e2e8f0;
  --text-muted:  #6b7280;
  --text-dim:    #9ca3af;
  --accent:      #6366f1;
  --accent-2:    #8b5cf6;
  --accent-glow: rgba(99,102,241,.25);
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --info:        #3b82f6;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.5);
  --sidebar-w:   260px;
  --topbar-h:    64px;
  --transition:  .2s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: .8; }
hr { border: none; border-top: 1px solid var(--border); }
code { font-family: 'Courier New', monospace; background: var(--bg-4); padding: 2px 6px; border-radius: 4px; font-size: .88em; color: #a78bfa; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── App-Layout ─────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-3);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.brand-icon { font-size: 1.6rem; }
.brand-name { font-size: 1.1rem; font-weight: 700; color: var(--text); }

.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-4);
}
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  flex-shrink: 0;
}
.user-avatar-sm {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .75rem; color: #fff;
  flex-shrink: 0;
}
.user-info { overflow: hidden; }
.user-name { font-weight: 600; font-size: .88rem; truncate; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .75rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: .75rem .75rem; }
.nav-section-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  color: var(--text-muted); text-transform: uppercase;
  padding: .75rem .5rem .25rem;
}
.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: .88rem; font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); opacity: 1; }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }
.nav-item-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: #fff !important; font-weight: 600;
  margin-bottom: .5rem;
}
.nav-item-accent:hover { opacity: .9; }
.nav-item-danger { color: var(--danger) !important; }
.nav-item-danger:hover { background: rgba(239,68,68,.1) !important; }
.nav-item i { width: 16px; text-align: center; }

.sidebar-footer {
  padding: .75rem .75rem;
  border-top: 1px solid var(--border);
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 50;
}
.btn-menu {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; padding: .4rem;
  display: none;
  border-radius: 6px;
}
.btn-menu:hover { color: var(--text); background: var(--bg-2); }
.topbar-title { font-weight: 600; font-size: 1rem; flex: 1; }
.topbar-actions { display: flex; gap: .75rem; }

/* ── Page Content ───────────────────────────────────────── */
.page-content { padding: 1.5rem; max-width: 1400px; }
.mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }
.mt-4 { margin-top: 1rem; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  font-size: .88rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-secondary {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-accent { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; }
.btn-link { background: none; color: var(--accent); padding: .4rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn-xs { padding: .2rem .5rem; font-size: .75rem; }
.btn-icon {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: .35rem; border-radius: 6px;
  font-size: .9rem; transition: all var(--transition);
  display: inline-flex; align-items: center;
}
.btn-icon:hover { background: var(--bg-2); color: var(--text); }
.btn-icon.text-danger { color: var(--danger); }
.text-danger { color: var(--danger) !important; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 500;
  color: var(--text-dim); margin-bottom: .35rem;
}
.form-control {
  width: 100%; background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: .6rem 1rem; font-size: .92rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control-sm { padding: .35rem .65rem; font-size: .82rem; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; align-items: center; }
.field-hint { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.required { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.checkbox-label {
  display: flex; align-items: center; gap: .5rem;
  cursor: pointer; font-size: .88rem; color: var(--text-dim);
  padding: .3rem 0;
}
.checkbox-label input { accent-color: var(--accent); }
.checkbox-group { display: flex; flex-wrap: wrap; gap: .5rem; }

.input-password { position: relative; }
.input-password .form-control { padding-right: 2.5rem; }
.pw-toggle {
  position: absolute; right: .65rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: 1rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: .5rem;
}
.card-header h2 { font-size: 1.05rem; }
.card-body { padding: 1.25rem; }
.card-link { font-size: .82rem; color: var(--accent); }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius);
  font-size: .88rem; display: flex; align-items: center; gap: .6rem;
  position: relative; margin-bottom: 1rem;
}
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #34d399; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: #fbbf24; }
.alert-close {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: inherit; cursor: pointer; font-size: 1.1rem;
}

/* ── Dashboard Stats ─────────────────────────────────────── */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.stat-card.urgent { border-color: var(--warning); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(245,158,11,0) } 50%{ box-shadow: 0 0 0 6px rgba(245,158,11,.15) } }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.stat-link { display: block; font-size: .75rem; color: var(--accent); margin-top: .3rem; }

/* ── Toolbar ─────────────────────────────────────────────── */
.content-toolbar {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.25rem;
}
.search-form { flex: 1; min-width: 200px; }
.search-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.search-input-wrap i {
  position: absolute; left: .85rem; color: var(--text-muted); font-size: .85rem;
}
.search-input-wrap input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 50px; color: var(--text); padding: .55rem 1rem .55rem 2.25rem;
  font-size: .88rem;
}
.search-input-wrap input:focus { outline: none; border-color: var(--accent); }
.filter-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  padding: .3rem .75rem; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ── Project Grid ────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  border-top: 3px solid var(--accent);
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: .65rem;
}
.project-card:hover {
  border-color: var(--border-2); transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.project-card-header { display: flex; align-items: center; justify-content: space-between; }
.project-type-badge {
  font-size: .72rem; padding: .2rem .55rem;
  border-radius: 50px; font-weight: 600;
  background: var(--bg-2); color: var(--text-muted);
  display: flex; align-items: center; gap: .3rem;
}
.project-type-badge.series { color: #8b5cf6; }
.project-status { font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.project-title { font-size: 1rem; font-weight: 600; }
.project-title a { color: var(--text); }
.project-title a:hover { color: var(--accent); }
.project-desc { font-size: .82rem; color: var(--text-muted); }
.project-platforms { display: flex; gap: .4rem; }
.platform-badge { display: flex; align-items: center; }
.project-progress { display: flex; align-items: center; gap: .75rem; }
.progress-bar-wrap {
  flex: 1; height: 5px; background: var(--bg-2);
  border-radius: 50px; overflow: hidden;
}
.progress-bar-wrap.large { height: 8px; }
.progress-bar { height: 100%; border-radius: 50px; transition: width .4s ease; }
.progress-label { font-size: .75rem; color: var(--text-muted); width: 32px; text-align: right; }
.project-footer {
  display: flex; align-items: center; gap: .75rem;
  border-top: 1px solid var(--border); padding-top: .65rem;
  font-size: .78rem; color: var(--text-muted);
}
.project-parts, .project-date { display: flex; align-items: center; gap: .3rem; }
.project-actions { margin-left: auto; display: flex; gap: .25rem; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
}
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; color: var(--text-dim); margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 50%, #16213e 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-container { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.brand-icon-lg { font-size: 3rem; display: block; margin-bottom: .5rem; }
.auth-brand h1 { font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-brand p { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }
.auth-form { display: flex; flex-direction: column; gap: .75rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .85rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 500; }

/* ── Wizard ──────────────────────────────────────────────── */
.wizard-container { max-width: 700px; margin: 0 auto; }
.wizard-steps {
  display: flex; align-items: center;
  margin-bottom: 2rem; padding: 1.25rem;
  background: var(--bg-3); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  flex-shrink: 0;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  background: var(--bg-2); color: var(--text-muted);
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.step-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.wizard-step.active .step-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.wizard-step.active .step-label { color: var(--accent); }
.wizard-step.done .step-num { background: var(--success); color: #fff; border-color: var(--success); }
.step-connector { flex: 1; height: 2px; background: var(--border); margin: 0 .5rem; }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.25rem;
}

/* ── Input Mode Toggle ────────────────────────────────────── */
.input-mode-toggle {
  display: flex; gap: .5rem; margin-bottom: 1.25rem;
  background: var(--bg-4); padding: .3rem; border-radius: 50px;
  width: fit-content;
}
.mode-btn {
  padding: .4rem 1rem; border-radius: 50px; border: none;
  background: none; color: var(--text-muted); cursor: pointer;
  font-size: .85rem; font-weight: 500; transition: all var(--transition);
  display: flex; align-items: center; gap: .4rem;
}
.mode-btn.active { background: var(--accent); color: #fff; }

/* ── Voice Recorder ──────────────────────────────────────── */
.voice-recorder {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.25rem; padding: 2rem;
  background: var(--bg-4); border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}
.voice-status { font-size: .9rem; color: var(--text-muted); }
.voice-waveform {
  display: flex; align-items: center; gap: 3px; height: 40px;
}
.voice-waveform span {
  display: block; width: 4px; background: var(--border);
  border-radius: 2px; height: 8px; transition: height .15s ease;
}
.voice-waveform.active span { background: var(--accent); animation: wave 1s ease infinite alternate; }
.voice-waveform.active span:nth-child(2) { animation-delay: .1s; }
.voice-waveform.active span:nth-child(3) { animation-delay: .2s; }
.voice-waveform.active span:nth-child(4) { animation-delay: .3s; }
.voice-waveform.active span:nth-child(5) { animation-delay: .15s; }
@keyframes wave { from { height: 4px; } to { height: 36px; } }
.voice-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: none; font-size: 1.4rem; cursor: pointer;
  transition: all var(--transition); box-shadow: 0 4px 20px var(--accent-glow);
}
.voice-btn:hover { transform: scale(1.08); }
.voice-btn.recording { background: linear-gradient(135deg, var(--danger), #dc2626); animation: breathe 1.5s ease infinite; }
@keyframes breathe { 0%,100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0) } 50%{ box-shadow: 0 0 0 12px rgba(239,68,68,.2) } }
.voice-transcript { width: 100%; }
.voice-transcript label { font-size: .82rem; color: var(--text-muted); margin-bottom: .4rem; display: block; }

/* ── Format Picker ───────────────────────────────────────── */
.format-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.format-option { cursor: pointer; }
.format-option input { display: none; }
.format-card {
  padding: 1.5rem; background: var(--bg-4);
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  text-align: center; transition: all var(--transition);
}
.format-option:has(input:checked) .format-card { border-color: var(--accent); background: var(--accent-glow); }
.format-card:hover { border-color: var(--border-2); }
.format-icon { font-size: 2rem; color: var(--accent); margin-bottom: .75rem; }
.format-title { font-weight: 600; margin-bottom: .35rem; }
.format-desc { font-size: .8rem; color: var(--text-muted); }

.parts-counter {
  display: flex; align-items: center; gap: .75rem;
}
.parts-counter button {
  width: 32px; height: 32px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.parts-counter input { width: 60px; text-align: center; }

/* ── Platform Picker ─────────────────────────────────────── */
.platform-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.platform-option { cursor: pointer; }
.platform-option input { display: none; }
.platform-card {
  padding: 1rem; background: var(--bg-4);
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.platform-option:has(input:checked) .platform-card { border-color: var(--accent); }
.platform-card:hover { border-color: var(--border-2); }
.platform-logo { font-size: 1.6rem; margin-bottom: .5rem; }
.platform-name { font-weight: 600; margin-bottom: .5rem; }
.platform-hints { display: flex; flex-wrap: wrap; gap: .4rem; }
.platform-hints span {
  font-size: .72rem; padding: .15rem .4rem;
  background: var(--bg-2); border-radius: 4px; color: var(--text-muted);
  display: flex; align-items: center; gap: .25rem;
}
.platform-note { font-size: .72rem; color: var(--text-muted); margin-top: .5rem; line-height: 1.4; }

/* ── Color Picker ────────────────────────────────────────── */
.color-picker { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: all var(--transition);
}
.color-swatch.selected, .color-swatch:hover { border-color: #fff; transform: scale(1.15); }

/* ── AI Loading ──────────────────────────────────────────── */
.ai-loading, .publishing-progress {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; background: var(--bg-4);
  border-radius: var(--radius); color: var(--text-muted);
}
.ai-spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── View Layout ─────────────────────────────────────────── */
.view-layout { display: flex; flex-direction: column; gap: 1.25rem; }
.project-header-bar {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.project-header-info { flex: 1; }
.project-header-info h1 { font-size: 1.4rem; margin: .5rem 0; }
.project-header-desc { color: var(--text-muted); font-size: .88rem; }
.badge-row { display: flex; gap: .5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  background: var(--bg-2); color: var(--text-muted);
}
.badge-type { color: var(--text-dim); }
.platform-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.platform-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: .78rem; color: var(--text-dim);
}
.project-header-actions {
  display: flex; flex-direction: column; gap: .75rem;
  align-items: flex-end; flex-shrink: 0;
}
.status-changer label { font-size: .78rem; color: var(--text-muted); margin-bottom: .25rem; }
.overall-progress {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem 1.25rem;
}
.progress-label-row {
  display: flex; justify-content: space-between;
  font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem;
}

/* ── Parts ───────────────────────────────────────────────── */
.parts-section { display: flex; flex-direction: column; gap: 1rem; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .5rem;
}
.section-header h2 { font-size: 1.05rem; font-weight: 600; }
.part-card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.part-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--bg-4);
  border-bottom: 1px solid var(--border);
}
.part-num {
  min-width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .82rem; color: #fff;
  flex-shrink: 0;
}
.part-title-block { flex: 1; }
.part-title-block h3 { font-size: .95rem; font-weight: 600; }
.has-script { font-size: .72rem; color: var(--text-muted); display: flex; align-items: center; gap: .25rem; }
.part-status-block { flex-shrink: 0; }
.status-select { min-width: 150px; }

/* ── Status Timeline ─────────────────────────────────────── */
.status-timeline {
  display: flex; align-items: center; padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.timeline-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex-shrink: 0; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border); transition: all var(--transition);
}
.timeline-step.done .timeline-dot { background: var(--success); }
.timeline-step.current .timeline-dot { transform: scale(1.4); }
.timeline-label { font-size: .65rem; color: var(--text-muted); white-space: nowrap; }
.timeline-step.current .timeline-label { color: var(--text); font-weight: 600; }
.timeline-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; }

/* ── Upload Area ─────────────────────────────────────────── */
.upload-area {
  margin: 1.25rem; padding: 2rem;
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  text-align: center; cursor: pointer; transition: all var(--transition);
  color: var(--text-muted);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--accent); background: var(--accent-glow);
}
.upload-area i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: .75rem; display: block; }
.upload-area p { margin-bottom: .75rem; }
.upload-progress { margin-top: 1rem; display: flex; align-items: center; gap: .75rem; }
.upload-locked {
  margin: 1rem 1.25rem; padding: .85rem 1rem;
  background: var(--bg-4); border-radius: var(--radius);
  font-size: .83rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .5rem;
}

/* ── Video Info ──────────────────────────────────────────── */
.video-info { margin: 1.25rem; }
.video-info-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .75rem 1rem; background: var(--bg-4);
  border-radius: var(--radius); border: 1px solid var(--border);
  font-size: .85rem;
}

/* ── Publish Section ─────────────────────────────────────── */
.publish-section { margin-top: 1.25rem; }
.publish-section h4 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; color: var(--text-dim); }
.publish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.publish-item {
  background: var(--bg-4); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem;
}
.publish-platform { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .88rem; margin-bottom: .5rem; }
.pub-status {
  font-size: .8rem; display: flex; align-items: center; gap: .35rem;
}
.pub-status.published { color: var(--success); }
.pub-status.uploading { color: var(--warning); }
.pub-status.failed { color: var(--danger); }
.pub-status.pending { color: var(--text-muted); }

/* ── Part Footer & Script ────────────────────────────────── */
.part-footer {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.part-notes { padding: .75rem 1.25rem; font-size: .83rem; color: var(--text-muted); background: rgba(245,158,11,.05); display: flex; align-items: flex-start; gap: .5rem; }
.script-editor { padding: 1.25rem; border-top: 1px solid var(--border); background: var(--bg-4); }
.script-editor-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.modal-body { padding: 1.25rem; }
.modal-footer { display: flex; gap: .75rem; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }

/* ── Collapsible ─────────────────────────────────────────── */
.card-header.clickable { cursor: pointer; }
.card-header.clickable:hover { background: var(--bg-2); }
.collapse-icon { transition: transform var(--transition); color: var(--text-muted); }
.script-meta { margin-bottom: .75rem; font-size: .88rem; color: var(--text-dim); }
.script-content { background: var(--bg-4); border-radius: var(--radius); padding: 1rem; font-size: .85rem; line-height: 1.7; white-space: pre-wrap; color: var(--text-dim); }

/* ── Edit Layout ─────────────────────────────────────────── */
.edit-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.edit-part { padding: 1rem 0; }
.edit-part-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.edit-part-divider { border-color: var(--border); margin: 0; }
.edit-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.edit-sidebar-actions { display: flex; flex-direction: column; gap: .5rem; }

/* ── Admin ───────────────────────────────────────────────── */
.admin-layout { display: flex; flex-direction: column; gap: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; background: var(--bg-4); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.table-responsive { overflow-x: auto; }
.table-actions { display: flex; gap: .25rem; align-items: center; }

.status-badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 50px;
  font-size: .72rem; font-weight: 600;
}
.status-active { background: rgba(16,185,129,.15); color: var(--success); }
.status-pending { background: rgba(245,158,11,.15); color: var(--warning); }
.status-suspended { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-superadmin { background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: #fff; }

.user-cell { display: flex; align-items: center; gap: .65rem; }
.user-cell-name { font-weight: 600; font-size: .88rem; }
.user-cell-user { font-size: .75rem; color: var(--text-muted); }

/* ── Info Panel ──────────────────────────────────────────── */
.info-panel {
  background: rgba(99,102,241,.07); border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.info-panel h3 { font-size: .95rem; font-weight: 600; color: var(--accent); margin-bottom: .75rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.info-item { font-size: .83rem; color: var(--text-dim); line-height: 1.6; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.info-list li { font-size: .83rem; color: var(--text-dim); padding-left: 1rem; position: relative; }
.info-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

.platform-info-note {
  background: rgba(59,130,246,.08); border-left: 3px solid var(--info);
  padding: .65rem 1rem; font-size: .82rem; color: var(--text-dim);
  border-radius: 0 6px 6px 0; margin-bottom: 1rem;
}
.input-copy-group { display: flex; gap: .5rem; }
.input-copy-group .form-control { flex: 1; }

/* ── Profile ─────────────────────────────────────────────── */
.profile-layout { display: flex; flex-direction: column; gap: 1.25rem; }
.profile-avatar-section {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}
.profile-avatar-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

.package-info { }
.package-name { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.package-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.package-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.pkg-stat { background: var(--bg-4); border-radius: var(--radius); padding: .75rem; }
.pkg-stat-label { font-size: .72rem; color: var(--text-muted); display: block; margin-bottom: .2rem; }
.pkg-stat-value { font-size: .92rem; font-weight: 600; }

.social-connect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.social-connect-item {
  background: var(--bg-4); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
}
.social-connect-header { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.social-platform-icon { font-size: 1.3rem; display: flex; align-items: center; }
.social-platform-name { font-weight: 600; font-size: .92rem; }
.social-account-info { font-size: .83rem; color: var(--text-dim); }
.platform-reqs { margin-top: .5rem; font-size: .78rem; color: var(--text-muted); display: flex; flex-direction: column; gap: .2rem; }

/* ── Quick Links ─────────────────────────────────────────── */
.quick-links { margin-top: 1.5rem; }
.quick-links h3 { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; font-weight: 500; }
.quick-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.quick-link {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; align-items: center; gap: .65rem;
  font-size: .88rem; font-weight: 500; color: var(--text-dim);
  transition: all var(--transition);
}
.quick-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.quick-link i { color: var(--accent); width: 16px; text-align: center; }

/* ── Notifications ───────────────────────────────────────── */
.notification-stack {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
  max-width: 320px;
}
.notification {
  padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .85rem; font-weight: 500;
  display: flex; align-items: center; gap: .6rem;
  box-shadow: var(--shadow); animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.notification.success { background: var(--success); color: #fff; }
.notification.error   { background: var(--danger);  color: #fff; }
.notification.warning { background: var(--warning); color: #000; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .btn-menu { display: flex; }
  .edit-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .format-picker { grid-template-columns: 1fr; }
  .platform-picker { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .page-content { padding: 1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .project-header-bar { flex-direction: column; }
  .project-header-actions { flex-direction: row; align-items: center; }
  .status-timeline { gap: 0; }
}
