/* ===== VARIABLES Y RESET ===== */
:root {
  --primary: #3498db;
  --primary-hover: #2980b9;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f39c12;
  --inactive: #95a5a6;
  --paused: #7f8c8d;
  --navbar-bg: #2c3e50; 
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --bg-light: #f8f9fa;
  --border-color: #dee2e6;
  --border-radius: 8px;
  --transition: 0.3s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  min-height: 100vh;
  background-color: var(--bg-light);
  margin: 0;
}

/* ===== LOGIN AND REGISTER PAGES ===== */
body.login-page, body.register-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.login-container, .register-container {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  transition: all var(--transition);
}

.login-header, .register-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2, .register-header h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.login-header p, .register-header p {
  color: var(--text-muted);
}

/* Form styling common to login/register/profile forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forgot-link,
.register-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.forgot-link:hover,
.register-link a:hover {
  text-decoration: underline;
}

/* ===== BUTTONS (GENERAL) ===== */
.btn, .login-btn, .submit-btn, .back-btn {
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.login-btn, .submit-btn, .btn-primary {
  background-color: var(--primary);
  color: white;
}

.login-btn:hover, .submit-btn:hover, .btn-primary:hover {
  background-color: var(--primary-hover);
}

.back-btn, .btn-secondary {
  background-color: var(--inactive);
  color: white;
}

.back-btn:hover, .btn-secondary:hover {
  background-color: var(--paused);
}

.btn-success {
  background-color: var(--success);
}

.btn-success:hover {
  background-color: #27ae60;
}

.btn-danger {
  background-color: var(--danger);
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-warning {
  background-color: var(--warning);
}

.btn-warning:hover {
  background-color: #e67e22;
}

/* ===== MESSAGES (GENERAL) ===== */
.message {
  padding: 12px;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  text-align: center;
  display: none;
}

.error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* ===== LAYOUT FOR PAGES WITH NAVBAR (DASHBOARD, ETC.) ===== */
.layout {
  display: flex;
  flex-direction: column; /* Main content flows below navbar */
  min-height: 50vh;
}

/* New Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--navbar-bg); 
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  position: sticky; 
  top: 0;
  z-index: 100; 
}

.navbar-brand h2 {
  margin: 0;
  font-size: 1.5rem;
}

.navbar-brand h2 i {
  margin-right: 0; /* Remove margin from icon in collapsed state */
}

.navbar-toggler {
  display: none; /* Hidden by default on larger screens */
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar-collapse {
  display: flex; /* Default to flex for larger screens */
  flex-grow: 1;
  justify-content: space-between; /* Space out nav and profile */
  align-items: center;
  flex-direction: row; /* Explicitly horizontal for large screens */
}

.navbar-collapse.active {
  display: flex;
}

.navbar-nav {
  list-style: none;
  display: flex;
  flex-direction: row; /* Horizontal layout for main navigation links */
  margin: 0;
  padding: 0;
  justify-content: center; /* Centers navigation items */
}

.navbar-nav li {
  margin: 0 1rem;
}

.navbar-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  background-color: var(--primary);
}

.navbar-profile {
  position: relative; 
}

.navbar-profile details summary {
  color: white;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.8rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition);
}

.navbar-profile details summary i {
  margin-right: 0;
}

.navbar-profile details summary:hover {
  background-color: var(--primary);
}

.navbar-profile details[open] summary {
  background-color: var(--primary);
}

.navbar-profile details ul {
  position: absolute;
  background-color: var(--navbar-bg); 
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  right: 0; 
  min-width: 160px;
  z-index: 1000;
}

.navbar-profile details ul li a {
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  display: block;
  white-space: nowrap;
}

.navbar-profile details ul li a:hover {
  background-color: var(--primary-hover);
}

.overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000; /* Ensure overlay is above everything but below the menu (1001) */
}

.overlay.active {
  display: block !important;
  z-index: 1000; /* Ensure it's behind the menu but above page content */
}

main {
  flex-grow: 1;
  padding: 2rem;
  position: relative;
  margin-top: .6px; /* Further adjusted to reduce space */
}

/* ===== CARDS (GENERAL) ===== */
.card, .dashboard-card, .profile-card, .estanque-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover, .dashboard-card:hover, .estanque-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== STATUS INDICATORS (GENERAL) ===== */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
}

.status-live { background-color: var(--success); }
.status-paused { background-color: var(--warning); }
.status-inactive { background-color: var(--inactive); }

