:root {
  color-scheme: light;
  --canvas: 251 251 251;
  --elevated: 246 246 247;
  --base: 255 255 255;
  --recessed: 244 244 245;
  --fill: 235 235 237;
  --hairline: 229 229 232;
  --line: 0 0 0;
  --line-a: 0.11;
  --text: 24 24 27;
  --text-2: 82 82 91;
  --muted: 107 107 116;
  --subtle: 145 145 152;
  --accent: 15 118 110;
  --accent-fill: 34 168 159;
  --danger: 190 18 60;
  --ok: 21 128 61;
  --warn: 180 83 9;
  --info: 3 105 161;
  --console-bg: 244 244 245;
  --console-text: 39 39 42;
  --shadow-pop: 0 12px 32px -8px rgb(0 0 0 / 0.18), 0 2px 6px rgb(0 0 0 / 0.06);
  --radius: 8px;
  --radius-card: 10px;
  --control: 32px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2371717a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");

  --slate-50: 250 250 250;
  --slate-100: 244 244 245;
  --slate-200: 228 228 231;
  --slate-300: 212 212 216;
  --slate-400: 161 161 170;
  --slate-500: 107 107 116;
  --slate-600: 82 82 91;
  --slate-700: 63 63 70;
  --slate-800: 39 39 42;
  --slate-900: 24 24 27;
  --slate-950: 9 9 11;
  --emerald-50: 240 253 250;
  --emerald-100: 204 251 241;
  --emerald-200: 153 246 228;
  --emerald-300: 94 234 212;
  --emerald-400: 45 212 191;
  --emerald-500: 20 184 166;
  --emerald-600: 13 148 136;
  --emerald-700: 15 118 110;
  --emerald-800: 17 94 89;
  --emerald-900: 19 78 74;
  --emerald-950: 4 47 46;
  --rose-50: 255 241 242;
  --rose-100: 255 228 230;
  --rose-200: 254 205 211;
  --rose-300: 253 164 175;
  --rose-400: 251 113 133;
  --rose-500: 244 63 94;
  --rose-600: 225 29 72;
  --rose-700: 190 18 60;
  --rose-800: 159 18 57;
  --rose-900: 136 19 55;
  --rose-950: 76 5 25;
  --amber-50: 255 251 235;
  --amber-100: 254 243 199;
  --amber-200: 253 230 138;
  --amber-300: 252 211 77;
  --amber-400: 251 191 36;
  --amber-500: 245 158 11;
  --amber-600: 217 119 6;
  --amber-700: 180 83 9;
  --amber-800: 146 64 14;
  --amber-900: 120 53 15;
  --amber-950: 69 26 3;
  --white: 255 255 255;
}

html.dark {
  color-scheme: dark;
  --canvas: 24 24 24;
  --elevated: 33 33 34;
  --base: 39 39 40;
  --recessed: 47 47 48;
  --fill: 61 61 63;
  --hairline: 56 56 58;
  --line: 255 255 255;
  --line-a: 0.13;
  --text: 242 242 243;
  --text-2: 206 206 210;
  --muted: 163 163 170;
  --subtle: 128 128 135;
  --accent: 61 214 196;
  --accent-fill: 45 212 191;
  --danger: 251 113 133;
  --ok: 74 222 128;
  --warn: 251 191 36;
  --info: 125 211 252;
  --console-bg: 30 30 31;
  --console-text: 226 226 230;
  --shadow-pop: 0 16px 40px -8px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a3a3aa' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");

  --slate-50: 45 45 46;
  --slate-100: 52 52 54;
  --slate-200: 64 64 66;
  --slate-300: 82 82 85;
  --slate-400: 128 128 135;
  --slate-500: 163 163 170;
  --slate-600: 190 190 196;
  --slate-700: 212 212 216;
  --slate-800: 229 229 232;
  --slate-900: 242 242 243;
  --slate-950: 250 250 250;
  --emerald-50: 19 52 48;
  --emerald-100: 20 66 60;
  --emerald-200: 22 90 82;
  --emerald-300: 25 120 108;
  --emerald-400: 35 165 150;
  --emerald-500: 45 212 191;
  --emerald-600: 45 212 191;
  --emerald-700: 94 234 212;
  --emerald-800: 153 246 228;
  --emerald-900: 204 251 241;
  --emerald-950: 240 253 250;
  --rose-50: 63 22 30;
  --rose-100: 80 26 38;
  --rose-200: 110 34 50;
  --rose-300: 140 44 62;
  --rose-400: 190 60 82;
  --rose-500: 244 63 94;
  --rose-600: 225 29 72;
  --rose-700: 253 164 175;
  --rose-800: 254 205 211;
  --rose-900: 255 228 230;
  --rose-950: 255 241 242;
  --amber-50: 58 44 14;
  --amber-100: 72 54 16;
  --amber-200: 110 80 20;
  --amber-300: 140 100 24;
  --amber-400: 251 191 36;
  --amber-500: 245 158 11;
  --amber-600: 217 119 6;
  --amber-700: 252 211 77;
  --amber-800: 253 230 138;
  --amber-900: 254 243 199;
  --amber-950: 255 251 235;
  --white: 39 39 40;
}

