/* ══════════════════════════════════════════
   components.css — UI components
   ══════════════════════════════════════════ */

/* ── Cards & Borders ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-gold { border-color: var(--gold); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: var(--shadow-luxury); }

.section-editorial {
  position: relative;
  overflow: hidden;
}
.section-editorial::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, hsla(36, 45%, 52%, 0.08), transparent 34%),
    radial-gradient(circle at bottom left, hsla(36, 35%, 38%, 0.05), transparent 38%);
}
.section-editorial > .container {
  position: relative;
  z-index: 1;
}
.section-paper {
  background:
    linear-gradient(180deg, hsla(42, 24%, 98%, 0.98), hsla(40, 22%, 95%, 0.98));
}
.section-warm {
  background:
    linear-gradient(180deg, hsla(40, 18%, 93%, 0.96), hsla(42, 20%, 88%, 0.98));
}
.section-deep {
  background:
    linear-gradient(135deg, var(--section-deep), var(--section-deep-soft));
}
.section-deep .card,
.section-deep .service-card {
  background: hsla(42, 24%, 98%, 0.06);
  border-color: hsla(41, 56%, 56%, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: none;
}
.section-deep .text-muted,
.section-deep .timeline-item .text,
.section-deep .service-card p {
  color: hsla(42, 30%, 95%, 0.72);
}
.section-deep .card h3,
.section-deep .card p,
.section-deep .service-card h3,
.section-deep .section-heading h2 {
  color: var(--primary-foreground);
}
.editorial-divider {
  position: relative;
}
.editorial-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(88vw, 72rem);
  height: 1px;
  background: var(--editorial-line);
  opacity: 0.9;
}
.editorial-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 2px;
  padding: 1.5rem;
  transition: all 0.3s;
}
.editorial-card:hover {
  box-shadow: 0 4px 20px -4px hsla(36, 35%, 38%, 0.12);
  border-color: hsla(36, 35%, 38%, 0.2);
}
.editorial-narrative {
  color: var(--section-ink);
  text-wrap: balance;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1.25rem; border-radius: var(--radius); font-weight: 600;
  font-size: 0.875rem; cursor: pointer; border: none; transition: all 0.2s;
  white-space: nowrap; gap: 0.5rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  color: var(--foreground); font-weight: 700;
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.1); }
.btn-gold-outline {
  background: transparent; border: 2px solid var(--gold); color: var(--gold);
}
.btn-gold-outline:hover:not(:disabled) { background: var(--gold); color: var(--foreground); }
.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--foreground);
}
.btn-outline:hover:not(:disabled) { background: var(--secondary); }
.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--secondary); }
.btn-destructive { background: var(--destructive); color: white; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; width: 2rem; height: 2rem; }
.text-link-cta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s;
  margin-top: auto;
}
.text-link-cta:hover { color: var(--gold); }

/* ── Forms ── */
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card); color: var(--foreground);
  font-size: 0.875rem; transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px hsla(42, 78%, 50%, 0.2);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted-foreground); }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-textarea { min-height: 5rem; resize: vertical; }
.form-checkbox { width: 1rem; height: 1rem; accent-color: var(--gold); }

/* ── Status Badges ── */
.badge { display: inline-block; font-size: 0.75rem; padding: 0.125rem 0.75rem; border-radius: 9999px; font-weight: 500; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-emerald { background: #d1fae5; color: #065f46; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-primary { background: hsla(109,11%,31%,0.1); color: var(--primary); }
.badge-gold { background: hsla(36,45%,52%,.15); color: var(--gold); }

/* ── Tables ── */
table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
thead { background: hsla(40,20%,93%,0.5); }
th { text-align: left; padding: 0.75rem 1rem; font-weight: 500; border-bottom: 1px solid var(--border); }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: hsla(40,20%,93%,0.2); }

/* ── Tabs ── */
.tabs-list { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--border); padding-bottom: 0; flex-wrap: wrap; }
.tab-trigger {
  padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; cursor: pointer;
  border: none; background: none; color: var(--muted-foreground); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
}
.tab-trigger:hover { color: var(--foreground); }
.tab-trigger.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; margin-top: 1rem; }
.tab-content.active { display: block; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.875rem; box-shadow: 0 10px 15px rgba(0,0,0,0.1); animation: slideIn 0.3s ease; max-width: 24rem; }
.toast-success { background: #166534; color: white; }
.toast-error { background: var(--destructive); color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Modal/Dialog ── */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--card); border-radius: 0.5rem; padding: 1.5rem; max-width: 32rem; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.5rem; }

/* ── Certificate Verification ── */
.verify-result { margin-top: 1.5rem; padding: 1rem; border-radius: 0.5rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.verify-valid { background: #f0fdf4; border: 1px solid #bbf7d0; }
.verify-invalid { background: hsla(0,72%,51%,0.1); border: 1px solid hsla(0,72%,51%,0.2); }

/* ── Spinner ── */
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stat Bar ── */
.stat-bar-track { flex: 1; background: hsla(40,20%,93%,0.5); border-radius: 9999px; height: 1.25rem; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 9999px; transition: width 0.3s; }
.stat-bar-fill.primary { background: var(--primary); }
.stat-bar-fill.gold { background: var(--gold); }

/* ── Alert ── */
.alert { padding: 1rem; border-radius: 0.5rem; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; }
.alert-warning h3 { color: #92400e; }
.alert-warning p { color: #b45309; }