.value-good { color: var(--success); }
.value-warning { color: var(--warning); }
.value-danger { color: var(--danger); }

/* ===== TABLES (GENERAL) ===== */
.data-table-container {
  margin-top: 20px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.table-container {
  overflow-x: auto;
  max-height: 400px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-light);
  position: sticky;
  top: 0;
}

/* ===== ALERTS ===== */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.alert-overlay.active {
  visibility: visible;
  opacity: 1;
}

.alert-box {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.alert-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.alert-icon {
  font-size: 2rem;
  color: var(--danger);
  margin-right: 1rem;
}

.alert-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #c0392b;
  margin: 0;
}

.alert-message {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.alert-parameters {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.parameter-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.parameter-item:last-child {
  border-bottom: none;
}

.alert-buttons {
  display: flex;
  justify-content: flex-end;
}

/* ===== DASHBOARD PAGE ===== */
body.dashboard-page {
  background-color: #f4f6f9; /* Fondo claro para el dashboard */
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.dashboard-value {
  font-size: 2rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.dashboard-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.last-check {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== HISTORIAL PAGE ===== */
.historial-header {
  margin-bottom: 1.5rem;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.historial-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.historial-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 5px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.realtime {
  background: var(--success);
}

.status-dot.historical {
  background: var(--primary);
}

.status-dot.error {
  background: var(--danger);
}

.chart-container {
  position: relative;
  height: 400px;
  margin-bottom: 2rem;
}

.param-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.download-option-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

#dateRangeContainer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

#downloadOptionsContainer {
  display: none;
  flex-direction: column;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 5px;
  margin-top: 1rem;
}

/* ===== INFORMES PAGE ===== */
.estanques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.estanque-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.estanque-card:hover {
  transform: translateY(-5px);
}

.estanque-card.principal {
  border: 3px solid var(--primary);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.estanque-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.estanque-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.estanque-status {
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-inactive {
  background-color: #ffebee;
  color: #c62828;
}

.status-paused {
  background-color: #fff3e0;
  color: #ef6c00;
}

.estanque-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.estanque-data-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  background-color: var(--bg-light);
  border-radius: 8px;
}

.estanque-data-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.estanque-data-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.last-update {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: right;
}

.paused-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  background-color: #fff3e0;
  border-radius: 8px;
  margin-top: 1rem;
}

.paused-mode i {
  color: var(--warning);
}

/* ===== PERFIL PAGE ===== */
.profile-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.profile-header h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  margin: 0 auto 1rem;
  display: block;
  background-color: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.profile-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-group {
  margin-bottom: 1rem;
}

.info-label {
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: block;
}

.info-value {
  font-size: 1.1rem;
  color: var(--text-dark);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.empty-field {
  color: var(--danger);
  font-style: italic;
}

.edit-form {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ===== USUARIOS PAGE ===== */
.acciones {
  display: flex;
  gap: 0.5rem;
}

.acciones button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-editar,
.form-crear {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

/* ===== REGISTRO PAGE ===== */
.register-container {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

.register-header {
  text-align: center;
  margin-bottom: 2rem;
}

.register-header h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.register-header p {
  color: var(--text-muted);
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submit-btn, .back-btn {
  width: 100%;
  padding: 12px;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.submit-btn {
  background-color: var(--primary);
}

.submit-btn:hover {
  background-color: var(--primary-hover);
}

.back-btn {
  background-color: var(--inactive);
  margin-top: 1rem;
}

.back-btn:hover {
  background-color: var(--paused);
}

.links {
  margin-top: 1.5rem;
  text-align: center;
}

.links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
}

.links a:hover {
  text-decoration: underline;
}

/* General Status Indicators (ensure these are available globally if not already) */
.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
}

.status-live {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-paused {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.status-inactive {
  background-color: var(--inactive);
}

.value-good {
  color: var(--success);
}

.value-warning {
  color: var(--warning);
}

.value-danger {
  color: var(--danger);
}

/* ===== RESPONSIVE STYLES (FOR NEW NAVBAR) ===== */
@media (max-width: 768px) {
  .navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
    padding: 8px 1rem; /* Reduced overall vertical padding */
  }

  .navbar-brand {
    display: flex; /* Make it a flex container */
    align-items: center; /* Vertically center items */
    white-space: nowrap; /* Prevent text from wrapping */
    flex-grow: 0; /* Let content define width */
    order: 0; /* Default order */
    margin-left: 0; /* Ensure no extra margin */
    text-align: left; /* Align brand content to the left */
  }

  .navbar-brand h2 {
    font-size: 1.2rem; /* Adjusted font size for brand text */
    margin: 0;
  }

  .navbar-brand h2 i {
    margin-right: 8px; /* Space between icon and text */
  }

  .navbar-toggler {
    display: none !important; /* Hide the default toggler on small screens in the main navbar */
  }

  /* Dedicated styles for the mobile menu opener button */
  .mobile-toggler {
    display: flex !important; /* Make sure this is visible and uses flex for centering */
    justify-content: center;
    align-items: center;
    order: -1; /* Place it at the beginning */
    width: 30px; /* Fixed width */
    height: 30px; /* Fixed height */
    margin-right: 10px; /* Consistent space from the brand */
    font-size: 16px; /* Icon size */
    background: none;
    border: none;
    color: white;
    cursor: pointer;
  }

  #navbarCloseButton {
    display: none; /* Hidden by default */
    position: absolute; /* Position absolutely within the sidebar */
    top: 0.5rem; /* Distance from the top */
    left: 0.5rem; /* Distance from the left */
    z-index: 1002; /* Ensure it's above the menu content */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem; /* Increased font size for better visibility */
    cursor: pointer;
  }

  .sidebar-brand-text {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: white;
    font-size: 1.3rem;
    margin-top: 1rem;
  }

  .sidebar-brand-text i {
    margin-right: 0.5rem;
  }

  .navbar-collapse {
    position: fixed; /* Position fixed for sliding menu */
    top: 0; /* Align to the top */
    left: -250px; /* Hidden by default, slides from left */
    width: 250px; /* Width of the sliding menu */
    height: 100vh; /* Full height */
    background-color: var(--navbar-bg); /* Background color */
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start; /* Align items to the start */
    padding: 1rem; /* Padding inside the menu */
    padding-top: 3rem; /* Adjusted for close button and new brand text */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* Shadow for depth */
    transition: left 0.3s ease-in-out; /* Smooth sliding transition */
    z-index: 1001; /* Ensure menu is above other content and overlay */
    display: none; /* Hide by default, JS will toggle flex */
  }

  .navbar-collapse.active {
    left: 0; /* Slide into view when active */
    display: flex !important; /* Ensure it's visible and uses flex layout */
  }

  .navbar-collapse.active #navbarCloseButton {
    display: block; /* Show the close button when menu is active */
  }

  .navbar-collapse.active .sidebar-brand-text {
    display: flex; /* Show sidebar brand when menu is active */
  }

  .navbar-brand { /* Ensure brand is centered in the main navbar */
    flex-grow: 1;
    text-align: left;
    font-size: 1.2rem; /* Adjusted font size */
    margin-left: 0;
  }

  .navbar-collapse.active ~ .navbar-brand {
    display: none; /* Hide the main navbar brand when sidebar is open */
  }

  .navbar-nav {
    flex-direction: column; 
    width: 100%;
    align-items: flex-start; /* Align items to the start for sidebar */
    padding: 0;
    margin-top: 1.5rem; /* Adjusted space from brand/toggler */
  }

  .navbar-nav li {
    width: 100%;
    text-align: left; /* Align text to the left */
    margin: 0; /* Remove horizontal margin */
  }

  .navbar-nav a {
    padding: 0.6rem 1rem; /* Adjusted padding for sidebar links */
    justify-content: flex-start; /* Align icon and text to start */
  }

  .navbar-profile {
    width: 100%;
    text-align: left; /* Align text to the left for sidebar */
    margin-top: 1.5rem; /* Space from navigation items */
  }

  .navbar-profile details summary {
    justify-content: flex-start; /* Align summary content to the left */
    padding: 0.6rem 1rem; /* Adjusted padding for sidebar */
  }

  .navbar-profile details ul {
    position: static; /* Remove absolute positioning */
    width: 100%;
    text-align: left; /* Align dropdown items to the left */
    box-shadow: none; /* Remove shadow for collapsed state */
    margin-top: 0.5rem; /* Space from summary */
    padding: 0;
  }

  .navbar-profile details ul li a {
    padding: 0.5rem 1rem; /* Adjust padding for dropdown links */
  }

  .overlay.active {
    display: block;
    z-index: 99; /* Ensure it's behind the menu but above page content */
  }

  main {
    padding: 1rem;
    margin-top: 0; 
  }
}

@media (max-width: 480px) {
  .login-container, .register-container { padding: 1.5rem; }
  .dashboard-value { font-size: 1.75rem; }
}
