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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: #1F2937;
  background-color: #F9FAFB;
}

/* Auth pages (index.html, verify.html) */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  margin-bottom: 24px;
}

.auth-logo svg {
  height: 28px;
  width: auto;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: #6B7280;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: #1F2937;
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus {
  border-color: #F59E0B;
}

.btn-primary {
  width: auto;
  padding: 10px 16px;
  background: #F59E0B;
  color: #FFFFFF;
  border: 2px solid #F59E0B;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #D97706;
  border-color: #D97706;
  opacity: 1;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 8px 16px;
  background: #FFFFFF;
  color: #1F2937;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-secondary:hover {
  border-color: #F59E0B;
}

.error-msg {
  color: #EF4444;
  font-size: 14px;
  margin-top: 12px;
}

.success-msg {
  color: #1F2937;
  line-height: 1.5;
}

.hidden {
  display: none;
}

/* Dashboard page */

.dashboard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.dashboard-header svg {
  height: 28px;
  width: auto;
}

.card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 24px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.usage-bar-track {
  background: #E5E7EB;
  border-radius: 4px;
  height: 8px;
  margin: 12px 0;
}

.usage-bar-fill {
  background: #B2DA89;
  border-radius: 4px;
  height: 8px;
  transition: width 0.3s;
}

.usage-label {
  font-size: 14px;
  color: #6B7280;
}

.site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #E5E7EB;
}

.site-row:last-child {
  border-bottom: none;
}

.site-info .site-name {
  font-weight: 600;
  font-size: 14px;
}

.site-info .site-url {
  font-size: 13px;
  color: #6B7280;
  margin-top: 2px;
}

.site-meta {
  font-size: 13px;
  color: #6B7280;
  text-align: right;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small.btn-primary {
  font-size: 13px;
}

.btn-small:hover {
  opacity: 0.85;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-key-display {
  font-family: monospace;
  font-size: 14px;
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 8px 12px;
  flex: 1;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  padding: 32px;
  width: 100%;
  max-width: 480px;
}

.modal-card h3 {
  margin-bottom: 8px;
}