html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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.1rem #fff, 0 0 0 0.25rem rgba(36, 91, 120, 0.25);
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f7f3;
  color: #1f2a2e;
  font-family: Arial, Helvetica, sans-serif;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #dfe7df;
}

.app-topbar .nav-link {
  color: #35515a;
  font-weight: 600;
}

.app-shell {
  min-height: calc(100vh - 110px);
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: #587071;
  border-top: 1px solid #dfe7df;
  background: #ffffff;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 110px);
}

.sidebar {
  background: #17313a;
  color: #ffffff;
  padding: 1rem;
}

.tenant-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.permission-menu {
  display: grid;
  gap: 0.5rem;
}

.permission-menu a {
  display: grid;
  gap: 0.1rem;
  padding: 0.8rem;
  color: #d8e7e4;
  text-decoration: none;
  border-radius: 8px;
}

.permission-menu a.active,
.permission-menu a:hover {
  background: #244c56;
  color: #ffffff;
}

.permission-menu small {
  font-size: 0.72rem;
  color: #aac3bd;
}

.content-area,
.content-page {
  padding: 1.25rem;
}

.page-heading,
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-heading h1 {
  font-size: 1.65rem;
  margin: 0;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: #55706f;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #c9d8d2;
  background: #ffffff;
  border-radius: 6px;
  color: #31535b;
  font-weight: 700;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.status-grid > div,
.list-panel,
.form-panel,
.message-panel,
.login-panel {
  background: #ffffff;
  border: 1px solid #dfe7df;
  border-radius: 8px;
}

.status-grid > div {
  padding: 1rem;
}

.metric-label {
  display: block;
  color: #55706f;
  font-size: 0.85rem;
}

.status-grid strong {
  font-size: 1.45rem;
}

.list-panel,
.form-panel {
  padding: 1rem;
  margin-bottom: 1rem;
}

.form-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 1.05rem;
  margin: 0;
}

.search-box {
  width: min(100%, 420px);
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #bfd8c8;
  border-radius: 999px;
  background: #eef8f1;
  color: #23633b;
  font-size: 0.85rem;
  font-weight: 700;
}

.connection-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #27a14f;
}

.connection-pill.is-offline {
  border-color: #e7bfc0;
  background: #fff1f1;
  color: #8b2d31;
}

.connection-pill.is-offline .connection-dot {
  background: #cf3f45;
}

.center-page,
.login-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 110px);
  padding: 1.25rem;
}

.message-panel,
.login-panel {
  width: min(100%, 460px);
  padding: 1.5rem;
}

.login-panel h1,
.message-panel h1 {
  font-size: 1.55rem;
  margin-bottom: 1rem;
}

.login-result {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  color: #23633b;
  font-weight: 700;
}

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

  .sidebar {
    padding: 0.75rem;
  }

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

@media (max-width: 680px) {
  .page-heading,
  .list-header,
  .app-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .status-grid,
  .permission-menu {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: wrap;
  }
}
