/* Base styles */
*,*::before,*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

:root {
  --bg:#0b0d10;
  --card:#12161b;
  --muted:#9aa4b2;
  --primary:#4f86ff;
  --success:#2ac769;
  --warn:#f5a524;
  --danger:#ef4444;
  --radius:14px;
  --ranking-gold: rgba(255, 215, 0, 0.3);
  --ranking-silver: rgba(192, 192, 192, 0.3);
  --ranking-bronze: rgba(205, 127, 50, 0.3);

  /* layout tokens */
  --admin-accordion-width: 100%;

  /* legacy tokens */
  --secondary:var(--primary);
  --accent:var(--primary);
  --background:var(--bg);
  --surface:var(--card);
  --surface-hover:#1a1f26;
  --text:#ffffff;
  --text-light:var(--muted);
  --border:#2a2f36;
  --max-width:1200px;
}
html.light-theme {
  --background:#fafafa;
  --surface:#ffffff;
  --surface-hover:#f3f3f3;
  --text:#111111;
  --text-light:#555555;
  --border:#e0e0e0;
}
a,body{transition:background-color .3s,color .3s;}
html{scroll-behavior:smooth;}
body{
  font-family:'Poppins',sans-serif;
  -webkit-font-smoothing:antialiased;
  background:var(--background);
  color:var(--text);
  line-height:1.6;
  font-size:16px;
}
a{color:var(--primary);text-decoration:none;}
a:hover{text-decoration:underline;}
a:focus-visible,button:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}

img,svg,video{max-width:100%;height:auto;display:block}
h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25;margin-bottom:0.5rem}
button{cursor:pointer}
button:disabled{opacity:.6;cursor:not-allowed}
.card{background:var(--surface);border-radius:var(--radius);box-shadow:0 2px 6px rgba(0,0,0,0.15);padding:1rem}

/* Navigation */
.main-nav{
  background:var(--surface);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0.75rem 1rem;
  position:sticky;
  top:0;
  z-index:1003;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
  border-bottom:1px solid var(--border);
}
html.light-theme .main-nav{
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(6px);
}
.nav-logo{
  font-size:1.25rem;
  font-weight:600;
  color:var(--primary);
  text-shadow:0 1px 2px rgba(0,0,0,0.2);
}
.nav-menu{display:flex;align-items:center;}
.nav-links{list-style:none;display:flex;gap:1rem;}
.nav-links li{margin:0;}
.nav-links a{color:var(--text);}
.hamburger{
  display:none;
  background:none;
  border:0;
  font-size:1.5rem;
  color:var(--text);
}
@media(max-width:768px){
  .hamburger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:2.75rem;
    height:2.75rem;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--surface);
    box-shadow:0 12px 28px rgba(15,23,42,0.25);
    transition:background-color .2s ease,color .2s ease,transform .2s ease;
    position:relative;
    z-index:1004;
  }
  html.light-theme .hamburger{
    background:rgba(255,255,255,0.95);
    box-shadow:0 12px 24px rgba(15,23,42,0.12);
  }
  .nav-menu{
    position:fixed;
    inset:0;
    padding:4.75rem 1.5rem 2.5rem;
    background:rgba(11,13,16,0.96);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:1rem;
    transform:translateY(-100%);
    opacity:0;
    pointer-events:none;
    transition:transform .3s ease,opacity .3s ease;
    overflow:hidden;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    box-sizing:border-box;
    padding-top:calc(4.75rem + env(safe-area-inset-top));
    padding-bottom:calc(2.5rem + env(safe-area-inset-bottom));
    z-index:1005;
  }
  html.light-theme .nav-menu{
    background:rgba(255,255,255,0.96);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
  }
  .nav-menu.active{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }
  .nav-links{
    flex-direction:column;
    gap:0;
    width:100%;
    flex:1 1 auto;
    overflow-y:auto;
    padding-bottom:env(safe-area-inset-bottom);
    -webkit-overflow-scrolling:touch;
  }
  .nav-links li{
    width:100%;
  }
  .nav-links a{
    display:block;
    width:100%;
    padding:0.85rem 0.5rem;
    font-size:1.05rem;
    font-weight:600;
    letter-spacing:0.01em;
    border-bottom:1px solid rgba(255,255,255,0.08);
  }
  html.light-theme .nav-links a{
    border-bottom:1px solid rgba(17,17,17,0.08);
  }
  .nav-links li:last-child a{border-bottom:none;}
  body.nav-open{overflow:hidden;}
  body.nav-open .hamburger{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
    transform:scale(0.96);
    position:fixed;
    top:calc(1.25rem + env(safe-area-inset-top));
    right:calc(1.25rem + env(safe-area-inset-right));
    z-index:1100;
  }
  .dashboard-container{padding:1rem;}
}

