:root {
  --navy: #004782;
  --sky: #0678bc;
  --deep: #002d57;
  --grey: #4b555f;
  --yellow: #ffd14d;
  --green: #21ae88;
  --ink: #07182b;
  --ink-2: #0a223c;
  --surface: rgba(15, 42, 69, 0.78);
  --surface-solid: #0f2a45;
  --line: rgba(156, 196, 228, 0.18);
  --text: #f5f9fc;
  --muted: #aab9c8;
  --font: "Century Gothic", "Avenir Next", Montserrat, Arial, sans-serif;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 18, 38, 0.38);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 65% -10%, rgba(6, 120, 188, 0.22), transparent 36%),
    linear-gradient(140deg, #061524 0%, #081d33 52%, #061525 100%);
  overflow-x: hidden;
}

a { color: inherit; }
button, input { font: inherit; }

.ambient {
  position: fixed;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(6, 120, 188, 0.1);
  transform: rotate(45deg);
  pointer-events: none;
}

.ambient--one { top: -260px; right: -100px; }
.ambient--two { bottom: -330px; left: -180px; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand__lockup {
  width: 164px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.brand__lockup img {
  width: 100%;
  height: auto;
  display: block;
}

.brand__product {
  margin-top: 1px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .34em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(.17em);
}

.main { display: flex; align-items: center; padding: 58px 0; }
.footer { min-height: 74px; display: flex; align-items: center; justify-content: center; }
.footer img { width: 98px; height: auto; opacity: .72; }

.login-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(370px, 0.7fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.login-layout--compact {
  width: min(460px, 100%);
  margin: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 16px;
  color: #7fc2ea;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro h1, .dashboard-head h1, .app-auth h1, .error-page h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.intro h1 span { color: #74bce6; }
.intro__copy { max-width: 560px; margin: 28px 0; color: var(--muted); font-size: 17px; line-height: 1.75; }

.trust-line {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c5d1dc;
  font-size: 13px;
}

.trust-line__icon, .mini-lock, .lock {
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.trust-line__icon { width: 14px; height: 12px; color: var(--green); }
.trust-line__icon::before, .mini-lock::before, .lock::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% - 1px);
  width: 60%;
  height: 55%;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  transform: translateX(-50%);
}

.login-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(19, 52, 83, 0.92), rgba(8, 29, 50, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card__head { display: flex; gap: 17px; align-items: center; }
.login-card__head .eyebrow { margin-bottom: 6px; }
.login-card h2 { margin: 0; font-size: 25px; letter-spacing: -0.025em; }
.lock { width: 29px; height: 25px; color: #7fc2ea; border-width: 2px; }
.muted { color: var(--muted); line-height: 1.6; }
.login-card > .muted { margin: 24px 0; font-size: 14px; }

.form { display: grid; gap: 13px; }
.form label { color: #dbe7f1; font-size: 13px; font-weight: 700; }

.form input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: #fff;
  border: 1px solid rgba(154, 197, 230, 0.27);
  border-radius: 10px;
  outline: none;
  background: rgba(3, 20, 37, 0.58);
  transition: border-color .18s, box-shadow .18s;
}

.form input:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(6, 120, 188, 0.18); }

.form button, .button-link {
  min-height: 52px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: var(--sky);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

.form button:hover, .button-link:hover { background: #1488ca; transform: translateY(-1px); }
.form button:disabled, .form input:disabled { cursor: not-allowed; opacity: .55; }
.alert { margin: 18px 0; padding: 12px 14px; color: #ffd6d4; border: 1px solid rgba(237, 107, 104, .42); border-radius: 9px; background: rgba(237, 107, 104, .12); font-size: 13px; }

.dashboard-head {
  width: 100%;
  margin-bottom: 35px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.dashboard { width: 100%; }
.dashboard-head h1 { font-size: clamp(42px, 5vw, 64px); }
.dashboard-head .muted { margin-bottom: 0; }
.session-note { display: flex; align-items: center; gap: 9px; color: #94aabd; font-size: 12px; }
.session-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(33, 174, 136, .12); }

.ghost-button {
  padding: 10px 14px;
  color: #b8c7d5;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.ghost-button:hover { color: #fff; border-color: rgba(156, 196, 228, .36); }
.app-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.app-tile {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  background: var(--surface-solid);
  box-shadow: 0 18px 45px rgba(0, 16, 32, .22);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}

a.app-tile:hover { transform: translateY(-4px); border-color: rgba(127, 194, 234, .44); box-shadow: 0 26px 60px rgba(0, 16, 32, .38); }
.app-tile > img { position: absolute; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
a.app-tile:hover > img { transform: scale(1.035); }
.app-tile__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 20, 35, .98) 10%, rgba(4, 20, 35, .42) 62%, rgba(4, 20, 35, .18)); }
.app-tile__content { position: relative; z-index: 1; height: 100%; padding: 25px; display: flex; flex-direction: column; justify-content: space-between; }
.app-tile__top { display: flex; align-items: center; justify-content: space-between; }
.app-status, .protected { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; background: rgba(4, 20, 35, .53); font-size: 11px; backdrop-filter: blur(9px); }
.app-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.mini-lock { width: 10px; height: 9px; color: #bcd4e7; border-width: 1px; }
.mini-lock::before { border-width: 1px; }
.app-tile__kicker { margin: 0 0 9px; color: #7fc2ea; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.app-tile__brand { width: min(122px, 38%); height: auto; margin: 0 0 16px; display: block; }
.app-tile h2 { margin: 0 0 10px; font-size: 29px; letter-spacing: -.03em; }
.app-tile p:not(.app-tile__kicker) { max-width: 490px; margin: 0; color: #b9c8d5; font-size: 13px; line-height: 1.55; }
.open-link { display: inline-flex; gap: 10px; align-items: center; margin-top: 22px; color: #fff; font-size: 13px; font-weight: 700; }
.open-link b { color: #7fc2ea; font-size: 17px; }

.app-tile--future { border-style: dashed; background: rgba(10, 34, 60, .46); }
.app-tile--future .app-tile__content { align-items: flex-start; justify-content: center; }
.plus { width: 44px; height: 44px; margin-bottom: 56px; display: grid; place-items: center; border: 1px solid rgba(127, 194, 234, .28); border-radius: 50%; color: #7fc2ea; font-size: 25px; }

.app-auth { width: min(760px, 100%); margin: auto; }
.back-link { display: inline-block; margin-bottom: 18px; color: #aebfcd; font-size: 13px; text-decoration: none; }
.back-link:hover { color: #fff; }
.login-card--application { padding: 0; overflow: hidden; }
.app-auth__preview { position: relative; height: 190px; overflow: hidden; }
.app-auth__preview img { width: 100%; height: 100%; object-fit: cover; }
.app-auth__preview div { position: absolute; inset: 0; background: linear-gradient(to top, var(--surface-solid), transparent); }
.app-auth__preview .app-auth__brand {
  position: absolute;
  left: 32px;
  bottom: 24px;
  width: 124px;
  height: auto;
  object-fit: contain;
}
.login-card__body { padding: 32px; }
.app-auth h1 { font-size: 28px; letter-spacing: -.03em; }
.error-page { width: 100%; text-align: center; }
.error-page__code { margin: 0; color: #7fc2ea; font-size: 15px; font-weight: 700; letter-spacing: .15em; }
.error-page .button-link { min-width: 190px; margin-top: 18px; padding: 0 20px; }

@media (max-width: 860px) {
  .shell { width: min(100% - 30px, 700px); }
  .main { padding: 40px 0; }
  .login-layout { grid-template-columns: 1fr; gap: 38px; }
  .intro h1 { font-size: 46px; }
  .app-grid { grid-template-columns: 1fr; }
  .dashboard-head { align-items: start; gap: 24px; flex-direction: column; }
}

@media (max-width: 520px) {
  .topbar { min-height: 94px; }
  .brand__lockup { width: 138px; }
  .brand__product { font-size: 10px; }
  .intro h1 { font-size: 38px; }
  .login-card { padding: 24px; }
  .app-tile { min-height: 330px; }
  .footer { min-height: 58px; }
  .session-note { line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
