.auth {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
}

.auth-panel { display: flex; flex-direction: column; padding: var(--s-8) var(--s-10); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-top .brand { padding: 0; }
.auth-top .brand:hover { text-decoration: none; }

.auth-form-wrap { margin: auto; width: 100%; max-width: 420px; padding: var(--s-8) 0; }
.auth-form-wrap h1 { font-size: 28px; margin-bottom: var(--s-2); }
.auth-form-wrap .lead { color: var(--text-2); margin-bottom: var(--s-6); line-height: 1.9; }
.auth-form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-form .input { height: var(--control-h-lg); }


    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--success-soft); color: var(--success);
}

.auth-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px; margin-top: calc(var(--s-2) * -1); font-size: var(--text-sm); color: var(--text-3); }
.auth-foot button { color: var(--accent); font-weight: 700; padding: 6px 10px; border-radius: var(--r-sm); }
.auth-foot button:hover { background: var(--accent-soft); }
#remember-row[hidden] { display: none; }

.auth-visual {
    position: relative; overflow: hidden;
    background: var(--bg-elev);
    border-inline-start: 1px solid var(--border);
    display: flex; flex-direction: column; justify-content: center; gap: var(--s-10);
    padding: var(--s-12) var(--s-12);
}
.auth-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.auth-orb-1 { width: 640px; height: 640px; top: -220px; left: -180px; background: radial-gradient(circle, hsl(var(--hue-accent) 90% 62% / .26), transparent 68%); }
.auth-orb-2 { width: 540px; height: 540px; bottom: -200px; right: -160px; background: radial-gradient(circle, hsl(var(--hue-superset) 85% 62% / .2), transparent 68%); }

.auth-grid {
    position: absolute; inset: 0; opacity: .6; pointer-events: none;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(75% 70% at 50% 45%, #000 20%, transparent 100%);
}

.auth-caption { position: relative; }
.auth-tagline { font-size: 26px; font-weight: 800; line-height: 1.5; letter-spacing: -.015em; max-width: 460px; }
.auth-tagline em { font-style: normal; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-points { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-5); color: var(--text-2); font-size: var(--text-sm); }
.auth-points li { display: flex; align-items: center; gap: var(--s-2); }
.auth-points svg { width: 16px; height: 16px; color: var(--accent); }

.auth-mock {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-4);
    max-width: 560px;
    perspective: 1200px;
}
.mock-card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-3);
    padding: var(--s-4);
    font-size: var(--text-sm);
    animation: mock-float 9s ease-in-out infinite;
}
.mock-program { grid-row: span 2; transform: rotateY(-6deg) rotateX(3deg); }
.mock-stat { animation-delay: -3s; }
.mock-chart { animation-delay: -5s; color: var(--accent); }
@keyframes mock-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); }
.mock-title { font-weight: 700; color: var(--text); }
.mock-save { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); }
.mock-save i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

.mock-row { display: flex; align-items: center; gap: var(--s-2); padding: 8px 6px; border-radius: 8px; }
.mock-row + .mock-row { border-top: 1px dashed var(--border); }
.mock-num, .mock-letter {
    width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
    font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text-2); flex-shrink: 0;
}
.mock-letter { background: var(--superset-soft); color: var(--superset); }
.mock-name { flex: 1; color: var(--text); font-weight: 500; }
.mock-sets { color: var(--text-3); font-variant-numeric: tabular-nums; }

.mock-group {
    position: relative; margin: 6px 0; padding: 22px 6px 2px 6px;
    border: 1px solid var(--superset-soft); border-radius: 10px;
    background: color-mix(in srgb, var(--superset-soft) 40%, transparent);
}
.mock-group-bar { position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--superset); }
.mock-group-label { position: absolute; top: 4px; inset-inline-start: 12px; font-size: 10px; font-weight: 700; color: var(--superset); }
.mock-group .mock-row + .mock-row { border-top: 0; }

.mock-stat, .mock-chart { display: flex; flex-direction: column; gap: 6px; }
.mock-stat-label { color: var(--text-2); font-size: 12px; }
.mock-stat-value { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.02em; line-height: 1.1; }
.mock-stat-value small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.mock-stat-sub { color: var(--text-3); font-size: 11px; }
.mock-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.mock-bar i { display: block; height: 100%; background: var(--accent-gradient); border-radius: inherit; }

