* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --green: #00c853;
  --black: #000000;
  --surface: #0b0b0b;
  --surface-raised: #111311;
  --line: #262a27;
  --text: #f0f3f0;
  --muted: #929a94;
  --font-body: "DM Sans", sans-serif;
  --font-display: "Space Grotesk", sans-serif;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 540px;
  flex-direction: column;
  padding: 27px 16px 20px;
  border-right: 1px solid var(--line);
  background: #050605;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  padding: 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: var(--black);
  font-size: 17px;
}

.brand-period,
.page-heading h1 span {
  color: var(--green);
}

.sidebar-label,
.eyebrow,
.summary-label {
  color: #858d87;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.sidebar-label {
  margin: 47px 10px 12px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.sidebar-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #a8afa9;
  font-size: 13px;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.sidebar-link svg,
.site-link svg,
.panel-icon svg,
.button svg,
.repository-row svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sidebar-link:hover,
.sidebar-link.active {
  border-color: rgba(0, 200, 83, 0.18);
  background: rgba(0, 200, 83, 0.08);
  color: var(--green);
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 15px 10px 0;
  border-top: 1px solid var(--line);
  color: #a8afa9;
  font-size: 12px;
}

.connection-dot,
.system-status span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(0, 200, 83, 0.42);
}

.main-content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 42px 28px;
}

.topbar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs,
.site-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs strong {
  color: var(--text);
  font-weight: 500;
}

.crumb-divider {
  color: #505751;
}

.site-link {
  color: #c0c7c1;
  font-size: 12px;
  transition: color 160ms ease;
}

.site-link:hover,
.repository-row > a:hover {
  color: var(--green);
}

.site-link svg,
.repository-row svg {
  width: 15px;
  height: 15px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 42px 0 27px;
}

.eyebrow {
  margin: 0 0 9px;
}

.page-heading h1,
.panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

.page-heading h1 {
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}

.heading-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #c5ccc6;
  font-size: 11px;
  white-space: nowrap;
}

.system-status span {
  width: 6px;
  height: 6px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.summary-item {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  padding: 18px 21px;
}

.summary-item + .summary-item {
  border-left: 1px solid var(--line);
}

.summary-label {
  margin-bottom: 7px;
}

.summary-item strong,
.repo-value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.summary-item .status-connected {
  color: var(--green);
}

.summary-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.repo-value {
  color: var(--green);
  font-family: var(--font-body);
  font-size: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 15px;
  margin-top: 20px;
}

.workspace-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
}

.panel-heading h2 {
  font-size: 19px;
}

.panel-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(0, 200, 83, 0.2);
  border-radius: 7px;
  background: rgba(0, 200, 83, 0.08);
  color: var(--green);
}

.panel-icon-muted {
  border-color: var(--line);
  background: #111311;
  color: #9ba29c;
}

.panel-copy {
  max-width: 480px;
  margin: 17px 0 15px;
  color: #bbc2bc;
  font-size: 13px;
}

.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 21px;
}

.content-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #c3cac4;
  font-size: 10px;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
  color: #001b0b;
}

.button-primary:hover {
  background: #24d568;
}

.button-secondary {
  border-color: #39413b;
  background: #141714;
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--green);
}

.panel-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-footnote strong {
  color: #d8ded9;
  font-weight: 600;
}

.analytics-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 19px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #080908;
}

.analytics-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #343a35;
  border-radius: 50%;
  color: #afb6b0;
}

.analytics-mark svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.analytics-empty strong {
  display: block;
  color: #e1e6e1;
  font-size: 12px;
}

.analytics-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.repository-row {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 15px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.repository-row > div,
.repository-row > a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.repo-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.repository-row strong,
.repository-row span:not(.repo-icon) {
  display: block;
}

.repository-row strong {
  font-size: 12px;
  font-weight: 600;
}

.repository-row div div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.repository-row > a {
  flex: 0 0 auto;
  color: #c5ccc6;
  font-size: 11px;
}

.admin-footer {
  padding-top: 18px;
  color: #727a73;
  font-size: 10px;
}

@media (max-width: 980px) {
  .main-content {
    padding-right: 25px;
    padding-left: 25px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    padding: 13px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0 2px 10px;
  }

  .sidebar-label,
  .sidebar-bottom {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }

  .sidebar-link {
    min-height: 37px;
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 11px;
  }

  .sidebar-link svg {
    width: 15px;
    height: 15px;
  }

  .main-content {
    padding: 0 16px 24px;
  }

  .topbar {
    min-height: 54px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding: 29px 0 21px;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 88px;
    padding: 13px 16px;
  }

  .summary-item + .summary-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .workspace-panel {
    padding: 17px;
  }
}

@media (max-width: 420px) {
  .breadcrumbs {
    font-size: 11px;
  }

  .site-link {
    gap: 5px;
    font-size: 11px;
  }

  .system-status {
    font-size: 10px;
  }

  .repository-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
