/* ═══════════════════════════════════════════════════════════════
   ForeverFitWithAsh — Admin Command Center CSS
   Metabolic Lab · Feature Toggles · Video Library · Plan Builder
═══════════════════════════════════════════════════════════════ */

/* ── Base card used by Command Center sections ───────────── */
.card {
  background: rgba(17,17,29,0.95);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 24px;
}

/* ── Section header row (title + optional action button) ─── */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Form row (label + input stacked) ───────────────────── */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: .03em;
}

/* ── Video library grid ──────────────────────────────────── */
.video-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.video-card {
  background: rgba(17,17,29,0.95);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: border-color .22s, transform .22s;
}
.video-card:hover { border-color: rgba(233,30,140,0.35); transform: translateY(-3px); }
.video-info { padding: 12px 14px; }
.video-cat-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.video-title {
  font-weight: 700;
  font-size: .88rem;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.35;
}
.video-duration {
  font-size: .75rem;
  color: rgba(255,255,255,0.4);
}
.video-desc {
  font-size: .75rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  line-height: 1.4;
}
.delete-video-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,82,82,0.25);
  border: 1px solid rgba(255,82,82,0.4);
  color: #ff5252;
  border-radius: 8px;
  width: 30px; height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  opacity: 0;
  transition: opacity .18s;
}
.video-card:hover .delete-video-btn { opacity: 1; }

/* ── Nav Section Divider ─────────────────────────────────── */
.nav-section-divider {
  padding: 14px 16px 4px;
  font-size: .65rem;
  color: rgba(233,30,140,0.8);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 6px;
}

/* ── Feature Toggle Matrix ───────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  position: absolute;
}
.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  position: relative;
  transition: background .22s ease;
  border: 1.5px solid rgba(255,255,255,0.12);
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  top: 1px;
  left: 1px;
  transition: transform .22s ease, background .22s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: rgba(233,30,140,0.3);
  border-color: #e91e8c;
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: #e91e8c;
}

/* ── Metabolic Lab Result Cards ──────────────────────────── */
.metric-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.metric-result-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.mr-label {
  font-size: .72rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.mr-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: #e91e8c;
  letter-spacing: .03em;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.macro-item {
  padding: 12px 8px;
  border-radius: 10px;
  text-align: center;
}
.macro-protein { background: rgba(233,30,140,0.12); border: 1px solid rgba(233,30,140,0.25); }
.macro-carbs   { background: rgba(255,214,0,0.1);   border: 1px solid rgba(255,214,0,0.25); }
.macro-fat     { background: rgba(255,152,0,0.1);   border: 1px solid rgba(255,152,0,0.25); }
.macro-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: #fff;
  display: block;
}
.macro-lbl {
  font-size: .72rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Plan Builder Layout ─────────────────────────────────── */
.plan-builder-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
@media(max-width:900px) { .plan-builder-layout { grid-template-columns: 1fr; } }

.plan-library-panel {
  background: rgba(12,12,22,0.9);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.plan-library-header {
  padding: 14px 16px;
  background: rgba(233,30,140,0.1);
  border-bottom: 1px solid rgba(233,30,140,0.2);
  font-weight: 700;
  font-size: .85rem;
  color: #e91e8c;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ex-group { padding: 8px 0; }
.ex-group-label {
  padding: 4px 14px;
  font-size: .65rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.ex-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: grab;
  transition: background .18s;
  border-radius: 0;
  user-select: none;
}
.ex-item:hover { background: rgba(233,30,140,0.12); }
.ex-icon { font-size: 1rem; flex-shrink: 0; }
.ex-name { flex: 1; font-size: .82rem; color: rgba(255,255,255,0.8); }
.ex-drag-handle {
  color: rgba(255,255,255,0.2);
  font-size: .75rem;
  flex-shrink: 0;
}

.plan-grid-panel {
  overflow: hidden;
}
.plan-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  overflow-x: auto;
  min-width: 900px;
}
.plan-day-col {
  background: rgba(12,12,22,0.9);
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: 14px;
  min-height: 300px;
  transition: border-color .18s, background .18s;
}
.plan-day-col.drag-over {
  border-color: rgba(233,30,140,0.5);
  background: rgba(233,30,140,0.07);
}
.plan-day-header {
  padding: 10px 10px 8px;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.plan-exercises {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 200px;
}
.plan-drop-hint {
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,0.18);
  padding: 20px 8px;
}
.plan-ex-chip {
  background: rgba(233,30,140,0.1);
  border: 1px solid rgba(233,30,140,0.25);
  border-radius: 9px;
  padding: 8px 8px;
  position: relative;
}
.plan-ex-icon { font-size: .9rem; }
.plan-ex-name {
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 5px;
}
.plan-ex-params {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.plan-param-input {
  width: 42px;
  padding: 3px 5px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: .72rem;
  font-family: 'Inter', sans-serif;
  text-align: center;
}
.plan-param-input:focus { outline: none; border-color: #e91e8c; }
.plan-param-weight { width: 48px; }
.plan-param-sep {
  font-size: .68rem;
  color: rgba(255,255,255,0.3);
}
.remove-ex-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(255,82,82,0.3);
  color: #ff5252;
  cursor: pointer;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transition: opacity .18s;
}
.plan-ex-chip:hover .remove-ex-btn { opacity: 1; }

/* ── Calc results: visibility controlled by JS (style.display) ── */
/* Do NOT add display:none here — it would override JS show/hide  */

/* ── Shared form classes used in command center sections ─── */
.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  transition: border-color .22s ease;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus {
  border-color: #e91e8c;
  background: rgba(233,30,140,0.06);
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-select option { background: #1a1a2e; color: #fff; }

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #e91e8c, #c2185b);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
  letter-spacing: .03em;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(233,30,140,0.4); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.card-sub-title {
  font-size: .92rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}
.req { color: #e91e8c; }

/* ── Card class (re-declare for command sections if needed) ── */
/* admin.css already defines .card, these are safety overrides */
.section-subtitle {
  font-size: .83rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}

