/* Color Palette */
:root {
  --primary: #0a4fa3;      /* Deep Professional Blue */
  --primary-light: #007bff; /* Bright Accent Blue */
  --secondary: #00c6ff;    /* Cyan */
  --dark: #1e293b;         /* Slate Dark */
  --text-gray: #64748b;    /* Slate Gray */
  --light-bg: #f8fafc;     /* Light Gray Background */
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* GLOBAL STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 79, 163, 0.8); /* Slightly more transparent initial state */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar:not(.portal).scrolled {
  background: var(--primary); /* Becomes solid blue */
  padding: 10px 40px; /* Modern shrink effect */
  box-shadow: var(--shadow-lg);
}

/* User-side navbar logo sizing (prevents oversized logo images) */
.navbar:not(.portal) > a {
  display: flex;
  align-items: center;
  line-height: 0;
}

.navbar:not(.portal) img.logo {
  height: 64px;
  width: auto;
  max-width: 180px;
  display: block;
}

/* User-side navbar should be centered pill menu on desktop */
@media (min-width: 769px) {
  .navbar:not(.portal) nav {
    flex: 0 1 auto;
    justify-content: flex-end;
    gap: 22px;
  }

  .navbar:not(.portal) nav a {
    padding: 8px 0;
  }
}

@media (min-width: 1025px) {
  /* Admin portal uses sidebar style on large screens */
  .navbar.portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    background: #fff;
    border-right: 1px solid rgba(148,163,184,0.2);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    z-index: 1100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  }

  .navbar.portal img.logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .navbar.portal.collapsed {
    width: 80px;
    padding: 20px 10px;
    align-items: center;
  }

  .navbar.portal.collapsed .logo {
    font-size: 0.7rem;
    text-align: center;
    overflow: hidden;
  }
  
  .navbar.portal.collapsed img.logo {
    max-height: 40px;
  }

  .navbar.portal.collapsed nav a {
    font-size: 0;
    padding: 12px 0;
    display: flex;
    justify-content: center;
  }

  .navbar.portal .logo {
    font-size: 1.25rem;
    color: var(--dark) !important;
    margin-bottom: 16px;
    width: 100%;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: font-size 0.3s ease;
  }

  /* Push admin content right so sidebar doesn't overlap */
  body.portal-sidebar .main-content {
    margin-left: 260px;
    display: flex;
    justify-content: center;
    width: calc(100% - 260px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.portal-sidebar.collapsed-sidebar .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
  }

  body.portal-sidebar .dashboard-container,
  body.portal-sidebar .footer {
    margin-left: 260px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.portal-sidebar.collapsed-sidebar .dashboard-container,
  body.portal-sidebar.collapsed-sidebar .footer {
    margin-left: 80px;
  }

  body.portal-sidebar .section {
    padding: 40px 30px;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Sidebar Toggle Button for Desktop */
.sidebar-toggle {
  display: none;
  position: absolute;
  top: 15px;
  right: 10px;
  background: var(--primary);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1201;
  font-weight: bold;
}

@media (min-width: 1025px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .navbar.portal.collapsed .sidebar-toggle {
    right: auto;
  }
}

@media (max-width: 1024px) {
  .navbar.portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--primary);
    border-right: none;
  }

  .navbar.portal .logo {
    margin-bottom: 0;
    color: white !important;
  }

  body.portal-sidebar .main-content {
    margin-left: 0;
    width: 100%;
    margin-top: 80px;
    padding: 20px;
  }

  body.portal-sidebar .dashboard-container,
  body.portal-sidebar .footer {
    margin-left: 0;
  }

  /* Ensure hamburger is visible and positioned correctly in the portal top bar */
  .navbar.portal .hamburger {
    display: flex;
  }

  .navbar.portal .hamburger .bar {
    background-color: white !important;
  }
}

.logo {
  height: auto;
  width: auto;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navbar nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.navbar nav a:hover {
  color: #00d4ff;
}

.navbar nav a.active {
  color: #00d4ff;
}

/* Admin portal button-style nav (matches desired screenshot) */
.navbar.portal nav a {
  background: rgba(255, 255, 255, 0.88);
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar.portal nav a.btn-teal {
  background: var(--secondary);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.navbar.portal nav a.btn-secondary {
  background: rgba(229, 231, 235, 0.8);
  color: var(--dark);
  border-color: rgba(148, 163, 184, 0.6);
}

.navbar.portal nav a.btn-danger {
  background: #dc3545;
  color: var(--white);
  border-color: rgba(220, 53, 69, 0.8);
}

.navbar.portal nav {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 10px;
}

/* Portal navigation drawer adjustments for mobile */
@media (max-width: 1024px) {
  .navbar.portal.has-hamburger nav {
    background: #f8fafc; /* Lighter background for admin drawer items */
    padding: 100px 25px 30px;
  }
  .navbar.portal.has-hamburger nav a {
    box-shadow: var(--shadow-sm);
  }
}

.navbar.portal nav a {
  width: 100%;
  text-align: center;
}

.navbar.portal nav a:hover {
  opacity: 0.98;
  transform: translateY(0);
  color: #fff;
}

.navbar.portal nav a.active {
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(10,79,163,0.6), 0 8px 17px rgba(0,0,0,0.16);
  background: var(--primary);
  color: #fff;
}

/* Button variations */
.btn-teal {
  background: #00c6ff;
  color: #001f3f;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.navbar nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: #00d4ff; /* Bright cool blue highlight */
  transition: width 0.3s ease;
}

.navbar nav a:hover::after {
  width: 100%;
}

/* HAMBURGER MENU */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 1001; /* Ensure it's above other nav elements */
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: 0.3s;
}

/* Body state when nav is open */
body.nav-open {
  overflow: hidden;
}

/* Overlay for mobile nav */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6); /* --dark with opacity */
  z-index: 999; /* Below navbar, above content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* HERO SECTION */
.hero {
  position: relative;
  padding: 140px 5% 100px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  overflow: visible; /* Allow overlap */
  display: flex;
  align-items: center;
  min-height: 85vh;
}

.hero-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
  gap: 50px;
}

.hero-content {
  flex: 1;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.hero h1 span {
  color: var(--primary-light);
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-gray);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(10, 79, 163, 0.1));
  border-radius: 20px;
}

