:root {
  --primary: #12803b;
  --primary-hover: #0e662f;
  --primary-light: #e8f5ec;
  --secondary: #d97706;
  --accent-gold: #f59e0b;
  --dark: #1f2937;
  --text-muted: #6b7280;
  --bg-page: #f0f4f8;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 16px;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-page);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  line-height: 1.5;
}

.bono-container {
  width: 100%;
  max-width: 620px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

/* Header */
.bono-header {
  background: linear-gradient(135deg, #0e662f 0%, #12803b 60%, #1c5fa8 100%);
  color: #ffffff;
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  margin-bottom: 14px;
  transition: transform 0.2s ease;
}

.logo-badge:hover {
  transform: translateY(-2px);
}

.bono-logo {
  height: 48px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

.bono-header .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.bono-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.bono-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 480px;
  margin: 0 auto;
}

/* Body Content */
.bono-body {
  padding: 28px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

.bono-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  font-size: 17px;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fdfdfd;
  transition: all 0.2s ease;
  color: var(--dark);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bono-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(18, 128, 59, 0.12);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.clear-btn:hover {
  background: #f3f4f6;
  color: var(--dark);
}

.helper-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Action Buttons */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  flex: 1;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(18, 128, 59, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(18, 128, 59, 0.3);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: #20ba59;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--dark);
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--dark);
  background: #f9fafb;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Alerts */
.alert {
  padding: 16px 18px;
  border-radius: 12px;
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.alert-danger {
  background: var(--danger-light);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.alert-content h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.alert-content p {
  font-size: 13px;
  color: #7f1d1d;
}

/* Result Section */
.result-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  animation: slideUp 0.4s ease;
}

.person-info {
  background: var(--primary-light);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.person-meta h3 {
  font-size: 16px;
  font-weight: 800;
  color: #065f46;
  text-transform: uppercase;
}

.person-meta p {
  font-size: 13px;
  color: #047857;
}

.bono-highlight {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 14px;
  border: 1px dashed var(--primary);
  text-align: center;
}

.bono-highlight .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.bono-highlight .number {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 1px;
}

/* Image Preview */
.image-preview-wrapper {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.image-preview-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: block;
  margin: 0 auto;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  flex: 1;
  min-width: 180px;
}

/* Footer */
.bono-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.bono-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print Styles */
@media print {
  body {
    background: #fff;
    padding: 0;
  }
  .bono-container {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
  .bono-header, .form-group, .btn-group, .action-buttons, .bono-footer {
    display: none !important;
  }
  .image-preview-wrapper {
    border: none;
    padding: 0;
    box-shadow: none;
  }
  .image-preview-wrapper img {
    box-shadow: none;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .bono-body {
    padding: 20px 16px;
  }
  .action-buttons .btn {
    min-width: 100%;
  }
  .person-info {
    flex-direction: column;
    align-items: flex-start;
  }
}
