/* ================================
   CSS Variables - Dark Theme
   ================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #6868808a;
  --border-color: #2a2a40;
  --accent-blue: #4fc3f7;
  --accent-green: #81c784;
  --accent-orange: #ffb74d;
  --accent-purple: #ce93d8;
  --accent-red: #ef5350;
  --gradient-primary: linear-gradient(135deg, #4fc3f7, #ce93d8);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8ff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8a8aa0;
  --border-color: #e0e0ea;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
}

/* ================================
   Reset & Base
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: var(--transition);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================================
   Header
   ================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="light"] .header {
  background: rgba(245, 245, 250, 0.85);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

/* ================================
   Logo - Image Version
   ================================ */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.logo-svg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Filter untuk mode gelap - membuat logo putih */
  filter: brightness(0) invert(1);
  transition: var(--transition);
}

/* Mode terang - hilangkan filter (logo hitam asli) */
[data-theme="light"] .logo-svg-img {
  filter: none;
}

.logo:hover .logo-icon {
  transform: scale(1.05) rotate(-3deg);
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Responsive - sembunyikan text di layar sangat kecil */
@media (max-width: 480px) {
  .logo {
    gap: 0.5rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .logo-text {
    font-size: 0.95rem;
    letter-spacing: 0;
  }
}

/* Sembunyikan teks, hanya tampilkan icon di layar sangat kecil */
@media (max-width: 360px) {
  .logo-text {
    display: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  transform: rotate(20deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ================================
   Hero Section
   ================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 195, 247, 0.5);
}

.btn-danger {
  background: var(--accent-red);
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-danger:hover {
  background: #d32f2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239, 83, 80, 0.3);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  white-space: nowrap;
}

.btn-reset:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-glow {
  animation: glow 3s infinite;
}

/* Action Buttons */
.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(79, 195, 247, 0.1);
  border: 1px solid rgba(79, 195, 247, 0.3);
  color: #4fc3f7;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: rgba(79, 195, 247, 0.2);
  transform: translateY(-1px);
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.3);
  color: #ef5350;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: rgba(239, 83, 80, 0.2);
  transform: translateY(-1px);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border-color, #2a2a40);
  color: var(--text-secondary, #9898b0);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-back:hover {
  background: var(--bg-card-hover, #222240);
  color: var(--text-primary, #e8e8f0);
}

/* WhatsApp Button */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25d366;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 0.4rem;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
  }
  50% {
    box-shadow: 0 4px 30px rgba(79, 195, 247, 0.6);
  }
}

/* Hero Decoration */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  top: 20%;
  left: 10%;
  background: var(--accent-blue);
  animation-delay: 0s;
}

.card-2 {
  top: 60%;
  right: 10%;
  background: var(--accent-purple);
  animation-delay: 2s;
}

.card-3 {
  bottom: 20%;
  left: 20%;
  background: var(--accent-green);
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* ================================
   Categories Section
   ================================ */
.categories {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.title-decoration {
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.data-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.data-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent, var(--accent-blue));
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, var(--accent-blue));
  transform: scaleX(0);
  transition: var(--transition);
}

.data-card:hover .card-glow {
  transform: scaleX(1);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  font-size: 2rem;
}

.card-badge {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  background: rgba(79, 195, 247, 0.1);
  color: var(--accent-blue);
  border-radius: 20px;
  font-weight: 500;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.card-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent, var(--accent-blue));
  transition: var(--transition);
}

.data-card:hover .card-action {
  gap: 0.75rem;
}

/* icon animation */

.card-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.card-icon-wrapper i {
  font-size: 1.75rem;
  transition: var(--transition);
}

.data-card:hover .card-icon-wrapper {
  transform: scale(1.1) rotate(-5deg);
}

.data-card:hover .card-icon-wrapper i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px currentColor);
}

/* ================================
   Stats Section
   ================================ */
.stats {
  padding: 4rem 0 6rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ================================
   Page Header
   ================================ */
.page-header {
  padding: 6rem 0 1rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(79, 195, 247, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(206, 147, 216, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.page-header .header-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent-blue);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--accent-blue);
  font-weight: 500;
}

.page-title {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.page-subtitle strong {
  color: var(--text-primary);
  font-weight: 700;
}

.text-success {
  color: var(--accent-green) !important;
}
.text-danger {
  color: var(--accent-red) !important;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ================================
   Alerts
   ================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(129, 199, 132, 0.1);
  border: 1px solid rgba(129, 199, 132, 0.3);
  color: var(--accent-green);
}

.alert-error {
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.3);
  color: var(--accent-red);
}

.alert-content {
  flex: 1;
}

.alert-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.alert-list li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* ================================
   Footer
   ================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
  .page-header {
    padding: 6rem 0 1.5rem;
  }

  .page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.5rem 3rem;
  }

  .categories {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }

  .data-card {
    padding: 1.25rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================
   Scrollbar Custom
   ================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* ================================
   Utility Classes
   ================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