/* SERVICES OVERLAP */
.services-overlap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: -80px auto 80px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.service-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
  height: 200px;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-details {
  padding: 2rem;
  text-align: center;
  position: relative;
}

.icon-circle {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -52px auto 1rem;
  font-size: 1.5rem;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
}

.service-card h3 {
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 1.25rem;
}

.service-card p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* SECTIONS */
.section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

body.portal-sidebar .dashboard-container {
  margin-left: 270px;
}

body.portal-sidebar .section.light,
body.portal-sidebar .dashboard-container {
  margin-right: 30px;
}

.section.light {
  background-color: #f1f5f9;
  border-radius: 30px;
  margin-bottom: 50px;
}

.section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--dark);
}

/* SEARCH BAR */
.search-container {
  text-align: center;
  margin-bottom: 20px;
}

#search-bar {
  padding: 12px 20px;
  width: 100%;
  max-width: 500px;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

#search-bar:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* PRODUCTS & FILTER */
.filter {
  text-align: center;
  margin: 40px 0;
}

.filter button {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 10px 24px;
  margin: 0 5px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  color: var(--text-gray);
  box-shadow: var(--shadow-sm);
}

.filter button:hover, .filter button.active {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

/* Grid layout for products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 20px;
}

/* Modernized Product Card */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Image Presentation */
.product-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    padding: 10px;
}

.no-image {
    background-color: #f8f9fa;
    color: #adb5bd;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Typography & Pricing */
.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0056b3;
}

.price-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 400;
}

.product-card ul {
  list-style: none;
  padding: 0;
  text-align: left;
  margin: 0 auto;
  display: inline-block;
}

