/* ===================================================
   GLOBAL & RESET
=================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f1f8e9, #dcedc8);
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===================================================
   GOOGLE FONTS (Pastikan @font-face sudah di atas)
   Letakkan @font-face di bagian paling atas style.css
=================================================== */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins/Poppins-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* ===================================================
   NAVBAR UTAMA (User & Admin)
=================================================== */
.navbar, .admin-navbar, .user-navbar {
  background: #2e7d32;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Poppins', sans-serif;
}

.navbar .logo, .admin-navbar .logo, .user-navbar .logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .nav-links, .admin-navbar .nav-links, .user-navbar .nav-links {
  display: flex;
  gap: 1.8rem;
}

.navbar .nav-links a, 
.admin-navbar .nav-links a, 
.user-navbar .nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
}

.navbar .nav-links a:hover,
.admin-navbar .nav-links a:hover,
.user-navbar .nav-links a:hover {
  color: #a5d6a7;
  transform: translateY(-1px);
}

/* Responsive untuk HP */
@media (max-width: 768px) {
  .admin-navbar .nav-links, .user-navbar .nav-links {
    flex-direction: column;
    gap: 1rem;
    background: #2e7d32;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    display: none;
  }
  .admin-navbar .nav-links.active, .user-navbar .nav-links.active {
    display: flex;
  }
}

/* ===================================================
   LOGIN PAGE
=================================================== */
.login-body {
  background: url('https://images.unsplash.com/photo-1523060699508-1638e76d662c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  background: rgba(255, 255, 255, 0.98);
  padding: 3rem;
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

.login-logo i {
  font-size: 4.5rem;
  color: #2e7d32;
  margin-bottom: 1rem;
}

.login-logo h2 {
  color: #2e7d32;
  font-size: 2rem;
  font-weight: 700;
}

.login-logo p {
  color: #555;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.login-form h3 {
  margin-bottom: 1.8rem;
  color: #2e7d32;
  font-weight: 600;
}

.error {
  color: #c62828;
  background: #ffebee;
  padding: 0.7rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  border-left: 4px solid #c62828;
  font-size: 0.95rem;
}

.input-group {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 50px;
  overflow: hidden;
  transition: 0.3s;
}

.input-group:focus-within {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.input-group i {
  width: 60px;
  color: #2e7d32;
  background: #e8f5e9;
  text-align: center;
  padding: 0.9rem 0;
}

.input-group input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: none;
  outline: none;
  font-size: 1rem;
}

.btn-login {
  background: #2e7d32;
  color: white;
  padding: 0.9rem 2.2rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
  transition: 0.3s;
  letter-spacing: 0.5px;
}

.btn-login:hover {
  background: #1b5e20;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.text-center {
  margin-top: 1.8rem;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

.text-center small {
  color: #777;
  font-size: 0.85rem;
}

/* ===================================================
   HERO SECTION (Halaman Utama)
=================================================== */
.hero {
  padding: 10rem 2rem 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  background: #e8f5e9;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5rem;
  color: #2e7d32;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #555;
  max-width: 600px;
}

.btn-primary {
  background: #2e7d32;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
  box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
  font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
  background: #1b5e20;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.hero-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ===================================================
   FEATURES (Tentang Sistem)
=================================================== */
.features {
  padding: 5rem 2rem;
  background: white;
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  text-align: center;
  color: #2e7d32;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  font-family: 'Montserrat', sans-serif;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: #e8f5e9;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: 0.3s;
  border: 1px solid rgba(46, 125, 50, 0.2);
  font-family: 'Poppins', sans-serif;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-card i {
  font-size: 3rem;
  color: #2e7d32;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: #2e7d32;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* ===================================================
   CONTAINER & CARD
=================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Poppins', sans-serif;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: center;
  transition: 0.3s;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
}

.card i {
  font-size: 2.5rem;
  color: #2e7d32;
  margin-bottom: 1rem;
}

.card h3 {
  color: #2e7d32;
  margin-bottom: 1rem;
}

/* ===================================================
   TABLES
=================================================== */
.table-container {
  margin-top: 2rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem;
  text-align: left;
}

th {
  background: #2e7d32;
  color: white;
}

tr:nth-child(even) {
  background: #f1f8e9;
}

tr:hover {
  background: #dcedc8;
}

/* ===================================================
   BUTTONS
=================================================== */
.btn, .btn-tambah {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.btn-tambah {
  background: #4caf50;
  color: white;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.btn-tambah:hover {
  background: #388e3c;
}

.btn-edit {
  background: #1976d2;
  color: white;
}

.btn-edit:hover {
  background: #1565c0;
}

.btn-hapus {
  background: #c62828;
  color: white;
}

.btn-hapus:hover {
  background: #b71c1c;
}

/* ===================================================
   FORMS
=================================================== */
.diagnosa-form {
  max-width: 700px;
  margin: 2rem auto;
  background: white;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.diagnosa-form label {
  display: block;
  margin: 1.2rem 0;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.diagnosa-form input[type="checkbox"] {
  transform: scale(1.3);
  margin-right: 0.7rem;
}

/* ===================================================
   HASIL DIAGNOSA
=================================================== */
.hasil-diagnosa {
  margin-top: 2rem;
  padding: 1.8rem;
  background: #e8f5e9;
  border-radius: 10px;
  border-left: 5px solid #2e7d32;
  font-family: 'Poppins', sans-serif;
}

.hasil-diagnosa h3 {
  color: #2e7d32;
  margin-bottom: 0.8rem;
}

/* ===================================================
   BADGE (Untuk CF)
=================================================== */
.cf-badge {
  background: #ff9800;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ===================================================
   SEARCH BOX
=================================================== */
.search-box {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 50px;
  width: 300px;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

/* ===================================================
   FOOTER
=================================================== */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  background: #2e7d32;
  color: white;
  margin-top: 3rem;
  font-family: 'Poppins', sans-serif;
}

/* ===================================================
   ANIMASI AOS
=================================================== */
[data-aos] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s, visibility 0.6s;
}

[data-aos].aos-animate {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 6rem 1rem 4rem;
  }
  .hero-content, .hero-image {
    margin-bottom: 2rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .features h2 {
    font-size: 2rem;
  }
  .container {
    padding: 1.5rem;
  }
  .btn-primary {
    font-size: 1rem;
  }
}