/* Base */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body.panel-app,
body.panel-auth {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgb(var(--text));
  background: rgb(var(--canvas));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

body.panel-app ::selection,
body.panel-auth ::selection {
  background: rgb(var(--accent-fill) / 0.25);
}

body.panel-app code,
body.panel-app .font-mono {
  font-family: var(--mono);
}

body.panel-app code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

body.panel-app pre code {
  padding: 0;
  background: none;
  box-shadow: none;
}

body.panel-app a:focus-visible,
body.panel-app button:focus-visible,
body.panel-app summary:focus-visible,
body.panel-auth a:focus-visible,
body.panel-auth button:focus-visible {
  outline: 2px solid rgb(var(--accent) / 0.55);
  outline-offset: 2px;
}

body.panel-app * {
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--fill)) transparent;
}

body.panel-app hr,
body.panel-app .divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: rgb(var(--hairline));
}

body.panel-app .border-b,
body.panel-app .border-t {
  border-color: rgb(var(--hairline));
}

/* Shell */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.side {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  background: rgb(var(--elevated));
  box-shadow: inset -1px 0 0 rgb(var(--hairline));
  color: rgb(var(--text-2));
}

.side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 14px;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgb(var(--text));
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgb(var(--line) / var(--line-a));
}

.brand-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-tag {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgb(var(--accent-fill) / 0.12);
  color: rgb(var(--accent));
  font-size: 11px;
  font-weight: 600;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control);
  margin: 2px 12px 8px;
  padding: 0 8px 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / var(--line-a));
  color: rgb(var(--muted));
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.side-search:hover {
  color: rgb(var(--text));
}

.side-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.side-search span {
  flex: 1 1 auto;
}

.kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--muted));
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.side-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
}

.side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 4px;
  padding: 0 10px;
  color: rgb(var(--subtle));
  font-size: 11px;
  font-weight: 600;
}

.side-count {
  font-weight: 500;
  color: rgb(var(--subtle));
}

.side-nav {
  display: grid;
  gap: 1px;
}

.side-link,
.site-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control);
  padding: 0 10px;
  border-radius: 6px;
  color: rgb(var(--text-2));
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.side-link svg,
.ws-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.side-link:hover,
.site-link:hover {
  background: rgb(var(--line) / 0.045);
  color: rgb(var(--text));
}

.side-link.is-on,
.site-link.is-on {
  background: rgb(var(--line) / 0.06);
  color: rgb(var(--text));
}

.side-link.is-on::before,
.site-link.is-on::before,
.ws-link.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
  background: rgb(var(--accent-fill));
}

.side-sites {
  position: relative;
  display: grid;
  gap: 1px;
  margin-left: 17px;
  padding-left: 8px;
  box-shadow: inset 1px 0 0 rgb(var(--hairline));
}

.site-link {
  min-height: 30px;
  gap: 8px;
}

.site-link.is-on::before {
  left: -9px;
  top: 6px;
  bottom: 6px;
}

