:root {
  --ink: #0a2330;
  --muted: #52717b;
  --soft: #e9f8f7;
  --line: rgba(59, 186, 183, .26);
  --tiffany: #3bbab7;
  --tiffany-dark: #158f91;
  --tiffany-deep: #087076;
  --navy: #092735;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(24, 102, 110, .16);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #f8ffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

#matrixCanvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: .25;
}
.ambient {
  position: fixed;
  z-index: -2;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(5px);
  pointer-events: none;
}
.ambient-one { top: -210px; right: -100px; background: radial-gradient(circle, rgba(59, 186, 183, .2), transparent 66%); }
.ambient-two { bottom: -260px; left: -140px; background: radial-gradient(circle, rgba(85, 210, 204, .18), transparent 68%); }

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }
.screen-login.active { display: grid; place-items: center; padding: 36px; }

.login-layout {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 440px);
  gap: 88px;
  align-items: center;
}
.brand-lockup { display: flex; gap: 14px; align-items: center; }
.brand-lockup.compact { gap: 11px; }
.ucf-mark, .mini-mark {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(140deg, var(--tiffany), var(--tiffany-deep));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 14px 28px rgba(31, 153, 155, .26);
  font-weight: 900;
  letter-spacing: .08em;
}
.ucf-mark { width: 58px; height: 58px; border-radius: 16px; font-size: 14px; }
.compact .ucf-mark { width: 49px; height: 49px; border-radius: 14px; font-size: 12px; }
.mini-mark { width: 52px; height: 52px; margin-top: 28px; border-radius: 15px; }
.eyebrow {
  margin: 0 0 7px;
  color: var(--tiffany-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; letter-spacing: -.04em; }
.intro-copy { max-width: 680px; margin-top: 98px; }
.intro-copy h2 { margin-bottom: 18px; font-size: clamp(46px, 5vw, 72px); line-height: 1.02; letter-spacing: -.07em; }
.intro-copy p:not(.eyebrow) { max-width: 630px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.system-line, .signed-in, .session-pill {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--tiffany-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.system-line { margin-top: 26px; }
.pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tiffany);
  box-shadow: 0 0 0 0 rgba(59, 186, 183, .56);
  animation: pulse 1.7s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(59, 186, 183, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 186, 183, 0); } }

