:root {
    --app-bg: #0b1020;
    --app-panel: rgba(17, 26, 48, .92);
    --app-border: rgba(148, 163, 184, .16);
    --app-text: #f1f5ff;
    --app-muted: #94a3b8;
    --app-accent: #818cf8;
    --app-accent-strong: #6366f1;
    --app-cyan: #67e8f9;
    --app-danger-bg: rgba(248, 113, 113, .12);
    --app-danger-text: #fecaca;
}

body[data-theme="light"] {
    --app-bg: #eef2ff;
    --app-panel: rgba(255, 255, 255, .94);
    --app-border: rgba(71, 85, 105, .18);
    --app-text: #172033;
    --app-muted: #526078;
    --app-danger-bg: rgba(248, 113, 113, .1);
    --app-danger-text: #991b1b;
}

body[data-theme="ocean"] {
    --app-bg: #071923;
    --app-panel: rgba(13, 43, 58, .94);
    --app-border: rgba(103, 232, 249, .2);
    --app-text: #e6fbff;
    --app-muted: #93c5d2;
    --app-accent: #67e8f9;
    --app-accent-strong: #0891b2;
    --app-cyan: #a5f3fc;
}

body[data-theme="forest"] {
    --app-bg: #0b1b17;
    --app-panel: rgba(21, 51, 41, .94);
    --app-border: rgba(110, 231, 183, .19);
    --app-text: #ecfdf5;
    --app-muted: #9bc8b4;
    --app-accent: #6ee7b7;
    --app-accent-strong: #059669;
    --app-cyan: #a7f3d0;
}

body[data-theme="sunset"] {
    --app-bg: #21131a;
    --app-panel: rgba(66, 33, 42, .94);
    --app-border: rgba(253, 186, 116, .2);
    --app-text: #fff7ed;
    --app-muted: #e7b8a1;
    --app-accent: #fdba74;
    --app-accent-strong: #ea580c;
    --app-cyan: #fed7aa;
}

body[data-theme="lavender"] {
    --app-bg: #171328;
    --app-panel: rgba(43, 34, 80, .94);
    --app-border: rgba(221, 214, 254, .2);
    --app-text: #faf5ff;
    --app-muted: #c4b5fd;
    --app-accent: #c4b5fd;
    --app-accent-strong: #8b5cf6;
    --app-cyan: #ddd6fe;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(99, 102, 241, .14), transparent 36%),
        var(--app-bg);
    color: var(--app-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
}

a { color: inherit; }
button, input, textarea { font: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 3px;
}

.app-frame {
    width: min(100% - 32px, 1120px);
    margin: 0 auto;
    padding: 22px 0 48px;
}

.app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
    padding: 13px 16px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: rgba(14, 20, 39, .88);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .14);
}

body[data-theme="light"] .app-nav,
body[data-theme="light"] .app-panel,
body[data-theme="light"] .settings-side-card {
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 35px rgba(71, 85, 105, .08);
}

body[data-theme="light"] .app-form input,
body[data-theme="light"] .app-form select,
body[data-theme="light"] .app-form textarea,
body[data-theme="light"] .chat-form textarea {
    background: #f8fafc;
    color: var(--app-text);
}

body.left-handed-mode .app-nav {
    flex-direction: row-reverse;
}

body.left-handed-mode .app-nav-links {
    justify-content: flex-start;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--app-text);
    text-decoration: none;
}

.app-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--app-accent), var(--app-accent-strong));
    font-size: 20px;
}

.app-brand strong,
.app-brand small { display: block; }
.app-brand strong { font-size: 14px; }
.app-brand small { margin-top: 1px; color: var(--app-muted); font-size: 10px; }

.app-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.app-nav-links a,
.app-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

.app-nav-links a:hover,
.app-button:hover {
    border-color: rgba(129, 140, 248, .46);
    background: rgba(99, 102, 241, .13);
    color: white;
}

.app-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--app-accent), var(--app-accent-strong));
    color: white;
}

.page-header { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 7px; color: var(--app-accent); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.page-header h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.8px; line-height: 1.2; }
.page-header p { max-width: 650px; margin: 10px 0 0; color: var(--app-muted); font-size: 14px; }

.app-panel {
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(99, 102, 241, .1), transparent 38%),
        var(--app-panel);
}

