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

/* ============================
   CSS VARIABLES
   ============================ */
:root {
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --primary: #b08968;
  --primary-light: #ddb892;
  --primary-dark: #7f5539;
  --accent: #d4a373;
  --accent-light: #faedcd;
  --bg-cream: #fefae0;
  --bg-warm: #faf5ef;
  --text-dark: #2d2013;
  --text-body: #4a3728;
  --text-muted-custom: #8b7355;
  --gold: #c9a96e;
  --gold-light: #f5e6c8;
  --rose: #c9184a;
  --rose-light: #fce4ec;
  --gradient-primary: linear-gradient(135deg, #b08968 0%, #d4a373 50%, #ddb892 100%);
  --gradient-hero: linear-gradient(135deg, #2d2013 0%, #4a3728 40%, #7f5539 100%);
  --shadow-soft: 0 4px 20px rgba(176, 137, 104, 0.12);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 40px rgba(176, 137, 104, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   BASE RESET
   ============================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-warm);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: var(--font-serif); color: var(--text-dark); }

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================
   TEXT GRADIENT UTILITY
   ============================ */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================
   NAVBAR
   ============================ */
#main-navbar {
  background: var(--gradient-hero);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(176, 137, 104, 0.3);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

#main-navbar .nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

#main-navbar .nav-link:hover,
#main-navbar .nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================
   SECTION PAGES
   ============================ */
.section-page {
  display: none;
  animation: fadeInSection 0.4s ease-out;
}
.section-page.active { display: block; }

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

.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

/* ============================
   HERO SECTION
   ============================ */
.hero-section {
  background: var(--gradient-hero);
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  z-index: 1;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  max-width: 550px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-badge strong { font-size: 22px; font-weight: 800; color: var(--primary-light); }
.stat-badge span { font-size: 12px; opacity: 0.7; }

/* Hero Preview Card */
.hero-preview-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  text-align: center;
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.preview-ornament {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(212, 163, 115, 0.3);
}
.preview-ornament.top-left { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.preview-ornament.top-right { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.preview-ornament.bottom-left { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.preview-ornament.bottom-right { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.preview-label {
  font-family: var(--font-sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--primary-light);
  margin-bottom: 8px;
}

.preview-names {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.preview-date {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.preview-loc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================
   FEATURE CARDS
   ============================ */
.feature-card {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.08);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
  height: 100%;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}
.feature-card h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p { color: var(--text-muted-custom); font-size: 14px; }

/* ============================
   FILTER BUTTONS
   ============================ */
.btn-filter {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.15);
  color: var(--text-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 999px;
  transition: all var(--transition);
}
.btn-filter:hover, .btn-filter.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(176, 137, 104, 0.3);
  transform: translateY(-2px);
}

/* ============================
   TEMPLATE CARDS
   ============================ */
.template-card {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-soft);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.template-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.template-preview {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.template-preview-inner {
  text-align: center;
  color: white;
  z-index: 2;
  padding: 20px;
}

.template-preview-inner .tmpl-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.8;
  margin-bottom: 4px;
}
.template-preview-inner .tmpl-names {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.template-preview-inner .tmpl-date {
  font-size: 13px;
  opacity: 0.8;
}

.template-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.template-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.template-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.template-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.template-desc {
  font-size: 13px;
  color: var(--text-muted-custom);
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.template-feature-tag {
  background: var(--accent-light);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(176, 137, 104, 0.1);
}

.template-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* ============================
   BUTTONS (CUSTOM)
   ============================ */
.btn-primary {
  background: var(--gradient-primary) !important;
  border: none !important;
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(176, 137, 104, 0.3);
  transition: all var(--transition);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176, 137, 104, 0.45);
}

.btn-outline-primary {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  font-weight: 600;
}
.btn-outline-primary:hover {
  background: var(--gradient-primary) !important;
  color: white !important;
  border-color: transparent !important;
}

.btn-outline-light {
  border-color: rgba(255,255,255,0.3) !important;
  color: white !important;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.5) !important;
}

/* ============================
   MODAL OVERRIDES
   ============================ */
.modal-content {
  border-radius: var(--radius) !important;
}
.modal-header { padding: 24px 24px 12px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 12px 24px 24px; }

/* ============================
   CARDS (ORDERS/INVITATIONS)
   ============================ */
.order-card {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
}
.order-card:hover {
  box-shadow: var(--shadow-card);
}

.invitation-card {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
  margin-bottom: 16px;
}
.invitation-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.invitation-header {
  padding: 24px;
  color: white;
  text-align: center;
}

.invitation-body {
  padding: 24px;
}

/* ============================
   ADMIN PANEL
   ============================ */
.admin-sidebar-col {
  padding: 0;
}

.admin-sidebar {
  background: white;
  border-right: 1px solid rgba(176, 137, 104, 0.1);
  min-height: calc(100vh - 70px);
  padding: 24px 16px;
  position: sticky;
  top: 70px;
}

.sidebar-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-muted-custom) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.admin-nav:hover {
  background: var(--accent-light) !important;
  color: var(--primary-dark) !important;
}
.admin-nav.active {
  background: var(--gradient-primary) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(176, 137, 104, 0.3);
}

.admin-tab-content {
  display: none;
  animation: fadeInSection 0.3s ease-out;
}
.admin-tab-content.active { display: block; }

/* Admin Stats Cards */
.stat-card-admin {
  background: white;
  border: 1px solid rgba(176, 137, 104, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
}
.stat-card-admin:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.stat-icon-admin {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-label-admin {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted-custom);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================
   CHART
   ============================ */
.chart-container {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding-top: 10px;
  border-bottom: 2px solid rgba(176, 137, 104, 0.1);
  gap: 12px;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-fill {
  width: 100%;
  max-width: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 1s ease-out;
  min-height: 4px;
  position: relative;
  box-shadow: 0 2px 8px rgba(176, 137, 104, 0.2);
}

.chart-bar-fill:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.chart-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted-custom);
}

/* ============================
   TABLES (ADMIN)
   ============================ */
.table { font-size: 14px; }
.table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-muted-custom);
  border-bottom-width: 2px;
}
.table td { vertical-align: middle; }

/* ============================
   BADGES STATUS
   ============================ */
.badge-payment-belum { background: #fee2e2; color: #b91c1c; }
.badge-payment-menunggu { background: #fef3c7; color: #92400e; }
.badge-payment-verified { background: #d1fae5; color: #065f46; }
.badge-payment-rejected { background: #fce4ec; color: #880e4f; }
.badge-order-pending { background: #fef3c7; color: #92400e; }
.badge-order-process { background: #dbeafe; color: #1e40af; }
.badge-order-active { background: #d1fae5; color: #065f46; }
.badge-order-done { background: #e0e7ff; color: #3730a3; }
.badge-order-cancel { background: #fee2e2; color: #b91c1c; }

/* ============================
   FOOTER
   ============================ */
.site-footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 32px 0;
  margin-top: 60px;
}

/* ============================
   FORM OVERRIDES
   ============================ */
.form-control, .form-select {
  border: 1px solid rgba(176, 137, 104, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: all var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(176, 137, 104, 0.12);
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted-custom);
}

/* ============================
   TOAST OVERRIDE
   ============================ */
.custom-toast {
  background: white;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  animation: slideInToast 0.4s ease-out;
  min-width: 300px;
  color: var(--text-dark);
}
.custom-toast.toast-success { border-left-color: #10b981; }
.custom-toast.toast-danger { border-left-color: #ef4444; }
.custom-toast.toast-warning { border-left-color: #f59e0b; }
.custom-toast.toast-info { border-left-color: #0ea5e9; }

@keyframes slideInToast {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================
   EMPTY STATE
   ============================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(176, 137, 104, 0.08);
}
.empty-state i { font-size: 48px; color: var(--primary-light); margin-bottom: 16px; display: block; }
.empty-state h5 { font-family: var(--font-serif); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted-custom); font-size: 14px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 992px) {
  .hero-title { font-size: 38px; }
  .hero-section { min-height: auto; padding: 60px 0; }
  .admin-sidebar {
    min-height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid rgba(176, 137, 104, 0.1);
  }
  .admin-sidebar .nav { flex-direction: row; flex-wrap: wrap; }
  .section-title { font-size: 28px; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 30px; }
  .stat-badge { padding: 8px 12px; }
  .stat-badge strong { font-size: 18px; }
  .template-preview { height: 180px; }
}
