@font-face {
  font-family: Inter;
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

@font-face {
  font-family: "Material Symbols Rounded";
  src: url("/fonts/MaterialSymbolsRounded.woff2") format("woff2");
  font-display: block;
  font-weight: 100 700;
}

:root {
  color-scheme: light;
  --shell: #151718;
  --workspace: #f8f9fa;
  --panel: #fff;
  --text: #1c1e21;
  --muted: #5f656e;
  --border: #e4e6ea;
  --accent: #2b6849;
  --accent-tint: #e3f1e8;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--shell);
  color: var(--text);
}

* { box-sizing: border-box; }
body { min-width: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
input, button { font: inherit; }
button { cursor: pointer; }
h1, h2, p, dl, dd { margin: 0; }
p { line-height: 1.55; }
h1, h2 { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.95rem, 4vw, 2.45rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.13; }
h2 { font-size: 1.23rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible { outline-offset: 1px; }
.muted { color: var(--muted); }

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  overflow: hidden;
  font: normal 400 1.25rem / 1 "Material Symbols Rounded";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 425, "GRAD" 0, "opsz" 24;
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  width: fit-content;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.brand img { display: block; flex: none; object-fit: contain; }
.brand-copy { display: grid; gap: .17rem; line-height: 1.12; }
.brand-copy small { color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: 0; }

.public-page { padding: 1rem; }
.public-surface {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: calc(100dvh - 2rem);
  background: var(--workspace);
  border-radius: 1.5rem;
}

.public-header {
  display: flex;
  align-items: center;
  padding: .95rem clamp(1.15rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--border);
}

.public-main {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 4.75rem;
}

.panel {
  min-width: 0;
  padding: clamp(1.15rem, 4vw, 1.9rem);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--panel);
}

.sign-in-panel {
  width: min(100%, 27rem);
  padding: clamp(1.35rem, 4vw, 2.3rem);
  box-shadow: 0 10px 32px rgb(28 30 33 / .045);
}

.sign-in-panel h1 { font-size: 2rem; }
.sign-in-description { margin-top: .55rem; }
.sign-in-panel .form-stack { margin-top: 1.55rem; }
.sign-in-panel .button { width: 100%; }
.sign-in-panel > .button { margin-top: 1.2rem; }
.sign-in-panel > p { margin-top: .65rem; }

.form-stack { display: grid; gap: 1rem; }
.form-stack > div:last-child, .sign-in-panel .form-stack > .button { margin-top: .26rem; }
.field { display: grid; gap: .45rem; min-width: 0; font-size: .9rem; font-weight: 550; }
.field input {
  width: 100%;
  min-height: 2.9rem;
  padding: .6rem .78rem;
  border: 1px solid #d5d8de;
  border-radius: .6rem;
  background: #fbfcfd;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
}

.field input:hover { border-color: #b5bac3; }
.field small { color: var(--muted); font-size: .8125rem; font-weight: 400; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .58rem .98rem;
  border: 1px solid transparent;
  border-radius: .61rem;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
}

.primary { background: #25282b; color: #fff; }
.primary:hover { background: #3b4046; }
.secondary { background: var(--panel); border-color: #d9dce1; }
.secondary:hover { background: #f2f4f6; }
.compact { padding-inline: .76rem; }

.feedback {
  padding: .67rem .88rem;
  border: 1px solid;
  border-radius: .65rem;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.feedback.error { background: #fff4f2; color: #872b25; border-color: #f0d4d0; }
.feedback.success { background: #edf7f0; color: #22553a; border-color: #cde5d4; }
.sign-in-panel .feedback, .panel .feedback { margin-top: 1rem; }
.workspace > .feedback { margin-bottom: 1rem; }

.workspace-page {
  height: 100dvh;
  padding: 1rem;
}

.surface {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--workspace);
}

.workspace-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 1rem .85rem;
  border-inline-end: 1px solid var(--border);
  background: var(--panel);
  color: #49515b;
}

.sidebar-links { display: grid; gap: .35rem; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .69rem;
  width: 100%;
  min-height: 2.85rem;
  padding: .62rem .85rem;
  border: 0;
  border-radius: 2rem;
  background: transparent;
  color: inherit;
  font-size: .9rem;
  font-weight: 500;
  text-align: left;
}

.nav-link:hover { background: #f0f2f4; color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-tint); color: #25543c; }
.logout { margin: auto 0 0; padding-top: 1rem; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.3rem;
  padding: .55rem clamp(1.1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.top-bar .brand { flex: none; }
.profile {
  display: flex;
  align-items: center;
  gap: .56rem;
  min-width: 0;
  max-width: 17rem;
  padding: .32rem .65rem .32rem .32rem;
  border: 1px solid var(--border);
  border-radius: 3rem;
  background: var(--panel);
  font-size: .86rem;
  font-weight: 550;
}

.profile:hover { background: #edf0f2; }
.profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar, .panel-icon {
  display: grid;
  flex: none;
  place-items: center;
  background: var(--accent-tint);
  color: #25543c;
}

.avatar { width: 1.85rem; height: 1.85rem; border-radius: 50%; font-size: .73rem; font-weight: 650; }
.panel-icon { width: 2.7rem; height: 2.7rem; margin-bottom: .9rem; border-radius: .8rem; }

.workspace-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.workspace-scroll:focus-visible { outline-offset: -3px; }

.workspace {
  max-width: 74rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2.65rem) clamp(1.1rem, 4vw, 2.5rem) 3rem;
}

.view-heading { margin-bottom: 1.45rem; }
.overview-panel, .form-panel { max-width: 35rem; }
.account-details { display: grid; gap: .9rem; margin: 1.2rem 0 1.45rem; }
.account-details dt { margin-bottom: .2rem; color: var(--muted); font-size: .85rem; }
.account-details dd { overflow-wrap: anywhere; }
.form-panel .muted, .message-panel .muted { margin-top: .58rem; }
.message-panel .button { margin-top: 1.1rem; }
.form-panel .form-stack, .admin-grid .form-stack { margin-top: 1.2rem; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(17rem, .9fr) minmax(0, 1.25fr);
  gap: 1rem;
  align-items: start;
}

.partner-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.partner-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
}

.partner-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.partner-identity { display: grid; gap: .2rem; min-width: 0; overflow-wrap: anywhere; }
.partner-identity strong { font-weight: 600; }
.partner-identity span { font-size: .875rem; }
.empty-state { margin-top: .7rem; }
.form-panel .reset-email { margin-top: .24rem; overflow-wrap: anywhere; }
.back-link { display: inline-block; margin-bottom: .6rem; color: var(--muted); font-size: .9rem; }
.back-link:hover { color: var(--text); text-decoration: underline; }
.skip-link {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .65rem .9rem;
  border-radius: .5rem;
  background: var(--panel);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

@media (max-width: 64rem) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); max-width: 35rem; }
}

@media (max-width: 44rem) {
  :root { scrollbar-gutter: stable; }
  .public-page, .workspace-page { padding: .55rem; }
  .workspace-page, .surface { height: auto; }
  .public-surface, .surface {
    min-height: calc(100dvh - 1.1rem);
    border-radius: 1.05rem;
  }
  .public-main { padding: 1.25rem .8rem 3rem; }
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .22rem;
    overflow: visible;
    padding: .45rem .55rem;
    border-inline-end: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-links { display: contents; }
  .nav-link { gap: .35rem; width: auto; padding-inline: .61rem; min-height: 2.75rem; }
  .nav-link .icon { font-size: 1.08rem; }
  .logout { flex: none; padding-top: 0; margin: 0 0 0 auto; }
  .top-bar { min-height: 3.45rem; }
  .profile { max-width: 45%; }
  .workspace-scroll { overflow: visible; }
}

@media (max-width: 24rem) {
  .nav-link { font-size: .83rem; }
  .profile { padding: .24rem; }
  .profile-name { display: none; }
}