.app-form { display: grid; gap: 16px; }
.app-form label { display: grid; gap: 7px; color: #e2e8f0; font-size: 12px; font-weight: 750; }

.app-form input,
.app-form textarea,
.app-form select {
    width: 100%;
    border: 1px solid #293650;
    border-radius: 11px;
    background: #0c1325;
    color: var(--app-text);
    padding: 12px 13px;
}

.app-form textarea { min-height: 230px; resize: vertical; }
.app-form input::placeholder, .app-form textarea::placeholder { color: #66748c; }
.app-form input:focus, .app-form textarea:focus { outline: 2px solid rgba(129, 140, 248, .4); border-color: var(--app-accent); }
.app-form input[type="file"] { padding: 9px; }
.auth-check-row {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 8px;
    color: var(--app-muted) !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
.auth-check-row input {
    width: auto !important;
    margin-top: 2px;
}
.community-search {
    display: flex;
    gap: 9px;
    margin: 16px 0 9px;
}
.community-search input {
    min-width: 0;
    flex: 1;
}
.contact-discovery {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
}
.study-file-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.study-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.add-file-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 13px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: rgba(129, 140, 248, .12);
    color: var(--app-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}
.add-file-button span {
    color: var(--app-accent);
    font-size: 18px;
    line-height: 1;
}
.add-file-button:hover,
.add-file-button:focus-visible {
    border-color: var(--app-accent);
    outline: none;
}
.selected-file-name {
    overflow: hidden;
    max-width: min(100%, 360px);
    color: var(--app-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.form-hint { margin: -5px 0 0; color: var(--app-muted); font-size: 12px; }

.profile-picture-editor {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}

.profile-picture-preview {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, .4);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(34, 211, 238, .2));
    color: #eef2ff;
    font-size: 28px;
    font-weight: 800;
}

.profile-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-controls {
    min-width: 0;
}

.profile-picture-controls > strong {
    display: block;
    color: #eef2ff;
    font-size: 13px;
}

.profile-avatar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-avatar-option {
    position: relative;
    cursor: pointer;
}

.profile-avatar-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.profile-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 21px;
    transition: transform .18s ease, border-color .18s ease;
}

.profile-avatar-option:hover .profile-avatar,
.profile-avatar-option input:focus-visible + .profile-avatar,
.profile-avatar-option input:checked + .profile-avatar {
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

.preset-book { background: linear-gradient(135deg, #4338ca, #7c3aed); }
.preset-rocket { background: linear-gradient(135deg, #0369a1, #06b6d4); }
.preset-bulb { background: linear-gradient(135deg, #b45309, #f59e0b); }
.preset-atom { background: linear-gradient(135deg, #047857, #14b8a6); }
.preset-star { background: linear-gradient(135deg, #be185d, #f43f5e); }
.preset-leaf { background: linear-gradient(135deg, #166534, #84cc16); }
.upload-avatar { background: rgba(148, 163, 184, .16); color: #c7d2fe; }

.app-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, .28);
    border-radius: 11px;
    background: var(--app-danger-bg);
    color: var(--app-danger-text);
    font-size: 13px;
}

.app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.app-note { margin-top: 20px; padding: 13px 15px; border: 1px solid rgba(103, 232, 249, .16); border-radius: 11px; background: rgba(103, 232, 249, .06); color: #c7d2fe; font-size: 12px; }
.app-answer, .app-sources { margin-top: 22px; padding: 18px; border: 1px solid var(--app-border); border-radius: 13px; background: rgba(8, 13, 25, .58); }
.app-answer h2, .app-sources h3 { margin-top: 0; }
.app-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.app-source { padding: 12px 0; border-bottom: 1px solid var(--app-border); overflow-wrap: anywhere; }
.app-source:last-child { border-bottom: 0; }

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
}

.settings-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.settings-section-heading.compact {
    margin-bottom: 0;
}

.settings-section-heading h2,
.settings-side-card h2 {
    margin: 0;
    font-size: 18px;
}

.settings-section-heading p,
.settings-side-card p {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 12px;
}

.settings-section-icon,
.settings-side-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: rgba(129, 140, 248, .14);
    color: #c7d2fe;
    font-size: 18px;
}

.settings-divider {
    height: 1px;
    margin: 5px 0 4px;
    background: var(--app-border);
}

.settings-toggle {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 11px !important;
    cursor: pointer;
}

.settings-toggle input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    accent-color: var(--app-accent-strong);
}

.settings-toggle strong,
.settings-toggle small {
    display: block;
}

.settings-toggle small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 400;
}

.app-success {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(110, 231, 183, .25);
    border-radius: 11px;
    background: rgba(16, 185, 129, .1);
    color: #a7f3d0;
    font-size: 13px;
}

.settings-side {
    display: grid;
    align-content: start;
    gap: 15px;
}

.settings-side-card {
    padding: 21px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: rgba(17, 26, 48, .84);
}

.settings-side-card-accent {
    border-color: rgba(103, 232, 249, .18);
    background: rgba(103, 232, 249, .06);
}

.settings-side-card .settings-side-icon {
    margin-bottom: 16px;
}

.settings-side-card p {
    margin: 10px 0 16px;
    line-height: 1.75;
}

.community-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.community-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.student-list {
    display: grid;
    gap: 10px;
}

.community-divider {
    height: 1px;
    margin: 24px 0;
    background: var(--app-border);
}

.group-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.group-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: rgba(8, 13, 25, .38);
}

.group-card-copy {
    min-width: 0;
}

.group-card-copy strong,
.group-card-copy small {
    display: block;
}

.group-card-copy p {
    margin: 5px 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.5;
}

.group-card-copy small {
    color: #a5b4fc;
    font-size: 11px;
}

.group-card-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.student-card,
.request-row,
.friend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: rgba(8, 13, 25, .38);
}

.student-card-copy,
.request-row > div:first-child,
.friend-row > span:last-child {
    min-width: 0;
    flex: 1;
}

.student-card-copy strong,
.student-card-copy small,
.request-row strong,
.request-row small,
.friend-row strong,
.friend-row small {
    display: block;
}

.student-card-copy small,
.request-row small,
.friend-row small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 11px;
}

.community-avatar {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, .35);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(34, 211, 238, .2));
    color: #eef2ff;
    font-weight: 800;
}

.community-avatar.small {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 12px;
}

.community-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-status,
.empty-state {
    color: var(--app-muted);
    font-size: 12px;
}

.notification-list {
    display: grid;
    gap: 10px;
    max-width: 850px;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: rgba(17, 26, 48, .78);
}

.notification-unread {
    border-color: rgba(129, 140, 248, .5);
    background: rgba(99, 102, 241, .12);
}

.notification-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    background: rgba(129, 140, 248, .16);
    color: #c7d2fe;
    font-size: 19px;
}

.notification-copy {
    min-width: 0;
    flex: 1;
}

.notification-copy strong,
.notification-copy small {
    display: block;
}

.notification-copy p {
    margin: 5px 0;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.5;
}

.notification-copy small {
    color: #818cf8;
    font-size: 10px;
}

.empty-notifications {
    text-align: center;
}

.empty-notifications .settings-section-icon {
    margin: 0 auto 12px;
}

.empty-notifications h2 {
    margin: 0;
}

.empty-notifications p {
    color: var(--app-muted);
    font-size: 12px;
}

.request-row {
    align-items: flex-start;
    margin-top: 10px;
}

.request-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.friend-row {
    margin-top: 10px;
    color: var(--app-text);
    text-decoration: none;
}

.friend-row:hover {
    border-color: rgba(129, 140, 248, .42);
}

.app-button-small {
    padding: 8px 10px;
    font-size: 11px;
}

.chat-header {
    margin-bottom: 18px;
}

.chat-panel {
    max-width: 820px;
}

.chat-messages {
    display: grid;
    gap: 10px;
    min-height: 280px;
    max-height: 520px;
    overflow: auto;
    padding: 4px;
}

.chat-message {
    justify-self: start;
    max-width: min(75%, 560px);
    padding: 11px 13px;
    border: 1px solid var(--app-border);
    border-radius: 14px 14px 14px 4px;
    background: rgba(8, 13, 25, .58);
}

.chat-message-self {
    justify-self: end;
    border-color: rgba(129, 140, 248, .35);
    border-radius: 14px 14px 4px 14px;
    background: rgba(99, 102, 241, .18);
}

.chat-message p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-message small {
    display: block;
    margin-top: 5px;
    color: var(--app-muted);
    font-size: 10px;
}

.chat-sender {
    display: block;
    margin-bottom: 4px;
    color: #c7d2fe;
    font-size: 11px;
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.chat-form textarea {
    flex: 1;
    min-height: 44px;
    resize: vertical;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.planner-grid,
.exam-mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.analytics-grid {
    display: grid;
    gap: 18px;
    max-width: 920px;
}

.analytics-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analytics-stat {
    display: grid;
    gap: 5px;
    min-height: 100px;
    align-content: center;
}

.analytics-stat strong {
    color: var(--app-accent);
    font-size: 28px;
}

.analytics-stat span,
.analytics-row small {
    color: var(--app-muted);
    font-size: 11px;
}

.analytics-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--app-border);
}

.analytics-row:last-child {
    border-bottom: 0;
}

.analytics-row strong,
.analytics-row small {
    display: block;
}

.analytics-row b {
    color: #6ee7b7;
}

.analytics-copy {
    color: var(--app-muted);
    line-height: 1.7;
}

.task-row,
.plan-row,
.announcement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 11px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: rgba(8, 13, 25, .3);
}

.task-row span,
.plan-row,
.announcement-row {
    min-width: 0;
    flex: 1;
}

.task-row strong,
.task-row small,
.plan-row strong,
.plan-row small,
.announcement-row strong {
    display: block;
}

.task-row small,
.plan-row small {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 10px;
}

.task-row {
    width: 100%;
    text-align: left;
    color: var(--app-text);
}

.task-check {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: transparent;
    color: var(--app-accent);
    cursor: pointer;
}

.task-check.done {
    background: rgba(110, 231, 183, .15);
    color: #6ee7b7;
}

.task-done {
    color: var(--app-muted);
    text-decoration: line-through;
}

.announcement-row {
    display: block;
}

.announcement-row p {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 12px;
}

.search-bar {
    display: flex;
    gap: 9px;
    max-width: 850px;
    margin-bottom: 18px;
}

.search-bar input {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: rgba(8, 13, 25, .5);
    color: var(--app-text);
}

.search-results {
    display: grid;
    gap: 12px;
    max-width: 850px;
}

.search-result h2 {
    margin: 5px 0;
}

.search-result p {
    color: var(--app-muted);
    font-size: 13px;
    white-space: pre-wrap;
}

.exam-countdown {
    display: grid;
    gap: 5px;
    margin-bottom: 20px;
    color: var(--app-accent);
    font-size: 34px;
}

.exam-countdown strong {
    color: var(--app-text);
    font-size: 20px;
}

.exam-countdown small {
    color: var(--app-muted);
    font-size: 11px;
}

.exam-mode-grid .app-button {
    width: 100%;
    margin-top: 9px;
}

.exam-task {
    padding: 12px 0;
    border-bottom: 1px solid var(--app-border);
}

.exam-task:last-child {
    border-bottom: 0;
}

@media (max-width: 720px) {
    .planner-grid,
    .exam-mode-grid {
        grid-template-columns: 1fr;
    }

    .analytics-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .app-frame { width: min(100% - 24px, 680px); padding-top: 12px; }
    .app-nav { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 25px; }
    .app-nav-links { width: 100%; justify-content: flex-start; }
    .app-nav-links a { flex: 1 1 auto; min-width: 0; padding-inline: 9px; font-size: 11px; }
    .page-header { align-items: flex-start; flex-direction: column; gap: 10px; }
    .app-actions { flex-direction: column; }
    .app-actions .app-button { width: 100%; }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .community-page-grid {
        grid-template-columns: 1fr;
    }

    .chat-form {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-form .app-button {
        width: 100%;
    }

    .group-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .group-card-actions {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: .01ms !important; }
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    align-items: center;
    gap: clamp(30px, 7vw, 100px);
    width: min(100% - 40px, 1080px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0;
}

.auth-intro {
    max-width: 560px;
}

.auth-intro .app-brand {
    margin-bottom: 70px;
}

.auth-intro h1 {
    max-width: 600px;
    margin: 0;
    font-size: clamp(34px, 5vw, 60px);
    letter-spacing: -1.8px;
    line-height: 1.05;
}

.auth-intro > p:not(.eyebrow) {
    max-width: 510px;
    margin: 23px 0 0;
    color: var(--app-muted);
    font-size: 16px;
}

.auth-benefits {
    display: grid;
    gap: 9px;
    margin-top: 28px;
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 700;
}

.auth-card {
    padding: clamp(23px, 4vw, 34px);
    border: 1px solid var(--app-border);
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(99, 102, 241, .14), transparent 40%),
        rgba(17, 26, 48, .92);
    box-shadow: 0 25px 70px rgba(0, 0, 0, .22);
}

.auth-card h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 9px 0 24px;
    color: var(--app-muted);
    font-size: 13px;
}

.auth-card .app-button {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--app-muted);
    font-size: 12px;
    text-align: center;
}

.auth-switch a {
    color: #c7d2fe;
    font-weight: 750;
}

@media (max-width: 760px) {
    .auth-shell {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 520px);
        padding: 24px 0 35px;
    }

    .auth-intro .app-brand {
        margin-bottom: 38px;
    }

    .auth-intro h1 {
        font-size: 36px;
    }

    .auth-intro > p:not(.eyebrow) {
        font-size: 14px;
    }
}
