 :root {
  --sns-blue: #174264;
  --sns-blue-dark: #0f2d45;
  --sns-dark: #0b1220;
  --sns-light: #0f172a;
  --sns-gray: #1f2937;
  --sns-muted: #9ca3af;
  --sns-white: #ffffff;
}

body {
  background: var(--sns-dark);
  color: var(--sns-white);
}

.btn-primary {
  background: var(--sns-blue);
  color: var(--sns-white);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--sns-blue-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--sns-blue);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--sns-blue);
}

.btn-secondary:hover {
  background: rgba(23, 66, 100, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: transparent;
  color: var(--sns-blue);
  border: 1px solid var(--sns-blue);
  padding: 0.125rem 0.5rem;
}

.message {
  max-width: 48rem;
  border-radius: 0.5rem;
  padding: 1rem;
  line-height: 1.6;
}

.message.user {
  background: var(--sns-blue);
  color: var(--sns-white);
  align-self: flex-end;
}

.message.assistant {
  background: var(--sns-light);
  border: 1px solid var(--sns-gray);
  color: var(--sns-white);
}

.message pre {
  background: #0b1220;
  color: var(--sns-white);
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
}

.message table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.message th,
.message td {
  border: 1px solid var(--sns-gray);
  padding: 0.25rem 0.5rem;
}

.message h1,
.message h2,
.message h3 {
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.message ul {
  list-style: disc;
  margin-left: 1.25rem;
}

.suggestions {
  border: 1px solid var(--sns-gray);
  background: var(--sns-light);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(23, 66, 100, 0.2);
}

.suggestion-title {
  font-weight: 600;
  color: var(--sns-white);
}

.suggestion-prompt {
  color: var(--sns-muted);
  font-size: 0.85rem;
}

.status-indicator {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.status-unknown {
  background: #111827;
  color: var(--sns-muted);
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

.status-error {
  background: #fee2e2;
  color: #991b1b;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 20, 0.6);
  z-index: 50;
  backdrop-filter: blur(2px);
}

.loading-card {
  background: var(--sns-light);
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.loading-logo {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sns-muted);
  font-weight: 600;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 4px solid var(--sns-gray);
  border-top-color: var(--sns-blue);
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 0.95rem;
  color: var(--sns-white);
  font-weight: 600;
}

.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 20, 0.75);
  z-index: 60;
  backdrop-filter: blur(3px);
}

.login-card {
  background: var(--sns-light);
  border-radius: 0.75rem;
  padding: 2rem;
  width: min(90vw, 420px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.login-subtitle {
  color: var(--sns-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.login-label {
  font-size: 0.85rem;
  color: var(--sns-muted);
}

.login-input {
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--sns-gray);
  background: #0b1220;
  color: var(--sns-white);
}

.login-error {
  color: #fca5a5;
  font-size: 0.85rem;
}

.login-card .text-sm {
  color: var(--sns-white);
}

.admin-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--sns-gray);
}

.admin-actions {
  display: flex;
  gap: 0.35rem;
}

.admin-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
