@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #004d3d;
  /* Dark Emerald from Logo */
  --primary-dark: #00362b;
  --primary-light: #f0fdf4;
  --secondary: #10b981;
  /* Mid Green */
  --accent: #86efac;
  /* Bright Green */
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --dark: #001a14;
  --slate: #1e293b;
  --muted: #64748b;
  --card: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 77, 61, 0.1);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] {
  --primary: #10b981;
  /* Brighter primary for dark mode */
  --primary-dark: #059669;
  --primary-light: rgba(16, 185, 129, 0.1);
  --secondary: #34d399;
  --dark: #f1f5f9;
  /* Text becomes light */
  --slate: #cbd5e1;
  --muted: #94a3b8;
  --card: #1e293b;
  --bg: #0f172a;
  --border: #334155;
  --white: #1e293b;
  /* Card bg swap */
  --glass: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* 3D Tilt Effect Utility */
.tilt-card {
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  color: var(--slate);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* --- Mesh Gradients & Shapes --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

.floating-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  animation: floatShape 20s infinite alternate ease-in-out;
}

@keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(100px, 100px) scale(1.2);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* --- Layout --- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap {
  padding: 6rem 0;
}

@media (max-width: 768px) {
  .wrap {
    padding: 3rem 0;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.section-title p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  height: 70px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  z-index: 2000;
  padding: 0 1.5rem 0 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav.scrolled {
  top: 0.75rem;
  width: calc(100% - 1.5rem);
  height: 64px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.logo img {
  height: 42px;
  width: auto;
}

.logo strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.04em;
  text-transform: none;
}

.menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex: 2;
  justify-content: center;
}

.menu a {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--slate);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 0.5rem;
  position: relative;
}

.menu a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  justify-content: flex-end;
}

.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.theme-btn:hover {
  background: var(--primary);
  color: white;
  transform: rotate(15deg);
}

.shadow-sm {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

@media (max-width: 1024px) {
  .nav {
    padding: 0 2rem;
  }

  .menu {
    gap: 1.5rem;
  }
}

@media (max-width: 860px) {
  .menu {
    display: none;
  }

  .nav {
    height: 75px;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 20px -5px rgba(0, 77, 61, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0, 77, 61, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 10px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  background:
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 77, 61, 0.05) 0%, transparent 40%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004d3d' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  flex: 1.4;
  z-index: 10;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 2rem;
  letter-spacing: -0.06em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

/* --- Mobile Menu Styles --- */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

@media (max-width: 860px) {
  .mobile-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    display: flex;
    flex: none;
    justify-content: flex-start;
  }

  .menu.active {
    transform: translateY(0);
  }

  .nav-actions {
    display: flex;
  }
}

/* --- Features Grid Layout --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  border: 1px solid #edf2f7;
  border-radius: 32px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  min-height: 380px;
  align-items: flex-start;
  /* Force Left Alignment */
  text-align: left;
  /* Force Left Alignment */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  border-color: #bbf7d0;
  /* Subtle green border on hover */
}

/* Card Header: Pill and Lock */
.card-headers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 2.5rem;
  /* More space below header */
}

.premium-badge-pill {
  background: #4f46e5;
  /* Indigo/Blue standard */
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lock-icon-circle {
  width: 32px;
  height: 32px;
  background: #1f2937;
  /* Dark Gray/Black */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Icon Box */
.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  /* Light Green 100 */
  color: #16a34a;
  /* Green 600 */
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* Text Content */
.feature-text-content {
  width: 100%;
}

.feature-text-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  /* Gray 900 */
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.feature-text-content p {
  font-size: 0.95rem;
  color: #6b7280;
  /* Gray 500 */
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}


/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
  .hero-card {
    max-width: 400px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 100px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .btn {
    width: 100%;
  }

  .hero-card {
    padding: 1.5rem;
  }
}

/* --- UI Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-30px) rotate(2deg);
  }
}

/* --- Mobile Responsiveness Updates --- */
@media (max-width: 768px) {

  /* Dashboard Grid Fix */
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    /* Hide sidebar by default on mobile for now, or make it a drawer */
  }

  /* Show a simple mobile nav if needed, or rely on the main nav */

  .main-content {
    padding: 1.5rem;
  }

  /* Admin Dashboard Stats Grid */
  .dashboard-grid main>div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  }

  /* Nutritionist View Grid */
  .main-content>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Header adjustments */
  header[style*="justify-content: space-between"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
    text-align: left !important;
  }

  header[style*="justify-content: space-between"]>div:last-child {
    text-align: left !important;
    margin-top: 0.5rem;
  }
}

