/* ============================================================
   ShareGoodness — Pink Glassmorphism Theme
   Design: Pink Gradient Background + Glass UI Components
   Font: Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════════════════════════
   1. CSS VARIABLES — Pink Palette
══════════════════════════════════════════════════════════════ */
:root {
  /* Pink Palette */
  --pink-50:  #fdf2f8;
  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;
  --pink-300: #f9a8d4;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --pink-700: #be185d;
  --pink-800: #9d174d;
  --pink-900: #831843;

  /* Rose / Deep Pink */
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;

  /* Fuchsia accent */
  --fuchsia-400: #e879f9;
  --fuchsia-500: #d946ef;
  --fuchsia-600: #c026d3;

  /* Neutrals (used for text on glass) */
  --white:     #ffffff;
  --gray-50:   #fafafa;
  --gray-100:  #f5f5f5;
  --gray-200:  #e5e5e5;
  --gray-300:  #d4d4d4;
  --gray-400:  #a3a3a3;
  --gray-500:  #737373;
  --gray-600:  #525252;
  --gray-700:  #404040;
  --gray-800:  #262626;
  --gray-900:  #171717;
  --black:     #0a0a0a;

  /* Glass Variables */
  --glass-white-10:  rgba(255, 255, 255, 0.10);
  --glass-white-15:  rgba(255, 255, 255, 0.15);
  --glass-white-20:  rgba(255, 255, 255, 0.20);
  --glass-white-70:  rgba(255, 255, 255, 0.70);
  --glass-white-85:  rgba(255, 255, 255, 0.85);
  --glass-white-92:  rgba(255, 255, 255, 0.92);
  --glass-border:    rgba(255, 255, 255, 0.30);
  --glass-border-sm: rgba(255, 255, 255, 0.20);
  --glass-shadow:    0 8px 32px rgba(190, 24, 93, 0.15);
  --glass-shadow-lg: 0 20px 60px rgba(190, 24, 93, 0.25);

  /* Gradients */
  --gradient-bg:      linear-gradient(135deg, #f953c6 0%, #b91d73 40%, #ff758c 100%);
  --gradient-primary: linear-gradient(135deg, var(--pink-500) 0%, var(--rose-500) 100%);
  --gradient-accent:  linear-gradient(135deg, var(--fuchsia-400) 0%, var(--pink-600) 100%);
  --gradient-soft:    linear-gradient(135deg, rgba(249,83,198,0.8) 0%, rgba(185,29,115,0.8) 100%);

  /* Status Colors */
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-600: #16a34a;
  --green-700: #15803d;
  --yellow-50: #fffbeb;
  --yellow-100:#fef3c7;
  --yellow-600:#d97706;
  --blue-50:   #eff6ff;
  --blue-100:  #dbeafe;
  --blue-600:  #2563eb;
  --red-50:    #fef2f2;
  --red-100:   #fee2e2;
  --red-600:   #dc2626;
  --purple-50: #faf5ff;
  --purple-100:#f3e8ff;
  --purple-600:#9333ea;
  --orange-50: #fff7ed;
  --orange-100:#ffedd5;
  --orange-600:#ea580c;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-3xl:  28px;
  --radius-full: 9999px;

  /* Layout */
  --navbar-height: 68px;
  --container-max: 1200px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   350ms ease;
}

/* ══════════════════════════════════════════════════════════════
   2. RESET & BASE
══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-800);
  min-height: 100vh;
  background: var(--gradient-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Decorative blobs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: rgba(249, 168, 212, 0.6);
}

body::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -150px;
  background: rgba(244, 114, 182, 0.5);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════════════════════════
   3. LAYOUT
══════════════════════════════════════════════════════════════ */
.app-main {
  min-height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  position: relative;
  z-index: 1;
}

.page-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

@media (max-width: 768px) {
  .page-container { padding: var(--space-5) var(--space-4); }
}

/* ══════════════════════════════════════════════════════════════
   4. NAVBAR — Glass
══════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(185, 29, 115, 0.25);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  box-shadow: 0 4px 24px rgba(185, 29, 115, 0.2);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  gap: var(--space-4);
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0,0,0,0.15);
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--white);
  color: var(--pink-700);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  color: var(--white);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.25rem;
  border: 1px solid rgba(255,255,255,0.35);
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--glass-white-15);
  color: var(--white);
  border-color: var(--glass-border-sm);
}

.nav-link--active {
  background: var(--white) !important;
  color: var(--pink-700) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Navbar actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Cart link */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.9);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.cart-link:hover {
  background: var(--glass-white-15);
  color: var(--white);
}

