body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f7fb;
  color: #1f1f1f;
}

.container {
  margin: 0 auto;
  max-width: 960px;
  padding: 0 1.5rem;
}

.dashboard-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.site-header {
  background: linear-gradient(135deg, #0f4c81 0%, #1a5a96 100%);
  color: #ffffff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid #0d3d67;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-header .brand {
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header .brand:hover {
  opacity: 0.9;
}

.site-header .header-logo {
  height: 50px;
  width: auto;
  display: block;
  order: 1;
  margin-left: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease;
}

.site-header .header-logo:hover {
  transform: scale(1.05);
}

.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  order: 0;
  flex: 1;
  justify-content: flex-end;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  order: 2;
  transition: transform 0.2s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.1);
}

.mobile-menu-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav .button {
  background-color: #ffffff;
  color: #0f4c81;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
}

.grafana-embed-list {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.grafana-embed-list--preview {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grafana-embed-list--preview.show-all {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grafana-embed-item--preview {
  background: #ffffff;
  border-radius: 6px;
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 76, 129, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.show-all .grafana-embed-item--preview {
  padding: 0.75rem;
  gap: 0.5rem;
}

.show-all .grafana-embed-item--preview h2 {
  font-size: 1rem;
  margin: 0;
}

.dashboard-container--preview {
  max-width: min(360px, 100%);
  margin: 0 auto;
  --panel-max-height: 220px;
}

.show-all .dashboard-container--preview {
  max-width: 100%;
  --panel-max-height: 180px;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font: inherit;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-dropdown-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
  border-radius: 4px;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  max-width: 320px;
  width: max-content;
  z-index: 1000;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .nav-dropdown-menu {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .nav-dropdown-menu {
    max-width: calc(100vw - 2rem);
  }
}

.nav-dropdown-menu a {
  display: block;
  color: #1f1f1f;
  padding: 0.75rem 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  .nav-dropdown-menu a {
    white-space: normal;
    word-wrap: break-word;
  }
}

.nav-dropdown-menu a:hover {
  background-color: #f5f7fb;
  color: #0f4c81;
}

.nav-dropdown-menu a:first-child {
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  color: #0f4c81;
}

.nav-dropdown-menu a:first-child:hover {
  background-color: #f5f7fb;
}

.nav-dropdown-empty {
  display: block;
  padding: 0.75rem 1rem;
  color: #999;
  font-style: italic;
  white-space: nowrap;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .nav-dropdown-empty {
    white-space: normal;
  }
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  margin-bottom: 2rem;
  color: #4a4a4a;
}

.cta {
  display: inline-block;
  background-color: #0f4c81;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}

.highlights {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 3rem;
}

.highlights article {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard h1 {
  margin-top: 2rem;
}

.status-card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.status-card .status {
  text-transform: uppercase;
  font-weight: 700;
}

.status-card .status.error {
  color: #bb2124;
}

.status-card .status.unconfigured {
  color: #f0ad4e;
}

.status-card .status.ok {
  color: #22a45d;
}

.health-card {
  margin-top: 1.5rem;
}

.health-checked-at {
  font-size: 0.9rem;
  color: #6f6f6f;
}

.health-details {
  margin-top: 1rem;
  background-color: #f8f8f8;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #e0e6ef;
}

.health-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f4c81;
  margin-bottom: 0.75rem;
}

.health-details pre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.upcoming ul {
  list-style: none;
  padding: 0;
}

.upcoming li {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-footer {
  background-color: #0f4c81;
  color: #ffffff;
  padding: 1rem 0;
  margin-top: 3rem;
  text-align: center;
}

.error {
  padding: 4rem 0;
  text-align: center;
}

.profile {
  padding: 2rem 0;
}

.profile-summary {
  color: #4a4a4a;
  margin-bottom: 1.5rem;
}

.profile-details {
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-details dt {
  font-weight: 600;
  color: #0f4c81;
}

.profile-details dd {
  margin: 0;
  color: #1f1f1f;
}

.slack-status {
  margin-top: 2rem;
}

.slack-status h2 {
  margin-bottom: 1rem;
}

.slack {
  padding: 2rem 0;
}

.slack-intro {
  color: #4a4a4a;
  margin-bottom: 1.5rem;
}

.slack-form {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.slack-form .field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.slack-form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.slack-form input {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #d0d5dd;
}

.slack-form .hint {
  font-size: 0.85rem;
  color: #6f6f6f;
  margin-bottom: 1rem;
}

.slack-banner {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.slack-banner.info {
  background-color: #e6f0ff;
  color: #0f4c81;
}

.slack-banner.error {
  background-color: #fdecea;
  color: #bb2124;
}

.slack-result {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slack-user {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.slack-user img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.slack-presence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.slack-presence dt {
  font-weight: 600;
  color: #0f4c81;
}

.slack-presence dd {
  margin: 0;
  color: #1f1f1f;
}

.slack-monitored {
  margin-top: 3rem;
}

.slack-monitored h2 {
  margin-bottom: 0.75rem;
}

.slack-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}

.slack-result--compact {
  margin: 0;
}

.slack-presence--inline {
  margin-bottom: 0;
}

.slack-email {
  font-size: 0.9rem;
  color: #4a4a4a;
  font-weight: 400;
}

.dashboard-layout .grafana-embed-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(0.5rem, 3vw, 2rem);
}

.grafana-category {
  margin-bottom: 3rem;
}

.grafana-category__header {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0f4c81;
  color: #0f4c81;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grafana-category__count {
  font-size: 1rem;
  font-weight: normal;
  color: #666;
}

.grafana-category__dashboards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.grafana-embed-item h2,
.grafana-embed-item h3 {
  margin-bottom: 0.5rem;
}

.grafana-embed-item {
  width: 100%;
}

.dashboard-container {
  --panel-aspect-ratio: 0.625;
  --panel-max-height: 600px;
  position: relative;
  width: 100%;
  aspect-ratio: var(--panel-aspect-ratio);
  max-height: min(var(--panel-max-height), 75vh);
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.dashboard-placeholder,
.dashboard-error {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: #4a4a4a;
  font-size: 0.95rem;
}

.dashboard-placeholder__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(15, 76, 129, 0.2);
  border-top-color: #0f4c81;
  border-radius: 50%;
  animation: dashboard-spinner 0.9s linear infinite;
}

.dashboard-error {
  border: 2px solid #ff9800;
  background: #fff3e0;
  color: #b35b00;
  font-weight: 500;
}

@keyframes dashboard-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap;
    position: relative;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    background: linear-gradient(135deg, #0d3d67 0%, #0f4c81 100%);
    gap: 0;
    padding: 0.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav.open {
    display: flex;
  }

  .nav > a,
  .nav > .nav-dropdown {
    width: 100%;
    text-align: left;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav > a {
    padding: 0.875rem 1.25rem;
    border-radius: 0;
  }

  .nav > a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .nav-dropdown {
    position: relative;
  }

  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 0.875rem 1.25rem;
    justify-content: space-between;
    border-radius: 0;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin-top: 0;
    background-color: rgba(0, 0, 0, 0.15);
  }

  .nav-dropdown-menu a {
    padding: 0.75rem 2rem;
    color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
  }

  .nav-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .nav-dropdown-menu a:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
  }

  .nav-dropdown-empty {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 2rem;
  }

  .dashboard-layout .grafana-embed-list {
    gap: 1.5rem;
  }

  .dashboard-container {
    --panel-max-height: 480px;
  }

  .grafana-embed-list--preview.show-all {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header .brand {
    font-size: 1.25rem;
  }

  .site-header .header-logo {
    height: 40px;
  }

  .site-header .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .dashboard-container {
    --panel-max-height: 320px;
  }

  .nav > a,
  .nav > .nav-dropdown {
    padding: 1rem;
  }

  .nav-dropdown-toggle {
    padding: 1rem 1.25rem;
  }
}
