/* File: style_improved.css */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #0b5345; /* actually main color */
  --secondary-color: #054034;
  --soft-yellow: #f7f7a0;
  --soft-green: #b8e3bb;
  --light: #f8f9fa;
  --grey: #a7a7a7ff;
  --dark: #343a40;
  --body-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 6px; /* Seragamkan semua border radius ke small */
}

body {
  background-color: var(--body-bg) !important;
  font-family: "Poppins", sans-serif;
}

.navbar {
  background: var(--card-bg) !important;
  box-shadow: var(--shadow);
  z-index: 1100;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary) !important;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem !important;
}

.nav-link.active,
.nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(11, 122, 101, 0.05);
}

.login-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.login-card {
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: none;
}

.login-header {
  background-color: var(--card-bg);
  /* color: var(--primary-color); */
  padding: 25px 20px;
  text-align: center;
}

.login-body {
  padding: 30px;
  background-color: white;
}

.input-group-text {
  border-radius: 5px 0 0 5px;
  background-color: white;
  border-right: none;
}

/* PERBAIKAN UTAMA UNTUK INPUT GROUP */
.input-group {
  position: relative;
  border-radius: var(--border-radius) !important;
}

.input-group .form-control {
  border-radius: var(--border-radius) !important;
  padding-right: 2.5rem; /* Ruang untuk ikon toggle */
}

.input-group-text {
  border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
  border-right: none;
}

/* Style untuk ikon toggle password inline */
.password-toggle-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 5;
  color: var(--grey);
  background: transparent;
  border: none;
  padding: 0 8px;
}

.password-toggle-icon:hover {
  color: var(--primary-color);
}

/* Pastikan input dengan ikon toggle memiliki padding yang cukup */
.has-toggle .form-control {
  padding-right: 2.5rem !important;
}

.form-control {
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  transition: all 0.4s;
}

.form-control:focus {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

.btn-login {
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  padding: 12px;
  font-weight: 600;
  border: none;
  width: 100%;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-login:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.alert {
  border-radius: 10px;
}

.brand-logo2 {
  height: 128px;
  width: auto;
  vertical-align: middle;
}

/* Style untuk welcome modal */
#welcomeModal .modal-header {
  background-color: var(--primary-color) !important;
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

#welcomeModal .modal-header .btn-close {
  filter: invert(1); /* Agar tombol close putih */
}

#welcomeModal .modal-body {
  padding: 1.5rem;
}

#welcomeModal .modal-footer {
  border-top: none;
  padding: 0 1.5rem 1.5rem;
}

#welcomeModal .modal-footer .btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.5rem;
}

#welcomeModal .modal-footer .btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

#welcomeModal .fa-user-circle {
  color: var(--primary-color);
}

/* Animasi untuk modal masuk */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal.fade.show {
  animation: modalFadeIn 0.8s ease-out;
}

/* Logout Modal */
#logoutModal .modal-header {
  background-color: var(--primary-color) !important;
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

#logoutModal .modal-header .btn-close {
  filter: invert(1); /* Agar tombol close putih */
}

#logoutModal .modal-body {
  padding: 1.5rem;
  font-size: 1.1rem;
}

#logoutModal .modal-footer {
  border-top: none;
  padding: 0 1.5rem 1.5rem;
}

#logoutModal .modal-footer .btn {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white;
  padding: 0.5rem 1.5rem;
}

