/* ============================================================
   youa — Global Styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:        #26778c;
  --teal-light:  #e1f5ee;
  --teal-mid:    #3A9AB3;
  --teal-dark:   #1a5566 ;
  --bg:          #F9F8F5;
  --white:       #ffffff;
  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --text-hint:   #9a9a9a;
  --border:      #e0ded8;
  --border-mid:  #c8c6c0;
  --danger:      #e24b4a;
  --danger-dark: #a32d2d;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-pill: 999px;

  --font-display: 'DM Serif Display', serif;
  --font-body:    'DM Sans', sans-serif;

  --shadow:      0 2px 16px rgba(38,119,140,.10);
  --shadow-card: 0 1px 4px rgba(0,0,0,.07);
}

body {
  font-family: var(--font-body);
  background:  var(--bg);
  color:        var(--text);
  min-height:   100vh;
  overflow-x:   hidden;
}

/* ── PAGE FADE-IN ────────────────────────────────────────────── */
.page-fade {
  animation: fadeIn 0.3s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── NAV ──────────────────────────────────────────────────────── */
nav {
  background:    var(--white);
  border-bottom: 1px solid var(--border);
  padding:       0 2rem;
  display:       flex;
  align-items:   center;
  justify-content: space-between;
  height:        60px;
  position:      sticky;
  top:           0;
  z-index:       100;
}
.nav-brand {
  font-family: var(--font-display);
  font-size:   1.5rem;
  color:        var(--teal);
  cursor:       pointer;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-links {
  display:     flex;
  gap:         0.5rem;
  align-items: center;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       8px 20px;
  border-radius: var(--radius-pill);
  font-family:   var(--font-body);
  font-size:     0.875rem;
  font-weight:   500;
  cursor:        pointer;
  border:        1.5px solid transparent;
  transition:    all 0.2s;
  text-decoration: none;
  background:    transparent;
}
.btn-outline { border-color: var(--border-mid); color: var(--text); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-ghost   { color: var(--text-muted); }
.btn-ghost:hover { background: var(--teal-light); color: var(--teal); }
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); }
.btn-lg  { padding: 12px 28px; font-size: 1rem; }
.btn-sm  { padding:  6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── USER BADGE ──────────────────────────────────────────────── */
.user-badge { display: flex; align-items: center; gap: 8px; }
.avatar {
  width:         34px;
  height:        34px;
  border-radius: 50%;
  background:    var(--teal-light);
  color:          var(--teal);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-weight:   600;
  font-size:     0.8rem;
  border:        2px solid var(--teal);
  flex-shrink:   0;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display:     block;
  font-size:   0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color:       var(--text);
}
.form-group input,
.form-group select {
  width:        100%;
  padding:      10px 14px;
  border:       1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family:  var(--font-body);
  font-size:    0.95rem;
  background:   var(--bg);
  color:        var(--text);
  outline:      none;
  transition:   border 0.2s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--teal); background: var(--white); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── MESSAGES ────────────────────────────────────────────────── */
.error-msg {
  background:    #fcebeb;
  color:         #a32d2d;
  border:        1px solid #f7c1c1;
  border-radius: var(--radius-sm);
  padding:       10px 14px;
  font-size:     0.875rem;
  margin-bottom: 1rem;
  display:       none;
}
.success-msg {
  background:    var(--teal-light);
  color:         var(--teal-dark);
  border:        1px solid var(--teal-mid);
  border-radius: var(--radius-sm);
  padding:       10px 14px;
  font-size:     0.875rem;
  margin-bottom: 1rem;
  display:       none;
}

/* ── AUTH LAYOUT ─────────────────────────────────────────────── */
.auth-wrap {
  flex:           1;
  display:        flex;
  align-items:    center;
  justify-content: center;
  padding:        3rem 1.5rem;
}
.auth-box {
  background:    var(--white);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       2.5rem;
  width:         100%;
  max-width:     460px;
  box-shadow:    var(--shadow);
}
.auth-box h2 {
  font-family:   var(--font-display);
  font-size:     1.8rem;
  margin-bottom: 0.3rem;
}
.auth-box .sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.auth-switch a { color: var(--teal); cursor: pointer; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ── ROLE CARDS ──────────────────────────────────────────────── */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.5rem; }
.role-card {
  border:        1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding:       0.85rem 1rem;
  cursor:        pointer;
  transition:    all 0.2s;
  display:       flex;
  flex-direction: column;
  gap:           4px;
}
.role-card:hover,
.role-card.selected { border-color: var(--teal); background: var(--teal-light); }
.role-card .rlabel  { font-weight: 600; font-size: 0.9rem; }
.role-card .rdesc   { font-size: 0.78rem; color: var(--text-muted); }

/* ── VERIFY / OTP ────────────────────────────────────────────── */
.verify-icon {
  width:         64px;
  height:        64px;
  border-radius: 50%;
  background:    var(--teal-light);
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin:        0 auto 1.5rem;
  font-size:     2rem;
}
.otp-row { display: flex; gap: 0.6rem; justify-content: center; margin: 1.5rem 0; }
.otp-row input {
  width:         48px;
  height:        56px;
  text-align:    center;
  font-size:     1.5rem;
  font-weight:   600;
  border:        1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background:    var(--bg);
  color:         var(--text);
  font-family:   var(--font-body);
  outline:       none;
  transition:    border 0.2s;
}
.otp-row input:focus { border-color: var(--teal); background: var(--white); }
.uid-box {
  background:    var(--teal-light);
  border:        1px solid var(--teal-mid);
  border-radius: var(--radius);
  padding:       1.2rem;
  text-align:    center;
  margin-top:    1rem;
}
.uid-box .uid-label { font-size: 0.8rem; color: var(--teal-dark); margin-bottom: 4px; }
.uid-box .uid-val   { font-family: var(--font-display); font-size: 1.6rem; color: var(--teal); letter-spacing: 2px; }

/* ── DASHBOARD ───────────────────────────────────────────────── */
.dash-wrap {
  flex:       1;
  display:    flex;
  flex-direction: column;
  padding:    2.5rem 2rem;
  max-width:  1100px;
  margin:     0 auto;
  width:      100%;
  gap:        2rem;
}
.dash-header h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.3rem; }
.dash-header p  { color: var(--text-muted); }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.25rem; }
.dash-card {
  background:    var(--white);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.75rem;
  cursor:        pointer;
  transition:    all 0.2s;
  box-shadow:    var(--shadow-card);
  display:       flex;
  flex-direction: column;
  gap:           0.75rem;
  text-decoration: none;
  color:         inherit;
}
.dash-card:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-2px); }
.dash-card .dc-icon {
  width:         52px;
  height:        52px;
  background:    var(--teal-light);
  border-radius: var(--radius-sm);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.5rem;
}
.dash-card h3     { font-size: 1.15rem; font-weight: 600; }
.dash-card p      { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.dc-badge {
  display:       inline-block;
  background:    var(--teal-light);
  color:          var(--teal);
  font-size:     0.73rem;
  font-weight:   600;
  letter-spacing: 0.5px;
  padding:       3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  width:         fit-content;
}

/* ── INNER PAGES ─────────────────────────────────────────────── */
.inner-wrap {
  flex:       1;
  display:    flex;
  flex-direction: column;
  padding:    2rem;
  max-width:  1100px;
  margin:     0 auto;
  width:      100%;
  gap:        1.5rem;
}
.inner-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.back-btn {
  background:    transparent;
  border:        1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding:       7px 16px;
  font-family:   var(--font-body);
  font-size:     0.85rem;
  cursor:        pointer;
  color:         var(--text-muted);
  display:       flex;
  align-items:   center;
  gap:           5px;
  transition:    all 0.2s;
  text-decoration: none;
}
.back-btn:hover { border-color: var(--teal); color: var(--teal); }
.inner-header h2 { font-family: var(--font-display); font-size: 1.75rem; }
.inner-header .badge {
  margin-left:   auto;
  background:    var(--teal-light);
  color:          var(--teal);
  font-size:     0.75rem;
  font-weight:   600;
  padding:       4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

/* ── PLACEHOLDER PANEL ───────────────────────────────────────── */
.placeholder-panel {
  background:    var(--white);
  border:        2px dashed var(--border-mid);
  border-radius: var(--radius);
  padding:       3rem 2rem;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  justify-content: center;
  gap:           1rem;
  text-align:    center;
  flex:          1;
  min-height:    260px;
}
.placeholder-panel .ph-icon { font-size: 3rem; opacity: 0.3; }
.placeholder-panel h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }
.placeholder-panel p  { font-size: 0.875rem; color: var(--text-hint); max-width: 420px; line-height: 1.6; }
.connect-label {
  background:    #faeeda;
  color:         #854f0b;
  border:        1px solid #fac775;
  border-radius: var(--radius-sm);
  padding:       8px 14px;
  font-size:     0.8rem;
  font-weight:   500;
  max-width:     500px;
  line-height:   1.5;
  text-align:    left;
}
.connect-label strong { color: #633806; }

/* ── CLASSROOM ───────────────────────────────────────────────── */
.class-code-box {
  background:    var(--teal-light);
  border:        2px solid var(--teal-mid);
  border-radius: var(--radius);
  padding:       2rem;
  text-align:    center;
}
.class-code-box .cc-label  { font-size: 0.85rem; color: var(--teal-dark); margin-bottom: 0.5rem; font-weight: 500; }
.class-code-box .cc-code   { font-family: var(--font-display); font-size: 3rem; color: var(--teal); letter-spacing: 8px; margin-bottom: 1rem; }
.student-list              { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.student-list .sl-header   { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.student-item              { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.student-item:last-child   { border-bottom: none; }
.student-item .s-dot       { width: 8px; height: 8px; border-radius: 50%; background: #1d9e75; flex-shrink: 0; }

/* ── JOIN CLASSROOM ──────────────────────────────────────────── */
.join-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.join-box {
  background:    var(--white);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       2rem;
  width:         100%;
  max-width:     400px;
  box-shadow:    var(--shadow);
  text-align:    center;
}
.join-box h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.4rem; }
.join-box p  { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.code-input {
  width:         100%;
  padding:       14px;
  font-size:     1.5rem;
  text-align:    center;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight:   600;
  border:        2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family:   var(--font-body);
  background:    var(--bg);
  color:          var(--teal);
  margin-bottom: 1rem;
  outline:       none;
  transition:    border 0.2s;
}
.code-input:focus { border-color: var(--teal); background: var(--white); }

/* ── TRAIN CHOICE ────────────────────────────────────────────── */
.train-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.train-opt {
  background:    var(--white);
  border:        1.5px solid var(--border);
  border-radius: var(--radius);
  padding:       1.75rem;
  cursor:        pointer;
  transition:    all 0.2s;
  display:       flex;
  flex-direction: column;
  gap:           0.75rem;
  text-decoration: none;
  color:         inherit;
}
.train-opt:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-2px); }
.to-badge {
  display:       inline-block;
  background:    var(--teal-light);
  color:          var(--teal);
  font-size:     0.75rem;
  font-weight:   700;
  padding:       3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 1px;
  width:         fit-content;
}
.train-opt h3 { font-size: 1.1rem; font-weight: 600; }
.train-opt p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── SUBROLE PICKER ──────────────────────────────────────────── */
.subrole-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.subrole-box    { text-align: center; max-width: 480px; width: 100%; }
.subrole-box h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.4rem; }
.subrole-box p  { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.subrole-cards  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.subrole-card {
  background:    var(--white);
  border:        1.5px solid var(--border);
  border-radius: var(--radius);
  padding:       1.5rem;
  cursor:        pointer;
  transition:    all 0.2s;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  gap:           0.5rem;
  text-align:    center;
}
.subrole-card:hover { border-color: var(--teal); background: var(--teal-light); transform: translateY(-2px); }
.subrole-card .sr-icon  { font-size: 2.5rem; }
.subrole-card .sr-title { font-weight: 600; font-size: 1rem; }
.subrole-card .sr-desc  { font-size: 0.8rem; color: var(--text-muted); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  flex:        1;
  display:     flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:     4rem 2rem;
  text-align:  center;
  position:    relative;
  overflow:    hidden;
}
.hero::before {
  content:  '';
  position: absolute;
  top:      -120px;
  left:     50%;
  transform: translateX(-50%);
  width:    600px;
  height:   600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38,119,140,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display:       inline-block;
  background:    var(--teal-light);
  color:          var(--teal);
  font-size:     0.75rem;
  font-weight:   600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding:       4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size:   clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width:   700px;
}
.hero h1 em { color: var(--teal); font-style: italic; }
.hero p     { font-size: 1.1rem; color: var(--text-muted); max-width: 520px; line-height: 1.7; margin-bottom: 2.5rem; }
.hero-btns  { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── SECTION (home) ──────────────────────────────────────────── */
.section       { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; width: 100%; }
.section-title { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; }
.section-sub   { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1rem; }
.cards-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.25rem; }
.card          { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-card); }
.card-icon     { width: 44px; height: 44px; background: var(--teal-light); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.4rem; }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.card p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  background:    var(--white);
  border-top:    1px solid var(--border);
  padding:       1.5rem 2rem;
  text-align:    center;
  color:          var(--text-hint);
  font-size:     0.82rem;
}

/* ── TOAST ───────────────────────────────────────────────────── */
.toast {
  position:    fixed;
  bottom:      2rem;
  right:       2rem;
  background:  var(--text);
  color:        #fff;
  padding:     12px 20px;
  border-radius: var(--radius-sm);
  font-size:   0.875rem;
  z-index:     9999;
  opacity:     0;
  transition:  opacity 0.3s;
  pointer-events: none;
  max-width:   320px;
}
.toast.show { opacity: 1; }

/* ── PAGE WRAPPER (flex column) ──────────────────────────────── */
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-row, .train-choice, .subrole-cards, .role-cards { grid-template-columns: 1fr; }
  nav  { padding: 0 1rem; }
  .dash-wrap, .inner-wrap, .section { padding: 1.5rem 1rem; }
  .auth-box { padding: 1.5rem; }
}
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

*{box-sizing:border-box;margin:0;padding:0}

:root{
  --teal:#26778c;--teal-light:#E8F3F6;--teal-mid:#3A9AB3;
  --bg:#f7f8f6;--white:#fff;
  --border:rgba(0,0,0,0.08);--border-mid:rgba(0,0,0,0.15);
  --text:#1a1a18;--text-muted:#5F5E5A;--text-hint:#888780;
  --radius:12px;--radius-sm:6px;--radius-pill:100px;
  --shadow:0 2px 8px rgba(0,0,0,0.08);
  --font-display:'DM Serif Display',serif;
  --font-body:'DM Sans',sans-serif;
}

html,body{height:100%;font-family:var(--font-body);background:var(--bg);color:var(--text)}

/* ── OVERLAY ── */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,0.25);z-index:20;opacity:0;pointer-events:none;transition:opacity 0.25s}
.overlay.show{opacity:1;pointer-events:all}

