* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e293b;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 0.9rem;
}

.quote-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.quote-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.04);
  padding: 1.6rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.quote-card-inner {
  position: relative;
  z-index: 1;
}

.logo-container {
  text-align: left;
  margin-bottom: 1.25rem;
}

.logo {
  max-width: 180px;
  max-height: 80px;
  width: auto;
  height: auto;
  display: inline-block;
}

.quote-title {
  font-size: 1.55rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
  color: #1e293b;
}

.quote-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 1.3rem;
  line-height: 1.6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
}

.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

form {
  display: grid;
  gap: 1rem;
}

.field-group {
  display: grid;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.83rem;
  color: #64748b;
  display: block;
  margin-bottom: 0.15rem;
}

.field-label strong {
  color: #1e293b;
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.08s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #94a3b8;
}

.input:focus,
.select:focus,
.textarea:focus {
  background: #ffffff;
  transform: translateY(-0.5px);
}

.textarea {
  resize: vertical;
  min-height: 110px;
}

.hint {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

.small-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  body {
    padding: 1rem 0.75rem;
  }
  .quote-card {
    padding: 1.4rem 1.2rem 1.3rem;
  }
  .small-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .helper-text {
    text-align: left;
  }
}

.file-input {
  font-size: 0.8rem;
  color: #64748b;
}

.file-input input[type="file"] {
  font-size: 0.8rem;
  max-width: 100%;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.primary-btn {
  border: none;
  cursor: pointer;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #020617;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
  white-space: nowrap;
}

.primary-btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #020617;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.9);
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.helper-text {
  font-size: 0.78rem;
  color: #64748b;
  text-align: right;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-overlay.visible {
  display: flex;
}

.loading-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  max-width: 320px;
  margin: 0 1rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid #e2e8f0;
  animation: spin 0.8s linear infinite;
}

.loading-title {
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
}

.loading-text {
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Powered by footer */
.powered-by {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.powered-by a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8rem;
}

.powered-by strong {
  color: #8b5cf6;
}
