:root {
  --portal-green: #3f5351;
  --portal-green-dark: #2f433c;
  --portal-terracotta: #d96c4a;
  --portal-action: #b95738;
  --portal-bg: #f4f7f6;
  --portal-ink: #263d43;
  --portal-muted: #6f7f82;
  --portal-line: #d9e3e0;
  --portal-white: #ffffff;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--portal-bg); }
body { min-height: 100%; margin: 0; color: var(--portal-ink); background: var(--portal-bg); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.portal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 5vw;
  background:
    radial-gradient(circle at 9% 16%, rgba(217, 108, 74, .1), transparent 19rem),
    radial-gradient(circle at 92% 80%, rgba(63, 83, 81, .11), transparent 23rem),
    linear-gradient(135deg, #fbfcfb 0%, var(--portal-bg) 48%, #edf3f1 100%);
}
.portal-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(63, 83, 81, .12); }
.portal-brand img { width: 150px; height: auto; display: block; }
.portal-back { color: #536b6b; font-size: 13px; font-weight: 700; }
.portal-back:hover, .portal-back:focus-visible { color: var(--portal-action); }

.portal-layout { width: min(1180px, 100%); flex: 1; display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(52px, 8vw, 115px); margin: 0 auto; padding: 64px 0; }
.portal-intro { max-width: 530px; }
.portal-eyebrow { margin: 0 0 18px; color: var(--portal-action); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.portal-intro h1 { margin: 0; color: var(--portal-ink); font-size: clamp(46px, 5.2vw, 73px); line-height: .98; letter-spacing: -.055em; }
.portal-intro h1 span { color: var(--portal-green); }
.portal-intro > p:not(.portal-eyebrow) { margin: 25px 0 0; color: var(--portal-muted); font-size: 16px; line-height: 1.72; }
.portal-steps { display: grid; gap: 16px; margin-top: 37px; }
.portal-steps p { display: grid; grid-template-columns: 37px 1fr; column-gap: 13px; margin: 0; }
.portal-steps p > span { width: 37px; height: 37px; grid-row: span 2; display: grid; place-items: center; border: 1px solid #cbdad6; border-radius: 12px 12px 12px 5px; color: var(--portal-green); background: rgba(255,255,255,.74); font-size: 11px; font-weight: 900; }
.portal-steps strong { align-self: end; color: #40585d; font-size: 13px; }
.portal-steps small { align-self: start; margin-top: 3px; color: #829093; font-size: 11px; }

.portal-panel { min-height: 570px; display: flex; border: 1px solid rgba(63, 83, 81, .16); border-radius: 30px; padding: clamp(28px, 4vw, 46px); background: rgba(255,255,255,.94); box-shadow: 0 30px 75px rgba(47, 67, 60, .14); backdrop-filter: blur(12px); }
.portal-state { width: 100%; }
.portal-loading { min-height: 460px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.portal-loading strong { margin-top: 17px; color: #40585d; font-size: 15px; }
.portal-loading small { margin-top: 7px; color: #879496; font-size: 11px; }
.portal-spinner { width: 35px; height: 35px; border: 3px solid #dfe8e6; border-top-color: var(--portal-action); border-radius: 50%; animation: portal-spin .85s linear infinite; }
@keyframes portal-spin { to { transform: rotate(360deg); } }

.portal-panel-heading { display: flex; align-items: center; gap: 15px; }
.portal-panel-icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 16px 16px 16px 6px; color: white; background: linear-gradient(140deg, var(--portal-green), var(--portal-green-dark)); box-shadow: 0 10px 24px rgba(47, 67, 60, .2); font-size: 21px; font-weight: 900; }
.portal-panel-heading small, .portal-module-heading small { color: var(--portal-action); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.portal-panel-heading h2 { margin: 4px 0 0; color: #304a50; font-size: 25px; letter-spacing: -.03em; }
.portal-panel-copy { margin: 25px 0 23px; color: #758588; font-size: 13px; line-height: 1.6; }
.portal-form { display: grid; gap: 9px; }
.portal-form label { margin-top: 7px; color: #465d62; font-size: 11px; font-weight: 800; }
.portal-form input { width: 100%; height: 51px; border: 1px solid #d4e0dd; border-radius: 13px; padding: 0 15px; outline: none; color: #2f474c; background: #fbfcfc; font-size: 14px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.portal-form input:focus { border-color: #829c96; box-shadow: 0 0 0 4px rgba(63, 83, 81, .08); }
.portal-form button { min-height: 53px; display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 14px; border: 0; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--portal-action), #98442d); box-shadow: 0 13px 28px rgba(185, 87, 56, .22); font-size: 13px; font-weight: 800; }
.portal-form button:hover, .portal-form button:focus-visible { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(185, 87, 56, .29); }
.portal-form button:disabled, .portal-module-card button:disabled { cursor: wait; opacity: .7; transform: none; }
.portal-support { margin: 23px 0 0; text-align: center; color: #8b9799; font-size: 10px; }
.portal-support a { color: var(--portal-green); font-weight: 800; }
.portal-alert { border-radius: 12px; padding: 11px 13px; font-size: 11px; line-height: 1.45; }
.portal-alert-error { margin: 17px 0 6px; border: 1px solid #f0c6ba; color: #8c402c; background: #fff3ef; }

.portal-userbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding-bottom: 22px; border-bottom: 1px solid var(--portal-line); }
.portal-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; color: white; background: var(--portal-green); font-size: 13px; font-weight: 900; }
.portal-userbar small { color: var(--portal-action); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.portal-userbar h2 { overflow: hidden; margin: 3px 0 1px; color: #334e53; font-size: 18px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.portal-userbar p { overflow: hidden; margin: 0; color: #819092; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.portal-userbar button { border: 1px solid #d8e2df; border-radius: 999px; padding: 8px 12px; color: #617476; background: white; font-size: 10px; font-weight: 800; }
.portal-module-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 27px 0 16px; }
.portal-module-heading h3 { margin: 3px 0 0; color: #385258; font-size: 20px; letter-spacing: -.025em; }
.portal-module-heading > span { border-radius: 999px; padding: 6px 9px; color: #607475; background: #edf3f1; font-size: 9px; font-weight: 800; }
.portal-module-list { display: grid; gap: 10px; }
.portal-module-card { --module: var(--portal-green); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; border: 1px solid #dce6e3; border-radius: 16px; padding: 13px; background: #fbfcfc; }
.portal-module-observer { --module: var(--portal-action); }
.portal-module-academic { --module: #526dbb; }
.portal-module-central { --module: #755b99; }
.portal-module-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px 13px 13px 5px; color: white; background: var(--module); font-size: 13px; font-weight: 900; }
.portal-module-card h4 { margin: 0; color: #3c565b; font-size: 13px; }
.portal-module-card p { margin: 4px 0 0; color: #869294; font-size: 9px; line-height: 1.4; }
.portal-module-card button { min-width: 116px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--module) 24%, white); border-radius: 11px; padding: 9px 11px; color: var(--module); background: white; font-size: 9px; font-weight: 900; }
.portal-module-card button:hover, .portal-module-card button:focus-visible { color: white; background: var(--module); }
.portal-empty { border: 1px dashed #ccd9d6; border-radius: 16px; padding: 28px; text-align: center; background: #f8faf9; }
.portal-empty strong { color: #4b6367; font-size: 13px; }
.portal-empty p { margin: 7px 0 0; color: #879496; font-size: 10px; }

.portal-footer { min-height: 70px; display: flex; align-items: center; justify-content: flex-end; gap: 18px; border-top: 1px solid rgba(63, 83, 81, .12); color: #78898b; font-size: 10px; }
.portal-footer p { margin: 0 auto 0 0; }
.portal-footer p span { margin-right: 7px; color: #4b9b7c; }
.portal-footer a:hover, .portal-footer a:focus-visible { color: var(--portal-action); }

@media (max-width: 920px) {
  .portal-page { padding: 0 28px; }
  .portal-layout { grid-template-columns: 1fr; gap: 48px; padding: 55px 0; }
  .portal-intro { max-width: 680px; }
  .portal-panel { width: min(680px, 100%); }
}
@media (max-width: 580px) {
  .portal-page { padding: 0 16px; }
  .portal-header { min-height: 76px; }
  .portal-brand img { width: 128px; }
  .portal-back { font-size: 11px; }
  .portal-layout { padding: 40px 0; }
  .portal-intro h1 { font-size: 45px; }
  .portal-intro > p:not(.portal-eyebrow) { font-size: 14px; }
  .portal-panel { min-height: 530px; border-radius: 22px; padding: 23px 18px; }
  .portal-userbar { grid-template-columns: auto 1fr; }
  .portal-userbar > button { grid-column: 1 / -1; width: 100%; }
  .portal-module-card { grid-template-columns: auto 1fr; }
  .portal-module-card button { grid-column: 1 / -1; width: 100%; }
  .portal-footer { align-items: flex-start; flex-wrap: wrap; padding: 20px 0; }
  .portal-footer p { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
