/* public.css - Aetheria Perfume Official Style */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
  /* Warna utama dibuat sedikit lebih “soft” biar tidak menusuk mata */
  --primary: #7C5CFA;
  --primary-light: #A78BFA;
  --primary-dark: #6D28D9;

  --danger: #DC2626;
  --success: #10B981;
  --warning: #F59E0B;

  --dark: #1F1A36;
  --light: #F9FAFB;

  /* Grayscale tetap aman untuk kontras teks */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;

  --white: #FFFFFF;

  /* Shadow dibuat lebih halus agar nyaman dan “clean” */
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);

  --radius: 16px;
  --radius-sm: 10px;
  --tap: 44px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Background dibuat lebih kalem (tidak terlalu kontras) */
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  color: var(--gray-700);
  line-height: 1.55;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
}

@media (min-width: 640px) {
  .wrap { padding: 20px; }
}
@media (min-width: 1024px) {
  .wrap { padding: 24px; }
}

.card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08), 0 0 0 1px rgba(124, 92, 250, 0.12);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

@media (min-width: 640px) {
  .card { padding: 28px; }
}

/* ===== FIXED HEADER - NO OVERLAP ===== */
.header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Brand container with proper spacing */
.aetheria-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.aetheria-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, #C084FC 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: 0 10px 20px -6px rgba(124, 92, 250, 0.30);
  flex-shrink: 0;
}

/* Brand text container */
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aetheria-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4C1D95 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
}

@media (max-width: 480px) {
  .aetheria-title { font-size: 1.3rem; }
}

.aetheria-tagline {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aetheria-tagline i { color: var(--primary); }

/* Stats Bar - Desktop Only */
.aetheria-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gray-50);
  padding: 8px 16px;
  border-radius: 40px;
  border: 1px solid var(--gray-200);
  margin-top: 12px;
  width: fit-content;
}

@media (max-width: 768px) {
  .aetheria-stat { display: none; }
}

.aetheria-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aetheria-stat-item i {
  color: var(--primary);
  font-size: 1rem;
}

.aetheria-stat-item span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
}

/* Actions container */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

@media (max-width: 768px) {
  .actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.aetheria-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(124, 92, 250, 0.20);
}

/* Button Styles */
.btn {
  border: none;
  border-radius: 40px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  text-decoration: none;
  min-height: var(--tap);
  box-shadow: 0 4px 10px rgba(124, 92, 250, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.btn i {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}

.btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(124, 92, 250, 0.26);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(124, 92, 250, 0.26);
  }
}

/* Premium Search - FIXED SPACING (NO ICON) */
.premium-search {
  position: relative;
  margin: 16px 0 20px;
}

/* PENTING: sembunyikan ikon search jika masih ada di HTML */
.premium-search i {
  display: none !important;
}

/* Input search tanpa ruang ikon */
.premium-search input {
  width: 100%;
  padding: 14px 18px; /* tidak ada padding kiri ekstra */
  border-radius: 40px;
  border: 2px solid transparent;
  background: rgba(241, 245, 249, 0.95); /* lebih lembut */
  transition: all 0.25s;
  height: 52px; /* ramah smartphone */
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  color: var(--gray-700);
}

.premium-search input::placeholder {
  color: var(--gray-400);
}

.premium-search input:focus {
  outline: none;
  border-color: rgba(124, 92, 250, 0.75);
  background: white;
  box-shadow: 0 10px 25px -8px rgba(124, 92, 250, 0.22);
}

/* Hint kanan (desktop). Di mobile disembunyikan */
.premium-search .search-hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  padding: 4px 10px;
  border-radius: 30px;
  border: 1px solid var(--gray-200);
  z-index: 2;
}

@media (max-width: 640px) {
  .premium-search .search-hint { display: none; }
  .premium-search input { padding-right: 16px; }
}

/* Status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.muted {
  color: var(--gray-500);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Table Styles */
.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: auto;
  margin: 16px 0;
  background: white;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}

th {
  background: #F8FAFC;
  color: var(--gray-500);
  font-weight: 700;
  padding: 16px 14px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

th i {
  margin-right: 8px;
  color: var(--primary);
  font-size: 0.8rem;
}

td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
}

tr:last-child td { border-bottom: 0; }

tr:hover td { background: #F8FAFC; }

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}

.badge i { font-size: 0.65rem; }

.badge.premium-brand {
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  color: #5B21B6;
  border: none;
  font-weight: 700;
}

.badge.best {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  border: none;
  animation: subtlePulse 2s infinite;
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

/* Note Tags */
.notes-premium {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.note-tag {
  background: var(--gray-100);
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.72rem;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  display: inline-block;
}

/* Cell Title */
.cell-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Premium Footer */
.premium-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.2s;
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Signature */
.signature {
  text-align: center;
  margin-top: 20px;
  font-size: 0.72rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.signature i { color: var(--primary); }

/* Responsive Fixes */
@media (max-width: 640px) {
  .aetheria-brand { gap: 12px; }

  .aetheria-logo {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .premium-footer {
    flex-direction: column;
    text-align: center;
  }

  .social-links { justify-content: center; }
}

@media (max-width: 480px) {
  .wrap { padding: 8px; }

  .card { padding: 16px; }

  td { padding: 12px 10px; }

  .aetheria-logo {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .aetheria-title { font-size: 1.2rem; }

  /* Search lebih ringkas di layar kecil */
  .premium-search input {
    height: 50px;
    font-size: 0.92rem;
    padding: 12px 16px;
  }
}

/* Touch-friendly */
button, .btn, input, select, .social-link {
  min-height: var(--tap);
  -webkit-tap-highlight-color: transparent;
}

/* Loading State */
.loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '\f110';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.8s linear infinite;
  font-size: 1.2rem;
  color: var(--primary);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* Aksesibilitas: kurangi animasi jika user minta */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
