/* ═══════════════════════════════════════════════════════════════════════════
   RAVVO — MODALIDADES (v46 · Fase 2) + PLANOS standalone   2026-09-01
   Identidade Ravvo: dark + roxo, cards, mobile-first.
   Só cores do tema (variáveis) — nada hardcoded fora dos status.
   ═══════════════════════════════════════════════════════════════════════════ */

.md-intro {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm, 10px);
}
.md-intro strong { color: var(--text-primary); }

.md-list { display: flex; flex-direction: column; gap: 10px; }
.md-list-off { opacity: .65; }

.md-sec-title {
  display: flex; align-items: center; gap: 8px;
  margin: 26px 0 12px;
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
}
.md-sec-title span {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; font-size: .7rem;
}

/* ── card da modalidade ── */
.md-card {
  display: flex; align-items: center; gap: 13px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md, 14px);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.md-card:hover { border-color: var(--border-hover, var(--accent)); }
.md-card.is-off { border-left-color: var(--text-muted); }

.md-ic {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
}

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

.md-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.md-name {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
}
.md-chip {
  font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 20px;
  background: rgba(139, 63, 232, .16);
  color: var(--accent);
  border: 1px solid rgba(139, 63, 232, .3);
}
.md-status {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: .6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.md-status.on  { background: rgba(34, 197, 94, .16);  color: #22c55e; border: 1px solid rgba(34, 197, 94, .35); }
.md-status.off { background: rgba(148, 163, 184, .14); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, .25); }

.md-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.md-flags span {
  font-size: .7rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}
.md-flags .md-flag-none { color: var(--text-muted); font-style: italic; background: none; border: none; padding: 2px 0; }

.md-uso { margin-top: 5px; font-size: .72rem; color: var(--text-muted); }

.md-chev { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* ── modal: ícone + toggles ── */
.md-emoji-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-emoji-input { width: 68px !important; text-align: center; font-size: 1.3rem; }
.md-emoji-pick { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.md-emoji-pick button {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  border-radius: 8px;
  font-size: 1rem; cursor: pointer; line-height: 1;
  transition: border-color .15s, transform .15s;
}
.md-emoji-pick button:hover { border-color: var(--accent); transform: translateY(-1px); }

.md-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-group .md-toggle, .md-toggle {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 11px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.md-toggle:hover { border-color: var(--accent); }
.md-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.md-toggle-box {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  border: 2px solid var(--border-hover, #444);
  border-radius: 5px;
  position: relative;
  transition: background .15s, border-color .15s;
}
.md-toggle input:checked + .md-toggle-box {
  background: var(--accent);
  border-color: var(--accent);
}
.md-toggle input:checked + .md-toggle-box::after {
  content: ''; position: absolute;
  left: 4px; top: 0; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.md-toggle input:focus-visible + .md-toggle-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.md-toggle-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.md-toggle-txt strong { font-size: .84rem; font-weight: 600; color: var(--text-primary); }
.md-toggle-txt small  { font-size: .68rem; color: var(--text-muted); line-height: 1.3; }

.md-idnote {
  margin-top: 14px; padding: 9px 11px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .74rem; color: var(--text-muted);
}
.md-idnote code { color: var(--accent); font-size: .74rem; }

.md-btn-off { margin-right: auto; color: #f0556e; border-color: rgba(240, 85, 110, .4); }
.md-btn-off:hover { background: rgba(240, 85, 110, .1); }

/* ── mobile ── */
@media (max-width: 560px) {
  .md-toggles { grid-template-columns: 1fr; }
  .md-card { padding: 12px; gap: 11px; }
  .md-ic { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 10px; }
  .md-name { font-size: .93rem; }
  .md-status { margin-left: 0; }
  .md-emoji-pick button { width: 30px; height: 30px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLANOS (v47 · Fase 3) — listagem comercial + cadastro com modalidades
   ═══════════════════════════════════════════════════════════════════════════ */

.pl-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.pl-filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.pl-chip {
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.pl-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.pl-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-search { max-width: 260px; }

.pl-list { display: flex; flex-direction: column; gap: 10px; }
.pl-count { margin: 14px 0 0; font-size: .75rem; color: var(--text-muted); }

.pl-card {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md, 14px);
  cursor: pointer;
  transition: border-color .2s;
}
.pl-card:hover { border-color: var(--border-hover, var(--accent)); }
.pl-card.is-off { opacity: .55; border-left-color: var(--text-muted); }

.pl-ic {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.pl-body { flex: 1; min-width: 0; }

.pl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; color: var(--text-primary); }
.pl-combo, .pl-off-tag {
  font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
  padding: 2px 7px; border-radius: 20px;
}
.pl-combo   { background: rgba(232, 163, 63, .16);  color: #e8a33f;          border: 1px solid rgba(232, 163, 63, .35); }
.pl-off-tag { background: rgba(148, 163, 184, .14); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, .25); }

.pl-desc { font-size: .8rem; color: var(--text-secondary); margin-top: 3px; }

.pl-mods { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pl-mod {
  font-size: .7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.pl-mod-none { background: var(--bg-input) !important; color: var(--text-muted) !important; font-style: italic; }

.pl-regras { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; }
.pl-regras span { font-size: .73rem; color: var(--text-muted); }

.pl-right { text-align: right; flex-shrink: 0; }
.pl-price {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  color: var(--accent); line-height: 1.1; white-space: nowrap;
}
.pl-price small { font-size: .68rem; font-weight: 600; color: var(--text-muted); }
.pl-alunos { font-size: .72rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.pl-alunos strong { color: #22c55e; font-family: var(--font-display); font-size: .85rem; }

.pl-chev { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; margin-top: 14px; }

/* ── modal do plano ── */
.pl-modal { max-width: 640px; }
.pl-sec {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 12px;
  font-family: var(--font-display); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-primary);
  padding-top: 14px; border-top: 1px solid var(--border);
}
.pl-sec:first-of-type { margin-top: 4px; padding-top: 0; border-top: none; }
.pl-sec-n {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 800;
}
.pl-sec-hint { font-size: .76rem; color: var(--text-muted); margin: -6px 0 12px; line-height: 1.45; }

.pl-idnote {
  margin: 4px 0 0; padding: 8px 11px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
  font-size: .74rem; color: var(--text-muted);
}
.pl-idnote code { color: var(--accent); }

.pl-mod-list { display: flex; flex-direction: column; gap: 8px; }
.pl-mod-row {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-input);
  transition: border-color .15s, background .15s;
}
.pl-mod-row.on { border-color: var(--accent); background: rgba(139, 63, 232, .06); }

.pl-mod-row .pl-mod-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.pl-mod-head input { position: absolute; opacity: 0; pointer-events: none; }
.pl-mod-box {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border-hover, #444); border-radius: 5px; position: relative;
  transition: background .15s, border-color .15s;
}
.pl-mod-head input:checked + .pl-mod-box { background: var(--accent); border-color: var(--accent); }
.pl-mod-head input:checked + .pl-mod-box::after {
  content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pl-mod-head input:focus-visible + .pl-mod-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-mod-ic {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.pl-mod-name { font-weight: 600; font-size: .9rem; color: var(--text-primary); }

.pl-mod-rules { padding: 0 12px 10px; border-top: 1px solid var(--border); margin-top: 2px; padding-top: 10px; }
.pl-mod-rules .form-group { margin-bottom: 8px; }
.pl-mod-rules label { font-size: .74rem; }

.pl-wl { display: flex; flex-direction: column; justify-content: flex-start; }
/* `.form-group label` (0,2,0) do tema vence um `.pl-switch` solto (0,1,0) e
   forçava display:block — o track do switch virava um risco de 2px. Por isso
   os seletores daqui pra baixo são qualificados. */
.form-group .pl-switch, .pl-wl .pl-switch { display: inline-flex; align-items: center; cursor: pointer; margin-top: 6px; }
.pl-switch input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.pl-switch > span {
  width: 40px; height: 22px; border-radius: 20px;
  display: inline-block; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  position: relative; transition: background .2s, border-color .2s;
}
.pl-switch > span::after {
  content: ''; position: absolute; left: 3px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-muted); transition: transform .2s, background .2s;
}
.pl-switch input:checked + span { display: inline-block; background: rgba(139, 63, 232, .3); border-color: var(--accent); }
.pl-switch input:checked + span::after { transform: translateX(17px); background: var(--accent); }
.pl-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.pl-btn-del { margin-right: auto; color: #f0556e; border-color: rgba(240, 85, 110, .4); }
.pl-btn-del:hover { background: rgba(240, 85, 110, .1); }

@media (max-width: 620px) {
  .pl-search { max-width: none; width: 100%; }
  .pl-card { flex-wrap: wrap; padding: 13px; }
  .pl-right { text-align: left; width: 100%; display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
  .pl-alunos { margin-top: 0; }
  .pl-chev { display: none; }
  .pl-ic { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ═══════════ TURMAS (v48 · Fase 4) — modalidade real + acesso ═══════════ */
.cl-disc { font-size: .85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.cl-acc-tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  background: rgba(148, 163, 184, .14); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, .25);
}
.cl-acc-tag.restrito { background: rgba(232, 163, 63, .16); color: #e8a33f; border-color: rgba(232, 163, 63, .35); }

.cl-acesso { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.cl-acesso-title {
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-primary); margin-bottom: 10px;
}
.cl-acesso .cl-radio, .cl-radio {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 11px; margin-bottom: 6px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cl-radio:hover { border-color: var(--accent); }
.cl-radio input { position: absolute; opacity: 0; pointer-events: none; }
.cl-radio-dot {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border-hover, #444); border-radius: 50%; position: relative;
  transition: border-color .15s;
}
.cl-radio input:checked + .cl-radio-dot { border-color: var(--accent); }
.cl-radio input:checked + .cl-radio-dot::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.cl-radio input:focus-visible + .cl-radio-dot { outline: 2px solid var(--accent); outline-offset: 3px; }
.cl-radio input:checked ~ .cl-radio-txt strong { color: var(--accent); }
.cl-radio-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-radio-txt strong { font-size: .86rem; font-weight: 600; color: var(--text-primary); }
.cl-radio-txt small  { font-size: .72rem; color: var(--text-muted); line-height: 1.35; }

.cl-plan-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 6px 0 0; padding: 10px 11px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  max-height: 190px; overflow-y: auto;
}
.cl-plan-list .cl-plan { display: flex; align-items: center; gap: 8px; font-size: .82rem; cursor: pointer; padding: 3px 0; }
.cl-plan input { position: absolute; opacity: 0; pointer-events: none; }
.cl-plan-box {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid var(--border-hover, #444); border-radius: 4px; position: relative;
  transition: background .15s, border-color .15s;
}
.cl-plan input:checked + .cl-plan-box { background: var(--accent); border-color: var(--accent); }
.cl-plan input:checked + .cl-plan-box::after {
  content: ''; position: absolute; left: 3.5px; top: -0.5px; width: 4px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@media (max-width: 560px) { .cl-plan-list { grid-template-columns: 1fr; } }

/* ═══════════ GUIA Modalidades/Planos/Turmas (v50) ═══════════ */
.cg-mapa {
  display: flex; align-items: stretch; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin: 0 0 22px;
  padding: 16px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-md, 14px);
}
.cg-mapa > div {
  flex: 1; min-width: 150px; text-align: center;
  padding: 12px 10px; background: var(--bg-card);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 12px;
}
.cg-mapa span { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.cg-mapa strong {
  display: block; font-family: var(--font-display);
  font-size: .92rem; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-primary);
}
.cg-mapa small { display: block; margin-top: 4px; font-size: .72rem; color: var(--text-muted); line-height: 1.4; }
.cg-mapa i {
  align-self: center; font-style: normal;
  font-size: .68rem; color: var(--text-muted); white-space: nowrap;
}
@media (max-width: 700px) {
  .cg-mapa { flex-direction: column; }
  .cg-mapa i { text-align: center; }
}

/* ═══════════ [hidden] precisa vencer o `display` declarado ═══════════
   Um `display: grid/flex` do autor sobrepõe o `display:none` que o browser
   aplica ao atributo `hidden` — a lista de planos continuava visível mesmo
   com "Todos os planos" marcado. Achado ao revisar os prints do guia. */
.cl-plan-list[hidden],
.pl-mod-rules[hidden],
.pl-mod-rules .form-group[hidden],
.md-toggles[hidden] { display: none !important; }
