*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #edf4ff, #dfe9ff 60%);
  color: #1b2559;
  font-size: 15px;
}

a {
  color: #246bff;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(23, 93, 255, 0.12);
}

.status-unknown {
  background: rgba(255, 255, 255, 0.7);
}

.status-ok {
  background: rgba(76, 175, 80, 0.12);
  border-color: rgba(76, 175, 80, 0.6);
}

.status-warn {
  background: rgba(255, 193, 7, 0.14);
  border-color: rgba(255, 193, 7, 0.6);
}

.status-error {
  background: rgba(244, 67, 54, 0.12);
  border-color: rgba(244, 67, 54, 0.6);
}

.app-main {
  flex: 1;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 24px 24px;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.card h2 {
  margin-top: 0;
}

.config-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

label {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input[type="text"],
input[type="password"],
textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f9fbff;
  color: #0f172a;
  font-size: 14px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

button {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

button.secondary {
  background: transparent;
  color: #2563eb;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: none;
}

button.full-width {
  width: 100%;
  justify-content: center;
  text-align: center;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.form-message {
  min-height: 18px;
  font-size: 12px;
}

.form-message.error {
  color: #ff8787;
}

.form-message.success {
  color: #8ff7b2;
}

.hidden {
  display: none;
}

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

.layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 16px;
}

.sidebar h3 {
  margin-top: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.8;
}

#client-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

#client-list li {
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#client-list li span.status-chip {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#client-list li.active {
  background: rgba(37, 99, 235, 0.08);
}

#client-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}

.detail h3 {
  margin-top: 0;
  font-size: 15px;
}

.hint {
  margin-top: 16px;
  font-size: 12px;
  color: #4b5563;
}

#summary-bar {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(191, 219, 254, 0.85));
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
}

