/* custom.css - Modern Overrides for SmartTambak Sidoarjo */

:root {
  --primary: #3b82f6 !important; /* Tailwind Blue 500 */
  --primary-light: #60a5fa !important;
  --secondary: #0d9488 !important; /* Teal 600 */
  --success: #10b981 !important; /* Emerald 500 */
  --danger: #ef4444 !important; /* Red 500 */
  --warning: #f59e0b !important; /* Amber 500 */
  --info: #06b6d4 !important; /* Cyan 500 */
  --dark: #0f172a !important; /* Slate 900 */
  --darker: #020617 !important; /* Slate 950 */
  --light: #f8fafc !important; /* Slate 50 */
  --lighter: #ffffff !important;
  --gray: #94a3b8 !important; /* Slate 400 */
  --dark-gray: #475569 !important; /* Slate 600 */
  
  --card-shadow: 0 4px 15px rgba(15, 23, 42, 0.04) !important;
  --card-shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Global Styles */
body {
  background-color: #f1f5f9 !important; /* Soft gray background */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* 1. Sidebar redesign */
.sidebar {
  background: linear-gradient(180deg, #0f172a, #1e293b) !important;
  border-right: 1px solid #334155 !important;
  box-shadow: none !important;
}

.sidebar-header {
  border-bottom: 1px solid #334155 !important;
  padding: 30px 20px !important;
}

.logo-icon i {
  color: var(--success) !important;
}

.logo-text {
  font-weight: 800 !important;
  background: linear-gradient(to right, #60a5fa, #10b981) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.menu-title {
  color: #64748b !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
}

.menu-item {
  border-radius: 8px !important;
  margin: 4px 12px !important;
  padding: 10px 16px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  border-left: none !important;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-left: none !important;
}

.menu-item.active {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
  border-left: none !important;
  font-weight: 600 !important;
}

.menu-item i {
  font-size: 1.05rem !important;
}

/* 2. Top Nav Redesign */
.top-nav {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  padding: 20px 30px !important;
}

.page-title h1 {
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 1.4rem !important;
  letter-spacing: -0.5px;
}

.user-avatar {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
}

/* 3. Overview Cards */
.overview-cards {
  gap: 15px !important;
  margin-bottom: 25px !important;
}

.overview-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: var(--card-shadow) !important;
}

.overview-icon {
  border-radius: 10px !important;
  width: 44px !important;
  height: 44px !important;
}

.overview-text h3 {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase;
}

.overview-text p {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

/* 4. Pond Grid and Cards */
.pond-grid {
  gap: 20px !important;
}

.pond-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: var(--card-shadow) !important;
  overflow: hidden !important;
}

.pond-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--card-shadow-hover) !important;
}

.pond-header {
  padding: 16px 20px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #0f172a !important;
}

.pond-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.pond-status {
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-normal {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
}

.status-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
}

.status-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}

.pond-body {
  padding: 20px !important;
  background: #ffffff !important;
}

.sensor-row {
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.sensor-item {
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 10px !important;
  padding: 12px 8px !important;
}

.sensor-value {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.sensor-value.value-warning {
  color: #f59e0b !important;
}

.sensor-value.value-danger {
  color: #ef4444 !important;
}

.sensor-label {
  font-size: 0.65rem !important;
  color: #64748b !important;
  font-weight: 700 !important;
}

.pond-footer {
  padding: 12px 20px !important;
  background: #f8fafc !important;
  border-top: 1px solid #f1f5f9 !important;
}

.view-btn {
  background: #3b82f6 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  transition: var(--transition) !important;
}

.view-btn:hover {
  background: #2563eb !important;
}

/* 5. Mobile Layout Improvements & Header Adjustments */
@media (max-width: 992px) {
  .top-nav {
    padding-left: 65px !important;
    position: relative !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  .page-title {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .page-title h1 {
    font-size: 1.15rem !important;
  }
  
  .page-title p {
    display: none !important; /* Hide subtext to save space */
  }

  .user-info {
    display: none !important; /* Hide user info to make it cleaner on mobile */
  }
  
  .menu-toggle {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    left: 15px !important;
    transform: translateY(-50%) !important;
    z-index: 101 !important;
    background: transparent !important;
    color: var(--dark) !important;
    box-shadow: none !important;
    width: 36px !important;
    height: 36px !important;
  }
}

/* 6. Premium Mobile Bottom Nav Bar */
@media (max-width: 768px) {
  /* Hide the sidebar completely on phone layout */
  .sidebar {
    display: none !important;
  }
  
  /* Hide the toggle menu since we have bottom nav */
  .menu-toggle {
    display: none !important;
  }
  
  /* Reset top-nav padding */
  .top-nav {
    padding-left: 20px !important;
  }
  
  /* Create bottom nav */
  .app-container::after {
    content: "";
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 998;
  }

  /* We will dynamically append the navigation container using standard styling rules */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
  }

  .mobile-bottom-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    text-align: center;
  }

  .mobile-bottom-nav a.active {
    color: #3b82f6;
  }

  .mobile-bottom-nav i {
    font-size: 1.15rem;
  }
  
  /* Give container padding at bottom to avoid overlapping with nav bar */
  .main-content {
    padding-bottom: 75px !important;
  }
  
  .content-area {
    padding: 15px !important;
  }
  
  .overview-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .overview-card {
    padding: 12px !important;
  }
  
  .overview-icon {
    width: 36px !important;
    height: 36px !important;
    margin-right: 8px !important;
  }
  
  .overview-icon i {
    font-size: 1rem !important;
  }
  
  .overview-text p {
    font-size: 1rem !important;
  }
  
  .status-info {
    flex-direction: column !important;
    gap: 6px !important;
    align-items: flex-start !important;
    padding: 12px 16px !important;
  }
}

/* Marketing Banner Styling */
.promo-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  border: 1px solid #334155 !important;
  border-radius: 16px !important;
  padding: 30px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.promo-header {
  text-align: center !important;
  margin-bottom: 25px !important;
}

.promo-header h2 {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  background: linear-gradient(to right, #60a5fa, #10b981) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  margin-bottom: 8px !important;
}

.promo-header p {
  color: #94a3b8 !important;
  font-size: 0.9rem !important;
  max-width: 700px !important;
  margin: 0 auto !important;
}

.promo-features {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 20px !important;
  margin-bottom: 25px !important;
}

.promo-feature-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  text-align: center !important;
  transition: transform 0.2s !important;
}

.promo-feature-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.promo-feature-icon {
  font-size: 2rem !important;
  margin-bottom: 12px !important;
}

.promo-feature-card h4 {
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
}

.promo-feature-card p {
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
}

.promo-footer-action {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-top: 1px solid #334155 !important;
  padding-top: 20px !important;
  flex-wrap: wrap !important;
  gap: 15px !important;
}

.promo-footer-action span {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

.promo-cta-btn {
  background: #10b981 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  transition: background 0.2s !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.promo-cta-btn:hover {
  background: #059669 !important;
}

@media (max-width: 768px) {
  .promo-banner {
    padding: 20px !important;
  }
  .promo-header h2 {
    font-size: 1.25rem !important;
  }
  .promo-footer-action {
    flex-direction: column !important;
    text-align: center !important;
  }
  .promo-cta-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}
