/* Social Classroom — Teacher Styles */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --bg: #f4f4f8;
  --surface: #ffffff;
  --border: #e8e8ee;
  --border-light: #f0f0f5;
  --text: #1a1a2e;
  --text-secondary: #6b7089;
  --text-muted: #9d9db5;
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ========== HEADER ========== */

header {
  background: var(--primary-dark);
  color: white;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

header .header-actions {
  display: flex;
  gap: 8px;
}

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

/* ========== CARDS ========== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.hidden { display: none !important; }

/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #059669; }

.btn-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}
.btn-warning:hover { background: #fef3c7; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

/* ========== FORMS ========== */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ========== DASHBOARD ========== */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
}

/* New Session Form */
#characters-section {
  margin-top: 8px;
}

#characters-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.character-add-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.character-add-row input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.character-add-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.character-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.character-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
}

.character-tag .remove-char {
  background: none;
  border: none;
  color: #818cf8;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.character-tag .remove-char:hover { color: var(--danger); }

/* Session Cards */
.session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.session-card:hover {
  box-shadow: var(--shadow-md);
}

.session-info { display: flex; flex-direction: column; gap: 3px; }
.session-info strong { font-size: 15px; font-weight: 700; }
.session-meta { font-size: 12px; color: var(--text-muted); }

.session-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 2px;
}

.status-draft { color: var(--text-muted); background: var(--bg); }
.status-active { color: #059669; background: var(--success-light); }
.status-ended { color: var(--text-muted); background: var(--bg); }

.session-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  font-size: 14px;
}

.empty-state-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

/* ========== SESSION PAGE ========== */

.session-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.session-toolbar h2 { font-size: 18px; font-weight: 700; }

.room-code-display {
  text-align: center;
  background: var(--primary-light);
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.room-code-display .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.room-code-display .code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--primary-dark);
}

.student-url-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.student-url-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.btn-copy {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-copy:hover { background: var(--primary); color: white; }

/* Layout: Feed + Sidebar */
.session-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .session-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar panels */
.sidebar-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.sidebar-panel h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-panel h3 .count {
  background: var(--bg);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
}

/* Character Roster */
.roster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.roster-item:last-child { border-bottom: none; }

.roster-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: white;
  flex-shrink: 0;
}

.roster-info { flex: 1; min-width: 0; }
.roster-char-name { font-weight: 700; font-size: 13px; }
.roster-student-name { font-size: 11px; color: var(--text-muted); }

.roster-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.roster-status.online { background: var(--success); }
.roster-status.offline { background: var(--border); }

/* Teacher Controls */
.control-group {
  margin-bottom: 12px;
}

.control-group:last-child { margin-bottom: 0; }

.control-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.prompt-input-row {
  display: flex;
  gap: 6px;
}

