:root {
  color-scheme: light;
  --background: #f5f7fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #637083;
  --border: #dce2ec;
  --accent: #2254d1;
  --accent-hover: #173fa5;
  --danger: #b42318;
  --success: #16794b;
  --warning: #a15c00;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
}

a {
  color: var(--accent);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  padding: 0 5vw;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

nav a,
.link-button {
  color: var(--muted);
  font: inherit;
  text-decoration: none;
}

nav form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.container {
  width: min(72rem, 90vw);
  margin: 3rem auto;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.card,
.auth-card {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
  box-shadow: 0 0.4rem 1.5rem rgb(23 32 51 / 6%);
}

.card {
  padding: 1.4rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}

a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

a.card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.actions.split {
  justify-content: space-between;
}

.actions h2,
.actions h3 {
  margin-bottom: 0;
}

.button,
button.button {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 0.5rem;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: var(--accent-hover);
}

.button.secondary {
  background: #526174;
}

.button.warning {
  background: var(--warning);
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-green,
.status-ok,
.status-live {
  color: #11643e;
  background: #d9f8e8;
}

.status-yellow,
.status-warn,
.status-pilot {
  color: #824900;
  background: #fff0c2;
}

.status-red,
.status-error,
.status-paused {
  color: #971b13;
  background: #fee2df;
}

.status-pending,
.status-unknown,
.status-draft {
  color: #445269;
  background: #e7ebf1;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 0;
}

.facts div {
  min-width: 0;
}

.facts dt {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
}

.stat strong {
  font-size: 1.35rem;
}

.stat span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

code {
  overflow-wrap: anywhere;
}

.notice {
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
}

.notice.warning {
  border: 1px solid #edc364;
  background: #fff8df;
}

.finding-list {
  padding-left: 1.2rem;
}

.finding-list li {
  margin-bottom: 0.65rem;
}

.auth-card {
  width: min(26rem, 100%);
  margin: 8vh auto;
  padding: 2rem;
}

.auth-card form {
  display: grid;
  gap: 0.65rem;
}

input,
textarea,
select {
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
}

.errorlist {
  color: var(--danger);
}

button.primary {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.45rem;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button.primary:hover {
  background: var(--accent-hover);
}

.error {
  color: var(--danger);
}

.messages {
  padding: 0;
  list-style: none;
}

.messages li {
  margin-bottom: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--surface);
}

.messages li.success {
  border-color: #8bd3ad;
}

@media (max-width: 42rem) {
  .site-header,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .site-header {
    padding-block: 1rem;
  }

  nav {
    flex-wrap: wrap;
  }

  .container {
    width: min(100% - 2rem, 72rem);
    margin-block: 1.5rem;
  }

  .actions.split {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Professional application shell */
:root {
  --background: #f4f6fa;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-strong: #eef2f7;
  --text: #172033;
  --heading: #0b1220;
  --muted: #667085;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --accent: #5b5bd6;
  --accent-hover: #4747b8;
  --accent-soft: #eeeeff;
  --sidebar: #0b1120;
  --sidebar-surface: #151d2f;
  --sidebar-text: #d5dbea;
  --danger: #c4320a;
  --success: #067647;
  --warning: #b54708;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 5%);
  --shadow-md: 0 10px 30px rgb(16 24 40 / 8%);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.35rem;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

html {
  min-width: 20rem;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 95% 0%, rgb(91 91 214 / 5%), transparent 25rem),
    var(--background);
  font-size: 0.925rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(91 91 214 / 22%);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1.5rem 1.15rem 1.15rem;
  overflow-y: auto;
  color: var(--sidebar-text);
  background:
    radial-gradient(circle at 10% -10%, rgb(112 112 255 / 22%), transparent 17rem),
    var(--sidebar);
  border-right: 1px solid rgb(255 255 255 / 5%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #101828;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
}

.sidebar .brand {
  padding: 0 0.65rem 1.75rem;
  color: #fff;
}

.brand:hover,
.sidebar .brand:hover {
  color: inherit;
}

.brand > span:last-child {
  display: grid;
  gap: 0.17rem;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: #98a2b3;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.8rem;
  color: #fff;
  background: linear-gradient(145deg, #7979f2, #5151c9);
  box-shadow: 0 8px 20px rgb(72 72 184 / 28%);
}

.brand-mark svg {
  width: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.nav-label {
  margin: 1.25rem 0.7rem 0.45rem;
  color: #667085;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  min-height: 2.75rem;
  padding: 0.68rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  color: #98a2b3;
  font-weight: 590;
  text-decoration: none;
  transition: 140ms ease;
}

.nav-link svg,
.logout-button svg {
  width: 1.18rem;
  height: 1.18rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-link:first-of-type svg {
  fill: currentColor;
  stroke: none;
}

.nav-link:hover {
  color: #fff;
  background: rgb(255 255 255 / 5%);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgb(102 102 224 / 28%), rgb(87 87 201 / 15%));
  border-color: rgb(139 139 245 / 18%);
  box-shadow: inset 3px 0 #8585f6;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1rem 0.65rem 0.15rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.operator {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.operator > span:last-child {
  display: grid;
  min-width: 0;
}

.operator strong {
  overflow: hidden;
  color: #f9fafb;
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.operator small {
  color: #7f8a9f;
  font-size: 0.68rem;
}

.operator-avatar {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  color: #fff;
  background: #27314a;
  font-size: 0.78rem;
  font-weight: 750;
}

.sidebar-footer form {
  margin: 0;
}

.logout-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  color: #7f8a9f;
  background: transparent;
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.8rem clamp(1.25rem, 3vw, 3rem);
  border-bottom: 1px solid rgb(228 231 236 / 82%);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 1px 0 rgb(16 24 40 / 2%);
  backdrop-filter: blur(14px);
}

.topbar > div {
  display: grid;
  gap: 0.08rem;
}

.topbar strong {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 650;
}

.topbar-kicker {
  color: #98a2b3;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.68rem;
  border: 1px solid #d1fadf;
  border-radius: 999px;
  color: #067647;
  background: #ecfdf3;
  font-size: 0.75rem;
  font-weight: 650;
}

.system-status i {
  width: 0.43rem;
  height: 0.43rem;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgb(18 183 106 / 13%);
}

.container {
  width: min(100% - clamp(2rem, 6vw, 6rem), 82rem);
  margin: clamp(2rem, 4vw, 3.25rem) auto;
  flex: 1;
}

.site-footer {
  padding: 1.25rem 3rem 1.5rem;
  color: #98a2b3;
  font-size: 0.72rem;
  text-align: center;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 740;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

h3 {
  font-size: 0.98rem;
  font-weight: 680;
}

p {
  line-height: 1.65;
}

.page-heading {
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.page-heading > div {
  min-width: 0;
}

.page-heading h1 {
  margin-bottom: 0.25rem;
}

.eyebrow {
  margin-bottom: 0.42rem;
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 780;
  letter-spacing: 0.13em;
}

.muted {
  color: var(--muted);
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.55fr);
  gap: 2rem;
  margin-bottom: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  border: 1px solid #dfe3f2;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 87% 25%, rgb(91 91 214 / 16%), transparent 13rem),
    linear-gradient(135deg, #fff, #f7f7ff);
  box-shadow: var(--shadow-sm);
}

.hero-panel::after {
  position: absolute;
  right: -3rem;
  bottom: -6rem;
  width: 14rem;
  height: 14rem;
  border: 1.5rem solid rgb(91 91 214 / 5%);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  max-width: 42rem;
}

.hero-copy > p:last-child {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-user {
  display: grid;
  gap: 0.25rem;
  min-width: 13rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgb(91 91 214 / 12%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 78%);
  box-shadow: var(--shadow-sm);
}

.hero-user span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.hero-user strong {
  color: var(--heading);
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stat {
  position: relative;
  gap: 0.35rem;
  min-height: 7.25rem;
  align-content: center;
  padding: 1.2rem 1.3rem;
  border-color: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat::before {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #d0d5dd;
  content: "";
}

.stat.stat-success::before {
  background: #12b76a;
  box-shadow: 0 0 0 4px #ecfdf3;
}

.stat.stat-warning::before {
  background: #f79009;
  box-shadow: 0 0 0 4px #fffaeb;
}

.stat strong {
  color: var(--heading);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.stat span {
  font-size: 0.78rem;
  font-weight: 550;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 0.9rem;
}

.section-heading h2 {
  margin-bottom: 0.2rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.card,
.auth-card {
  border-color: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card {
  margin-bottom: 1rem;
  padding: 1.35rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

a.card {
  position: relative;
  min-height: 12rem;
  padding: 1.45rem;
  overflow: hidden;
}

a.card::after {
  position: absolute;
  right: 1.25rem;
  bottom: 1.15rem;
  color: #98a2b3;
  font-size: 1.15rem;
  content: "↗";
  transition: transform 140ms ease;
}

a.card:hover {
  border-color: #c8c8f0;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

a.card:hover::after {
  color: var(--accent);
  transform: translate(2px, -2px);
}

a.card h2 {
  margin-bottom: 0.55rem;
  font-size: 1.03rem;
}

.feature-card-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.1rem;
  font-weight: 800;
}

.app-card {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.3rem 1rem;
  border-bottom: 1px solid var(--border);
}

.app-card-header h2 {
  margin: 0.25rem 0 0;
}

.app-card-header h2 a {
  color: var(--heading);
  text-decoration: none;
}

.app-card-body {
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.3rem;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.app-card-footer a {
  font-size: 0.79rem;
  font-weight: 680;
  text-decoration: none;
}

.app-code {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.42rem 0.65rem;
  border: 1px solid #e0e2fa;
  border-radius: 0.55rem;
  color: #4141a6;
  background: #f7f7ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge {
  padding: 0.26rem 0.6rem;
  border: 1px solid transparent;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.055em;
}

.status-green,
.status-ok,
.status-live {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.status-yellow,
.status-warn,
.status-pilot {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

.status-red,
.status-error,
.status-paused {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.status-pending,
.status-unknown,
.status-draft {
  color: #475467;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.facts {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.1rem 1.5rem;
}

.facts dt {
  margin-bottom: 0.32rem;
  color: #98a2b3;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.075em;
}

.facts dd {
  color: #344054;
  font-size: 0.86rem;
}

code {
  padding: 0.1rem 0.25rem;
  border-radius: 0.3rem;
  color: #344054;
  background: #f2f4f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.83em;
}

.actions {
  gap: 0.65rem;
}

.button,
button.button,
button.primary {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.68rem;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 2px rgb(16 24 40 / 8%);
  font-size: 0.82rem;
  font-weight: 680;
  text-decoration: none;
  transition: 130ms ease;
}

.button:hover,
button.button:hover,
button.primary:hover {
  color: #fff;
  background: var(--accent-hover);
  box-shadow: 0 5px 14px rgb(71 71 184 / 20%);
  transform: translateY(-1px);
}

.button.secondary {
  color: #344054;
  background: #fff;
  border-color: var(--border-strong);
}

.button.secondary:hover {
  color: #101828;
  background: #f9fafb;
  border-color: #98a2b3;
}

.button.warning {
  color: #fff;
  background: #b54708;
}

.table-wrap {
  overflow: hidden;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card.table-wrap {
  padding: 0;
}

table {
  min-width: 38rem;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom-color: var(--border);
}

th {
  color: #667085;
  background: #f9fafb;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

td {
  color: #475467;
  font-size: 0.82rem;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #fafbff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

input,
textarea,
select {
  min-height: 2.8rem;
  margin: 0.35rem 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border-color: var(--border-strong);
  border-radius: 0.65rem;
  color: #101828;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #98a2b3;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #8585e8;
  outline: 0;
  box-shadow: 0 0 0 4px rgb(91 91 214 / 10%);
}

input[type="checkbox"] {
  min-height: 0;
  accent-color: var(--accent);
  box-shadow: none;
}

label {
  color: #344054;
  font-size: 0.79rem;
  font-weight: 650;
}

form p {
  margin-bottom: 0.7rem;
}

form p > label {
  display: block;
}

.helptext {
  display: block;
  margin: -0.55rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.errorlist {
  margin: 0.2rem 0 0.5rem;
  padding: 0;
  color: var(--danger);
  font-size: 0.76rem;
  list-style: none;
}

.notice {
  border: 1px solid #b2ddff;
  border-radius: 0.75rem;
  color: #175cd3;
  background: #eff8ff;
}

.notice.warning {
  border-color: #fedf89;
  color: #93370d;
  background: #fffaeb;
}

.finding-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finding-list li {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-subtle);
  font-size: 0.82rem;
}

details {
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-subtle);
}

summary {
  color: #344054;
  font-weight: 680;
  cursor: pointer;
}

.messages {
  position: relative;
  z-index: 2;
  margin: 0 0 1rem;
}

.messages li {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.messages li.success {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.messages li.error {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
}

/* Authentication */
.auth-body {
  background: #f7f8fc;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(22rem, 0.9fr) minmax(28rem, 1.1fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  color: #d0d5dd;
  background:
    radial-gradient(circle at 85% 15%, rgb(126 126 255 / 25%), transparent 22rem),
    radial-gradient(circle at 15% 90%, rgb(69 196 176 / 10%), transparent 20rem),
    #0b1120;
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 50%;
  content: "";
}

.auth-visual::before {
  top: -8rem;
  right: -8rem;
  width: 24rem;
  height: 24rem;
}

.auth-visual::after {
  right: 8%;
  bottom: -13rem;
  width: 28rem;
  height: 28rem;
}

.brand-light {
  position: relative;
  z-index: 1;
  color: #fff;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin-block: 5rem;
}

.auth-pill {
  display: inline-flex;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgb(152 162 179 / 22%);
  border-radius: 999px;
  color: #c7c9ff;
  background: rgb(91 91 214 / 10%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-visual h2 {
  max-width: 32rem;
  margin-bottom: 1rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
}

.auth-visual-copy > p {
  max-width: 31rem;
  color: #98a2b3;
  font-size: 1rem;
}

.auth-benefits {
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
  padding: 0;
  color: #d0d5dd;
  list-style: none;
}

.auth-benefits span {
  display: inline-grid;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 0.45rem;
  place-items: center;
  border-radius: 50%;
  color: #8f8ff4;
  background: rgb(126 126 255 / 13%);
  font-size: 0.7rem;
  font-weight: 800;
}

.auth-legal {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #667085;
  font-size: 0.72rem;
}

.auth-content {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

.auth-content > .messages {
  position: absolute;
  top: 1rem;
  width: min(28rem, calc(100% - 2rem));
}

.auth-card {
  width: min(28rem, 100%);
  margin: 0;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 0;
  box-shadow: 0 24px 70px rgb(16 24 40 / 12%);
}

.auth-card h1 {
  margin-bottom: 0.55rem;
  font-size: 2rem;
}

.auth-card > .muted {
  margin-bottom: 1.6rem;
}

.auth-card form {
  gap: 0;
}

.auth-card button.primary {
  width: 100%;
  margin-top: 0.4rem;
}

.auth-card .error {
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #fecdca;
  border-radius: 0.65rem;
  color: #b42318;
  background: #fef3f2;
  font-size: 0.8rem;
}

@media (max-width: 72rem) {
  .app-shell {
    grid-template-columns: 14.5rem minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 0.85rem;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 52rem) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    overflow: visible;
  }

  .sidebar .brand {
    padding: 0 0 0.7rem;
  }

  .side-nav {
    display: flex;
    gap: 0.35rem;
    padding-bottom: 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-label,
  .sidebar-footer {
    display: none;
  }

  .nav-link {
    min-height: 2.35rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.68rem;
    font-size: 0.76rem;
  }

  .nav-link.is-active {
    box-shadow: none;
  }

  .nav-link svg {
    width: 1rem;
  }

  .topbar {
    position: static;
    min-height: 3.75rem;
  }

  .container {
    width: min(100% - 2rem, 82rem);
    margin-block: 1.5rem;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-content {
    min-height: 100vh;
    padding: 1rem;
  }
}

@media (max-width: 36rem) {
  .topbar {
    padding-inline: 1rem;
  }

  .topbar > div {
    display: none;
  }

  .topbar {
    justify-content: flex-end;
  }

  .page-heading,
  .actions.split,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading {
    gap: 0.75rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    min-height: 6.5rem;
    padding: 1rem;
  }

  .stat strong {
    font-size: 1.35rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .button,
  button.button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
