/* Кабинет ученика: вход, заявка, пароль, кабинет и разделы старосты. */
body.cab-page {
  min-height: 100svh;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(255,255,255,.05), transparent 60%),
    var(--bg);
}
.cab-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cab-bg .deco { position: absolute; filter: drop-shadow(0 18px 30px rgba(0,0,0,.7)); }
.cab-bg .d-s1 { width: 44px; top: 18%; left: 8%; animation: cab-float 8s ease-in-out infinite; }
.cab-bg .d-s2 { width: 26px; top: 64%; right: 10%; animation: cab-float 6s -2s ease-in-out infinite; }
.cab-bg .d-o1 { width: 110px; bottom: 6%; left: -30px; opacity: .7; animation: cab-float 11s ease-in-out infinite; }
.cab-bg .d-r1 { width: 380px; top: 6%; right: -140px; opacity: .3; }
@keyframes cab-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(30deg); } }

.cab-top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); }
.cab-top__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px var(--display); }
.cab-top__logo .logo { width: 62px; }
.cab-top__home { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.cab-top__home:hover { color: var(--text); }

.cab { position: relative; z-index: 2; padding: 10px var(--gutter) 80px; display: grid; }
.view { grid-area: 1 / 1; opacity: 0; translate: 0 18px; filter: blur(8px); transition: opacity .5s ease, translate .6s var(--ease), filter .5s ease; }
.view.is-in { opacity: 1; translate: 0 0; filter: none; }
.view.is-leaving { opacity: 0; translate: 0 -12px; filter: blur(8px); transition-duration: .28s; }
.muted { color: var(--muted); font-weight: 500; }

/* ---------- формы входа ---------- */
.auth { max-width: 440px; margin: 0 auto; text-align: center; }
.auth__logo { width: 200px; margin: 0 auto -6px; filter: drop-shadow(0 30px 40px rgba(0,0,0,.8)); }
.auth__title { font: 700 clamp(40px, 8vw, 56px)/1 var(--display); letter-spacing: -.04em; margin: 0 0 26px; }
.auth__lead { color: var(--muted); margin: -10px 0 26px; }
.auth__lead b { color: var(--text); }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 22px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; background: none; border: 0; padding: 12px; font: 700 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: color .35s; }
.seg button[aria-selected="true"] { color: #0a0a0b; }
.seg__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--chrome-h); box-shadow: inset 0 1px 0 #fff; transition: translate .55s var(--ease); }
.seg[data-active="register"] .seg__thumb { translate: 100% 0; }

.auth__forms { display: grid; }
.form { display: none; gap: 14px; text-align: left; }
.auth__forms .form { display: grid; grid-area: 1 / 1; opacity: 0; translate: 16px 0; pointer-events: none; visibility: hidden; transition: opacity .4s, translate .5s var(--ease), visibility 0s .4s; }
.auth__forms .form.is-active { opacity: 1; translate: 0 0; pointer-events: auto; visibility: visible; transition-delay: .1s, .1s, 0s; }
.form.is-active { display: grid; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__err { margin: 0; min-height: 1.2em; color: var(--bad); font-size: 14px; font-weight: 600; }
.form__err:empty { min-height: 0; }
.form__hint { color: var(--muted); font-size: 13px; text-align: center; margin: 0; }
.form .link-btn { justify-self: center; font-size: 14px; }
.input.is-bad { border-color: rgba(255,138,122,.7); box-shadow: 0 0 0 4px rgba(255,138,122,.1); }
.is-shake { animation: shake .45s; }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
.btn--wide { width: 100%; padding: 18px; }
.btn.is-busy { color: transparent; }
.btn.is-busy::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0a0a0b; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.5; }
.back-btn { background: none; border: 0; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; margin: 10px 0 26px; }
.back-btn:hover { color: var(--text); }

/* ---------- статусы заявки ---------- */
.status { max-width: 520px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 14px; }
.status h1 { font: 700 clamp(32px, 6vw, 46px)/1.05 var(--display); letter-spacing: -.03em; margin: 6px 0 0; }
.status__text { color: var(--muted); margin: 0; max-width: 42ch; }
.status__login { color: var(--muted); margin: 0; font-size: 14px; }
.status__login b { color: var(--text); }
.status__card { width: 100%; margin: 14px 0 0; padding: 8px 22px; text-align: left; }
.status__card div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.status__card div:last-child { border-bottom: 0; }
.status__card dt { color: var(--muted); }
.status__card dd { margin: 0; font-weight: 700; text-align: right; word-break: break-all; }
.status__logo { width: 200px; }
.status__logo.is-dim { filter: grayscale(1) brightness(.6); }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232,213,138,.6); } 100% { box-shadow: 0 0 0 10px rgba(232,213,138,0); } }

/* орбита вокруг логотипа, пока заявка ждёт */
.orbit { position: relative; width: 260px; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.orbit__logo { width: 72%; filter: drop-shadow(0 26px 40px rgba(0,0,0,.8)); animation: breathe 4s ease-in-out infinite; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); }
.orbit__ring--1 { animation: ring-pulse 3s ease-out infinite; }
.orbit__ring--2 { animation: ring-pulse 3s 1.5s ease-out infinite; }
.orbit__dot { position: absolute; inset: 0; animation: spin 6s linear infinite; }
.orbit__dot::before { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 16px 4px rgba(255,255,255,.6); }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.04; } }
@keyframes ring-pulse { from { scale: .7; opacity: .9; } to { scale: 1.25; opacity: 0; } }

