/* ===== CSS VARIABLES ===== */
:root {
  --primary-green: #3d9441;
  --primary-green-light: #28a745;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --text-muted: #6c757d;
  --text-dark: #333;
  --transition: all 0.3s ease;  
  
  /* Card Colors */
  --color-total: #17a2b8;
  --color-online: #28a745;
  --color-offline: #dc3545;
  --color-maintenance: #ffc107;
  --color-full: #fd7e14;
}



/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
  }

  .JunkXChange  {
    font-size: 1.5rem;
    font-weight: bold;
  }

  .JunkXChange .Junk {
    color: #3B7607;
  }
  
  .JunkXChange .X {
    color: #0033cc;
  }
  
  .JunkXChange .change {
    color: #ebbd05;
  }

  body {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main{
    margin: 40px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .navigationBar {
  display: flex;
  justify-content: space-between; /* Add this - distributes space between items */
  align-items: center; /* Changed from align-content */
  background-color: #f8f9fa;
  padding: 15px 20px; /* Adjusted padding */
  position: fixed;
  width: 100%;
  height: 60px;
  left: 0;
  box-sizing: border-box; /* Ensures padding doesn't cause overflow */
  z-index: 1000; /* Keeps navbar on top */
}

.navigationRight {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.navigationLeft {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: auto; /* Changed from 880px - pushes to right automatically */
  gap: 20px;
  font-weight: bold;
}

.navigationLeft a {
  text-decoration: none;
  color: #006600;
  padding: 0px 10px;
  font-size: 25px;
  transition: color 0.3s ease, box-shadow 0.3s ease; /* Added box-shadow transition */
  height: 40px;
  display: flex;
  align-items: center;
}

.navigationLeft a:hover {
  box-shadow: rgb(0, 117, 74) 0px -3px inset;
}

.navigationLeft a.active {
  box-shadow: rgb(0, 117, 74) 0px -5px inset;
}

/* Hide Microsoft Edge's default password reveal button */
input[type="password"]::-ms-reveal {
  display: none;
}

/* Optional: Also hide the clear button if it appears */
input[type="password"]::-ms-clear {
  display: none;
}

/* Modal Styles */
.profileModal {
  display: none;
  position: fixed;
  top: 60px;
  right: 0;
  width: 350px;
  transition: all 0.3s ease;
  z-index: 999;
}

.profileModal-content {
  background-color:#f8f9fa;
  width: 100%;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  padding: 5px 20px 50px 20px;
  overflow-y: auto;
  border-radius: 10px;
}

.profileModal-header {
  position: relative;
  text-align: center;
  padding: 15px 20px;
  margin-bottom: 15px;
}

.profileModal-header h2 {
  padding-top: 15px;
  font-size: 20px;
  color: #3B7607;
}

.close-profileModal {
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #8a8a8a;
  cursor: pointer;
}

.close-profileModal:hover {
  color: #444343;
}

.avatar {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3B7607;
}


.profile-info {
  margin-bottom: 20px;
}

.profile-info p {
  margin: 10px 0;
}

.change-password-btn , .logout-btn{
  background: #AAB0AA;
  color: #fff;
  border: none;
  padding: 5px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  margin-top: 10px;
}

.change-password-btn:hover , .logout-btn:hover {
  font-weight: bold;
}

.profile-actions {
  display: flex;
  gap: 10px;
}


/* Message styling - Reusable for all forms */
#message {
  text-align: center;
  margin: 5px 0;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: none;
}

#message.success-message,
#message.error-message {
  display: block;
}

.success-message {
  color: #155724;
}

.error-message {
  color: #e92539;
}

/* ========================================
   GLOBAL TABLE STYLES
   ======================================== */

   /* Table Wrapper - Contains button and scrollable table */
.table-wrapper {
  position: relative;
  width: calc(100% - 40px);
  margin: 20px;
}

/* Table Container - WITH HORIZONTAL SCROLL */


/* Table Container - Scrollable */
.table-container {
  width: 100%;
  padding: 50px 10px 10px 10px; /* Top padding for button space */
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}


/* Table Base Styles */
table {
  border-collapse: collapse;
  background-color: #a5d6a7;
  width: auto !important; /* ✅ Allow table to exceed container */
  min-width: 100%; /* ✅ At least full container width */
  max-width: none !important; /* ✅ Can be wider than container */
  table-layout: auto !important; /* ✅ Let columns size naturally */
  margin: 0 auto;
  display: table !important;
}

/* Table Headers */
th {
  border: 1px solid #000000;
  padding: 15px;
  text-align: center;
  margin: 0;
  background-color: #388e3c;
  color: white;
  font-weight: bold;
  font-size: 20px;
  height: 60px;
  white-space: nowrap; /* ✅ Prevent header wrapping */
  min-width: 120px; /* ✅ Minimum column width */
}

/* Table Cells */
td {
  border: 1px solid #000000;
  padding: 8px 5px;
  text-align: center;
  margin: 0;
  height: 40px;
  font-size: 18px;
  vertical-align: middle;
  white-space: nowrap; /* ✅ Prevent cell wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 120px; /* ✅ Minimum cell width */
}

/* Table Row Hover Effect */
tbody tr:hover {
  background-color: #c8e6c9;
}

/* Custom Scrollbar Styling */
.table-container::-webkit-scrollbar {
  height: 10px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #388e3c;
  border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #2e7d32;
}

/* Table Scroll Container (for vertical scroll) */
.table-scroll-container {
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid #ddd;
}

.table-scroll-container thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Status Badges */
.status-badge {
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
}

/* Export Button - Fixed above table */
.export-btn {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 20px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  background-color: #388e3c;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
  margin-bottom: 10px;
}

.export-btn:hover {
  transform: scale(1.05);
}

  /* Footer */
  footer {
    background-color: #f8f9fa;
    color: #006600;
    text-align: center;
    align-content: center;
    font-weight: bold;
    z-index: 1001;
    position: fixed;
    bottom: 0px;
    width: 100%;
    height: 40px;
    padding: 5px 10px; 
  }

  /* Page Title */
.page-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 0 20px;
}

