@font-face {
  font-family: "Ubuntu Sans";
  src: url("/fonts/UbuntuSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu Sans";
  src: url("/fonts/UbuntuSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu Sans";
  src: url("/fonts/UbuntuSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu Sans";
  src: url("/fonts/UbuntuSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --portal-grid-width: 64rem;
  --portal-grid-gutter: clamp(.875rem, 2.2cqw, 1.5rem);
  --portal-grid-gap: 1.25rem;
  color-scheme: light;
  font-family: "Ubuntu Sans", sans-serif;
  background: #f8f5ed;
  color: #193b43;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 0; min-height: 100dvh; margin: 0; }
a { color: #14635d; }
button, input { font: inherit; }

.login-page main {
  min-height: 100dvh;
  display: grid;
  align-items: safe center;
  justify-items: center;
  padding: clamp(1.25rem, 6vw, 5rem);
}

.login-card {
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 6vw, 3rem);
  border: 1px solid #dedfd5;
  border-radius: 1.5rem;
  background: #fffefa;
  box-shadow: 0 1.125rem 2.75rem #243a2e12;
}

h1 { margin: 0 0 1.5rem; font-size: clamp(1.875rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -.035em; }
.login-card form { display: grid; }
label { margin-bottom: .45rem; font-weight: 600; }
input {
  width: 100%;
  min-height: 3rem;
  margin-bottom: 1.15rem;
  padding: .7rem .85rem;
  border: 1px solid #a0ada8;
  border-radius: .65rem;
  background: #fff;
  color: inherit;
}

button { cursor: pointer; }
.primary { min-height: 3rem; margin-top: .35rem; border: 0; border-radius: .65rem; background: #14635d; color: #fff; font-weight: 700; }
.primary:hover { background: #104e49; }
.quiet { padding: .6rem .85rem; border: 1px solid #9aada6; border-radius: .65rem; background: transparent; color: inherit; }
:is(button, a, input):focus-visible { outline: 3px solid #176c83; outline-offset: 3px; }
.error { margin: 0 0 1.2rem; padding: .75rem; border: 1px solid #dbaba5; border-radius: .65rem; background: #fff0ed; color: #842f29; }

.page-content { max-width: 58rem; margin: 0 auto; padding: clamp(1.5rem, 6vw, 4rem) 1.25rem; }
.back { display: inline-block; margin-bottom: 1.1rem; }
.house-list { display: grid; gap: .75rem; max-width: 35rem; margin: 0; padding: 0; list-style: none; }
.house-list a { display: flex; justify-content: space-between; padding: 1.075rem 1.25rem; border: 1px solid #dedfd5; border-radius: .8rem; background: #fffefa; font-weight: 600; }

.login-card {
  width: min(100%, 62rem);
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr);
  padding: 0;
  overflow: hidden;
}
.login-brand {
  display: grid;
  place-content: center;
  background: #e0e8e4;
  color: #193b43;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.06em;
}
.login-card .login-form { padding: clamp(1.5rem, 5vw, 4rem); }
.login-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .25rem 0 1.25rem; }
.login-actions button { min-height: 3rem; margin: 0; padding-inline: 1.25rem; }
.remember { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.remember input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: #14635d; }
.ip, .context { color: #4d625f; }
.ip { margin: .7rem 0 0; font-size: .85rem; }
.password-card { width: min(100%, 34rem); grid-template-columns: 1fr; }
.password-card .back { margin: 1rem 0 0; }

.portal-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); min-height: 100dvh; }
.portal-layout:has(.navigation:not([open])) { grid-template-columns: 5rem minmax(0, 1fr); }
.sidebar { min-width: 0; background: #fffdf7; border-right: 1px solid #dedfd5; padding: .6rem; }
.navigation { font-size: .875rem; line-height: 1.4; }
.navigation > summary { height: 2.15rem; cursor: pointer; padding: .4rem .55rem; font-weight: 600; }
.navigation[open] { height: 100%; }
.navigation nav { display: flex; flex-direction: column; min-height: 0; }
.navigation ul { margin: 0; padding: 0; list-style: none; }
.navigation .nav-links { flex: 1; overflow-y: auto; }
.navigation .nav-footer { flex-shrink: 0; padding-top: .25rem; }
.navigation nav ul > li { position: relative; }
.navigation a, .nav-logout button { display: block; padding: .46rem .55rem; border-radius: .5rem; color: inherit; text-decoration: none; }
.navigation a:hover, .nav-logout button:hover { background: #e8efeb; }
.nav-logout button { width: 100%; border: 0; background: transparent; text-align: left; }
.navigation a[aria-current="page"] { background: #14635d; color: #fff; font-weight: 700; }
.nav-row:has(+ .nav-group) > a { padding-right: 2rem; }
.nav-group > summary {
  position: absolute;
  top: .08rem;
  right: .1rem;
  display: grid;
  width: 1.75rem;
  min-height: 1.75rem;
  place-items: center;
  border-radius: .4rem;
  color: #193b43;
  background: #e8efeb;
  cursor: pointer;
  list-style: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::before { content: '▸'; }
.nav-group[open] > summary::before { content: '▾'; }
.nav-group > ul { border-left: 1px solid #b0c2ba; margin-left: .7rem; padding-left: .4rem; font-size: .82rem; }
summary:focus-visible { outline: 3px solid #176c83; outline-offset: 2px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fffefa; }
th, td { padding: .65rem .8rem; border-bottom: 1px solid #dedfd5; text-align: left; }
.requests { list-style: none; margin: 1rem 0 0; padding: 0; }
.requests li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; padding: 1rem; border: 1px solid #dedfd5; border-radius: .75rem; background: #fffefa; }
.requests small { display: block; margin-top: .25rem; }

@media (min-width: 46.001rem) {
  .sidebar { position: sticky; top: 0; height: 100dvh; align-self: start; }
  .navigation nav { height: calc(100dvh - 3.35rem); }
}

@media (max-width: 46rem) {
  .login-card, .portal-layout, .portal-layout:has(.navigation:not([open])) { grid-template-columns: minmax(0, 1fr); }
  .login-brand { display: none; }
  .sidebar { border-right: 0; border-bottom: 1px solid #dedfd5; }
  .navigation nav { max-height: 42dvh; }
}