.cart-link--active { color: var(--white); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--white);
  color: var(--pink-700);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid rgba(185,29,115,0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Mobile toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.navbar-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle--open span:nth-child(2) { opacity: 0; }
.navbar-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  .navbar-nav {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(185, 29, 115, 0.92);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
    gap: var(--space-1);
    z-index: 999;
  }
  .navbar-nav--open { display: flex; }
  .nav-link { width: 100%; justify-content: center; }
  .navbar-inner { padding: 0 var(--space-4); }
}

/* ══════════════════════════════════════════════════════════════
   5. PAGE HEADER
══════════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.page-subtitle {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  margin-top: var(--space-1);
}

.header-date {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  padding-top: var(--space-1);
}

/* ══════════════════════════════════════════════════════════════
   6. CARDS — Glassmorphism
══════════════════════════════════════════════════════════════ */
.card {
  background: var(--glass-white-85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
  flex-wrap: wrap;
  gap: var(--space-3);
  background: rgba(255,255,255,0.5);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pink-700);
}

.card-body { padding: var(--space-6); }

/* ══════════════════════════════════════════════════════════════
   7. STAT CARDS — Glass with Pink accent
══════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .stats-grid, .report-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .stats-grid, .report-stats { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--glass-white-20);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5) var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-lg);
}

.stat-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }

.stat-content { flex: 1; min-width: 0; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-1);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-value--sm { font-size: 1.1rem; letter-spacing: -0.01em; }
.stat-value--rupiah { font-size: 1.25rem; }

.stat-suffix {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

/* Stat card variants */
.stat-card--blue   { border-left: 3px solid rgba(147, 197, 253, 0.7); }
.stat-card--yellow { border-left: 3px solid rgba(253, 224, 71, 0.7); }
.stat-card--green  { border-left: 3px solid rgba(134, 239, 172, 0.7); }
.stat-card--purple { border-left: 3px solid rgba(233, 213, 255, 0.7); }

/* ══════════════════════════════════════════════════════════════
   8. TABLES — Glass rows
══════════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pink-700);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1.5px solid rgba(236, 72, 153, 0.15);
  white-space: nowrap;
  background: rgba(253, 242, 248, 0.6);
}

.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(236, 72, 153, 0.08);
  color: var(--gray-700);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(249, 168, 212, 0.15);
}

/* Total row */
.total-row td {
  padding: var(--space-4);
  border-top: 2px solid rgba(236, 72, 153, 0.2) !important;
  border-bottom: none !important;
  background: rgba(252, 231, 243, 0.5);
}

/* ══════════════════════════════════════════════════════════════
   9. BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.1); }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — Pink gradient */
.btn--primary {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(219, 39, 119, 0.35);
}
.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.5);
  transform: translateY(-1px);
}

