/* ============================================================
   BUNDA PAUD – Custom Components
   Tailwind-compatible custom classes
   Btn, Badge, Form, Card, Alert utilities
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap");

/* ── CSS VARIABLES ────────────────────────────── */
:root {
  --peach: #e8b4b8;
  --peach-dark: #d4989d;
  --peach-deeper: #b87878;
  --peach-light: #f0cdd0;
  --peach-pale: #f7e4e6;
  --peach-bg: #fdf0f1;

  --plum: #7c3aed;
  --plum-dark: #6d28d9;
  --plum-light: #a78bfa;
  --plum-bg: #f5f3ff;

  --navy: #0f172a;
  --navy-mid: #1e293b;
  --navy-light: #334155;

  --grad-main: linear-gradient(135deg, #e8b4b8 0%, #d4989d 50%, #b87878 100%);
  --blush: #e8b4b8;
  --blush-dark: #d4989d;
  --blush-deeper: #b87878;
  --grad-plum: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --grad-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-display: "Playfair Display", serif;
}

/* ── BASE ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── BUTTON BASE ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  vertical-align: middle;
}
.btn:focus-visible {
  outline: 3px solid #f0cdd0;
  outline-offset: 2px;
}
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── SIZES ──────────────────────────────────────── */
.btn-xs {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 7px;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  border-radius: 9px;
}
.btn-lg {
  padding: 13px 28px;
  font-size: 1rem;
  border-radius: 12px;
}
.btn-xl {
  padding: 15px 36px;
  font-size: 1.0625rem;
  border-radius: 14px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 9px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.btn-icon.btn-sm {
  padding: 6px;
  width: 32px;
  height: 32px;
}

/* ══════════════════════════════════════════════════
   SOLID BUTTONS
══════════════════════════════════════════════════ */

/* PRIMARY — Blush Pink Gradient */
.btn-primary {
  background: linear-gradient(135deg, #e8b4b8 0%, #d4989d 50%, #b87878 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(232, 180, 184, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(232, 180, 184, 0.55);
  filter: brightness(1.05);
}
.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.97);
  box-shadow: none;
}

/* PEACH — Soft Blush Solid */
.btn-peach {
  background: #e8b4b8;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(232, 180, 184, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.btn-peach:hover {
  background: #d4989d;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(232, 180, 184, 0.5);
}
.btn-peach:active {
  transform: translateY(0);
  background: #c48a8e;
  box-shadow: none;
}

/* PLUM — Violet */
.btn-plum {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.btn-plum:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(124, 58, 237, 0.45);
  filter: brightness(1.07);
}
.btn-plum:active {
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: none;
}

/* INFO — Sky Blue */
.btn-info {
  background: #0ea5e9;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.32);
}
.btn-info:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(14, 165, 233, 0.42);
}
.btn-info:active {
  transform: translateY(0);
  background: #0369a1;
  box-shadow: none;
}

/* SUCCESS — Green */
.btn-success {
  background: #16a34a;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.btn-success:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(22, 163, 74, 0.4);
}
.btn-success:active {
  transform: translateY(0);
  background: #166534;
  box-shadow: none;
}

/* WARNING — Amber */
.btn-warning {
  background: #f59e0b;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(245, 158, 11, 0.4);
}
.btn-warning:active {
  transform: translateY(0);
  background: #b45309;
  box-shadow: none;
}

/* DANGER — Red */
.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}
.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(220, 38, 38, 0.38);
}
.btn-danger:active {
  transform: translateY(0);
  background: #991b1b;
  box-shadow: none;
}

/* LIGHT — White/Gray */
.btn-light {
  background: #ffffff;
  color: #374151;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn-light:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.btn-light:active {
  transform: translateY(0);
  background: #f1f5f9;
  box-shadow: none;
}

/* DARK — Deep Navy/Charcoal */
.btn-dark {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}
.btn-dark:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.45);
}
.btn-dark:active {
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: none;
}

/* ══════════════════════════════════════════════════
   OUTLINE BUTTONS
══════════════════════════════════════════════════ */

.btn-outline-primary {
  background: transparent;
  color: #d4989d;
  border-color: #e8b4b8;
}
.btn-outline-primary:hover {
  background: linear-gradient(135deg, #e8b4b8 0%, #d4989d 50%, #b87878 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(232, 180, 184, 0.4);
}

.btn-outline-peach {
  background: transparent;
  color: #d4989d;
  border-color: #e8b4b8;
}
.btn-outline-peach:hover {
  background: #e8b4b8;
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 180, 184, 0.35);
}

