@font-face {
  font-family: Saira;
  src: url("/static/brand/saira.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font: 16px/1.55 Saira, system-ui, sans-serif;
  color: #15354e;
  background: #f3f6f8;
  --navy: #003462;
  --deep: #052b4c;
  --teal: #05766f;
  --muted: #486478;
  --border: #dce6ed;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--navy); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #078780;
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 700; letter-spacing: -.045em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.25rem; }
p { color: var(--muted); }
svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.login-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.04fr 1fr;
}
.brand-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 4rem;
  padding: clamp(2.5rem, 6vw, 6rem);
  background: radial-gradient(ellipse at 100% 108%, #087e80, transparent 48%), linear-gradient(135deg,#05416e,var(--deep) 64%);
  color: white;
}
.brand-side::before, .brand-side::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 62%;
  top: 38%;
  width: 44rem;
  height: 44rem;
  border: 1px solid #4ca9ae70;
  border-radius: 50%;
}
.brand-side::after { width: 51rem; height: 51rem; left: 58%; top: 32%; }
.brand-side img { width: min(12rem, 80%); }
.brand-side h1 { color: #fff; font-size: clamp(2.5rem, 5.2vw, 5.5rem); margin: .55rem 0 1rem; }
.brand-side h1 span { color: #80e5da; }
.brand-side p { color: #d3e8f2; max-width: 30rem; font-size: 1.05rem; }
.brand-side .kicker { color: #9ae8e1; font-weight: 650; font-size: .9rem; text-transform: uppercase; letter-spacing: .095em; }
.login-side { display: grid; place-items: center; padding: clamp(1rem, 5vw, 4rem); }
.login-panel { width: min(100%, 29rem); padding: clamp(1.5rem, 4vw, 2.8rem); background: white; border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: 0 1.4rem 4rem #0d365416; }
.login-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 1.2rem 0 .45rem; }
.fields { display: grid; gap: .9rem; margin-top: 1.2rem; }
.fields label { display: grid; gap: .25rem; color: #21445e; font-weight: 600; }
.fields small { color: var(--muted); font-size: .875rem; font-weight: 400; }
.fields input, .fields select { width: 100%; min-height: 2.8rem; padding: .5rem .75rem; border: 1px solid #b9cbd7; border-radius: .5rem; color: var(--deep); background: #fff; }
.button { min-height: 2.8rem; display: inline-flex; justify-content: center; align-items: center; padding: .55rem 1rem; border: 1px solid transparent; border-radius: .55rem; font-weight: 650; text-decoration: none; background: var(--navy); color: white; }
.button:hover { background: #0d5483; }
.alert { padding: .7rem .9rem; margin-top: .65rem; background: #fff0ed; border: 1px solid #f3c9c1; border-radius: .5rem; color: #902b25; }
.tile { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: .8rem; background: #def3f1; color: #047771; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.8rem; padding: .7rem max(1.15rem, calc((100vw - 72rem) / 2)); color: white; background: var(--deep); }
.brand, .account { display: flex; align-items: center; gap: .9rem; }
.brand { color: white; font-weight: 600; text-decoration: none; }
.brand img { width: 7rem; }
.brand span { border-left: 1px solid #d3e8f250; padding-left: .9rem; }
.avatar { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; background: #165175; font-weight: 650; flex: none; }
.account-name { display: grid; line-height: 1.25; }
.account-name span { color: #d3e8f2; font-size: .875rem; }
.quiet { padding: .35rem .7rem; border: 1px solid #6590a7; border-radius: .45rem; background: transparent; color: white; }
.quiet:hover { background: #165175; }
.nav { display: flex; gap: 1.35rem; padding: 0 max(1.15rem, calc((100vw - 72rem) / 2)); align-items: center; background: white; border-bottom: 1px solid var(--border); }
.nav a { display: block; text-decoration: none; padding: .8rem 0 .65rem; border-bottom: .2rem solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--teal); border-color: var(--teal); }
.nav-end { margin-left: auto; }
.workspace { max-width: 74.3rem; margin: 0 auto; padding: clamp(1.65rem, 5vw, 3.5rem) 1.15rem 4rem; }
.intro { margin-bottom: clamp(1.4rem, 4vw, 2.5rem); }
.intro p { margin-top: .3rem; font-size: 1.1rem; }
.panel { padding: clamp(1.15rem, 3vw, 1.85rem); background: #fff; border: 1px solid var(--border); border-radius: .95rem; }
.panel h2 + p { margin-top: .6rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 18rem),25rem)); gap: 1rem; margin-top: 1.1rem; }
.resource { display: grid; align-content: start; justify-items: start; gap: .9rem; padding: 1.2rem; border: 1px solid #d9e9eb; border-radius: .75rem; background: #f7fafb; }
.resource p { margin-top: .25rem; }
.empty { margin-top: 1rem; padding: 1.4rem; background: #f3f7f9; border-radius: .65rem; }
.table-scroll { overflow: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #edf5f7; color: var(--navy); font-weight: 650; }
.admin-grid { display: grid; align-items: start; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 1rem 0; }
.narrow { max-width: 34rem; }
.text-button { padding: 0; border: 0; color: var(--navy); background: transparent; text-decoration: underline; }

@media (max-width: 700px) {
  .login-layout, .admin-grid { grid-template-columns: 1fr; }
  .brand-side { gap: 1.65rem; padding: 1.5rem 1.4rem 2rem; }
  .brand-side img { width: 8rem; }
  .brand-side h1 { font-size: 2.4rem; }
  .login-side { align-items: start; padding-top: 1.2rem; }
  .brand span, .account-name, .avatar { display: none; }
  .brand img { width: 6.2rem; }
  .nav { gap: 1rem; overflow: auto; white-space: nowrap; }
}