/* Outline — Glass style */
.btn--outline {
  background: var(--glass-white-20);
  color: var(--pink-700);
  border-color: rgba(236, 72, 153, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--outline:hover {
  background: var(--glass-white-70);
  border-color: rgba(236, 72, 153, 0.5);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--pink-600);
  border-color: transparent;
}
.btn--ghost:hover {
  background: rgba(249, 168, 212, 0.2);
  color: var(--pink-800);
}

/* Danger */
.btn--danger {
  background: var(--red-600);
  color: var(--white);
  border-color: var(--red-600);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.btn--danger:hover { background: #b91c1c; }

/* Danger outline */
.btn--danger-outline {
  background: rgba(254, 242, 242, 0.6);
  color: var(--red-600);
  border-color: rgba(220, 38, 38, 0.25);
}
.btn--danger-outline:hover {
  background: var(--red-50);
  border-color: var(--red-600);
}

/* Sizes */
.btn--sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-xl);
}

.btn--full { width: 100%; }

/* Icon buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--pink-400);
}
.btn-icon:hover {
  background: rgba(249, 168, 212, 0.2);
  color: var(--pink-700);
}
.btn-icon--danger:hover {
  background: var(--red-50);
  color: var(--red-600);
  border-color: rgba(220,38,38,0.2);
}

/* ══════════════════════════════════════════════════════════════
   10. FORMS
══════════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pink-700);
  letter-spacing: 0.01em;
}

.required { color: var(--rose-500); }

.form-control {
  width: 100%;
  padding: 0.625rem var(--space-3);
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

.form-control:hover { border-color: rgba(236, 72, 153, 0.45); }

.form-control:focus {
  border-color: var(--pink-400);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.form-control--error {
  border-color: var(--red-600) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08) !important;
}

.form-control::placeholder { color: rgba(115, 115, 115, 0.7); }

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23db2777' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--rose-500);
  min-height: 1.1em;
}

.form-error-global {
  font-size: 0.875rem;
  color: var(--red-600);
  background: rgba(254, 242, 242, 0.8);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.form-error-global:not(:empty) { display: block; }

/* Input with prefix */
.input-prefix-wrapper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
  background: rgba(255,255,255,0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.input-prefix-wrapper:focus-within {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}
.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  background: rgba(252, 231, 243, 0.8);
  border-right: 1.5px solid rgba(236, 72, 153, 0.2);
  font-size: 0.9375rem;
  color: var(--pink-600);
  font-weight: 600;
  white-space: nowrap;
}
.form-control.has-prefix {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.form-control.has-prefix:focus { box-shadow: none; }

/* Input with toggle */
.input-wrapper { position: relative; }
.input-wrapper .form-control { padding-right: 2.5rem; }
.toggle-pw {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--pink-400);
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: var(--pink-700); }

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Toggle switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider { background: var(--gradient-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 0.875rem; font-weight: 500; color: var(--pink-700); }

/* ══════════════════════════════════════════════════════════════
   11. BADGES
══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge--success  { background: rgba(220, 252, 231, 0.9); color: var(--green-700);   border: 1px solid rgba(134,239,172,0.4); }
.badge--warning  { background: rgba(254, 243, 199, 0.9); color: var(--yellow-600);  border: 1px solid rgba(253,224,71,0.4); }
.badge--danger   { background: rgba(254, 226, 226, 0.9); color: var(--red-600);     border: 1px solid rgba(252,165,165,0.4); }
.badge--info     { background: rgba(219, 234, 254, 0.9); color: var(--blue-600);    border: 1px solid rgba(147,197,253,0.4); }
.badge--pending  { background: rgba(255, 237, 213, 0.9); color: var(--orange-600);  border: 1px solid rgba(253,186,116,0.4); }
.badge--shipping { background: rgba(243, 232, 255, 0.9); color: var(--purple-600);  border: 1px solid rgba(216,180,254,0.4); }
.badge--default  { background: rgba(252, 231, 243, 0.9); color: var(--pink-700);    border: 1px solid rgba(249,168,212,0.4); }

/* ══════════════════════════════════════════════════════════════
   12. TOOLBAR
══════════════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.search-box { position: relative; flex: 1; max-width: 360px; }

.search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--pink-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.5625rem var(--space-3) 0.5625rem 2.25rem;
  font-size: 0.875rem;
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: var(--radius-xl);
  background: var(--glass-white-85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--gray-800);
  outline: none;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--pink-400);
  background: var(--glass-white-92);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.search-input::placeholder { color: rgba(163, 163, 163, 0.8); }

/* Filter pills */
.filter-pills {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pill {
  padding: 0.4rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: var(--glass-white-15);
  border: 1.5px solid var(--glass-border-sm);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pill:hover {
  background: var(--glass-white-20);
  border-color: var(--glass-border);
  color: var(--white);
}

.pill--active {
  background: var(--white);
  color: var(--pink-700);
  border-color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════════════════════════════
   13. QTY CONTROL
══════════════════════════════════════════════════════════════ */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.75);
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 231, 243, 0.7);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pink-600);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.qty-btn:hover { background: rgba(249, 168, 212, 0.5); color: var(--pink-800); }

.qty-input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  outline: none;
  background: transparent;
  font-family: inherit;
  padding: 0 var(--space-2);
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type=number] { -moz-appearance: textfield; }

.qty-control--sm .qty-btn { width: 28px; height: 28px; }
.qty-control--sm .qty-input { width: 40px; }

/* ══════════════════════════════════════════════════════════════
   14. CODE TAG
══════════════════════════════════════════════════════════════ */
.code-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: rgba(252, 231, 243, 0.8);
  color: var(--pink-700);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.02em;
  border: 1px solid rgba(249, 168, 212, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   15. PRICE & STOCK
══════════════════════════════════════════════════════════════ */
.price-cell { font-weight: 600; color: var(--pink-800); }
.stock-ok   { font-weight: 600; color: var(--green-600); }
.stock-empty { font-weight: 600; color: var(--red-600); }

/* ══════════════════════════════════════════════════════════════
   16. MODAL
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(131, 24, 67, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal--open {
  opacity: 1;
  pointer-events: all;
}

.modal--open .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-box {
  background: rgba(255, 255, 255, 0.93);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  box-shadow: var(--glass-shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: all var(--transition-normal);
}

.modal-box--sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
  background: rgba(253, 242, 248, 0.6);
}

.modal-title { font-size: 1rem; font-weight: 700; color: var(--pink-800); }

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--pink-400);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}
.modal-close:hover { background: rgba(249, 168, 212, 0.2); color: var(--pink-700); }

.modal-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(236, 72, 153, 0.1);
  margin-top: var(--space-2);
}

/* ══════════════════════════════════════════════════════════════
   17. AUTH PAGE
══════════════════════════════════════════════════════════════ */
.auth-wrapper {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}

.auth-card {
  background: var(--glass-white-85);
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--glass-shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(249,168,212,0.4) 0%, transparent 70%);
  pointer-events: none;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(219,39,119,0.4);
}

.auth-app-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pink-800);
  letter-spacing: -0.02em;
}