.product-card ul li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-gray);
}

.warranty {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
  color: var(--text-gray);
  background: white;
  display: inline-block;
  padding: 20px 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* BUTTONS */
.btn-primary, .btn-solid {
  background-color: var(--primary-light);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover, .btn-solid:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary-light);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary-light);
  color: white;
}

/* Staff management page specific styles */
body.staff-management .main-content {
  padding: 30px 35px;
  max-width: 1200px;
  width: 100%;
}

body.staff-management .section h2 {
  margin-bottom: 20px;
}

body.staff-management .staff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

body.staff-management .staff-table th,
body.staff-management .staff-table td {
  border: 1px solid #dde2e8;
  padding: 12px 14px;
}

body.staff-management .staff-table th {
  background: #f7faff;
  color: #003366;
  font-weight: 700;
}

body.staff-management .btn-qr,
body.staff-management .btn-delete {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
}

body.staff-management .btn-qr { background: #17a2b8; }
body.staff-management .btn-qr:hover { background: #138496; }

body.staff-management .btn-delete { background: #dc3545; }
body.staff-management .btn-delete:hover { background: #c82333; }

body.staff-management .alert-text {
  color: #555;
  font-weight: 500;
}

@media (max-width: 768px) {
  body.staff-management .main-content {
    padding: 15px;
  }
}

/* FORMS & CONTAINERS */
.booking-container,
.login-container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  border: 1px solid rgba(0,0,0,0.02);
}

.booking-container {
  max-width: 700px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #f8fafc;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
  background-color: white;
}

/* PASSWORD TOGGLE */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--dark);
}

/* VALIDATION STYLES */
.input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

.error-text {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: white;
  padding: 40px;
  border-radius: 24px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--dark);
}

/* DASHBOARD */
.dashboard-container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #f1f5f9;
}

.booking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.booking-table th {
  background-color: #f8fafc;
  color: var(--text-gray);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 25px; /* Space for arrow */
  user-select: none;
}

th.sortable:hover {
  background-color: #e2e8f0;
}

th.sortable::after {
  content: "↕";
  position: absolute;
  right: 8px;
  opacity: 0.3;
}

th.sortable.sort-asc::after { content: "↑"; opacity: 1; }
th.sortable.sort-desc::after { content: "↓"; opacity: 1; }

.booking-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #eee;
  color: var(--dark);
  font-size: 0.95rem;
}

.booking-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* FOOTER */
.footer {
  background: var(--dark);
  color: #94a3b8;
  text-align: center;
  padding: 60px 20px;
  margin-top: 80px;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.social-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--white);
}

/* BACK TO TOP BUTTON */
#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  border: none;
  outline: none;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s, visibility 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}

#backToTopBtn:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
}

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 15px 20px;
  }

  .navbar:not(.portal) img.logo {
    height: 52px;
    max-width: 160px;
  }

  .hamburger {
    display: flex;
  }

  /* Mobile drawer navigation (only on pages that include a hamburger) */
  .navbar.has-hamburger nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: var(--primary);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 100px;
    overflow-y: auto;
    align-items: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 15px;
  }

  .navbar.has-hamburger nav.active {
    right: 0;
  }

  /* Animate Hamburger to 'X' */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .navbar.has-hamburger nav a {
    margin: 15px 0;
    font-size: 1.1rem;
  }

  /* Fallback for pages without a hamburger: keep nav visible and wrapping */
  .navbar:not(.has-hamburger) nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  .navbar:not(.has-hamburger) nav a {
    margin-left: 0;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 120px;
    padding-bottom: 60px;
  }
  
  .hero-container {
    flex-direction: column-reverse;
    gap: 30px;
  }

  .hero-content {
    padding: 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .tagline {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .services-overlap {
    margin-top: 0;
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 60px 20px;
  }

  .warranty {
    left: auto;
    transform: none;
    max-width: 100%;
    padding: 16px 18px;
  }

  .dashboard-container {
    padding: 18px;
    border-radius: 16px;
  }

  .booking-table th,
  .booking-table td {
    padding: 0.9rem 0.75rem;
  }

  /* Card layout for mobile booking table */
  .booking-table, 
  .booking-table thead, 
  .booking-table tbody, 
  .booking-table th, 
  .booking-table td, 
  .booking-table tr {
    display: block;
  }

  .booking-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .booking-table tr {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }

  .booking-table td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding: 12px 12px 12px 130px !important;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 45px;
  }

  .booking-table td:last-child {
    border-bottom: 0;
  }

  .booking-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 110px;
    white-space: nowrap;
    font-weight: 700;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
  }

  @media (max-width: 480px) {
    .booking-table td {
      padding: 35px 12px 12px 12px !important;
      text-align: left;
      justify-content: flex-start;
    }
    .booking-table td::before {
      top: 10px;
    }
  }

  /* Inline page styles often define this; force wrapping on mobile */
  .filter-container {
    flex-wrap: wrap !important;
  }
}

