/* Ortaokul Kanki — web portal (oyun hissi, tablet dostu) */
:root {
  --space-top: #1a1440;
  --space-mid: #2d1b69;
  --space-bot: #0f172a;
  --neon-purple: #a855f7;
  --neon-cyan: #22d3ee;
  --neon-pink: #f472b6;
  --neon-gold: #fbbf24;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --card: rgba(255, 255, 255, 0.1);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.portal-body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: var(--space-bot);
  min-height: 100vh;
  position: relative;
}

.portal-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(168, 85, 247, 0.35), transparent),
    radial-gradient(ellipse 70% 45% at 85% 20%, rgba(34, 211, 238, 0.22), transparent),
    linear-gradient(165deg, var(--space-top), var(--space-mid) 45%, var(--space-bot));
  pointer-events: none;
}

.portal-wrap {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.portal-wrap--wide { max-width: 720px; }

.portal-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.portal-brand .emoji { font-size: 3.2rem; line-height: 1; display: block; margin-bottom: 0.5rem; }
.portal-brand h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 900;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portal-brand p { margin: 0.4rem 0 0; color: var(--muted); font-weight: 600; }

.portal-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.portal-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
  color: var(--muted);
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

input:focus {
  outline: 2px solid var(--neon-cyan);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.95rem 1.2rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(135deg, var(--neon-cyan), #67e8f9);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--purple {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 0.65rem;
}

.portal-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.mode-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .mode-grid { grid-template-columns: 1fr 1fr; }
}

.mode-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(15, 23, 42, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.35rem 1.1rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.mode-card:hover {
  border-color: var(--neon-cyan);
  transform: scale(1.02);
}
.mode-card .ico { font-size: 2.75rem; display: block; margin-bottom: 0.5rem; }
.mode-card strong { display: block; font-size: 1.15rem; font-weight: 900; }
.mode-card span { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.child-list { display: grid; gap: 0.75rem; }
.child-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.child-item:hover { border-color: var(--neon-gold); }
.child-item .av { font-size: 1.75rem; }
.child-item .meta { flex: 1; }
.child-item .meta strong { font-weight: 800; }
.child-item .meta small { color: var(--muted); font-weight: 600; }

.portal-foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.portal-foot a { color: var(--neon-cyan); font-weight: 700; }

/* Tablet çerçeve — oyun.php */
.tablet-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tablet-frame {
  width: min(1100px, 100%);
  height: min(780px, calc(100vh - 2rem));
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(168, 85, 247, 0.15);
  background: #0b1020;
}
.tablet-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.tablet-bar {
  width: min(1100px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-weight: 800;
}
.tablet-bar a { color: var(--neon-cyan); text-decoration: none; }
.tablet-fs {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(15, 23, 42, 0.45);
  color: var(--neon-cyan);
  font: inherit;
  font-weight: 800;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.tablet-fs:hover { background: rgba(34, 211, 238, 0.14); }
body.is-fs .tablet-frame {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
body.is-fs .tablet-bar { display: none; }
@media (max-width: 700px) {
  .tablet-frame {
    height: calc(100vh - 4rem);
    border-radius: 12px;
  }
}

/* ─── Veli girişi — oyunlaştırılmış ─── */
body.login-body {
  overflow-x: auto;
}
body.login-body .portal-bg {
  background:
    radial-gradient(ellipse 70% 50% at 12% 18%, rgba(168, 85, 247, 0.42), transparent 55%),
    radial-gradient(ellipse 55% 40% at 88% 12%, rgba(34, 211, 238, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 45% at 70% 88%, rgba(244, 114, 182, 0.16), transparent 55%),
    linear-gradient(165deg, #1a0b3a, #2d1b69 42%, #0b0420);
}

.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 2rem;
}

.login-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 18%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 22% 72%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 40% 12%, rgba(251,191,36,0.7), transparent),
    radial-gradient(1px 1px at 63% 28%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 78% 64%, rgba(34,211,238,0.7), transparent),
    radial-gradient(1px 1px at 91% 22%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 15% 88%, rgba(168,85,247,0.65), transparent),
    radial-gradient(1px 1px at 52% 84%, rgba(255,255,255,0.45), transparent);
}

.login-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto 0.5rem;
}
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.login-brand img {
  width: 48px;
  height: 72px;
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 6px 14px rgba(168, 85, 247, 0.45));
}
.login-brand em {
  font-style: normal;
  color: var(--neon-gold);
}
.login-top-link {
  color: var(--neon-cyan);
  font-weight: 800;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
}
.login-top-link:hover { background: rgba(34, 211, 238, 0.12); }

.login-layout {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem 2rem;
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.login-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.kanki-stage {
  position: relative;
  width: min(420px, 100%);
}
.kanki-hero {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 40px rgba(76, 29, 149, 0.45));
  animation: kanki-bob 3.6s ease-in-out infinite;
}
.kanki-stage::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.45), transparent 70%);
  pointer-events: none;
}