.page-title h1 {
  font-size: 50px;
  cursor: pointer;
  margin: 0;
  color: green;
}

 .page-title i {
  font-size: 30px;
  cursor: pointer;
  color: green;
}

 .page-title i:hover {
  color: #3d9441;
  transform: scale(1.1);
}

   
/* ✅ PAGINATION CONTROLS - NEW */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px auto;
  padding: 20px;
  flex-wrap: wrap;
}

.pagination-controls button {
  padding: 10px 20px;
  background-color: #388e3c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: #2e7d32;
  transform: scale(1.05);
}

.pagination-controls button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.pagination-info {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  padding: 0 10px;
  text-align: center;
}




/* Responsive Table Styles */
@media (max-width: 1024px) {
  .table-container {
    width: calc(100% - 20px);
    margin: 10px;
    padding: 10px;
  }
  
  th, td {
    padding: 10px 5px;
    font-size: 14px;
  }
  
  .pagination-controls {
    gap: 10px;
  }
  
  .pagination-controls button {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 70px;
  }
}

@media (max-width: 768px) {
  .table-container {
    width: calc(100% - 20px);
    margin: 10px;
    overflow-x: auto;
  }
  
  table {
    min-width: 600px;
  }
  
  th, td {
    padding: 8px 5px;
    font-size: 12px;
  }
  
  .export-btn {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
  }
  
  /* ✅ Stack pagination vertically on mobile */
  .pagination-controls {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
  
  .pagination-controls button {
    width: 100%;
    max-width: 300px;
  }
  
  .pagination-info {
    order: -1; /* Move info to top on mobile */
    margin-bottom: 10px;
  }

  /* Warning banner - ADD THESE PROPERTIES */
  body::before {
    content: "⚠️ This layout is optimized for laptop/desktop screens";
    display: block;
    background-color: #FFCC00;
    color: black;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 99999;
  }
}