:root {
  --brand: #17ad00;
  --brand-soft: rgba(23, 173, 0, .16);
  --black: #000;
  --bg: #050705;
  --panel: #0b0f0c;
  --panel-2: #111712;
  --panel-3: #151d16;
  --line: #263227;
  --line-strong: #36513a;
  --text: #f4f7f3;
  --muted: #a7b1a8;
  --danger: #ff6464;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--brand);
  text-decoration-color: rgba(23, 173, 0, .45);
}

a:hover {
  color: #36d51d;
  text-decoration-color: currentColor;
}

h1,
h2,
h3,
.form-label,
.panel-title {
  color: var(--brand);
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--black);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  background: var(--black);
  border-right: 1px solid var(--line);
}

.brand {
  display: block;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand img,
.auth-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
}

.content {
  min-width: 0;
  padding: 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 173, 0, .06), transparent 240px),
    var(--black);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 14px rgba(23, 173, 0, .65);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}

.metric-card,
.panel,
.list-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
  padding: 20px;
}

.metric-card span,
.panel-header span,
.text-secondary {
  color: var(--muted) !important;
}

.metric-card strong {
  color: var(--brand);
  font-size: 2.25rem;
  line-height: 1;
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.form-control,
.form-select,
textarea,
input,
select {
  background-color: #070907 !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
}

.form-control,
.form-select {
  min-height: 46px;
  padding: 10px 12px;
}

.form-control::placeholder {
  color: #7f8a80;
}

.form-control:focus,
.form-select:focus {
  background-color: #080d09 !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 .2rem rgba(23, 173, 0, .18) !important;
  color: var(--text) !important;
}

.form-check {
  color: var(--muted);
}

.form-check-input {
  background-color: #060806 !important;
  border-color: var(--line-strong) !important;
}

.form-check-input:checked {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}

.btn {
  min-height: 42px;
  border-radius: 8px !important;
  font-weight: 750;
}

.btn-brand,
.btn-success,
.btn-outline-success:hover {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #020802 !important;
}

.btn-brand:hover,
.btn-success:hover {
  filter: brightness(1.08);
}

.btn-outline-light,
.btn-outline-success {
  border-color: var(--line-strong) !important;
  color: var(--text) !important;
}

.btn-outline-light:hover {
  background: var(--panel-3) !important;
  color: var(--text) !important;
}

.btn-outline-danger {
  border-color: rgba(255, 100, 100, .55) !important;
  color: #ff8a8a !important;
}

.btn-outline-danger:hover {
  background: rgba(255, 100, 100, .16) !important;
  color: #ffd6d6 !important;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-color: var(--text);
  --bs-table-hover-bg: rgba(23, 173, 0, .08);
  --bs-table-border-color: var(--line);
  color: var(--text);
  margin-bottom: 0;
}

.table thead th {
  color: var(--brand);
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge,
.text-bg-success {
  background: var(--brand) !important;
  color: #020802 !important;
}

.list-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.list-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.check-list {
  display: grid;
  max-height: 280px;
  gap: 8px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070907;
}

.check-list label {
  color: var(--muted);
}

.toast-stack {
  position: fixed;
  z-index: 10;
  top: 24px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
}

.alert {
  border-radius: 8px;
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.alert-danger {
  border-color: rgba(255, 100, 100, .38);
  background: rgba(255, 100, 100, .12);
  color: #ffd6d6;
}

.alert-success {
  border-color: rgba(23, 173, 0, .5);
  background: rgba(23, 173, 0, .14);
  color: #d8ffd2;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(23, 173, 0, .08), transparent 35%),
    var(--black);
}

.auth-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .45);
}

.auth-card h1 {
  margin-bottom: 22px;
  color: var(--brand);
  font-size: 1.65rem;
}

.auth-logo {
  margin-bottom: 28px;
}

.auth-card .vstack {
  display: flex;
  flex-direction: column;
}

.auth-card .gap-3 {
  gap: 1rem;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metric-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-row {
    grid-template-columns: 1fr;
  }
}
