/* View: Portal ucznia (js/views/student-portal.js) + kod portalu u korepetytora (js/flows/portal.js, .pt-*).
   Student portal: own sticky header (.sp-top), hero in the student hue, figures table, lists between rules. */
@layer views {
/* ---- tutor side: connection code sheet ---- */
.pt-code-box { display: grid; gap: 10px; justify-items: start; margin: 12px 0; padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); }
.pt-label { font-size: var(--fs-kicker); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.pt-code { font-family: var(--font-display); font-weight: var(--w-display); font-variation-settings: var(--fvs-fig); font-size: var(--fs-fig); letter-spacing: .1em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); user-select: all; white-space: nowrap; }
.pt-code-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- student app shell ---- */
.student-root { min-height: 100dvh; background: var(--paper); }
.sp { min-height: 100dvh; }
.sp-top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); padding-top: var(--safe-t, 0px); }
.sp-top-in { height: var(--topbar-h); display: flex; align-items: center; gap: 8px; max-width: var(--content-w); margin: 0 auto; padding: 0 max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l)); }
.sp-top .sb-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 44px; min-height: 44px; color: var(--ink); }
.sp-badge { margin-left: 6px; }
.sp-top .tb-spacer { flex: 1; }
.sp-logout { flex: none; white-space: nowrap; }

.sp-main { max-width: var(--content-w); margin: 0 auto; padding: 0 max(var(--gutter), var(--safe-r)) calc(40px + var(--safe-b, 0px)) max(var(--gutter), var(--safe-l)); display: flex; flex-direction: column; }
.sp-preview { min-height: 0; }
.sp-preview .sp-main { padding: 0; max-width: none; }

/* ---- hero: next lesson in the student hue ---- */
.sp-hero { --h: 250; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }   /* hue fill + outline: components/widget.css */
.sp-eyebrow { font-size: var(--fs-kicker); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.sp-hero-title { font-size: 28px; line-height: 1.12; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.sp-hero-main > .muted { margin-top: 6px; }
.sp-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-caption); }
.sp-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.sp-hero-meta .ico { flex: none; color: var(--ink-3); }
.sp-hero > .btn { align-self: flex-start; }

/* ---- figures + amounts ---- */
.sp-stats .stat-sub b { font-weight: 600; color: var(--ink); }
.sp-price { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.sp-price.due { color: var(--danger); font-weight: 600; }

/* ---- lists ---- */
.hist-title.static { cursor: default; }
@media (hover: hover) { .hist-title.static:hover { color: inherit; } }
.hw-static { display: flex; gap: 7px; align-items: flex-start; font-size: var(--fs-caption); color: var(--ink-2); }
.hw-static.done { color: var(--ink-3); }
.hw-static .ico { margin-top: 2px; flex: none; }
.sp-account { white-space: normal; overflow-wrap: anywhere; font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sp-info .row-static { min-height: 56px; }
.sp-copy { margin-left: auto; flex: none; }
.sp-readonly { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; }
.sp-readonly .ico { flex: none; margin-top: 2px; }
.sp-switch { margin-top: 14px; }
.sp-foot { margin-top: 20px; font-size: var(--fs-caption); color: var(--ink-3); }
.sp-loading { display: grid; place-items: center; gap: 12px; padding: 60px 0; }

/* ---- claim a connection code ---- */
.sp-claim { display: grid; gap: 10px; max-width: 520px; margin: 6vh auto 0; }
.sp-claim .sp-hero-title { margin: 0; }
.sp-claim-form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 4px; }
.sp-claim-form .sp-code { flex: 1 1 180px; min-width: 0; }
.sp-claim-form .btn { flex: 1 1 140px; }
.sp-code { text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-display); font-size: 26px; font-variant-numeric: tabular-nums; }
.sp-claim .auth-msg { min-height: 20px; font-size: var(--fs-caption); }
.sp-claim .auth-msg.err { color: var(--danger); }
.sp-claim .auth-msg.ok { color: var(--good); }
.sp-add { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); }
.sp-add > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--accent); list-style: none; }
.sp-add > summary::-webkit-details-marker { display: none; }
.sp-add .sp-claim { margin: 0; padding-top: 6px; }

@media (max-width: 760px) {
  .sp-top .brand-name, .sp-badge { display: none; }
}
@media (max-width: 380px) {
  .sp-logout span { display: none; }
  .pt-code { font-size: 28px; letter-spacing: .08em; }
}
@media (min-width: 761px) {
  .sp-hero { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px; }
  .sp-hero-title { font-size: 36px; }
}
}