#logoutModal .modal-footer .btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Untuk mempercantik tampilan dropdown profil */
@media (max-width: 768px) {
  .navbar-nav .nav-item {
    border-bottom: 1px solid #eee;
  }

  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .navbar-nav .dropdown-item {
    padding-left: 2rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-toggler {
    border: none;
  }

  .dropdown.ms-3 {
    margin-left: 0 !important;
    margin-top: 1rem;
  }

  /* Warna dropdown item saat aktif di mobile */
  .navbar-nav .dropdown-item:active,
  .navbar-nav .dropdown-item.active,
  .navbar-nav .dropdown-item:focus {
    color: var(--light) !important;
    background-color: var(--primary-color) !important;
  }
}

/* Fix dropdown di index */
.dropdown-menu {
  z-index: 1101 !important; /* Lebih tinggi dari semua elemen */
}

/* Warna dropdown item saat aktif di desktop */
.dropdown-item:active,
.dropdown-item.active,
.dropdown-item:focus,
.dropdown-item:hover {
  color: var(--light) !important;
  background-color: var(--primary-color) !important;
}

/* Warna khusus untuk state active */
.dropdown-item.active {
  color: var(--light) !important;
  background-color: var(--primary-color) !important;
}

.sticky-top {
  z-index: 1020; /* Pastikan navbar di atas konten */
}

/* Hero section shapes */
.position-relative > [class*="position-absolute"] {
  z-index: 0 !important; /* Pastikan shape di belakang */
}

/* Navbar container tetap flex */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Atur tinggi logo, penting untuk keselarasan vertikal */
.brand-logo {
  height: 32px; /* Bisa adjust 36-40px sesuai kebutuhan */
  width: auto;
  object-fit: contain;
  display: block;
}

/* Teks brand: pastikan column dan rata tengah */
.navbar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Ini penting agar teks tetap di tengah vertikal */
  line-height: 1.1;
}

/* Title dan Subtitle diatur rapat dan kecil */
.brand-title {
  color: var(--primary-color);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
}

.brand-subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
  color: var(--text-secondary, #6c757d);
  /* font-style: italic; */
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-1px);
}

/* Button Outline Primary - Green Theme */
.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  background-color: transparent !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  color: white !important;
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
  color: white !important;
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(11, 83, 69, 0.25) !important;
}

.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(11, 83, 69, 0.25) !important;
}

.card {
  border: none !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  /* transform: translateY(-5px); */
  box-shadow: var(--shadow-hover);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 1.25rem;
}

.page-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.sensor-card .card-body {
  text-align: center;
}

.sensor-card .card-title {
  color: var(--text-secondary);
  font-size: 1rem;
}

.sensor-card .sensor-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.sensor-card .sensor-unit {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

#map {
  height: 500px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.hero-section {
  padding: 100px 0 70px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
  max-width: 600px;
}

.btn-hero {
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-hero-primary {
  background-color: var(--primary);
  border: none;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-hero-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-hero-secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-hero-secondary:hover {
  background-color: var(--primary);
  color: white;
}

.section-title {
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  color: var(--secondary-color);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

.section-subtitle {
  color: #666;
  margin-bottom: 50px;
  max-width: 700px;
}

.feature-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  height: 100%;
  border: none;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--primary);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-title {
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.feature-description {
  color: #666;
  margin-bottom: 25px;
}

.feature-btn {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary);
  color: white;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  color: white;
}

.feature-card .card-icon-wrapper .feature-icon {
  color: var(--primary-color); /* Warna default */
}

.card-icon-wrapper {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  background-color: var(--primary);
  color: white;
  padding: 60px 0 30px;
  margin-top: 100px;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.5);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: white;
  color: var(--primary);
  transform: translateY(-5px);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 40px;
}

@keyframes borderFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }

  50% {
    box-shadow: 0 0 0 3px rgba(17, 142, 0, 0.5);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.flash-effect {
  animation: borderFlash 1s ease-out;
}

/* Untuk semua placeholder kecil */
.small-placeholder::placeholder {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Untuk placeholder kecil di input grup */
.input-group-sm .small-placeholder::placeholder {
  font-size: 0.75rem;
}

/* Perbaikan tampilan DataTables */
.dataTables_wrapper {
  padding-top: 15px;
}

/* Perataan tombol dan kontrol */
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  display: flex;
  align-items: center;
}

/* Desktop: sejajar horizontal */
@media (min-width: 768px) {
  .dataTables_wrapper .row:first-child {
    display: flex;
    align-items: center;
    gap: 15px;
  }
}

/* Mobile: center dan stack vertikal */
@media (max-width: 767px) {
  .dataTables_wrapper .row:first-child {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    justify-content: center;
    width: 100%;
  }

  .dt-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Perbaikan show entries */
.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  display: inline-block;
  padding: 6px 30px 6px 10px;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e")
    no-repeat right 0.75rem center/16px 12px;
  background-color: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.dataTables_wrapper .dataTables_filter {
  float: none;
  text-align: left;
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: 0;
  display: block;
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

.dt-action-buttons {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-start;
}

.dt-action-buttons .btn {
  margin-bottom: 3px;
}

.dataTables_info {
  padding-top: 15px !important;
}

.dataTables_paginate {
  padding-top: 15px !important;
}

/* Style untuk card header */
.table-section .card-header {
  padding: 15px 20px;
}

/* Style untuk tombol DataTables */
.dt-buttons .btn {
  margin-right: 5px;
  margin-bottom: 5px;
  white-space: nowrap;
}

/* Perbaikan input dan select */
.dataTables_length select {
  width: auto !important;
  margin: 0 5px;
}

.dataTables_filter input {
  width: 300px !important;
  margin-left: 0 !important;
  padding-right: 3px;
}

/*Detail fase dan edit tanaman page*/
.progress-bar {
  transition: width 0.5s ease-in-out;
}

.fase-card {
  transition: all 0.3s ease;
}

.fase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px var(--text-secondary);
}

.current-fase {
  border: 5px solid var(--primary-color);
  box-shadow: 0 0 5px var(--secondary-color);
}

.card-header.bg-primary {
  background-color: var(--primary-color) !important;
  color: white;
}

.progress-bar {
  transition: width 0.6s ease, background-color 0.3s ease;
}

/* Warna Soft untuk Progress Bar */
.progress-bar-soft-primary {
  background-color: #8ecae6 !important; /* Biru pastel */
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  ) !important;
}

.progress-bar-soft-warning {
  background-color: #ffd166 !important; /* Kuning pastel */
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  ) !important;
}

.progress-bar-soft-success {
  background-color: #83c5be !important; /* Hijau pastel */
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  ) !important;
}

