/* Modern portal visual layer: restrained depth, glass surfaces and safe motion. */
:root {
  --modern-wine: #5e2438;
  --modern-wine-dark: #321b2a;
  --modern-gold: #d2ad6d;
  --modern-ink: #2d2330;
  --modern-surface: rgba(255,255,255,.86);
}

body { background: #f5f2f3; }

.app-shell {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 10% 0%, rgba(210,173,109,.12), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(94,36,56,.08), transparent 30%),
    #f7f5f6;
}
.app-shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: linear-gradient(rgba(94,36,56,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(94,36,56,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.main-area { perspective: 1400px; }
.content-card, .stat-card, .quick-action-card, .welcome-banner, .profile-hero {
  transform-style: preserve-3d;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.content-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(52,36,43,.09); }
.stat-card:hover, .quick-action-card:hover { transform: translateY(-5px) rotateX(1deg); box-shadow: 0 20px 32px rgba(52,36,43,.12); }
.welcome-banner { overflow: hidden; box-shadow: 0 20px 42px rgba(91,37,57,.19); }
.welcome-banner::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  top: -180px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 56px rgba(255,255,255,.025);
  pointer-events: none;
}
.welcome-banner > * { position: relative; z-index: 1; }
.stat-card::after, .quick-action-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.42), transparent 42%);
  transition: opacity .24s ease;
}
.stat-card:hover::after, .quick-action-card:hover::after { opacity: 1; }
.dashboard-insights { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.8fr); gap: 14px; margin: 15px 0 2px; }
.dashboard-insight-main, .dashboard-insight-list { border: 1px solid rgba(221,207,212,.9); border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: 0 8px 22px rgba(52,36,43,.05); }
.dashboard-insight-main { padding: 21px 23px; background: radial-gradient(circle at 94% 8%, rgba(210,173,109,.14), transparent 35%), linear-gradient(135deg, rgba(255,255,255,.94), rgba(252,246,248,.78)); }
.insight-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.insight-heading h2 { margin:7px 0 4px; color:var(--modern-ink); font-size:1rem; letter-spacing:-.02em; }
.insight-heading p { margin:0; color:#8b7f86; font-size:.67rem; }
.insight-heading > strong { color:#713048; font-size:2rem; letter-spacing:-.06em; }
.completion-track { height:9px; margin:22px 0 12px; overflow:hidden; border-radius:999px; background:#eee5e8; }
.completion-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#713048,#d3af72); box-shadow:0 0 14px rgba(113,48,72,.26); }
.insight-foot { display:flex; justify-content:space-between; gap:10px; color:#91858c; font-size:.64rem; }
.insight-foot b { color:#5c4e56; }
.dashboard-insight-list { display:grid; padding:7px; background:rgba(255,255,255,.78); }
.insight-item { display:grid; grid-template-columns:11px 1fr auto; align-items:center; gap:10px; min-height:58px; padding:8px 10px; border-radius:12px; color:var(--modern-ink); text-decoration:none; transition:background .2s ease, transform .2s ease; }
.insight-item:hover { background:#fbf3f5; transform:translateX(-3px); }
.insight-item > span:nth-child(2) { display:grid; gap:3px; }
.insight-item b { font-size:.86rem; }
.insight-item small { color:#8d8388; font-size:.61rem; }
.insight-item > strong { color:#9a6475; }
.insight-dot { width:9px; height:9px; border-radius:50%; box-shadow:0 0 0 4px rgba(113,48,72,.07); }
.dot-gold { background:#c69e54; }.dot-blue { background:#6e8fc1; }.dot-wine { background:#9b4d68; }

.portal-entry, .login-v2-single {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at 12% 12%, rgba(210,173,109,.18), transparent 24%),
    radial-gradient(circle at 92% 82%, rgba(108,49,71,.14), transparent 28%),
    linear-gradient(135deg, #f7f2f3, #ebe5e8);
}
.portal-entry-shell {
  width: min(1120px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: rgba(255,255,255,.8);
  box-shadow: 0 35px 90px rgba(67,35,48,.18), 0 8px 18px rgba(67,35,48,.06);
  transform-style: preserve-3d;
}
.portal-entry-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 45px;
  color: #fff;
  background: radial-gradient(circle at 88% 8%, rgba(216,177,107,.22), transparent 32%), linear-gradient(148deg, #5e2438, #291827 78%);
}
.portal-entry-hero::after {
  content: "";
  position: absolute;
  inset: auto -18% -28% 10%;
  height: 330px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 0 -22px 0 rgba(255,255,255,.04), 0 -44px 0 rgba(255,255,255,.03);
}
.login-brand, .login-v2-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.login-brand img, .login-v2-brand img { width: 56px; height: 56px; object-fit: contain; padding: 4px; border-radius: 15px; background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,.12); }
.login-brand span { display: grid; gap: 4px; }
.login-brand b { letter-spacing: .15em; font-size: 1rem; }
.login-brand small { color: #dfcbd1; letter-spacing: .08em; font-size: .55rem; }
.login-kicker { color: var(--modern-gold); font-size: .64rem; font-weight: 800; letter-spacing: .16em; }
.portal-entry-copy { position: relative; z-index: 1; max-width: 410px; margin: auto 0; }
.portal-entry-copy h1 { margin: 18px 0 16px; font-size: clamp(2.8rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.06em; }
.portal-entry-copy h1 em { color: #e5c88f; font-family: Georgia, serif; font-weight: 400; }
.portal-entry-copy p { max-width: 360px; margin: 0; color: #eadde2; line-height: 1.8; font-size: .88rem; }
.portal-entry-school { position: relative; z-index: 1; display: grid; gap: 5px; max-width: 400px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
.portal-entry-school small { color: #dfb875; font-size: .56rem; font-weight: 800; letter-spacing: .14em; }
.portal-entry-school strong { font-size: .75rem; line-height: 1.55; }
.portal-entry-school span { color: #dac5cd; font-size: .68rem; }
.entry-orbit { position: absolute; border: 1px solid rgba(226,197,147,.16); border-radius: 50%; pointer-events: none; }
.entry-orbit-one { width: 390px; height: 390px; right: -185px; top: 70px; }
.entry-orbit-two { width: 530px; height: 530px; right: -260px; top: 2px; }
.portal-entry-choices { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 56px 54px 45px; background: rgba(255,255,255,.88); }
.entry-heading { margin-bottom: 29px; }
.entry-heading h2 { margin: 8px 0 5px; color: var(--modern-ink); font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.045em; }
.entry-heading p { margin: 0; color: #8a7f86; font-size: .78rem; }
.entry-choice-grid { display: grid; gap: 14px; }
.entry-choice { position: relative; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; min-height: 94px; padding: 18px; border: 1px solid #ece5e7; border-radius: 17px; color: var(--modern-ink); text-decoration: none; background: rgba(255,255,255,.86); box-shadow: 0 8px 20px rgba(62,35,47,.045); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.entry-choice:hover { transform: translateY(-4px) rotateX(1deg); border-color: #ddb7c2; box-shadow: 0 18px 28px rgba(62,35,47,.1); }
.entry-choice-admin { background: linear-gradient(130deg, #fff, #fff5f7); }
.entry-choice-student { background: linear-gradient(130deg, #fff, #f6f3ed); }
.entry-choice-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #f5e9ec; color: #783149; }
.entry-choice-student .entry-choice-icon { background: #f4eddd; color: #8c6831; }
.entry-choice-icon svg { width: 22px; height: 22px; }
.entry-choice b { display: block; font-size: .84rem; }
.entry-choice small { display: block; margin-top: 5px; color: #8e8389; font-size: .65rem; }
.entry-choice > strong { color: #9a6475; font-size: 1.2rem; transition: transform .2s ease; }
.entry-choice:hover > strong { transform: translateX(-3px); }
.entry-security, .login-switch { display: flex; align-items: center; gap: 9px; color: #8e848a; font-size: .65rem; }
.entry-security { margin-top: 30px; padding-top: 19px; border-top: 1px solid #eee8e9; }
.entry-security span, .login-v2-security span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #3d835c; font-weight: 800; background: #edf6ef; }
.entry-security p { margin: 0; }
.entry-copyright { position: absolute; bottom: 23px; margin: 0; color: #aaa0a5; font-size: .6rem; }

.login-v2-single .login-v2-shell { transform-style: preserve-3d; box-shadow: 0 35px 90px rgba(67,35,48,.18), 0 8px 18px rgba(67,35,48,.06); }
.login-v2-single .login-v2-panel { position: relative; z-index: 2; }
.login-v2-single .login-switch { justify-content: center; margin-top: 20px; padding-top: 17px; border-top: 1px solid #f0ebec; }
.login-v2-single .login-switch a { color: #783149; font-weight: 800; text-decoration: none; }
.login-v2-single .login-switch a:hover { text-decoration: underline; }
.login-v2-single .login-v2-info svg { width: 21px; height: 21px; }
.login-student-page .login-v2-intro { background: radial-gradient(circle at 105% 4%, rgba(214,186,122,.2), transparent 35%), linear-gradient(150deg,#4d3545,#241b29 75%); }

@media (max-width: 820px) {
  .portal-entry, .login-v2-single { padding: 14px; }
  .portal-entry-shell, .login-v2-single .login-v2-shell { grid-template-columns: 1fr; min-height: 0; }
  .portal-entry-hero, .login-v2-single .login-v2-intro { min-height: 360px; padding: 32px; }
  .portal-entry-copy { margin: auto 0 25px; }
  .portal-entry-copy h1 { font-size: 3rem; }
  .portal-entry-choices, .login-v2-single .login-v2-content { padding: 36px 27px 72px; }
  .entry-copyright, .login-v2-single .login-v2-copyright { position: static; margin-top: 30px; align-self: center; }
  .dashboard-insights { grid-template-columns:1fr; }
}
@media (max-width: 600px) {
  .portal-entry, .login-v2-single { display: block; padding: 0; }
  .portal-entry-shell, .login-v2-single .login-v2-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .portal-entry-hero, .login-v2-single .login-v2-intro { min-height: 320px; border-radius: 0; padding: 27px 22px; }
  .login-v2-single .login-v2-intro { display:flex; }
  .portal-entry-copy h1 { font-size: 2.65rem; }
  .portal-entry-choices, .login-v2-single .login-v2-content { min-height: calc(100vh - 320px); padding: 31px 20px 48px; }
  .entry-choice { grid-template-columns: 42px 1fr auto; min-height: 82px; padding: 14px; gap: 10px; }
  .entry-choice-icon { width: 42px; height: 42px; }
  .entry-choice b { font-size: .78rem; }
  .entry-choice small { font-size: .59rem; }
  .dashboard-insight-main { padding:17px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .content-card, .stat-card, .quick-action-card, .entry-choice { transition: none; }
  .content-card:hover, .stat-card:hover, .quick-action-card:hover, .entry-choice:hover { transform: none; }
}