.btn-outline-plum {
  background: transparent;
  color: #7c3aed;
  border-color: #7c3aed;
}
.btn-outline-plum:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-outline-info {
  background: transparent;
  color: #0ea5e9;
  border-color: #0ea5e9;
}
.btn-outline-info:hover {
  background: #0ea5e9;
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-outline-success {
  background: transparent;
  color: #16a34a;
  border-color: #16a34a;
}
.btn-outline-success:hover {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-outline-warning {
  background: transparent;
  color: #d97706;
  border-color: #f59e0b;
}
.btn-outline-warning:hover {
  background: #f59e0b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-outline-danger {
  background: transparent;
  color: #dc2626;
  border-color: #dc2626;
}
.btn-outline-danger:hover {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}

.btn-outline-dark {
  background: transparent;
  color: #1e293b;
  border-color: #334155;
}
.btn-outline-dark:hover {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
}

.btn-outline-light {
  background: transparent;
  color: #64748b;
  border-color: #e2e8f0;
}
.btn-outline-light:hover {
  background: #f8fafc;
  color: #1e293b;
}

/* ══════════════════════════════════════════════════
   GHOST BUTTONS (no border, transparent bg)
══════════════════════════════════════════════════ */

.btn-ghost {
  background: transparent;
  color: #64748b;
  border-color: transparent;
}
.btn-ghost:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.btn-ghost-peach {
  background: transparent;
  color: #d4989d;
  border-color: transparent;
}
.btn-ghost-peach:hover {
  background: #fdf0f1;
  color: #b87878;
}

.btn-ghost-danger {
  background: transparent;
  color: #dc2626;
  border-color: transparent;
}
.btn-ghost-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* ══════════════════════════════════════════════════
   SOFT / PASTEL BUTTONS (bg tinted, colored text)
══════════════════════════════════════════════════ */

.btn-soft-primary {
  background: #fdf0f1;
  color: #b87878;
  border-color: transparent;
}
.btn-soft-primary:hover {
  background: #f7e4e6;
  color: #9e5f5f;
  transform: translateY(-1px);
}

.btn-soft-success {
  background: #f0fdf4;
  color: #15803d;
  border-color: transparent;
}
.btn-soft-success:hover {
  background: #dcfce7;
  color: #14532d;
  transform: translateY(-1px);
}

.btn-soft-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: transparent;
}
.btn-soft-danger:hover {
  background: #fee2e2;
  color: #991b1b;
  transform: translateY(-1px);
}

.btn-soft-warning {
  background: #fffbeb;
  color: #d97706;
  border-color: transparent;
}
.btn-soft-warning:hover {
  background: #fef3c7;
  color: #b45309;
  transform: translateY(-1px);
}

.btn-soft-info {
  background: #f0f9ff;
  color: #0369a1;
  border-color: transparent;
}
.btn-soft-info:hover {
  background: #e0f2fe;
  color: #075985;
  transform: translateY(-1px);
}

.btn-soft-plum {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: transparent;
}
.btn-soft-plum:hover {
  background: #ede9fe;
  color: #5b21b6;
  transform: translateY(-1px);
}

/* ── BADGE ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-primary {
  background: var(--peach-bg);
  color: var(--peach-deeper);
}
.badge-success {
  background: #dcfce7;
  color: #15803d;
}
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-info {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-dark {
  background: #1e293b;
  color: #f1f5f9;
}
.badge-plum {
  background: var(--plum-bg);
  color: var(--plum-dark);
}
.badge-light {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ── FORM CONTROLS ────────────────────────────── */
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #1e293b;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(232, 180, 184, 0.15);
}
.form-control::placeholder {
  color: #94a3b8;
}
.form-control:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
select.form-control {
  cursor: pointer;
}
textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.form-group {
  margin-bottom: 16px;
}
.form-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}
.form-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 4px;
}

/* ── ALERTS ───────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert-success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.alert-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.alert-info {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}
.alert-peach {
  background: var(--peach-bg);
  color: var(--peach-deeper);
  border-color: var(--peach-pale);
}

/* ── CARD ─────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.card-body {
  padding: 24px;
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #1e293b;
}
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* ── TABLE ────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover td {
  background: #fafbfd;
}

/* ── SPINNER ──────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}
.spinner-dark {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #374151;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s, opacity 0.2s;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}