.site-link strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.site-link span {
  flex: 0 0 auto;
  color: rgb(var(--subtle));
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.side-empty {
  margin: 0;
  padding: 6px 10px;
  color: rgb(var(--subtle));
  font-size: 12px;
}

.side-foot {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  box-shadow: inset 0 1px 0 rgb(var(--hairline));
}

.side-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-user a {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: var(--control);
  padding: 0 6px;
  border-radius: 6px;
  color: rgb(var(--text));
  text-decoration: none;
}

.side-user a:hover,
.side-user a.is-on {
  background: rgb(var(--line) / 0.05);
}

.avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(var(--accent-fill) / 0.16);
  color: rgb(var(--accent));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.side-user strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgb(var(--muted));
  cursor: pointer;
}

.icon-btn:hover {
  background: rgb(var(--line) / 0.06);
  color: rgb(var(--text));
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgb(var(--muted));
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.theme-switch button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-switch button:hover {
  color: rgb(var(--text));
}

.theme-switch button[aria-checked="true"] {
  background: rgb(var(--base));
  color: rgb(var(--text));
  box-shadow: 0 0 0 1px rgb(var(--line) / var(--line-a)), 0 1px 2px rgb(0 0 0 / 0.06);
}

.side-backdrop {
  display: none;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  background: rgb(var(--canvas) / 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
}

.topbar-menu {
  display: none;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: rgb(var(--muted));
  font-size: 13px;
}

.crumb a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.crumb a:hover {
  color: rgb(var(--text));
}

.crumb-sep {
  color: rgb(var(--subtle));
}

.crumb-now {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(var(--text));
  font-weight: 600;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  width: 100%;
  max-width: 1320px;
  padding: 24px 28px 48px;
  box-sizing: border-box;
}

/* Page header */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.page-head > div:first-child {
  min-width: 0;
}

.page-title {
  margin: 0;
  color: rgb(var(--text));
  font-size: 24px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 52rem;
  margin: 4px 0 0;
  color: rgb(var(--muted));
  font-size: 13px;
  line-height: 1.55;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Flash */

.flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.flash::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: currentColor;
}

.flash-bad {
  background: rgb(var(--danger) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.22);
  color: rgb(var(--danger));
}

.flash-ok {
  background: rgb(var(--ok) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--ok) / 0.22);
  color: rgb(var(--ok));
}

/* Layer cards */

.ui-card,
.panel-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-card);
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--hairline)), 0 1px 2px rgb(0 0 0 / 0.03);
}

.ui-card > h2:first-child,
.ui-card > .card-head:first-child,
.ui-card > summary:first-child {
  margin: -16px -16px 0;
  padding: 12px 16px;
  background: rgb(var(--elevated));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
}

.ui-card > h2:first-child {
  color: rgb(var(--text));
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.ui-card > h2:first-child:has(+ p.text-slate-500) {
  padding-bottom: 2px;
  box-shadow: none;
}

.ui-card > h2:first-child + p.text-slate-500 {
  margin: 0 -16px;
  padding: 0 16px 12px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
  color: rgb(var(--muted));
  font-size: 13px;
  line-height: 1.55;
}

.ui-card > h2:first-child:last-child,
.ui-card > h2:first-child + p.text-slate-500:last-child {
  margin-bottom: -16px;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  box-shadow: none;
}

.ui-card > .card-head:first-child h2,
.ui-card > .card-head:first-child h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.ui-card > .card-head:first-child p {
  color: rgb(var(--muted));
  font-size: 13px;
}

.ui-card > .card-head:first-child .card-head-actions,
.ui-card > .card-head:first-child > :last-child:not(:first-child) {
  margin-top: -4px;
  margin-bottom: -4px;
}

details.ui-card > summary:first-child {
  list-style: none;
  cursor: pointer;
}

details.ui-card > summary:first-child::-webkit-details-marker {
  display: none;
}

details.ui-card:not([open]) > summary:first-child {
  margin-bottom: -16px;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  box-shadow: none;
}

details.ui-card > summary:first-child .text-lg {
  font-size: 14px;
  font-weight: 600;
}

.ui-card--danger {
  box-shadow: 0 0 0 1px rgb(var(--danger) / 0.28), 0 1px 2px rgb(0 0 0 / 0.03);
}

.ui-card--danger > h2:first-child,
.ui-card--danger > h2:first-child + p.text-slate-500 {
  background: rgb(var(--danger) / 0.06);
}

.ui-card--danger > h2:first-child {
  color: rgb(var(--danger));
}

.ui-card--flush {
  padding: 0;
  overflow: hidden;
}

.card-flush {
  margin: 16px -16px -16px;
  overflow-x: auto;
  border-bottom-left-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
}

.ui-card > h2:first-child + .card-flush,
.ui-card > h2:first-child + p.text-slate-500 + .card-flush,
.ui-card > .card-head:first-child + .card-flush {
  margin-top: 0;
}

.card-flush:not(:last-child) {
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
}

.card-flush .ui-table th {
  border-radius: 0;
}

.ui-sub {
  border-radius: var(--radius);
  background: rgb(var(--canvas));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  padding: 12px;
}

.ui-sub--flush {
  padding: 0;
  overflow: hidden;
}

.ui-sub--danger {
  background: rgb(var(--danger) / 0.04);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.22);
}