/* Header */
header{position:relative;overflow:hidden;text-align:center;padding:2rem 1rem;}
.animated-header-bg{position:absolute;inset:0;background:linear-gradient(135deg,var(--primary),var(--secondary));background-size:200% 200%;animation:moveBg 10s ease infinite;z-index:-1;}
.header-content{max-width:var(--max-width);margin:0 0;padding:0 1rem;}
.header-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:1rem;
  flex:1;
  text-align:left;
}
@keyframes moveBg{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}
.centered{display:flex;flex-direction:column;align-items:center;justify-content:center;}
.typing{overflow:hidden;white-space:nowrap;border-right:.15em solid var(--text);animation:typing 2s steps(20,end),blink .8s step-end infinite;}
@keyframes typing{from{width:0}to{width:100%}}
@keyframes blink{from,to{border-color:transparent}50%{border-color:var(--text)}}
.smartoria-header-title{
  font-size:3rem;
  margin-bottom:0.5rem;
  font-weight:700;
  text-shadow:0 2px 4px rgba(0,0,0,0.3);
}
.tagline{font-size:1.25rem;margin-bottom:1.5rem;color:var(--text-light);max-width:600px;text-align:left;text-shadow:0 1px 2px rgba(0,0,0,0.3);}
html.light-theme .tagline{color:#fff;}
html.light-theme .nav-logo{
  color:var(--primary);
  text-shadow:0 1px 2px rgba(0,0,0,0.4);
}
.cta-button{display:inline-block;background:var(--primary);color:#fff;padding:0.75rem 1.5rem;border-radius:4px;font-weight:600;transition:background-color .2s;}
.cta-button:hover{background:var(--secondary);text-decoration:none;}

/* Promo cards */
.promo-cards{display:flex;flex-direction:column;gap:0.5rem;margin-top:2rem;width:100%;}
.promo-card{background:var(--surface);padding:1rem 1.5rem;border-radius:6px;color:var(--text);transition:transform 0.2s, box-shadow .2s;border:1px solid var(--border);box-shadow:0 2px 6px rgba(0,0,0,0.2);width:100%;text-align:center;}
.promo-card.highlight{background:var(--primary);color:#fff;border-color:var(--primary);}
.promo-card:hover{transform:translateY(-4px);box-shadow:0 4px 12px rgba(0,0,0,0.3);}

/* Sections */
section{padding:3rem 1rem;max-width:var(--max-width);margin:0 auto;}
section h2{font-size:2rem;margin-bottom:1rem;text-align:center;}
section p{margin-bottom:1rem;}
section[id]{scroll-margin-top:5.5rem;}
@media(max-width:768px){
  section[id]{scroll-margin-top:4.25rem;}
}

/* About & Why-us */
.why-us-list{list-style:none;padding-left:0;margin-top:1rem;}
.why-us-list li{margin-bottom:0.5rem;}
.sub-list{margin-left:1rem;list-style:disc;}

/* Testimonials */
.testimonials-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin-top:1rem;}
.teacher-card{
  position:relative;
  display:flex;
  flex-direction:column;
  border-radius:calc(var(--radius) + 10px);
  overflow:hidden;
  background:linear-gradient(145deg, rgba(34,39,55,0.85), rgba(17,20,31,0.9));
  border:1px solid rgba(255,255,255,0.06);
  box-shadow:0 18px 40px rgba(10,12,21,0.35);
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

html.light-theme .teacher-card{
  background:linear-gradient(145deg, rgba(255,255,255,0.95), rgba(240,243,255,0.9));
  border:1px solid rgba(17,17,17,0.08);
  box-shadow:0 20px 40px rgba(15,23,42,0.12);
}

.teacher-card:hover{
  transform:translateY(-6px);
  box-shadow:0 26px 55px rgba(10,12,21,0.45);
  border-color:rgba(123,97,255,0.45);
}

.teacher-card.connected{
  border-color:rgba(76,201,240,0.7);
  box-shadow:0 24px 50px rgba(76,201,240,0.25);
}
.testimonial-text{font-style:italic;margin-bottom:0.5rem;}

.teachers-dashboard{padding-bottom:3rem;}
.teachers-section.dashboard-section-card{background:transparent;border:none;box-shadow:none;padding:0;margin-bottom:0;}

.teachers-hero{
  position:relative;
  overflow:hidden;
  margin:0 auto 2.5rem;
  padding:2.75rem clamp(1.5rem, 3vw, 3rem);
  border-radius:calc(var(--radius) + 16px);
  background:linear-gradient(135deg, rgba(90,63,255,0.65), rgba(30,144,255,0.6));
  color:#fff;
  box-shadow:0 30px 60px rgba(27,35,68,0.45);
}

html.light-theme .teachers-hero{
  background:linear-gradient(135deg, rgba(124,58,237,0.12), rgba(59,130,246,0.16));
  color:var(--text);
  box-shadow:0 26px 48px rgba(15,23,42,0.15);
  border:1px solid rgba(59,130,246,0.18);
}

html.light-theme .teachers-hero__subtitle{color:var(--text-light);}

.teachers-hero__background{
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18), transparent 55%),
             radial-gradient(circle at 85% 30%, rgba(255,255,255,0.18), transparent 55%),
             radial-gradient(circle at 50% 100%, rgba(0,0,0,0.25), transparent 70%);
  opacity:0.75;
  pointer-events:none;
}

.teachers-hero__content{position:relative;display:flex;flex-direction:column;gap:1.25rem;max-width:880px;}
.teachers-hero__eyebrow{letter-spacing:0.08em;text-transform:uppercase;font-size:0.8rem;font-weight:600;opacity:0.85;}
.teachers-hero__title{font-size:2.4rem;margin:0;font-weight:700;line-height:1.2;}
.teachers-hero__subtitle{margin:0;font-size:1.05rem;max-width:720px;opacity:0.88;}

.teachers-hero__metrics{display:flex;flex-wrap:wrap;gap:1.5rem;padding:0;margin:0;list-style:none;}
.teachers-hero__metrics li{display:flex;flex-direction:column;gap:0.35rem;min-width:140px;}
.teachers-hero__metrics .metric-value{font-size:2rem;font-weight:700;}
.teachers-hero__metrics .metric-label{font-size:0.9rem;opacity:0.8;}

.teachers-toolbar{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between;margin:0 auto 2rem;}
.teachers-search{flex:1;min-width:240px;display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1rem;border-radius:999px;border:1px solid rgba(255,255,255,0.1);background:rgba(12,14,19,0.7);box-shadow:0 12px 24px rgba(9,11,18,0.25);}
.teachers-search input{border:0;background:transparent;color:#fff;font-size:1rem;width:100%;padding:0;}
.teachers-search input::placeholder{color:rgba(255,255,255,0.6);}
.teachers-search__icon{font-size:1.2rem;}
.teachers-search__submit{border:0;border-radius:999px;padding:0.75rem 1.75rem;background:linear-gradient(135deg,#6366f1,#0ea5e9);color:#fff;font-weight:600;font-size:0.95rem;letter-spacing:0.01em;box-shadow:0 18px 38px rgba(79,134,255,0.35);cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;}
.teachers-search__submit:hover{transform:translateY(-2px);box-shadow:0 22px 46px rgba(14,165,233,0.35);}
.teachers-search__submit:focus-visible{outline:3px solid rgba(14,165,233,0.45);outline-offset:2px;}
.teachers-toolbar .teachers-search__submit{flex:0 0 auto;}

html.light-theme .teachers-search{background:rgba(255,255,255,0.95);border:1px solid rgba(17,17,17,0.08);box-shadow:0 14px 30px rgba(15,23,42,0.12);}
html.light-theme .teachers-search input{color:var(--text);}
html.light-theme .teachers-search input::placeholder{color:var(--text-light);}
html.light-theme .teachers-search__submit{background:linear-gradient(135deg,#2563eb,#7c3aed);box-shadow:0 18px 36px rgba(124,58,237,0.25);}

.teachers-filter{display:flex;gap:0.5rem;flex-wrap:wrap;justify-content:flex-end;}
.filter-chip{position:relative;border:1px solid rgba(255,255,255,0.2);background:rgba(255,255,255,0.08);color:#fff;border-radius:999px;padding:0.45rem 1.25rem;font-size:0.95rem;font-weight:600;cursor:pointer;transition:background .2s,border-color .2s,color .2s,transform .2s;display:inline-flex;align-items:center;gap:0.5rem;}
.filter-chip:hover{transform:translateY(-2px);border-color:rgba(255,255,255,0.45);}
.filter-chip.active{background:#fff;color:#111827;border-color:#fff;}
.filter-chip__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;padding:0 0.4rem;border-radius:999px;background:rgba(0,0,0,0.25);font-size:0.8rem;}

html.light-theme .filter-chip{border:1px solid rgba(17,17,17,0.08);background:rgba(255,255,255,0.85);color:var(--text);}
html.light-theme .filter-chip.active{background:var(--primary);color:#fff;border-color:var(--primary);}
html.light-theme .filter-chip__badge{background:rgba(17,17,17,0.08);color:var(--text);}

.teacher-card__glow{position:absolute;inset:0;background:radial-gradient(circle at 0% 0%, rgba(128,90,255,0.35), transparent 55%),radial-gradient(circle at 100% 20%, rgba(56,189,248,0.25), transparent 60%);opacity:0.65;pointer-events:none;transition:opacity .3s ease;}
.teacher-card:hover .teacher-card__glow{opacity:0.85;}

.teacher-card__content{position:relative;display:flex;flex-direction:column;gap:1.25rem;padding:1.75rem 1.75rem 1.5rem;backdrop-filter:blur(6px);height:100%;}
.teacher-card__header{display:flex;gap:1rem;align-items:center;}
.teacher-card__heading h3{margin:0;font-size:1.35rem;display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;}
.teacher-card__avatar{width:96px;aspect-ratio:1/1;border-radius:24px;background:rgba(0,0,0,0.35);display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 10px 24px rgba(14,16,26,0.4);}
.teacher-card__avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;border:3px solid rgba(255,255,255,0.35);}
.teacher-card__avatar .avatar-placeholder{width:100%;height:100%;border-radius:inherit;border:none;background:rgba(99,102,241,0.2);color:#fff;font-size:2rem;display:flex;align-items:center;justify-content:center;}
.teacher-card__heading{display:flex;flex-direction:column;gap:0.35rem;}
.teacher-card__bio{margin:0;font-size:0.95rem;line-height:1.6;color:rgba(255,255,255,0.85);}

.teacher-card--compact .teacher-card__content{gap:1.25rem;padding:1.65rem 1.85rem;}
.teacher-card--compact .teacher-card__header{gap:1rem;align-items:flex-start;}
.teacher-card--compact .teacher-card__avatar{width:96px;max-width:96px;aspect-ratio:1;border-radius:20px;box-shadow:0 14px 32px rgba(14,16,26,0.35);}
.teacher-card--compact .teacher-card__avatar img,
.teacher-card--compact .teacher-card__avatar .avatar-placeholder{width:100%;height:100%;border-radius:inherit;font-size:1.75rem;}
.teacher-card--compact .teacher-card__heading h3{font-size:1.25rem;gap:0.45rem;}
.teacher-card--compact .teacher-card__heading{gap:0.4rem;}
.teacher-card--compact .teacher-status-pill{margin-left:0;padding:0.25rem 0.75rem;font-size:0.75rem;}
.teacher-card--compact .teacher-card__bio{font-size:0.98rem;line-height:1.65;max-width:100%;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:rgba(255,255,255,0.92);}
.teacher-card--compact .teacher-card__footer{gap:0.75rem;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:auto;}
.teacher-card--compact .teacher-card__status-text{font-size:0.92rem;line-height:1.55;color:rgba(255,255,255,0.9);flex:1 1 240px;margin:0;}
.teacher-card--compact .teacher-card__actions{gap:0.65rem;flex:0 0 auto;}
.teacher-card--compact .teacher-card__actions .btn{padding:0.65rem 1.35rem;font-size:0.9rem;}

html.light-theme .teacher-card--compact .teacher-card__bio{color:var(--text);opacity:0.9;}
html.light-theme .teacher-card--compact .teacher-card__status-text{color:var(--text-light);opacity:0.95;}

html.light-theme .teacher-card__avatar{background:rgba(17,17,17,0.05);}
html.light-theme .teacher-card__avatar img{border-color:rgba(17,17,17,0.12);}
html.light-theme .teacher-card__bio{color:var(--text);opacity:0.88;}

.teacher-status-pill{display:inline-flex;align-items:center;gap:0.35rem;margin-left:0.5rem;padding:0.25rem 0.75rem;border-radius:999px;font-size:0.75rem;font-weight:700;letter-spacing:0.02em;background:rgba(255,255,255,0.14);color:#fff;text-transform:uppercase;}
.teacher-status-pill--connected{background:linear-gradient(135deg,#4fc4ff,#5ef38c);color:#0b1220;}
.teacher-status-pill--pending{background:linear-gradient(135deg,#f59e0b,#f97316);color:#1f1300;}
.teacher-status-pill--available{background:linear-gradient(135deg,#7c3aed,#6366f1);}

.teacher-card__highlights{list-style:none;padding:0;margin:0;display:grid;gap:0.75rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
.teacher-card__highlights li{display:flex;align-items:center;gap:0.65rem;padding:0.75rem 0.85rem;border-radius:12px;background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.88);font-size:0.9rem;line-height:1.4;backdrop-filter:blur(4px);}
.teacher-card__highlights li span:first-child{font-size:1.1rem;}

html.light-theme .teacher-card__highlights li{background:rgba(17,17,17,0.06);color:var(--text);}

.teacher-card__footer{display:flex;flex-direction:column;gap:1rem;}
.teacher-card__status-text{margin:0;font-size:0.9rem;line-height:1.5;color:rgba(255,255,255,0.8);}
.teacher-card__actions{display:flex;flex-wrap:wrap;gap:0.75rem;align-items:center;}
.teacher-card__actions .btn{flex:0 1 auto;}
.teacher-card__actions .btn.btn-open{background:linear-gradient(135deg,#60a5fa,#7c3aed);border:0;color:#fff;box-shadow:0 16px 32px rgba(79,134,255,0.35);}
.teacher-card__actions .btn[disabled]{opacity:0.7;box-shadow:none;}

html.light-theme .teacher-card__status-text{color:var(--text-light);}

.teacher-card.is-hidden{display:none;}

.teacher-empty-state{margin-top:2rem;text-align:center;padding:2.5rem;border-radius:calc(var(--radius) + 12px);background:linear-gradient(135deg,rgba(79,134,255,0.08),rgba(124,58,237,0.08));border:1px dashed rgba(124,58,237,0.35);}
.teacher-empty-state__content{max-width:420px;margin:0 auto;display:flex;flex-direction:column;gap:0.5rem;}
.teacher-empty-state__icon{font-size:2.5rem;display:block;margin-bottom:1rem;}
.teacher-empty-state h3{margin:0 0 0.5rem;font-size:1.5rem;}
.teacher-empty-state p{margin:0;font-size:0.95rem;color:var(--text-light);}
html.light-theme .teacher-empty-state{background:linear-gradient(135deg,rgba(79,134,255,0.12),rgba(124,58,237,0.08));border-color:rgba(124,58,237,0.25);}

@media (max-width:768px){
  .teachers-hero{padding:2.25rem 1.5rem;}
  .teachers-hero__title{font-size:2rem;}
  .teachers-toolbar{flex-direction:column;align-items:stretch;}
  .teachers-search{width:100%;}
  .teachers-search__submit{width:100%;justify-content:center;}
  .teachers-filter{justify-content:flex-start;}
  .teacher-card__header{flex-direction:column;align-items:flex-start;}
  .teacher-card__highlights{grid-template-columns:1fr;}
  .teacher-card__actions{width:100%;}
  .teacher-card__actions .btn{width:100%;justify-content:center;}
}

/* Newsletter */
.newsletter-form{display:flex;flex-direction:column;align-items:center;gap:0.5rem;margin-top:1rem;}
  .newsletter-form input[type="email"]{padding:0.5rem;border-radius:4px;border:1px solid var(--border);width:100%;max-width:300px;}
.newsletter-form button{background:var(--primary);color:#fff;border:0;padding:0.75rem 1.5rem;border-radius:4px;cursor:pointer;transition:background-color .2s;}
.checkbox-wrapper{display:flex;align-items:center;font-size:0.9rem;}
.checkbox-wrapper input{margin-right:0.5rem;}
.newsletter-signup {
  padding: 3rem 1.5rem;
  text-align: center;
  border-radius: calc(var(--radius) + 10px);
  margin: 2.5rem auto;
  max-width: var(--max-width);
  border: none;
  box-shadow: none;
}

html.light-theme .newsletter-signup {
  box-shadow: none;
}

.newsletter-signup h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Contact */
.contact-form{display:flex;flex-direction:column;gap:0.5rem;margin-top:1rem;max-width:500px;margin-left:auto;margin-right:auto;}
  .contact-form input,.contact-form textarea, .login-form input, .login-form select{padding:0.5rem;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--text);width:100%;}
.contact-form button{background:var(--primary);color:#fff;border:0;padding:0.75rem 1.5rem;border-radius:4px;cursor:pointer;transition:background-color .2s;}
.form-status{margin-top:1rem;text-align:center;}

input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}
form label{display:block;margin-bottom:0.25rem;font-weight:500;}
.helper-text{margin-top:0.25rem;color:var(--muted);font-size:0.875rem;line-height:1.5;}
.help-icon{display:inline-flex;align-items:center;justify-content:center;margin-left:0.25rem;cursor:help;background:var(--surface-hover);color:var(--text);width:1rem;height:1rem;border-radius:50%;font-size:0.75rem;font-weight:700;border:1px solid var(--border);}

/* Notices */
.notice{padding:1rem;border-radius:6px;margin:1rem auto;max-width:800px;text-align:center;}
.notice-success,
.notice.success{background:var(--success);color:#fff;}
.notice-error,
.notice.error{background:var(--danger);color:#fff;}
.notice-info,
.notice.info{background:var(--primary);color:#fff;}

/* Generic section titles */
.section-title{margin:0;font-weight:600;}

.late-tag,
.regrade-tag {
  display:inline-block;
  background:var(--warn);
  color:#fff;
  padding:0 0.25rem;
  border-radius:4px;
  font-size:0.75rem;
  margin-left:0.25rem;
}

.regrade-tag {
  background:var(--primary);
}

.regrade-note {
  margin-top:0.25rem;
  font-size:0.875rem;
  color:var(--warn);
}

/* Login/Register */
.login-section{display:flex;justify-content:center;padding:3rem 1rem;}
.login-container{background:var(--surface);padding:2rem;border-radius:8px;width:100%;max-width:400px;box-shadow:0 2px 8px rgba(0,0,0,0.15);}
.login-title{font-size:1.8rem;margin-bottom:0.5rem;text-align:center;}
.login-subtitle{font-size:1rem;margin-bottom:1.5rem;text-align:center;color:var(--text-light);}
.login-form{display:flex;flex-direction:column;gap:0.75rem;}
  .input-group{display:flex;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:0.25rem 0.5rem;}
.input-group input,.input-group select{flex:1;background:transparent;border:0;color:var(--text);padding:0.5rem;}
.input-icon{margin-right:0.5rem;color:var(--text-light);}
.login-button{background:var(--primary);color:#fff;border:0;padding:0.5rem;border-radius:4px;font-weight:600;cursor:pointer;transition:background-color .2s;}
.login-error-box{background:#d00000;color:#fff;border-radius:4px;padding:0.5rem;margin-bottom:1rem;}
.login-errors{list-style:disc;margin-left:1.5rem;}
.login-footer{text-align:center;margin-top:1rem;font-size:0.9rem;}

@media (max-width: 520px){
  .login-section{padding:2.5rem 1rem 3rem;}
  .login-container{padding:1.65rem 1.25rem;border-radius:12px;box-shadow:0 18px 38px rgba(15,23,42,0.24);}
  .login-title{font-size:1.6rem;}
  .login-subtitle{font-size:0.95rem;}
  .input-group{gap:0.5rem;padding:0.4rem 0.6rem;}
  .input-group input,.input-group select{font-size:1rem;}
  .login-button{padding:0.75rem 1rem;font-size:1rem;}
}

/* Dashboard */
.dashboard-container{max-width:var(--max-width);margin:0 auto;padding:2rem 1rem;}
.dashboard-title{text-align:center;margin-bottom:1rem;font-size:2rem;}
.dashboard-section-card{background:var(--surface);padding:1rem;border-radius:6px;margin-bottom:2rem;box-shadow:0 2px 6px rgba(0,0,0,0.15);}
.dashboard-section-card details summary{cursor:pointer;font-weight:600;margin-bottom:.5rem;}
.dashboard-section-card details[open]{margin-bottom:.75rem;}
.dashboard-section-card details form{margin-top:.5rem;}
.collapsible-card>summary{display:flex;align-items:center;gap:0.5rem;font-size:1.05rem;}
.collapsible-card>summary::marker{content:"";}
.form-grid{display:grid;gap:1rem;margin-top:0.75rem;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
.form-grid--nested{margin-top:0.75rem;}
.form-advanced-options{margin-top:1rem;border:1px solid var(--border);border-radius:6px;padding:0.5rem 0.75rem;background:var(--surface-hover);}
.form-advanced-options>summary{cursor:pointer;font-weight:600;list-style:none;display:flex;align-items:center;gap:0.5rem;}
.form-advanced-options>summary::marker{content:"";}
.form-advanced-options[open]{padding-bottom:0.75rem;}
.form-advanced-options[open]>.form-grid--nested{margin-top:0.75rem;}
.form-actions{display:flex;flex-wrap:wrap;gap:0.75rem;margin-top:1rem;}
.form-row--checkbox label{display:flex;align-items:center;gap:0.5rem;}
.upload-progress{display:flex;align-items:center;gap:0.75rem;margin-top:1rem;font-size:0.9rem;color:var(--text-light);}
.upload-progress progress{flex:1 1 auto;height:8px;border-radius:999px;overflow:hidden;background:var(--surface-hover);}
.upload-progress progress::-webkit-progress-bar{background:transparent;}
.upload-progress progress::-webkit-progress-value{background:var(--primary);}
.upload-card .form-grid{margin-top:0;}
.upload-card .form-row textarea{min-height:110px;}
.dashboard-table,
.session-table,
.attendance-table{width:100%;border-collapse:collapse;}
  .dashboard-table th,.dashboard-table td,
  .session-table th,.session-table td,
  .attendance-table th,.attendance-table td{padding:0.5rem;border-bottom:1px solid var(--border);text-align:left;}
.dashboard-table thead th,
.session-table thead th,
.attendance-table thead th{background:var(--surface);position:sticky;top:0;z-index:1;}
.dashboard-table tbody tr:nth-child(even),
.session-table tbody tr:nth-child(even),
.attendance-table tbody tr:nth-child(even){background-color:var(--surface-hover);}
.dashboard-table td{vertical-align:top;line-height:1.45;}
.dashboard-table--elevated tbody tr{transition:background-color .2s ease,transform .2s ease;}
.dashboard-table--elevated tbody tr:hover{background:var(--surface-hover);transform:translateX(4px);}
.dashboard-table--flat tbody tr{transition:background-color .2s ease;}
.dashboard-table--flat tbody tr:hover{background:var(--surface-hover);}
.table-actions{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center;}
.table-actions .btn{min-width:0;padding:0.55rem 1rem;}
.table-actions .inline-form{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center;}
.table-actions .inline-form .btn{min-width:0;}

.direct-assignments-table td{vertical-align:middle;}
.direct-assignments-table .assignment-actions{display:flex;align-items:center;gap:0.5rem;justify-content:flex-end;}
.direct-assignments-table .assignment-actions__btn{display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;min-width:120px;}
.direct-assignments-table .assignment-actions__form{margin:0;}

@media (max-width: 720px){
  .direct-assignments-table thead{display:none;}

  .direct-assignments-table,
  .direct-assignments-table tbody,
  .direct-assignments-table tr,
  .direct-assignments-table td{display:block;width:100%;}

  .direct-assignments-table tr{border:1px solid var(--border);border-radius:8px;padding:0.85rem;margin-bottom:0.85rem;background:#fff;box-shadow:0 4px 12px -6px rgba(15,23,42,0.25);}

  .direct-assignments-table td{padding:0.3rem 0;border:none;}

  .direct-assignments-table td::before{content:attr(data-label);display:block;font-size:0.75rem;font-weight:600;color:var(--text-muted);text-transform:uppercase;margin-bottom:0.15rem;letter-spacing:0.08em;}

  .direct-assignments-table td.table-actions::before{content:"Akcje";}

  .direct-assignments-table .assignment-actions{flex-direction:column;align-items:stretch;}
  .direct-assignments-table .assignment-actions__btn{width:100%;}
}
.table-col--wide{max-width:320px;white-space:normal;}
.status-pill{display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.2rem 0.75rem;border-radius:999px;font-size:0.85rem;font-weight:600;background:rgba(148,163,184,0.18);color:var(--text-light);white-space:nowrap;}
.status-pill--planned{background:rgba(79,134,255,0.2);color:#c5d5ff;}
.status-pill--info{background:rgba(56,189,248,0.22);color:#bae6fd;}
.status-pill--pending{background:rgba(245,165,36,0.22);color:#facc15;}
.status-pill--danger{background:rgba(239,68,68,0.22);color:#fca5a5;}
.status-pill--success{background:rgba(34,197,94,0.22);color:#bbf7d0;}
.status-pill--muted{background:rgba(148,163,184,0.18);color:var(--text-light);}
html.light-theme .status-pill{background:rgba(148,163,184,0.15);color:var(--text-light);}
html.light-theme .status-pill--planned{color:#1d4ed8;}
html.light-theme .status-pill--info{color:#0f766e;}
html.light-theme .status-pill--pending{color:#b45309;}
html.light-theme .status-pill--danger{color:#b91c1c;}
html.light-theme .status-pill--success{color:#166534;}
.attendance-table{border:1px solid var(--border);border-radius:var(--radius);border-collapse:separate;border-spacing:0;overflow:hidden;background:var(--surface);}
.attendance-table th,.attendance-table td{padding:0.75rem 1rem;text-align:center;}
.attendance-table th{background:var(--surface);text-transform:uppercase;font-size:0.875rem;letter-spacing:.03em;}
.attendance-table tbody tr:hover{background-color:var(--surface-hover);}
.attendance-table td:first-child{text-align:left;}
.attendance-table td input[type="radio"]{width:1.1rem;height:1.1rem;}
.attendance-table .note-input{width:100%;padding:0.4rem 0.5rem;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--text);}
.attendance-page .dashboard-section-card{overflow-x:auto;}
.rubric-table{margin-top:1rem;}
.rubric-table th,.rubric-table td{border:1px solid var(--border);}
.rubric-table th{background:var(--surface);}
.table-compact .dashboard-table th,
.table-compact .dashboard-table td{padding:0.25rem;}
.table-comfortable .dashboard-table th,
.table-comfortable .dashboard-table td{padding:0.75rem;}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface);color:var(--text);padding:0.75rem 1.5rem;border-radius:4px;text-decoration:none;border:1px solid var(--border);cursor:pointer;transition:background-color .2s,color .2s;min-width:120px;font-size:1rem;line-height:1;}
.btn:hover{background:var(--primary);color:#fff;text-decoration:none;}
.btn:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}
.btn-block{display:block;width:100%;}
.btn-primary{display:inline-flex;align-items:center;justify-content:center;background:var(--primary);color:#fff;border:0;border-radius:4px;transition:background-color .2s;padding:0.75rem 1.5rem;}
.btn-secondary{display:inline-flex;align-items:center;justify-content:center;background:var(--secondary);color:#fff;border:0;border-radius:4px;transition:background-color .2s;padding:0.75rem 1.5rem;}
.btn-primary:hover,
.btn-secondary:hover{filter:brightness(1.1);}
.btn-ghost{background:transparent;color:var(--text);border:1px solid var(--border);min-width:0;padding:0.65rem 1.1rem;border-radius:999px;}
.btn-ghost:hover{background:var(--surface-hover);color:var(--text);}
.btn-ghost:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}
.btn-add{background:#2a9d8f;color:#fff;border:0;transition:background-color .2s;}
.btn-delete{background:#d62828;color:#fff;border:0;transition:background-color .2s;}
.btn-join{background:#219ebc;color:#fff;border:0;transition:background-color .2s;}
.btn-edit{background:#f4a261;color:#fff;border:0;transition:background-color .2s;}
.btn-approve{background:#2b9348;color:#fff;border:0;transition:background-color .2s;}
.btn-save{background:#2b9348;color:#fff;border:0;transition:background-color .2s;}
.btn-export{background:#577590;color:#fff;border:0;transition:background-color .2s;}
.btn-upload{background:#3a86ff;color:#fff;border:0;transition:background-color .2s;}
.btn-send{background:var(--primary);color:#fff;border:0;transition:background-color .2s;}

/* Payment confirmation buttons */
.payment-form .btn{margin-right:0.25rem;}
.payment-form .btn.selected{background:var(--primary);color:#fff;}

footer{text-align:center;padding:2rem 1rem;color:var(--text-light);}

/* Layout helpers */
.container{max-width:var(--max-width);margin:0 auto;padding:0 1rem;}
.hero{padding:4rem 1rem;text-align:center;background:linear-gradient(135deg,var(--primary) 0%,var(--surface) 100%);color:#fff;border-radius:8px;margin:2rem auto;max-width:var(--max-width);}
html.light-theme .hero{color:var(--text);}
.hero h1,.hero__title{font-size:clamp(2rem,5vw,3rem);margin-bottom:0.5rem;}
.hero p,.hero__subtitle{font-size:1.125rem;margin-bottom:1rem;color:var(--text-light);}
.hero__dates{font-weight:600;margin-bottom:1rem;}
.hero__price{color:var(--primary);}
.hero__scholarship-note{font-size:0.9rem;margin-top:0.5em;font-style:italic;color:#0056b3;}

/* Schedule */
.schedule__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin-top:1rem;}
.schedule__item{background:var(--surface);padding:1rem;border-radius:6px;box-shadow:0 2px 4px rgba(0,0,0,0.1);}
.schedule__time{font-weight:600;margin-bottom:0.25rem;color:var(--primary);}
.schedule__prizes{margin-top:1rem;text-align:center;font-weight:600;}

/* Features */
.features-list,.features__list{list-style:none;padding-left:0;margin-top:1rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem;}
.features-list li,.features__list li{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:0.75rem 1rem;display:flex;align-items:center;gap:0.5rem;}
.features-list li span,.features__list li span,.features__icon{font-size:1.5rem;margin-right:0.5rem;}

/* Pricing */
.pricing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.5rem;margin-top:2rem;}
.pricing-card{background:var(--surface);border:1px solid var(--border);padding:1.5rem;border-radius:8px;text-align:center;box-shadow:0 2px 6px rgba(0,0,0,0.15);transition:transform .2s,box-shadow .2s;}
.pricing-card:hover{transform:translateY(-4px);box-shadow:0 4px 12px rgba(0,0,0,0.25);}
.price{font-size:1.5rem;font-weight:600;margin:0.5rem 0;}

/* Contact */
.contact-section{background:var(--surface);border-radius:8px;padding:3rem 1rem;margin-top:2rem;}

/* Teachers */
.teacher-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:2rem;align-items:stretch;}
.teacher-avatar img,.profile-avatar-preview{width:80px;height:80px;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,0.35);}
.avatar-placeholder{width:80px;height:80px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.08);color:var(--text-light);border:3px solid rgba(255,255,255,0.12);font-size:1.8rem;}
.teacher-header{display:flex;align-items:center;gap:0.5rem;}
.teacher-name{margin:0;font-size:1.1rem;}
.teacher-info{margin-top:0.5rem;}
.teacher-bio{font-size:0.95rem;margin:0.5rem 0;line-height:1.6;}
.status{font-size:0.9rem;margin-top:0.5rem;}
.status-confirmed{color:#2b9348;}
.status-pending{color:#f4a261;}
.teachers-list .teacher-card{height:100%;}
.teacher-grid.teachers-list.compact .teacher-card{padding:0;align-items:stretch;}
/* Consistent inline form layout */
.inline-form{
  display:inline-flex;
  align-items:center;
  gap:0.25rem;
}

@media (max-width: 640px){
  .inline-form{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:0.65rem;
    width:100%;
  }

  .inline-form > *{
    width:100%;
  }

  .inline-form .btn{
    width:100%;
  }
}
.profile-edit-form textarea{min-height:80px;margin-bottom:0.5rem;}

/* Forms */
.form{display:flex;flex-direction:column;gap:0.75rem;}
.form__row{display:flex;flex-direction:column;gap:0.25rem;margin-bottom:0.5rem;}
  .form__textarea{padding:0.75rem;border-radius:4px;border:1px solid var(--border);background:var(--surface);color:var(--text);}
.registration{margin-bottom:2rem;}

/* Global input styles */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea{
  font:inherit;
  padding:0.5rem 0.75rem;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  width:100%;
  box-sizing:border-box;
}

input[type="file"]{padding:0.5rem 0;}

/* Compact form layouts */
.add-lesson-form,
.add-lesson-type-form,
.upload-form{
  display:block;
}
.add-lesson-form .form-row,
.add-lesson-type-form .form-row,
.upload-form .form-row{display:flex;flex-direction:column;gap:0.35rem;}

.price-input{width:6rem;}

/* Tables and misc */
.table-responsive{overflow-x:auto;width:100%;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 12px 28px rgba(15,23,42,0.18);}
.overflow-x-auto{overflow-x:auto;width:100%;}
.table-responsive table,
.overflow-x-auto table{
  width:max-content;
  min-width:max(620px, 100%);
}
.empty-message{color:var(--text-light);font-style:italic;}

@media(max-width:768px){
  .dashboard-section-card{padding:1.25rem;}
  .table-responsive,
  .overflow-x-auto{margin:0 -1rem;padding:0 1rem 1rem;border-radius:0;border:0;box-shadow:none;}
}

@media(max-width:520px){
  .table-responsive table,
  .overflow-x-auto table{min-width:100%;}
}

@media(max-width:600px){
  .promo-cards{flex-direction:column;align-items:center;}
  .hero-banner .hero-content{flex-direction:column;}
  .hero-banner .header-left,
  .hero-banner .promo-cards{width:100%;}
  .smartoria-header-title{font-size:2rem;}
  .tagline{font-size:1rem;}
  .nav-links{gap:0.5rem;}
  .login-container{padding:1.5rem;}
  .newsletter-form button,.contact-form button,.cta-button{width:100%;}
  section{padding:2rem 1rem;}
  .schedule__grid,.pricing-grid,.teacher-grid{grid-template-columns:1fr;}
  footer{padding:1rem;}
}

@media(max-width:480px){
  .header-content{padding:0 1rem;}
  .cta-button{font-size:0.9rem;padding:0.6rem 1rem;}
  .promo-card{padding:0.75rem 1rem;}
  .intro-banner{padding:1.75rem 1.25rem;gap:1.25rem;}
  .intro-left h1{font-size:clamp(2.1rem,6.5vw,2.85rem);}
  .intro-left p{font-size:1.05rem;}
  .intro-right{padding:1.25rem;}
  .intro-phone{font-size:1.3rem;}
  .contact-container{gap:1rem;}
  .contact-card{padding:1.25rem;box-shadow:0 10px 22px rgba(15,23,42,0.28);}
  html.light-theme .contact-card{box-shadow:0 10px 20px rgba(15,23,42,0.12);}
  .contact-details li{font-size:1.1rem;}
  body{font-size:15px;}
}

/* Tiny screen adjustments */
@media(max-width:360px){
  .nav-logo{font-size:1rem;}
  .nav-links a{font-size:1rem;padding:0.75rem 0.5rem;}
  .nav-links{gap:0.25rem;}
  .nav-menu{
    padding:4.25rem 1rem 2rem;
    padding-top:calc(4.25rem + env(safe-area-inset-top));
    padding-bottom:calc(2rem + env(safe-area-inset-bottom));
  }
  .container{padding:0 0.5rem;}
  .promo-card{padding:0.5rem;}
  .intro-banner{padding:1.5rem 1rem;}
  .intro-left h1{font-size:clamp(1.9rem,8vw,2.4rem);}
  .intro-right{gap:0.5rem;}
  .dashboard-container{padding:1rem;}
  .smartoria-header-title{font-size:1.75rem;}
  body{font-size:14px;}
}

/* ======================= */
/*        Group Pages      */
/* ======================= */

.group-page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:1.5rem;
  border-bottom:1px solid var(--border);
  padding-bottom:0.5rem;
  gap:1rem;
}
@media(max-width:600px){
  .group-page-header{
    flex-direction:column;
    align-items:flex-start;
  }
}

.group-title{font-size:1.75rem;margin:0;}

/* Constrain overall page width for readability */
.dashboard-container.group-page{
  width:85%;
  margin:0 auto;
}
.dashboard-container.groups-page,
.dashboard-container.group-settings-page,
.dashboard-container.group-sessions-import-page,
.dashboard-container.attendance-page{
  width:70%;
  margin:0 auto;
}
@media (max-width:768px){
  .dashboard-container.group-page,
  .dashboard-container.groups-page,
  .dashboard-container.group-settings-page,
  .dashboard-container.group-sessions-import-page,
  .dashboard-container.attendance-page{width:100%;}
}
.groups-page .dashboard-section-card{
  padding:1.5rem;
}

.groups-page .section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:0.5rem;
}

.groups-page .group-list{margin-top:1rem;}

.groups-page .empty-message{
  text-align:center;
  color:var(--text-light);
}

.section-header .section-title{margin:0;}
.group-card-link{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:0.5rem;
  color:var(--text);
}
.group-card-link:hover{text-decoration:none;}
.group-card-arrow{
  color:var(--primary);
  transition:transform .2s;
}
.group-card-link:hover .group-card-arrow{transform:translateX(4px);}
.group-archived-tag{
  margin-left:0.25rem;
  font-size:0.875rem;
  color:var(--muted);
  font-weight:400;
}

@media(max-width:480px){
  .groups-page .dashboard-section-card{padding:1rem;}
}
.group-layout{display:flex;gap:1.5rem;}
@media(max-width:768px){
  .group-layout{flex-direction:column;}
}
.group-left{flex:3;}
.group-right{flex:1.5;}

.group-section{
  background:var(--surface);
  padding:1.5rem;
  border-radius:var(--radius);
  margin-bottom:2rem;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  border:1px solid var(--border);
}
.group-section h3{margin-top:0;margin-bottom:0.75rem;}
.group-section .section-title{
  font-size:1.25rem;
  margin-bottom:1rem;
  border-bottom:1px solid var(--border);
  padding-bottom:0.25rem;
}
.card-title{
  margin:0 0 0.25rem;
  font-size:1.1rem;
}
.announcement{border-left:4px solid var(--primary);}

.meeting-card:hover,
.assignment-card:hover,
.material-card:hover,
.announcement:hover{
  background:var(--surface-hover);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}
.group-form input,
.group-form textarea,
.group-form select,
.announcement-form input,
.announcement-form textarea,
.invite-form input,
.add-member-form select{
  padding:0.5rem;
  border:1px solid var(--border);
  border-radius:4px;
  background:var(--surface-hover);
  color:var(--text);
}
.inline-form{
  display:inline-flex;
  gap:0.25rem;
  flex-wrap:wrap;
  align-items:center;
}
.btn-sm{padding:0.25rem 0.5rem;font-size:0.8rem;}
.simple-list li{margin-bottom:0.25rem;}
.group-right{position:sticky;top:1rem;height:fit-content;}
@media(max-width:768px){.group-right{position:static;}}
@media(max-width:480px){.group-section{padding:1rem;}}

.member-table{width:100%;border-collapse:collapse;margin-top:0.5rem;}
.member-table th,.member-table td{padding:0.25rem 0.5rem;border-bottom:1px solid var(--border);text-align:left;}
.member-table th{background:var(--surface);}
.member-table td form{margin:0;}
@media(max-width:480px){
  .member-table th,.member-table td{font-size:0.8rem;padding:0.25rem;}
}

.btn.active{background:var(--primary);color:#fff;}
.show-more-btn{margin-top:0.5rem;}

.group-list,
.meeting-list,
.assignment-list,
.material-list,
.announcement-list,
.simple-list{
  list-style:none;
  padding-left:0;
}

.assignment-list,
.material-list,
.announcement-list{
  overflow-y:auto;
}

.group-list{
  display:grid;
  gap:0.75rem;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}

@media(max-width:480px){
  .group-list{grid-template-columns:1fr;}
}

.group-card,
.meeting-card,
.assignment-card,
.material-card,
.announcement{
  background:var(--surface);
  padding:1rem;
  border-radius:var(--radius);
  margin-bottom:0.75rem;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
}
.group-card a{color:var(--text);text-decoration:none;display:block;}
.group-card a:hover{text-decoration:none;}

.group-card{
  border:1px solid var(--border);
  padding:1rem;
  transition:background-color .2s, box-shadow .2s, transform .2s;
  text-align:center;
  font-weight:600;
  border-radius:var(--radius);
}
.group-card:hover{
  background:var(--surface-hover);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
  transform:translateY(-2px);
}

.assignment-card.inactive{opacity:0.6;}

/* Assignment page */
.assignment-info{
  background:var(--surface);
  padding:1.5rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  margin-bottom:2rem;
}
.assignment-title{margin-bottom:0.5rem;font-size:1.5rem;}
.assignment-info .meta{font-size:0.875rem;color:var(--text-light);margin-bottom:0.25rem;}
.assignment-description{margin-top:1rem;}

.assignment-rubric{
  background:var(--surface);
  padding:1.5rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  margin-bottom:2rem;
}

.submission-info{margin-top:2rem;}
.submission-info .section-title{margin-bottom:0.5rem;}
.submission-list{list-style:none;padding-left:0;margin-top:0.5rem;}
.submission-list li{
  background:var(--surface);
  padding:1rem;
  border-radius:var(--radius);
  margin-bottom:0.75rem;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
}

.btn-submit-solution{background:var(--primary);color:#fff;border:0;transition:background-color .2s;}
.btn-submit-solution:hover{background:var(--secondary);}

.announcement .meta,
.meeting-card .meta,
.assignment-card .meta,
.material-card .meta{font-size:0.85rem;color:var(--text-light);margin-top:0.25rem;}

.group-form,
.invite-form,
.add-member-form{
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  margin-bottom:1rem;
}

.meeting-type-form{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0.25rem;
  margin-bottom:0.25rem;
}
.meeting-type-form input[type="text"],
.meeting-type-form input[type="number"]{
  width:400px;
}
.meeting-type-form button:first-of-type{
  margin-left:auto;
}

.admin-group-list li{
  display:flex;
  align-items:center;
  gap:0.5rem;
}

.group-name-link{
  color:var(--text);
  text-decoration:none;
}
.group-name-link:hover{
  text-decoration:underline;
}


.meeting-actions,
.assignment-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:0.5rem;
  margin-top:0.25rem;
}
.meeting-actions>*,
.assignment-actions>*{flex:1;}
.meeting-actions .inline-form,
.assignment-actions .inline-form{width:100%;}
.meeting-actions .inline-form .btn,
.assignment-actions .inline-form .btn{width:100%;}
.meeting-actions .btn{height:100%;font-family:inherit;}

.material-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0.5rem;
  margin-top:0.25rem;
}
.material-actions>*{flex:1;}
.material-actions .inline-form{width:100%;}
.material-actions .inline-form .btn{width:100%;}

.member-actions{margin-top:1rem;display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-start;}

.student-select,
.teacher-select{
  margin:0.5rem 0;
}
.student-select{display:flex;flex-direction:column;gap:0.25rem;}
.teacher-select summary{font-weight:600;cursor:pointer;}
.teacher-select label{display:flex;align-items:center;gap:0.25rem;}

.advanced-options{background:var(--surface-hover);padding:0.75rem;border-radius:6px;margin-top:0.5rem;}
.advanced-options summary{font-weight:600;cursor:pointer;margin-bottom:0.5rem;}
.student-select label{display:flex;align-items:center;gap:0.25rem;}

.invite-days{width:5rem;}

.upcoming-banner{
  background:var(--primary);
  color:#fff;
  text-align:center;
  padding:0.75rem;
  border-radius:6px;
  margin-bottom:1rem;
  box-shadow:0 2px 6px rgba(0,0,0,0.2);
}
.upcoming-banner a{color:#fff;text-decoration:underline;}

.grade-badge{padding:0 0.25rem;border-radius:4px;font-weight:600;}
.grade-low{background:#d62828;color:#fff;}
.grade-mid{background:#ffd166;color:#000;}
.grade-high{background:#2b9348;color:#fff;}
.grade-unknown{background:var(--text-light);color:#000;}
.grade-input.grade-low{border-color:#d62828;background:#3b0f0f;color:#fff;}
.grade-input.grade-mid{border-color:#ffd166;background:#3b2e0f;color:#fff;}
.grade-input.grade-high{border-color:#2b9348;background:#0f3b1f;color:#fff;}
html.light-theme .grade-input.grade-low{background:#fff5f5;color:#000;}
html.light-theme .grade-input.grade-mid{background:#fffbe6;color:#000;}
html.light-theme .grade-input.grade-high{background:#f0fff4;color:#000;}

.graded-lock{color:#666;font-style:italic;margin-left:0.5rem;}
.graded-by{font-size:0.9rem;color:#555;margin-top:0.25rem;}

/* Utility classes */
.hidden{display:none;}
.ml-1{margin-left:1em;}
.input-small{width:5rem;}
.text-center{text-align:center;}
.mt-1{margin-top:1rem;}
.mb-1{margin-bottom:1rem;}
.mb-2{margin-bottom:2rem;}
.flex-row{display:flex;align-items:center;}
.gap-1{gap:1rem;}
.back-link{display:inline-block;margin-bottom:0.5rem;color:var(--primary);}
.back-link:hover{text-decoration:underline;}

/* Dashboard cards */
.welcome-card{background:var(--surface);padding:1.25rem;border-radius:10px;text-align:center;box-shadow:0 6px 18px rgba(0,0,0,0.15);margin-bottom:1.5rem;border:1px solid var(--border);}
.teacher-profile-grid{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:1.5rem;align-items:flex-start;}
.profile-edit-form{display:flex;flex-direction:column;gap:0.75rem;width:100%;}
.form-row{display:flex;flex-direction:column;gap:0.25rem;margin-bottom:0.5rem;}
.form-row.hidden{display:none;}
.cancellation-form{margin-top:0.5em;}

.dashboard-hero{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:1.25rem;
  width:100%;
  padding:1.75rem 2rem;
  background:linear-gradient(135deg,var(--primary) 0%,var(--accent) 100%);
  border-radius:14px;
  color:#fff;
  margin-bottom:1.75rem;
  overflow:hidden;
  box-shadow:0 16px 32px rgba(0,0,0,0.2);
}

.dashboard-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at top right,rgba(255,255,255,0.25),transparent 45%);
  pointer-events:none;
}

.dashboard-hero .hero-content{
  position:relative;
  z-index:1;
  max-width:420px;
  display:flex;
  flex-direction:column;
  gap:0.65rem;
}


/* Admin area layout */
.admin-dashboard{
  --admin-gap:clamp(1.5rem,3vw,2.5rem);
  --admin-radius:20px;
  --admin-card-padding:clamp(1.15rem,2.2vw,1.65rem);
  --admin-card-gap:clamp(1rem,1.8vw,1.4rem);
  width:100%;
  max-width:none;
  margin:0;
  padding:clamp(2.5rem,5vw,3.5rem) clamp(1.25rem,4vw,2.5rem) clamp(3rem,6vw,4rem);
  display:flex;
  flex-direction:column;
  gap:var(--admin-gap);
}

.admin-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,0.95fr);
  gap:var(--admin-gap);
  padding:clamp(1.85rem,4vw,2.75rem);
  border-radius:calc(var(--admin-radius) + 2px);
  background:linear-gradient(135deg,rgba(79,134,255,0.55),rgba(79,134,255,0.18));
  color:var(--text);
  box-shadow:0 24px 48px rgba(15,23,42,0.28);
  overflow:hidden;
}

.admin-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at top right,rgba(255,255,255,0.55),transparent 62%),
    radial-gradient(circle at bottom left,rgba(15,23,42,0.25),transparent 65%);
  opacity:0.9;
  pointer-events:none;
}

.admin-hero>*{position:relative;z-index:1;}

html.light-theme .admin-hero{
  background:linear-gradient(135deg,rgba(79,134,255,0.72),rgba(79,134,255,0.25));
  box-shadow:0 20px 36px rgba(15,23,42,0.16);
}

.admin-hero .hero-content{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

.admin-hero .hero-badge{
  align-self:flex-start;
  border:1px solid rgba(255,255,255,0.45);
  background:rgba(15,23,42,0.28);
  color:#fff;
  letter-spacing:0.08em;
}

html.light-theme .admin-hero .hero-badge{
  background:rgba(255,255,255,0.7);
  color:#0f172a;
  border-color:rgba(15,23,42,0.18);
}

.admin-hero h1{
  margin:0;
  font-size:clamp(2.1rem,4vw,2.85rem);
  line-height:1.2;
}

.admin-hero p{
  margin:0;
  font-size:1.05rem;
  color:rgba(255,255,255,0.88);
  max-width:60ch;
}

html.light-theme .admin-hero p{color:rgba(15,23,42,0.72);}

.admin-hero-panel{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}

.admin-quick-actions{
  display:flex;
  flex-wrap:wrap;
  gap:0.6rem;
  margin-top:0.5rem;
}

.admin-chip{
  display:inline-flex;
  align-items:center;
  gap:0.35rem;
  padding:0.45rem 0.95rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.35);
  color:#fff;
  font-size:0.85rem;
  font-weight:600;
  text-decoration:none;
  background:rgba(15,23,42,0.3);
  transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.admin-chip:hover,
.admin-chip:focus-visible{
  transform:translateY(-1px);
  text-decoration:none;
  background:rgba(255,255,255,0.25);
  box-shadow:0 8px 18px rgba(15,23,42,0.25);
}

html.light-theme .admin-chip{
  color:#0f172a;
  background:rgba(255,255,255,0.75);
  border-color:rgba(15,23,42,0.2);
}

html.light-theme .admin-chip:hover,
html.light-theme .admin-chip:focus-visible{
  background:rgba(79,134,255,0.18);
  box-shadow:0 10px 20px rgba(79,134,255,0.2);
}

.admin-stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1rem;
}

.admin-stat-card{
  display:flex;
  flex-direction:column;
  gap:0.4rem;
  padding:1.2rem 1.35rem;
  border-radius:calc(var(--admin-radius) - 4px);
  background:var(--surface);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  box-shadow:0 16px 32px rgba(15,23,42,0.22);
  min-height:160px;
}

html.light-theme .admin-stat-card{box-shadow:0 18px 30px rgba(15,23,42,0.12);}

.admin-stat-card.needs-action{
  border-color:color-mix(in srgb,var(--danger) 60%,transparent);
  box-shadow:0 18px 34px rgba(239,68,68,0.25);
}

.admin-stat-card .stat-icon{font-size:1.9rem;}

.admin-stat-card .stat-value{
  font-size:2rem;
  font-weight:700;
  line-height:1.1;
}

.admin-stat-card .stat-label{
  font-size:0.9rem;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-light);
}

.admin-stat-card p{
  margin:0;
  color:var(--text-light);
  font-size:0.9rem;
}

.admin-highlight-stack{
  display:grid;
  gap:0.85rem;
}

.admin-highlight{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:1rem 1.25rem;
  border-radius:calc(var(--admin-radius) - 6px);
  border:1px solid color-mix(in srgb,var(--primary) 40%,var(--border) 60%);
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
  color:inherit;
  text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease;
}

.admin-highlight:hover,
.admin-highlight:focus-visible{
  text-decoration:none;
  transform:translateX(4px);
  border-color:color-mix(in srgb,var(--primary) 60%,var(--border) 40%);
  box-shadow:0 12px 28px rgba(15,23,42,0.2);
}

.admin-highlight .highlight-icon{font-size:1.6rem;}

.admin-highlight .highlight-copy h3{
  margin:0;
  font-size:1.1rem;
}

.admin-highlight .highlight-copy p{
  margin:0.15rem 0 0;
  color:var(--text-light);
  font-size:0.95rem;
}

.admin-highlight .highlight-cta{
  margin-left:auto;
  font-weight:600;
  color:var(--primary);
}

.admin-flash-stack{
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.admin-flash-card{
  border-radius:calc(var(--admin-radius) - 6px);
  padding:1rem 1.15rem;
  border-left:4px solid currentColor;
  box-shadow:0 12px 28px rgba(15,23,42,0.18);
}

.admin-flash-card p{margin:0.15rem 0;}

.admin-dashboard .dashboard-section-card{
  display:flex;
  flex-direction:column;
  gap:var(--admin-card-gap);
  padding:var(--admin-card-padding);
  border-radius:var(--admin-radius);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  background:var(--surface);
  box-shadow:0 14px 34px rgba(15,23,42,0.18);
  margin:0;
  scroll-margin-top:6.5rem;
}

html.light-theme .admin-dashboard .dashboard-section-card{box-shadow:0 16px 30px rgba(15,23,42,0.12);}

.admin-dashboard .dashboard-section-card h2{
  margin:0;
  font-size:1.35rem;
  display:flex;
  align-items:center;
  gap:0.65rem;
}

.admin-dashboard details summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:0.6rem;
  padding:0.85rem 1.1rem;
  border-radius:calc(var(--admin-radius) - 6px);
  border:1px solid color-mix(in srgb,var(--border) 60%,transparent);
  background:color-mix(in srgb,var(--surface) 94%,var(--primary) 6%);
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.admin-dashboard details summary::-webkit-details-marker{display:none;}

.admin-dashboard details summary::before{
  content:"▸";
  color:var(--primary);
  font-size:0.95rem;
  transition:transform .2s ease;
}

.admin-dashboard details[open] summary{
  background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);
  border-color:color-mix(in srgb,var(--primary) 35%,var(--border) 65%);
}

.admin-dashboard details[open] summary::before{transform:rotate(90deg);}

.admin-dashboard .dashboard-section-card>details{
  border:none;
  padding:0;
  background:transparent;
}

.admin-dashboard .dashboard-section-card>details>:not(summary):not(script){padding:1rem 1.25rem;}

.admin-dashboard .dashboard-section-card>details>.table-responsive{
  padding:0;
  margin:0;
  border-radius:calc(var(--admin-radius) - 8px);
  box-shadow:none;
}

.admin-dashboard .dashboard-section-card>details>.table-responsive+.empty-message{padding:1rem 1.25rem 0;}

.admin-dashboard .dashboard-section-card>details .badge{margin-left:auto;}

.admin-dashboard .table-responsive{
  border-radius:calc(var(--admin-radius) - 6px);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  background:var(--surface);
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.admin-dashboard .dashboard-table th{
  background:color-mix(in srgb,var(--primary) 18%,var(--surface) 82%);
  text-transform:uppercase;
  letter-spacing:0.05em;
  font-size:0.78rem;
  font-weight:600;
}

.admin-dashboard .dashboard-table td{font-size:0.95rem;}

.admin-dashboard .dashboard-table tbody tr:nth-child(even){
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
}

.admin-dashboard .dashboard-table tbody tr:hover{
  background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);
}

.admin-dashboard .btn{
  border-radius:999px;
  padding:0.5rem 1.15rem;
  font-weight:600;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}

.admin-dashboard .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(15,23,42,0.2);
}

.admin-dashboard .btn:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.admin-dashboard .inline-form{
  display:flex;
  align-items:center;
  gap:0.5rem;
  flex-wrap:wrap;
}

.admin-dashboard .module-toggle-form{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

.admin-dashboard .toggle-control{
  display:flex;
  align-items:center;
  gap:0.75rem;
  flex-wrap:wrap;
}

.admin-dashboard .toggle-description{
  color:var(--text-light);
  max-width:520px;
  font-size:0.9rem;
}

.admin-content-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--admin-gap);
  justify-items:stretch;
  width:100%;
}

.admin-side-nav{
  position:sticky;
  top:calc(72px + 1.5rem);
  align-self:start;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
  padding:1.25rem 1.35rem;
  border-radius:var(--admin-radius);
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
  box-shadow:0 12px 30px rgba(15,23,42,0.18);
}

.admin-side-nav__title{
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--text-light);
  font-weight:700;
}

.admin-side-nav__list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:0.45rem;
  margin:0;
  padding:0;
}

.admin-side-nav__link{
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  padding:0.55rem 0.75rem;
  border-radius:12px;
  color:inherit;
  text-decoration:none;
  transition:background .2s ease,transform .2s ease,color .2s ease;
}

.admin-side-nav__link::before{content:"•";color:var(--primary);font-size:1.25rem;line-height:1;}

.admin-side-nav__link:hover,
.admin-side-nav__link:focus-visible{
  background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);
  transform:translateX(2px);
  text-decoration:none;
}

.admin-main-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:var(--admin-gap);
  align-items:stretch;
  width:100%;
}

.admin-main-grid>.dashboard-section-card{grid-column:span 6;}

.admin-main-grid>.admin-accordion{
  grid-column:1 / -1;
  width:var(--admin-accordion-width);
  max-width:100%;
  justify-self:center;
}

.admin-main-grid>.admin-centered.admin-accordion{
  grid-column:1 / -1;
  width:var(--admin-accordion-width);
  max-width:100%;
  justify-self:center;
}

.admin-main-grid>.admin-span-2{grid-column:span 12;}
.admin-main-grid>.admin-span-3{grid-column:span 9;}
.admin-main-grid>.admin-span-1{grid-column:span 3;}

.admin-main-grid>.admin-centered{
  grid-column:1 / -1;
  max-width:100%;
  justify-self:stretch;
}

@media(max-width:1180px){
  .admin-main-grid{gap:clamp(1.15rem,2.5vw,1.75rem);}
}

@media(max-width:1024px){
  .admin-dashboard{
    padding:clamp(2.25rem,6vw,3rem) clamp(1rem,5vw,1.75rem) clamp(2.75rem,6vw,3.5rem);
  }
  .admin-side-nav{
    position:relative;
    top:auto;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:0.6rem;
    padding:1rem;
  }
  .admin-side-nav__title{
    width:100%;
    margin-bottom:0.2rem;
  }
  .admin-side-nav__list{
    flex-direction:row;
    flex-wrap:wrap;
    gap:0.5rem;
    width:100%;
  }
  .admin-side-nav__link{
    border-radius:999px;
    padding:0.45rem 0.9rem;
  }
  .admin-main-grid{grid-template-columns:repeat(6,minmax(0,1fr));}
  .admin-main-grid>.admin-centered{grid-column:span 6;}
  .admin-main-grid>.dashboard-section-card,
  .admin-main-grid>.admin-span-3,
  .admin-main-grid>.admin-span-1{grid-column:span 6;}
  .admin-main-grid>.admin-accordion{
    grid-column:span 6;
    width:100%;
  }
  .admin-main-grid>.admin-centered.admin-accordion{
    grid-column:span 6;
    width:100%;
  }
}

@media(max-width:820px){
  .admin-hero{
    grid-template-columns:1fr;
    text-align:left;
  }
  .admin-hero-panel{order:2;}
}

@media(max-width:640px){
  .admin-dashboard{
    padding:clamp(2rem,8vw,2.5rem) 1rem clamp(2.75rem,8vw,3rem);
  }
  .admin-dashboard .dashboard-section-card{
    padding:clamp(1rem,4vw,1.35rem);
  }
  .admin-main-grid{grid-template-columns:1fr;}
  .admin-quick-actions{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:0.25rem;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .admin-dashboard .dashboard-table th,
  .admin-dashboard .dashboard-table td{
    white-space:normal;
    word-break:break-word;
    padding:0.55rem 0.65rem;
  }
  .admin-dashboard .inline-form{
    flex-direction:column;
    align-items:stretch;
    width:100%;
    gap:0.4rem;
  }
  .admin-dashboard .inline-form .btn{
    width:100%;
  }
  .admin-dashboard .inline-form input,
  .admin-dashboard .price-input{
    width:100%;
  }
  .admin-quick-actions::-webkit-scrollbar{height:4px;}
  .admin-quick-actions::-webkit-scrollbar-thumb{
    background:color-mix(in srgb,var(--primary) 55%,transparent);
    border-radius:999px;
  }
  .admin-chip{
    white-space:nowrap;
    scroll-snap-align:start;
  }
}

@media(max-width:520px){
  .admin-hero{padding:clamp(1.5rem,6vw,2rem);}
  .admin-stats-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));}
}

@media(max-width:480px){
  .admin-dashboard{
    padding:clamp(1.75rem,7vw,2.25rem) 0.75rem clamp(2.35rem,9vw,3rem);
  }
  .admin-hero{
    padding:clamp(1.25rem,6vw,1.75rem);
    gap:clamp(1rem,5vw,1.5rem);
  }
  .admin-hero .hero-badge{
    font-size:0.7rem;
    padding:0.35rem 0.75rem;
  }
  .admin-quick-actions{
    gap:0.45rem;
    padding-bottom:0.35rem;
  }
  .admin-chip{
    padding:0.4rem 0.8rem;
    font-size:0.8rem;
  }
  .admin-stats-grid{
    grid-template-columns:1fr;
    gap:0.75rem;
  }
  .admin-highlight{
    flex-direction:column;
    align-items:flex-start;
    gap:0.75rem;
  }
  .admin-highlight .highlight-cta{
    align-self:flex-start;
    margin-left:0;
  }
  .admin-dashboard .dashboard-section-card h2{
    font-size:1.15rem;
  }
  .admin-dashboard .dashboard-table th{
    font-size:0.72rem;
  }
  .admin-dashboard .dashboard-table td{
    font-size:0.88rem;
  }
  .admin-dashboard .btn{
    padding:0.55rem 0.85rem;
  }
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.4rem 0.95rem;
  background:rgba(79,134,255,0.18);
  border:1px solid var(--primary);
  border:1px solid color-mix(in srgb,var(--primary) 65%,transparent);
  border-radius:999px;
  color:var(--primary);
  font-size:0.75rem;
  font-weight:600;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.35rem 0.75rem;
  border-radius:999px;
  background:rgba(0,0,0,0.25);
  font-size:0.85rem;
  letter-spacing:0.05em;
  text-transform:uppercase;
}

.dashboard-hero h1{
  margin:0;
  font-size:2.25rem;
  font-weight:700;
  line-height:1.2;
}

.dashboard-hero p{
  margin:0;
  font-size:1.05rem;
  color:rgba(255,255,255,0.9);
}

.hero-illustration{
  position:relative;
  z-index:1;
  flex:0 0 auto;
  font-size:3rem;
  background:rgba(255,255,255,0.18);
  color:#fff;
  border-radius:16px;
  padding:1.25rem 1.75rem;
  box-shadow:0 10px 24px rgba(0,0,0,0.18);
}

.dashboard-summary,
.dashboard-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1.1rem;
  margin-bottom:2rem;
  padding:0;
  list-style:none;
}

.dashboard-stack{
  display:flex;
  flex-direction:column;
  gap:2rem;
  width:100%;
}

.dashboard-stack > .dashboard-metrics{
  margin-bottom:0;
}

.dashboard-stack > .highlight-banner{
  align-self:center;
  max-width:720px;
  width:100%;
}

.dashboard-stack > .notice{
  align-self:center;
  width:100%;
  max-width:640px;
}

.dashboard-duo{
  display:grid;
  gap:2rem;
}

.dashboard-split{
  display:grid;
  gap:2rem;
}

.dashboard-stack-sm{
  display:flex;
  flex-direction:column;
  gap:2rem;
}

.dashboard-stack-sm > .dashboard-card{
  height:100%;
}

@media(min-width: 900px){
  .dashboard-duo{
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
}

@media(min-width: 1024px){
  .dashboard-split{
    grid-template-columns:minmax(0,2fr) minmax(0,1.1fr);
    align-items:start;
  }
}

.summary-card,
.metric-card{
  position:relative;
  background:linear-gradient(145deg,rgba(255,255,255,0.08),rgba(255,255,255,0));
  border-radius:16px;
  padding:1.35rem;
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(12px);
  box-shadow:0 14px 32px rgba(15,23,42,0.2);
  display:flex;
  flex-direction:column;
  gap:0.65rem;
  transition:transform .25s ease, box-shadow .25s ease;
  align-items:flex-start;
}

.summary-card:hover,
.metric-card:hover{
  transform:translateY(-4px);
  box-shadow:0 24px 50px rgba(15,23,42,0.28);
}

.summary-icon,
.metric-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(255,255,255,0.1);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.15);
}

.summary-card h3,
.metric-title{
  margin:0;
  font-size:0.95rem;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.75);
}

.summary-card p,
.metric-value{
  margin:0;
  font-size:1.5rem;
  font-weight:600;
  color:#fff;
}

.metric-subtitle{
  margin:0;
  font-size:0.95rem;
  color:rgba(255,255,255,0.72);
}

.dashboard-metrics .metric-card{
  align-items:center;
  text-align:center;
  padding:1.5rem 1.35rem;
}

.dashboard-metrics .metric-value{
  font-size:2rem;
}

html.light-theme .metric-card{
  background:linear-gradient(160deg,rgba(255,255,255,0.9),rgba(255,255,255,0.72));
  border:1px solid rgba(99,102,241,0.16);
  color:var(--text);
}

html.light-theme .summary-card,
html.light-theme .metric-card{box-shadow:0 12px 30px rgba(15,23,42,0.08);}

html.light-theme .summary-card:hover,
html.light-theme .metric-card:hover{
  box-shadow:0 18px 36px rgba(15,23,42,0.1);
}

html.light-theme .metric-card .metric-icon{
  background:rgba(79,134,255,0.18);
  color:var(--primary);
}

html.light-theme .metric-card .metric-title{color:var(--primary);}
html.light-theme .metric-card .metric-subtitle{color:rgba(17,17,17,0.6);}

html.light-theme .summary-card h3,
html.light-theme .metric-title{color:rgba(30,41,59,0.65);} 

html.light-theme .summary-card p,
html.light-theme .metric-value{color:var(--accent);}

@media (max-width: 640px){
  .dashboard-metrics{
    grid-template-columns:minmax(0,1fr);
  }
}

@media (max-width: 720px){
  .dashboard-hero{
    padding:1.75rem 1.5rem;
  }

  .dashboard-hero h1{
    font-size:1.75rem;
  }

  .hero-illustration{
    font-size:2.5rem;
    padding:1rem 1.25rem;
  }

  .teacher-profile-grid{grid-template-columns:1fr;}
  .profile-card{grid-template-columns:1fr;}
  .highlight-banner{padding:1.25rem;}
}

@media (max-width: 520px){
  .hero-illustration{
    display:none;
  }
}

.edit-assignment-form{grid-template-columns:1fr;}
.edit-assignment-form .form-actions{display:flex;gap:0.5rem;margin-top:0.5rem;}

/* Shared dashboard cards */
.card-grid{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:1.1rem;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

.list-tile{
  background:var(--surface);
  border:1px solid rgba(148,163,184,0.2);
  border-radius:16px;
  padding:1.25rem;
  display:flex;
  flex-direction:column;
  gap:0.6rem;
  box-shadow:0 8px 24px rgba(15,23,42,0.12);
  transition:transform 0.25s ease, box-shadow 0.25s ease;
}

.list-tile:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 36px rgba(15,23,42,0.16);
}

.tile-link{
  display:flex;
  flex-direction:column;
  gap:0.4rem;
  color:inherit;
  text-decoration:none;
}

.tile-title{
  margin:0;
  font-size:1.05rem;
  font-weight:600;
  color:var(--text);
}

.tile-meta{
  margin:0;
  color:var(--text-light);
  font-size:0.92rem;
}

.tile-actions{
  display:flex;
  gap:0.65rem;
  flex-wrap:wrap;
}

.lesson-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:1.1rem;
}

.lesson-item{
  background:var(--surface);
  border:1px solid rgba(148,163,184,0.2);
  border-radius:16px;
  padding:1.25rem 1.4rem;
  display:flex;
  flex-direction:column;
  gap:0.85rem;
  box-shadow:0 8px 24px rgba(15,23,42,0.12);
  transition:transform 0.25s ease, box-shadow 0.25s ease;
}

.lesson-item:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 36px rgba(15,23,42,0.16);
}

.lesson-item-header{
  display:flex;
  justify-content:space-between;
  gap:0.85rem;
  flex-wrap:wrap;
  align-items:flex-start;
}

.lesson-item-title{
  margin:0;
  font-size:1.1rem;
  font-weight:600;
  color:var(--text);
}

.lesson-item-subtitle{
  margin:0.25rem 0 0;
  color:var(--text-light);
  font-size:0.95rem;
}

.lesson-meta-grid{
  display:grid;
  gap:0.85rem 1.25rem;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}

.lesson-label{
  display:block;
  font-size:0.78rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--text-light);
  margin-bottom:0.3rem;
}

.lesson-value{
  font-size:1rem;
  font-weight:600;
  color:var(--text);
}

.lesson-actions{
  display:flex;
  gap:0.7rem;
  flex-wrap:wrap;
  align-items:center;
}

.lesson-note{
  font-size:0.92rem;
  color:var(--text-light);
}

.status-badge{
  display:inline-flex;
  align-items:center;
  gap:0.4rem;
  border-radius:999px;
  padding:0.4rem 1rem;
  font-size:0.85rem;
  font-weight:600;
}

.status-planned{background:rgba(34,197,94,0.18);color:#15803d;}
.status-cancelled{background:rgba(239,68,68,0.2);color:#b91c1c;}
.status-pending{background:rgba(245,158,11,0.2);color:#c2410c;}
.status-denied{background:rgba(59,130,246,0.2);color:#1d4ed8;}

/* Student dashboard layout */
.dashboard-container.student-dashboard {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem;
}

.student-dashboard .dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.student-dashboard .dashboard-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 28px;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #fff;
  box-shadow: 0 18px 48px rgba(30, 64, 175, 0.28);
  position: relative;
  overflow: hidden;
}

.student-dashboard .dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 60%);
  opacity: 0.65;
  pointer-events: none;
}

.student-dashboard .dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.student-dashboard .hero-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 520px;
}

.student-dashboard .hero-illustration {
  align-self: flex-start;
  border-radius: 18px;
  padding: 1.25rem 1.75rem;
  background: rgba(15, 23, 42, 0.15);
  color: #fff;
  font-size: 3rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.student-dashboard .dashboard-metrics {
  width: 100%;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.student-dashboard .metric-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-dashboard .metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.student-dashboard .metric-icon {
  font-size: 2rem;
}

.student-dashboard .metric-title {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0;
}

.student-dashboard .metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
}

.student-dashboard .metric-subtitle {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.student-dashboard .notice {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.student-dashboard .notice p {
  margin: 0;
}

.student-dashboard .notice-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #047857;
}

.student-dashboard .notice-error {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.28);
  color: #b91c1c;
}

.student-dashboard .dashboard-card {
  width: 100%;
  background: var(--surface);
  border-radius: 22px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.student-dashboard .card-header {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.student-dashboard .card-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.student-dashboard .card-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-light);
  font-size: 0.98rem;
}

.student-dashboard .card-grid {
  display: grid;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.student-dashboard .list-tile {
  background: var(--surface-hover);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-dashboard .list-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.student-dashboard .tile-link {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.student-dashboard .tile-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.student-dashboard .tile-meta {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.student-dashboard .tile-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.student-dashboard .lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.student-dashboard .lesson-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: var(--surface-hover);
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-dashboard .lesson-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.student-dashboard .lesson-item-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.student-dashboard .lesson-item-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.student-dashboard .lesson-item-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.student-dashboard .lesson-meta-grid {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.student-dashboard .lesson-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.student-dashboard .lesson-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.student-dashboard .lesson-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.student-dashboard .lesson-note {
  font-size: 0.92rem;
  color: var(--text-light);
}

.student-dashboard .upcoming-lessons-card {
  padding: clamp(1.2rem, 2.6vw, 1.9rem);
  gap: 1.05rem;
}

.student-dashboard .upcoming-lessons-card .card-header {
  margin-bottom: 0.2rem;
}

.student-dashboard .upcoming-lessons-card .lesson-list {
  gap: clamp(0.85rem, 2.2vw, 1.05rem);
}

.student-dashboard .upcoming-lessons-card .lesson-item {
  padding: clamp(1rem, 2.6vw, 1.35rem);
  gap: 0.75rem;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.student-dashboard .upcoming-lessons-card .lesson-item-header {
  gap: 0.75rem;
}

.student-dashboard .upcoming-lessons-card .lesson-item-title {
  font-size: 1.12rem;
}

.student-dashboard .upcoming-lessons-card .lesson-meta-grid {
  gap: 0.7rem 1.1rem;
}

.student-dashboard .upcoming-lessons-card .lesson-label {
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
}

.student-dashboard .upcoming-lessons-card .lesson-actions {
  gap: 0.6rem;
}

#teacher-dashboard .upcoming-lessons-card {
  padding: clamp(1.05rem, 1.9vw, 1.45rem);
  gap: clamp(0.7rem, 1.6vw, 1rem);
}

#teacher-dashboard .upcoming-lessons-card .card-header {
  margin-bottom: 0.15rem;
}

#teacher-dashboard .upcoming-lessons-card .lesson-list {
  gap: clamp(0.65rem, 1.6vw, 0.95rem);
}

#teacher-dashboard .upcoming-lessons-card .lesson-item {
  padding: clamp(0.75rem, 1.4vw, 1rem) clamp(0.9rem, 1.6vw, 1.25rem);
  gap: clamp(0.45rem, 1.3vw, 0.7rem);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  border-radius: 14px;
}

#teacher-dashboard .upcoming-lessons-card .lesson-item.lesson-item-streamlined {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(4px);
}

#teacher-dashboard .upcoming-lessons-card .lesson-item-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
  gap: clamp(0.45rem, 1.1vw, 0.8rem);
}

#teacher-dashboard .upcoming-lessons-card .lesson-time {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#teacher-dashboard .upcoming-lessons-card .lesson-hour {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

#teacher-dashboard .upcoming-lessons-card .lesson-student {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#teacher-dashboard .upcoming-lessons-card .lesson-student-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

#teacher-dashboard .upcoming-lessons-card .lesson-item-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

#teacher-dashboard .upcoming-lessons-card .lesson-link-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

#teacher-dashboard .upcoming-lessons-card .lesson-link-state::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}

#teacher-dashboard .upcoming-lessons-card .lesson-link-state.link-ready {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.18);
}

#teacher-dashboard .upcoming-lessons-card .lesson-link-state.link-missing {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.16);
}

#teacher-dashboard .upcoming-lessons-card .lesson-note {
  font-size: 0.86rem;
}

.student-dashboard .cancellation-form {
  margin-top: 0.75rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.student-dashboard .cancellation-form .inline-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.student-dashboard .cancellation-form input[type="text"] {
  flex: 1 1 240px;
}

.student-dashboard .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.student-dashboard .status-planned {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.student-dashboard .status-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.student-dashboard .status-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #c2410c;
}

.student-dashboard .status-denied {
  background: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

.student-dashboard .empty-state {
  margin: 0;
  text-align: center;
  padding: 1.75rem;
  border-radius: 18px;
  background: var(--surface-hover);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  color: var(--text-light);
}

@media (min-width: 960px) {
  .student-dashboard .dashboard-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .student-dashboard .hero-content {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .dashboard-container.student-dashboard {
    padding: 2rem 1.25rem 2.5rem;
  }

  .student-dashboard .card-title {
    font-size: 1.35rem;
  }

  .student-dashboard .metric-value {
    font-size: 2rem;
  }
}
/* Teacher dashboard layout */
#teacher-dashboard.dashboard-container{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
}
.dashboard-teacher {
  display:flex;
  flex-direction:column;
  gap:1.5rem;
}


.dashboard-teacher .dashboard-card,
.dashboard-teacher .highlight-banner{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
}

.dashboard-teacher .dashboard-metrics{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto 2rem;
}

.student-dashboard .highlight-banner{
  width:100%;
}


.dashboard-teacher .dashboard-section-card {
  border:1px solid var(--border);
  padding:1.5rem;
  border-radius:8px;
  width:100%;
  margin:0 auto;
  min-width:0;
}

@media (min-width: 1100px) {
  .dashboard-teacher .dashboard-section-card {
    width:80%;
  }
}

.dashboard-teacher .group-list,
.dashboard-teacher .meeting-list {
  display:grid;
  gap:0.75rem;
  list-style:none;
  padding-left:0;
}

.dashboard-teacher .group-card,
.dashboard-teacher .meeting-card {
  border:1px solid var(--border);
  border-radius:6px;
  padding:0.75rem 1rem;
  transition:background-color .2s, box-shadow .2s;
}
.dashboard-teacher .group-card:hover,
.dashboard-teacher .meeting-card:hover {
  background:var(--surface-hover);
  box-shadow:0 2px 8px rgba(0,0,0,0.2);
}

.dashboard-teacher .dashboard-table th {
  background:var(--surface);
  border-bottom:2px solid var(--border);
}
.dashboard-teacher .dashboard-table tbody tr:hover {
  background:var(--surface-hover);
}

/* Teacher dashboard aesthetic tweaks */
.dashboard-teacher .dashboard-section-card {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.dashboard-teacher .section-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.dashboard-teacher .teacher-card {
  text-align: center;
}

.dashboard-teacher .teacher-avatar img,
.dashboard-teacher .avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-hover);
}

.dashboard-teacher .profile-edit-form textarea {
  min-height: 120px;
}

.dashboard-teacher .group-card a,
.dashboard-teacher .meeting-card a {
  color: inherit;
  text-decoration: none;
}

.dashboard-teacher .group-card a:hover,
.dashboard-teacher .meeting-card a:hover {
  text-decoration: underline;
}

.dashboard-teacher .meta {
  font-size: 0.9rem;
  color: var(--text-light);
}

.dashboard-teacher .btn {
  align-self: flex-start;
}

.dashboard-teacher .empty-message {
  text-align: center;
  color: var(--text-light);
}

#teacher-dashboard .dashboard-hero{
  padding:clamp(1.25rem,3vw,1.85rem) clamp(1.4rem,3vw,2rem);
  margin-bottom:clamp(1.25rem,3vw,1.75rem);
  border-radius:18px;
}

#teacher-dashboard .hero-content{
  max-width:min(420px,60%);
}

#teacher-dashboard .hero-illustration{
  font-size:clamp(2.4rem,4vw,3.2rem);
  padding:clamp(0.85rem,2vw,1.25rem) clamp(1.1rem,2.5vw,1.65rem);
}

#teacher-dashboard .dashboard-stack,
#teacher-dashboard .quick-highlights,
#teacher-dashboard .dashboard-metrics,
#teacher-dashboard .dashboard-duo,
#teacher-dashboard .dashboard-split{
  width:min(100%,1100px);
  margin-left:auto;
  margin-right:auto;
}

#teacher-dashboard .dashboard-stack{
  gap:clamp(1.5rem,2.5vw,2.25rem);
}

#teacher-dashboard .quick-highlights{
  gap:clamp(0.85rem,2vw,1.25rem);
  margin-bottom:clamp(1.25rem,3vw,1.9rem);
  justify-items:stretch;
}

#teacher-dashboard .quick-card{
  padding:clamp(1.15rem,1.8vw,1.6rem);
  align-items:flex-start;
  text-align:left;
  gap:clamp(0.6rem,1.4vw,0.9rem);
}

#teacher-dashboard .quick-card-actions{
  justify-content:flex-start;
}

#teacher-dashboard .dashboard-metrics{
  gap:clamp(0.9rem,2.5vw,1.35rem);
  justify-items:stretch;
}

#teacher-dashboard .metric-card{
  min-height:160px;
  align-items:flex-start;
  text-align:left;
  padding:clamp(1.2rem,2vw,1.55rem);
}

#teacher-dashboard .metric-card .metric-icon{
  margin-bottom:0.25rem;
}

#teacher-dashboard .dashboard-card{
  padding:clamp(1.25rem,2vw,1.75rem);
  gap:clamp(0.85rem,2vw,1.25rem);
  box-shadow:0 12px 28px rgba(15,23,42,0.16);
}

#teacher-dashboard .dashboard-card:hover{
  box-shadow:0 18px 42px rgba(15,23,42,0.2);
}

#teacher-dashboard .card-grid{
  align-items:stretch;
}

#teacher-dashboard .list-tile{
  height:100%;
}

#teacher-dashboard .dashboard-duo,
#teacher-dashboard .dashboard-split{
  gap:clamp(1.5rem,2.5vw,2rem);
}

#teacher-dashboard .dashboard-split{
  align-items:stretch;
}

#teacher-dashboard .lesson-list{
  gap:clamp(0.85rem,1.8vw,1.15rem);
}

#teacher-dashboard .lesson-item{
  padding:clamp(1rem,1.6vw,1.35rem) clamp(1.1rem,2vw,1.5rem);
  gap:clamp(0.7rem,1.6vw,1rem);
}

#teacher-dashboard .profile-card{
  grid-template-columns:minmax(0,240px) minmax(0,1fr);
  gap:clamp(1.2rem,2.4vw,1.8rem);
}

#teacher-dashboard .profile-card .profile-summary{
  display:flex;
  align-items:flex-start;
  gap:clamp(0.9rem,1.8vw,1.4rem);
  padding:clamp(1.1rem,1.8vw,1.6rem);
}

#teacher-dashboard .profile-card .profile-avatar{
  width:72px;
  height:72px;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:var(--surface-elevated, #fff);
  box-shadow:0 6px 20px rgba(15,23,42,0.18);
}

#teacher-dashboard .profile-card .profile-avatar img,
#teacher-dashboard .profile-card .profile-avatar .avatar-placeholder{
  width:100%;
  height:100%;
  border-radius:inherit;
  object-fit:cover;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.4rem;
}

#teacher-dashboard .profile-card .profile-details{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:0.35rem;
}

#teacher-dashboard .profile-card .profile-name{
  margin:0 0 0.35rem;
  font-size:1.15rem;
  font-weight:600;
}

#teacher-dashboard .profile-card .profile-bio{
  margin:0;
  color:var(--text-light);
  line-height:1.5;
  font-size:0.95rem;
}

#teacher-dashboard .profile-editor{
  padding:clamp(1rem,1.8vw,1.45rem);
}

#teacher-dashboard .profile-editor-actions{
  justify-content:flex-end;
}

#teacher-dashboard .lesson-actions{
  gap:clamp(0.5rem,1.8vw,0.8rem);
}

@media (min-width: 1024px){
  #teacher-dashboard .dashboard-split{
    grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);
  }
}