/* Animasi Striped yang lebih halus */
.progress-bar-animated {
  animation: progress-bar-stripes-soft 2s linear infinite;
}

@keyframes progress-bar-stripes-soft {
  from {
    background-position: 1rem 0;
  }
  to {
    background-position: 0 0;
  }
}

/* ========================================
   HIDROPONIK DASHBOARD STYLES
   ======================================== */

/* Dashboard Header */
.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-header .page-title {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dashboard-header .page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Main Dashboard Card */
.hidroponik-dashboard-card {
  border: none !important;
  border-radius: var(--border-radius) !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11, 83, 69, 0.08);
}

.hidroponik-section-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.hidroponik-section-header h5 {
  font-size: 1.2rem;
  font-weight: 600;
}

.hidroponik-section-header i {
  font-size: 1.3rem;
}

/* Section Header - Clean Style (white background, green text) */
.hidroponik-section-header-clean,
.soil-sensor-header {
  background-color: white !important;
  background-image: none !important;
  border-bottom: none !important;
  padding: 1rem 1.5rem !important;
}

.hidroponik-section-header-clean h5,
.soil-sensor-header h5 {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

.hidroponik-section-header-clean i,
.soil-sensor-header i {
  color: var(--primary-color) !important;
}

/* Divider between sections */
.hidroponik-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary-color) 50%,
    transparent 100%
  );
  margin: 0;
}

/* Sensor Status Indicators */
.sensor-container {
  transition: all 0.3s ease;
}

.sensor-offline {
  border-left: 4px solid #ae0000 !important;
}

.sensor-partial {
  border-left: 4px solid #ae0000 !important;
  background-color: #fff3e0 !important;
}

.sensor-online {
  border-left: 4px solid #0d6e56 !important;
}

.text-warning {
  color: #ae0000 !important;
  font-weight: 600;
}

.sensor-card {
  transition: transform 0.2s ease;
}

.sensor-offline .sensor-card {
  opacity: 0.85;
}

/* Sensor Cards */
.hidroponik-sensor-card {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hidroponik-sensor-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.hidroponik-sensor-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(11, 83, 69, 0.15);
}

.hidroponik-sensor-card:hover::before {
  transform: scaleX(1);
}