.ui-note {
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
}

.ui-note--warn {
  background: rgb(var(--warn) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--warn) / 0.24);
  color: rgb(var(--warn));
}

.ui-note--bad {
  background: rgb(var(--danger) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.22);
  color: rgb(var(--danger));
}

.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 36px 16px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--muted));
}

.empty-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty strong {
  font-size: 14px;
  font-weight: 600;
}

.empty p {
  max-width: 28rem;
  margin: 0;
  color: rgb(var(--muted));
  font-size: 13px;
}

.empty .ui-btn {
  margin-top: 12px;
}

/* Controls */

.ui-input {
  display: block;
  width: 100%;
  min-height: var(--control);
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / var(--line-a)), 0 1px 1px rgb(0 0 0 / 0.02);
  color: rgb(var(--text));
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  transition: box-shadow 0.12s ease;
}

textarea.ui-input {
  padding: 8px 10px;
}

.ui-input::placeholder {
  color: rgb(var(--subtle));
}

.ui-input:hover {
  box-shadow: inset 0 0 0 1px rgb(var(--line) / calc(var(--line-a) + 0.08));
}

.ui-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgb(var(--accent) / 0.75), 0 0 0 3px rgb(var(--accent-fill) / 0.18);
}

.ui-input:disabled,
.ui-input[readonly] {
  background: rgb(var(--recessed));
  color: rgb(var(--muted));
}

select.ui-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 30px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
  cursor: pointer;
}

body.panel-app input[type="checkbox"],
body.panel-app input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / 0.28);
  cursor: pointer;
  vertical-align: middle;
}

body.panel-app input[type="radio"] {
  border-radius: 999px;
}

body.panel-app input[type="checkbox"]:checked {
  background: rgb(var(--accent-fill)) var(--check) center / 12px 12px no-repeat;
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill));
}

body.panel-app input[type="radio"]:checked {
  box-shadow: inset 0 0 0 5px rgb(var(--accent-fill));
}

body.panel-app input[type="checkbox"]:focus-visible,
body.panel-app input[type="radio"]:focus-visible {
  outline: 2px solid rgb(var(--accent) / 0.55);
  outline-offset: 2px;
}

body.panel-app input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control);
  box-sizing: border-box;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / var(--line-a)), 0 1px 1px rgb(0 0 0 / 0.03);
  color: rgb(var(--text));
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}

.ui-btn:hover {
  background: rgb(var(--recessed));
}

.ui-btn:disabled,
.ui-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.ui-btn--primary {
  background: rgb(var(--accent-fill) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.32);
  color: rgb(var(--accent));
}

.ui-btn--primary:hover {
  background: rgb(var(--accent-fill) / 0.2);
}

.ui-btn--danger {
  background: rgb(var(--danger) / 0.07);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.26);
  color: rgb(var(--danger));
}

.ui-btn--danger:hover {
  background: rgb(var(--danger) / 0.13);
}

.ui-btn--ghost {
  background: transparent;
  box-shadow: none;
  color: rgb(var(--text-2));
}

.ui-btn--ghost:hover {
  background: rgb(var(--line) / 0.06);
  color: rgb(var(--text));
}

.ui-btn--ghost-danger {
  background: transparent;
  box-shadow: none;
  color: rgb(var(--danger));
}

.ui-btn--ghost-danger:hover {
  background: rgb(var(--danger) / 0.08);
}