.auth-title { font-size: 1.5rem; font-weight: 700; color: var(--pink-900); margin-bottom: var(--space-1); }
.auth-subtitle { font-size: 0.875rem; color: var(--pink-500); margin-bottom: var(--space-6); }
.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }

.back-link {
  display: block;
  text-align: center;
  margin-top: var(--space-5);
  font-size: 0.875rem;
  color: var(--pink-500);
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { color: var(--pink-800); }

/* ══════════════════════════════════════════════════════════════
   18. CART PAGE
══════════════════════════════════════════════════════════════ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 1024px) {
  .cart-layout { grid-template-columns: 1fr; }
}

.checkout-form { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }

.order-summary {
  background: rgba(252, 231, 243, 0.6);
  border: 1px solid rgba(249, 168, 212, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--pink-800);
}

.summary-total {
  padding-top: var(--space-3);
  border-top: 1.5px solid rgba(249, 168, 212, 0.4);
  font-size: 1rem;
  color: var(--pink-900);
}

/* ══════════════════════════════════════════════════════════════
   19. SUCCESS PAGE
══════════════════════════════════════════════════════════════ */
.success-wrapper {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}

.success-card {
  background: var(--glass-white-85);
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  padding: var(--space-12) var(--space-10);
  width: 100%;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--glass-shadow-lg);
}