/* ── SIDEBAR ── */
.sidebar{
  position:fixed;left:0;top:0;bottom:0;width:230px;
  background:var(--white);border-right:1px solid var(--border);
  display:flex;flex-direction:column;z-index:30;
  transform:translateX(-100%);transition:transform 0.25s cubic-bezier(.4,0,.2,1);
}
.sidebar.open{transform:translateX(0)}

.sidebar-brand{
  padding:1.1rem 1.25rem;font-family:var(--font-display);font-size:1.5rem;
  color:var(--teal);border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
}
.close-btn{
  background:none;border:none;cursor:pointer;color:var(--text-muted);
  padding:4px 6px;border-radius:6px;font-size:1rem;line-height:1;font-family:var(--font-body);
}
.close-btn:hover{background:var(--teal-light);color:var(--teal)}

.sidebar-user{
  padding:0.85rem 1.25rem;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:0.6rem;
}
.avatar{
  width:30px;height:30px;border-radius:50%;
  background:var(--teal-light);color:var(--teal);
  font-size:0.75rem;font-weight:600;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-family:var(--font-body);
}
.sidebar-user-name{font-size:0.82rem;font-weight:600;color:var(--text)}
.sidebar-user-role{font-size:0.72rem;color:var(--text-hint)}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item{
  display:flex;align-items:center;gap:0.65rem;padding:0.7rem 1.25rem;
  font-size:0.875rem;font-weight:500;color:var(--text-muted);cursor:pointer;
  border:none;background:none;width:100%;text-align:left;
  transition:all 0.15s;position:relative;font-family:var(--font-body);
}
.nav-item:hover{background:var(--teal-light);color:var(--teal)}
.nav-item.active{background:var(--teal-light);color:var(--teal);font-weight:600}
.nav-item.active::before{
  content:'';position:absolute;left:0;top:0;bottom:0;
  width:3px;background:var(--teal);border-radius:0 2px 2px 0;
}
.nav-badge{
  margin-left:auto;font-size:0.65rem;font-weight:700;
  background:var(--teal-light);color:var(--teal);
  padding:2px 7px;border-radius:var(--radius-pill);letter-spacing:0.5px;
}

