:root {
  --bg: #f5f3ec;
  --panel: rgba(255, 255, 255, 0.84);
  --ink: #1f2b27;
  --muted: #63706b;
  --line: rgba(31, 43, 39, 0.08);
  --brand: #0f766e;
  --brand-dark: #0a4d48;
  --accent: #d97706;
  --shadow: 0 20px 40px rgba(31, 43, 39, 0.08);
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.16), transparent 26%),
    linear-gradient(180deg, #fcfbf7 0%, var(--bg) 100%);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.4);
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(252, 251, 247, 0.8);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inline-form {
  margin: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(15, 118, 110, 0.1);
  font-size: 0.9rem;
  font-weight: 700;
}

.page-body {
  padding: 2rem 0 3rem;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 28px;
  color: #f8fbfa;
  background: linear-gradient(135deg, rgba(10, 77, 72, 0.98), rgba(15, 118, 110, 0.86));
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: 1.6rem 2rem;
}

.hero-panel h1,
.section-head h1,
.section-head h2 {
  margin: 0;
}

.hero-copy {
  max-width: 58ch;
  margin: 0.75rem 0 0;
  color: rgba(248, 251, 250, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0.75rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.metrics-grid,
.content-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: 1.4fr 1fr;
}

.metric-card,
.section-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 1.35rem 1.5rem;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.metric-card strong {
  font-size: 2rem;
}

.section-card {
  padding: 1.4rem 1.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.full-span {
  grid-column: 1 / -1;
}

.subtle-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-live {
  color: #065f46;
  background: rgba(16, 185, 129, 0.16);
}

.status-muted {
  color: #5b6470;
  background: rgba(100, 116, 139, 0.16);
}

.stack-list {
  display: grid;
  gap: 0.9rem;
}

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.filter-bar,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.filter-bar {
  margin-bottom: 1rem;
}

.filter-bar .form-select {
  max-width: 280px;
}

.form-shell {
  display: grid;
  gap: 1rem;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 12rem);
}

.login-card {
  width: min(100%, 460px);
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.form-card {
  max-width: 900px;
}

.detail-card {
  max-width: 880px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0 0 1.5rem;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-grid dd {
  margin: 0.3rem 0 0;
  font-weight: 600;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--muted);
  border-bottom-color: var(--line);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table tbody td {
  border-bottom-color: var(--line);
}

.footer-shell {
  padding: 0 0 1.6rem;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 991.98px) {
  .toolbar-actions {
    margin-top: 1rem;
  }

  .metrics-grid,
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  .page-shell {
    width: min(100% - 1rem, 1180px);
  }

  .hero-panel,
  .section-head,
  .list-row {
    flex-direction: column;
  }

  .metrics-grid,
  .content-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-body {
    padding-top: 1.25rem;
  }
}