.success-checkmark { margin-bottom: var(--space-6); }
.checkmark-circle { width: 80px; height: 80px; margin: 0 auto; }
.checkmark-svg { width: 80px; height: 80px; }
.checkmark-circle-bg {
  stroke: var(--pink-500);
  stroke-width: 2;
  fill: rgba(252, 231, 243, 0.6);
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: drawCircle 0.6s ease forwards;
}
.checkmark-check {
  stroke: var(--pink-600);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.4s ease 0.5s forwards;
}

@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

.success-title { font-size: 1.75rem; font-weight: 700; color: var(--pink-800); margin-bottom: var(--space-3); }
.success-subtitle { font-size: 0.9375rem; color: var(--pink-600); line-height: 1.6; margin-bottom: var(--space-6); }

.invoice-box {
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.35);
}
.invoice-label { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.75); letter-spacing: 0.1em; text-transform: uppercase; }
.invoice-number { font-size: 1.5rem; font-weight: 700; font-family: 'SF Mono', 'Fira Code', monospace; letter-spacing: 0.04em; }

.success-info { text-align: left; display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-8); }
.info-item { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 0.875rem; color: var(--pink-700); line-height: 1.4; }
.info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.success-actions { display: flex; justify-content: center; }

/* ══════════════════════════════════════════════════════════════
   20. ORDER DETAIL
══════════════════════════════════════════════════════════════ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }

.info-list { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); }
.info-row { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-2); align-items: start; }
.info-row dt { font-size: 0.78rem; font-weight: 700; color: var(--pink-500); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 2px; }
.info-row dd { font-size: 0.9375rem; color: var(--gray-800); }

.status-update-group { display: flex; flex-direction: column; }
.wa-link { color: var(--green-600); font-weight: 600; text-decoration: none; }
.wa-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   21. REPORTS
══════════════════════════════════════════════════════════════ */
.period-selector {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  background: var(--glass-white-20);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: var(--space-1);
  border-radius: var(--radius-2xl);
  width: fit-content;
}

.period-btn {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: transparent;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}
.period-btn:hover { color: var(--white); background: var(--glass-white-15); }
.period-btn--active {
  background: var(--white);
  color: var(--pink-700);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ══════════════════════════════════════════════════════════════
   22. STATUS SELECT
══════════════════════════════════════════════════════════════ */
.status-select {
  padding: 0.3rem 2rem 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: var(--radius-md);
  background-color: rgba(255,255,255,0.8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23db2777' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 14px;
  appearance: none;
  color: var(--pink-700);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition-fast);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.status-select:focus { outline: none; border-color: var(--pink-400); }

.action-btns { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════
   23. EMPTY STATE
══════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-4);
  text-align: center;
  color: var(--pink-400);
}

.empty-icon { font-size: 3rem; margin-bottom: var(--space-4); opacity: 0.7; }
.empty-state p { font-size: 0.9375rem; color: var(--pink-500); }

/* ══════════════════════════════════════════════════════════════
   24. LOADING
══════════════════════════════════════════════════════════════ */
.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: var(--space-4);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 0.875rem; color: rgba(255,255,255,0.8); }

