/* ============================================================
   Svintsovmax — Calm Therapeutic theme (адаптивный)
   Полный редизайн пользовательской и админ-панелей.
   Переопределяет прежние классы shared.css / editorial-air.css.
   ============================================================ */

:root {
  --bg-top: #F8F2E8;
  --bg-bot: #EDE0CF;
  --surface: #FCF8F1;
  --surface-2: #FFFFFF;
  --surface-soft: #F5EADD;
  --ink: #3B342C;
  --ink-soft: #6E6357;
  --muted: #9C8E7C;
  --terracotta: #C67C5B;
  --terracotta-deep: #B4694A;
  --terracotta-tint: #F2DDD0;
  --sage: #93A88D;
  --sage-deep: #7A8F74;
  --sage-tint: #DFE7DB;
  --blush-tint: #F1DBD1;
  --line: #EADFCC;
  --line-soft: #F0E7D8;
  --danger: #C36A5A;
  --shadow-sm: 0 6px 18px rgba(120, 92, 60, 0.08);
  --shadow: 0 16px 38px rgba(120, 92, 60, 0.12);
  --shadow-lg: 0 26px 60px rgba(90, 66, 42, 0.18);
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --pill: 999px;
  --font-head: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --shell: 640px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.1px;
}

p { margin: 0; }
a { color: var(--terracotta-deep); }

/* ambient soft blobs */
.bg-glow {
  position: fixed;
  z-index: 0;
  width: 60vw;
  max-width: 460px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
.bg-glow-1 { top: -8%; right: -14%; background: radial-gradient(circle, rgba(198,124,91,0.42), transparent 70%); }
.bg-glow-2 { bottom: -10%; left: -16%; background: radial-gradient(circle, rgba(147,168,141,0.40), transparent 70%); }

/* ---------- layout shell ---------- */
.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px 18px 40px;
}
.admin-shell { padding-bottom: 118px; }

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.brand { display: flex; align-items: center; gap: 15px; }
.brand img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.brand h1 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
.brand p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }

.admin-header {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-header .brand h1 { font-size: clamp(1.5rem, 6vw, 1.85rem); }
.admin-user-link { flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--pill);
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-solid {
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--terracotta-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(180, 105, 74, 0.32);
}
.btn-solid:hover { box-shadow: 0 14px 26px rgba(180, 105, 74, 0.4); }
.btn-outline {
  background: rgba(255, 255, 255, 0.5);
  color: var(--terracotta-deep);
  border-color: var(--terracotta);
}
.btn-outline:hover { background: var(--terracotta-tint); }
.btn.is-loading { opacity: 0.7; cursor: progress; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- badge / kicker ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  width: fit-content;
}
.section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 6px;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-grid { display: grid; gap: 16px; }

.toolbar { display: flex; align-items: center; gap: 12px; }
#catalogTitle, .toolbar strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--ink); }

.notice {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- inputs ---------- */
.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder { color: #b6a893; }
.input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(198, 124, 91, 0.14);
}
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.field-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 4px rgba(195, 106, 90, 0.14) !important; }

/* ---------- pager ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.pager span { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* ---------- price ---------- */
.price-pair { display: inline-flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 0.92em; }
.price-current { color: var(--sage-deep); font-weight: 800; font-size: 1.18rem; }
.meta .price-current, .meta strong { font-size: 1.16rem; }

/* ============================================================
   USER PANEL — каталог
   ============================================================ */
#courses.card-grid { grid-template-columns: 1fr; gap: 18px; }

.course {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.course:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course .course-spine { display: none; } /* прежний editorial-декор */
.course > img {
  width: 100%;
  height: 188px;
  object-fit: cover;
  background: var(--surface-soft);
}
.course-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.course-body h3 { font-size: 1.32rem; }
.course-preview { color: var(--ink-soft); font-size: 0.95rem; }
.course-body .badge { margin-top: 2px; }
.course-body .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* ---------- course detail modal ---------- */
.course-detail, .admin-user-detail, .admin-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 80; /* выше нижней навигации (70), иначе меню перекрывает лист */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.course-detail.hidden, .admin-user-detail.hidden, .admin-action-sheet.hidden { display: none; }
.course-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(59, 46, 33, 0.42);
  backdrop-filter: blur(3px);
}
.course-detail-panel, .admin-user-panel, .admin-action-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  background: var(--surface);
  border-radius: 30px 30px 0 0;
  box-shadow: var(--shadow-lg);
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
  animation: sheet-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 700px) {
  .course-detail, .admin-user-detail, .admin-action-sheet { align-items: center; }
  .course-detail-panel, .admin-user-panel, .admin-action-panel { border-radius: var(--r-lg); max-width: 520px; }
}
.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}
.detail-close:hover { background: var(--terracotta-tint); color: var(--terracotta-deep); }
.course-detail-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 18px;
  background: var(--surface-soft);
}
.detail-content { display: flex; flex-direction: column; gap: 12px; }
.detail-content h2 { font-size: 1.7rem; }
.detail-content > p { color: var(--ink-soft); }
.pay-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  color: var(--ink);
}
.pay-option:hover { border-color: var(--terracotta); background: var(--terracotta-tint); }
.pay-option:active { transform: scale(0.99); }
.pay-option > span:first-child {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  color: var(--terracotta-deep);
  background: var(--terracotta-tint);
  border-radius: var(--pill);
  padding: 5px 11px;
  min-width: 48px;
  text-align: center;
}
.pay-option strong { font-weight: 700; color: var(--ink); }
.pay-option .pay-price { margin-left: auto; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 140%);
  z-index: 90;
  background: var(--ink);
  color: #fdf6ea;
  padding: 13px 22px;
  border-radius: var(--pill);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 36px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-card { background: transparent; border: none; box-shadow: none; padding: 0; }

