
:root{
  --app-bg:#e7eaef;
  --panel:#ffffff;
  --panel-soft:#f6f8fc;
  --text:#1a2450;
  --muted:#64729c;
  --primary:#2a3273;
  --primary-2:#20285f;
  --accent:#1ea9ff;
  --accent-2:#53c0ff;
  --border:#dfe7f4;
  --field-bg:#f5f7fb;
  --field-text:#20305a;
  --field-border:#22a8ff;
  --shadow:0 18px 40px rgba(28,42,92,.12);
  --danger:#f15b5b;
  --success:#24a162;
  --gold:#f1ca21;
  --nav-bg:#ffffff;
}
body[data-theme="dark"]{
  --app-bg:#cfd4df;
  --panel:#28316f;
  --panel-soft:#303a82;
  --text:#ffffff;
  --muted:#d9dffb;
  --primary:#ffffff;
  --primary-2:#eef1ff;
  --accent:#1ea9ff;
  --accent-2:#53c0ff;
  --border:rgba(255,255,255,.12);
  --field-bg:#f3f6fd;
  --field-text:#1d2458;
  --field-border:#22a8ff;
  --shadow:0 18px 40px rgba(16,20,44,.20);
  --nav-bg:#28316f;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;background:var(--app-bg);color:var(--text)}
body{min-height:100vh}
a{text-decoration:none;color:inherit}
button,input,textarea,select{font:inherit}
img{display:block;max-width:100%}

.page{
  min-height:100vh;
  width:100%;
}
.container{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
}
.theme-bar{
  padding:16px 0 0;
  display:flex;
  justify-content:flex-end;
}
.theme-toggle{
  border:0;
  background:var(--panel);
  color:var(--primary);
  box-shadow:var(--shadow);
  border-radius:999px;
  height:44px;
  padding:0 18px;
  font-weight:700;
  cursor:pointer;
}
body[data-theme="dark"] .theme-toggle{
  background:#ffffff;
  color:#20285f;
}

.logo-round{
  width:92px;
  height:92px;
  border-radius:50%;
  object-fit:cover;
  background:#fff;
}
.logo-small{
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
}
.avatar-blob{
  width:86px;
  height:70px;
  border-radius:46px 46px 34px 34px;
  background:#6771d6;
  position:relative;
  overflow:hidden;
  flex:0 0 auto;
}
.avatar-blob img{
  position:absolute;
  left:8px;
  top:7px;
  width:58px;
  height:58px;
  border-radius:50%;
  object-fit:cover;
}
body[data-theme="dark"] .avatar-blob{
  background:#6771d6;
}

.app-shell{
  display:grid;
  gap:20px;
  padding:16px 0 28px;
}
.auth-shell{
  min-height:720px;
  display:grid;
  grid-template-columns:1fr;
  overflow:hidden;
  border-radius:28px;
  box-shadow:var(--shadow);
}
.auth-visual{
  display:none;
  background:linear-gradient(180deg,#28316f 0%, #20285f 100%);
  color:#fff;
  position:relative;
  padding:42px 40px;
}
.auth-visual::before,
.auth-visual::after{
  content:"";
  position:absolute;
  left:-10%;
  width:120%;
  height:140px;
  border:8px solid rgba(255,255,255,.95);
  border-radius:100px;
}
.auth-visual::before{top:46px;transform:rotate(5deg)}
.auth-visual::after{bottom:42px;transform:rotate(-7deg)}
.visual-inner{
  position:relative;
  z-index:1;
  max-width:420px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
  height:100%;
}
.visual-inner h1{
  margin:0;
  font-size:34px;
  line-height:1.08;
}
.visual-inner p{
  margin:0;
  font-size:16px;
  line-height:1.5;
  color:rgba(255,255,255,.84);
}
.auth-stage{
  background:var(--panel);
  min-height:720px;
  padding:26px 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.auth-card{
  width:min(100%, 460px);
  margin:0 auto;
  display:none;
}
.auth-card.active{display:block}
.auth-logo-box{
  text-align:center;
  margin-bottom:20px;
}
.auth-logo-box .logo-round{
  width:136px;
  height:136px;
  margin:0 auto 18px;
}
.auth-title{
  margin:0 0 8px;
  font-size:24px;
  text-align:center;
  line-height:1.15;
}
.auth-subtitle{
  margin:0;
  text-align:center;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}
.auth-panel{
  border-radius:24px;
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow:0 10px 24px rgba(28,42,92,.08);
  padding:22px 18px;
}
body[data-theme="dark"] .auth-panel{
  background:var(--panel);
  box-shadow:none;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
  color:var(--accent);
  cursor:pointer;
  border:0;
  background:none;
  padding:0;
  margin-bottom:18px;
}
.form-stack{
  display:grid;
  gap:12px;
}
.form-label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}
.input{
  width:100%;
  height:42px;
  border-radius:12px;
  border:2px solid var(--field-border);
  background:var(--field-bg);
  color:var(--field-text);
  padding:0 12px;
  outline:none;
}
.check{
  display:flex;
  gap:8px;
  align-items:flex-start;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border-radius:999px;
  border:0;
  background:var(--accent);
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  padding:0 18px;
  text-align:center;
}
.btn.outline{
  background:transparent;
  color:var(--primary);
  border:2px solid var(--primary);
}
body[data-theme="dark"] .btn.outline{
  color:#fff;
  border-color:#fff;
}
.btn.dark{
  background:var(--primary-2);
  color:#fff;
}
body[data-theme="dark"] .btn.dark{
  background:#ffffff;
  color:#20285f;
}
.btn.light{
  background:#ffffff;
  color:var(--primary);
}
.role-buttons{
  display:grid;
  gap:7px;
}
.result-note{
  margin-top:14px;
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}

.dashboard{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  padding:10px 0 28px;
}
.sidebar{
  display:none;
}
.main-area{
  min-width:0;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-radius:24px;
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  padding:14px 16px;
}
body[data-theme="dark"] .topbar{
  box-shadow:none;
}
.topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.menu-toggle{
  width:42px;
  height:42px;
  border:0;
  border-radius:12px;
  background:var(--panel-soft);
  color:var(--primary);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.burger{
  width:18px;
  display:grid;
  gap:4px;
}
.burger span{
  display:block;
  height:3px;
  border-radius:999px;
  background:currentColor;
}
.page-title{
  margin:0;
  font-size:20px;
  line-height:1.1;
}
.page-subtitle{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}
.user-chip{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--panel-soft);
  border-radius:18px;
  padding:8px 10px;
}
.user-chip .avatar-blob{
  width:54px;
  height:44px;
}
.user-chip .avatar-blob img{
  width:34px;
  height:34px;
  left:6px;
  top:5px;
}
.user-name{
  font-size:13px;
  font-weight:700;
}
.user-role{
  font-size:11px;
  color:var(--muted);
  margin-top:3px;
}
.content-grid{
  margin-top:16px;
  display:grid;
  gap:16px;
}
.view{display:none}
.view.active{display:grid; gap:16px}
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px;
  min-width:0;
}
body[data-theme="dark"] .card{box-shadow:none}
.card-title{
  margin:0 0 14px;
  font-size:20px;
}
.section-kicker{
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}
.mobile-menu{
  position:fixed;
  inset:0;
  background:rgba(16,22,46,.45);
  display:none;
  z-index:60;
}
.mobile-menu.open{display:block}
.mobile-panel{
  width:min(320px, 88vw);
  height:100%;
  background:var(--panel);
  padding:18px;
  box-shadow:24px 0 40px rgba(0,0,0,.18);
}
.mobile-panel .nav-link{
  width:100%;
}
.nav-list{
  display:grid;
  gap:10px;
}
.nav-link{
  min-height:44px;
  border-radius:14px;
  border:0;
  background:var(--panel-soft);
  color:var(--primary);
  font-weight:700;
  text-align:left;
  padding:0 14px;
  cursor:pointer;
}
.nav-link.active{
  background:var(--accent);
  color:#fff;
}
.grid-2, .grid-3, .grid-4{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
.tile-btn,
.class-btn,
.day-btn,
.chat-btn,
.stat-box,
.event-box,
.shop-item,
.file-drop,
.info-box,
.list-item{
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--panel-soft);
  padding:16px;
}
.tile-btn, .class-btn, .day-btn, .chat-btn{
  border:2px solid var(--accent);
  cursor:pointer;
  font-weight:700;
  text-align:center;
}
.chat-btn{
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
}
.stat-box{
  background:linear-gradient(180deg,var(--panel-soft), var(--panel));
}
.metric{
  font-size:30px;
  font-weight:800;
}
.metric-sub{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}
.lesson-card{
  border-radius:18px;
  border:2px solid var(--accent);
  background:var(--field-bg);
  color:var(--field-text);
  padding:14px;
  display:grid;
  gap:7px;
}
.lesson-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:#62719a;
}
body[data-theme="dark"] .lesson-card{
  background:var(--field-bg);
  color:var(--field-text);
}
body[data-theme="dark"] .lesson-top{
  color:#62719a;
}
.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.chip{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  border-radius:999px;
  padding:0 14px;
  background:var(--panel-soft);
  color:var(--primary);
  border:1px solid var(--border);
  font-weight:700;
}
.table-wrap{
  overflow:auto;
  border-radius:18px;
  border:1px solid var(--border);
}
.data-table{
  width:100%;
  border-collapse:collapse;
  min-width:620px;
  background:var(--panel);
}
.data-table th,
.data-table td{
  padding:12px 10px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size:13px;
}
.data-table th{
  background:var(--panel-soft);
  color:var(--muted);
}
.chat-layout{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
.dialog{
  display:grid;
  gap:14px;
  min-height:280px;
}
.message{
  display:flex;
  gap:10px;
  align-items:flex-start;
  max-width:100%;
}
.message.right{
  justify-content:flex-end;
}
.bubble{
  max-width:420px;
  background:var(--field-bg);
  color:var(--field-text);
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px 14px;
}
.message.right .bubble{
  background:#eef7ff;
}
.time{
  display:block;
  margin-top:6px;
  color:#67769f;
  font-size:12px;
  text-align:right;
}
.composer{
  display:flex;
  gap:10px;
  margin-top:10px;
}
.composer .input{
  flex:1;
}
.file-drop{
  display:grid;
  place-items:center;
  min-height:200px;
  border:2px dashed var(--accent);
  background:linear-gradient(180deg,#f5fbff,#e9f5ff);
  color:#21537a;
  text-align:center;
  line-height:1.45;
}
body[data-theme="dark"] .file-drop{
  background:linear-gradient(180deg,#e9f5ff,#dff1ff);
  color:#21537a;
}
.shop-list, .event-list{
  display:grid;
  gap:12px;
}
.shop-item, .event-box{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
}
.price{
  font-size:24px;
  font-weight:800;
  color:var(--gold);
}
.kbd-nav{
  display:grid;
  gap:10px;
}
.mobile-bottom{
  position:sticky;
  bottom:0;
  margin-top:16px;
  background:var(--nav-bg);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:10px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
}
body[data-theme="dark"] .mobile-bottom{box-shadow:none}
.bottom-link{
  min-height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:var(--panel-soft);
  color:var(--primary);
  font-size:12px;
  font-weight:700;
  border:0;
  cursor:pointer;
}
.bottom-link.active{
  background:var(--accent);
  color:#fff;
}
.placeholder{
  min-height:420px;
  display:grid;
  place-items:center;
  text-align:center;
}
.placeholder p{
  color:var(--muted);
  max-width:420px;
  line-height:1.5;
}
.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.back-btn{
  border:0;
  background:none;
  color:var(--accent);
  font-weight:700;
  cursor:pointer;
  padding:0;
}
.hero-card{
  background:linear-gradient(180deg,#2b3478 0%, #20285f 100%);
  color:#fff;
  border-radius:28px;
  padding:20px;
  position:relative;
  overflow:hidden;
}
.hero-card::before,
.hero-card::after{
  content:"";
  position:absolute;
  left:-8%;
  width:116%;
  height:120px;
  border:7px solid rgba(255,255,255,.95);
  border-radius:100px;
}
.hero-card::before{top:-56px;transform:rotate(5deg)}
.hero-card::after{bottom:-58px;transform:rotate(-7deg)}
.hero-inner{position:relative; z-index:1}
.hero-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.hero-rank{
  font-size:36px;
  font-weight:800;
}
.hero-sub{
  font-size:13px;
  line-height:1.35;
  margin-top:10px;
}
.stars-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:10px;
  margin:18px 0;
  text-align:center;
}
.star-big{
  font-size:46px;
  line-height:1;
  color:#fff;
}
.star-big.gold{color:var(--gold)}
.star-number{
  margin-top:-28px;
  font-weight:800;
  color:#1f265d;
  font-size:14px;
}
.star-label{
  margin-top:6px;
  font-size:10px;
}
.calendar{
  width:180px;
  margin:0 auto;
  background:#dfe5ff;
  color:#1f265d;
  border-radius:18px;
  padding:10px;
}
.calendar-title{
  text-align:center;
  font-size:13px;
  margin-bottom:8px;
}
.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:3px;
  text-align:center;
  font-size:11px;
}
.calendar-grid .hit{
  background:var(--gold);
  border-radius:50%;
}
.hero-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:14px;
}
.full{
  width:100%;
}
.note{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

@media (min-width: 768px){
  .theme-bar{padding-top:22px}
  .theme-toggle{height:46px}
  .auth-shell{min-height:760px}
  .auth-stage{padding:32px 24px}
  .auth-title{font-size:30px}
  .auth-logo-box .logo-round{width:156px;height:156px}
  .grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shop-list{grid-template-columns:1fr 1fr}
  .chat-layout{grid-template-columns:320px 1fr}
  .hero-rank{font-size:44px}
  .hero-card{padding:24px}
}

@media (min-width: 1024px){
  .auth-shell{grid-template-columns:480px 1fr}
  .auth-visual{display:block}
  .dashboard{
    grid-template-columns:280px minmax(0,1fr);
    align-items:start;
  }
  .sidebar{
    display:block;
    position:sticky;
    top:24px;
  }
  .sidebar .card{
    padding:18px;
  }
  .mobile-bottom, .menu-toggle, .mobile-menu{display:none !important}
  .grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (min-width: 1280px){
  .page-title{font-size:24px}
  .topbar{padding:18px}
  .card{padding:20px}
}


/* overflow fix for shop cards */

.shop-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-width:0;
}
.shop-item > div:first-child{
  min-width:0;
}
.shop-item strong{
  display:block;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.shop-item .btn{
  white-space:nowrap;
}



/* ===== admin pages ===== */
.admin-grid-2,
.admin-grid-3{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
.admin-split{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
.admin-pill-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.admin-class-pill{
  min-width:42px;
  height:32px;
  border-radius:999px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#fff;
  border:0;
  cursor:pointer;
}
.admin-class-pill.c1{background:#52c26d}
.admin-class-pill.c2{background:#5b7cff}
.admin-class-pill.c3{background:#a44dff}
.admin-mini-line{
  height:6px;
  border-radius:999px;
  background:linear-gradient(90deg,#28316f,#51c26e);
}
.admin-profile-bars{
  display:grid;
  gap:12px;
}
.admin-bar-card{
  display:grid;
  gap:6px;
}
.admin-bar-title{
  font-size:13px;
  font-weight:700;
}
.admin-bar{
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:0;
  background:linear-gradient(90deg,#28316f,#51c26e);
  color:#fff;
  font-weight:700;
  text-align:center;
  padding:0 10px;
}
.admin-bar-note{
  text-align:center;
  color:var(--muted);
  font-size:12px;
}
.admin-stats{
  display:grid;
  gap:20px;
  grid-template-columns:1fr;
}
.admin-circle-wrap{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
}
.admin-circle{
  width:110px;
  height:110px;
  border-radius:50%;
  background:conic-gradient(#69d96b 0 75%, #ff6262 75% 100%);
  position:relative;
  flex:0 0 auto;
}
.admin-circle::after{
  content:"75%";
  position:absolute;
  inset:18px;
  border-radius:50%;
  background:var(--panel);
  display:grid;
  place-items:center;
  font-weight:800;
  color:var(--text);
}
.admin-bars{
  display:flex;
  align-items:flex-end;
  gap:18px;
  height:150px;
  padding-top:10px;
}
.admin-bars .bar{
  width:28px;
  background:#28316f;
  border-radius:8px 8px 0 0;
  position:relative;
}
.admin-bars .bar::after{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-22px;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}
.admin-bars .b1{height:40px}.admin-bars .b1::after{content:"1-4\Aкласс"; white-space:pre}
.admin-bars .b2{height:82px}.admin-bars .b2::after{content:"5-9\Aкласс"; white-space:pre}
.admin-bars .b3{height:126px}.admin-bars .b3::after{content:"10-11\Aкласс"; white-space:pre}
.admin-event-card{
  display:grid;
  gap:12px;
}
.admin-image{
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  border-radius:22px;
  background:#ddd;
}
.admin-vertical-list{
  display:grid;
  gap:10px;
}
.admin-student-list{
  display:grid;
  gap:10px;
}
.admin-student-row,
.admin-result-row,
.admin-appeal-row,
.admin-request-card{
  display:grid;
  gap:10px;
  border-bottom:1px solid var(--border);
  padding-bottom:10px;
}
.admin-student-row:last-child,
.admin-result-row:last-child,
.admin-appeal-row:last-child,
.admin-request-card:last-child{
  border-bottom:0;
  padding-bottom:0;
}
.admin-student-row{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.admin-student-row .btn{
  min-height:30px;
  padding:0 12px;
  font-size:12px;
}
.admin-list-bullet{
  width:10px;
  height:10px;
  border-radius:50%;
  flex:0 0 auto;
}
.admin-appeal-row,
.admin-result-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.admin-request-card{
  grid-template-columns:1fr;
}
.admin-request-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.admin-request-actions .btn{
  min-height:34px;
}
.admin-home-buttons{
  display:grid;
  gap:12px;
}
.admin-home-buttons .btn{
  width:max-content;
  min-width:240px;
}
.admin-form-grid{
  display:grid;
  gap:12px;
  grid-template-columns:1fr;
}
/* -- Волнистые кривые на карточках (настоящие SVG-волны) -- */
.admin-wave-card{
  position:relative;
  overflow:hidden;
  isolation:isolate;
}

/* Верхняя волна */
.admin-wave-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:60px;
  pointer-events:none;
  z-index:0;
  background-image:url(data:image/svg+xml,%3Csvg\ xmlns=\'http://www.w3.org/2000/svg\'\ viewBox=\'0\ 0\ 800\ 60\'\ preserveAspectRatio=\'none\'%3E%3Cpath\ d=\'M-10\ 44\ C80\ 12\ 180\ 58\ 300\ 30\ C420\ 4\ 520\ 52\ 640\ 26\ C720\ 10\ 770\ 38\ 810\ 28\'\ fill=\'none\'\ stroke=\'%2320285f\'\ stroke-width=\'6\'\ stroke-opacity=\'0.18\'/%3E%3Cpath\ d=\'M-10\ 54\ C100\ 22\ 200\ 62\ 320\ 38\ C440\ 14\ 540\ 58\ 660\ 34\ C740\ 18\ 780\ 46\ 810\ 38\'\ fill=\'none\'\ stroke=\'%2320285f\'\ stroke-width=\'3\'\ stroke-opacity=\'0.10\'/%3E%3C/svg%3E);
  background-size:100% 100%;
  background-repeat:no-repeat
}

/* Нижняя волна */
.admin-wave-card::after{
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:60px;
  pointer-events:none;
  z-index:0;
  background-image:url(data:image/svg+xml,%3Csvg\ xmlns=\'http://www.w3.org/2000/svg\'\ viewBox=\'0\ 0\ 800\ 60\'\ preserveAspectRatio=\'none\'%3E%3Cpath\ d=\'M-10\ 16\ C80\ 48\ 180\ 2\ 300\ 30\ C420\ 56\ 520\ 8\ 640\ 34\ C720\ 50\ 770\ 22\ 810\ 32\'\ fill=\'none\'\ stroke=\'%2320285f\'\ stroke-width=\'6\'\ stroke-opacity=\'0.18\'/%3E%3Cpath\ d=\'M-10\ 6\ C100\ 38\ 200\ -2\ 320\ 22\ C440\ 46\ 540\ 2\ 660\ 26\ C740\ 42\ 780\ 14\ 810\ 22\'\ fill=\'none\'\ stroke=\'%2320285f\'\ stroke-width=\'3\'\ stroke-opacity=\'0.10\'/%3E%3C/svg%3E);
  background-size:100% 100%;
  background-repeat:no-repeat
}

.admin-wave-card > *{
  position:relative;
  z-index:1;
}

body[data-theme="dark"] .admin-wave-card::before{
  background-image:url(data:image/svg+xml,%3Csvg\ xmlns=\'http://www.w3.org/2000/svg\'\ viewBox=\'0\ 0\ 800\ 60\'\ preserveAspectRatio=\'none\'%3E%3Cpath\ d=\'M-10\ 44\ C80\ 12\ 180\ 58\ 300\ 30\ C420\ 4\ 520\ 52\ 640\ 26\ C720\ 10\ 770\ 38\ 810\ 28\'\ fill=\'none\'\ stroke=\'%23dce4ff\'\ stroke-width=\'6\'\ stroke-opacity=\'0.25\'/%3E%3Cpath\ d=\'M-10\ 54\ C100\ 22\ 200\ 62\ 320\ 38\ C440\ 14\ 540\ 58\ 660\ 34\ C740\ 18\ 780\ 46\ 810\ 38\'\ fill=\'none\'\ stroke=\'%23dce4ff\'\ stroke-width=\'3\'\ stroke-opacity=\'0.14\'/%3E%3C/svg%3E);
}
body[data-theme="dark"] .admin-wave-card::after{
  background-image:url(data:image/svg+xml,%3Csvg\ xmlns=\'http://www.w3.org/2000/svg\'\ viewBox=\'0\ 0\ 800\ 60\'\ preserveAspectRatio=\'none\'%3E%3Cpath\ d=\'M-10\ 16\ C80\ 48\ 180\ 2\ 300\ 30\ C420\ 56\ 520\ 8\ 640\ 34\ C720\ 50\ 770\ 22\ 810\ 32\'\ fill=\'none\'\ stroke=\'%23dce4ff\'\ stroke-width=\'6\'\ stroke-opacity=\'0.25\'/%3E%3Cpath\ d=\'M-10\ 6\ C100\ 38\ 200\ -2\ 320\ 22\ C440\ 46\ 540\ 2\ 660\ 26\ C740\ 42\ 780\ 14\ 810\ 22\'\ fill=\'none\'\ stroke=\'%23dce4ff\'\ stroke-width=\'3\'\ stroke-opacity=\'0.14\'/%3E%3C/svg%3E);
}
@media (min-width:768px){
  .admin-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .admin-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .admin-split{grid-template-columns:320px minmax(0,1fr)}
  .admin-stats{grid-template-columns:1fr 1fr}
  .admin-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1024px){
  .admin-split{grid-template-columns:360px minmax(0,1fr)}
}


/* stronger admin wave positioning fix */
.admin-wave-card{
  padding-top: 26px;
  padding-bottom: 26px;
}
.admin-wave-card::before,
.admin-wave-card::after{
  height: 110px !important;
}
.admin-wave-card::before{
  top: -92px !important;
}
.admin-wave-card::after{
  bottom: -92px !important;
}
.sidebar .admin-wave-card::before{
  top: -96px !important;
}
.sidebar .admin-wave-card::after{
  bottom: -96px !important;
}



/* ===== parent pages ===== */
.parent-hero{
  background:linear-gradient(180deg,#2b3478 0%, #20285f 100%);
  color:#fff;
  border-radius:28px;
  padding:20px;
  position:relative;
  overflow:hidden;
}
.parent-hero::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.13) 0 12%, transparent 13%),
    radial-gradient(circle at 90% 14%, rgba(255,255,255,.9) 0 3%, transparent 4%);
  pointer-events:none;
}
.parent-hero-inner{position:relative; z-index:1}
.parent-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.parent-child-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius:18px;
  padding:10px 12px;
  background:rgba(255,255,255,.16);
  color:#fff;
}
.parent-child-chip strong{display:block}
.parent-hero-note{
  margin-top:18px;
  font-size:13px;
  line-height:1.4;
}
.parent-star-row{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin:14px 0 16px;
  text-align:center;
}
.parent-star{
  font-size:42px;
  line-height:1;
  color:#fff;
}
.parent-star.gold{color:var(--gold)}
.parent-star-num{
  margin-top:-25px;
  font-size:14px;
  font-weight:800;
  color:#1f265d;
}
.parent-star-label{
  margin-top:6px;
  font-size:10px;
}
.parent-calendar{
  width:180px;
  margin-top:16px;
  background:#dfe5ff;
  color:#1f265d;
  border-radius:18px;
  padding:10px;
}
.parent-qa-list{
  display:grid;
  gap:12px;
}
.parent-score-table{
  width:100%;
  border-collapse:collapse;
}
.parent-score-table td,
.parent-score-table th{
  border:1px solid var(--border);
  padding:10px 8px;
  font-size:13px;
}
.parent-score-table th{background:var(--panel-soft)}
body[data-theme="dark"] .parent-score-table th{
  color:var(--text);
}
.parent-banner{
  background:linear-gradient(180deg,#6771d6 0%, #6872d7 100%);
  border-radius:28px;
  padding:20px;
  color:#fff;
  position:relative;
  overflow:hidden;
}
.parent-banner::after{
  content:"";
  position:absolute;
  right:-8%;
  bottom:-16px;
  width:70%;
  height:120px;
  background:#fff;
  border-radius:120px 0 0 0;
}
body[data-theme="dark"] .parent-banner::after{
  background:var(--panel);
}
.parent-banner-inner{position:relative; z-index:1}
.parent-banner .chip{
  background:#30386f;
  color:var(--gold);
  border-color:#30386f;
}
.parent-banner .chip.gold{
  background:#5560c5;
  color:#ffeb4d;
  border-color:#5560c5;
}
.parent-grid-2{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
@media (min-width:768px){
  .parent-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* parent home refinement + remove service-space visuals */
.page-subtitle:empty{
  display:none;
}
.visual-inner p:empty,
.result-note:empty{
  display:none;
}

.parent-hero{
  min-height: 430px;
}
.parent-hero::before{
  background:none;
}
.parent-home-logo{
  width:32px;
  height:32px;
  border-radius:50%;
  box-shadow:0 0 0 3px rgba(255,255,255,.12);
}
.parent-top{
  align-items:flex-start;
}
.parent-child-chip{
  padding:10px 14px;
  border-radius:18px;
}
.parent-child-chip strong{
  font-size:18px;
  line-height:1.1;
}
.parent-hero-note{
  margin-top:18px;
  max-width:260px;
  font-size:14px;
  font-weight:700;
}
.parent-star-row{
  margin:18px 0 18px;
  gap:22px;
}
.parent-star{
  font-size:46px;
}
.parent-star-num{
  margin-top:-27px;
}
.parent-star-label{
  font-size:11px;
}
.parent-ach-btn{
  min-height:44px;
  padding:0 20px;
  border-radius:999px;
  color:#1f255d;
  background:#fff;
  width:max-content;
}
.parent-calendar{
  margin-top:14px;
  margin-left:0;
}
@media (min-width:768px){
  .parent-hero{
    min-height:520px;
    padding:24px 24px 20px;
  }
  .parent-child-chip strong{
    font-size:22px;
  }
  .parent-hero-note{
    font-size:16px;
    max-width:320px;
  }
  .parent-star-row{
    max-width:720px;
  }
  .parent-calendar{
    width:220px;
  }
}
@media (min-width:1024px){
  .parent-hero{
    min-height:560px;
    padding:28px;
  }
  .parent-star-row{
    max-width:760px;
  }
}


/* parent home stars increase + activities route restore */
.parent-star-row{
  gap: 28px !important;
}
.parent-star{
  font-size: 58px !important;
}
.parent-star-num{
  margin-top: -34px !important;
  font-size: 18px !important;
}
.parent-star-label{
  font-size: 12px !important;
}
@media (min-width:768px){
  .parent-star{
    font-size: 70px !important;
  }
  .parent-star-num{
    margin-top: -40px !important;
    font-size: 20px !important;
  }
  .parent-star-label{
    font-size: 13px !important;
  }
}


/* parent home stars final sizing */
.parent-star-row{
  align-items:start;
}
.parent-star-row > div{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.parent-star{
  position:relative;
  width:92px;
  height:92px;
  font-size:92px !important;
  line-height:92px !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
.parent-star-num{
  position:absolute;
  inset:0;
  margin:0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px !important;
  font-weight:800;
  color:#1f265d;
  line-height:1;
  pointer-events:none;
}
.parent-star-label{
  margin-top:8px !important;
  font-size:13px !important;
  text-align:center;
}
.parent-star-row .parent-star:not(.gold) + .parent-star-label{
  margin-top:8px !important;
}
@media (min-width:768px){
  .parent-star{
    width:108px;
    height:108px;
    font-size:108px !important;
    line-height:108px !important;
  }
  .parent-star-num{
    font-size:32px !important;
  }
  .parent-star-label{
    font-size:14px !important;
  }
}

/* parent upload results page */
.upload-parent-card{
  width:min(100%, 360px);
  border:1.5px solid var(--field-border);
  border-radius:22px;
  overflow:hidden;
  background:var(--panel-soft);
}
.upload-parent-head{
  padding:18px 16px 14px;
  border-bottom:1.5px solid var(--field-border);
}
.upload-parent-title{
  font-size:20px;
  line-height:1.15;
  font-weight:800;
  text-transform:lowercase;
}
.upload-parent-date{
  margin-top:12px;
  font-size:16px;
  font-weight:700;
}
.upload-parent-drop{
  margin:20px auto 20px;
  width:220px;
  min-height:140px;
  border-radius:28px;
  background:var(--accent);
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px 16px;
  font-size:13px;
  line-height:1.35;
  font-weight:700;
}
.upload-parent-note{
  margin-top:12px;
  font-size:12px;
  font-weight:600;
}
body[data-theme="dark"] .upload-parent-card{
  background:var(--panel-soft);
}
body[data-theme="dark"] .upload-parent-head{
  border-bottom-color:var(--field-border);
}


/* parent stars final centering fix */
.parent-star{
  position:relative !important;
  width:92px !important;
  height:92px !important;
  display:grid !important;
  place-items:center !important;
  overflow:visible !important;
}
.parent-star-icon{
  display:block !important;
  font-size:92px !important;
  line-height:1 !important;
  color:inherit !important;
}
.parent-star.gold .parent-star-icon{
  color:var(--gold) !important;
}
.parent-star:not(.gold) .parent-star-icon{
  color:#ffffff !important;
}
.parent-star-num{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  transform:translate(-50%,-28%) !important;
  margin:0 !important;
  display:block !important;
  font-size:26px !important;
  font-weight:800 !important;
  line-height:1 !important;
  color:#1f265d !important;
  z-index:2 !important;
}
.parent-star-row > div{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}
@media (min-width:768px){
  .parent-star{
    width:108px !important;
    height:108px !important;
  }
  .parent-star-icon{
    font-size:108px !important;
  }
  .parent-star-num{
    font-size:28px !important;
  }
}



/* ===== final readability + admin + navigation fixes ===== */

/* 1) Dark theme readability: white on blue, blue on white */
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .card,
body[data-theme="dark"] .sidebar .card,
body[data-theme="dark"] .mobile-panel,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .parent-hero,
body[data-theme="dark"] .parent-banner{
  color:#ffffff;
}

body[data-theme="dark"] .page-title,
body[data-theme="dark"] .card-title,
body[data-theme="dark"] .user-name,
body[data-theme="dark"] .nav-link:not(.active),
body[data-theme="dark"] .bottom-link:not(.active),
body[data-theme="dark"] .metric,
body[data-theme="dark"] .admin-bar-title,
body[data-theme="dark"] .admin-bar-note,
body[data-theme="dark"] .parent-hero-note,
body[data-theme="dark"] .parent-star-label,
body[data-theme="dark"] .hero-sub,
body[data-theme="dark"] .star-label{
  color:#ffffff;
}

body[data-theme="dark"] .page-subtitle,
body[data-theme="dark"] .user-role,
body[data-theme="dark"] .section-kicker,
body[data-theme="dark"] .note,
body[data-theme="dark"] .metric-sub,
body[data-theme="dark"] .form-label,
body[data-theme="dark"] .check,
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .time{
  color:#d9dffb;
}

/* white/light surfaces keep blue text */
body[data-theme="dark"] .input,
body[data-theme="dark"] .lesson-card,
body[data-theme="dark"] .bubble,
body[data-theme="dark"] .message.right .bubble,
body[data-theme="dark"] .file-drop,
body[data-theme="dark"] .upload-parent-card,
body[data-theme="dark"] .upload-parent-head,
body[data-theme="dark"] .upload-parent-drop,
body[data-theme="dark"] .parent-score-table,
body[data-theme="dark"] .parent-score-table th,
body[data-theme="dark"] .parent-score-table td{
  color:#1d2458;
}

body[data-theme="dark"] .event-box,
body[data-theme="dark"] .shop-item,
body[data-theme="dark"] .info-box,
body[data-theme="dark"] .list-item,
body[data-theme="dark"] .stat-box,
body[data-theme="dark"] .chip,
body[data-theme="dark"] .tile-btn:not(.active),
body[data-theme="dark"] .class-btn,
body[data-theme="dark"] .day-btn,
body[data-theme="dark"] .chat-btn{
  color:#ffffff;
}

body[data-theme="dark"] .btn.light{
  color:#1d2458;
}
body[data-theme="dark"] .btn.dark{
  color:#20285f;
}

/* 2) Admin dark theme chart visibility + layout spacing */
.admin-grid-2{
  align-items:start;
}

.admin-bars{
  display:flex;
  align-items:flex-end;
  gap:20px;
  height:180px;
  padding:10px 12px 38px;
  overflow:visible;
}
.admin-bars .bar{
  width:34px;
}
.admin-bars .bar::after{
  bottom:-30px;
  font-size:12px;
  line-height:1.1;
  text-align:center;
}

body[data-theme="dark"] .admin-bars .bar{
  background:#dce4ff;
}
body[data-theme="dark"] .admin-bars .bar::after{
  color:#ffffff;
}
body[data-theme="dark"] .admin-circle::after{
  color:#1d2458;
}
body[data-theme="dark"] .admin-circle-wrap .note{
  color:#ffffff;
}

.admin-pill-list{
  align-content:flex-start;
  max-width:100%;
}
.admin-pill-list .admin-class-pill{
  flex:0 0 auto;
}

@media (min-width:768px){
  .admin-grid-2{
    gap:20px;
  }
  .admin-split{
    align-items:start;
  }
}

@media (min-width:1024px){
  .admin-split{
    grid-template-columns:380px minmax(0,1fr);
    gap:20px;
  }
}

/* 3) Remove bottom menu, keep sidebar navigation */
.mobile-bottom{
  display:none !important;
}
.mobile-menu{
  display:none !important;
}
.menu-toggle{
  display:none !important;
}
.sidebar{
  display:block !important;
}
.dashboard{
  grid-template-columns:1fr;
}
@media (min-width:1024px){
  .dashboard{
    grid-template-columns:280px minmax(0,1fr);
  }
}



/* ===== targeted final fixes ===== */

/* remove duplicated right header chip on all pages */
.user-chip{
  display:none !important;
}

/* parent grades table: white text in dark theme */
body[data-theme="dark"] .parent-score-table,
body[data-theme="dark"] .parent-score-table td,
body[data-theme="dark"] .parent-score-table th{
  color:#ffffff !important;
}
body[data-theme="dark"] .parent-score-table th{
  background:#303a82 !important;
}
body[data-theme="dark"] .parent-score-table td{
  background:transparent !important;
}

/* student shop cards: keep product names horizontal */
.shop-item{
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
}
.shop-item > div:first-child{
  min-width:0 !important;
}
.shop-item strong{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
  line-height:1.2 !important;
}


/* teacher review fix: parent stars should fit on mobile */
@media (max-width: 767px){
  .parent-star-row{
    grid-template-columns:repeat(4, minmax(0,1fr)) !important;
    gap:8px !important;
    width:100%;
  }
  .parent-star-row > div{
    min-width:0;
  }
  .parent-star{
    width:68px !important;
    height:68px !important;
  }
  .parent-star-icon{
    font-size:68px !important;
  }
  .parent-star-num{
    font-size:24px !important;
  }
  .parent-star-label{
    font-size:11px !important;
  }
}