/* sub-nav for train */
.nav-sub{padding:0 0 0.25rem 2.6rem}
.nav-sub-item{
  display:flex;align-items:center;gap:0.5rem;
  padding:0.45rem 0.75rem;
  font-size:0.8rem;font-weight:500;color:var(--text-muted);cursor:pointer;
  border:none;background:none;width:100%;text-align:left;
  border-radius:var(--radius-sm);transition:all 0.15s;font-family:var(--font-body);
}
.nav-sub-item:hover{background:var(--teal-light);color:var(--teal)}
.nav-sub-item.active{color:var(--teal);font-weight:600}

.sidebar-footer{padding:0.75rem 1rem;border-top:1px solid var(--border)}
.sidebar-footer button{
  width:100%;padding:0.55rem;font-size:0.8rem;font-family:var(--font-body);
  background:none;border:1px solid var(--border-mid);border-radius:var(--radius-sm);
  cursor:pointer;color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;gap:0.4rem;
}
.sidebar-footer button:hover{background:var(--teal-light);color:var(--teal);border-color:var(--teal)}

/* ── TOPBAR ── */
.topbar{
  position:sticky;top:0;z-index:10;background:var(--white);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:0.85rem;padding:0.85rem 1.25rem;
}
.hamburger{
  background:none;border:none;cursor:pointer;
  display:flex;flex-direction:column;gap:4px;
  padding:5px;border-radius:6px;flex-shrink:0;
}
.hamburger:hover{background:var(--teal-light)}
.hamburger span{display:block;width:18px;height:2px;background:var(--text);border-radius:2px}
.topbar-title{font-family:var(--font-display);font-size:1.1rem;color:var(--text)}
.topbar-badge{
  background:var(--teal-light);color:var(--teal);
  font-size:0.72rem;font-weight:600;
  padding:3px 10px;border-radius:var(--radius-pill);letter-spacing:0.5px;
}