.speech-bubble {
  position: absolute;
  top: 8%;
  right: -8%;
  max-width: 230px;
  padding: 0.85rem 1rem 0.95rem;
  background: #fff;
  color: #1e1b4b;
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
  animation: speech-pop 0.55s ease-out both;
}
.speech-bubble strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
  color: #6d28d9;
  margin-bottom: 0.2rem;
}
.speech-bubble p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
  color: #475569;
}

.login-perks {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.login-perks li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
}
.login-perks img { width: 22px; height: 22px; object-fit: contain; }

.float-ico {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  animation: float-y 3.2s ease-in-out infinite;
}
.float-ico--star { top: 6%; left: 4%; width: 68px; height: auto; animation-delay: 0s; }
.float-ico--gem { top: 18%; right: 2%; width: 58px; height: auto; animation-delay: 0.7s; }
.float-ico--xp { bottom: 18%; left: 0; width: 62px; height: auto; animation-delay: 1.2s; }

.login-panel { width: 100%; max-width: 460px; justify-self: end; }

.login-card {
  padding: 1.7rem 1.5rem 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.07));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.login-card-head { margin-bottom: 1.1rem; }
.login-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #0f172a;
  background: linear-gradient(135deg, var(--neon-gold), #f59e0b);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.login-badge--admin {
  color: #fff;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
}

.login-layout--solo {
  grid-template-columns: 1fr;
  justify-items: center;
  max-width: 480px;
}
.login-layout--solo .login-panel {
  max-width: 480px;
  justify-self: center;
  width: 100%;
}
.login-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 900;
}
.login-card-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.45;
}

.field-box {
  position: relative;
}
.field-box .field-ico {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-gold);
  font-size: 0.95rem;
  pointer-events: none;
}
.field-box input {
  padding-left: 2.45rem;
}

.btn--play {
  background: linear-gradient(135deg, #fbbf24, #f59e0b 45%, #f472b6);
  color: #1e1b4b;
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.38);
}
.btn--play img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

@keyframes kanki-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}
@keyframes speech-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .kanki-hero, .float-ico, .speech-bubble { animation: none; }
}

@media (max-width: 920px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 0.5rem 1rem;
  }
  .login-hero { min-height: 0; }
  .kanki-stage { width: min(280px, 72vw); margin: 0 auto; }
  .speech-bubble {
    right: -4%;
    top: 4%;
    max-width: 180px;
    padding: 0.65rem 0.75rem;
  }
  .speech-bubble p { display: none; }
  .float-ico--star { width: 48px; }
  .float-ico--gem { width: 42px; }
  .float-ico--xp { width: 44px; bottom: 8%; }
  .login-panel { max-width: 520px; justify-self: center; }
  .login-perks { margin-bottom: 0.75rem; }
}

@media (max-width: 520px) {
  .login-page { padding: 0.85rem 0.9rem 1.5rem; }
  .login-brand span { font-size: 0.8rem; }
  .speech-bubble { display: none; }
}

/* ─── Admin dashboard ─── */
body.admin-body.login-body { overflow-x: auto; }

.admin-dash {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.15rem 2.75rem;
}
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.1rem 0 1.35rem;
}
.admin-head h1 {
  margin: 0.2rem 0 0.25rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 900;
}
.admin-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}
.admin-head .btn {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 1.05rem;
  font-size: 0.88rem;
}