/* Sensor Icon */
.sensor-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.hidroponik-sensor-card:hover .sensor-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Icon Colors - All Green Variations */
.water-temp {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: var(--primary-color);
}

.water-ph {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: var(--secondary-color);
}

.water-ec {
  background: linear-gradient(135deg, #b8e3bb 0%, #a8d5ab 100%);
  color: var(--primary-color);
}

.water-tds {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  color: var(--secondary-color);
}

.env-temp {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: var(--primary-color);
}

.env-humidity {
  background: linear-gradient(135deg, #b8e3bb 0%, #a8d5ab 100%);
  color: var(--secondary-color);
}

.env-lux {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: var(--primary-color);
}

/* Sensor Info */
.sensor-info {
  width: 100%;
}

.sensor-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sensor-reading {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.sensor-unit-small {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Status Footer */
.hidroponik-status-footer {
  background-color: white; /* Sama dengan card body */
  border-top: none; /* Hilangkan border */
  padding: 1rem 1.5rem;
}

.hidroponik-status-footer .alert {
  background-color: var(--light);
  border-color: #c8e6c9;
  color: var(--secondary-color);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.hidroponik-status-footer .alert i.fa-clock,
.hidroponik-status-footer .alert i.fa-wifi {
  color: var(--primary-color);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.status-badge i {
  font-size: 0.8rem;
}

.status-connected {
  background-color: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.status-connecting {
  background-color: #fff3cd;
  color: #856404;
  border: 2px solid #ffeeba;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-disconnected {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Chart Mode Toggle Styling */
.btn-group[aria-label="Chart Mode Toggle"] {
  box-shadow: 0 2px 8px rgba(11, 83, 69, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary {
  border-radius: 0 !important;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  min-width: 130px;
  transition: all 0.3s ease;
  position: relative;
}

.btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary i {
  transition: transform 0.3s ease;
}

.btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary:hover i {
  transform: scale(1.1);
}

.btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary:first-child {
  border-radius: var(--border-radius) 0 0 var(--border-radius) !important;
}

.btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary:last-child {
  border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}

.btn-group[aria-label="Chart Mode Toggle"]
  .btn-check:checked
  + .btn-outline-primary {
  background-color: var(--primary-color) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-group[aria-label="Chart Mode Toggle"]
  .btn-check:checked
  + .btn-outline-primary
  i {
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Icon color untuk mode toggle card */
.text-primary {
  color: var(--primary-color) !important;
}

/* Responsive mode toggle buttons */
@media (max-width: 576px) {
  .btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary {
    min-width: 110px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }

  .btn-group[aria-label="Chart Mode Toggle"] .btn-outline-primary i {
    font-size: 0.85rem;
  }
}

/* Chart Filter Card */
.hidroponik-chart-filter {
  border: none !important;
  border-radius: var(--border-radius) !important;
  box-shadow: 0 4px 20px rgba(11, 83, 69, 0.08);
}

.hidroponik-chart-filter .card-header {
  background: white;
  color: var(--primary-color);
  border: none;
  padding: 1rem;
}

.hidroponik-chart-filter .card-header h5 {
  color: var(--primary-color);
  font-weight: 600;
}

.hidroponik-chart-filter .card-header i {
  color: var(--primary-color);
}

.date-range-info .alert {
  background-color: #e8f5e9;
  border-color: #c8e6c9;
  color: var(--secondary-color);
}

.date-range-info .alert i {
  color: var(--primary-color);
}

/* Chart Cards */
.hidroponik-chart-card {
  border: none !important;
  border-radius: var(--border-radius) !important;
  box-shadow: 0 4px 20px rgba(11, 83, 69, 0.08);
  overflow: hidden;
}

.hidroponik-chart-card .card-header {
  background: white;
  color: var(--primary-color);
  border: none;
  padding: 1rem;
}

.hidroponik-chart-card .card-header h5 {
  color: var(--primary-color);
  font-weight: 600;
}

.hidroponik-chart-card .card-header i {
  color: var(--primary-color);
}

.hidroponik-chart-card .card-body {
  background-color: #fafafa;
}

/* Form Styling */
.hidroponik-chart-filter .form-label {
  color: var(--secondary-color);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.hidroponik-chart-filter .form-control {
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 0.6rem 0.75rem;
  transition: all 0.3s ease;
}

.hidroponik-chart-filter .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(11, 83, 69, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .dashboard-header .page-title {
    font-size: 1.8rem;
    flex-direction: column;
  }

  .sensor-reading {
    font-size: 2rem;
  }

  .sensor-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .hidroponik-status-footer .row > div {
    text-align: center !important;
  }
}

@media (max-width: 576px) {
  .hidroponik-sensor-card {
    padding: 1rem;
  }

  .sensor-reading {
    font-size: 1.8rem;
  }

  .sensor-label {
    font-size: 0.85rem;
  }
}

/* ======================
   Growth Monitoring Styles
   ====================== */

/* Table Styling for Manajemen Tanaman */
#tanamanTable thead {
  background: linear-gradient(135deg, #0b5345 0%, #054034 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

#tanamanTable thead th {
  border: none;
  padding: 1rem 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  vertical-align: middle;
}

#tanamanTable tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #e8f5e9;
}

#tanamanTable tbody tr:hover {
  background-color: #e8f5e9;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(11, 83, 69, 0.1);
}

#tanamanTable tbody td {
  vertical-align: middle;
  padding: 0.875rem 0.75rem;
}

/* Tag Table Styling */
#tagTable thead {
  background: linear-gradient(135deg, #0b5345 0%, #054034 100%);
  color: white;
}

#tagTable thead th {
  border: none;
  padding: 1rem 0.75rem;
  font-weight: 600;
}

#tagTable tbody tr:hover {
  background-color: #e8f5e9;
}

/* Fase Card untuk Detail Fase */
.fase-card {
  transition: all 0.3s ease;
  border-radius: 6px;
  overflow: hidden;
}

.fase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(11, 83, 69, 0.15);
}

.fase-card .card-header {
  border-bottom: 2px solid var(--primary-color);
  padding: 1rem;
}

.fase-card .card-body {
  padding: 1.25rem;
}

.fase-card .card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e8f5e9;
}

/* Current Fase Highlight */
.current-fase {
  border: 3px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(11, 83, 69, 0.2);
}

/* Modal Styling */
.modal-content {
  border-radius: 6px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  background: linear-gradient(135deg, #0b5345 0%, #054034 100%);
  color: white;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}

/* White close button for modal with green header */
.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.modal-header .btn-close:hover {
  opacity: 0.8;
}

.modal-alert {
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
}

/* Progress Bar Custom */
.progress {
  background-color: #e8f5e9;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Button Group Styling */
.btn-group-sm > .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
}

.btn-group-sm > .btn:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.btn-group-sm > .btn:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Flash Animation for New Plant */
@keyframes highlightFlash {
  0%,
  100% {
    background-color: transparent;
  }
  25%,
  75% {
    background-color: #e8f5e9;
  }
  50% {
    background-color: #c8e6c9;
  }
}

.highlight-flash {
  animation: highlightFlash 2s ease 3;
}

/* Badge Styling */
.badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* Form Input Focus */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(11, 83, 69, 0.15);
}

/* UID Input Flash Effect */
.flash-effect {
  animation: flashInput 1s ease-in-out;
}

@keyframes flashInput {
  0%,
  100% {
    background-color: white;
  }
  50% {
    background-color: #c8e6c9;
  }
}

/* Chart Mobile Responsiveness */
.chart-container-mobile {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 450px;
}

/* Responsive breakpoints untuk chart - Mobile Portrait */
@media (max-width: 767.98px) and (orientation: portrait) {
  .chart-wrapper {
    min-width: 600px; /* Lebar minimum untuk mobile agar tidak terlalu sempit */
    height: 400px; /* Tinggi lebih besar untuk mobile */
  }

  .hidroponik-chart-card .card-body {
    padding: 1rem !important; /* Kurangi padding di mobile */
  }

  /* Scroll indicator shadow */
  .chart-container-mobile {
    box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
  }

  /* Custom scrollbar untuk mobile */
  .chart-container-mobile::-webkit-scrollbar {
    height: 8px;
  }

  .chart-container-mobile::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .chart-container-mobile::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
  }

  .chart-container-mobile::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
  }
}

/* Responsive breakpoints untuk chart - Mobile Landscape */
@media (max-height: 600px) and (orientation: landscape) {
  .chart-wrapper {
    min-width: 100%;
    height: 350px; /* Tinggi dikurangi untuk landscape */
  }

  .hidroponik-chart-card .card-body {
    padding: 0.75rem !important;
  }

  /* Scroll indicator shadow */
  .chart-container-mobile {
    box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
  }

  /* Custom scrollbar untuk mobile */
  .chart-container-mobile::-webkit-scrollbar {
    height: 6px;
  }

  .chart-container-mobile::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .chart-container-mobile::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
  }

  .chart-container-mobile::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
  }
}

/* Untuk tablet portrait */
@media (min-width: 768px) and (max-width: 991.98px) {
  .chart-wrapper {
    height: 450px;
  }
}

/* Untuk desktop */
@media (min-width: 992px) {
  .chart-wrapper {
    height: 500px;
  }
}

/* Fullscreen Chart Styles */
.fullscreen-btn {
  transition: all 0.3s ease;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.fullscreen-btn:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(11, 83, 69, 0.2);
}

.fullscreen-btn:active,
.fullscreen-btn:focus {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: white !important;
  box-shadow: 0 0 0 0.2rem rgba(11, 83, 69, 0.25) !important;
}

.fullscreen-btn i {
  transition: transform 0.3s ease;
}

.fullscreen-btn:hover i {
  transform: rotate(90deg);
}

.chart-fullscreen {
  background: white;
  padding: 2rem;
}

.chart-fullscreen .chart-wrapper {
  height: calc(100vh - 200px) !important;
  min-width: 100% !important;
}

.chart-fullscreen .card-body {
  height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.chart-fullscreen .chart-container-mobile {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Fullscreen mode - sembunyikan alert info di mobile */
.chart-fullscreen .alert-info {
  display: none !important;
}

/* Mobile fullscreen optimization - Portrait */
@media (max-width: 767.98px) {
  .chart-fullscreen {
    padding: 1rem;
  }

  .chart-fullscreen .chart-wrapper {
    height: calc(100vh - 120px) !important;
    min-height: 500px !important;
  }

  .chart-fullscreen .card-body {
    height: calc(100vh - 70px);
    padding: 0.5rem !important;
  }

  .chart-fullscreen .chart-container-mobile {
    flex: 1;
    min-height: calc(100vh - 150px);
  }

  .chart-fullscreen .alert-light {
    font-size: 0.75rem;
    padding: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
  }

  .chart-fullscreen .card-header {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Mobile fullscreen optimization - Landscape */
@media (max-height: 600px) and (orientation: landscape) {
  .chart-fullscreen {
    padding: 0.5rem;
  }

  .chart-fullscreen .chart-wrapper {
    height: calc(100vh - 80px) !important;
    min-height: 300px !important;
  }

  .chart-fullscreen .card-body {
    height: calc(100vh - 50px);
    padding: 0.25rem !important;
  }

  .chart-fullscreen .chart-container-mobile {
    flex: 1;
    min-height: calc(100vh - 100px);
  }

  .chart-fullscreen .alert-light {
    font-size: 0.7rem;
    padding: 0.25rem;
    max-height: 80px;
    overflow-y: auto;
  }

  .chart-fullscreen .card-header {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  /* Hide exit hint in landscape for more space */
  .chart-fullscreen::before {
    display: none;
  }
}

/* Styling untuk card header saat fullscreen */
.chart-fullscreen .card-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Exit fullscreen hint */
.chart-fullscreen::before {
  content: "Tekan ESC atau klik tombol untuk keluar dari fullscreen";
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  z-index: 1000;
  animation: fadeInOut 3s ease-in-out;
  pointer-events: none;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
}

/* Responsive fullscreen button */
@media (max-width: 767.98px) {
  .fullscreen-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
  }
}
