:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0c192b;
  --card: #112238;
  --border: #223b56;
  --text: #e2e8f0;
  --muted: #a4b0c2;
  --accent: #22d3ee;
  --accent-blue: #4f7cff;
  --danger: #ff7b85;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, "Aptos", "Segoe UI Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 8% 0%, rgb(34 211 238 / 10%), transparent 32rem),
    radial-gradient(ellipse at 95% 28%, rgb(79 124 255 / 10%), transparent 30rem),
    url("/assets/ambient-network.svg") center 7rem / min(1120px, 110vw) auto no-repeat;
}
a { color: var(--accent); }
button, input, select { font: inherit; }
button, .button {
  min-height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  padding: .55rem .85rem;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
button:hover, .button:hover { border-color: var(--accent); }
button:disabled { cursor: wait; opacity: .6; }
input, select {
  min-height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  padding: .4rem .65rem;
  background: var(--bg);
  color: var(--text);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar { background: rgb(12 25 43 / 88%); backdrop-filter: blur(14px); }
.topbar-inner, main, .footer {
  width: min(100% - 2rem, 1160px);
  margin-inline: auto;
}
.topbar-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { color: var(--text); font-weight: 800; letter-spacing: .1em; text-decoration: none; }
.brand-logo {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex: none;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-lockup { display: grid; gap: .24rem; line-height: 1.05; }
.brand-lockup small { color: var(--muted); font-size: .58rem; letter-spacing: .22em; }
.top-actions, .toolbar, .inline-form { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
main { padding-block: 2.5rem 4rem; }
h1 { margin: .25rem 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; text-wrap: balance; }
h2 { margin: 0 0 1rem; font-size: 1.2rem; letter-spacing: -.02em; text-wrap: balance; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .88rem; }
.notice { min-height: 1.5rem; color: var(--muted); }
.notice.error { color: var(--danger); }
.notice.success { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.card {
  grid-column: span 12;
  border: 1px solid var(--border);
  border-radius: .65rem;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgb(21 31 46 / 96%), rgb(15 23 36 / 96%));
  min-width: 0;
  box-shadow: 0 16px 40px rgb(0 0 0 / 10%);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: #3b5069; }
.card.third { grid-column: span 4; }
.card.half { grid-column: span 6; }
.card:nth-child(3n + 1) { background-image: radial-gradient(ellipse at 100% 0%, rgb(34 211 238 / 5%), transparent 58%), linear-gradient(145deg, rgb(21 31 46 / 96%), rgb(15 23 36 / 96%)); }
.card:nth-child(3n + 2) { background-image: radial-gradient(ellipse at 100% 0%, rgb(79 124 255 / 5%), transparent 58%), linear-gradient(145deg, rgb(21 31 46 / 96%), rgb(15 23 36 / 96%)); }
.stat { color: var(--accent); font-size: 1.8rem; font-weight: 750; }
.dashboard-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 1.6rem 2rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: linear-gradient(105deg, #0c1b2d 0%, #0d2638 58%, #151f3b 100%);
  box-shadow: 0 22px 70px rgb(0 0 0 / 18%);
}
.dashboard-hero-copy { position: relative; z-index: 1; max-width: 62%; }
.dashboard-hero h1 { margin: .25rem 0 .5rem; }
.dashboard-hero-art {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  width: min(42%, 440px);
  transform: translateY(-50%);
  opacity: .92;
}
.dashboard-label {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.role-chip, .status-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .28rem .65rem;
  border: 1px solid rgb(34 211 238 / 27%);
  border-radius: 999px;
  background: rgb(34 211 238 / 9%);
  color: #b8f4fb;
  font-size: .78rem;
}
.status-chip::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(34 211 238 / 70%);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}
.section-heading h2 { margin: 0; }
.icon-heading { display: flex; align-items: center; gap: .65rem; }
.icon-box {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: rgb(34 211 238 / 8%);
  color: var(--accent);
}
.icon-box svg { width: 1.1rem; height: 1.1rem; }
.table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.danger { color: var(--danger); }
.footer { padding-block: 1rem 2rem; border-top: 1px solid var(--border); color: var(--muted); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.form-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.form-row label { display: grid; gap: .3rem; color: var(--muted); font-size: .88rem; }
.inline-status { min-height: 1.5rem; }
.role-control { display: flex; align-items: center; gap: .4rem; min-width: 11rem; }
.role-control select { min-width: 5rem; min-height: 2.2rem; padding-block: .25rem; }
.role-control button { padding: .38rem .6rem; font-size: .85rem; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .9rem;
}
.pagination span { margin-right: auto; color: var(--muted); font-size: .88rem; }
.pagination button { min-width: 5.5rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: .7rem; }
.resource-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: rgb(34 211 238 / 6%);
  text-decoration: none;
}
.resource-links a:hover { border-color: var(--accent); }
@media (max-width: 760px) {
  .card.third, .card.half { grid-column: span 6; }
  .topbar-inner { align-items: center; flex-direction: row; flex-wrap: wrap; padding-block: .65rem; }
  .top-actions { margin-left: auto; }
  main { padding-top: 1.5rem; }
  .dashboard-hero { min-height: 190px; padding: 1.3rem; }
  .dashboard-hero-copy { max-width: 66%; }
  .dashboard-hero-art { right: -1rem; width: 43%; opacity: .5; }
}
@media (max-width: 560px) {
  .card.third, .card.half { grid-column: span 12; }
  .dashboard-hero { min-height: 170px; padding: 1.1rem; }
  .dashboard-hero-copy { max-width: 76%; }
  .dashboard-hero h1 { font-size: clamp(1.65rem, 7vw, 2.2rem); overflow-wrap: anywhere; }
  .dashboard-hero-art { right: -2rem; width: 48%; opacity: .32; }
  .card { padding: 1rem; }
  .form-row { align-items: stretch; flex-direction: column; }
  .form-row label, .form-row input, .form-row button { width: 100%; }
  .pagination { justify-content: space-between; flex-wrap: wrap; }
  .pagination button { flex: 1 1 40%; }
  .resource-links a { flex: 1 1 100%; }
  th, td { min-width: 6rem; }
  th:last-child, td:last-child { min-width: 5rem; }
}
@media (max-width: 480px) {
  main { width: min(100% - 1.25rem, 1160px); padding-top: 1rem; }
  .topbar-inner, main, .footer { width: min(100% - 1.25rem, 1160px); }
  .topbar-inner { gap: .55rem; }
  .top-actions { gap: .4rem; }
  .top-actions > a, .top-actions > button { min-height: 2.75rem; padding-inline: .65rem; }
  .dashboard-hero { min-height: 155px; }
  .dashboard-hero-copy { max-width: 100%; }
  .dashboard-hero-art { width: 38%; right: -2.5rem; opacity: .16; }
  .dashboard-label { font-size: .68rem; }
  .status-chip, .role-chip { font-size: .72rem; }
  .grid { gap: .75rem; margin-block: 1rem; }
  .notice { overflow-wrap: anywhere; }
  body::before { background-position: 8% 0, 95% 28%, 62% 4rem; background-size: auto, auto, 150vw auto; }
  th, td { padding: .6rem .45rem; }
}
@media (max-width: 360px) {
  .topbar-inner { align-items: flex-start; }
  .brand-lockup { font-size: .86rem; }
  .top-actions { width: 100%; margin-left: 0; }
  .top-actions > a, .top-actions > button { flex: 1 1 auto; text-align: center; }
  .dashboard-hero h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  button, input, select, .card, .dashboard-hero, .resource-links a { border-color: CanvasText; }
  :focus-visible { outline: 2px solid Highlight; }
}