.admin-ok {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 1rem;
}
.admin-err { margin-bottom: 1rem; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.admin-stat {
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-stat strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, var(--neon-cyan), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.admin-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.admin-search input[type="search"] {
  min-width: min(280px, 100%);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0;
}
.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.admin-chip:hover,
.admin-chip.is-on {
  border-color: var(--neon-cyan);
  color: #fff;
  background: rgba(34, 211, 238, 0.16);
}
.nav-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15rem;
  text-align: center;
}

.admin-table-card { padding: 0; overflow: hidden; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.admin-table--wide { min-width: 960px; }
.contact-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.contact-name:hover strong,
.contact-name:focus-visible strong { text-decoration: underline; text-underline-offset: 3px; color: #c7d2fe; }
.contact-pop-float {
  position: fixed;
  z-index: 80;
  min-width: 220px;
  max-width: min(300px, calc(100vw - 20px));
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  font-size: 0.84rem;
}
.contact-pop-title { font-weight: 800; margin-bottom: 0.45rem; font-size: 0.9rem; }
.contact-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.28rem 0;
}
.contact-row span { color: #94a3b8; font-weight: 700; min-width: 52px; font-size: 0.75rem; }
.contact-val {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.contact-val:hover { color: #a5b4fc; }
.contact-copied { color: #86efac; font-size: 0.72rem; font-weight: 700; }
.admin-table .child-cell,
.admin-table .device-cell { white-space: normal; max-width: 280px; }
.child-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.child-stack li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}
.use-yes { color: #6ee7b7; font-weight: 800; }
.use-no { color: #94a3b8; font-weight: 700; }
.device-ua {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
.btn--danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  box-shadow: none;
}
.del-form { display: inline-flex; margin: 0; }
.admin-table th,
.admin-table td {
  padding: 0.78rem 0.85rem;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}
.admin-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }
.admin-table .muted { color: var(--muted); font-weight: 600; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.pill--parent { background: rgba(168, 85, 247, 0.22); color: #e9d5ff; }
.pill--student { background: rgba(34, 211, 238, 0.18); color: #a5f3fc; }
.pill--trial { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.pill--active { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.pill--expired { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
.pill--none { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }

.grade-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.grade-form select {
  appearance: none;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
}
.btn--sm {
  width: auto;
  margin-top: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  box-shadow: none;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
}
.admin-note-card,
.notify-card {
  padding: 1.2rem 1.3rem 1.35rem;
  margin-bottom: 1.15rem;
}
.admin-note-card p,
.notify-card p { color: var(--muted); font-weight: 700; line-height: 1.5; }
.price-form, .invoice-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.price-form input[type="number"],
.notify-card input[type="text"],
.notify-card textarea {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(15,23,42,0.55);
  color: #fff;
  font: inherit;
  font-weight: 700;
}
.notify-card textarea { width: 100%; min-height: 110px; }
.notify-card .btn { width: auto; margin-top: 1rem; }
.notify-targets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.notify-targets .admin-chip { cursor: pointer; gap: 0.4rem; }
.parent-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
  max-height: 240px;
  overflow: auto;
  padding: 0.4rem 0;
}
.parent-pick label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(15,23,42,0.4);
  font-size: 0.82rem;
}
.admin-sub { margin: 1.4rem 0 0.7rem; font-size: 1.1rem; }
.invoice-form input[type="file"] { max-width: 180px; font-size: 0.75rem; color: #cbd5e1; }
.admin-lead { color: var(--muted); font-weight: 700; margin: -0.35rem 0 0.8rem; }
.review-form { margin: 0; }
.review-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}
.review-check input { width: 1.05rem; height: 1.05rem; accent-color: #22c55e; }
.is-reviewed td { opacity: 0.55; }
.bug-msg { max-width: 420px; white-space: normal; font-weight: 700; line-height: 1.45; }
.admin-sub .contact-hint {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.22);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  vertical-align: middle;
}

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(167, 139, 250, 0.4);
}
.demo-banner strong { font-size: 0.95rem; }
.demo-banner span { color: var(--muted); font-weight: 700; }
.demo-banner em { margin-left: auto; font-style: normal; font-weight: 800; color: #67e8f9; }

.chart-card { padding: 1.1rem 1.15rem 1.25rem; margin-bottom: 1rem; }
.chart-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 800;
}
.chart-card h2 .muted { font-weight: 600; font-size: 0.8rem; margin-left: 0.4rem; }
.chart-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.lg {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.lg-parent { background: #38bdf8; }
.lg-student { background: #a78bfa; }
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 180px;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.chart-col {
  flex: 1 0 18px;
  min-width: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.chart-val {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--muted);
  min-height: 0.9rem;
}
.chart-bar {
  width: 100%;
  max-width: 22px;
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
}
.chart-pair {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: calc(100% - 1.6rem);
}
.chart-bar--parent { background: #38bdf8; flex: 1; border-radius: 4px 4px 1px 1px; }
.chart-bar--student { background: #a78bfa; flex: 1; border-radius: 4px 4px 1px 1px; }
.chart-x {
  margin-top: 0.3rem;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transform: rotate(-50deg);
  transform-origin: top left;
  height: 1.1rem;
  width: 1.1rem;
}

@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-head { flex-direction: column; }
}
@media (max-width: 520px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stat:last-child { grid-column: 1 / -1; }
}