/* stats */
.stats-headline { margin-bottom: 16px; }
.stats-headline h2 { font-size: 1.5rem; }
.stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-tile {
  border-radius: var(--r-md);
  padding: 18px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.stat-tile h3 { font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); }
.stat-tile p { font-family: var(--font-head); font-size: 1.85rem; color: var(--ink); font-weight: 700; }
.stat-tile small { color: var(--muted); font-size: 0.78rem; }
.stats-grid .stat-tile:nth-child(1) { background: var(--sage-tint); border-color: #cfdac9; }
.stats-grid .stat-tile:nth-child(2) { background: var(--terracotta-tint); border-color: #ecccbb; }
.stats-grid .stat-tile:nth-child(3) { background: var(--blush-tint); border-color: #ecd0c4; grid-column: span 2; }
.stats-grid .stat-tile:nth-child(3) { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.stats-revenue { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.stats-revenue > strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--ink); }
.stats-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stats-detail-row:last-child { border-bottom: none; }
.stats-detail-row > span { color: var(--muted); font-size: 0.9rem; }
.stats-detail-row strong { color: var(--ink); font-weight: 700; display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* admin sections */
.admin-section { display: flex; flex-direction: column; gap: 16px; }
.admin-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-section-header h2 { font-size: 1.5rem; }

/* admin course cards */
.admin-course-list { display: grid; gap: 14px; }
.admin-course-card {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-course-spine {
  flex-shrink: 0;
  width: 74px;
  background: linear-gradient(180deg, var(--sage-tint), #d3ddce);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 12px 6px;
  color: var(--sage-deep);
}
.admin-course-spine strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); }
.admin-course-spine span { font-size: 0.66rem; letter-spacing: 0.5px; color: var(--sage-deep); }
.admin-course-content { flex: 1; padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.admin-course-head span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--terracotta); font-weight: 700; }
.admin-course-head h3 { font-size: 1.16rem; margin-top: 2px; }
.admin-course-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-course-meta span {
  font-size: 0.76rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 4px 10px;
  color: var(--ink-soft);
}
.admin-course-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.admin-course-actions .btn { padding: 9px 15px; font-size: 0.85rem; }

/* admin editor */
.admin-editor-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-editor-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-block { display: flex; flex-direction: column; gap: 7px; }
.field-block > span { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.wide-field { grid-column: 1 / -1; }

.upload-drop {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  background: var(--surface-soft);
  border: 1.5px dashed var(--terracotta);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.upload-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 180px; }
.upload-copy > span { font-family: var(--font-head); font-size: 1.02rem; color: var(--ink); }
.upload-copy strong { font-size: 0.82rem; color: var(--terracotta-deep); font-weight: 700; }
.upload-copy small { font-size: 0.78rem; color: var(--muted); }
.upload-picker {
  border: 1px solid var(--terracotta);
  background: var(--surface-2);
  color: var(--terracotta-deep);
  border-radius: var(--pill);
  padding: 10px 18px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}
.upload-picker:hover { background: var(--terracotta-tint); }
.native-upload-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.upload-preview {
  width: 100%;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.upload-preview.has-preview { padding: 0; overflow: hidden; }
.upload-preview.has-preview img { width: 100%; max-height: 200px; object-fit: cover; }

.price-editor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.currency-field { display: flex; flex-direction: column; gap: 7px; }
.currency-field > span { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  cursor: pointer;
}
.admin-check input { width: 18px; height: 18px; accent-color: var(--terracotta); }
.admin-editor-actions { display: flex; justify-content: flex-end; }
.admin-editor-actions .btn { width: 100%; }

/* admin users */
.admin-user-search { display: flex; gap: 10px; }
.admin-user-search .input { flex: 1; }
.admin-user-list { display: grid; gap: 12px; }
.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.12s ease;
}
.admin-user-card:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.admin-user-open {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-head);
  font-size: 1.08rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.admin-user-card p { font-size: 0.84rem; color: var(--muted); margin-top: 3px; }
.admin-user-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.admin-user-meta span { font-size: 0.76rem; color: var(--ink-soft); background: var(--surface-soft); border-radius: var(--pill); padding: 3px 10px; }

.admin-user-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-user-facts span { font-size: 0.8rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--pill); padding: 5px 12px; color: var(--ink-soft); }
.user-spend { display: flex; flex-direction: column; gap: 6px; }
.user-spend > div { display: inline-flex; gap: 10px; flex-wrap: wrap; font-weight: 700; color: var(--ink); }
.user-purchase-list { display: grid; gap: 10px; }
.user-purchase-list article { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.user-purchase-list strong { color: var(--ink); }
.user-purchase-list span { font-size: 0.82rem; color: var(--muted); }
.sheet-list { display: grid; gap: 8px; }
.sheet-list > div { display: flex; justify-content: space-between; gap: 10px; background: var(--surface-soft); border-radius: var(--r-sm); padding: 10px 13px; }
.sheet-list strong { color: var(--ink); font-size: 0.9rem; }
.sheet-list span { color: var(--muted); font-size: 0.82rem; }

/* admin modals extra */
.admin-user-panel h2, .admin-action-panel h2 { font-size: 1.5rem; margin: 4px 0 8px; }
.admin-action-body { margin: 8px 0 4px; }
.admin-action-body p { color: var(--ink-soft); }
.admin-action-buttons { display: flex; gap: 10px; margin-top: 18px; }
.admin-action-buttons .btn { flex: 1; }
.broadcast-preview-card { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.broadcast-preview-card span { font-size: 0.8rem; color: var(--terracotta-deep); font-weight: 700; }
.broadcast-panel { display: flex; flex-direction: column; gap: 16px; }
.broadcast-actions { justify-content: flex-end; }
#broadcastResult { color: var(--sage-deep); font-weight: 600; font-size: 0.9rem; }

/* ---------- admin bottom nav ---------- */
.admin-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 70;
  width: calc(100% - 28px);
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(252, 248, 241, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
}
.admin-bottom-nav button {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 16px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease;
}
.admin-bottom-nav button::before {
  content: "";
  width: 23px;
  height: 23px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
#adminTabs button[data-tab="stats"]::before   { -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21h18"/><path d="M7 21V11"/><path d="M12 21V4"/><path d="M17 21v-7"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21h18"/><path d="M7 21V11"/><path d="M12 21V4"/><path d="M17 21v-7"/></svg>'); }
#adminTabs button[data-tab="courses"]::before { -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z"/><path d="M4 19h15"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z"/><path d="M4 19h15"/></svg>'); }
#adminTabs button[data-tab="users"]::before    { -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8" r="3.2"/><path d="M3.5 20c0-3 2.6-5 5.5-5s5.5 2 5.5 5"/><path d="M16 5.5a3.2 3.2 0 0 1 0 6"/><path d="M18 20c0-2-1-3.6-2.8-4.4"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8" r="3.2"/><path d="M3.5 20c0-3 2.6-5 5.5-5s5.5 2 5.5 5"/><path d="M16 5.5a3.2 3.2 0 0 1 0 6"/><path d="M18 20c0-2-1-3.6-2.8-4.4"/></svg>'); }
#adminTabs button[data-tab="broadcast"]::before{ -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3.5 7 8.5 6 8.5-6"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3.5 7 8.5 6 8.5-6"/></svg>'); }
.admin-bottom-nav button.active { color: var(--terracotta-deep); background: var(--terracotta-tint); }

body.editor-open #adminTabs button[data-tab="courses"] { color: var(--terracotta-deep); }

/* ---------- utilities ---------- */
.hidden { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--pill);
}
.skip-link:focus { left: 16px; }

/* ---------- responsive ---------- */
@media (min-width: 560px) {
  .page-shell { padding: 34px 24px 46px; }
  #courses.card-grid { grid-template-columns: 1fr 1fr; }
  .admin-editor-actions .btn { width: auto; min-width: 220px; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid .stat-tile:nth-child(3) { grid-column: auto; }
  .admin-course-spine { width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