/* ── MAIN CONTENT ── */
.main-content{display:flex;flex-direction:column;min-height:100vh}
.page-body{flex:1;padding:1.5rem;display:flex;flex-direction:column;gap:1.25rem}

/* ── LIVE AREA ── */
.live-area{
  flex:1;background:var(--white);border:2px dashed var(--border-mid);
  border-radius:var(--radius);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:1rem;text-align:center;padding:2.5rem;min-height:320px;
}
.live-area h3{font-size:1.05rem;font-weight:600;color:var(--text-muted)}
.live-area p{font-size:0.875rem;color:var(--text-hint);max-width:400px;line-height:1.6}

.connect-label{
  background:#fff8e6;border:1px solid #e8d48a;border-radius:var(--radius-sm);
  padding:0.7rem 1rem;font-size:0.8rem;color:#7a5c00;
  max-width:440px;text-align:left;line-height:1.5;
}
.connect-label code{background:rgba(0,0,0,0.06);padding:1px 4px;border-radius:3px;font-size:0.78rem}

/* ── BUTTONS ── */
.btn-row{display:flex;gap:0.75rem;flex-wrap:wrap;justify-content:center}
.btn-sm-row{display:flex;gap:0.75rem;flex-wrap:wrap}

.btn-primary{
  background:var(--teal);color:#fff;border:none;border-radius:var(--radius-pill);
  padding:0.65rem 1.4rem;font-size:0.875rem;font-weight:600;cursor:pointer;
  font-family:var(--font-body);transition:all 0.15s;
  display:flex;align-items:center;gap:0.4rem;
}
.btn-primary:hover{background:var(--teal-mid)}
.btn-outline{
  background:var(--white);color:var(--text-muted);
  border:1.5px solid var(--border-mid);border-radius:var(--radius-pill);
  padding:0.6rem 1.25rem;font-size:0.875rem;font-weight:500;cursor:pointer;
  font-family:var(--font-body);transition:all 0.15s;
  display:flex;align-items:center;gap:0.4rem;
}
.btn-outline:hover{border-color:var(--teal);color:var(--teal)}