@media (max-width: 1100px) {
    .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-visual { padding: var(--s-8); }
}
@media (max-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-visual { display: none; }
    .auth-panel { padding: var(--s-5); }
}

.student-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.student-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); max-width: 820px; width: 100%; margin: 0 auto; }
.student-top .brand { padding: 0; text-decoration: none; }
.student-main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: var(--s-2) var(--s-5) var(--s-16); }

.code-hero {
    max-width: 440px; margin: 6vh auto 0; text-align: center;
    padding: var(--s-8) var(--s-6); border-radius: 24px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 24px 60px -32px rgba(15, 23, 42, .35);
}
.code-hero h1 { font-size: 24px; font-weight: 900; margin-bottom: var(--s-2); }
.code-hero .lead { color: var(--text-2); margin-bottom: var(--s-6); line-height: 1.9; }
.code-hero .brand-mark { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto var(--s-5); box-shadow: var(--accent-glow); }
.code-hero .brand-mark svg { width: 30px; height: 30px; }
.code-input {
    height: 64px; font-size: 28px; font-weight: 800; letter-spacing: .28em; text-align: center; direction: ltr;
    font-variant-numeric: tabular-nums; padding-inline: var(--s-4) !important; border-radius: 16px;
}
.input.code-input { text-align: center; text-indent: .28em; }
.code-input::placeholder { letter-spacing: .28em; font-weight: 600; font-size: 22px; color: var(--text-3); opacity: .55; }
#code-form .field-error { justify-content: center; text-align: center; }
.code-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-top: var(--s-5); line-height: 1.8; }
.code-hint svg { width: 14px; height: 14px; flex-shrink: 0; }

.sp-hero {
    position: relative; overflow: hidden; border-radius: 24px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 20px 48px -36px rgba(15, 23, 42, .4);
}
.sp-hero::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 112px;
    background:
        radial-gradient(420px 160px at 100% 0%, hsl(var(--hue-accent) 70% 55% / .22), transparent 70%),
        radial-gradient(360px 140px at 0% 0%, hsl(var(--hue-superset) 70% 60% / .16), transparent 70%);
    pointer-events: none;
}
.sp-identity { position: relative; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-6) var(--s-6) var(--s-5); }
.sp-skeleton .skeleton.sp-avatar { width: var(--size); height: var(--size); }
.sp-skeleton .skeleton.sp-metric { border: 0; }
.sp-avatar { --size: 76px; font-size: 28px; border-radius: 22px; flex-shrink: 0; box-shadow: 0 0 0 4px var(--surface), 0 10px 24px -12px rgba(15, 23, 42, .45); }
.sp-identity-text { flex: 1; min-width: 0; }
.sp-hello { font-size: 13px; color: var(--text-3); font-weight: 600; }
.sp-identity h1 { font-size: 24px; font-weight: 900; letter-spacing: -.01em; line-height: 1.4; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sp-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); }
.sp-chip svg { width: 13px; height: 13px; color: var(--text-3); }
.sp-chip.is-live { background: var(--success-soft); border-color: transparent; color: var(--success); }
.sp-chip.is-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }

.sp-coach { position: relative; display: flex; align-items: center; gap: var(--s-3); margin: 0 var(--s-6); padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.sp-coach-logo { --size: 44px; border-radius: 13px; font-size: 16px; flex-shrink: 0; }
.sp-coach-logo img { object-fit: cover; }
.sp-coach-text { flex: 1; min-width: 0; }
.sp-coach-label { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.sp-coach-name { font-size: 15px; font-weight: 800; }
.sp-coach-call {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 800; text-decoration: none;
    font-variant-numeric: tabular-nums; transition: background var(--dur-1), transform var(--dur-1);
}
.sp-coach-call:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); transform: translateY(-1px); }
.sp-coach-call svg { width: 16px; height: 16px; }

