/*
 * Student web portal (/student/...) — a browser version of the
 * AllianceStudent app's Dashboard/Card/Timetable/Notifications screens.
 * Plain CSS (not compiled from SCSS, matching apps.css/carousel.css in
 * this same module) reusing the Vital design tokens (--g, --ink, --surface,
 * --line, --radius-lg, --shadow-md, ...) that .vital-page already defines —
 * every portal page's content is wrapped in .vital-page too, so these are
 * already in scope; nothing here is redefined.
 */

/* ---- shared shell ---- */

.portal-shell { padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }

.portal-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 2rem; }
.portal-nav .who { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--ink); }
.portal-nav .who span { display: block; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.portal-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.portal-tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.95rem; border-radius: 10px; font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; transition: background 0.15s, color 0.15s; }
.portal-tabs a:hover { background: var(--bg-tint); }
.portal-tabs a.active { background: var(--g-50); color: var(--g-700); }
.portal-logout { background: none; border: 1.5px solid var(--line); color: var(--ink-soft); font-weight: 700; font-size: 0.88rem; padding: 0.5rem 1rem; border-radius: 10px; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.portal-logout:hover { border-color: var(--g); color: var(--g-700); }

.portal-empty { display: flex; align-items: center; gap: 1rem; padding: 2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); }
.portal-empty i { font-size: 1.6rem; color: var(--g-700); flex: none; }

/* ---- login ---- */

.login-wrap { max-width: 26rem; margin-inline: auto; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(1.8rem, 4vw, 2.6rem); }
.login-card .form-label { font-size: 0.86rem; font-weight: 700; color: var(--ink); margin-bottom: 0.4rem; display: block; }
.login-card input[type="text"], .login-card input[type="password"] { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.72rem 0.95rem; font-size: 0.98rem; color: var(--ink); background: var(--bg); font-family: inherit; }
.login-card input:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 3px oklch(0.6 0.125 165 / 0.14); }
.login-error { background: oklch(0.96 0.03 25); border: 1px solid oklch(0.85 0.1 25); color: oklch(0.4 0.15 25); border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1.2rem; display: flex; gap: 0.6rem; align-items: flex-start; }

/* ---- dashboard ---- */

.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.dash-tile { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; text-decoration: none; color: var(--ink); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; position: relative; }
.dash-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--g-300); color: var(--ink); }
.dash-tile .ic { flex: none; width: 50px; height: 50px; border-radius: 14px; background: var(--g-50); color: var(--g-700); display: grid; place-items: center; font-size: 1.4rem; }
.dash-tile h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.dash-tile p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.dash-tile .badge-count { position: absolute; top: 0.9rem; right: 1rem; background: var(--g); color: #fff; font-size: 0.72rem; font-weight: 800; min-width: 22px; height: 22px; padding: 0 0.4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- ID card ---- */

.id-card-wrap { max-width: 26rem; margin-inline: auto; }
.id-card { background: linear-gradient(160deg, var(--surface), var(--bg-tint)); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.id-card-head { background: radial-gradient(480px 260px at 90% -20%, var(--g-600), transparent 60%), linear-gradient(155deg, var(--g), var(--g-700)); color: #fff; padding: 1.4rem 1.6rem; display: flex; align-items: center; gap: 1rem; }
.id-card-photo { flex: none; width: 76px; height: 76px; border-radius: 16px; border: 2px solid oklch(1 0 0 / 0.7); overflow: hidden; background: oklch(1 0 0 / 0.15); display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.6rem; }
.id-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-card-head h2 { color: #fff; font-size: 1.2rem; margin: 0 0 0.2rem; }
.id-card-head .status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; background: oklch(1 0 0 / 0.14); border: 1px solid oklch(1 0 0 / 0.25); border-radius: 999px; padding: 0.2rem 0.65rem; }
.id-card-body { padding: 1.5rem 1.6rem; }
.id-card-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); font-size: 0.92rem; }
.id-card-row:first-child { border-top: 0; }
.id-card-row .k { color: var(--muted); }
.id-card-row .v { color: var(--ink); font-weight: 700; text-align: right; }
.id-card-qr { margin-top: 1.2rem; padding-top: 1.3rem; border-top: 1px dashed var(--line); text-align: center; }
.id-card-qr #student-qr { display: inline-block; line-height: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.id-card-qr p { margin: 0.7rem 0 0; font-size: 0.78rem; color: var(--muted); }

/* ---- notifications ---- */

.notice-list { display: flex; flex-direction: column; gap: 0.9rem; }
.notice-card { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.notice-accent { flex: none; width: 5px; }
.notice-accent.urgent { background: oklch(0.58 0.22 25); }
.notice-accent.important { background: var(--g-300); }
.notice-accent.normal { background: transparent; }
.notice-body { flex: 1; min-width: 0; padding: 1.1rem 1.3rem; }
.notice-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.3rem; }
.notice-top h3 { font-size: 1.02rem; margin: 0; }
.notice-pill { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.22rem 0.6rem; border-radius: 999px; flex: none; }
.notice-pill.urgent { background: oklch(0.58 0.22 25); color: #fff; }
.notice-pill.important { background: var(--g-50); color: var(--g-700); }
.notice-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.notice-message { font-size: 0.93rem; color: var(--ink-soft); line-height: 1.6; white-space: pre-line; margin-bottom: 0.7rem; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.6rem; }
.notice-actions a { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 700; color: var(--g-700); background: var(--g-50); border-radius: 10px; padding: 0.45rem 0.8rem; text-decoration: none; }
.notice-until { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