/* Skeleton — pink tinted */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(249, 168, 212, 0.3) 25%,
    rgba(249, 168, 212, 0.5) 50%,
    rgba(249, 168, 212, 0.3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  min-height: 16px;
  width: 100%;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════════
   25. TOAST
══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: rgba(131, 24, 67, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(249, 168, 212, 0.3);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: 0 8px 32px rgba(131, 24, 67, 0.4);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  max-width: 340px;
}

.toast--show { transform: translateY(0); opacity: 1; }
.toast--success .toast__icon { color: #86efac; }
.toast--error {
  background: rgba(185, 28, 28, 0.92);
  border-color: rgba(252, 165, 165, 0.3);
}
.toast--info .toast__icon { color: #93c5fd; }
.toast__icon { font-style: normal; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }

@media (max-width: 480px) {
  .toast { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); max-width: none; }
}

/* ══════════════════════════════════════════════════════════════
   26. ANIMATIONS
══════════════════════════════════════════════════════════════ */
.fade-in {
  animation: fadeIn 0.35s ease forwards;
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   27. UTILITIES
══════════════════════════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--pink-400); }
.text-sm      { font-size: 0.875rem; }
.font-mono    { font-family: 'SF Mono', 'Fira Code', monospace; }

/* ══════════════════════════════════════════════════════════════
   28. RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .page-title { font-size: 1.3rem; }
  .auth-card { padding: var(--space-6); }
  .success-card { padding: var(--space-8) var(--space-5); }
  .invoice-number { font-size: 1.2rem; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: 100%; }
  .modal-box { border-radius: var(--radius-2xl); }
  .period-selector { width: 100%; justify-content: center; }
  .page-header { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════════
   29. AUTH DIVIDER
══════════════════════════════════════════════════════════════ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--pink-300);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(236, 72, 153, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   30. USER NAVBAR DROPDOWN
══════════════════════════════════════════════════════════════ */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--glass-white-15);
  border: 1px solid var(--glass-border-sm);
  border-radius: var(--radius-xl);
  padding: 0.35rem 0.85rem 0.35rem 0.5rem;
  color: var(--white);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  font-family: inherit;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.user-menu-btn:hover {
  background: var(--glass-white-20);
  border-color: var(--glass-border);
}

.user-avatar-sm {
  width: 26px;
  height: 26px;
  background: var(--white);
  color: var(--pink-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-menu-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.user-menu--open .user-chevron { transform: rotate(180deg); }

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(236, 72, 153, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(185, 29, 115, 0.2);
  overflow: hidden;
  z-index: 500;
}
.user-menu--open .user-menu-dropdown { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast);
}
.dropdown-item:hover {
  background: rgba(252, 231, 243, 0.7);
  color: var(--pink-700);
}
.dropdown-item--danger { color: var(--red-600); }
.dropdown-item--danger:hover {
  background: rgba(254, 242, 242, 0.8);
  color: var(--red-600);
}
.dropdown-divider {
  height: 1px;
  background: rgba(236, 72, 153, 0.1);
  margin: var(--space-1) 0;
}

/* ══════════════════════════════════════════════════════════════
   31. LOGIN / REGISTER BANNERS
══════════════════════════════════════════════════════════════ */
.login-prompt-banner {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  text-align: center;
}
.login-prompt-banner a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
}

.user-info-banner {
  padding: var(--space-3) var(--space-4);
  background: rgba(249, 168, 212, 0.25);
  border: 1px solid rgba(249, 168, 212, 0.4);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--pink-800);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ══════════════════════════════════════════════════════════════
   32. PAYMENT PAGE LAYOUT
══════════════════════════════════════════════════════════════ */
.payment-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 1024px) {
  .payment-layout { grid-template-columns: 1fr; }
}

/* ── Bank Cards ──────────────────────────────────────────── */
.bank-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(249, 168, 212, 0.35);
  border-radius: var(--radius-xl);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}
.bank-card:hover {
  border-color: rgba(236, 72, 153, 0.4);
  background: rgba(255,255,255,0.8);
}
.bank-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pink-700);
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bank-norek {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--gray-800);
  letter-spacing: 0.08em;
  flex: 1;
}
.bank-atas {
  font-size: 0.78rem;
  color: var(--pink-500);
  white-space: nowrap;
}

.bank-card--compact {
  padding: var(--space-3) var(--space-4);
  flex-direction: row;
  gap: var(--space-3);
}
.bank-card--compact .bank-norek { font-size: 0.95rem; }

