﻿@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f2ee;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --accent: #0f766e;
  --accent-2: #f59e0b;
  --text: #1f2933;
  --muted: #6b7280;
  --border: #e2e8f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.login {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.12), transparent 55%),
    linear-gradient(180deg, #fdfbf7 0%, #f3f4f6 100%);
  z-index: -1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #ffffff;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.title h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.server-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.server-switch select {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 150px;
  font-family: "Space Grotesk", sans-serif;
}

.btn {
  border: none;
  padding: 10px 18px;
  border-radius: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.slim {
  padding: 6px 12px;
  font-size: 12px;
  margin-left: 8px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: #1f2937;
}

.status {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
  font-size: 13px;
}

.status.warn {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

.status.neutral {
  background: rgba(107, 114, 128, 0.12);
  color: var(--muted);
}

.notif {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.notif-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc3545;
  color: #ffffff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: none;
  z-index: 10;
}

.notifications-panel.open {
  display: block;
}

.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.notifications-actions {
  display: flex;
  gap: 6px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.notification-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.notification-meta .pill {
  margin-left: auto;
}

.notification-message {
  font-size: 13px;
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 28px 40px 120px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.panel-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(15, 118, 110, 0.3);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-row {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
}

.pill.ok {
  background: rgba(25, 135, 84, 0.15);
  color: #198754;
}

.pill.warn {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

.pill.running {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.pill.neutral {
  background: rgba(107, 114, 128, 0.12);
  color: var(--muted);
}

.drawer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(680px, 92vw);
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.drawer.open {
  transform: translateY(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.drawer-body {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
  max-height: 50vh;
}

.drawer-body.is-log {
  background: #f3f4f6;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", monospace;
}

.login-shell {
  width: min(420px, 90vw);
  padding: 40px 0;
  display: grid;
  place-items: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 16px 0 4px;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.login-form label {
  font-size: 13px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.login-form input {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.6);
}

.login-error {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(244, 87, 87, 0.2);
  color: #b91c1c;
  font-size: 13px;
}

.inline-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.inline-form input,
.inline-form textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.inline-form textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
}

.form-field,
.form-check {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-field input {
  width: 100%;
}

.form-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.toggle-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .layout {
    padding: 20px;
  }

  .drawer {
    right: 12px;
    bottom: 12px;
  }
}
