/* Studby iOS-inspired system. Opaque content, translucent navigation only. */
:root, :root[data-theme="light"] {
 color-scheme:light; --ios-bg:#f2f2f7; --ios-panel:#fff; --ios-fill:#eeeef0;
 --ios-text:#1c1c1e; --ios-secondary:#6c6c70; --ios-line:#d9d9de;
 --ios-blue:#007aff; --ios-tint:#e5f0ff; --ios-glass:rgb(255 255 255 / 82%);
 --gl-color-text:var(--ios-text); --gl-color-text-heading:var(--ios-text); --gl-color-text-muted:var(--ios-secondary);
 --gl-color-primary:var(--ios-blue); --gl-surface-2:var(--ios-fill); --gl-surface-4:var(--ios-fill);
 --gl-border-subtle:var(--ios-line); --gl-inset-subtle:none;
 --gl-font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
:root[data-theme="dark"] {
 color-scheme:dark; --ios-bg:#000; --ios-panel:#1c1c1e; --ios-fill:#2c2c2e;
 --ios-text:#f5f5f7; --ios-secondary:#a0a0a6; --ios-line:#38383a;
 --ios-blue:#409cff; --ios-tint:#142e49; --ios-glass:rgb(35 35 37 / 85%);
}
html, body.glass-bg {background:var(--ios-bg);color:var(--ios-text)}
body {font-family:var(--gl-font-family);font-size:16px;-webkit-font-smoothing:antialiased}
.app-shell {padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));max-width:600px}
.app-header {background:none;border:0;box-shadow:none;backdrop-filter:none;margin-bottom:24px;padding:0}
.brand-wordmark {font-family:var(--gl-font-family);font-size:25px;letter-spacing:-1px;font-weight:750}
.brand-wordmark .app-icon {width:16px;height:19px;color:var(--ios-blue)}
.glass-title, h1,h2,h3 {color:var(--ios-text);text-shadow:none;letter-spacing:-.5px}
.glass-card,#profile .glass-card,.home-orders,.install-card,.news-card,.tt-lesson.glass-card {
 background:var(--ios-panel);color:var(--ios-text);border:0;border-radius:22px;box-shadow:none;backdrop-filter:none;
}
.glass-card {padding:20px}
.glass-card--glow::before {display:none}
.glass-btn,#auth [type="submit"],.install-card .glass-btn {
 min-height:44px;padding:10px 16px;border:0;border-radius:12px;font-size:16px;font-weight:600;
 box-shadow:none;text-shadow:none;transform:none;line-height:1.35;
}
.glass-btn:hover,.glass-btn:active {transform:none;box-shadow:none}
.glass-btn--primary,.glass-btn--primary:hover {background:var(--ios-blue);color:#fff}
.glass-btn--tertiary,.glass-btn--tertiary:hover {background:var(--ios-fill);color:var(--ios-blue)}
.glass-btn:active {opacity:.72}
.glass-btn:disabled {opacity:.45}
.glass-btn.app-icon-button {width:44px;height:44px;background:var(--ios-fill);border:0;box-shadow:none;color:var(--ios-blue)}
.app-icon,.glass-btn .app-icon {stroke-width:1.8}
.glass-input,#auth .glass-input,.glass-select,#profile .glass-select {
 background:var(--ios-fill);color:var(--ios-text);border:1px solid transparent;border-radius:12px;
 min-height:48px;padding:12px 14px;font-size:16px;box-shadow:none;
}
.glass-input:focus,.glass-select:focus {background:var(--ios-fill);border-color:var(--ios-blue);box-shadow:none;outline:none}
.glass-input::placeholder {color:var(--ios-secondary);opacity:.7}
.glass-label {color:var(--ios-secondary);font-size:13px;font-weight:400}
.gl-text-muted,.quiet-action,#auth #auth-status {color:var(--ios-secondary)}
.quiet-action:hover {background:var(--ios-fill);color:var(--ios-blue)}
#auth .auth-navigation {border-color:var(--ios-line)}
#auth .auth-navigation>.glass-btn[aria-pressed="true"] {color:var(--ios-text)}
#auth .auth-navigation>.glass-btn[aria-pressed="true"]::after {background:var(--ios-blue)}
#profile {gap:24px}
#profile > h1,.orders-heading h1,#news>.orders-heading h1 {font-size:30px;letter-spacing:-.8px}
#profile-form {padding:20px;gap:12px}
#profile-form .app-avatar {width:64px;height:64px;font-size:25px;background:var(--ios-fill);border:0;box-shadow:none;color:var(--ios-blue)}
.profile-summary h2 {font-size:22px;font-weight:600}
.profile-summary p,.profile-email {font-size:14px;line-height:1.4;margin-top:0}
.profile-email {padding-bottom:4px}
.profile-edit,.profile-password {top:14px}
#profile-editor {padding-top:16px;border-top:1px solid var(--ios-line)}
#profile-editor .glass-input-group {gap:6px}
.install-card {gap:10px;padding:18px 20px}
.install-card-heading h2 {font-size:17px;font-weight:600}
.install-card p {color:var(--ios-secondary);font-size:13px}
.install-icon {width:26px;height:30px;color:var(--ios-blue)}
.install-card #install-app {background:none;border-top:1px solid var(--ios-line);border-radius:0;text-align:left;justify-content:space-between;padding:12px 0 0;color:var(--ios-blue);font-size:15px}
.install-card #install-app::after {content:'›';font-size:24px;font-weight:400;color:var(--ios-secondary)}
.home-greeting {padding:4px 2px 8px}
.home-greeting h1 {font-size:34px;letter-spacing:-1px}
.home-orders,.tt-home {padding:20px!important}
.home-orders-heading h2,.tt-home-heading h2 {font-size:17px}
#active-orders-count,.order-status-pill {background:var(--ios-tint);color:var(--ios-blue)}
#home-orders-status,.home-order>p,.home-order-number {color:var(--ios-secondary)}
.home-order {border-color:var(--ios-line);margin-top:14px;padding-top:14px}
.order-caption {color:var(--ios-secondary);font-size:13px}
.order-money {gap:0}
.order-money>div {padding:10px 0;border-bottom:1px solid var(--ios-line);font-size:15px}
.order-money>div:last-child {border:0}
#orders h2 {font-size:21px}
#orders details summary {font-size:15px}
.order-file {gap:16px;border-top:1px solid var(--ios-line);padding-top:16px}
.order-file>strong {font-size:15px;font-weight:500}
.order-file>.glass-btn {align-self:stretch}
.news-card-content {padding:18px;gap:10px}
.news-card h2 {font-size:21px}
.news-card p,.news-meta,.news-reader .news-lead,.news-source,.news-reader figcaption {color:var(--ios-secondary)}
.news-read.glass-btn {background:none;border:0;border-top:1px solid var(--ios-line);border-radius:0;color:var(--ios-blue);padding:12px 0 0;font-size:15px}
.news-reader,.news-reader::backdrop,.news-reader-toolbar,.password-dialog,.file-dialog,.install-dialog {background:var(--ios-bg);color:var(--ios-text);border-color:var(--ios-line)}
.news-reader-toolbar {background:var(--ios-glass);backdrop-filter:blur(20px)}
.news-reader-toolbar .app-back-button {background:var(--ios-fill);border:0;color:var(--ios-blue);min-width:0}
.password-dialog-header h2 {font-size:21px}
.tt-dates {background:var(--ios-panel);border:0}
.tt-date {color:var(--ios-secondary)}
.tt-date strong {color:var(--ios-text)}
.tt-date.is-selected {background:var(--ios-blue);color:#fff}
.tt-date.is-selected strong {color:#fff}
.tt-date.is-today:not(.is-selected) strong {color:var(--ios-blue)}
.tt-week-center:focus-within,.tt-no-lessons {background:var(--ios-panel)}
.tt-week-center strong {border-color:var(--ios-line)}
.tt-lesson.glass-card {border-radius:18px;border-left:3px solid var(--ios-blue)}
.tt-room {color:var(--ios-blue)}
.tt-lesson-time span,.tt-teacher,.tt-lesson-kind,.tt-footer,.tt-status,.tt-topline h1 span,.tt-home-heading span {color:var(--ios-secondary)}
/* PWA: one floating navigation surface, small labels and a quiet active capsule. */
/* iOS 26 style Liquid Glass, CSS only (Safari has no backdrop displacement):
   a thin tint so content stays readable through it, strong saturation, a lit
   top rim and a faint lower rim, and a soft floating shadow. */
:root, :root[data-theme="light"] {
 --lg-fill:linear-gradient(180deg,rgb(255 255 255 / 62%),rgb(255 255 255 / 40%));
 --lg-rim:rgb(255 255 255 / 75%); --lg-edge:rgb(0 0 0 / 7%);
 --lg-shadow:0 12px 32px rgb(0 0 0 / 12%),0 2px 6px rgb(0 0 0 / 6%);
 --lg-highlight:inset 0 1px 1px rgb(255 255 255 / 95%),inset 0 -1px 1px rgb(255 255 255 / 45%);
 --lg-pill:rgb(118 118 128 / 16%);
}
:root[data-theme="dark"] {
 --lg-fill:linear-gradient(180deg,rgb(58 58 62 / 58%),rgb(28 28 30 / 46%));
 --lg-rim:rgb(255 255 255 / 16%); --lg-edge:rgb(0 0 0 / 40%);
 --lg-shadow:0 12px 32px rgb(0 0 0 / 45%),0 2px 6px rgb(0 0 0 / 30%);
 --lg-highlight:inset 0 1px 1px rgb(255 255 255 / 22%),inset 0 -1px 1px rgb(255 255 255 / 6%);
 --lg-pill:rgb(255 255 255 / 13%);
}
#cabinet-tabs .glass-tab-bar {background:var(--lg-fill);border:1px solid var(--lg-rim);box-shadow:var(--lg-shadow),var(--lg-highlight),0 0 0 .5px var(--lg-edge);-webkit-backdrop-filter:blur(14px) saturate(190%) brightness(1.04);backdrop-filter:blur(14px) saturate(190%) brightness(1.04);padding:4px;border-radius:36px}
#cabinet-tabs .glass-tab-bar__item {min-height:50px;padding:5px 3px;gap:3px;color:var(--ios-secondary)}
#cabinet-tabs .glass-tab-bar__label {font-size:10px;line-height:13px;font-weight:500;color:inherit}
#cabinet-tabs .glass-tab-bar__icon .app-icon {width:23px;height:23px;stroke:currentColor;stroke-width:1.8;filter:none}
#cabinet-tabs .glass-tab-bar__item.is-active {color:var(--ios-blue)}
#cabinet-tabs .glass-tab-bar__item.is-active::before {background:var(--lg-pill);border-radius:28px;box-shadow:inset 0 1px 0 rgb(255 255 255 / 25%)}
#cabinet-tabs .glass-tab-bar__icon::after {display:none}
@media(min-width:900px) and (min-height:600px){
 body.has-cabinet .app-shell,body.has-cabinet.showing-timetable .app-shell {max-width:1440px;padding:max(32px,env(safe-area-inset-top,0px)) max(40px,env(safe-area-inset-right,0px)) max(40px,env(safe-area-inset-bottom,0px)) calc(236px + max(24px,env(safe-area-inset-left,0px)))}
 body.has-cabinet .app-header {margin-bottom:32px}
 body.has-cabinet main {max-width:1100px;margin:auto}
 #profile,#home {max-width:620px;margin-inline:auto}
 #cabinet-tabs {position:fixed;top:max(110px,env(safe-area-inset-top,0px));bottom:auto;left:max(24px,env(safe-area-inset-left,0px));width:204px;max-width:204px;transform:none}
 #cabinet-tabs .glass-tab-bar {display:flex;flex-direction:column;align-items:stretch;padding:6px;border-radius:20px;background:var(--ios-panel);box-shadow:none;border:0;gap:4px}
 #cabinet-tabs .glass-tab-bar__item {flex:none;flex-direction:row;justify-content:flex-start;gap:12px;padding:12px 16px;min-height:48px}
 #cabinet-tabs .glass-tab-bar__label {font-size:15px;line-height:20px}
 #cabinet-tabs .glass-tab-bar__item.is-active::before {border-radius:12px;background:var(--ios-tint)}
 .news-feed {grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 #orders > .gl-stack {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
}

@media(prefers-reduced-transparency:reduce){#cabinet-tabs .glass-tab-bar,.news-reader-toolbar{background:var(--ios-panel);backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.glass-btn{transition:none}}

#orders article.glass-card {gap:16px}
.glass-select option {background:var(--ios-panel);color:var(--ios-text)}

/* Saved profile follows the reference: avatar, details, trailing chevron. */
#profile > h1 {font-size:14px;font-weight:400;letter-spacing:0;color:var(--ios-secondary);padding-left:16px;margin-bottom:-16px}
#profile-form {display:grid;grid-template-columns:68px minmax(0,1fr) 16px;column-gap:16px;row-gap:3px;padding:24px 20px;border-radius:26px;align-items:center;position:relative}
#profile-form .app-avatar {grid-column:1;grid-row:1 / span 2;width:68px;height:68px;margin:0;background:#fff;color:#007aff;font-size:27px}
#profile-summary {grid-column:2;grid-row:1;text-align:left;gap:5px;min-width:0}
#profile-summary h2 {font-size:20px;font-weight:500;line-height:1.25;overflow-wrap:anywhere}
#profile-summary p {font-size:14px;line-height:1.35}
#profile-form .profile-email {grid-column:2;grid-row:2;text-align:left;font-size:12px;line-height:1.4;padding:0;color:var(--ios-secondary);min-width:0}
#profile-form .profile-edit {position:absolute;inset:0;width:100%;height:100%;border-radius:26px;background:transparent;display:flex;justify-content:flex-end;padding:0 14px;color:var(--ios-secondary);z-index:1}
#profile-form .profile-edit:hover {background:color-mix(in srgb,var(--ios-text) 3%,transparent)}
#profile-form .profile-edit .app-icon {width:18px;height:18px}
#profile-editor,#profile-form #save-status {grid-column:1 / -1;grid-row:auto}
#profile-form:has(#profile-editor:not([hidden])) .app-avatar {grid-row:1}
#profile-form:has(#profile-editor:not([hidden])) .profile-email {grid-row:1}
#profile-form:has(#profile-editor:not([hidden])) #profile-editor {margin-top:16px}
#profile > .profile-password-row {position:static;display:flex;align-items:center;width:100%;height:auto;min-height:58px;padding:14px 20px;border-radius:18px;background:var(--ios-panel);gap:14px;box-shadow:none}
.profile-password-row span {flex:1;text-align:left;color:var(--ios-text);font-size:16px;font-weight:400}
.profile-password-row .row-chevron {width:18px;height:18px;color:var(--ios-secondary)}
@media(max-width:360px){#profile-form{grid-template-columns:56px minmax(0,1fr) 12px;column-gap:12px;padding:20px 16px}#profile-form .app-avatar{width:56px;height:56px}#profile-summary h2{font-size:18px}}
/* Framework7 media list: the user's horizontal profile reference. */
:root {--f7-theme-color:var(--ios-blue);--f7-list-bg-color:var(--ios-panel);--f7-list-strong-bg-color:var(--ios-panel);--f7-list-item-title-text-color:var(--ios-text);--f7-list-item-footer-text-color:var(--ios-secondary);--f7-list-inset-border-radius:26px;--f7-text-color:var(--ios-text)}
#profile-form.list {display:block;padding:0;margin:0;width:100%;overflow:hidden}
#profile-form.list ul {margin:0;padding:0;background:var(--ios-panel);border-radius:26px;list-style:none}
#profile-form.list .item-content {padding:24px 38px 24px 20px;min-height:124px;gap:16px}
#profile-form.list .item-media {padding:0;min-width:0}
#profile-form.list .item-inner {padding:0;margin:0;min-width:0;display:block;align-self:center}
#profile-form.list .item-title-row {display:block}
#profile-form.list .profile-email {margin-top:5px}
#profile-form.list #profile-editor {padding:20px;margin:0;border-top:1px solid var(--ios-line)}
#profile-form.list #save-status:not([hidden]) {padding:0 20px 16px;margin:0}
#profile-form .profile-edit {border:0}
#profile-form .app-avatar {background:#fff}
#profile-form .profile-edit:focus-visible {outline:2px solid var(--ios-blue);outline-offset:-3px}
.app-icon.f7-icon,.glass-btn .app-icon.f7-icon,#cabinet-tabs .glass-tab-bar__icon .app-icon.f7-icon {fill:currentColor;stroke:none;stroke-width:0}
.button {height:auto;min-height:44px;letter-spacing:0;text-transform:none}
.profile-password-row .app-icon:not([data-icon]) {fill:none;stroke:currentColor}
#profile > .profile-password-row {margin-top:0}
@media(max-width:360px){#profile-form.list .item-content{padding:20px 32px 20px 16px;gap:12px}}

.header-actions {display:flex;align-items:center;gap:8px;margin-left:auto}
#toggle-appearance .theme-sun {display:none}
[data-theme="dark"] #toggle-appearance .theme-moon {display:none}
[data-theme="dark"] #toggle-appearance .theme-sun {display:block}

#profile > .profile-logout {display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;margin-top:8px;padding:14px 20px;border:0;border-radius:18px;background:var(--ios-panel);color:#d93036;font:inherit;font-size:16px;font-weight:400;cursor:pointer}
[data-theme="dark"] #profile > .profile-logout {color:#ff6961}
#profile > .profile-logout:active {opacity:.65}
#profile > .profile-logout:focus-visible {outline:2px solid var(--ios-blue);outline-offset:3px}

/* A readable day view for split windows/tablets; the entire week only where it fits. */
@media(max-width:1499px),(max-height:699px){
 #timetable {max-width:760px;margin-inline:auto}
 .tt-days {display:block}
 .tt-day {display:none}
 .tt-day.is-selected {display:block}
 .tt-day>h2 {display:none}
 .tt-dates-viewport {display:block}
 .tt-dates {display:grid}
 .tt-lesson.glass-card {flex-direction:row;gap:16px;padding:18px}
 .tt-lesson-time {flex-direction:column;align-items:flex-start;min-width:48px}
 .tt-lesson h3 {font-size:16px}
 .tt-room {font-size:14px}.tt-teacher {font-size:13px}
}
@media(min-width:1500px) and (min-height:700px){.tt-days{grid-template-columns:repeat(7,minmax(0,1fr));align-items:start}}
@media(max-height:550px){
 body.has-cabinet .app-shell {padding-top:max(8px,env(safe-area-inset-top))}
 body.has-cabinet .app-header {margin-bottom:12px}
 .tt-topline {margin-bottom:8px}.tt-week-controls{margin-bottom:8px}
 .tt-dates-viewport {margin-bottom:12px}.tt-date{min-height:48px;gap:3px;padding:5px 0}
}

/* Order requests: «Сделать заказ» button, request cards and the request form sheet. */
.orders-heading .order-new {flex:none}
.order-request-card {display:flex;flex-direction:column;gap:14px;padding:20px}
.request-head {display:flex;align-items:center;justify-content:space-between;gap:12px}
.request-type {font-size:13px;font-weight:600;letter-spacing:.2px;color:var(--ios-secondary);text-transform:uppercase}
.request-status {flex:none;padding:5px 11px;border-radius:999px;font-size:13px;font-weight:600}
.request-title {margin:0;font-size:21px;line-height:1.25;font-weight:700;letter-spacing:-.4px;overflow-wrap:anywhere}
.request-facts {display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px;margin:0}
.request-facts>div {min-width:0;padding:10px 12px;border-radius:14px}
.request-facts dt {font-size:12px;color:var(--ios-secondary)}
.request-facts dd {margin:2px 0 0;font-size:15px;font-weight:600;overflow-wrap:anywhere}
.request-steps {display:grid;grid-template-columns:repeat(3,1fr);margin:2px 0 0;padding:0;list-style:none;counter-reset:none}
.request-steps li {position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px;color:var(--ios-secondary);text-align:center}
.request-steps li::before {content:"";position:absolute;top:6px;left:calc(-50% + 10px);right:calc(50% + 10px);height:2px;border-radius:2px;background:var(--ios-line)}
.request-steps li:first-child::before {display:none}
.request-steps li.is-done::before,.request-steps li.is-current::before {background:var(--ios-blue)}
.request-step-dot {width:14px;height:14px;border-radius:50%;background:var(--ios-line);box-sizing:border-box}
.request-steps li.is-done .request-step-dot {background:var(--ios-blue)}
.request-steps li.is-current .request-step-dot {background:var(--ios-panel);border:3px solid var(--ios-blue);box-shadow:0 0 0 4px rgb(0 122 255 / 15%)}
.request-steps li.is-done,.request-steps li.is-current {color:var(--ios-text);font-weight:600}
.request-note {margin:0;font-size:14px;line-height:1.45;color:var(--ios-secondary)}
.request-note.is-rejected {padding:12px 14px;border-radius:14px;color:var(--ios-text);background:color-mix(in srgb,#d93036 9%,transparent)}
.request-foot {display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--ios-line);font-size:12px;color:var(--ios-secondary)}
.request-foot .quiet-action {min-height:32px;padding:4px 0;font-size:14px;color:#d93036}
:root[data-theme="dark"] .request-foot .quiet-action {color:#ff6961}
.order-request-card[data-state="rejected"] .request-title {color:var(--ios-secondary)}
@media(prefers-reduced-motion:no-preference){.request-steps li.is-current .request-step-dot {animation:request-pulse 2.4s ease-in-out infinite}}
@keyframes request-pulse {50%{box-shadow:0 0 0 7px rgb(0 122 255 / 6%)}}
.order-empty p {margin:0}
.order-request-dialog textarea.glass-input {min-height:104px;padding-top:12px;resize:vertical;line-height:1.45;font:inherit;font-size:16px}
.order-request-dialog .glass-select {font-size:16px;min-height:48px}
.order-request-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.order-request-row input[type="date"] {min-width:0;width:100%;-webkit-appearance:none;appearance:none}
.order-request-files-pick {position:relative;overflow:hidden;align-self:flex-start;width:auto!important;cursor:pointer}
.order-request-files-pick input {position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}
.order-request-files {display:grid;gap:8px;margin:0;padding:0;list-style:none}
.order-request-files:empty {display:none}
.order-request-files li {display:flex;align-items:center;gap:10px;min-width:0;padding:8px 8px 8px 12px;border:1px solid var(--ios-line);border-radius:12px;background:var(--ios-panel)}
.order-request-files span {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.order-request-files small {flex:none;color:var(--ios-secondary);font-size:12px}
.order-request-files button {flex:none;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:var(--ios-fill);color:var(--ios-secondary);cursor:pointer}
.order-request-files button .app-icon {width:14px;height:14px}
.order-request-status {margin:0}
.order-request-status[data-tone="error"] {color:#d93025}
:root[data-theme="dark"] .order-request-status[data-tone="error"] {color:#ff8a80}
@media(max-width:380px){.order-request-row{grid-template-columns:minmax(0,1fr)}}
.request-foot>span {flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.request-foot .quiet-action {flex:none;width:auto}
/* Request sheet on phones: fixed to the screen, the keyboard never resizes it (see order-request.js). */
@media(max-width:767px){
 /* Every sheet on phones: fixed to the screen, the keyboard never resizes it (keyboard.js). */
 .password-dialog {top:0;height:100%}
}