.ui-btn--sm {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.ui-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-label {
  color: rgb(var(--muted));
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

body.panel-app label.text-sm,
body.panel-app label.block {
  color: rgb(var(--text-2));
  font-size: 13px;
  font-weight: 500;
}

body.panel-app legend {
  color: rgb(var(--text-2));
  font-size: 13px;
  font-weight: 500;
}

body.panel-app dd {
  color: rgb(var(--text));
}

body.panel-app details > summary {
  color: rgb(var(--text-2));
}

body.panel-app details > summary:hover {
  color: rgb(var(--text));
}

/* Status badge */

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  box-sizing: border-box;
  padding: 0 8px;
  border-radius: 999px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--text-2));
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.chip.ok::before,
.chip.warn::before,
.chip.bad::before,
.chip.info::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.chip.ok::before {
  background: rgb(var(--ok));
  box-shadow: 0 0 0 3px rgb(var(--ok) / 0.16);
}

.chip.warn::before {
  background: rgb(var(--warn));
  box-shadow: 0 0 0 3px rgb(var(--warn) / 0.16);
}

.chip.bad::before {
  background: rgb(var(--danger));
  box-shadow: 0 0 0 3px rgb(var(--danger) / 0.16);
}

.chip.info::before {
  background: rgb(var(--accent-fill));
  box-shadow: 0 0 0 3px rgb(var(--accent-fill) / 0.18);
}

a.chip:hover {
  color: rgb(var(--text));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / 0.2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ui-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / var(--line-a));
  color: rgb(var(--text-2));
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.ui-pill:hover {
  background: rgb(var(--recessed));
  color: rgb(var(--text));
}

.ui-pill.is-on {
  background: rgb(var(--accent-fill) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.32);
  color: rgb(var(--accent));
}

.state-on {
  color: rgb(var(--ok));
}

.state-off {
  color: rgb(var(--danger));
}

/* Tables */

.ui-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

.ui-table tr {
  border: 0;
}

.ui-table th {
  height: 36px;
  padding: 0 12px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
  color: rgb(var(--muted));
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
}

.ui-table th:first-child {
  border-top-left-radius: 6px;
}

.ui-table th:last-child {
  border-top-right-radius: 6px;
}

.ui-table td {
  height: 44px;
  padding: 8px 12px;
  border-top: 1px solid rgb(var(--hairline));
  vertical-align: middle;
}

.ui-table tr:first-child td,
.ui-table thead + tbody tr:first-child td {
  border-top: 0;
}

.ui-table tbody tr:hover td,
.ui-table tr.is-row:hover td {
  background: rgb(var(--line) / 0.025);
}

.ui-card--flush .ui-table th:first-child,
.ui-card--flush .ui-table th:last-child {
  border-radius: 0;
}

.ui-table .cell-main {
  color: rgb(var(--text));
  font-weight: 550;
  text-decoration: none;
}

.ui-table a.cell-main:hover {
  color: rgb(var(--accent));
}

.ui-table .cell-sub {
  display: block;
  margin-top: 1px;
  color: rgb(var(--muted));
  font-size: 12px;
}

.ui-table .cell-end {
  text-align: right;
  white-space: nowrap;
}

.ui-table .cell-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-go {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: rgb(var(--subtle));
}

.row-go:hover {
  background: rgb(var(--line) / 0.06);
  color: rgb(var(--text));
}

.row-go svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
}

.table-search {
  position: relative;
  display: block;
  width: min(100%, 300px);
}

.table-search svg {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  fill: none;
  stroke: rgb(var(--subtle));
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.table-search .ui-input {
  padding-left: 30px;
}

.table-count {
  color: rgb(var(--muted));
  font-size: 12px;
}

.table-foot {
  padding: 10px 12px;
  color: rgb(var(--muted));
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgb(var(--hairline));
}

/* Site workspace */

.ws {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.ws-nav {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 1px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-bottom: 8px;
}

.ws-group {
  margin: 12px 0 4px;
  padding: 0 10px;
  color: rgb(var(--subtle));
  font-size: 11px;
  font-weight: 600;
}

.ws-group:first-child {
  margin-top: 0;
}

.ws-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--control);
  padding: 0 10px;
  border-radius: 6px;
  color: rgb(var(--text-2));
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.ws-link:hover {
  background: rgb(var(--line) / 0.045);
  color: rgb(var(--text));
}

.ws-link.is-on {
  background: rgb(var(--accent-fill) / 0.1);
  color: rgb(var(--accent));
}

.ws-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.ws-title {
  display: none;
}

/* Collection cards */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 112px;
  box-sizing: border-box;
  padding: 14px;
  border-radius: var(--radius-card);
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--hairline)), 0 1px 2px rgb(0 0 0 / 0.03);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.12s ease, background-color 0.12s ease;
}

