:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #f3f7ff;
  background: #061329;
  --muted: #bacbef;
  --border: #244877;
  --strong-border: #4385d5;
  --panel: linear-gradient(150deg, #142744, #0a2044 90%);
  --blue: #0c70f2;
  --cyan: #71c4ff;
  --radius: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  background:
    radial-gradient(ellipse at 83% 4%, #0c2b61 0, transparent 38%),
    radial-gradient(ellipse at 60% 100%, #091d44 0, transparent 58%),
    #060f21;
  isolation: isolate;
}

body::before {
  position: fixed;
  z-index: -1;
  top: 68px;
  right: -320px;
  width: 570px;
  height: 450px;
  border: 1px solid #1376f3;
  border-radius: 50%;
  box-shadow: -14px -11px 48px #0058e08c, inset 12px 6px 28px #003a8d70;
  background: radial-gradient(ellipse at top left, #0a2f64, transparent 60%);
  transform: rotate(-48deg);
  mask-image: linear-gradient(#000 45%, transparent 95%);
  pointer-events: none;
  content: "";
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid #86d5ff; outline-offset: 3px; }

aside {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100dvh;
  padding: 29px 17px 24px;
  border-right: 1px solid #1e3d63;
  background:
    radial-gradient(ellipse at 5% 90%, #0a2c62 0, transparent 35%),
    linear-gradient(150deg, #081527, #071b39);
  overflow: hidden;
  isolation: isolate;
}

aside::after {
  position: absolute;
  z-index: -1;
  left: -130px;
  bottom: -140px;
  width: 440px;
  height: 275px;
  border-top: 1px solid #1684fa;
  border-radius: 50%;
  box-shadow: 0 -12px 48px #0569f3a0;
  transform: rotate(-49deg);
  pointer-events: none;
  content: "";
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 27px;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.03em;
  line-height: 1.03;
}

.brand b {
  display: grid;
  flex: 0 0 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #75cbff;
  border-radius: 11px;
  box-shadow: 0 3px 18px #0073ff77;
  background: linear-gradient(145deg, #218dfd, #0045d0);
  font-size: 21px;
}

nav { display: grid; gap: 5px; }

nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d8e6ff;
  font-size: 14px;
  font-weight: 600;
}

nav a:hover { background: #14325a; }

nav a[aria-current="page"] {
  background: linear-gradient(100deg, #064098, #0758e2);
  border-color: #3789f4;
  box-shadow: 0 2px 17px #005baf66, inset 0 1px #7abaff4d;
  color: white;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 20px;
  place-items: center;
  color: #c6e6ff;
  font-size: 20px;
  line-height: 1;
}

main { width: 100%; min-width: 0; padding: 34px clamp(25px, 3.35vw, 54px) 44px; }
h1, h2, h3 { letter-spacing: -.025em; }
h1 { margin: 0 0 18px; font-size: clamp(29px, 3vw, 40px); line-height: 1.12; }
h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.22; }
h3 { margin: 0 0 8px; font-size: 18px; }
p, li, small { color: var(--muted); line-height: 1.5; }
p { margin: 0 0 14px; }
p:empty { display: none; }
article p:last-child { margin-bottom: 0; }

article, .panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 1px #8ac4fd13, 0 11px 26px #020a1973;
}

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 8px 16px;
  border: 1px solid #369bf7;
  border-radius: 9px;
  background: linear-gradient(180deg, #0b9afb, #063fdf);
  box-shadow: inset 0 1px #b5ecff5e, 0 3px 13px #0069ff30;
  color: #fff;
  text-align: center;
  font-weight: 720;
  cursor: pointer;
}

.button:hover, button:hover { filter: brightness(1.15); }
button:disabled { opacity: .58; cursor: wait; filter: none; }
.light { background: linear-gradient(#f4fcff, #b4dafa); border-color: #b8e6ff; color: #052c67; }
.secondary { background: linear-gradient(#18365f, #11284a); border-color: #3b6191; box-shadow: inset 0 1px #8dbdf729; }
.text-link { color: #91ccff; text-decoration: underline; text-underline-offset: 3px; }

input, select {
  min-width: 0;
  max-width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #49678d;
  border-radius: 8px;
  background: #0e2544;
  color: #f2f7ff;
}

input::placeholder { color: #91aac8; }
input[type="file"] { min-height: auto; }
label { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }

.account-form { display: grid; gap: 12px; justify-items: start; }
.account-form label { display: grid; gap: 6px; width: min(100%, 386px); font-size: 13px; font-weight: 650; }
.account-form input { width: 100%; }
.form-dates { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); width: 100%; }
.form-dates label { width: 100%; }

[role="status"] { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-spacing: 0; text-align: left; }
th, td { padding: 12px 13px; }
th { border-bottom: 1px solid #42618a; color: #e7efff; font-size: 13px; }
td { overflow-wrap: anywhere; }

dl { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 10px 15px; padding: 14px 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }

.feature-panel {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 29%);
  gap: 18px;
  padding: clamp(19px, 3vw, 35px);
  overflow: hidden;
  border: 1px solid #366bb1;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 88% 10%, #118af9c9, transparent 45%),
    linear-gradient(118deg, #0a2350 14%, #0b3b91 65%, #073d9c);
  box-shadow: inset 0 1px #87bfff46, 0 10px 25px #0013387a;
  isolation: isolate;
}

.feature-panel::before, .feature-panel::after {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -54%;
  width: 72%;
  height: 106%;
  border-radius: 50%;
  border-top: 1px solid #29a5ff;
  box-shadow: 0 -8px 25px #007cfcaa, inset 0 14px 32px #005bff79;
  transform: rotate(-19deg);
  pointer-events: none;
  content: "";
}

.feature-panel::after { right: -23%; bottom: -18%; opacity: .64; }
.feature-panel p { max-width: 54ch; }
.feature-panel > * { min-width: 0; }

.art {
  display: block;
  justify-self: center;
  width: min(100%, var(--art-width, 204px));
  aspect-ratio: 1;
  background: url("/images/eln-illustrations.webp") var(--asset-position, 0 0) / 200% 200% no-repeat;
  filter: drop-shadow(0 8px 12px #0016378c);
  pointer-events: none;
}

.art-document { --asset-position: 0 0; }
.art-account { --asset-position: 100% 0; }
.art-history { --asset-position: 0 100%; }
.art-medical { --asset-position: 100% 100%; }

.icon-tile {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid #4287cc;
  border-radius: 11px;
  color: #8dddff;
  background: linear-gradient(145deg, #195597, #102e57);
  box-shadow: inset 0 1px #75cdff48, 0 3px 12px #070f2788;
  font-size: 25px;
  line-height: 1;
}

@media (max-width: 1000px) {
  body { grid-template-columns: 185px minmax(0, 1fr); }
  aside { padding-inline: 12px; }
}

@media (max-width: 680px) {
  body { display: block; }
  body::before { top: 160px; right: -390px; }
  aside {
    position: static;
    min-height: 0;
    padding: 12px 17px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow: visible;
    isolation: auto;
  }
  aside::after { display: none; }
  .brand { margin: 0; font-size: 17px; }
  .brand b { height: 32px; flex-basis: 32px; }
  .brand br { display: none; }
  nav {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 3px;
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid #264979;
    background: #081b37;
  }
  nav a {
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: clamp(9px, 2.7vw, 12px);
    text-align: center;
  }
  .nav-icon { flex-basis: auto; font-size: 17px; }
  main { padding: 22px 14px calc(86px + env(safe-area-inset-bottom)); }
  h1 { margin-bottom: 15px; }
  article, .panel { padding: 16px; }
  .feature-panel { grid-template-columns: minmax(0, 1fr) minmax(82px, 29%); gap: 6px; }
}

@media (max-width: 360px) {
  .feature-panel { grid-template-columns: minmax(0, 1fr) minmax(62px, 26%); padding: 15px; }
  .button, button { padding-inline: 11px; }
}

@media print {
  :root { --muted: #333; color-scheme: light; }
  body, article, .panel { color: #161616; background: white; box-shadow: none; }
  body { display: block; }
  body::before, aside, .actions, #save-message { display: none !important; }
  main { padding: 0; }
  article, .panel { border-color: #aaa; }
  th { color: #161616; }
}