@media (max-width: 780px){
  #teacher-dashboard .profile-card{
    grid-template-columns:1fr;
  }

  #teacher-dashboard .profile-card .profile-summary{
    max-width:360px;
    margin:0 auto;
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  #teacher-dashboard .profile-card .profile-details{
    align-items:center;
    text-align:center;
  }
}

@media (max-width: 720px){
  #teacher-dashboard .dashboard-card{
    padding:1.1rem 1.25rem;
  }

  #teacher-dashboard .quick-card-actions{
    flex-direction:column;
    align-items:stretch;
  }

  #teacher-dashboard .quick-card-actions .btn{
    width:100%;
  }

  #teacher-dashboard .upcoming-lessons-card .lesson-item-main{
    grid-template-columns:1fr;
    gap:0.75rem;
  }

  #teacher-dashboard .upcoming-lessons-card .lesson-item-footer{
    flex-direction:column;
    align-items:stretch;
  }

  #teacher-dashboard .upcoming-lessons-card .lesson-item-footer .btn{
    width:100%;
  }

  #teacher-dashboard .dashboard-metrics{
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:1rem;
  }
}

@media (max-width: 640px){
  #teacher-dashboard .dashboard-metrics{
    grid-template-columns:1fr;
  }

  #teacher-dashboard .inline-form.compact-grid{
    align-items:stretch;
  }

  #teacher-dashboard .inline-form.compact-grid > *{
    width:100%;
  }

  #teacher-dashboard .availability-toolbar{
    flex-direction:column;
    align-items:stretch;
    gap:0.85rem;
  }

  #teacher-dashboard .availability-actions-group{
    width:100%;
    justify-content:space-between;
  }

  #teacher-dashboard .availability-actions-group .btn{
    flex:1 1 calc(50% - 0.5rem);
  }

  #teacher-dashboard .availability-timezone{
    text-align:left;
  }
}