/* ── TRAIN CARDS ── */
.train-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.train-card{
  background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius);
  padding:1.5rem;cursor:pointer;transition:all 0.2s;
  display:flex;flex-direction:column;gap:0.6rem;
}
.train-card:hover{border-color:var(--teal);box-shadow:var(--shadow);transform:translateY(-2px)}
.tc-badge{
  display:inline-block;background:var(--teal-light);color:var(--teal);
  font-size:0.7rem;font-weight:700;padding:3px 10px;
  border-radius:var(--radius-pill);letter-spacing:1px;width:fit-content;
}
.train-card h3{font-size:0.95rem;font-weight:600;color:var(--text)}
.train-card p{font-size:0.8rem;color:var(--text-muted);line-height:1.6}

/* ── COLLECT FORM ── */
.collect-form{
  background:var(--white);border:1px solid var(--border);
  border-radius:var(--radius);padding:1.25rem;
  display:flex;flex-direction:column;gap:0.85rem;
}
.collect-form h3{font-size:0.95rem;font-weight:600;color:var(--text)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:0.35rem}
.form-group label{font-size:0.78rem;font-weight:500;color:var(--text-muted)}
.form-group input,
.form-group select{
  border:1.5px solid var(--border-mid);border-radius:var(--radius-sm);
  padding:0.5rem 0.65rem;font-size:0.85rem;font-family:var(--font-body);
  outline:none;transition:border 0.15s;background:var(--white);color:var(--text);
}
.form-group input:focus,
.form-group select:focus{border-color:var(--teal)}

