* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, system-ui, Arial, sans-serif;
  background: #0b1120;
  color: #e2e8f0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 10;
}
h1 { font-size: 18px; font-weight: 700; }
.muted { color: #64748b; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.status { font-size: 13px; color: #34d399; min-width: 60px; text-align: right; }
.status.err { color: #f87171; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 16px;
  background: #1f2937;
  border: 1px solid #1f2937;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 14px;
  color: #cbd5e1;
}
.tab.active { background: #0f172a; color: #fff; border-color: #334155; }

main { padding: 24px; max-width: 1000px; margin: 0 auto; }

.card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { font-size: 15px; margin: 0 0 14px; color: #f1f5f9; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.field.grow { flex: 1; min-width: 200px; }

input, textarea, select {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 11px;
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #3b82f6; }
textarea { min-height: 80px; resize: vertical; }
input[type="color"] { padding: 2px; height: 38px; width: 56px; }

.btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #2563eb; }
.btn.ghost { background: transparent; border: 1px solid #334155; color: #cbd5e1; }
.btn.ghost:hover { background: #1e293b; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: #b91c1c; }
.btn.danger:hover { background: #991b1b; }

.slide-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  margin-bottom: 8px;
}
.drag-handle { color: #64748b; font-size: 16px; cursor: grab; user-select: none; }
.slide-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: #334155;
  color: #cbd5e1;
  min-width: 64px;
  text-align: center;
}
.slide-type.text { background: #1e40af; color: #dbeafe; }
.slide-type.image { background: #166534; color: #dcfce7; }
.slide-type.web { background: #7c2d12; color: #ffedd5; }
.slide-type.video { background: #6b21a8; color: #f3e8ff; }
.slide-info { flex: 1; font-size: 14px; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-info .sub { font-size: 12px; color: #64748b; }
.slide-actions { display: flex; gap: 6px; }
.slide-row.disabled { opacity: 0.5; }

.add-bar { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.links { font-size: 13px; color: #94a3b8; margin-top: 8px; }
.links a { color: #60a5fa; }

.hint { font-size: 12px; color: #64748b; margin-top: 4px; }

dialog {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  width: min(560px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,0.6); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.thumb { max-height: 120px; border-radius: 8px; margin-top: 8px; display: none; }
