:root {
  --sidebar-width: 280px;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --ink: #1f2937;
  --muted: #6b7280;
  --surface: #ffffff;
  --page: #f4f7f6;
  --line: #dbe4e2;
}

body {
  background: var(--page);
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--brand-dark);
  color: #fff;
  padding: 1rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .4rem;
  background: #ecfeff;
  color: var(--brand-dark);
}

.sidebar .nav-link {
  color: #e5f4f2;
  border-radius: .35rem;
  padding: .55rem .7rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.nav-section {
  color: #b7d8d3;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 1rem .7rem .25rem;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
}

.page-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.content-panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1rem;
}

.content-panel h2 {
  font-size: 1.05rem;
  margin-bottom: .75rem;
}

.metric-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card span {
  color: var(--muted);
  font-size: .9rem;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.table {
  margin-bottom: 0;
}

.list-group-item {
  background: transparent;
}

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1rem 1.5rem;
  font-size: .875rem;
}

.sidebar-backdrop {
  display: none;
}

.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1.5rem;
}

.auth-card input {
  width: 100%;
  display: block;
  border: 1px solid #ced4da;
  border-radius: .375rem;
  padding: .5rem .75rem;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.is-open + .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1030;
    background: rgba(17, 24, 39, .45);
  }

  .topbar {
    padding: .75rem 1rem;
  }

  .metric-card {
    min-height: 92px;
  }
}