.sp-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); padding: 0 var(--s-6) var(--s-6); }
.sp-metric { display: flex; flex-direction: column; gap: 2px; padding: var(--s-4); border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.sp-metric-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 700; }
.sp-metric-head svg { width: 15px; height: 15px; color: var(--text-3); }
.sp-metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.sp-metric-value strong { font-size: 26px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sp-metric-value small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.sp-metric-note { font-size: 12px; font-weight: 700; color: var(--text-3); margin-top: 2px; }
.sp-metric.is-success .sp-metric-note { color: var(--success); }
.sp-metric.is-warning .sp-metric-note { color: var(--warning); }
.sp-metric.is-danger .sp-metric-note { color: var(--danger); }
.sp-scale { position: relative; height: 6px; margin-top: 10px; border-radius: 999px; background: linear-gradient(90deg, hsl(200 80% 60%) 0 17.5%, hsl(150 55% 45%) 17.5% 50%, hsl(38 92% 55%) 50% 75%, hsl(358 75% 58%) 75% 100%); direction: ltr; }
.sp-scale-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(15, 23, 42, .25); }

.sp-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-8) 0 var(--s-4); }
.sp-section-head h2 { font-size: 18px; font-weight: 900; }
.sp-section-head span { font-size: 12.5px; color: var(--text-3); }
.sp-program-grid { display: grid; gap: var(--s-4); }
.sp-program {
    display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5);
    border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.sp-program-top { display: flex; align-items: center; gap: var(--s-3); }
.sp-program-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.sp-program.is-diet .sp-program-icon { background: var(--success-soft); color: var(--success); }
.sp-program-icon svg { width: 24px; height: 24px; }
.sp-program-kind { font-size: 12px; color: var(--text-3); font-weight: 700; }
.sp-program-title { font-size: 18px; font-weight: 900; line-height: 1.5; }
.sp-program-left { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 12.5px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.sp-program-left.is-warning { background: var(--warning-soft); color: var(--warning); }
.sp-program-range { display: flex; flex-direction: column; gap: 8px; padding: var(--s-3) var(--s-4); border-radius: 14px; background: var(--surface-2); }
.sp-program-dates { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: 13px; color: var(--text-2); font-weight: 600; }
.sp-program-dates span { display: inline-flex; align-items: center; gap: 6px; }
.sp-program-dates svg { width: 14px; height: 14px; color: var(--text-3); }
.sp-program-dates b { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.sp-program-range .progress { height: 7px; background: var(--surface-3); }
.sp-program.is-diet .progress > span { background: var(--success); }
.sp-program-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.sp-program-actions .btn { height: 48px; border-radius: 14px; font-size: 14.5px; }

.sp-about { margin-top: var(--s-6); padding: var(--s-5); border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.sp-about-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.sp-about-head h2 { font-size: 16px; font-weight: 800; }
.sp-about-logo { border-radius: 10px; }
.sp-about-logo img { object-fit: cover; }
.sp-about p { line-height: 2; font-size: 13.5px; color: var(--text-2); white-space: pre-line; }
.sp-footer { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin-top: var(--s-8); text-align: center; }
.sp-footer p { font-size: 12.5px; color: var(--text-3); }

@media (max-width: 560px) {
    .student-top { padding: var(--s-3) var(--s-4); }
    .student-main { padding: var(--s-1) var(--s-4) var(--s-12); }
    .code-hero { margin-top: 3vh; padding: var(--s-6) var(--s-4); }
    .sp-identity { padding: var(--s-5) var(--s-4) var(--s-4); gap: var(--s-3); }
    .sp-avatar { --size: 60px; font-size: 22px; border-radius: 18px; }
    .sp-identity h1 { font-size: 20px; }
    .sp-coach { margin: 0 var(--s-4); }
    .sp-coach-call { width: 40px; padding: 0; justify-content: center; }
    .sp-coach-call span { display: none; }
    .sp-metrics { gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
    .sp-metric { padding: var(--s-3); border-radius: 14px; }
    .sp-metric-head { font-size: 11.5px; }
    .sp-metric-head svg { display: none; }
    .sp-metric-value { flex-direction: column; align-items: flex-start; gap: 0; margin-top: 4px; }
    .sp-metric-value strong { font-size: 21px; }
    .sp-metric-value small { font-size: 11px; }
    .sp-program { padding: var(--s-4); border-radius: 18px; }
    .sp-program-icon { width: 44px; height: 44px; border-radius: 13px; }
    .sp-program-title { font-size: 16px; }
    .sp-program-dates { flex-direction: column; align-items: flex-start; gap: 2px; }
}