.tool-card:hover {
  box-shadow: 0 0 0 1px rgb(var(--line) / 0.2), 0 4px 12px -4px rgb(0 0 0 / 0.1);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--text-2));
}

.tool-card:hover .tool-icon {
  background: rgb(var(--accent-fill) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.3);
  color: rgb(var(--accent));
}

.tool-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.tool-card p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(var(--muted));
  font-size: 11.5px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat,
.ui-stat {
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--hairline)), 0 1px 2px rgb(0 0 0 / 0.03);
}

.ui-stat {
  border-radius: var(--radius);
  background: rgb(var(--canvas));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.stat span {
  display: block;
  color: rgb(var(--muted));
  font-size: 12px;
  font-weight: 500;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.meta {
  margin: 2px 0 0;
  color: rgb(var(--muted));
  font-size: 12px;
}

/* Console */

.ui-console {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgb(var(--console-bg));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--console-text));
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
}

.term-screen {
  overflow: hidden;
  padding: 10px;
  border-radius: var(--radius);
  background: #161617;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.ui-editor {
  height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgb(var(--hairline));
}

[data-vh="status"].is-bad {
  color: rgb(var(--danger));
}

[data-vh="status"].is-ok {
  color: rgb(var(--ok));
}

/* Modals */

.panel-confirm,
.panel-modal {
  margin: auto !important;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgb(var(--text));
  overflow: visible;
}

.panel-confirm {
  width: min(26rem, calc(100vw - 2rem));
}

.panel-modal {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
}

.panel-confirm[open],
.panel-modal[open] {
  animation: panel-pop 0.14s ease-out;
}

@keyframes panel-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-confirm::backdrop,
.panel-modal::backdrop {
  background: rgb(10 10 12 / 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.panel-confirm__card,
.panel-modal__card {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--line) / var(--line-a)), var(--shadow-pop);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  box-sizing: border-box;
}

.panel-confirm__title,
.modal-head {
  margin: -16px -16px 0 !important;
  padding: 12px 16px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.panel-confirm__title {
  font-size: 14px;
  font-weight: 600;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.modal-head p {
  margin: 2px 0 0;
  color: rgb(var(--muted));
  font-size: 12.5px;
}

.modal-x {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -3px -6px -3px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgb(var(--muted));
  cursor: pointer;
}

.modal-x:hover {
  background: rgb(var(--line) / 0.07);
  color: rgb(var(--text));
}

.modal-x svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.panel-confirm__body {
  margin: 14px 0 0;
  color: rgb(var(--text-2));
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.panel-confirm__actions,
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 16px -16px -16px !important;
  padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgb(var(--hairline));
}

.panel-confirm__cancel,
.panel-confirm__ok {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.panel-confirm__cancel {
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--line) / var(--line-a));
  color: rgb(var(--text));
}

.panel-confirm__cancel:hover {
  background: rgb(var(--recessed));
}

.panel-confirm__ok {
  background: rgb(var(--accent-fill) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.32);
  color: rgb(var(--accent));
}

.panel-confirm__ok:hover {
  background: rgb(var(--accent-fill) / 0.2);
}

.panel-confirm__ok.is-danger {
  background: rgb(var(--danger) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.3);
  color: rgb(var(--danger));
}

.panel-confirm__ok.is-danger:hover {
  background: rgb(var(--danger) / 0.14);
}

.panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: 10px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.panel-tabs button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgb(var(--muted));
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}

.panel-tabs button:hover {
  color: rgb(var(--text));
}

.panel-tabs button.is-active {
  background: rgb(var(--accent-fill) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.3);
  color: rgb(var(--accent));
}

/* Command palette */