.back-btn{
  background:none;border:none;color:var(--teal);font-size:0.82rem;font-weight:500;
  cursor:pointer;font-family:var(--font-body);padding:0;
  display:flex;align-items:center;gap:0.3rem;
}
.back-btn:hover{text-decoration:underline}

.error-msg{font-size:0.8rem;color:#c0392b;min-height:1rem}

/* ── PLACEHOLDER PANEL ── */
.placeholder-panel{
  background:var(--white);border:2px dashed var(--border-mid);
  border-radius:var(--radius);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:0.75rem;text-align:center;padding:2rem;min-height:160px;
}
.placeholder-panel h3{font-size:0.95rem;font-weight:600;color:var(--text-muted)}
.placeholder-panel p{font-size:0.82rem;color:var(--text-hint);max-width:380px;line-height:1.6}
.placeholder-panel code{background:rgba(0,0,0,0.06);padding:1px 4px;border-radius:3px;font-size:0.78rem}
/* ============================================================
   youa — Pill Role Buttons  (append to css/styles.css)
   ============================================================ */

/* ── PILL GROUP WRAPPER ── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

/* ── BASE PILL ── */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-mid);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
  outline: none;
}

/* ── HOVER STATE ── */
.pill-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

/* ── SELECTED STATE ── */
.pill-btn.selected {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}

/* ── ICON INSIDE PILL ── */
.pill-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── SUBROLE GROUP (hidden until School is selected) ── */
#subrole-group {
  display: none;
}