/* STAFF DASHBOARD ACTION STATUS */
.action-status {
  /* Dimensions to match your current 200x200 layout */
  width: 200px;
  height: 200px;
  
  /* Centering the text */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Making it a circle */
  border-radius: 50%;
  
  /* Visual Style */
  background-color: #8db5d4; /* Matches your screenshot's blue tone */
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0 auto;
  
  /* Ensures it doesn't look interactable */
  cursor: default; 
  user-select: none;
}

.status-done {
  /* You can add a subtle border or specific color for completion here */
  border: 2px solid #5a8ab1;
}

/* USER DROPDOWN & NAV EXTENSIONS */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-toggle {
  background: none;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  padding: 5px 10px;
  text-transform: capitalize;
  white-space: nowrap;
}

.user-dropdown-toggle:hover {
  color: #e2e6ea;
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: linear-gradient(180deg, rgba(10, 79, 163, 0.98) 0%, rgba(8, 61, 130, 0.98) 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 6px;
  min-width: 200px;
  z-index: 1100;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 4px solid rgba(255, 255, 255, 0.22);
  margin-top: 10px;
}

.user-dropdown-menu.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.user-dropdown-item {
  padding: 12px 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  display: block;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  text-align: left;
}

.user-dropdown-item:last-child {
  border-bottom: none;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding-left: 25px;
}

.user-dropdown-item.active {
  background-color: rgba(255, 255, 255, 0.16);
  color: white;
  font-weight: bold;
}

.user-dropdown-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: -2px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.8);
}

/* Active Navigation Link Override */
.navbar nav > a.active {
  color: #00d4ff;
}
.navbar nav > a.active::after {
  width: 100%;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive Dropdown Adjustments */
@media (min-width: 769px) {
  .navbar nav { flex: 1; justify-content: center; gap: 30px; }
  .user-dropdown { margin-left: auto; }
}

@media (max-width: 768px) {
  .user-dropdown { display: block; margin: 10px 0; width: 100%; }
  .user-dropdown-toggle { width: 100%; justify-content: center; padding: 10px 0; }
  .user-dropdown-menu { position: static; width: 100%; box-shadow: none; border: none; padding-left: 0; background: rgba(255,255,255,0.1); margin-top: 0; border-radius: 0; }
  .user-dropdown-item { text-align: center; color: white; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .user-dropdown-item:hover { background: rgba(255,255,255,0.2); color: white; }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 22px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 2.05rem;
    line-height: 1.12;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions a {
    width: 100%;
  }

  .section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .booking-container,
  .login-container {
    padding: 2rem 1.25rem;
    border-radius: 18px;
  }

  #backToTopBtn {
    right: 16px;
    bottom: 16px;
  }

  /* Staff dashboard: override page inline styles on very small screens */
  .clock-container { padding: 26px 14px !important; }
  .current-time { font-size: 2.2rem !important; }
  .action-btn,
  .action-status {
    width: 150px !important;
    height: 150px !important;
    font-size: 1.2rem !important;
  }
}