.cmdk {
  width: min(36rem, calc(100vw - 2rem));
  margin: 12vh auto auto !important;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--line) / var(--line-a)), var(--shadow-pop);
  color: rgb(var(--text));
  overflow: hidden;
}

.cmdk::backdrop {
  background: rgb(10 10 12 / 0.4);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.cmdk[open] {
  animation: panel-pop 0.12s ease-out;
}

.cmdk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 -1px 0 rgb(var(--hairline));
}

.cmdk-head svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgb(var(--muted));
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cmdk-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  color: rgb(var(--text));
  font: inherit;
  font-size: 14px;
}

.cmdk-input::placeholder {
  color: rgb(var(--subtle));
}

.cmdk-list {
  max-height: min(56vh, 420px);
  overflow-y: auto;
  padding: 6px;
}

.cmdk-group {
  margin: 8px 8px 4px;
  color: rgb(var(--subtle));
  font-size: 11px;
  font-weight: 600;
}

.cmdk-group:first-child {
  margin-top: 4px;
}

.cmdk-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: rgb(var(--text-2));
  font-size: 13px;
  text-decoration: none;
}

.cmdk-item span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-item small {
  flex: 0 0 auto;
  color: rgb(var(--subtle));
  font-size: 11.5px;
}

.cmdk-item:hover {
  background: rgb(var(--line) / 0.05);
}

.cmdk-item.is-on {
  background: rgb(var(--accent-fill) / 0.1);
  color: rgb(var(--text));
}

.cmdk-item.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: rgb(var(--accent-fill));
}

.cmdk-empty {
  margin: 0;
  padding: 20px 12px;
  color: rgb(var(--muted));
  font-size: 13px;
  text-align: center;
}

.cmdk-foot {
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  background: rgb(var(--elevated));
  box-shadow: inset 0 1px 0 rgb(var(--hairline));
  color: rgb(var(--muted));
  font-size: 11.5px;
}

.cmdk-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Auth */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  box-sizing: border-box;
  background:
    radial-gradient(60rem 30rem at 50% -10%, rgb(var(--accent-fill) / 0.09), transparent 70%),
    rgb(var(--canvas));
}

.auth-box {
  width: min(100%, 380px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(var(--line) / var(--line-a));
}

.auth-brand strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.auth-brand span {
  display: block;
  color: rgb(var(--muted));
  font-size: 12.5px;
}

.auth-card {
  padding: 20px;
  border-radius: 12px;
  background: rgb(var(--base));
  box-shadow: 0 0 0 1px rgb(var(--hairline)), 0 8px 24px -12px rgb(0 0 0 / 0.12);
}

.auth-card h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.auth-card .auth-sub {
  margin: 2px 0 18px;
  color: rgb(var(--muted));
  font-size: 13px;
}

.auth-card label {
  display: block;
  color: rgb(var(--text-2));
  font-size: 13px;
  font-weight: 500;
}

.auth-card label + label {
  margin-top: 12px;
}

.auth-pass {
  position: relative;
  display: block;
  margin-top: 4px;
}

.auth-pass .ui-input {
  padding-right: 64px;
}

.auth-pass button {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgb(var(--muted));
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}

.auth-pass button:hover {
  background: rgb(var(--line) / 0.06);
  color: rgb(var(--text));
}

.auth-submit {
  width: 100%;
  margin-top: 18px;
  min-height: 36px;
}

.auth-back {
  display: block;
  margin-top: 12px;
  color: rgb(var(--muted));
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

.auth-back:hover {
  color: rgb(var(--text));
}

.auth-foot {
  margin: 16px 0 0;
  color: rgb(var(--subtle));
  font-size: 12px;
  text-align: center;
}

body.panel-auth input[type="checkbox"] {
  accent-color: rgb(var(--accent-fill));
}

/* TOTP */

.totp-row {
  display: flex;
  gap: 8px;
}

.totp-row input {
  width: 44px;
  height: 48px;
  padding: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
}

.totp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.totp-head h2 {
  margin: 0;
}

.totp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.totp-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 1px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgb(var(--canvas));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.totp-steps li span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgb(var(--recessed));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--muted));
  font-size: 12px;
  font-weight: 700;
}

.totp-steps li strong {
  font-size: 13px;
  font-weight: 600;
}

