/* Launch polish for authentication and portals */
::selection { color: #fff; background: #5361ef; }

.auth-story::after {
  content: "x²  +  теза  +  ∞";
  position: absolute;
  right: -55px;
  bottom: 13%;
  color: rgba(154,197,255,.075);
  font: italic 700 54px/1 Georgia, serif;
  transform: rotate(-12deg);
  animation: authFormula 8s ease-in-out infinite alternate;
}
.auth-story .brand-logo-badge { position: relative; overflow: hidden; }
.auth-story .brand-logo-badge::after {
  content: "";
  position: absolute;
  inset: -60% 35% -60% -45%;
  background: rgba(255,255,255,.3);
  transform: rotate(18deg);
}
.auth-workspace::before {
  content: "";
  position: fixed;
  width: 370px;
  height: 370px;
  right: -180px;
  bottom: -180px;
  border: 1px dashed rgba(75,94,219,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(75,94,219,.018), 0 0 0 120px rgba(75,94,219,.012);
  pointer-events: none;
}
.role-card { overflow: hidden; isolation: isolate; }
.role-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 150px;
  height: 150px;
  right: -80px;
  bottom: -90px;
  border-radius: 50%;
  opacity: 0;
  background: rgba(23,108,255,.1);
  transition: opacity .25s, transform .4s cubic-bezier(.2,.75,.2,1);
}
.role-card.teacher::before { background: rgba(115,92,242,.1); }
.role-card:hover::before, .role-card.selected::before { opacity: 1; transform: scale(1.35); }
.role-card.selected { transform: translateY(-2px); }
.auth-card { animation: authFadeIn .45s ease both; }
.button-spinner {
  width: 15px;
  height: 15px;
  display: inline-block;
  margin-left: 7px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  animation: buttonSpin .7s linear infinite;
}
button:disabled, .button:disabled { cursor: not-allowed; opacity: .68; transform: none; }
@keyframes authFormula { to { transform: translate(-25px,-18px) rotate(-7deg); } }
@keyframes authFadeIn { from { opacity: 0; } }
@keyframes buttonSpin { to { transform: rotate(360deg); } }

.dashboard-body {
  background:
    radial-gradient(circle at 87% 4%, rgba(87,96,235,.065), transparent 24%),
    radial-gradient(circle at 32% 92%, rgba(23,108,255,.04), transparent 26%),
    #f4f6fa;
}
.dashboard-body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: .38;
  background-image: radial-gradient(rgba(22,44,83,.12) .55px, transparent .55px);
  background-size: 20px 20px;
  mask-image: linear-gradient(120deg, transparent 10%, black 55%, transparent 96%);
  pointer-events: none;
}
.sidebar { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(141,176,232,.35) transparent; }
.sidebar::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  left: -150px;
  bottom: 9%;
  border-radius: 50%;
  background: rgba(46,92,228,.13);
  filter: blur(65px);
  pointer-events: none;
}
.sidebar::after {
  content: "π  ∑  А  Б";
  position: absolute;
  right: -20px;
  top: 42%;
  color: rgba(142,180,242,.035);
  font: italic 700 38px/1.5 Georgia,serif;
  white-space: pre;
  transform: rotate(-90deg);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.side-link { position: relative; }
.side-link svg { transition: transform .24s cubic-bezier(.2,.75,.2,1), color .2s; }
.side-link:hover svg { color: #77b9ff; transform: scale(1.08) rotate(-3deg); }
.academy-status { box-shadow: inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(12px); }
.side-profile { border: 1px solid rgba(255,255,255,.04); }
.topbar { box-shadow: 0 6px 25px rgba(8,27,64,.025); }
.searchbox input { transition: width .25s, border-color .2s, background .2s, box-shadow .2s; }
.searchbox input:focus { box-shadow: 0 0 0 4px rgba(23,108,255,.065), 0 9px 28px rgba(8,27,64,.05); }
.app-content > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .55s cubic-bezier(.2,.75,.2,1);
}
.app-ready .app-content > * { opacity: 1; transform: translateY(0); }
.app-ready .app-content > :nth-child(2) { transition-delay: .07s; }
.app-ready .app-content > :nth-child(3) { transition-delay: .14s; }
.page-intro h1 {
  color: transparent;
  background: linear-gradient(100deg,#0b1933 0%,#163c7a 68%,#6855d9 120%);
  -webkit-background-clip: text;
  background-clip: text;
}
.metric-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s cubic-bezier(.2,.75,.2,1), box-shadow .3s, border-color .3s;
}
.metric-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 130px;
  height: 130px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  background: rgba(23,108,255,.08);
  transition: transform .35s cubic-bezier(.2,.75,.2,1);
}
.metric-card:nth-child(2)::before { background: rgba(115,92,242,.09); }
.metric-card:nth-child(3)::before { background: rgba(242,139,44,.1); }
.metric-card:nth-child(4)::before { background: rgba(25,185,129,.09); }
.metric-card:hover { transform: translateY(-5px); border-color: #d3def1; box-shadow: 0 18px 42px rgba(8,27,64,.09); }
.metric-card:hover::before { transform: scale(1.55); }
.metric-icon { box-shadow: inset 0 1px rgba(255,255,255,.7); }
.panel {
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.75,.2,1), box-shadow .3s, border-color .3s;
}
.panel:hover { border-color: #d9e2f0; box-shadow: 0 16px 44px rgba(8,27,64,.065); }
.panel-head { background: linear-gradient(180deg,rgba(250,252,255,.88),rgba(255,255,255,.7)); }
.teacher-banner, .lesson-card { transition: transform .3s cubic-bezier(.2,.75,.2,1), box-shadow .3s; }
.teacher-banner:hover, .lesson-card:hover { transform: translateY(-3px); box-shadow: 0 19px 40px rgba(11,38,82,.2); }
.teacher-banner::before, .lesson-card::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 220%;
  left: -160px;
  top: -60%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.13),transparent);
  transform: rotate(18deg);
  transition: left .75s cubic-bezier(.2,.75,.2,1);
}
.teacher-banner:hover::before, .lesson-card:hover::before { left: 110%; }
.button { isolation: isolate; }
.button-primary::after, .lesson-action::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background: linear-gradient(125deg,rgba(255,255,255,.17),transparent 55%);
  transition: opacity .25s;
}
.button-primary:hover::after, .lesson-action:hover::after { opacity: 1; }
.progress-mini span, .xp-progress span, .academy-status-bar span { position: relative; overflow: hidden; }
.progress-mini span::after, .xp-progress span::after, .academy-status-bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
  transform: translateX(-100%);
  animation: progressShine 3.8s ease-in-out infinite;
}
.schedule-item { border-radius: 11px; transition: background .2s, padding .2s; }
.schedule-item:hover { padding-inline: 8px; background: #f7f9fc; }
.student-row { border-radius: 11px; transition: background .2s, padding .2s; }
.student-row:hover { padding-inline: 8px; background: #f8f9fc; }
.task-box { transition: transform .2s, border-color .2s, background .2s; }
.task-box:hover { transform: scale(1.12); border-color: #7195d8; }
.search-hit { animation: searchHit 1.8s ease; }
.toast[data-tone="error"] .toast-icon { color: #d43e56; background: #fff0f3; }
.toast[data-tone="info"] .toast-icon { color: #176cff; background: #e9f2ff; }

/* Functional workspace drawer */
.portal-drawer {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(410px, 610px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s;
}
.portal-drawer.open { opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-backdrop { border: 0; background: rgba(3,9,25,.38); backdrop-filter: blur(8px); cursor: pointer; }
.drawer-sheet {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.65);
  background:
    radial-gradient(circle at 100% 0, rgba(91,99,235,.1), transparent 24%),
    rgba(249,250,253,.95);
  box-shadow: -28px 0 90px rgba(3,16,43,.18);
  transform: translateX(102%);
  transition: transform .45s cubic-bezier(.2,.78,.2,1);
  backdrop-filter: blur(28px) saturate(135%);
}
.portal-drawer.open .drawer-sheet { transform: translateX(0); }
.drawer-head {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(218,225,236,.85);
  background: rgba(255,255,255,.72);
}
.drawer-title { min-width: 0; flex: 1; }
.drawer-title small { display: block; margin-bottom: 5px; color: #7b5be0; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.drawer-title h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.drawer-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e6ef;
  border-radius: 13px;
  color: #58677e;
  background: white;
  cursor: pointer;
  font-size: 22px;
  transition: transform .2s, color .2s, box-shadow .2s;
}
.drawer-close:hover { color: #18253e; transform: rotate(8deg); box-shadow: 0 9px 25px rgba(8,27,64,.09); }
.drawer-content { min-height: 0; flex: 1; overflow-y: auto; padding: 22px; overscroll-behavior: contain; }
.drawer-section { display: grid; gap: 13px; margin-bottom: 24px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.drawer-section-head h3 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.drawer-section-head span { color: #7a879a; font-size: 9px; }
.drawer-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #e2e8f1;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 7px 24px rgba(8,27,64,.04);
  transition: transform .25s cubic-bezier(.2,.75,.2,1), box-shadow .25s, border-color .25s;
}
.drawer-card:hover { transform: translateY(-2px); border-color: #d2def0; box-shadow: 0 14px 32px rgba(8,27,64,.075); }
.drawer-card-row { display: flex; align-items: center; gap: 13px; }
.drawer-card-icon { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #176cff; background: #e9f2ff; font-size: 16px; font-weight: 850; }
.drawer-card-icon.violet { color: #7158dc; background: #f0edff; }
.drawer-card-icon.orange { color: #c97622; background: #fff2e4; }
.drawer-card-icon.mint { color: #149a6d; background: #e5faf2; }
.drawer-card-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.drawer-card-copy strong { font-size: 11px; }
.drawer-card-copy span { color: #758297; font-size: 9px; line-height: 1.5; }
.drawer-tag { padding: 5px 8px; border-radius: 8px; color: #52647b; background: #f1f4f8; font-size: 8px; font-weight: 800; }
.drawer-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg,#176cff,#6159e9);
  box-shadow: 0 9px 22px rgba(23,108,255,.2);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.drawer-action:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(23,108,255,.28); }
.drawer-action.secondary { color: #234269; border: 1px solid #dce4ef; background: white; box-shadow: none; }
.drawer-action.done { color: #14714e; background: #e5f8ef; box-shadow: none; }
.drawer-form { display: grid; gap: 12px; }
.drawer-field { display: grid; gap: 6px; }
.drawer-field label { color: #34435b; font-size: 9px; font-weight: 800; }
.drawer-field input, .drawer-field select, .drawer-field textarea {
  width: 100%;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  outline: none;
  padding: 11px 12px;
  color: #14213a;
  background: white;
  font-size: 11px;
  resize: vertical;
}
.drawer-field input:focus, .drawer-field select:focus, .drawer-field textarea:focus { border-color: #6e91db; box-shadow: 0 0 0 3px rgba(23,108,255,.08); }
.drawer-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-submit-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.message-thread { display: grid; gap: 10px; }
.message-bubble { max-width: 85%; padding: 11px 13px; border-radius: 15px 15px 15px 5px; color: #34445c; background: white; box-shadow: 0 7px 18px rgba(8,27,64,.05); font-size: 10px; line-height: 1.55; }
.message-bubble.own { margin-left: auto; border-radius: 15px 15px 5px 15px; color: white; background: linear-gradient(135deg,#176cff,#625bea); }
.calendar-strip { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.calendar-day { min-height: 64px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid #e1e7f0; border-radius: 13px; color: #77849a; background: white; font-size: 8px; font-weight: 800; }
.calendar-day strong { color: #17243c; font-size: 14px; }
.calendar-day.active { color: #fff; border-color: transparent; background: linear-gradient(145deg,#176cff,#6858e6); box-shadow: 0 10px 24px rgba(53,83,225,.25); }
.calendar-day.active strong { color: white; }
.xp-rule { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.xp-rule + .xp-rule { margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.xp-rule b { min-width: 55px; color: #176cff; font-size: 10px; text-align: right; }
.notification-row { display: flex; gap: 11px; align-items: flex-start; }
.notification-row + .notification-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf0f5; }
.notification-dot-lg { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #176cff; box-shadow: 0 0 0 4px rgba(23,108,255,.09); }
.notification-row.read .notification-dot-lg { background: #b8c1cf; box-shadow: none; }
.drawer-empty { padding: 38px 20px; border: 1px dashed #dbe3ee; border-radius: 16px; color: #7d899b; text-align: center; font-size: 11px; line-height: 1.6; }
.portal-ambient {
  --ambient-x: 70vw;
  --ambient-y: 20vh;
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(280px circle at var(--ambient-x) var(--ambient-y),rgba(84,101,239,.07),transparent 70%);
  pointer-events: none;
}

/* Dedicated profile pages */
.oauth-area { display: grid; gap: 12px; margin: 16px 0 20px; }
.google-button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; border: 1px solid #dce3ee; border-radius: 13px; color: #23344d; background: #fff; box-shadow: 0 8px 24px rgba(8,27,64,.055); font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .2s,box-shadow .2s,border-color .2s; }
.google-button:hover { transform: translateY(-2px); border-color: #c7d4e7; box-shadow: 0 13px 30px rgba(8,27,64,.09); }
.google-button:disabled { cursor: default; transform: none; color: #14704d; background: #eefaf5; }
.google-button.not-configured { border-style: dashed; }
.google-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: conic-gradient(from -45deg,#4285f4 0 25%,#34a853 0 50%,#fbbc05 0 75%,#ea4335 0); font: 900 13px Arial,sans-serif; }
.oauth-divider { display: flex; align-items: center; gap: 10px; color: #8a96a7; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.oauth-divider::before,.oauth-divider::after { content: ""; height: 1px; flex: 1; background: #e6eaf1; }
.google-locked { color: #54705f !important; background: #f2faf6 !important; }

.workspace-page { display: grid; gap: 20px; }
.workspace-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 172px;
  padding: 30px;
  border: 1px solid rgba(81,112,176,.14);
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg,#071b41,#123d84 58%,#5c51df);
  box-shadow: 0 24px 60px rgba(11,40,92,.2);
}
.workspace-hero::after { content: "∑"; position: absolute; right: 30px; top: -45px; color: rgba(255,255,255,.07); font: 190px Georgia,serif; }
.workspace-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.workspace-hero small { color: #9fc2f1; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.workspace-hero h1 { margin: 9px 0 8px; font-size: clamp(27px,3vw,40px); letter-spacing: -.045em; }
.workspace-hero p { margin: 0; color: #bed0e9; font-size: 12px; line-height: 1.65; }
.workspace-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.workspace-grid.single { grid-template-columns: 1fr; }
.workspace-card { min-width: 0; padding: 22px; border: 1px solid #e1e7f0; border-radius: 20px; background: rgba(255,255,255,.93); box-shadow: 0 12px 34px rgba(8,27,64,.055); }
.workspace-card.wide { grid-column: 1 / -1; }
.workspace-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.workspace-card-head h2 { margin: 0; color: #17243c; font-size: 16px; letter-spacing: -.025em; }
.workspace-card-head p { margin: 5px 0 0; color: #7b899c; font-size: 10px; line-height: 1.55; }
.workspace-list { display: grid; gap: 11px; }
.workspace-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid #e7ebf2; border-radius: 15px; background: #fbfcfe; }
.workspace-row-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.workspace-row-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #176cff; background: #edf4ff; font-size: 11px; font-weight: 900; }
.workspace-row-copy { min-width: 0; }
.workspace-row-copy strong { display: block; color: #1b2941; font-size: 12px; }
.workspace-row-copy span { display: block; margin-top: 4px; color: #7c899c; font-size: 9px; line-height: 1.5; }
.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.workspace-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: 11px; color: white; background: linear-gradient(135deg,#176cff,#6259e9); box-shadow: 0 9px 22px rgba(23,108,255,.2); font-size: 10px; font-weight: 800; cursor: pointer; }
.workspace-button.secondary { color: #294567; border: 1px solid #dce4ef; background: white; box-shadow: none; }
.workspace-button.success { color: #116a48; background: #e3f8ef; box-shadow: none; }
.workspace-button:disabled { cursor: not-allowed; opacity: .62; }
.workspace-button.disabled { cursor: default; opacity: .62; pointer-events: none; }
.workspace-form { display: grid; gap: 13px; }
.workspace-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.workspace-field { display: grid; gap: 6px; }
.workspace-field label { color: #34435b; font-size: 9px; font-weight: 850; }
.workspace-field input,.workspace-field select,.workspace-field textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #dfe5ef; border-radius: 12px; outline: none; color: #14213a; background: white; font-size: 11px; resize: vertical; }
.workspace-field input:focus,.workspace-field select:focus,.workspace-field textarea:focus { border-color: #6e91db; box-shadow: 0 0 0 3px rgba(23,108,255,.08); }
.workspace-empty { padding: 36px 22px; border: 1px dashed #d7e0ec; border-radius: 16px; color: #7c899b; background: #fbfcfe; text-align: center; font-size: 11px; line-height: 1.7; }
.status-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; color: #8b6116; background: #fff5d9; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.status-chip.accepted,.status-chip.available { color: #14704d; background: #e3f8ef; }
.status-chip.rejected,.status-chip.completed { color: #67768a; background: #edf1f6; }
.status-chip.pilot,.status-chip.booked,.status-chip.open { color: #7450c8; background: #f0ebff; }
.status-chip.active,.status-chip.paid { color: #14704d; background: #e3f8ef; }
.status-chip.cancelled,.status-chip.expired { color: #9a3d51; background: #fff0f3; }
.status-chip.past { color: #596a82; background: #eef2f7; }
.workspace-button { text-decoration: none; border: 0; }
.referral-panel { position: relative; overflow: hidden; padding: 28px; color: white; background: linear-gradient(135deg,#0b2352,#176cff 60%,#6d56e7); }
.referral-panel::after { content: "10"; position: absolute; right: -10px; bottom: -65px; color: rgba(255,255,255,.08); font-size: 190px; font-weight: 900; }
.referral-panel .workspace-card-head h2,.referral-panel .workspace-card-head p { color: white; }
.referral-code { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.referral-code strong { padding: 13px 16px; border: 1px solid rgba(255,255,255,.22); border-radius: 13px; background: rgba(255,255,255,.12); font: 850 19px ui-monospace,"Cascadia Code",monospace; letter-spacing: .16em; }
.referral-link { position: relative; z-index: 1; margin-top: 12px; padding: 12px 14px; overflow: hidden; border-radius: 12px; color: #c9dcf7; background: rgba(3,18,48,.28); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.reward-value { color: #176cff; font-size: 14px; font-weight: 900; }
.workspace-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.workspace-stat { padding: 16px; border: 1px solid #e4e9f1; border-radius: 15px; background: #fbfcfe; }
.workspace-stat strong { display: block; color: #16243e; font-size: 22px; }
.workspace-stat span { display: block; margin-top: 4px; color: #7e8b9d; font-size: 9px; }
.booking-list { display: grid; gap: 14px; }
.history-list { display: grid; gap: 12px; }
.history-card { display: grid; grid-template-columns: minmax(130px,.45fr) 1fr; gap: 18px; padding: 18px; border: 1px solid #e2e9f3; border-radius: 20px; background: linear-gradient(135deg,#fff,#f8fbff); box-shadow: 0 14px 34px rgba(12,43,98,.06); }
.history-date { padding-right: 16px; border-right: 1px solid #e3e9f2; }
.history-date strong { display: block; color: #10213b; font-size: 12px; line-height: 1.45; }
.history-date span,.history-copy p { color: #748198; font-size: 9px; line-height: 1.6; }
.history-copy h3 { margin: 0 0 6px; color: #13223c; font-size: 15px; letter-spacing: -.02em; }
.history-copy p { margin: 0 0 12px; }
.history-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.history-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 10px; border-radius: 999px; color: #2550d8; background: #edf3ff; font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.history-pill.warning { color: #9a3d51; background: #fff0f3; }
.booking-card { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(200px,1.2fr) minmax(260px,1.4fr); gap: 18px; align-items: center; padding: 18px; border: 1px solid #e1e8f2; border-radius: 18px; background: linear-gradient(135deg,#fbfdff,#f6f8fc); }
.booking-date { display: grid; gap: 5px; padding-right: 16px; border-right: 1px solid #e0e7f1; }
.booking-date strong { color: #152540; font-size: 12px; }
.booking-date span,.booking-main p { margin: 0; color: #7b899d; font-size: 9px; }
.booking-main h3 { margin: 0 0 5px; color: #14223b; font-size: 14px; }
.booking-main .status-chip { margin-top: 9px; }
.rating-form { grid-column: 1 / -1; display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid #e2e8f1; }
.rating-form strong { font-size: 11px; }
.rating-form select,.rating-form textarea { min-height: 42px; padding: 10px 12px; border: 1px solid #dfe5ef; border-radius: 11px; background: white; font-size: 10px; }
.workspace-button.danger { color: #b22f49; border: 1px solid #f0cdd5; background: #fff3f5; box-shadow: none; }
.relationship-card { overflow: hidden; border: 1px solid #e3e9f2; border-radius: 17px; background: #fbfcfe; }
.relationship-card > .workspace-row { border: 0; border-radius: 0; background: transparent; }
.student-credit-line { padding: 10px 15px; color: #5b6b81; border-top: 1px solid #e8edf4; background: #f5f8fc; font-size: 9px; }
.inline-booking-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 14px; border-top: 1px solid #e4eaf2; background: white; }
.inline-booking-form label,.catalog-action label { display: grid; gap: 5px; color: #46556d; font-size: 8px; font-weight: 800; }
.inline-booking-form input,.inline-booking-form select,.catalog-action input,.catalog-action select,.catalog-search input { min-height: 40px; padding: 9px 11px; border: 1px solid #dfe5ef; border-radius: 11px; outline: none; background: white; font-size: 10px; }
.catalog-search { display: grid; grid-template-columns: 1fr .7fr auto; gap: 10px; margin-bottom: 18px; }
.teacher-catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.teacher-catalog-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; border: 1px solid #e2e8f1; border-radius: 19px; background: linear-gradient(145deg,#fff,#f8faff); box-shadow: 0 9px 25px rgba(8,27,64,.04); }
.catalog-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: white; background: linear-gradient(135deg,#176cff,#6a58e7); font-size: 13px; font-weight: 900; }
.catalog-copy { min-width: 0; }
.catalog-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.catalog-title h2 { margin: 0; color: #15243e; font-size: 15px; }
.catalog-copy > strong { display: block; margin-top: 6px; color: #176cff; font-size: 9px; }
.catalog-copy p { min-height: 45px; margin: 9px 0; color: #6f7e93; font-size: 9px; line-height: 1.65; }
.catalog-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #5d6c82; font-size: 8px; }
.catalog-meta span { padding: 5px 8px; border-radius: 8px; background: #eef3fa; }
.catalog-action { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; align-items: end; padding-top: 13px; border-top: 1px solid #e7ebf2; }
.support-card { border-color: rgba(96,84,223,.25); background: linear-gradient(145deg,#fff,#f6f4ff); }
.request-history { display: grid; gap: 7px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e4e0f5; color: #6d7890; font-size: 9px; }
.balance-hero { display: grid; grid-template-columns: 180px 180px 1fr; gap: 18px; align-items: center; padding: 25px; border-radius: 23px; color: white; background: linear-gradient(135deg,#071b41,#1454bd 60%,#6656e4); box-shadow: 0 20px 50px rgba(11,40,92,.2); }
.balance-hero div { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: baseline; }
.balance-hero small { grid-column: 1 / -1; color: #a8c7ef; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.balance-hero strong { font-size: 35px; }
.balance-hero span { color: #c7daf3; font-size: 9px; }
.balance-hero p { margin: 0; color: #c5d8f1; font-size: 10px; line-height: 1.6; }
.package-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.package-card { position: relative; display: grid; gap: 7px; padding: 18px; border: 1px solid #e1e7f0; border-radius: 17px; background: #fbfcfe; }
.package-card small { min-height: 28px; color: #66758b; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.package-card > strong { color: #14233e; font-size: 32px; }
.package-card > span { color: #7b899c; font-size: 9px; }
.package-card b { color: #176cff; font-size: 16px; }
.package-card del { color: #9ba5b4; font-size: 9px; }
.package-card .workspace-button { margin-top: 8px; }
.settings-check { display: flex; align-items: center; gap: 9px; color: #425169; font-size: 10px; }
.discord-card { background: linear-gradient(145deg,#fff,#f5f4ff); }
.integration-note { margin-top: 17px; padding: 14px; border-radius: 13px; color: #5e6680; background: #eceafd; font-size: 9px; line-height: 1.65; }
.admin-body { min-height: 100vh; color: #17243c; background: #f4f7fb; }
.admin-topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(18px,5vw,70px); border-bottom: 1px solid #e1e7f0; background: rgba(255,255,255,.92); }
.admin-topbar .brand { color: #11233f; }
.admin-shell { width: min(1180px,calc(100% - 32px)); display: grid; gap: 20px; margin: 28px auto 60px; }
.admin-request-list { display: grid; gap: 14px; }
.admin-request { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; padding: 18px; border: 1px solid #e1e7f0; border-radius: 18px; background: #fbfcfe; }
.admin-request-copy h3 { margin: 10px 0 5px; font-size: 16px; }
.admin-request-copy > strong { color: #176cff; font-size: 10px; }
.admin-request-copy p { color: #65748a; font-size: 10px; line-height: 1.65; }
.admin-request-copy small { color: #8994a5; font-size: 8px; }
.admin-assign-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.admin-assign-form label { display: grid; gap: 5px; color: #46556d; font-size: 8px; font-weight: 800; }
.admin-assign-form select,.admin-assign-form input { min-height: 42px; padding: 10px 11px; border: 1px solid #dfe5ef; border-radius: 11px; background: white; font-size: 10px; }
.admin-assign-form .workspace-button { grid-column: 1 / -1; }
.admin-user-card { grid-template-columns: minmax(260px,.75fr) 1.25fr; }
.admin-user-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-content: start; }
.admin-user-form input,.admin-user-form select,.admin-user-form textarea { min-height: 40px; padding: 9px 11px; border: 1px solid #dfe5ef; border-radius: 11px; color: #17243c; background: white; font-size: 10px; }
.admin-user-form textarea,.admin-user-form .settings-check,.admin-user-form .workspace-button { grid-column: 1 / -1; }
.calendar-stage { position: relative; min-width: 0; overflow: hidden; padding: 26px; border-radius: 28px; color: white; background: radial-gradient(circle at 86% 8%,rgba(121,103,255,.5),transparent 28%),radial-gradient(circle at 15% 110%,rgba(25,172,255,.34),transparent 34%),linear-gradient(135deg,#061939 0%,#0d3f87 55%,#413caa 100%); box-shadow: 0 24px 60px rgba(8,38,91,.22); }
.calendar-stage::before { content: ""; position: absolute; width: 290px; height: 290px; right: -145px; bottom: -165px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025),0 0 0 86px rgba(255,255,255,.018); }
.calendar-toolbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.calendar-toolbar small { color: #9ec9ff; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.calendar-toolbar h2 { margin: 7px 0 0; color: white; font-size: clamp(19px,2.2vw,28px); letter-spacing: -.035em; }
.calendar-controls { display: flex; align-items: center; gap: 7px; padding: 5px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(3,18,48,.28); backdrop-filter: blur(12px); }
.calendar-controls button { min-width: 38px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; color: white; background: transparent; font-size: 10px; font-weight: 850; cursor: pointer; transition: transform .25s ease,background .25s ease; }
.calendar-controls button:hover { transform: translateY(-2px); background: rgba(255,255,255,.13); }
.calendar-scroll { position: relative; z-index: 2; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.calendar-week { min-width: 820px; display: grid; grid-template-columns: repeat(7,minmax(100px,1fr)); gap: 10px; }
.calendar-day { min-height: 224px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.075); backdrop-filter: blur(12px); animation: calendarDayIn .55s both; animation-delay: calc(var(--day-index) * 55ms); transition: transform .28s ease,background .28s ease,border-color .28s ease; }
.calendar-day:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.11); }
.calendar-day.today { border-color: rgba(131,224,255,.75); background: linear-gradient(180deg,rgba(64,186,255,.22),rgba(255,255,255,.08)); box-shadow: inset 0 0 0 1px rgba(100,206,255,.22),0 13px 32px rgba(0,12,44,.17); }
.calendar-day header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-day header span { color: #b7d0f0; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.calendar-day header strong { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: white; background: rgba(255,255,255,.1); font-size: 12px; }
.calendar-day.today header strong { color: #063161; background: #8fe5ff; box-shadow: 0 6px 18px rgba(71,205,255,.28); }
.calendar-day-lessons { display: grid; gap: 8px; }
.calendar-lesson { position: relative; overflow: hidden; display: grid; gap: 3px; padding: 11px 28px 11px 10px; border-radius: 13px; color: #152546; background: white; box-shadow: 0 8px 22px rgba(0,13,45,.18); animation: calendarLessonIn .45s both; animation-delay: calc(180ms + var(--lesson-index) * 80ms); }
.calendar-lesson::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #7159ef; }
.calendar-lesson.regular::before { background: #22b99a; }
.calendar-lesson time { color: #5b66d7; font-size: 9px; font-weight: 900; }
.calendar-lesson strong { font-size: 10px; }
.calendar-lesson span { overflow: hidden; color: #718096; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.calendar-lesson i { position: absolute; right: 10px; top: 10px; color: #7159ef; font-style: normal; }
.calendar-lesson.regular i { color: #18a98b; }
.calendar-free { min-height: 90px; display: grid; place-content: center; justify-items: center; color: rgba(210,228,251,.48); }
.calendar-free span { font-size: 27px; line-height: 1; }
.calendar-free small { margin-top: 5px; font-size: 8px; }
.calendar-legend { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-top: 16px; color: #bcd2ef; font-size: 8px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; background: #8a6eff; box-shadow: 0 0 0 4px rgba(138,110,255,.13); }
.calendar-legend i.regular { background: #4ee2c0; box-shadow: 0 0 0 4px rgba(78,226,192,.12); }
.calendar-legend b { margin-left: auto; color: white; }
.calendar-spark { position: absolute; z-index: 1; color: rgba(150,213,255,.35); font-size: 22px; animation: calendarSpark 4s ease-in-out infinite; }
.spark-one { right: 34%; top: 18px; }
.spark-two { left: 38%; bottom: 18px; animation-delay: -1.8s; }
.lesson-details-card { animation: calendarDayIn .5s .15s both; }
.pilot-locked-card { position: relative; min-height: 420px; overflow: hidden; display: grid; place-content: center; justify-items: center; padding: 52px 28px; border-radius: 30px; color: white; text-align: center; background: radial-gradient(circle at 50% 20%,rgba(99,203,255,.3),transparent 27%),linear-gradient(145deg,#061939,#104f9f 58%,#5f51dc); box-shadow: 0 28px 70px rgba(9,40,96,.24); }
.pilot-locked-card > *:not(.pilot-orbit) { position: relative; z-index: 2; }
.pilot-locked-card small { color: #acd3ff; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.pilot-locked-card h2 { margin: 19px 0 12px; font-size: clamp(28px,5vw,52px); letter-spacing: -.05em; }
.pilot-locked-card p { max-width: 560px; margin: 0 0 24px; color: #c7dcf6; font-size: 11px; line-height: 1.75; }
.pilot-star { width: 70px; height: 70px; display: grid; place-items: center; margin-bottom: 22px; border: 1px solid rgba(255,255,255,.23); border-radius: 23px; color: #8fe5ff; background: rgba(255,255,255,.1); box-shadow: 0 18px 45px rgba(0,17,55,.22); font-size: 30px; animation: pilotStar 3.2s ease-in-out infinite; }
.pilot-orbit { position: absolute; left: 50%; top: 50%; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; transform: translate(-50%,-50%); animation: pilotOrbit 16s linear infinite; }
.pilot-orbit::after { content: ""; position: absolute; width: 12px; height: 12px; left: 50%; top: -6px; border-radius: 50%; background: #8fe5ff; box-shadow: 0 0 22px #79dfff; }
.pilot-orbit.orbit-two { width: 620px; height: 260px; animation-direction: reverse; animation-duration: 20s; }
.catalog-action.pilot-used { display: flex; align-items: center; justify-content: space-between; }
.catalog-action.pilot-used p { min-height: 0; margin: 0; font-size: 8px; }
.pilot-booking-form { align-items: end; }
.calendar-aware-form { background: linear-gradient(180deg,#fff,#fbfdff); }
.availability-form .workspace-form-row { align-items: end; }
.calendar-pick-button { min-height: 42px; width: 100%; border: 1px solid rgba(69,90,150,.17); border-radius: 13px; color: #143160; background: linear-gradient(135deg,#fff,#edf5ff); box-shadow: 0 10px 24px rgba(12,43,98,.08); font-size: 10px; font-weight: 900; cursor: pointer; transition: transform .22s ease,box-shadow .22s ease,border-color .22s ease; }
.calendar-pick-button:hover { transform: translateY(-2px); border-color: rgba(83,111,238,.34); box-shadow: 0 16px 32px rgba(12,43,98,.13); }
.picked-time { display: block; margin-top: 6px; color: #62708a; font-size: 8px; font-weight: 800; }
.connection-hint { max-width: 220px; color: #6a7489; font-size: 8px; line-height: 1.45; }
.achievement-row { position: relative; }
.achievement-row small { display: block; margin-top: 4px; color: #6b7890; font-size: 8px; line-height: 1.45; }
.calendar-picker-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 22px; background: rgba(7,18,42,.28); backdrop-filter: blur(18px) saturate(1.35); animation: pickerFade .18s ease both; }
.calendar-picker-backdrop { position: absolute; inset: 0; }
.calendar-picker-sheet { position: relative; width: min(900px,96vw); max-height: min(760px,90vh); overflow: auto; padding: clamp(22px,4vw,34px); border: 1px solid rgba(255,255,255,.72); border-radius: 32px; color: #15233c; background: linear-gradient(145deg,rgba(255,255,255,.94),rgba(240,246,255,.88)); box-shadow: 0 34px 90px rgba(7,23,58,.3); animation: pickerSheet .26s cubic-bezier(.2,.8,.2,1) both; }
.calendar-picker-sheet::before { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle,rgba(78,125,255,.22),transparent 68%); pointer-events: none; }
.calendar-picker-close { position: absolute; right: 18px; top: 16px; width: 38px; height: 38px; border: 0; border-radius: 14px; color: #223452; background: rgba(255,255,255,.72); box-shadow: 0 8px 22px rgba(12,43,98,.12); font-size: 24px; line-height: 1; cursor: pointer; }
.calendar-picker-sheet small { color: #356dff; font-size: 8px; font-weight: 950; letter-spacing: .18em; }
.calendar-picker-sheet h2 { margin: 10px 48px 8px 0; font-size: clamp(24px,4vw,42px); letter-spacing: -.055em; }
.calendar-picker-sheet p { max-width: 620px; margin: 0 0 22px; color: #60708a; font-size: 10px; line-height: 1.65; }
.timetable-sheet { width: min(1180px,97vw); }
.time-table-wrap { position: relative; z-index: 1; overflow: auto; max-height: min(560px,62vh); padding: 8px; border: 1px solid rgba(198,211,232,.72); border-radius: 24px; background: rgba(255,255,255,.62); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.time-table { min-width: calc(82px + var(--day-count,7) * 118px); display: grid; gap: 7px; }
.time-table-head,.time-table-row { display: grid; grid-template-columns: 82px repeat(var(--day-count,7), minmax(104px,1fr)); gap: 7px; align-items: stretch; }
.time-table-head { position: sticky; top: 0; z-index: 3; padding-bottom: 3px; background: linear-gradient(180deg,rgba(249,252,255,.98),rgba(249,252,255,.88)); backdrop-filter: blur(12px); }
.time-table-head span,.time-table-head strong,.time-table-row time { display: grid; place-items: center; min-height: 40px; border-radius: 15px; color: #183056; background: linear-gradient(135deg,#eef5ff,#fff); font-size: 9px; font-weight: 950; letter-spacing: .03em; box-shadow: inset 0 0 0 1px rgba(111,132,174,.12); }
.time-table-row time { position: sticky; left: 0; z-index: 2; color: #3b67ff; background: rgba(255,255,255,.95); }
.time-cell { min-height: 40px; border: 0; border-radius: 15px; color: #8693a8; background: #f1f5fb; box-shadow: inset 0 0 0 1px rgba(111,132,174,.1); font-size: 8px; font-weight: 900; cursor: not-allowed; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.time-cell.available,.time-cell.selectable { cursor: pointer; color: #12336b; background: linear-gradient(135deg,#fff,#edf5ff); }
.time-cell.available:hover,.time-cell.selectable:hover,.time-cell.selected { transform: translateY(-2px); color: white; background: linear-gradient(135deg,#176cff,#6d5cff); box-shadow: 0 16px 30px rgba(54,103,238,.22); }
.time-cell.selected { box-shadow: 0 16px 34px rgba(54,103,238,.28), inset 0 0 0 1px rgba(255,255,255,.35); }
.time-cell.published { color: #167055; background: #e8f9f2; }
.availability-picker-footer { position: sticky; bottom: -1px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid rgba(198,211,232,.72); border-radius: 20px; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); box-shadow: 0 18px 45px rgba(12,43,98,.12); }
.availability-picker-footer span { color: #53647f; font-size: 9px; font-weight: 850; line-height: 1.5; }
.calendar-picker-grid { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.picker-day { padding: 14px; border: 1px solid rgba(208,218,234,.8); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 14px 34px rgba(16,45,92,.07); animation: calendarDayIn .38s both; animation-delay: calc(var(--day-index) * 35ms); }
.picker-day strong { display: block; margin-bottom: 10px; color: #16243b; font-size: 11px; }
.picker-day div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.picker-day button { min-height: 38px; border: 0; border-radius: 13px; color: #143160; background: linear-gradient(135deg,#f4f8ff,#fff); box-shadow: inset 0 0 0 1px rgba(108,126,170,.13); font-size: 10px; font-weight: 900; cursor: pointer; transition: transform .2s ease,background .2s ease,box-shadow .2s ease; }
.picker-day button:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); color: white; background: linear-gradient(135deg,#176cff,#6d5cff); box-shadow: 0 14px 26px rgba(54,103,238,.22); }
.picker-day button:disabled { opacity: .35; cursor: not-allowed; }
@keyframes progressShine { 0%,55% { transform: translateX(-120%); } 85%,100% { transform: translateX(120%); } }
@keyframes searchHit { 0%,100% { box-shadow: inherit; } 35% { border-color: #6e7be9; box-shadow: 0 0 0 5px rgba(83,97,239,.13),0 18px 45px rgba(8,27,64,.1); } }
@keyframes calendarDayIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes calendarLessonIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes calendarSpark { 0%,100% { transform: translateY(0) rotate(0); opacity: .25; } 50% { transform: translateY(-10px) rotate(16deg); opacity: .65; } }
@keyframes pilotStar { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(9deg); } }
@keyframes pilotOrbit { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes pickerFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pickerSheet { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .topbar { background: rgba(255,255,255,.93); }
  .metric-card:hover, .teacher-banner:hover, .lesson-card:hover { transform: none; }
  .portal-drawer { grid-template-columns: 1fr; }
  .drawer-backdrop { position: absolute; inset: 0; }
  .drawer-sheet { width: min(92vw,610px); position: relative; z-index: 1; margin-left: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-card.wide { grid-column: auto; }
  .booking-card { grid-template-columns: 1fr; }
  .history-card { grid-template-columns: 1fr; }
  .history-date { padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid #e3e9f2; }
  .booking-date { padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid #e0e7f1; }
  .teacher-catalog-grid { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .balance-hero { grid-template-columns: 1fr 1fr; }
  .balance-hero p { grid-column: 1 / -1; }
  .admin-request { grid-template-columns: 1fr; }
  .admin-user-card { grid-template-columns: 1fr; }
  .admin-user-form { grid-template-columns: 1fr; }
  .calendar-stage { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .drawer-sheet { width: 100%; }
  .drawer-head { min-height: 76px; padding: 14px 16px; }
  .drawer-content { padding: 16px; }
  .drawer-form-row { grid-template-columns: 1fr; }
  .workspace-hero { min-height: 150px; padding: 23px 20px; }
  .workspace-card,.referral-panel { padding: 18px; }
  .workspace-form-row,.workspace-stat-grid { grid-template-columns: 1fr; }
  .workspace-row { align-items: flex-start; flex-direction: column; }
  .workspace-actions { width: 100%; justify-content: flex-start; }
  .referral-code strong { font-size: 16px; }
  .rating-form,.inline-booking-form,.catalog-action,.catalog-search { grid-template-columns: 1fr; }
  .teacher-catalog-card { grid-template-columns: 1fr; }
  .catalog-action { grid-column: auto; }
  .package-grid,.balance-hero { grid-template-columns: 1fr; }
  .balance-hero p { grid-column: auto; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .admin-assign-form { grid-template-columns: 1fr; }
  .admin-assign-form .workspace-button { grid-column: auto; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-controls { width: 100%; justify-content: space-between; }
  .calendar-controls button { flex: 1; }
  .pilot-locked-card { min-height: 390px; }
  .catalog-action.pilot-used { align-items: flex-start; flex-direction: column; }
  .calendar-picker-grid { grid-template-columns: 1fr; }
  .picker-day div { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-story::after, .progress-mini span::after, .xp-progress span::after, .academy-status-bar span::after,.calendar-day,.calendar-lesson,.calendar-spark,.pilot-star,.pilot-orbit,.lesson-details-card,.calendar-picker-modal,.calendar-picker-sheet,.picker-day { animation: none; }
  .app-content > * { opacity: 1; transform: none; }
}
