/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --success: #10b981;
  --danger: #ef4444;
  --sidebar-bg: #1e1b4b;
  --sidebar-hover: #312e81;
  --sidebar-active: #4f46e5;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --sidebar-w: 220px;
  --topbar-h: 62px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

a { text-decoration: none; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 22px; }
.logo-text { color: #fff; font-size: 18px; font-weight: 700; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav ul { list-style: none; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  color: rgba(255,255,255,.65);
  transition: all .18s;
  border-left: 3px solid transparent;
}
.nav-link:hover { color: #fff; background: var(--sidebar-hover); }
.nav-link.active { color: #fff; background: var(--sidebar-active); border-left-color: #a5b4fc; }

.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-label { font-size: 14px; font-weight: 500; }

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.admin-profile { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

.admin-info { display: flex; flex-direction: column; }
.admin-name { color: #fff; font-weight: 600; font-size: 13px; }
.admin-role { color: rgba(255,255,255,.5); font-size: 11px; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-muted); padding: 4px 8px;
}

.topbar-title { font-size: 18px; font-weight: 700; flex: 1; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* ===== CONTENT ===== */
.content { flex: 1; padding: 24px; }

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 600; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; align-items: center; justify-content: center; }

.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 440px; max-width: 95vw;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

.form-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color .15s; width: 100%;
}
.form-input:focus { border-color: var(--primary); background: var(--surface); }

/* ===== LOADING & ERROR ===== */
.loading-cell, .error-cell {
  text-align: center;
  padding: 40px 16px !important;
  color: var(--text-muted);
  font-size: 13px;
}
.error-cell { color: var(--danger); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #1e293b; color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 300;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: all .25s ease;
}
.toast.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ===== H5P PAGE ===== */
.h5p-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.h5p-tab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.h5p-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.h5p-tab:hover:not(.active) { color: var(--text); }

.h5p-panel { display: none; }
.h5p-panel.active { display: block; }

.h5p-form-card { max-width: 680px; }

.h5p-form-body {
  padding: 20px 24px 0;
  display: flex;
  flex-direction: column;
}

.h5p-textarea {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  line-height: 1.5;
}

.h5p-sublabel {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.h5p-image-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.h5p-image-row .form-input { flex: 1; min-width: 0; }

.h5p-image-preview {
  display: none;
  position: relative;
  margin-top: 10px;
  width: fit-content;
}
.h5p-image-preview img {
  height: 140px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.h5p-clear-image {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.h5p-clear-image:hover { background: rgba(0,0,0,.75); }

.h5p-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.h5p-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h5p-option-radio {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.h5p-option-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.h5p-option-input { flex: 1; min-width: 0; }

.h5p-remove-opt {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.h5p-remove-opt:hover { color: var(--danger); background: #fee2e2; }

.h5p-add-btn { align-self: flex-start; }

.h5p-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

/* H5P Import Bar */
.h5p-import-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.h5p-import-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.h5p-import-icon { font-size: 24px; flex-shrink: 0; }

.h5p-import-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* H5P Questions / Library Grid */
.h5p-questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.h5p-q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.h5p-q-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.h5p-q-no-img {
  width: 100%;
  height: 140px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--primary);
}

.h5p-q-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.h5p-q-num {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
}

.h5p-q-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.h5p-q-footer {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* H5P Library Panel Toolbar */
.h5p-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.h5p-library-toolbar strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ===== H5P QUIZ MODAL ===== */
.modal-quiz {
  width: 540px;
  max-width: 95vw;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.quiz-close-btn {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 10;
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .18s;
}
.quiz-close-btn:hover { background: rgba(0,0,0,.7); }

.quiz-image-wrap {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg);
}
.quiz-image-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.quiz-body {
  padding: 22px 24px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.quiz-option-btn:disabled { cursor: default; }

.quiz-opt-letter {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: background .15s, color .15s, border-color .15s;
}

.quiz-option-btn.correct { border-color: var(--success); background: #dcfce7; }
.quiz-option-btn.correct .quiz-opt-letter { background: var(--success); color: #fff; border-color: var(--success); }
.quiz-option-btn.wrong   { border-color: var(--danger);  background: #fee2e2; }
.quiz-option-btn.wrong .quiz-opt-letter   { background: var(--danger);  color: #fff; border-color: var(--danger); }

.quiz-feedback {
  display: none;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.quiz-feedback.correct { display: block; background: #dcfce7; color: #16a34a; }
.quiz-feedback.wrong   { display: block; background: #fee2e2; color: #dc2626; }

.quiz-retry-btn, .quiz-close-text-btn { display: none; }

/* Quiz / Frame loader */
.quiz-loader {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.93);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
  border-radius: 16px;
}
.quiz-loader.show { display: flex; }

.quiz-loader-spinner {
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  display: block;
}

.quiz-loader-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== H5P PLAYER MODAL ===== */
.modal-h5p-player {
  width: 880px;
  max-width: 96vw;
  height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
}

.h5p-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.h5p-player-header span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 40px);
}

.h5p-player-frame-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.h5p-player-frame-wrap .quiz-loader { border-radius: 0; }

#h5p-player-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== CONTENT TYPE GALLERY ===== */
.ct-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ct-search {
  flex: 1;
  max-width: 480px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  outline: none; transition: border-color .15s;
}
.ct-search:focus { border-color: var(--primary); }

.ct-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ct-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  user-select: none;
}

.ct-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(99,102,241,.12);
  background: #fafbff;
}

.ct-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--primary-light);
  overflow: hidden;
  position: relative;
}

.ct-icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.ct-icon-text {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -.3px;
}

.ct-card-body { flex: 1; min-width: 0; }

.ct-card-title {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ct-card-desc {
  font-size: 11px; color: var(--text-muted);
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.ct-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.ct-tag {
  display: inline-block;
  padding: 2px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border);
}

.ct-tag--installed { background: #dcfce7; color: #16a34a; border-color: #86efac; }
.ct-tag--quick    { background: var(--primary-light); color: var(--primary); border-color: #c7d2fe; }


/* ===== H5P FORM NAV ===== */
.h5p-form-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.h5p-form-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ===== TRUE / FALSE TOGGLE ===== */
.tf-toggle {
  display: flex;
  gap: 10px;
}

.tf-btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color .15s, background .15s, color .15s;
}

.tf-btn--true.active  { border-color: var(--success); background: #dcfce7; color: #16a34a; }
.tf-btn--false.active { border-color: var(--danger);  background: #fee2e2; color: #dc2626; }
.tf-btn:hover:not(.active) { border-color: var(--text-muted); color: var(--text); }

/* ===== MY CONTENT SEARCH ===== */
.my-content-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.my-content-search {
  flex: 1;
  max-width: 420px;
}

/* ===== MY CONTENT CARD BADGES ===== */
.h5p-content-badge {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.5px;
  height: 110px;
}

.h5p-content-badge--mc   { background: var(--primary-light); color: var(--primary); }
.h5p-content-badge--tf   { background: #ecfdf5; color: #059669; }
.h5p-content-badge--qs   { background: #fef3c7; color: #d97706; }
.h5p-content-badge--cp   { background: #f0f9ff; color: #0284c7; }
.h5p-content-badge--iv   { background: #fdf4ff; color: #9333ea; }
.h5p-content-badge--fb   { background: #fff7ed; color: #ea580c; }
.h5p-content-badge--other { background: var(--bg); color: var(--text-muted); }

/* ===== SYNTAX HINT ===== */
.h5p-syntax-hint {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.h5p-syntax-hint code {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 11px;
}

/* ===== SINGLE CHOICE SET ===== */
.scs-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg);
}
.scs-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.scs-block-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.scs-answers-label {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scs-correct-badge {
  background: #dcfce7;
  color: #16a34a;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}
.scs-block .form-input { margin-bottom: 4px; }

/* ===== CARD PAIRS (Flashcards / Dialog Cards) ===== */
.card-pair-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.card-pair-num {
  min-width: 22px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.card-pair-fields {
  flex: 1;
  display: flex;
  gap: 6px;
}
.card-pair-fields .form-input { flex: 1; margin: 0; }

/* ===== ACCORDION FORM ===== */
.acc-panel-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.acc-panel-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.acc-panel-fields .form-input { margin: 0; }
.acc-remove { margin-top: 4px; }

/* ===== SUMMARY FORM ===== */
.sum-group-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg);
}
.sum-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sum-group-block .form-input { margin-bottom: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .ct-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .h5p-questions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .menu-toggle { display: block; }
  .content { padding: 16px; }
}

@media (max-width: 600px) {
  .ct-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .h5p-questions-grid { grid-template-columns: 1fr; }
  .h5p-form-card { max-width: 100%; }
  .modal-h5p-player { height: 95vh; }
}