.totp-steps li em {
  grid-column: 2;
  color: rgb(var(--muted));
  font-size: 12px;
  font-style: normal;
}

.totp-steps li.is-on {
  background: rgb(var(--accent-fill) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-fill) / 0.32);
}

.totp-steps li.is-on span,
.totp-steps li.is-done span {
  background: rgb(var(--accent-fill));
  box-shadow: none;
  color: rgb(var(--base));
}

.totp-steps li.is-done {
  opacity: 0.75;
}

.totp-setup {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  margin-top: 16px;
}

.totp-qr-card {
  padding: 14px;
  border-radius: var(--radius);
  background: rgb(var(--canvas));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.totp-qr {
  display: grid;
  place-items: center;
  width: 188px;
  height: 188px;
  margin: 10px auto 0;
  padding: 6px;
  border-radius: 6px;
  background: #ffffff;
}

.totp-qr img,
.totp-qr canvas {
  width: 176px !important;
  height: 176px !important;
}

.totp-qr-help,
.totp-copy,
.totp-note {
  margin: 10px 0 0;
  color: rgb(var(--muted));
  font-size: 13px;
  line-height: 1.55;
}

.totp-kicker {
  margin: 0;
  color: rgb(var(--accent));
  font-size: 12px;
  font-weight: 600;
}

.totp-guide {
  display: grid;
  gap: 12px;
}

.totp-block {
  padding: 14px;
  border-radius: var(--radius);
  background: rgb(var(--canvas));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
}

.totp-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.totp-apps li {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(var(--base));
  box-shadow: inset 0 0 0 1px rgb(var(--hairline));
  color: rgb(var(--text-2));
  font-size: 12px;
}

.totp-secret-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}

.totp-secret {
  flex: 1;
  min-width: 0;
  padding: 8px 12px !important;
  border-radius: var(--radius) !important;
  background: rgb(var(--console-bg)) !important;
  box-shadow: inset 0 0 0 1px rgb(var(--hairline)) !important;
  color: rgb(var(--console-text));
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  word-break: break-all;
}

.totp-secret-sm {
  font-size: 11px;
  letter-spacing: 0;
}

.totp-details {
  margin-top: 10px;
}

.totp-details summary {
  cursor: pointer;
  font-size: 13px;
}

.totp-confirm-form .totp-row {
  margin-top: 10px;
}

.totp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.totp-idle,
.totp-on {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.totp-idle {
  grid-template-columns: minmax(0, 1fr) auto;
}

.totp-idle > form {
  margin-top: 6px;
}

.totp-points {
  margin: 12px 0 0;
  padding-left: 18px;
  color: rgb(var(--text-2));
  font-size: 13px;
  line-height: 1.6;
  list-style: disc;
}

.totp-points li + li {
  margin-top: 6px;
}

.totp-off-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgb(var(--danger) / 0.04);
  box-shadow: inset 0 0 0 1px rgb(var(--danger) / 0.2);
}

/* Responsive */

@media (max-width: 1180px) {
  .ws {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ws-nav {
    position: static;
    display: flex;
    gap: 2px;
    max-height: none;
    margin: 0 -4px;
    padding: 0 4px 8px;
    overflow-x: auto;
    box-shadow: inset 0 -1px 0 rgb(var(--hairline));
  }

  .ws-group {
    display: none;
  }

  .ws-link {
    flex: 0 0 auto;
    min-height: 30px;
  }

  .ws-link.is-on::before {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: -8px;
    width: auto;
    height: 2px;
  }
}

@media (max-width: 1023px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    box-shadow: var(--shadow-pop);
  }

  body.nav-open .side {
    transform: none;
  }

  body.nav-open .side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgb(10 10 12 / 0.4);
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-menu {
    display: inline-grid;
    margin-left: -6px;
  }

  .content {
    padding: 20px 16px 40px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-meta {
    display: none;
  }

  .hide-sm {
    display: none;
  }

  .totp-setup,
  .totp-idle,
  .totp-on,
  .totp-steps {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 21px;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .totp-row input {
    width: 38px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side,
  .panel-confirm[open],
  .panel-modal[open],
  .cmdk[open] {
    transition: none;
    animation: none;
  }
}