/* Collapse elements */
details summary::-webkit-details-marker{display:none;}
details summary{list-style:none;}
details summary::before{content:"▶";display:inline-block;margin-right:.4rem;transition:transform .2s;}
details[open] summary::before{transform:rotate(90deg);}

/* ======================= */
/*      Settings Page      */
/* ======================= */

.settings-form{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
  max-width:480px;
  margin:2rem auto;
}

.settings-form fieldset{
  border:1px solid var(--border);
  border-radius:6px;
  padding:1rem;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.settings-form legend{
  font-weight:600;
  color:var(--primary);
  margin-bottom:0.5rem;
}

.radio-btn,
.switch{
  display:flex;
  align-items:center;
  gap:0.5rem;
  cursor:pointer;
  user-select:none;
}

.radio-btn input{display:none;}

.radio-mark{
  width:16px;
  height:16px;
  border:2px solid var(--primary);
  border-radius:50%;
  position:relative;
  display:inline-block;
}

.radio-btn input:checked + .radio-mark::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:8px;
  height:8px;
  background:var(--primary);
  border-radius:50%;
}

.switch input{display:none;}

.slider{
  position:relative;
  width:40px;
  height:22px;
  background:#ccc;
  border-radius:22px;
  transition:background-color .3s;
}

.slider::before{
  content:"";
  position:absolute;
  left:3px;
  top:3px;
  width:16px;
  height:16px;
  background:#fff;
  border-radius:50%;
  transition:transform .3s;
}