.glass-card {
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 25px;
  padding: 24px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.card-topline, .login-foot {
  display: flex;
  justify-content: space-between;
  color: var(--tiffany-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .19em;
}
.login-card h2 { margin: 19px 0 8px; font-size: 30px; letter-spacing: -.05em; }
.card-copy { margin-bottom: 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
label { display: grid; gap: 8px; margin: 15px 0; }
label span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(46, 153, 157, .22);
  border-radius: 12px;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(246, 255, 255, .84);
  transition: .18s;
}
select {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(46, 153, 157, .22);
  border-radius: 12px;
  outline: none;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(246, 255, 255, .84);
}
input:focus { border-color: var(--tiffany); box-shadow: 0 0 0 4px rgba(59, 186, 183, .12); }
.primary-btn, .secondary-btn, .text-btn {
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  transition: .18s;
}
.primary-btn {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--tiffany), var(--tiffany-deep));
  box-shadow: 0 13px 26px rgba(25, 139, 143, .22);
}
.login-card .primary-btn { width: 100%; margin-top: 10px; }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 17px 30px rgba(25, 139, 143, .28); }
.secondary-btn { min-height: 47px; padding: 0 16px; color: var(--tiffany-deep); background: #ecfbfa; border: 1px solid var(--line); }
.secondary-btn:hover { background: #ddf7f5; }
.text-btn { padding: 10px 12px; color: var(--tiffany-deep); background: rgba(59, 186, 183, .1); }
.form-error { min-height: 18px; margin: 12px 0 0; color: #b64141; font-size: 13px; font-weight: 700; }
.login-foot { justify-content: flex-start; gap: 8px; margin-top: 23px; color: var(--muted); letter-spacing: .1em; }
.shield-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--tiffany); }

.screen-disclaimer.active { display: block; padding: 32px 22px 48px; }
.disclaimer-shell { width: min(1120px, 100%); margin: auto; }
.disclaimer-header, .portal-header, .dashboard-hero, .portal-actions, .disclaimer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.session-pill { padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .78); }
.warning-card, .gps-panel, .security-tile {
  border: 1px solid rgba(46, 153, 157, .19);
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.warning-card { margin: 38px 0 16px; border-radius: 18px; padding: 24px; }
.warning-card h2 { margin-bottom: 10px; font-size: 27px; letter-spacing: -.04em; }
.warning-card p:not(.eyebrow) { margin-bottom: 9px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.security-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.security-tile { min-height: 122px; border-radius: 16px; padding: 16px; }
.security-tile span { color: var(--tiffany-dark); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.security-tile small { display: block; margin: 20px 0 6px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.security-tile strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gps-panel { display: grid; grid-template-columns: minmax(330px, .95fr) minmax(400px, 1.05fr); overflow: hidden; border-radius: 19px; }
.gps-map { position: relative; min-height: 310px; overflow: hidden; background: linear-gradient(140deg, #dff9f7, #f9ffff); }
.radar-grid { position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 30px 30px; }
.radar-ring { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(21, 143, 145, .28); border-radius: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 90px; height: 90px; }
.ring-two { width: 180px; height: 180px; }
.ring-three { width: 270px; height: 270px; }
.radar-center { position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; border: 3px solid white; border-radius: 50%; background: var(--tiffany); box-shadow: 0 0 0 12px rgba(59, 186, 183, .18); transform: translate(-50%, -50%); }
.radar-scan { position: absolute; top: 50%; left: 50%; width: 136px; height: 1px; background: linear-gradient(90deg, var(--tiffany), transparent); transform-origin: left center; animation: scan 4s linear infinite; }
@keyframes scan { to { transform: rotate(360deg); } }
.gps-caption { position: absolute; right: 18px; bottom: 17px; left: 18px; display: flex; gap: 10px; align-items: center; padding: 13px; border: 1px solid rgba(255, 255, 255, .84); border-radius: 12px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(8px); }
.gps-caption strong, .gps-caption small { display: block; }
.gps-caption strong { color: var(--tiffany-deep); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.gps-caption small { margin-top: 3px; color: var(--muted); }
.gps-details { padding: 21px; }
.panel-heading { display: flex; justify-content: space-between; gap: 10px; color: var(--tiffany-deep); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.panel-heading b { color: #259176; }
dl { margin: 17px 0; }
dl div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid rgba(46, 153, 157, .14); font-size: 13px; }
dt { color: var(--muted); font-weight: 800; }
dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 800; }
.gps-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.disclaimer-actions { flex-wrap: wrap; margin-top: 18px; }
.disclaimer-actions p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; }

.screen-dashboard.active { display: block; }
.portal-header { padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .78); backdrop-filter: blur(20px); }
.portal-actions { justify-content: flex-end; }
.signed-in { font-size: 10px; }
.signed-in b { padding: 5px 7px; border-radius: 999px; color: var(--tiffany-deep); background: var(--soft); font-size: 9px; letter-spacing: .1em; }
.dashboard-main { width: min(1240px, calc(100% - 36px)); margin: auto; padding: 56px 0 25px; }
.dashboard-hero { margin-bottom: 27px; }
.dashboard-hero h2 { margin-bottom: 10px; font-size: clamp(35px, 4vw, 56px); letter-spacing: -.065em; }
.dashboard-hero p:not(.eyebrow) { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.7; }
.hero-stat { display: grid; justify-items: end; }
.hero-stat strong { color: var(--tiffany-dark); font-size: 72px; letter-spacing: -.1em; line-height: 1; }
.hero-stat span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.app-tile {
  position: relative;
  display: flex;
  min-height: 238px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(46, 153, 157, .2);
  border-radius: 18px;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 40px rgba(24, 102, 110, .1);
  text-align: left;
  backdrop-filter: blur(16px);
  transition: .2s ease;
}
.app-tile::after { position: absolute; right: -48px; bottom: -62px; width: 150px; height: 150px; border-radius: 50%; background: rgba(59, 186, 183, .09); content: ""; transition: .2s; }
.app-tile:hover { transform: translateY(-5px); border-color: rgba(21, 143, 145, .5); box-shadow: 0 22px 45px rgba(24, 102, 110, .16); }
.app-tile:hover::after { transform: scale(1.25); }
.tile-top, .tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-number, .modal-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--tiffany), var(--tiffany-deep)); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.tile-state { color: var(--tiffany-deep); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.app-tile h3 { margin: 30px 0 8px; font-size: 21px; letter-spacing: -.045em; }
.app-tile p { flex: 1; margin-bottom: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tile-foot { color: var(--tiffany-dark); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding: 18px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: none; place-items: center; padding: 20px; background: rgba(6, 34, 44, .4); backdrop-filter: blur(8px); }
.modal-backdrop.active { display: grid; }
.app-modal { position: relative; width: min(470px, 100%); border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px; padding: 24px; background: white; box-shadow: 0 28px 75px rgba(6, 72, 79, .24); }
.modal-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #f6ffff; font-weight: 900; }
.app-modal .eyebrow { margin-top: 20px; }
.app-modal h2 { margin-bottom: 9px; font-size: 30px; letter-spacing: -.05em; }
.app-modal p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.6; }
.modal-status { display: flex; gap: 10px; align-items: center; margin: 18px 0; border: 1px solid var(--line); border-radius: 11px; padding: 12px; color: var(--tiffany-deep); background: var(--soft); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.modal-note { margin-bottom: 18px; }
.settings-modal { position: relative; width: min(760px, 100%); max-height: min(780px, calc(100vh - 36px)); overflow: auto; border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px; padding: 24px; background: white; box-shadow: 0 28px 75px rgba(6, 72, 79, .24); }
.settings-modal h2 { margin-bottom: 8px; font-size: 30px; letter-spacing: -.05em; }
.settings-copy, .settings-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-form { display: grid; grid-template-columns: 1fr 1fr 155px; gap: 12px; align-items: end; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #f8ffff; }
.account-form label { margin: 0; }
.account-form .primary-btn { grid-column: 1 / -1; }
.role-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 20px; }
.role-guide article { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.role-guide strong, .role-guide span { display: block; }
.role-guide strong { color: var(--tiffany-deep); font-size: 13px; }
.role-guide span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.settings-heading, .account-row, .account-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings-heading h3 { margin: 0; font-size: 17px; }
.settings-heading span { color: var(--muted); font-size: 12px; font-weight: 800; }
.account-list { display: grid; gap: 9px; margin: 11px 0; }
.account-row { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.account-row strong, .account-row span { display: block; }
.account-row span { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.account-actions button { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--tiffany-deep); background: var(--soft); font-size: 11px; font-weight: 900; }
.account-actions .danger { color: #a53838; background: #fff4f4; border-color: #f1cccc; }
.empty-accounts { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; gap: 34px; }
  .intro-copy { margin-top: 70px; }
  .intro-copy h2 { font-size: 52px; }
  .login-card { width: min(500px, 100%); }
  .gps-panel { grid-template-columns: 1fr; }
  .security-grid, .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .screen-login.active { padding: 20px; }
  .intro-copy { margin-top: 56px; }
  .intro-copy h2 { font-size: 42px; }
  .screen-disclaimer.active { padding: 20px 14px 36px; }
  .disclaimer-header, .portal-header, .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .portal-header { padding: 14px; }
  .portal-actions { width: 100%; justify-content: space-between; }
  .security-grid, .apps-grid { grid-template-columns: 1fr; }
  .dashboard-main { width: min(100% - 28px, 620px); padding-top: 36px; }
  .hero-stat { justify-items: start; }
  .dashboard-footer { flex-direction: column; }
  .account-form, .role-guide { grid-template-columns: 1fr; }
}