/* Tablet/Mobile Table Fix */
@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Login Page Mobile Fix */
  .auth-card {
    padding: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    /* Full width cards on mobile */
  }
}

/* Ensure images never overflow */
img {
  max-width: 100%;
  height: auto;
}

/* --- Animations --- */
@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Floating Logo Animation */
@keyframes floatLogo {
  0% {
    transform: translateY(0px);
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
  }

  50% {
    transform: translateY(-20px);
    filter: drop-shadow(0 25px 30px rgba(16, 185, 129, 0.4));
  }

  100% {
    transform: translateY(0px);
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
  }
}

.floating-logo {
  animation: floatLogo 4s ease-in-out infinite;
}

.mic-active {
  animation: mic-pulse 1.5s infinite;
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

/* --- Dark Mode Specific Overrides --- */
[data-theme="dark"] .menu {
  background: var(--card) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav.scrolled {
  background: var(--glass) !important;
}

[data-theme="dark"] .feature-card {
  background: var(--card);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--border);
  color: var(--dark);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg);
  color: var(--dark);
  border-color: var(--border);
}

[data-theme="dark"] .theme-btn {
  background: var(--primary-light);
  color: var(--warning);
  border-color: var(--warning);
}

[data-theme="dark"] .menu a {
  color: var(--dark);
}

[data-theme="dark"] .menu a:hover {
  color: var(--primary);
}

[data-theme="dark"] .auth-card,
[data-theme="dark"] .generator-card,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .chart-box,
[data-theme="dark"] .report-preview {
  background: var(--card);
  border-color: var(--border);
}

/* --- Team Modern Styles --- */
.team-grid-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  /* Gap lebih lega */
  flex-wrap: wrap;
  width: 100%;
}

.team-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 160px;
  /* Card jauh lebih lebar */
  max-width: 220px;
  transition: all 0.3s ease;
}

.team-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.team-img-wrapper {
  width: 200px;
  /* Foto BESAR dan Jelas */
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 4px solid rgba(255, 255, 255, 0.1);
  /* Border lebih tebal */
  position: relative;
}

.team-card:hover .team-img-wrapper {
  border-color: var(--primary);
}

.team-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-info h5 {
  font-size: 1.15rem;
  /* Nama lebih besar */
  font-weight: 800;
  color: white;
  margin-bottom: 0.35rem;
}

.team-info p {
  font-size: 0.85rem;
  /* Jabatan lebih terbaca */
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* Responsive Logic */
@media (max-width: 640px) {
  .team-grid-container {
    gap: 1rem;
  }

  .team-card {
    min-width: 140px;
    padding: 1.25rem;
  }

  .team-img-wrapper {
    width: 80px;
    /* Di HP masih cukup besar */
    height: 80px;
  }
}

/* --- Workflow Steps --- */
.workflow-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 4rem;
}

.step-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: center;
  position: relative;
  transition: all 0.4s ease;
}

.step-card:hover {
  background: white;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.step-num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  font-weight: 800;
  font-size: 0.75rem;
}

.step-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.step-connector {
  font-size: 1.5rem;
  color: var(--border);
}

@media (max-width: 1024px) {
  .workflow-steps {
    flex-direction: column;
  }

  .step-connector {
    transform: rotate(90deg);
    margin: 1rem 0;
  }

  .step-card {
    width: 100%;
  }
}

/* --- UI Enhancements --- */
.persona-stat {
  padding-left: 1.5rem;
  border-left: 3px solid var(--secondary);
}

[data-theme="dark"] .step-card {
  background: var(--card);
}

[data-theme="dark"] .persona-tag {
  background: var(--primary);
  color: white;
}

[data-theme="dark"] .persona-stat {
  border-color: var(--primary);
}