.switch input:checked + .slider{background:var(--primary);}
.switch input:checked + .slider::before{transform:translateX(18px);}

.alert{ 
  padding:0.75rem 1rem;
  border-radius:4px;
  margin-bottom:1rem;
}

.alert-success{
  background:#d1e7dd;
  color:#0f5132;
  border:1px solid #badbcc;
}
.alert-error{
  background:#f8d7da;
  color:#721c24;
  border:1px solid #f5c6cb;
}
.alert-info{
  background:#d1ecf1;
  color:#0c5460;
  border:1px solid #bee5eb;
}

.settings-form button{
  align-self:flex-start;
}

.settings-page h1{
  text-align:center;
  margin-bottom:1rem;
}

/* ============================================ */
/*            Enhanced Theme Styles             */
/* ============================================ */
:root {
  --success: #2ecc71;
  --info: #3498db;
  --warning: #e67e22;
  --danger: #e74c3c;
  --gradient-start: #1e3a8a;
  --gradient-end: #3b82f6;
  --font-code: 'Courier New', monospace;
}

/* Gradient backgrounds */
.bg-gradient {
  background-image: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
}

/* Code block styling */
pre, code {
  font-family: var(--font-code);
  background: var(--surface);
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  color: #fff;
}
.badge.success { background: var(--success); }
.badge.info { background: var(--info); }
.badge.warning { background: var(--warning); }
.badge.danger { background: var(--danger); }

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.breadcrumb li+li:before {
  content: "/";
  padding: 0 0.5rem;
  color: var(--text-light);
}

