/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

/* Universal box-sizing for better layout control */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Core Styles ===== */
:root {
  --header-bg: #1B5E20;
  --sidebar-bg: #2D2D2D; /* This might still be used somewhere, but the sidebar's background is set in the view CSS */
  --accent-color: #8BC34A;
  --text-primary: #1B5E20;
  --text-secondary: #E8F5E9;
  --content-bg: #F8F9FA; /* This is used by .main-content, but we'll remove the .main-content rule itself */
}
/* ===== Login Page Styles ===== */
body.login-body {
  background: linear-gradient(135deg, #1B5E20 0%, #388E3C 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px; /* Provides a consistent margin around the login container */
}

.login-container {
  width: 100%;
  max-width: 380px;
  position: relative;
  background-color: transparent;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  /* REMOVED: min-height: 500px; - This caused the card to stretch vertically on small/zoomed-out screens. */
  color: var(--text-primary);
}

.login-header {
  background: var(--header-bg); /* Changed from green to use --header-bg */
  padding: 1.5rem;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

.login-header h2 {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.login-body {
  padding: 2rem;
  flex: 1;
}

.login-form .form-control {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.login-form .form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.25);
}

/* Keep Bootstrap utility override if intended */
.bg-dark-green {
  background-color: #198754 !important; /* Use Bootstrap's dark green variable or keep this */
};


/* Keep this .btn-primary override */
.btn-primary {
  background-color: darkgreen;
  border-color: darkgreen;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #144a18;
  border-color: #144a18;
  transform: translateY(-1px);
}

#togglePassword {
  color: var(--text-primary);
  border-color: #e0e0e0;
  transition: all 0.3s ease;
}

#togglePassword:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* Keep this footer style */
.footer {
  /* position: absolute; */ /* This was in the other file, not here */
  /* bottom: 0; */ /* This was in the other file, not here */
  height: 20px;
  padding: 0.5rem 1rem;
  background-color: var(--text-primary); /* Assuming --text-primary is the dark green */
  color: var(--text-secondary);
  font-size: 0.9em;
}


.text-primary {
  color: var(--text-primary);
}

/* Keep this login-footer style */
.login-footer {
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e0e0e0;
  margin: auto auto 0;
  height: auto;
  font-size: 0.8em;
  color: var(--text-primary);
  width: 80%;
  border-radius: 0 0 12px 12px;
}

/* ===== Navbar Styles ===== */
.navbar-custom {
  background: var(--header-bg) !important; /* Ensure navbar is dark green */
  height: 60px; /* Keep header height */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: var(--text-secondary) !important;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
}

.navbar-custom .nav-link:hover {
  color: var(--accent-color) !important;
}

/* ===== Dashboard Styles ===== */
/* REMOVED .authenticated .wrapper rule as wrapper is removed from authenticated layout */
/* .authenticated .wrapper { ... } */

/* REMOVED .sidebar rule as sidebar styling is handled in the view's @section styles */
/* .sidebar { ... } */

/* REMOVED .main-content rule as main content area layout is handled by col-md-10 */
/* .main-content { ... } */


/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  /* Keep this rule if wrapper is still used in other non-authenticated layouts */
  .authenticated .wrapper {
    margin-left: 0; /* Keep this for smaller screens if needed */
  }

  /* Keep these sidebar-link overrides for smaller screens */
  .sidebar-link {
    padding: 0.7rem 1.2rem;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
  }
  /* Keep this hover/focus override for smaller screens */
  .sidebar-link:hover,
  .sidebar-link:focus {
    background-color: #026937;
    color: #ffffff;
    text-decoration: none;
  }
  /* Keep this login-footer override for smaller screens */
  .login-footer {
    width: 90%;
    padding: 0.8rem;
    height: auto;
  }
  /* Keep this footer override for smaller screens */
  .footer {
    height: auto;
    padding: 0.8rem;
  }
}

@media (max-width: 576px) {
  /* Keep these login page overrides */
  .login-container {
    padding: 15px;
    max-width: 90%; /* Ensures the container shrinks on very small screens */
    /* background-color: #144a18; /* This changes the container background on small screens, keep if intended */
  }

  .login-card {
    min-height: auto; /* Ensure this is set to auto or removed if it was a fixed value */
  }

  .login-header {
    padding: 1rem;
  }

  .login-body {
    padding: 1.5rem;
  }

  .btn-lg {
    font-size: 0.925rem;
  }
}

/* ===== Utilities ===== */
/* Keep these utility styles */
.text-secondary {
  color: #6c757d !important;
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* Keep this password toggle enhancement */
.input-group:focus-within .btn-outline-primary {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white !important;
}

/* Keep this login body style */
body.login-body {
  background-color: #f8f9fa; /* Optional background color for the login page */
}

/* REMOVED .wrapper rule as it conflicts with flexbox layout in authenticated view */
/* .wrapper { ... } */

/* REMOVED .main-content rule as it conflicts with col-md-10 layout */
/* .main-content { ... } */


/* Keep print styles */
@media print {
  @page {
    size: landscape;
  }
}

/* Keep specific link style if intended */
#updateDataLink {
  background-color: #144a18;
  color: white;
  transition: background-color 1s ease, color 1s ease;
}

#updateDataLink:hover {
  background-color: #1e7b25;
  color: white;
}
