* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fafafa;
  color: #1f2937;
  padding: 20px;
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.header .shield {
  font-size: 28px;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #059669;
}

/* Setup / Auth */
.setup-section {
  margin-bottom: 20px;
}

.setup-section .info {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 12px;
}

.setup-section .info strong {
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}

.form-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input.input-error {
  border-color: #dc2626;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #047857;
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: default;
}

.btn-primary.large {
  padding: 20px;
  font-size: 18px;
  border-radius: 14px;
}

.btn-secondary {
  width: 100%;
  padding: 10px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Result panel */
.result-panel {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-header {
  padding: 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-header .icon {
  font-size: 24px;
}

.result-header .title {
  font-size: 17px;
  font-weight: 700;
}

.result-header.safe {
  background: #059669;
}
.result-header.warning {
  background: #f59e0b;
}
.result-header.blocked {
  background: #dc2626;
}

.result-body {
  padding: 16px;
  background: white;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
}

.result-signals {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
}

.result-footer {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #f3f4f6;
  font-size: 11px;
  color: #9ca3af;
}

/* Loading */
.loading {
  text-align: center;
  padding: 32px 16px;
}

.loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading .text {
  font-size: 15px;
  color: #6b7280;
}

/* Status bar */
.status-bar {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.status-bar.connected {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.status-bar.disconnected {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.hidden {
  display: none !important;
}

.divider {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin: 12px 0;
}

.disconnect-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  cursor: pointer;
  text-decoration: underline;
}

/* Feedback */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.feedback-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.feedback-btn:hover {
  background: #e5e7eb;
}

.feedback-thanks {
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