/* Progress bar */
.progress {
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  height: 1rem;
  margin-bottom: 1rem;
}
.progress__bar {
  background: var(--primary);
  height: 100%;
  transition: width 0.3s;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9990;
}
.modal {
  background: var(--surface);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  max-width: 480px;
  width: 90%;
}
.modal.active, .modal-overlay.active { display: flex; }

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.tab.active {
  border-color: var(--primary);
  color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Card accent */
.card-accent {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}
.card-hover:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Table striped rows */
.table-striped tbody tr:nth-child(odd) {
  background: var(--surface-hover);
}

/* Floating label */
.floating-label {
  position: relative;
}
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:not(:placeholder-shown) + label {
  top: -0.6rem;
  left: 0.5rem;
  background: var(--surface);
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: var(--text-light);
}
.floating-label label {
  position: absolute;
  left: 0.75rem;
  top: 0.65rem;
  pointer-events: none;
  transition: all 0.2s;
  color: var(--text-light);
}

/* Utilities */
.rounded-full { border-radius: 9999px; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.25rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 8px 16px rgba(0,0,0,0.2); }

/* Accordion */
.accordion {
  border: 1px solid var(--border);
  border-radius: 4px;
}
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-header {
  background: var(--surface);
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
}
.accordion-body {
  padding: 1rem;
  background: var(--surface-hover);
}

/* Toast */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Avatar group */
.avatar-group {
  display: flex;
  align-items: center;
}
.avatar-group .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--background);
  margin-left: -0.5rem;
}
.avatar-group .avatar:first-child { margin-left: 0; }
/* -------------------------------------------- */
/*              New Enhanced Layout             */
/* -------------------------------------------- */

.hero-banner {
  position: relative;
  --gradient-start: #0f172a;
  --gradient-end: #1e3a8a;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  text-align: center;
  padding: 6rem 1rem;
}
.hero-banner .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 0;
}
.hero-banner .header-left {
  padding: 3rem 2rem;
  height: 100%;
}
.hero-banner .hero-contact {
  flex: 1;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  color: var(--text);
}
.hero-banner .hero-contact a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.hero-banner .hero-contact a:first-child {
  font-size: 1.5rem;
}
.hero-banner .hero-contact a:last-child {
  font-size: 2.5rem;
}
.hero-banner .hero-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  width: 90%;
  margin: auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem;
}

.hero-banner .promo-cards {
  width: 100%;
}

/* Light theme adjustments for the hero banner */
html.light-theme .hero-banner {
  --gradient-start: #e0e7ff;
  --gradient-end: #c7d2fe;
  color: var(--text);
}
html.light-theme .hero-banner .hero-overlay {
  background: rgba(255,255,255,0.4);
}
html.light-theme .hero-banner .tagline {
  color: var(--text-light);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-card {
  padding: 1.5rem;
  text-align: center;
  background: var(--background);
  border: none;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

html.light-theme .contact-card {
  box-shadow: none;
}
.contact-card .contact-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.contact-details {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.contact-details li {
  font-size: 1.25rem;
}
#contact > p {
  text-align: center;
}

/* Floating label variant for forms */
.form-floating {
  position: relative;
}
.form-floating label {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  background: var(--surface);
  padding: 0 0.25rem;
  color: var(--text-light);
  transition: all 0.2s;
  pointer-events: none;
}
.form-floating input:not(:placeholder-shown) + label,
.form-floating textarea:not(:placeholder-shown) + label {
  top: -0.6rem;
  left: 0.5rem;
  font-size: 0.75rem;
}

/* Teacher profile grid improvements */
.teacher-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}
.teacher-profile-grid .teacher-card {
  width: 100%;
}
.teacher-profile-grid .teacher-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}
.teacher-profile-grid .teacher-avatar {
  text-align: center;
}
.teacher-profile-grid .profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface-hover);
}
.teacher-profile-grid textarea {
  resize: vertical;
  min-height: 120px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dashboard-header h1 {
  margin: 0;
  font-size: 2rem;
}

/* Teacher card badges and hover */
.teacher-card .badge {
  margin-top: 0.25rem;
}
.teacher-card.compact {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}
.teacher-card.compact .teacher-info {
  margin-left: 1rem;
  margin-top: 0;
}

.card-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.card-list .card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-list .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Improved table styles */
.table-styled th {
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem;
  text-align: left;
}
.table-styled td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.table-styled tr:nth-child(even) {
  background: var(--surface-hover);
}

/* Dashboard sidebar (optional) */
.dashboard-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
  margin-right: 1rem;
}
.dashboard-sidebar ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dashboard-sidebar li a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.dashboard-sidebar li a:hover {
  background: var(--surface-hover);
}

/* Contact success/error messages */
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

/* Teachers grid improvements */
.teachers-list.compact .teacher-card {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.teachers-list.compact .teacher-card:hover {
  background: var(--surface-hover);
}
.teachers-list.compact .teacher-info {
  margin-left: 0;
  margin-top: 0.5rem;
}

/* Minor utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }

/* -------------------------------------------- */
/*           Additional Polishing Styles        */
/* -------------------------------------------- */

/* Blue accents & gradients */
.bg-blue {
  background-color: #1e40af;
  color: #fff;
}
.text-blue { color: #1e40af; }
.border-blue { border-color: #1e40af; }
.gradient-blue {
  background-image: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6);
  color: #fff;
}

/* Callout component */
.callout {
  border-left: 4px solid var(--accent);
  padding: 1rem;
  background: var(--surface);
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.callout h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

/* Info boxes */
.info-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  background: var(--surface-hover);
  color: var(--text);
}
.chip.blue { background: #1e40af; color: #fff; }
.chip.deadline { background: #dc2626; color: #fff; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--background);
}

/* Nav pills */
.nav-pills {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.nav-pills a {
  padding: 0.5rem 1rem;
  border-radius: 4px 4px 0 0;
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-pills a.active {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
}

/* Sortable tables */
.table-sortable th {
  cursor: pointer;
}
.table-sortable th:hover {
  background: var(--surface-hover);
}

/* Wide containers */
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }

/* Footer tweaks */
footer .socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
footer .socials a {
  color: var(--text-light);
  transition: color 0.2s;
}
footer .socials a:hover {
  color: var(--accent);
}

/* Responsive adjustments */
@media(min-width: 1024px) {
  .hero-banner { padding: 8rem 1rem; }
  .contact-container { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
}

@media(max-width: 480px) {
  .callout { padding: 0.75rem; }
  .info-boxes { grid-template-columns: 1fr; }
}

/* Fancy cards */
.fancy-card {
  position: relative;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fancy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(59,130,246,0.3));
  opacity: 0;
  transition: opacity 0.3s;
}
.fancy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.fancy-card:hover::before { opacity: 1; }

/* Progress circle */
.progress-circle {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid var(--surface-hover);
  border-top-color: var(--primary);
  animation: rotate 1s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

/* Overlay helper */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

/* Vertical centering */
.v-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gradient borders */
.gradient-border {
  position: relative;
  padding: 2px;
  border-radius: 8px;
  background: linear-gradient(45deg, #1e40af, #3b82f6);
}
.gradient-border > .inner {
  background: var(--surface);
  border-radius: 6px;
  padding: 1rem;
}

/* Skeleton loader */
.skeleton{background:linear-gradient(90deg,var(--card) 25%,#1a1f26 37%,var(--card) 63%);background-size:400% 100%;animation:skeleton-loading 1.4s ease infinite;border-radius:var(--radius);}
@keyframes skeleton-loading{0%{background-position:100% 50%;}100%{background-position:0 50%;}}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms!important;animation-iteration-count:1!important;transition-duration:0s!important;}
}

/* Ranking table styles */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ranking-table th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 0.5rem 0.75rem;
}

.ranking-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ranking-table td:first-child {
  text-align: center;
  font-weight: 600;
}

.ranking-table tbody tr:nth-child(even):not(.rank-1):not(.rank-2):not(.rank-3) {
  background: var(--surface-hover);
}

.ranking-table tr.rank-1 {
  background: var(--ranking-gold);
}

.ranking-table tr.rank-2 {
  background: var(--ranking-silver);
}

.ranking-table tr.rank-3 {
  background: var(--ranking-bronze);
}

/* Hidden students list styles */
.hidden-students-title {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
}

.hidden-students {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.hidden-students li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.hidden-students li:last-child {
  border-bottom: none;
}

.btn-hide {
  background: var(--danger);
  color: #fff;
  border: 0;
  transition: background-color .2s;
}

.btn-hide:hover {
  background: #b71c1c;
}

.btn-show {
  background: var(--primary);
  color: #fff;
  border: 0;
  transition: background-color .2s;
}

.btn-show:hover {
  background: var(--secondary);
}

.upload-progress {
  display: none;
  margin-top: 0.5rem;
}
.upload-progress progress {
  width: 100%;
  height: 1rem;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius);
  overflow: hidden;
}
.upload-progress progress::-webkit-progress-bar {
  background-color: var(--border);
  border-radius: var(--radius);
}
.upload-progress progress::-webkit-progress-value {
  background-color: var(--primary);
  border-radius: var(--radius);
}
.upload-progress progress::-moz-progress-bar {
  background-color: var(--primary);
  border-radius: var(--radius);
}

/* Course pages: OMJ & OIJ theme overrides */
.course-page--omj {
  --primary: #8e2de2;
  --hero-light: #e3d2ff;
  --hero-dark: #5a1ebc;
}

.course-page--oij {
  --primary: #00b4db;
  --hero-light: #b3eaf7;
  --hero-dark: #006d84;
}

.course-page .hero {
  color: var(--text);
}

html.light-theme .course-page .hero {
  background: var(--hero-light, var(--primary));
}

html:not(.light-theme) .course-page .hero {
  background: var(--hero-dark, var(--primary));
}

.course-page .hero h1 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.course-page .hero p {
  color: var(--text);
}

.course-page .features,
.course-page .pricing,
.course-page .contact-section {
  background: var(--surface);
  color: var(--text);
}

.course-page .features-list li {
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform .2s, box-shadow .2s;
}

.course-page .features-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.course-page .pricing-card,
.course-page .contact-section {
  border-top: 4px solid var(--primary);
}

/* Chat styles */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.message {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  max-width: 70%;
}

.message.me {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
}

.message.other {
  align-self: flex-start;
  background: var(--surface-hover);
  color: var(--text);
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chat-input textarea {
  flex: 1;
  resize: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.chat-input button {
  padding: 0.5rem 1rem;
}

/* Student-teacher and teacher-student panel layout */
#student-teachers .st-container,
#teacher-students .st-container {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

#student-teachers .detail-panel,
#student-teachers .chat-panel,
#teacher-students .detail-panel,
#teacher-students .chat-panel {
  flex: 1;
}

#student-teachers .detail-panel,
#teacher-students .detail-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 2;
}

#student-teachers .detail-panel .dashboard-section-card,
#student-teachers .detail-panel .table-responsive,
#teacher-students .detail-panel .dashboard-section-card,
#teacher-students .detail-panel .table-responsive {
  width: 100%;
}

#student-teachers .chat-panel,
#teacher-students .chat-panel {
  display: flex;
  flex-direction: column;
  max-width: 35%;
  align-self: flex-start;
}

#student-teachers #messages,
#teacher-students #messages {
  height: 300px;
  margin-bottom: 0.5rem;
}

#student-teachers .teacher-info-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 14px);
  background: linear-gradient(135deg, rgba(72,45,255,0.75), rgba(14,23,42,0.85));
  color: #fff;
  box-shadow: 0 28px 50px rgba(10,12,21,0.4);
}

html.light-theme #student-teachers .teacher-info-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(59,130,246,0.12));
  color: var(--text);
  box-shadow: 0 24px 45px rgba(15,23,42,0.18);
}

#student-teachers .teacher-info-card__background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.25), transparent 55%),
              radial-gradient(circle at 85% 15%, rgba(56,189,248,0.2), transparent 55%),
              linear-gradient(135deg, rgba(124,58,237,0.3), rgba(59,130,246,0.4));
  opacity: 0.75;
  pointer-events: none;
}