/* одобрено: искры разлетаются из логотипа */
.burst { position: relative; width: 220px; }
.burst .logo { filter: drop-shadow(0 26px 40px rgba(0,0,0,.8)); }
.burst__s { position: absolute; left: 50%; top: 50%; width: 22px; margin: -11px; opacity: 0; animation: burst 1.4s var(--d) var(--ease) forwards; }
@keyframes burst {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.2); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-170px) scale(1) rotate(180deg); }
}
.pass { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 22px; margin-top: 10px; border-radius: 20px; }
.pass__value { flex: 1; font: 700 clamp(20px, 5vw, 28px) ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .06em; text-align: left; overflow-wrap: anywhere; }
.btn.is-done { background: linear-gradient(100deg, #6fd39a, #c9f5da 45%, #7fdca6); }

/* код из 6 цифр */
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code__box { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font: 700 26px var(--display); color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, background .2s, transform .3s var(--ease); }
.code__box:focus { outline: none; border-color: rgba(255,255,255,.6); transform: translateY(-2px); }
.code__box.is-filled { background: rgba(255,255,255,.09); }

/* ---------- кабинет ---------- */
.cabx { max-width: 1080px; margin: 0 auto; width: 100%; }
.cabx__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 10px 0 28px; }
.cabx__hello { margin: 0; color: var(--muted); font-weight: 600; }
.cabx__head h1 { margin: 0; font: 700 clamp(48px, 9vw, 96px)/.95 var(--display); letter-spacing: -.045em; }
.cabx__who { display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.tabs button { position: relative; flex: none; background: none; border: 0; padding: 10px 18px; border-radius: 999px; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; transition: color .25s, background .35s; }
.tabs button:hover { color: var(--text); }
.tabs button.is-on { color: #0a0a0b; background: var(--chrome-h); box-shadow: inset 0 1px 0 #fff; }
.tabs__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #1a0703; font: 700 11px var(--sans); font-style: normal; animation: pop .4s var(--ease); }
@keyframes pop { from { scale: 0; } }
.cabx__body.is-in { animation: pane-in .5s var(--ease); }
@keyframes pane-in { from { opacity: 0; translate: 0 10px; } }

.grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.grid .ann { grid-column: 1 / -1; }
.block { padding: 24px; }
.block + .block { margin-top: 16px; }
.grid .block + .block { margin-top: 0; }
.block h2 { font: 700 14px var(--display); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; display: flex; gap: 8px; align-items: baseline; }
.block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.block__head h2 { margin: 0; }

.ann { position: relative; overflow: hidden; padding: 26px 28px; }
.ann::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%); translate: -110% 0; pointer-events: none; }
.ann.is-flash::after { animation: flash 1.2s var(--ease); }
.ann.is-flash { animation: ann-glow 1.6s ease; }
@keyframes flash { to { translate: 110% 0; } }
@keyframes ann-glow { 0% { border-color: rgba(255,255,255,.7); box-shadow: 0 0 40px rgba(255,255,255,.15); } }
.ann__label { margin: 0 0 8px; font: 700 11px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ann__text { margin: 0; font: 700 clamp(20px, 2.4vw, 28px)/1.3 var(--sans); white-space: pre-line; }
.ann__meta { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.ann__empty { margin: 0; color: var(--muted); }

.feed__item { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .35s var(--ease); }
.feed__item:last-child { border-bottom: 0; }
.feed__item:hover { padding-left: 8px; }
.feed__item time { color: var(--muted); font-size: 13px; }
.feed__item span { font-weight: 700; }
.feed__item i { font-style: normal; color: var(--muted); }

.mates { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 340px; overflow: auto; }
.mates li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mates__ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); border: 1px solid var(--line-2); font: 700 13px var(--display); }
.block--links { display: grid; gap: 10px; align-content: start; }
.biglink { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; font: 700 18px var(--display); transition: background .3s, border-color .3s; }
.biglink:hover { background: rgba(255,255,255,.05); border-color: var(--line-2); }
.biglink i { font-style: normal; color: var(--muted); }

.apps { list-style: none; padding: 0; margin: 0; }
.apps__item { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); animation: pane-in .5s var(--ease); }
.apps__item span { color: var(--muted); font-size: 14px; }
.apps__item time { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; margin: 0; }

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.plist__title { background: none; border: 0; padding: 0; color: var(--text); font: 700 17px var(--sans); cursor: pointer; text-align: left; }
.plist__title:hover { text-decoration: underline; }
.editor-wrap { padding: 34px 24px 10px; }
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }

@media (max-width: 760px) {
  .cab-bg .d-o1, .cab-bg .d-s2 { display: none; }
  .cab-bg .d-r1 { opacity: .18; }
  .grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .cabx__who { width: 100%; justify-content: space-between; }
  .feed__item { grid-template-columns: 70px 1fr auto; }
  .orbit { width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .view, .auth__forms .form { transition: none; }
  .orbit *, .burst__s, .cab-bg .deco { animation: none !important; }
  .burst__s { display: none; }
}
.tabs__count[hidden] { display: none; }
.cab .ebar { position: static; background: none; }