.payment-note {
  font-size: 0.8125rem;
  color: var(--pink-600);
  background: rgba(252, 231, 243, 0.6);
  border: 1px solid rgba(249, 168, 212, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  line-height: 1.5;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ── Upload Dropzone ──────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(253, 242, 248, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.upload-dropzone:hover {
  border-color: var(--pink-400);
  background: rgba(252, 231, 243, 0.5);
}
.dropzone--drag {
  border-color: var(--pink-500) !important;
  background: rgba(249, 168, 212, 0.2) !important;
  transform: scale(1.01);
}
.upload-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.upload-text {
  font-weight: 600;
  color: var(--pink-700);
  margin-bottom: var(--space-1);
  font-size: 0.9375rem;
  word-break: break-all;
}
.upload-hint { font-size: 0.8rem; color: var(--pink-400); }

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: rgba(249, 168, 212, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.5s ease;
}

/* ══════════════════════════════════════════════════════════════
   33. SUCCESS PAGE — NEXT STEPS
══════════════════════════════════════════════════════════════ */
.next-steps {
  text-align: left;
  background: rgba(252, 231, 243, 0.5);
  border: 1px solid rgba(249, 168, 212, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.next-steps-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pink-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.875rem;
  color: var(--gray-700);
}
.step-item strong {
  display: block;
  color: var(--pink-800);
  font-weight: 600;
  margin-bottom: 2px;
}
.step-item p { font-size: 0.8rem; color: var(--pink-500); margin: 0; }
.step-num {
  width: 26px;
  height: 26px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(219, 39, 119, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   34. PROFILE PAGE GRID
══════════════════════════════════════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════════
   35. MOBILE RESPONSIVE — Phone Precision
   Breakpoints: 480px (small phone), 640px (large phone), 768px (tablet)
══════════════════════════════════════════════════════════════ */

/* ── Global Mobile Base ── */
@media (max-width: 768px) {

  /* Page padding reduced on mobile */
  .page-container {
    padding: var(--space-4) var(--space-3);
  }

  /* Page header stack */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .page-title { font-size: 1.5rem; }
  .page-subtitle { font-size: 0.85rem; }

  /* Cards: smaller padding on mobile */
  .card {
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  .card-header, .card-body {
    padding: var(--space-3) var(--space-4);
  }
  .card-title { font-size: 1rem; }

  /* Tables: horizontal scroll on mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
  .table {
    min-width: 480px;
    font-size: 0.82rem;
  }
  .table th, .table td {
    padding: 0.6rem 0.75rem;
  }

  /* Buttons: full-width on mobile */
  .btn--full { width: 100%; display: block; }
  .btn { font-size: 0.9rem; padding: 0.6rem 1rem; min-height: 44px; }
  .btn--lg { padding: 0.85rem 1.25rem; font-size: 1rem; }

  /* Form controls: bigger touch targets */
  .form-control {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom */
    padding: 0.6rem 0.875rem;
  }
  textarea.form-control { min-height: auto; }

  .form-group { margin-bottom: 1rem; }
  .form-label { font-size: 0.875rem; }

  /* Action buttons row: stack vertically */
  .action-btns {
    flex-direction: column;
    gap: 0.4rem;
  }

  /* Stats grid: 2 columns on mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .stat-value { font-size: 1.5rem; }

  /* Cart layout: single column */
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Payment layout: single column */
  .payment-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Order summary row */
  .order-summary { padding: 0.75rem; }
  .summary-row { font-size: 0.9rem; }

  /* Modals: near full screen on mobile */
  .modal-box {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: auto;
    border-radius: 16px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-overlay {
    padding: 1rem 0.5rem;
    align-items: flex-end; /* slide up from bottom on mobile */
  }
  .modal-header { padding: 1rem 1.25rem 0.75rem; }
  .modal-body   { padding: 0.75rem 1.25rem; }
  .modal-footer { padding: 0.75rem 1.25rem 1rem; gap: 0.5rem; }
  .modal-footer .btn { flex: 1; }

  /* Toast: bottom of screen */
  .toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    top: auto;
    transform: none;
    text-align: center;
    font-size: 0.875rem;
  }

  /* Bank card: compact */
  .bank-card {
    padding: 0.875rem 1rem;
  }
  .bank-norek { font-size: 1.1rem; }

  /* Empty state */
  .empty-icon { font-size: 2.5rem; }

  /* Back link */
  .back-link { font-size: 0.875rem; }

  /* Info list */
  .info-row { flex-direction: column; gap: 0.15rem; }
  .info-row dt { font-size: 0.78rem; }
  .info-row dd { font-size: 0.9rem; }

}

/* ── Small Phone: 480px and below ── */
@media (max-width: 480px) {

  /* Navbar: compact */
  .navbar-inner {
    padding: 0 0.875rem;
    height: 54px;
  }
  .navbar-brand { font-size: 1rem; }
  .navbar-brand-icon { width: 28px; height: 28px; font-size: 0.85rem; }

  /* Nav links: smaller */
  .navbar-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  /* Page container */
  .page-container { padding: var(--space-3) var(--space-2); }

  /* Page title */
  .page-title { font-size: 1.25rem; }

  /* Cards tighter */
  .card-header, .card-body { padding: var(--space-3); }

  /* Stats: 2 per row even on small phones */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .stat-card { padding: 0.875rem 0.75rem; }
  .stat-value { font-size: 1.3rem; }
  .stat-label { font-size: 0.72rem; }

  /* Table: even smaller font */
  .table { font-size: 0.78rem; min-width: 420px; }
  .table th, .table td { padding: 0.5rem 0.6rem; }

  /* Form: full width buttons */
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }

  /* Modal: full screen on small phones */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
  }

  /* Checkout form */
  .checkout-form { padding: var(--space-3); }

  /* User menu dropdown */
  .user-menu-dropdown {
    right: 0;
    left: auto;
    min-width: 200px;
  }

}

/* ── Navbar Mobile Menu ── */
@media (max-width: 640px) {

  /* Hide desktop nav, show mobile menu */
  .navbar-nav {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(157, 23, 77, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .navbar-nav.nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar-nav a {
    color: white !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    text-align: left;
  }
  .navbar-nav a:hover,
  .navbar-nav a.active {
    background: rgba(255,255,255,0.15);
  }

  /* Hamburger button */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
  }
  .hamburger:hover { background: rgba(255,255,255,0.1); }
  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }
  .hamburger.is-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.is-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.is-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Hide cart badge text label on tiny screens */
  .navbar-actions .cart-link { position: relative; }

}

/* ── Hide hamburger on desktop ── */
@media (min-width: 641px) {
  .hamburger { display: none !important; }
}

/* ── Smooth scroll for mobile ── */
html { scroll-behavior: smooth; }

/* ── Touch-friendly minimum tap size ── */
a, button, [role="button"],
input[type="checkbox"], input[type="radio"] {
  min-height: 44px;
}
input[type="checkbox"], input[type="radio"] {
  min-height: auto;
  width: 18px;
  height: 18px;
}

/* ── Rekening Skeleton (checkout) ── */
.rekening-skeleton {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1rem 1.125rem;
}

/* ── Rekening Option Card (checkout picker) ── */
.rekening-option {
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.rekening-option:hover {
  border-color: var(--pink-300);
  background: var(--pink-50);
}
.rekening-option--active {
  border-color: var(--pink-500) !important;
  background: var(--pink-50) !important;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}
.rekening-option--active .rekening-check {
  color: var(--pink-600);
}
.rekening-check {
  color: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  transition: color 0.2s;
  flex-shrink: 0;
}

/* ── Old rekening-option-card (kept for compat) ── */
.rekening-option-card { border-radius: 12px; padding: 0.875rem 1rem; cursor: pointer; }
.rekening-option-card--active { border: 2px solid var(--pink-500); background: var(--pink-50); }


@media (max-width: 640px) {
  * {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .code-tag {
    font-size: 0.78rem;
    word-break: break-all;
  }
}