#student-teachers .teacher-info-card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 2.25rem clamp(1.25rem, 3vw, 2.5rem);
}

#student-teachers .teacher-info-card__header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

#student-teachers .teacher-info-card__avatar {
  width: 120px;
  height: 120px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(10,12,24,0.45);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

#student-teachers .teacher-info-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  border: 4px solid rgba(255,255,255,0.35);
}

#student-teachers .teacher-info-card__avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: none;
  background: rgba(255,255,255,0.18);
  color: rgba(9,11,18,0.85);
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.light-theme #student-teachers .teacher-info-card__avatar {
  background: rgba(17,17,17,0.05);
}

#teacher-students .dashboard-title {
  text-align: left;
  font-size: 2.2rem;
  margin-bottom: 1.75rem;
}

#teacher-students .student-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(129,140,248,0.38));
  border: 1px solid rgba(79,134,255,0.25);
  box-shadow: 0 28px 48px rgba(10,20,45,0.35);
  color: #fff;
}

html.light-theme #teacher-students .student-overview-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(129,140,248,0.18));
  color: var(--text);
  box-shadow: 0 20px 32px rgba(15,23,42,0.15);
}

#teacher-students .student-overview-card__background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(255,255,255,0.28), transparent 60%),
              radial-gradient(circle at 82% 8%, rgba(14,165,233,0.38), transparent 58%),
              linear-gradient(135deg, rgba(124,58,237,0.25), rgba(37,99,235,0.35));
  opacity: 0.75;
  pointer-events: none;
}

#teacher-students .student-overview-card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.35rem clamp(1.5rem, 3vw, 2.85rem);
}

#teacher-students .student-overview-card__header {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

#teacher-students .student-overview-card__avatar {
  width: 110px;
  height: 110px;
  border-radius: 32px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 18px 36px rgba(15,23,42,0.32);
  overflow: hidden;
}

#teacher-students .student-overview-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  border: 4px solid rgba(255,255,255,0.35);
}

html.light-theme #teacher-students .student-overview-card__avatar {
  background: rgba(17,17,17,0.08);
  color: var(--text);
  box-shadow: 0 16px 28px rgba(15,23,42,0.15);
}

html.light-theme #teacher-students .student-overview-card__avatar img {
  border-color: rgba(17,17,17,0.12);
}

#teacher-students .student-overview-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 220px;
}

#teacher-students .student-overview-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

#teacher-students .student-overview-card__info h2 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.15;
}

#teacher-students .student-overview-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html.light-theme #teacher-students .student-overview-card__badge {
  background: rgba(17,17,17,0.08);
}

#teacher-students .student-overview-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.95rem;
}

#teacher-students .student-overview-card__meta a {
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,0.18);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

html.light-theme #teacher-students .student-overview-card__meta a {
  background: rgba(17,17,17,0.08);
}

#teacher-students .student-overview-card__actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#teacher-students .student-overview-card__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#teacher-students .student-overview-card__stats li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
}

html.light-theme #teacher-students .student-overview-card__stats li {
  background: rgba(17,17,17,0.08);
}

#teacher-students .student-overview-card__stats-icon {
  font-size: 1.5rem;
}

#teacher-students .student-overview-card__stats-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

#teacher-students .student-overview-card__stats-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#teacher-students .student-overview-card__schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

#teacher-students .student-overview-card__schedule-block {
  background: rgba(0,0,0,0.28);
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(15,23,42,0.32);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

html.light-theme #teacher-students .student-overview-card__schedule-block {
  background: rgba(17,17,17,0.08);
  box-shadow: 0 16px 28px rgba(15,23,42,0.14);
}

#teacher-students .student-overview-card__schedule-block h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

#teacher-students .student-overview-card__schedule-block p {
  margin: 0;
}

#teacher-students .student-overview-card__note {
  font-size: 0.9rem;
  opacity: 0.85;
}

html.light-theme #student-teachers .teacher-info-card__avatar img {
  border-color: rgba(17,17,17,0.1);
}

#student-teachers .teacher-info-card__intro {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#student-teachers .teacher-info-card__eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

#student-teachers .teacher-info-card__intro h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.2;
}

#student-teachers .teacher-info-card__subtitle {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.5;
}

#student-teachers .teacher-info-card__bio {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
}

html.light-theme #student-teachers .teacher-info-card__bio {
  color: var(--text);
  opacity: 0.95;
}

#student-teachers .teacher-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#student-teachers .teacher-insights li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(6px);
}

html.light-theme #student-teachers .teacher-insights li {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(17,17,17,0.08);
}

#student-teachers .teacher-insights__icon {
  font-size: 1.4rem;
}

#student-teachers .teacher-insights__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

#student-teachers .teacher-insights__label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#student-teachers .teacher-info-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

html.light-theme #student-teachers .teacher-info-cta {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(17,17,17,0.08);
}

#student-teachers .teacher-info-cta p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

#student-teachers .teacher-info-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#student-teachers .teacher-info-cta__actions .btn {
  min-width: 200px;
  box-shadow: 0 16px 32px rgba(15,23,42,0.25);
}

#student-teachers .teacher-info-cta__actions .btn.btn-open {
  background: linear-gradient(135deg,#6366f1,#7c3aed);
  border: 0;
  color: #fff;
}

#student-teachers .teacher-info-cta__actions .btn.btn-secondary {
  border: 0;
  box-shadow: 0 16px 32px rgba(14,116,144,0.3);
}

#student-teachers .back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary);
  text-decoration: none;
}

#student-teachers .back-link:hover {
  text-decoration: underline;
}

#student-teachers h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  #student-teachers .st-container,
  #teacher-students .st-container {
    flex-direction: column;
  }
  #student-teachers .chat-panel,
  #teacher-students .chat-panel {
    max-width: 100%;
    align-self: stretch;
  }
  #student-teachers .teacher-info-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
  #student-teachers .teacher-info-card__avatar {
    width: 100px;
    height: 100px;
  }
  #student-teachers .teacher-info-card__intro h2 {
    font-size: 1.8rem;
  }
  #student-teachers .teacher-info-cta__actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }
  #teacher-students .student-overview-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
  #teacher-students .student-overview-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
  #teacher-students .student-overview-card__actions .btn {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: center;
  }
  #teacher-students .student-overview-card__stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}
/* Landing page new layout */
.intro-banner {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  margin: 2rem auto 0;
  padding: 2.75rem;
  max-width: var(--max-width);
  border-radius: calc(var(--radius) + 12px);
  background: linear-gradient(135deg, rgba(79, 134, 255, 0.2), rgba(79, 134, 255, 0.05));
  border: 1px solid rgba(79, 134, 255, 0.25);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.intro-banner::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: -140px;
  right: -120px;
  background: radial-gradient(circle at center, rgba(79, 135, 255, 0.213), transparent 70%);
  pointer-events: none;
  opacity: 0.9;
}

html.light-theme .intro-banner {
  background: linear-gradient(135deg, rgba(79, 134, 255, 0.08), rgba(79, 134, 255, 0.02));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.15);
  border-color: rgba(79, 134, 255, 0.18);
}

.intro-banner > div {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.intro-left {
  align-items: flex-start;
  text-align: left;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(79, 134, 255, 0.18);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.light-theme .intro-badge {
  background: rgba(79, 134, 255, 0.14);
}

.intro-left h1 {
  font-size: clamp(2.5rem, 3vw + 1.5rem, 3.75rem);
  margin-bottom: 0.25rem;
}

.intro-left p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 32ch;
}

.intro-cta {
  border-radius: calc(var(--radius) / 1.5);
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  box-shadow: 0 12px 24px rgba(79, 134, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.intro-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(79, 134, 255, 0.45);
}

.intro-right {
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.45);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.75rem 1.5rem;
  color: #f8fbff;
  gap: 0.75rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(16px);
}

html.light-theme .intro-right {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-color: rgba(79, 134, 255, 0.2);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.intro-support {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}

.intro-phone {
  font-size: 1.5rem;
  font-weight: 700;
}

.intro-phone,
.intro-mail {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.intro-phone:hover,
.intro-mail:hover {
  opacity: 0.85;
  text-decoration: none;
}

.intro-mail {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: calc(var(--radius) / 1.6);
  background: rgba(248, 251, 255, 0.12);
  border: 1px solid rgba(248, 251, 255, 0.18);
}

html.light-theme .intro-mail {
  background: rgba(79, 134, 255, 0.12);
  border-color: rgba(79, 134, 255, 0.25);
}

.intro-availability {
  font-size: 0.9rem;
  opacity: 0.75;
}

html.light-theme .intro-support,
html.light-theme .intro-availability {
  color: rgba(15, 23, 42, 0.65);
  opacity: 1;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.price-table th,
.price-table td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
}
.price-table th {
  background: var(--surface-hover);
}
.price-table td:first-child {
  font-weight: 600;
}
.classes .cta-button {
  display: inline-block;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .intro-banner {
    padding: 2.25rem;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .intro-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 2rem;
  }

  .intro-banner::before {
    top: -200px;
    right: -80px;
    opacity: 0.6;
  }

  .intro-left {
    align-items: center;
    text-align: center;
  }

  .intro-left p {
    max-width: 100%;
  }

  .intro-cta {
    align-self: stretch;
    text-align: center;
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
  }

  .intro-right {
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 1.5rem;
    gap: 0.65rem;
  }

  .intro-phone,
  .intro-mail {
    justify-content: center;
  }

  .intro-phone {
    width: 100%;
    font-size: 1.35rem;
  }

  .intro-mail {
    width: 100%;
  }
}

@media (max-width: 640px) {
  section {
    padding: 2.25rem 1.25rem;
  }

  section h2 {
    font-size: 1.75rem;
  }

  .price-table {
    border: 0;
  }

  .price-table thead {
    display: none;
  }

  .price-table tbody {
    display: grid;
    gap: 1rem;
  }

  .price-table tr {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: 1rem 1.25rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  }

  html.light-theme .price-table tr {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
  }

  .price-table td {
    border: 0;
    padding: 0.5rem 0;
  }

  .price-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.25rem;
  }

  .price-table td:first-child {
    font-size: 1.1rem;
    padding-top: 0;
  }

  .price-table td:last-child {
    padding-bottom: 0;
  }

  .classes .cta-button {
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: 0 12px 24px rgba(79, 134, 255, 0.4);
  }

  .newsletter-form {
    width: 100%;
  }

  .newsletter-form input[type="email"],
  .newsletter-form button {
    width: 100%;
    font-size: 1rem;
  }

  .newsletter-form input[type="email"] {
    padding: 0.75rem 1rem;
  }

  .newsletter-form button {
    padding: 0.9rem 1.2rem;
  }

  .checkbox-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
  }

  .checkbox-wrapper input {
    margin-right: 0;
    margin-bottom: 0.1rem;
  }

  .notice {
    margin: 1.25rem 1rem;
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.95rem;
  }

  .contact-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 540px) {
  .intro-banner {
    margin: 1.5rem 1rem 0;
    padding: 1.75rem 1.25rem;
    border-radius: calc(var(--radius) + 8px);
  }

  .intro-banner::before {
    width: 260px;
    height: 260px;
    top: -170px;
    right: -140px;
  }

  .intro-badge {
    font-size: 0.7rem;
  }

  .intro-left h1 {
    font-size: 2.35rem;
  }

  .intro-left p {
    font-size: 1.05rem;
  }

  .intro-phone {
    font-size: 1.25rem;
  }

  .intro-mail {
    font-size: 0.95rem;
  }

  .intro-availability {
    font-size: 0.85rem;
  }
}

/* Info base */
.info-base-hero {
  padding: 4rem 1rem 3rem;
  background: radial-gradient(circle at 0% 0%, rgba(76, 110, 245, 0.25), transparent 60%),
    linear-gradient(135deg, rgba(76, 110, 245, 0.12) 0%, rgba(255, 255, 255, 0) 60%);
  border-radius: 0 0 32px 32px;
}

.info-base-hero .container {
  max-width: 860px;
  margin: 0 auto;
}

.info-base-hero__eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.info-base-hero__title {
  font-size: clamp(2.1rem, 2.5vw + 1.5rem, 3rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.info-base-hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 640px;
}

.info-base-section {
  padding: 3rem 1rem 4rem;
}

.info-base-section .container {
  max-width: 1040px;
  margin: 0 auto;
}

.info-list-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.info-list-intro__title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.info-list-intro__subtitle {
  margin: 0;
  color: var(--text-light);
  line-height: 1.6;
}

.info-card-section {
  margin-top: 3rem;
}

.info-card-section__title {
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.info-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(73, 99, 216, 0.18);
  box-shadow: 0 14px 32px rgba(15, 35, 95, 0.08);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.info-card:focus {
  outline: none;
}

.info-card:focus-visible {
  outline: 3px solid rgba(73, 99, 216, 0.45);
  outline-offset: 3px;
}

.info-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.08), rgba(76, 110, 245, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.info-card:hover,
.info-card:focus {
  transform: translateY(-4px);
  border-color: rgba(73, 99, 216, 0.4);
  box-shadow: 0 18px 36px rgba(15, 35, 95, 0.12);
}

.info-card:hover::after,
.info-card:focus::after {
  opacity: 1;
}

.info-card__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.info-card__title {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  position: relative;
  z-index: 1;
}

.info-card__summary {
  margin: 0 0 1.25rem;
  color: var(--text-light);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.info-card__cta {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.info-card__cta::after {
  content: '→';
  transition: transform 0.2s ease;
}

.info-card:hover .info-card__cta::after,
.info-card:focus .info-card__cta::after {
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .info-base-hero {
    padding: 3rem 1rem 2.5rem;
  }

  .info-base-hero__title {
    font-size: 2.1rem;
  }

  .info-list-intro {
    text-align: left;
  }

  .info-card-section__title {
    text-align: left;
  }

  .info-card {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .info-base-section {
    padding: 2.5rem 1rem 3.5rem;
  }

  .info-list-intro__title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .info-card {
    padding: 1.35rem;
  }

  .info-card__title {
    font-size: 1.2rem;
  }

  .info-card__summary {
    font-size: 0.95rem;
  }
}

/* Article styling */
.article-section {
  background: linear-gradient(135deg, #eef2ff, #fafafa);
  padding: 4rem 1rem;
}

.article-section .container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-section h1 {
  font-size: 2.75rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.article-section h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.article-section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.article-section h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--secondary);
}

.article-section p {
  margin-bottom: 1rem;
}

.article-section ul,
.article-section ol {
  margin: 1rem 0 1rem 2rem;
}

.article-section li {
  margin-bottom: 0.5rem;
}

.article-section .table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
}

.article-section table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
}

.article-section table th,
.article-section table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.article-section table th {
  background: var(--surface-hover);
}

.article-section a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s;
}

.article-section a:hover {
  color: #1a57d8;
}

.article-section blockquote {
  border-left: 4px solid var(--primary);
  background: var(--surface-hover);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

.article-section img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 1.5rem 0;
}

.article-section code {
  background: var(--surface-hover);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.section-intro{
  margin-bottom:1rem;
  color:var(--text-light);
  font-size:0.95rem;
}

.availability-card{
  display:grid;
  gap:1.5rem;
}

.availability-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:0.75rem;
  padding:0.75rem 1rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-hover);
}

html.light-theme .availability-toolbar{
  background:var(--surface);
}

.availability-actions-group{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
}

.availability-timezone{
  font-size:0.85rem;
  color:var(--text-light);
}

.availability-content{
  display:flex;
  flex-direction:column;
  gap:1rem;
}

.availability-grid-wrapper{
  position:relative;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:0 10px 28px rgba(15,23,42,0.18);
}

html.light-theme .availability-grid-wrapper{
  box-shadow:0 8px 20px rgba(15,23,42,0.1);
}

.availability-grid{
  --availability-days:7;
  min-height:100%;
  padding:0.75rem;
}

.availability-grid .availability-table{
  width:100%;
  min-width:640px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  font-size:0.9rem;
  background:transparent;
}

.availability-table__col--time{
  width:5.25rem;
}

.availability-table__col--day{
  width:calc((100% - 5.25rem)/var(--availability-days,7));
}

.availability-table caption{
  caption-side:top;
  text-align:left;
  padding:0.25rem 0.5rem 0.75rem;
  font-weight:600;
  color:var(--text-light);
}

.availability-table th,
.availability-table td{
  border:1px solid var(--border);
  padding:0.55rem 0.5rem;
  text-align:center;
  background:rgba(255,255,255,0.01);
  transition:background-color .2s ease,box-shadow .2s ease,color .2s ease;
}

html.light-theme .availability-table th,
html.light-theme .availability-table td{
  background:transparent;
}

.availability-table thead th{
  background:linear-gradient(135deg,var(--primary),rgba(79,134,255,0.8));
  color:#fff;
  text-transform:uppercase;
  letter-spacing:0.05em;
  font-size:0.75rem;
  position:sticky;
  top:0;
  z-index:2;
}

.availability-table thead th:first-child{
  text-align:right;
  left:0;
  box-shadow:1px 0 0 rgba(0,0,0,0.15);
}

html.light-theme .availability-table thead th:first-child{
  box-shadow:1px 0 0 rgba(0,0,0,0.05);
}

.availability-time-col{
  text-align:right;
  font-weight:600;
  font-size:0.8rem;
  color:var(--text-light);
  background:var(--surface-hover);
}

html.light-theme .availability-time-col{
  background:var(--surface);
}

.availability-table tbody th.availability-time-col{
  position:sticky;
  left:0;
  z-index:1;
  padding-right:0.75rem;
}

html:not(.light-theme) .availability-table thead th{
  text-shadow:0 1px 2px rgba(0,0,0,0.35);
}

html.light-theme .availability-table thead th{
  text-shadow:0 1px 2px rgba(0,0,0,0.18);
}

.availability-slot{
  cursor:pointer;
  min-height:2.75rem;
  border-radius:8px;
  background:transparent;
}

.availability-slot:hover{
  background:rgba(79,134,255,0.18);
}

.availability-slot:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:-2px;
}

.availability-slot.is-selected{
  background:rgba(42,199,105,0.25);
  box-shadow:inset 0 0 0 1px rgba(42,199,105,0.5);
  color:var(--text);
}

html.light-theme .availability-slot.is-selected{
  background:rgba(42,199,105,0.2);
}

.availability-grid-readonly .availability-slot{
  cursor:default;
  box-shadow:none;
}

.availability-grid-readonly .availability-slot:hover{
  background:transparent;
}

.availability-grid-readonly .availability-slot.is-selected{
  background:rgba(42,199,105,0.18);
}

.availability-summary{
  flex:0 0 320px;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
  padding:1.25rem;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:0 8px 20px rgba(15,23,42,0.18);
  min-height:100%;
}

html.light-theme .availability-summary{
  box-shadow:0 8px 18px rgba(15,23,42,0.08);
}

.availability-summary h3,
.availability-summary h4{
  margin:0;
  font-size:1rem;
}

.availability-summary-meta{
  font-size:0.9rem;
  color:var(--text-light);
}

.availability-summary-empty{
  font-size:0.88rem;
  color:var(--text-light);
  font-style:italic;
}

.availability-summary-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0.5rem;
}

