/* Import Google Fonts - Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* RESET AND BASE STYLES */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: black;
  font-size: 14px;
  background-color: white;
  overflow-x: hidden;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* LOGIN STYLES - BACKGROUND */

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Background with blur effect */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../../images/background.jpg");
  background-size: 100% 102%; /* Adjusted for better quality */
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center;
  filter: blur(0px);
  transform: scale(1); /* Slightly scale to avoid blur edges */
  z-index: -1;

}

/* LOGIN CONTAINER */

.login-form {
  /* Glassmorphism Effect */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

/* Glass shine effect */
.login-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

/*========================================*/
/*css of logo image in login container*/
/*========================================*/
.logo img {
  height: 70px;
  width: auto;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.logo p {
  color: rgba(18, 2, 2, 0.9);
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Logo section with circular logo */

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.logo-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  object-fit: cover;
}

.image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  object-fit: cover;
}

.logo-text {
  color: white;
  display: flex;
  flex-direction: column;
}

.register-link p {
  color: black; /*para sa dont have an account*/
}

.form-group {
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: black;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/*para sa placeholher input*/
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f0f0f0;
  color: #333;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder {
  color: #999;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #999;
  background: #f5f5f5;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/*button para sa create new message*/

.btn-primary {
  width: fit-content;
  padding: 0.75rem;
  background:  rgb(43, 54, 173);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-primary:hover {
  background: rgba(90, 111, 216, 0.9);
}

.btn-secondary {
  width: fit-content;
  padding: 0.75rem;
  background:#6c757d;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-secondary:hover {
  background: #5a6268;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #f5c6cb;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #c3e6cb;
}

.register-link {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

.register-link p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.register-link a {
  color: #a0c4ff;
  text-decoration: none;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.register-link a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(160, 196, 255, 0.5);
}

/* DASHBOARD STYLES */

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0rem;
}

.header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 1rem 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: black;
  font-weight: 500;
}

.logout-btn {
  background: #dc3545;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}

.logout-btn:hover {
  background: #c82333;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.dashboard-card .dashboard-grid p{
  color: #686666;
  font-weight: 100;
}

 /*for Glassmorphism Effect sa lahat ng background*/
.dashboard-card {
  background: white; /*kulay ng bacground Recent Residents, Recent Jobs, Quick Actions*/
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 23, 23, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}
.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.dashboard-card h3 {
  color: black; /*kulay ng text Recent Residents, Recent Jobs, Quick Actions*/
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;/*kulay ng bacgroud kung ilan ang resident, jobs, etc meron din sa card_icon css*/
  padding: 1.5rem;
  border-radius: 50px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-left: 5px solid #4C3B4D; /* Green border on left side only */
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: black;
}

.stat-label {
  color: black; /*kulay ng text ng total resident etc*/
  margin-top: 0.5rem;
}

/*=====================================================
 Sidebar Navigation
 ======================================================*/

.main-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: rgb(241, 234, 234);
  color: white;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  background: #D0ADA7;
  padding: 4px 4px;
  border-bottom: none;
  text-align: center;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  z-index: 1001;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* Sidebar Logo Styling */
.sidebar-logo {
  width: 250px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: brightness(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  background: transparent;
  border-radius: 8px;
}

.sidebar-logo:hover {
  transform: scale(1.02);
  filter: brightness(1.05) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
}

.sidebar-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.jobmatch-icon-logo {
  background: white;
  color: rgb(43, 54, 173);
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-label, .resident-label {
  font-size: 11px;
  opacity: 0.95;
  display: block;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: #000000;
}

.sidebar-nav {
  padding: 0;
  padding-top: 110px;
  color: black;
  overflow-y: auto;
  flex: 1;
  margin-top: 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 5px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: black; /*kulay ng text sa side bar*/
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: black;
  padding-left: 29px;
}

.sidebar-nav a.active {
  background: rgb(230, 210, 210);
  color: black;
  border-right: 5px solid #fff;
}

.sidebar-nav a i {
  margin-right: 12px;
  font-size: 20px;
  width: 24px;
  text-align: center;
  color: #000 !important; /*para sa color ng icon sa sidebar - forced dark*/
}

/* Force all Bootstrap Icons to be dark */
.sidebar-nav a i[class*="bi-"] {
  color: #000 !important;
  opacity: 1 !important;
}

.sidebar-nav a i::before {
  color: #000 !important;
}

/* Sidebar section labels */
.sidebar-section-label {
  color: rgba(12, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 24px 5px 24px;
  margin-top: 10px;
  border-bottom: 1px solid rgba(32, 13, 13, 0.1); /*guhit sa section sa sidebar*/
  position: relative;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

.sidebar-section-label::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 24px;
  width: 100px;
  height: 7px;
  background: linear-gradient(90deg, rgba(48, 43, 43, 0.4), transparent);/*Makapal na guhitt sa side bar*/
}

/* Collapsible sidebar section toggle */
.sidebar-section-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.2s ease;
}

.sidebar-section-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-section-arrow {
  font-size: 13px;
  transition: transform 0.3s ease;
  color: rgba(12, 0, 0, 0.5);
  margin-right: 5px;
}

.sidebar-section-toggle.collapsed .sidebar-section-arrow {
  transform: rotate(-90deg);
}

/* Hidden sidebar items (collapsed) */
.sidebar-item-hidden {
  display: none !important;
}

.notification-badge {
  background: #ff4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
  }
}

.main-content {
  margin-left: 280px;
  flex: 1;
  background:  rgb(241, 234, 234);
  min-height: 100vh;
  padding-top: 100px;
}

.main-content .header {
  background: #D0ADA7;
  padding: 23px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  z-index: 999;
  width: calc(100% - 280px);
}

.main-content .header h1 {
  margin: 0;
  font-weight: 900;
  color: black;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.main-content .dashboard-container {
  margin-top: 30px;
}

/* Table Styles */

.table-container {
  background: white;/*background ng table*/
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: visible;
  position: relative;
}

/* Responsive table wrapper for horizontal scrolling */
.table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Minimum width to prevent cramping */
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap; /* Prevent text wrapping in cells */
}

/* Allow Address column to wrap to multiple lines */
td[data-label="Address"] {
  white-space: normal !important;
  max-width: 200px;
  line-height: 1.4;
}

th {
  background: rgb(103, 114, 230);/*para sa back ground ng lahat ng table header*/
  font-weight: 600;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Round the top corners of first and last header cells */
th:first-child {
  border-top-left-radius: 10px;
}

th:last-child {
  border-top-right-radius: 10px;
}

/* Round the bottom corners of last row cells */
tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}

tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

tr:hover {
  background: #f8f9fa; /*hover ng laman ng table*/
}

/* ===== RESPONSIVE MEDIA QUERIES - CONSOLIDATED ===== */

/* Large Tablets - 1024px and below */
@media (max-width: 1024px) {
  /* Container adjustments */
  .container {
    padding: 0 30px;
  }

  /* Hero Section */
  .home-content-landing h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
  }

  .home-content-landing p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Info Section */
  .info-section {
    padding: 6rem 30px;
  }

  .info-section h2 {
    font-size: 2.2rem;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet and Mobile Devices - 768px and below */
@media (max-width: 768px) {
  /* Landing Page Header */
  .landing-header {
    padding: 0.75rem 0;
  }

  .landing-header .container {
    padding: 0 15px;
    flex-wrap: wrap;
  }

  .logo-section {
    gap: 0.5rem;
  }

  .logo-circle {
    width: 60px;
    height: 60px;
  }

  .logo-text h1 {
    font-size: 1.3rem !important;
  }

  .logo-text p {
    font-size: 0.75rem !important;
  }

  /* Hero Section - Landing Page */
  .home-section-landing {
    padding: 6rem 15px;
    min-height: 70vh;
  }

  .home-content-landing {
    max-width: 100%;
    padding: 0 15px;
  }

  .home-content-landing h1 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .home-content-landing p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 1.5rem;
  }

  .btn-primary-landing,
  .btn-secondary-landing {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    margin: 0.3rem;
    display: inline-block;
  }

  /* Info Sections */
  .info-section {
    padding: 4rem 20px;
    overflow: hidden;
  }

  .info-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .info-section p {
    font-size: 1rem;
    padding: 0;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .service-item {
    padding: 1.5rem;
    border-radius: 40px 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .service-item h3 {
    font-size: 1.3rem;
  }

  .service-item p {
    font-size: 0.95rem;
  }

  /* Container */
  .container {
    padding: 0 15px;
  }

  /* Dashboard Grid */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
    border-radius: 30px 0;
  }

  /* Table Styles */
  .table-container {
    margin: 0 -15px; /* Extend to edges on mobile */
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive {
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 800px; /* Wider minimum on mobile for better scrolling */
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
  }

  /* Compact action buttons for mobile */
  .btn-secondary {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.4rem !important;
    margin: 0.1rem !important;
  }
  
  /* Status Badges */
  .status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  /* Table Pagination */
  .table-pagination {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .table-pagination .pagination-info {
    order: 2;
    font-size: 0.9rem;
  }

  .table-pagination .pagination-controls {
    order: 1;
    display: flex;
    gap: 0.5rem;
  }
  
  /* Sidebar Container */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    z-index: 9999;
    width: 280px;
    display: flex;
    flex-direction: column;
  }
  
  /* Sidebar Header */
  .sidebar-header {
    flex-shrink: 0;
    position: static;
    z-index: 1;
    padding: 10px 15px 8px 15px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    left: auto;
    top: auto;
  }
  
  .sidebar-logo {
    width: 240px;
    margin-bottom: 8px;
  }
  
  .admin-label, .resident-label {
    font-size: 12px;
    letter-spacing: 1.8px;
    margin-top: 5px;
  }
  
  /* Sidebar Navigation */
  .sidebar-nav {
    overflow-y: auto;
    flex: 1;
    height: calc(100vh - 100px);
    padding-top: 5px;
  }
  
  /* Reduce spacing for section labels on mobile */
  .sidebar-section-label {
    padding: 10px 15px 5px 15px;
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: 0.8px;
  }
  
  .sidebar-section-label:first-child {
    margin-top: 0;
    padding-top: 5px;
  }
  
  .sidebar-section-label::after {
    left: 15px;
    width: 80px;
    height: 5px;
  }
  
  /* Reduce spacing for navigation items on mobile */
  .sidebar-nav a {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .sidebar-nav a:hover {
    padding-left: 20px;
  }
  
  .sidebar-nav a i {
    font-size: 18px;
    margin-right: 10px;
  }
  
  .sidebar-nav li {
    margin: 3px 0;
  }
  
  /* Sidebar States */
  .sidebar.active,
  .sidebar.mobile-visible,
  .sidebar.mobile-active,
  .sidebar.sidebar-open {
    transform: translateX(0) !important;
  }
  
  .sidebar.mobile-hidden {
    transform: translateX(-100%);
  }
  
  /* Main Content Adjustments */
  .main-content {
    margin-left: 0;
    padding-top: 0;
    width: 100%;
  }
  
  .main-content.has-sidebar-toggle {
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }
  
  .main-content .header {
    padding: 15px 20px;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    z-index: auto;
  }
  
  .main-content .dashboard-container {
    padding: 20px;
    margin-top: 0; /* Remove fixed header margin on mobile */
  }

  .dashboard-container {
    padding: 1rem;
  }

  .header {
    flex-direction: row;
    gap: 0.5rem;
    text-align: left;
    padding: 0.75rem 1rem !important;
    justify-content: space-between;
    align-items: center;
  }
  
  .header h1 {
    font-size: 1.2rem !important;
    margin: 0 !important;
    flex: 1;
    text-align: left;
    margin-left: 0;
    padding-left: 45px;
  }
  
  .header h1 i {
    font-size: 1.1rem;
  }
  
  .user-info {
    flex-direction: row;
    gap: 0.3rem;
    align-items: center;
    justify-content: flex-end;
  }
  
  .user-info span {
    display: none; /* Hide welcome text on mobile for cleaner UI */
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Landing Page Adjustments */
  .landing-header .container {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
  }

  /* Make hamburger flow inside landing header, not fixed */
  .landing-header .sidebar-toggle {
    position: static !important;
    flex-shrink: 0;
    z-index: auto;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    order: -1;
    padding: 8px;
  }

  .landing-header .sidebar-toggle:hover {
    background: transparent;
  }

  .landing-header .sidebar-toggle .hamburger-icon {
    width: 24px;
    height: 18px;
  }

  .landing-header .sidebar-toggle .hamburger-icon span {
    background: white;
    height: 3px;
    border-radius: 2px;
  }

  .landing-header .sidebar-toggle .hamburger-icon span:nth-child(1) { top: 0; }
  .landing-header .sidebar-toggle .hamburger-icon span:nth-child(2) { top: 7px; }
  .landing-header .sidebar-toggle .hamburger-icon span:nth-child(3) { top: 14px; }

  .logo-section {
    flex-direction: row;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
  }

  .logo-circle {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
  }
  
  /* Login page logo - larger and stretched on mobile */
  .login-form .logo img {
    height: 80px;
    width: 90%;
    max-width: 250px;
    object-fit: contain;
  }
  
  /* Landing page logo - keep smaller */
  .logo-section .logo img {
    max-width: 50px;
    height: auto;
    width: auto;
  }
  
  .logo-text {
    text-align: center;
  }
  
  .logo-text h1 {
    font-size: 1.3rem !important;
    margin-bottom: 0.1rem !important;
  }
  
  .logo-text p {
    font-size: 0.7rem !important;
  }

  .logo-image,
  .image {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    object-fit: cover !important;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
  }

  .home-content-landing h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .home-content-landing p {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
  }

  .btn-primary-landing,
  .btn-secondary-landing {
    display: block;
    margin: 1rem auto;
    width: 80%;
    max-width: 300px;
  }

  .info-section {
    padding: 3rem 20px;
    overflow: hidden;
  }

  .info-section h2 {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  /* Carousel responsive adjustments */
  .carousel-nav {
    padding: 0 10px;
  }
  
  .carousel-btn {
    padding: 8px 12px;
    font-size: 16px;
  }
  
  .carousel-indicators {
    bottom: 20px;
  }
  
  /* Alternative card-style table for mobile */
  .table-card-view table,
  .table-card-view thead,
  .table-card-view tbody,
  .table-card-view th,
  .table-card-view td,
  .table-card-view tr {
    display: block;
  }

  .table-card-view thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-card-view tr {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .table-card-view td {
    border: none !important;
    position: relative;
    padding: 0.5rem 0 0.5rem 45%;
    white-space: normal;
  }

  .table-card-view td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 6px;
    width: 40%;
    text-align: left;
    font-weight: bold;
    color: #333;
  }
  
  /* Hamburger Toggle - Show on Mobile */
  .sidebar-toggle {
    display: block !important;
  }
}

/* Small Mobile Devices - 480px and below */
@media (max-width: 480px) {
  /* Landing Page Header - Extra Small */
  .logo-circle {
    width: 48px;
    height: 48px;
  }
  
  .logo-text h1 {
    font-size: 1.1rem !important;
  }
  
  .logo-text p {
    font-size: 0.65rem !important;
  }

  .logo-section {
    gap: 0.4rem;
  }

  /* Hero Section - Extra Small */
  .home-section-landing {
    padding: 4rem 10px;
    min-height: 60vh;
  }

  .home-content-landing h1 {
    font-size: clamp(1.3rem, 4.5vw, 1.6rem);
    margin-bottom: 0.8rem;
  }

  .home-content-landing p {
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
    margin-bottom: 1.2rem;
  }

  .btn-primary-landing,
  .btn-secondary-landing {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin: 0.2rem;
    width: 100%;
    max-width: 250px;
  }

  /* Info Sections - Extra Small */
  .info-section {
    padding: 3rem 16px;
  }

  .info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .info-section h2::after {
    width: 40px;
    height: 3px;
  }

  .info-section p {
    font-size: 0.9rem;
  }

  /* Services Grid - Extra Small */
  .services-grid {
    gap: 1rem;
    padding: 0;
    max-width: 100%;
  }

  .service-item {
    padding: 1.2rem;
    border-radius: 30px 0;
    max-width: 100%;
  }

  .service-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }

  .service-item p {
    font-size: 0.85rem;
  }

  /* Contact Section */
  #contact p {
    font-size: 0.9rem;
    flex-direction: column;
    gap: 5px;
  }

  #contact p i {
    font-size: 1rem;
  }

  /* Footer */
  .landing-footer {
    padding: 1rem 10px;
    font-size: 0.8rem;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.8rem;
    border-radius: 25px 0;
  }

  /* Stack action buttons vertically on very small screens */
  .btn-secondary {
    display: block;
    width: 100%;
    margin-bottom: 0.2rem !important;
  }
  
  /* Login page logo - extra small screens */
  .login-form .logo img {
    height: 75px;
    width: 85%;
    max-width: 220px;
  }

  .login-form {
    padding: 1.5rem;
    margin: 10px;
  }
  
  .hero-content-landing h1 {
    font-size: 2rem;
  }
  
  /* Sidebar Adjustments for Extra Small Screens */
  .sidebar-header {
    padding: 10px 15px;
  }
  
  .admin-label, .resident-label {
    font-size: 11px;
    letter-spacing: 1.8px;
    margin-top: 5px;
  }

  /* Dashboard Cards */
  .dashboard-card {
    padding: 0.8rem;
    border-radius: 15px;
  }

  .dashboard-card h3 {
    font-size: 1.1rem;
  }
}

/* Table loading state */
.table-loading {
  position: relative;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* Improved status badges for mobile */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Enhanced table pagination for mobile */
.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

/* Responsive - Styles moved to consolidated media queries section above */


/*=========================================================
  LANDING PAGE STYLE  
  =========================================================*/

/* set up para sa space logo na peso bansud */
.container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Header ng  landing page */
.landing-header {
  background: #D0ADA7;
  padding: 1rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position:sticky; 
  top: 0;
  z-index: 1000; 
}

.landing-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-header .logo-text h1 {
  color: black;
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.landing-header .logo-text p {
  color: black;
  font-size: .9rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main navigation for the landing page */
.main-nav {
  transition: left 0.3s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem; /* space ng nav like Homen, About Us, Services, Contact Us */
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: black;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 0.5rem 0;
  display: block;
}

.main-nav a:hover {
  color: white; /* Highlight color on hover */
}

/* Responsive Navigation for Mobile */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100%;
    background: linear-gradient(135deg, #D0ADA7, #b89489);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 80px;
    overflow-y: auto;
  }

  .main-nav.nav-open {
    left: 0;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav a {
    display: block;
    padding: 18px 25px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
  }

  .main-nav a:hover,
  .main-nav a:active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #fff;
    padding-left: 30px;
    color: #fff;
  }
}

/* Prevent body scroll when nav is open */
body.nav-mobile-open {
  overflow: hidden;
}

/* Hero section for the landing page */
.home-section-landing {
  color: white;
  text-align: center;
  padding: 8rem 20px; /* Increased padding for prominence */
  min-height: 100vh; /* laki ng picture */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Video Background */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Optimize video for mobile */
@media (max-width: 768px) {
  .video-background {
    object-position: center center;
  }
  
  /* Optional: Hide video on very small devices to improve performance */
  /* Uncomment if needed:
  @media (max-width: 480px) {
    .video-background {
      display: none;
    }
    .home-section-landing {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
  }
  */
}

/* Overlay for better text readability on hero image */

.home-section-landing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
  z-index: 1;
}

.home-content-landing {
  position: relative;
  z-index: 2;
  max-width: 800px;
  pointer-events: none;
}

.home-content-landing h1 {
  font-size: clamp(1.5rem, 5vw, 3.8rem);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  letter-spacing: 1px;
  animation: fadeInUp 1s ease-out;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.home-content-landing p {
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  margin-bottom: 2.5rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.4);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.6;
  animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-content-landing a {
  pointer-events: all;
  animation: fadeInUp 1.4s ease-out;
}

/* Buttons for the landing page hero section */

.btn-primary-landing,
.btn-secondary-landing {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 100;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 44px; /* Better touch target for mobile */
  line-height: 1.5;
  text-align: center;
}

.btn-primary-landing {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-primary-landing:hover,
.btn-primary-landing:focus {
   background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  outline: none;
}

.btn-secondary-landing {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary-landing:hover,
.btn-secondary-landing:focus {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  outline: none;
}

/* Better touch interaction */
@media (hover: none) and (pointer: coarse) {
  .btn-primary-landing:active,
  .btn-secondary-landing:active {
    transform: scale(0.98);
  }
}

/* General information sections */
.info-section {
  padding: 8rem 20px; /* space sa taas ng About PESO Bansud*/
  text-align: center;
  background-color: white;
}

/* font color of  About PESO Bansud */
.info-section h2 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 2rem; /* space ng discription sa title */
  position: relative;
  display: inline-block;
}

.info-section h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: #667eea; /*kulay ng guhit sa baba ng title*/
  border-radius: 2px;
}

.info-section p {
  font-size: 1.1rem;
  color: black;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 1rem auto;
}

/* Background color of our service */
.bg-light {
  background-color: #f8f9fa;
}

/* Grid for services section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 100%;
  box-sizing: border-box;
}

.service-item {
  background-color: white;
  padding: 2rem;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 5px solid #5D576B;
  box-sizing: border-box;
  max-width: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.service-item h3 {
  color: black; /*kulay ng title ng nasa tiles*/
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.service-item p {
  font-size: 1rem;
  color: black;
  margin-bottom: 0;
}

/* Contact section specific styles */
#contact p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#contact p i {
  color: black; /* icon color in contact us*/
  font-size: 1.2rem;
}

/* Footer for the landing page */

.landing-footer {
  background: #D0ADA7;
  color: black;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for landing page - Moved to consolidated media queries section above */

/* ========================================
   HAMBURGER NAVIGATION FOR SIDEBAR
   ======================================== */

/* Hamburger Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 13px;
    left: 14px;
    z-index: 10000;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    backdrop-filter: none;
    transition: all 0.3s ease;
    box-shadow: none;
    display: none; /* Hidden by default, shown only on mobile via media query at line 703 */
}

/* Desktop - Hide hamburger toggle */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: none !important;
    }
}

.sidebar-toggle:hover {
    background: transparent;
}

.sidebar-toggle.active {
    background: transparent;
}

/* Resident Sidebar Toggle (Green Theme) */
.sidebar-toggle.resident {
    background: transparent;
}

.sidebar-toggle.resident:hover {
    background: transparent;
}

.sidebar-toggle.resident.active {
    background: transparent;
}

/* Hamburger Icon Animation */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 7px; }
.hamburger-icon span:nth-child(3) { top: 14px; }

/* Hamburger Animation when Active */
.sidebar-toggle.active .hamburger-icon span:nth-child(1) {
    top: 7px;
    transform: rotate(135deg);
}

.sidebar-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.sidebar-toggle.active .hamburger-icon span:nth-child(3) {
    top: 7px;
    transform: rotate(-135deg);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Sidebar Responsive Behavior - Moved to hamburger section below */

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-mobile-open {
    overflow: hidden;
}

/* ========================================
   END HAMBURGER NAVIGATION
   ======================================== */

/* ========================================
   MOBILE SWIPE INDICATOR FOR TABLES
   ======================================== */
.swipe-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  color: #000000;
  font-size: 0.85rem;
  font-weight: 500;
  user-select: none;
  animation: swipeFade 2.5s ease-in-out infinite;
}

.swipe-indicator i {
  font-size: 1rem;
  color: #667eea;
}

.swipe-indicator .swipe-arrows {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: swipeSlide 1.8s ease-in-out infinite;
}

@keyframes swipeSlide {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

@keyframes swipeFade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@media (max-width: 768px) {
  .swipe-indicator {
    display: flex;
  }
}
