/* ==========================================================================
   My Classes (/gym/classes/, 2026-11-27): the classes you teach, with their
   rosters, and the classes you are in. Tokens, buttons and inputs come from
   /css/readflexes.css; the shell rules below are the same as the Create a
   Class page's, because both live in the Gym shell.

   HOUSE RULE: no narrow centred column. The two lists sit side by side on a
   wide screen and fill the width with fluid side padding.
   ========================================================================== */
a{ color:inherit; text-decoration:none; }
.hidden{ display:none !important; }
[hidden]{ display:none !important; }

/* ===== Shell (as /gym/org/create) ===== */
.app{ display:grid; grid-template-columns:260px 1fr; min-height:100vh; width:100%; }
.sidebar{ position:sticky; top:0; height:100vh; padding:18px 14px; border-right:1px solid var(--line);
  background:var(--panel); overflow:auto; }
.brand{ display:flex; align-items:center; justify-content:center; margin-bottom:4px; text-align:center; }
.brand-logo{ height:120px; max-width:100%; display:block; margin:0 auto; border-radius:14px; }
.brand-sub{ text-align:center; font-size:14px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin-top:6px; margin-bottom:18px; }
.brand-sub a:hover{ text-decoration:underline; }
.nav-section{ margin-top:14px; }
.nav-title{ display:block; padding:8px 10px; }
.nav{ display:flex; flex-direction:column; gap:4px; padding:0 6px 8px; }
.nav a{ padding:10px 14px; border-radius:999px; border:1px solid transparent; display:flex; align-items:center; gap:10px;
  transition:.12s ease; color:var(--text); }
.nav a:hover{ background:rgba(77,240,255,0.10); border-color:rgba(77,240,255,0.2); transform:translateY(-1px); }
.nav a .icon{ width:18px; text-align:center; opacity:.9; }
.nav a.active{ background:rgba(77,240,255,0.12); border-color:var(--neon-cyan); box-shadow:var(--glow-cyan); }

.main{ padding:22px clamp(10px, 2vw, 28px); min-width:0; }

/* ===== Page ===== */
.mc-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.mc-head h1{ margin:0 0 6px; font-size:clamp(22px, 4vw, 32px); }
.mc-head p{ margin:0; color:var(--muted); max-width:78ch; line-height:1.5; }
.mc-status{ margin:0 0 12px; color:var(--muted); }
.mc-status.err{ color:var(--neon-pink, #ff4d6d); }

.mc-cols{ display:grid; grid-template-columns:minmax(0, 3fr) minmax(0, 2fr); gap:18px; align-items:start; }
@media (max-width:1100px){ .mc-cols{ grid-template-columns:1fr; } }

.mc-section{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px; min-width:0; }
.mc-section-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.mc-section-head h2{ margin:0; font-size:1.2rem; margin-right:auto; }
.mc-empty{ color:var(--muted); margin:6px 0; }
.mc-list{ display:flex; flex-direction:column; gap:10px; list-style:none; margin:0; padding:0; }

.mc-class{ border:1px solid var(--line); border-radius:14px; padding:12px 14px; background:rgba(255,255,255,0.02); }
.mc-class-top{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.mc-class-name{ font-size:1.08rem; font-weight:800; color:var(--text); background:none; border:0; padding:0;
  cursor:pointer; text-align:left; display:inline-flex; align-items:center; gap:8px; font-family:inherit; }
.mc-class-name:hover, .mc-class-name:focus-visible{ color:var(--neon-cyan); text-decoration:underline; }
.mc-class-name .chev{ display:inline-block; transition:transform .15s; font-size:.8em; }
.mc-class-name[aria-expanded="true"] .chev{ transform:rotate(90deg); }
.mc-class-title{ font-size:1.08rem; font-weight:800; }
.mc-meta{ display:flex; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:.88rem; margin-top:4px; }
.mc-pill{ border:1px solid var(--line); border-radius:999px; padding:2px 10px; }
.mc-pill--code{ font-family:ui-monospace, monospace; letter-spacing:.06em; }
.mc-actions{ margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.mc-actions .btn, .mc-roster .btn{ padding:6px 14px; font-size:.88rem; }

.mc-roster{ margin-top:12px; border-top:1px solid var(--line); padding-top:10px; }
.mc-roster h3{ margin:0 0 8px; font-size:.95rem; color:var(--muted); font-weight:700; }
.mc-roster ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.mc-roster li{ display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:10px; }
.mc-roster li:hover{ background:rgba(77,240,255,0.06); }
.mc-student{ font-weight:700; color:var(--neon-cyan); min-width:0; overflow-wrap:anywhere; }
.mc-student:hover, .mc-student:focus-visible{ text-decoration:underline; }
.mc-student--plain{ color:var(--text); }
.mc-student-note{ color:var(--muted); font-size:.82rem; }
.mc-roster li .btn{ margin-left:auto; }
:root.light-mode a.mc-student{ color:#0e7490; }

.btn-danger{ border:1px solid rgba(255,77,109,.6); color:#ff4d6d; background:transparent; }
.btn-danger:hover{ background:rgba(255,77,109,.1); }
:root.light-mode .btn-danger{ color:#b4233f; border-color:#b4233f; }

/* The confirm card: the page's own <dialog>, never window.confirm. */
.mc-dialog{ border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); color:var(--text);
  padding:20px 22px; width:min(520px, 92vw); margin:auto; }
.mc-dialog::backdrop{ background:rgba(0,0,0,.6); }
.mc-dialog h2{ margin:0 0 10px; font-size:1.25rem; }
.mc-dialog p{ margin:0 0 10px; line-height:1.5; }
.mc-dialog ul{ margin:0 0 10px; padding-left:1.2em; line-height:1.5; }
.mc-dialog .mc-keep{ color:var(--muted); font-size:.92rem; }
.mc-dialog-actions{ display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:14px; }
.mc-dialog-error{ color:#ff4d6d; margin-top:8px; }

.mc-toast{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:9000; background:var(--panel);
  border:1px solid var(--neon-cyan); border-radius:999px; padding:10px 18px; box-shadow:var(--glow-cyan); width:max-content; max-width:92vw; }

@media (max-width:860px){
  .mc-actions{ margin-left:0; width:100%; }
  .mc-roster li{ flex-wrap:wrap; }
}