.availability-summary-list li{
  display:flex;
  align-items:flex-start;
  gap:0.4rem;
  font-size:0.9rem;
}

.availability-summary-bullet{
  width:0.55rem;
  height:0.55rem;
  border-radius:50%;
  background:rgba(42,199,105,0.85);
  margin-top:0.35rem;
  flex-shrink:0;
}

.availability-summary-list li span{
  display:block;
}

.availability-legend{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  border-top:1px solid var(--border);
  padding-top:0.75rem;
  margin-top:0.5rem;
}

.availability-legend-item{
  display:flex;
  align-items:center;
  gap:0.4rem;
  font-size:0.82rem;
  color:var(--text-light);
}

.availability-legend-dot{
  width:0.9rem;
  height:0.9rem;
  border-radius:0.45rem;
  box-shadow:0 0 0 1px rgba(0,0,0,0.12);
}

html.light-theme .availability-legend-dot{
  box-shadow:0 0 0 1px rgba(0,0,0,0.08);
}

.availability-legend-dot.is-free{
  background:rgba(255,255,255,0.16);
}

html.light-theme .availability-legend-dot.is-free{
  background:rgba(17,17,17,0.08);
}

.availability-legend-dot.is-busy{
  background:rgba(42,199,105,0.75);
}

.availability-legend-dot.is-shared{
  background:rgba(79,134,255,0.75);
}

.availability-footer{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:0.75rem;
  padding-top:0.75rem;
  border-top:1px solid var(--border);
}

.availability-actions{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
}

.availability-footer .btn{
  min-width:150px;
}

.availability-status{
  display:flex;
  align-items:center;
  gap:0.5rem;
  font-size:0.88rem;
  color:var(--text-light);
}

.availability-status-icon{
  width:0.7rem;
  height:0.7rem;
  border-radius:50%;
  background:var(--success);
  box-shadow:0 0 0 2px rgba(42,199,105,0.25);
  flex-shrink:0;
}

.availability-status.is-error{
  color:var(--danger);
}

.availability-status.is-error .availability-status-icon{
  background:var(--danger);
  box-shadow:0 0 0 2px rgba(239,68,68,0.25);
}

.availability-status.is-progress{
  color:var(--primary);
}

.availability-status.is-progress .availability-status-icon{
  background:var(--primary);
  box-shadow:0 0 0 2px rgba(79,134,255,0.25);
}

.availability-timeline-wrapper{
  flex:1 1 360px;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.availability-timeline{
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.availability-timeline-row{
  display:grid;
  grid-template-columns:140px 1fr;
  align-items:center;
  gap:0.75rem;
}

.availability-timeline-day{
  font-weight:600;
  font-size:0.9rem;
  color:var(--text-light);
}

.availability-timeline-track{
  position:relative;
  height:40px;
  border-radius:999px;
  background:var(--surface-hover);
  border:1px solid var(--border);
  overflow:hidden;
}

.availability-timeline-empty{
  font-size:0.85rem;
  color:var(--text-light);
}

.availability-timeline-legend{
  display:flex;
  align-items:center;
  gap:0.5rem;
  font-size:0.85rem;
  color:var(--text-light);
}

.availability-legend-swatch{
  width:14px;
  height:14px;
  border-radius:50%;
  background:rgba(79,134,255,0.75);
  box-shadow:0 0 0 2px rgba(79,134,255,0.2);
}

@media (max-width:768px){
  .availability-grid{
    padding:0.5rem;
  }

  .availability-grid .availability-table{
    min-width:520px;
    font-size:0.85rem;
  }

  .availability-timeline-row{
    grid-template-columns:1fr;
  }

  .availability-summary{
    padding:1rem;
  }
}

.availability-toolbar + .availability-summary,
.availability-content + .availability-summary{
  margin-top:0;
}
.module-toggle-form{
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.module-toggle-form .toggle-control{
  display:flex;
  align-items:center;
  gap:0.75rem;
}

.module-toggle-form .toggle-label{
  font-weight:500;
}

.module-toggle-form .toggle-description{
  color:var(--text-light);
  font-size:0.9rem;
}

/* Admin users layout */
.admin-users{
  display:flex;
  flex-direction:column;
  gap:clamp(1.75rem,3vw,2.75rem);
  padding:clamp(2.5rem,5vw,3.5rem) 0 clamp(3rem,6vw,4rem);
}

.admin-users__hero{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:clamp(1.25rem,3vw,2rem);
  padding:clamp(1.75rem,4vw,2.5rem);
  border-radius:20px;
  background:color-mix(in srgb,var(--surface) 88%,var(--primary) 12%);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  box-shadow:0 14px 32px rgba(15,23,42,0.18);
}

html.light-theme .admin-users__hero{box-shadow:0 16px 30px rgba(15,23,42,0.12);}

.admin-users__hero-main{
  flex:1 1 320px;
  display:flex;
  flex-direction:column;
  gap:0.65rem;
}

.admin-users__hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:0.65rem;
  align-items:center;
}

.admin-users__back{align-self:flex-start;}

.admin-users__title{
  margin:0;
  font-size:clamp(2rem,4vw,2.6rem);
  font-weight:700;
  display:flex;
  align-items:center;
  gap:0.75rem;
}

.admin-users__role-badge{
  display:inline-flex;
  align-items:center;
  gap:0.4rem;
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  padding:0.35rem 0.7rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--primary) 18%,var(--surface) 82%);
  color:inherit;
}

.admin-users__subtitle{
  margin:0;
  color:var(--text-light);
  font-size:0.95rem;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  gap:0.35rem;
  padding:0.35rem 0.6rem;
  border-radius:999px;
  font-size:0.78rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.05em;
  background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);
  color:var(--primary);
}

.status-chip.is-success{
  background:color-mix(in srgb,var(--surface) 80%,var(--success) 20%);
  color:var(--success);
}

.status-chip.is-warning{
  background:color-mix(in srgb,var(--surface) 80%,var(--warn) 20%);
  color:var(--warn);
}

.insight-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:1.25rem;
}

.insight-card{
  display:flex;
  flex-direction:column;
  gap:0.45rem;
  padding:1.35rem;
  border-radius:18px;
  background:var(--surface);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  box-shadow:0 12px 28px rgba(15,23,42,0.18);
}

.insight-card--accent{background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);}

.insight-card__label{
  font-size:0.82rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--text-light);
}

.insight-card__value{
  font-size:1.65rem;
  font-weight:700;
}

.insight-card__meta{
  font-size:0.9rem;
  color:var(--text-light);
}

.section-header{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:flex-end;
  gap:0.85rem;
  margin-bottom:0.5rem;
}

.section-header__subtitle{
  margin:0;
  color:var(--text-light);
  font-size:0.95rem;
}

.period-form{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  align-items:center;
}

.period-form label{
  display:flex;
  flex-direction:column;
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-light);
}

.period-form select{
  margin-top:0.35rem;
  min-width:5rem;
}

.payment-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:1rem;
}

.payment-summary__label{
  display:block;
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-light);
  margin-bottom:0.35rem;
}

.payment-summary__value{
  font-size:1.4rem;
  font-weight:700;
}

.availability-meta{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  color:var(--text-light);
  font-size:0.9rem;
}

.availability-panel{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0.65rem;
}

.availability-panel__item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  padding:0.85rem 1rem;
  border-radius:16px;
  background:color-mix(in srgb,var(--surface) 90%,var(--primary) 10%);
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
}

.availability-panel__day{font-weight:600;}

.availability-panel__slots{
  color:var(--text-light);
  font-family:"IBM Plex Mono",monospace;
  letter-spacing:0.03em;
}

.admin-users__section{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
  padding:clamp(1.6rem,3.5vw,2.4rem);
  border-radius:20px;
  background:var(--surface);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  box-shadow:0 14px 32px rgba(15,23,42,0.18);
}

html.light-theme .admin-users__section{box-shadow:0 16px 30px rgba(15,23,42,0.12);}

.admin-users__chart-section .section-header{
  margin-bottom:0;
}

.admin-users__chart-wrap{
  position:relative;
  width:100%;
  height:clamp(260px, 42vh, 380px);
  border-radius:18px;
  background:color-mix(in srgb,var(--surface) 88%,var(--primary) 12%);
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
  overflow:hidden;
  padding:0.9rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 30px rgba(15,23,42,0.18);
}

.admin-users__chart-wrap::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(1200px 420px at 12% 0%,
    rgba(79,134,255,0.12),
    transparent 55%);
  opacity:0.9;
}

.admin-users__chart-wrap canvas{
  position:relative;
  z-index:1;
}

.admin-users__chart-wrap .empty-message{
  position:relative;
  z-index:1;
}

.admin-users__chart-wrap canvas{
  display:block;
  width:100%;
  height:100%;
}

.admin-users__chart-wrap .empty-message{
  margin:0;
  padding:1rem;
  text-align:center;
}

/* Hide income chart on small screens (mobile). */
@media (max-width: 768px){
  .admin-users__chart-section{
    display:none;
  }
}

.user-search-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  align-items:center;
}

.user-search-toolbar__search input{
  background:color-mix(in srgb,var(--surface) 88%,var(--primary) 12%);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  border-radius:999px;
  padding:0.65rem 1rem;
  min-width:240px;
  color:var(--text);
}

.user-search-toolbar__filters{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
}

.user-search-toolbar__results{
  font-size:0.9rem;
  color:var(--text-light);
}

.btn-chip{
  padding:0.4rem 0.9rem;
  border-radius:999px;
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
  background:transparent;
  color:inherit;
  font-size:0.85rem;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}

.btn-chip:hover{
  background:color-mix(in srgb,var(--surface) 85%,var(--primary) 15%);
  border-color:color-mix(in srgb,var(--primary) 35%,var(--border) 65%);
}

.btn-chip.is-active{
  background:color-mix(in srgb,var(--surface) 75%,var(--primary) 25%);
  border-color:color-mix(in srgb,var(--primary) 45%,var(--border) 55%);
  color:var(--primary);
}

.user-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1.5rem;
}

.user-card{
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding:1.4rem;
  border-radius:18px;
  background:var(--surface);
  border:1px solid color-mix(in srgb,var(--border) 70%,transparent);
  box-shadow:0 12px 30px rgba(15,23,42,0.18);
}

.user-card__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:0.75rem;
}

.user-card__name{
  margin:0;
  font-size:1.25rem;
  font-weight:600;
}

.user-card__role{
  font-size:0.85rem;
  color:var(--text-light);
}

.user-card__meta{
  color:var(--text-light);
  font-size:0.9rem;
}

.user-card__stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0.75rem;
}

.user-card__stats div{
  padding:0.6rem 0.75rem;
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
}

.user-card__stats dt{
  font-size:0.75rem;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:var(--text-light);
}

.user-card__stats dd{
  margin-top:0.25rem;
  font-weight:600;
  font-size:1.05rem;
}

.user-card__footer{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
}

.top-payouts{
  padding-top:1.25rem;
  border-top:1px solid color-mix(in srgb,var(--border) 65%,transparent);
}

.top-payouts__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0.6rem;
}

.top-payouts__list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.55rem 0.75rem;
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
  border:1px solid color-mix(in srgb,var(--border) 65%,transparent);
}

.btn-success{background:var(--success)!important;color:#fff!important;}

.btn-danger{background:var(--danger)!important;color:#fff!important;}

@media(max-width:768px){
  .admin-users__hero,
  .admin-users__section{
    padding:1.5rem;
  }

  .insight-card__value{font-size:1.5rem;}
}

@media(max-width:720px){
  .admin-users{padding:clamp(2.2rem,6vw,2.8rem) 0 clamp(2.6rem,7vw,3.4rem);}
  .admin-users__hero{flex-direction:column;align-items:stretch;}
  .admin-users__hero-main{flex-basis:auto;gap:0.55rem;}
  .admin-users__hero-actions{
    width:100%;
    justify-content:flex-start;
    gap:0.55rem;
  }
  .admin-users__hero-actions .btn,
  .admin-users__hero-actions .admin-users__back{
    flex:1 1 48%;
    text-align:center;
  }
  .admin-users__hero-actions form{flex:1 1 100%;display:flex;}
  .admin-users__hero-actions form .btn{flex:1;}
  .section-header{flex-direction:column;align-items:flex-start;}
  .user-search-toolbar{flex-direction:column;align-items:stretch;}
  .user-search-toolbar__results{width:100%;}
  .insight-grid{gap:1rem;}
}

@media(max-width:600px){
  .period-form{
    flex-direction:column;
    align-items:stretch;
  }

  .period-form label,
  .period-form select,
  .period-form button{
    width:100%;
  }

  .user-search-toolbar__search input{
    width:100%;
  }
}

@media(max-width:560px){
  .admin-users{padding:clamp(2rem,7vw,2.5rem) 0.75rem clamp(2.5rem,8vw,3.1rem);}
  .admin-users__hero,
  .admin-users__section{padding:1.25rem;border-radius:16px;}
  .admin-users__title{font-size:1.75rem;flex-direction:column;align-items:flex-start;gap:0.4rem;}
  .admin-users__subtitle{font-size:0.95rem;}
  .admin-users__hero-actions .btn,
  .admin-users__hero-actions .admin-users__back{flex:1 1 100%;}
  .insight-grid{grid-template-columns:1fr;}
  .payment-summary{grid-template-columns:1fr;}
  .user-card-grid{grid-template-columns:1fr;}
  .user-card{padding:1.1rem;}
  .user-card__header{flex-direction:column;align-items:flex-start;}
  .user-card__footer{flex-direction:column;align-items:stretch;}
  .user-card__footer .btn{width:100%;text-align:center;}
  .top-payouts__list li{gap:0.75rem;}
}

@media(max-width:520px){
  .user-card__stats{grid-template-columns:repeat(1,minmax(0,1fr));}
}

@media(max-width:480px){
  .admin-users__hero-actions{flex-direction:column;}
  .admin-users__hero-actions .btn,
  .admin-users__hero-actions .admin-users__back{
    width:100%;
  }
  .admin-users__hero-actions form{width:100%;}
  .admin-users__hero-actions form .btn{width:100%;}
}

@media(max-width:420px){
  .admin-users__hero{gap:1rem;}
  .admin-users__subtitle{font-size:0.9rem;}
  .insight-card{padding:1.1rem;}
}


/* ================================
   FORCE SAME LOOK (LIGHT & DARK)
   ONLY FOR INDEX PAGE
================================ */

.index-page {
  /* Wymuszona paleta – JEDNA dla obu theme */
  --background: #e6eef7;
  --surface: #ffffff;
  --surface-hover: #f3f6fb;
  --text: #1f2544;
  --text-light: #5f6787;
  --border: #d9deea;
  --primary: #3f48cc;
}

/* body / tło */
html.light-theme .index-page,
html:not(.light-theme) .index-page {
  background: var(--background);
  color: var(--text);
}

/* Intro banner */
html.light-theme .index-page .intro-banner,
html:not(.light-theme) .index-page .intro-banner {
  background: #dde8f7;
  border: 1px solid var(--border);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
}

/* Badge */
html.light-theme .index-page .intro-badge,
html:not(.light-theme) .index-page .intro-badge {
  background: rgba(63, 72, 204, 0.08);
  color: var(--primary);
}

/* Prawy panel kontaktowy */
html.light-theme .index-page .intro-right,
html:not(.light-theme) .index-page .intro-right {
  background: #f8fbff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

/* Teksty pomocnicze */
html.light-theme .index-page p,
html:not(.light-theme) .index-page p {
  color: var(--text-light);
}

/* Linki kontaktowe */
html.light-theme .index-page .intro-phone,
html.light-theme .index-page .intro-mail,
html:not(.light-theme) .index-page .intro-phone,
html:not(.light-theme) .index-page .intro-mail {
  color: var(--text);
}

/* CTA */
html.light-theme .index-page .cta-button,
html:not(.light-theme) .index-page .cta-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(63, 72, 204, 0.35);
}