.prompt-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.prompt-input-row input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Feed posts in teacher view */
.feed-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feed-post.highlighted {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.post-author-info { flex: 1; }
.post-author-name { font-weight: 700; font-size: 14px; }
.post-author-handle { font-size: 12px; color: var(--text-muted); }

.post-timestamp { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

.post-content {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.post-stats {
  display: flex;
  gap: 12px;
}

.post-mod-actions {
  display: flex;
  gap: 4px;
}

.mod-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition);
}

.mod-btn:hover { background: var(--bg); }
.mod-btn.mod-highlight:hover { color: var(--primary); }
.mod-btn.mod-delete:hover { color: var(--danger); }

/* Comments in teacher view */
.comments-section {
  border-top: 1px solid var(--border-light);
  margin-top: 10px;
  padding-top: 10px;
}

.comment {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 9px;
  color: white;
  flex-shrink: 0;
}

.comment-body { flex: 1; }
.comment-author { font-weight: 700; }
.comment-time { font-size: 11px; color: var(--text-muted); }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-dark);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Avatar colors */
.avatar-color-0 { background: #6366f1; }
.avatar-color-1 { background: #ec4899; }
.avatar-color-2 { background: #f59e0b; }
.avatar-color-3 { background: #10b981; }
.avatar-color-4 { background: #3b82f6; }
.avatar-color-5 { background: #8b5cf6; }
.avatar-color-6 { background: #ef4444; }
.avatar-color-7 { background: #14b8a6; }

/* ========== TEMPLATES ========== */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.template-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.template-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.template-avatars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 6px;
}

.template-avatars svg {
  border-radius: 50%;
  background: var(--bg);
}

.template-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.template-subject {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== CHARACTER CARDS (creation) ========== */

.character-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.char-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.char-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.char-card-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.char-card-avatar svg {
  border-radius: 50%;
  background: var(--bg);
  overflow: hidden;
}

.char-card-name {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-card-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}

.remove-char-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.remove-char-btn:hover { color: var(--danger); }

.session-avatars {
  display: flex;
  gap: 2px;
}

.session-avatars svg {
  border-radius: 50%;
  background: var(--bg);
}

.mini-initial {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
}

/* ========== MODAL ========== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover { color: var(--text); }

/* ========== AVATAR BUILDER ========== */

.avatar-builder {
  text-align: center;
}

.avatar-preview {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 4px;
}

.avatar-preview svg {
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-md);
  padding: 4px;
}

.avatar-options {
  text-align: left;
}

.avatar-option-group {
  margin-bottom: 14px;
}

.avatar-option-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Color swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text);
}

/* Option pills */
.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.option-pill {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.option-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.option-pill.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ========== SESSION SETTINGS ========== */

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child { border-bottom: none; }

.setting-info { flex: 1; min-width: 0; margin-right: 12px; }

.setting-label {
  font-weight: 600;
  font-size: 14px;
}

.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.setting-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ========== TEACHER ASSIGNMENT UI ========== */

.assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.assign-row:last-child { border-bottom: none; }

.assign-student-name {
  font-weight: 600;
  font-size: 14px;
  min-width: 100px;
}

.assign-select {
  flex: 1;
  min-width: 0;
}

/* Scene cards in feed */
.post-scene-card {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.post-scene-card svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== PACK BROWSER ========== */

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.pack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.pack-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pack-card:active {
  transform: translateY(0);
}

.pack-avatars {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.pack-avatars svg {
  border-radius: 50%;
  background: var(--bg);
}

.pack-name {
  font-weight: 700;
  font-size: 15px;
}

.pack-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--primary-dark);
}

.pack-characters-section {
  margin-bottom: 20px;
}

.pack-characters-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pack-character-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.group-tip {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.pack-char-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.pack-char-avatar {
  flex-shrink: 0;
}

.pack-char-avatar svg {
  border-radius: 50%;
  background: var(--surface);
}

.pack-char-info {
  flex: 1;
  min-width: 0;
}

.pack-char-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.pack-char-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ========== ROOM LOCK TOGGLE ========== */

.lock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
}

.lock-toggle.locked {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #fecaca;
}

.lock-toggle:hover {
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   UPLOAD DROPZONE
   ============================================================ */

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
  max-width: 400px;
  margin: 0 auto;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-text { font-size: 14px; font-weight: 600; color: var(--text); }
.upload-subtext { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== GETTING STARTED GUIDE ========== */

.guide-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.guide-section {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.guide-section:last-of-type { border-bottom: none; }

.guide-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-step-content h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.guide-step-content p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.guide-step-content p:last-child { margin-bottom: 0; }

.guide-step-content ul {
  margin: 6px 0 8px 18px;
  color: var(--text-secondary);
}

.guide-step-content ul li {
  margin-bottom: 4px;
}

.guide-tip {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== INLINE HELP TEXT ========== */

.setting-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0 8px;
  line-height: 1.4;
  font-style: italic;
}

.control-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

/* ========== PACK LIBRARY ========== */

.pack-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.pack-library-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pack-library-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pack-library-header .pack-avatars {
  flex-shrink: 0;
}

.pack-library-info {
  flex: 1;
  min-width: 0;
}

.pack-library-info .pack-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-library-info .pack-meta {
  font-size: 11px;
}

.pack-library-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
