/* ==========================================
   NEXXBURGER ACCOMMODATION TRACKER
   Official Design System Styles
   ========================================== */

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* LOADING SPINNER - Consolidated */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.6s linear infinite;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(211, 47, 47, 0.2);
  border-top-color: #d32f2f;
  margin-bottom: 16px;
}

.loading-spinner p {
  color: #757575;
  font-size: 14px;
  margin: 0;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

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

.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #212121;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.login-page {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
}

.admin-login-link {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 1000;
}

.admin-login-link:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

body.login-page::before {
  content: '';
  position: fixed;
  bottom: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background-image: url('/burger-bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.15;
  filter: grayscale(100%) brightness(1.2) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
  pointer-events: none;
  z-index: 0;
}

/* HEADER */
.header {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: white;
  padding: 16px 24px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-left a:hover .logo {
  transform: scale(1.05);
  opacity: 0.9;
  cursor: pointer;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.user-info {
  font-size: 14px;
  opacity: 0.95;
}

/* NAVIGATION */
.nav {
  background-color: white;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-list li a {
  display: block;
  padding: 16px 24px;
  color: #616161;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  font-weight: 500;
}

.nav-list li a:hover,
.nav-list li a.active {
  background-color: #fafafa;
  border-bottom-color: #d32f2f;
  color: #d32f2f;
}

/* BUTTONS */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  min-width: 44px;
}

.btn-primary {
  background: #d32f2f;
  color: white;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Consolidated button hover effects */
.btn-hover,
.btn-primary:hover,
.btn-danger:hover,
.btn-success:hover {
  transform: translateY(-1px);
}

.btn-primary:hover {
  background: #b71c1c;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(211, 47, 47, 0.3);
}

.btn-secondary {
  background: #f5f5f5;
  color: #212121;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #eeeeee;
  border-color: #bdbdbd;
}

.btn-danger {
  background: #f44336;
  color: white;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.25);
}

.btn-danger:hover {
  background: #d32f2f;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.35);
}

.btn-success {
  background: #4caf50;
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.btn-success:hover {
  background: #388e3c;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

.btn-logout {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  min-height: auto;
}

/* CONTAINER & LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* SEARCH CONTAINER */
.search-container {
  margin-top: 8px;
}

.search-container #global-search {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-container #global-search:focus {
  outline: none;
  border-color: #d32f2f;
  background: white;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.12), 0 0 0 4px rgba(211, 47, 47, 0.08);
  transform: translateY(-1px);
}

.search-container #global-search::placeholder {
  color: #9e9e9e;
  font-weight: 400;
}

/* CARDS */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #d32f2f;
}

.card-header h2 {
  color: #d32f2f;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

/* FORMS */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #212121;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.08);
}

.form-group input::placeholder {
  color: #bdbdbd;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

/* LOGIN PAGE */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-card {
  background: white;
  border-radius: 12px;
  padding: 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.admin-access-button {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(158, 158, 158, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: none;
}

.admin-access-button:hover {
  background: rgba(158, 158, 158, 0.4);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.admin-access-button img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0.9;
}

.manager-login-link {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 1000;
}

.manager-login-link:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.login-header h1 {
  color: #212121;
  font-size: 28px;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
}

.login-header p {
  color: #757575;
  font-size: 14px;
  font-weight: 400;
}

.tab-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 20px 32px;
  border: 2px solid #e0e0e0;
  background: white;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #757575;
  transition: all 0.2s ease;
  min-width: 180px;
}

.tab-btn:hover {
  border-color: #d32f2f;
  color: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.tab-btn.active {
  background-color: #d32f2f;
  color: white;
  border-color: #d32f2f;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

thead {
  background: #f5f5f5;
  border-bottom: 2px solid #e0e0e0;
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #212121;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  color: #616161;
}

tr:hover {
  background: #fafafa;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background: #fff3e0;
  color: #e65100;
}

.badge-resolved {
  background: #e8f5e9;
  color: #2e7d32;
}

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

/* FILTERS */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  background-color: #fafafa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25);
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 8px 20px rgba(211, 47, 47, 0.35);
  transform: translateY(-2px);
}

.stat-card h3 {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .subtitle {
  font-size: 14px;
  opacity: 0.8;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 48px;
  color: #bdbdbd;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ALERTS */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

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

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

/* OFFLINE BANNER */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ff6b35 0%, #e55100 100%);
  color: white;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-right: calc(20px + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.offline-banner-visible {
  transform: translateY(0);
  opacity: 1;
}

.offline-banner-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.offline-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.offline-banner-text {
  flex: 1;
  text-align: center;
}

.offline-banner-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.offline-banner-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
  .offline-banner {
    padding: 10px 12px;
    font-size: 13px;
    gap: 8px;
  }

  .offline-banner-icon {
    font-size: 16px;
  }

  .offline-banner-close {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
}

/* ERROR STATES */
.input-error {
  border-color: #f44336 !important;
  background-color: #ffebee !important;
  color: #c62828;
}

.input-error:focus {
  border-color: #d32f2f !important;
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15) !important;
}

.error-message {
  color: #c62828;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

/* ACTION BUTTONS */
.action-buttons {
  display: flex;
  gap: 8px;
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #d32f2f;
}

.modal-header h3 {
  color: #d32f2f;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #bdbdbd;
  transition: all 0.2s ease;
}

.close-modal:hover {
  color: #212121;
}

/* HAMBURGER MENU */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

/* ==========================================
   SAFE AREA INSETS FOR iOS
   ========================================== */

@supports (padding-top: env(safe-area-inset-top)) {
  .container {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  
  .nav {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  
  .login-container {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  
  .modal-content {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ========================================== */

/* TABLET BREAKPOINT (601px - 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  .container {
    padding: 20px;
  }

  .header h1 {
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MOBILE BREAKPOINT (max-width: 600px) */
@media (max-width: 600px) {
  /* Container and spacing */
  .container {
    padding: 12px;
  }

  /* Header adjustments */
  .header {
    padding: 10px 12px;
    position: relative;
    flex-wrap: wrap;
  }

  .header-left {
    flex: 1;
    max-width: calc(100% - 60px);
  }

  .header h1 {
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .header-right {
    display: none;
  }

  /* Mobile hamburger menu */
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    background: rgba(211, 47, 47, 0.95);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 48px;
    min-height: 48px;
    z-index: 1001;
    font-size: 24px;
    line-height: 1;
  }

  /* Mobile navigation drawer */
  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: white;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    padding: 20px 0;
    margin-top: 60px;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list li a {
    padding: 18px 24px;
    display: block;
    border-bottom: 1px solid #f5f5f5;
    border-left: 4px solid transparent;
    color: #424242;
    font-weight: 500;
    font-size: 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
  }

  .nav-list li a:hover,
  .nav-list li a.active {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    border-left-color: white;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  /* Mobile overlay backdrop */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Forms - stack vertically */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-group {
    margin-bottom: 16px;
    max-width: 100%;
  }

  .form-group label {
    font-size: 15px;
    margin-bottom: 10px;
  }

  /* Touch-friendly inputs */
  .form-group input,
  .form-group select,
  .form-group textarea,
  input, 
  select, 
  textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    min-height: 48px !important; /* Touch-friendly */
    padding: 14px 16px !important;
    border-radius: 8px;
  }

  .form-group textarea {
    min-height: 120px !important;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }

  /* Stats grid - single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 20px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .stat-card h3 {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .stat-card .value {
    font-size: 28px;
    margin-bottom: 4px;
    line-height: 1;
  }

  .stat-card .subtitle {
    font-size: 12px;
    opacity: 0.9;
  }

  /* Cards */
  .card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 10px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }

  .card-header h2 {
    font-size: 20px;
  }

  .card-header > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .card-header .btn,
  .card-header a.btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  /* Touch-friendly buttons */
  .btn {
    min-height: 48px !important;
    min-width: 48px !important;
    font-size: 15px;
    padding: 14px 20px;
    white-space: normal;
    word-break: break-word;
    border-radius: 10px;
  }

  .btn-sm {
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 14px;
    padding: 12px 16px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .action-buttons .btn {
    width: 100%;
  }

  /* TABLE TO CARD CONVERSION FOR MOBILE */
  /* Hide table headers on mobile */
  table thead {
    display: none;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table {
    box-shadow: none;
    background: transparent;
  }

  table tr {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
  }

  table td {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    padding-left: 45%;
    text-align: right;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  table td:last-child {
    border-bottom: none;
  }

  /* Add labels before each data cell */
  table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 40%;
    padding-right: 10px;
    font-weight: 600;
    color: #212121;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Action buttons in mobile cards */
  table td .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  table td .btn {
    font-size: 13px;
    padding: 10px 14px;
  }

  /* Login page */
  .login-card {
    padding: 24px 16px;
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
  }

  .login-container {
    padding: 16px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .login-header img {
    width: 70px;
    height: 70px;
  }

  .admin-login-link,
  .manager-login-link {
    top: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Modal adjustments */
  .modal-content {
    width: 95%;
    max-width: 100%;
    margin: 10px;
    padding: 20px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 12px;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  /* Tab buttons */
  .tab-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tab-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    min-height: 52px;
  }

  /* Empty states */
  .empty-state {
    padding: 24px 16px;
    font-size: 14px;
  }

  /* Search containers */
  .search-container #global-search,
  .search-container input {
    font-size: 16px;
    padding: 14px 16px;
    border-radius: 10px;
  }

  /* Badges */
  .badge {
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* WIDER MOBILE AND SMALL TABLETS (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
  .header h1 {
    font-size: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 20px;
  }

  /* Keep normal table layout for this size */
  table thead {
    display: table-header-group;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: table;
    width: auto;
  }

  table tbody {
    display: table-row-group;
  }

  table tr {
    display: table-row;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  table td {
    display: table-cell;
    padding: 12px;
    text-align: left;
    position: static;
  }

  table td:before {
    content: none;
  }
}

/* ==========================================
   TABLET-OPTIMIZED TWO-COLUMN LAYOUTS
   Target: 768px - 1024px (tablets, small laptops)
   ========================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Container adjustments for tablets */
  .container {
    padding: 20px;
    max-width: 100%;
  }

  /* Header adjustments */
  .header h1 {
    font-size: 20px;
  }

  .header-right {
    gap: 16px;
  }

  /* Navigation - ensure it's visible and horizontal */
  .nav {
    position: static;
    width: 100%;
    height: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0;
    padding: 0;
  }

  .nav-list li a {
    padding: 14px 18px;
    font-size: 14px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .mobile-overlay {
    display: none !important;
  }

  /* TABLET UTILITY CLASSES */
  .tablet-two-col {
    display: flex;
    flex-direction: row;
    gap: 24px;
  }

  .tablet-two-col > * {
    flex: 1;
    min-width: 0;
  }

  .tablet-sidebar {
    display: flex;
    flex-direction: row;
    gap: 24px;
  }

  .tablet-sidebar > *:first-child {
    flex: 7;
    min-width: 0;
  }

  .tablet-sidebar > *:last-child {
    flex: 3;
    min-width: 0;
  }

  /* Stats grid - 2x2 layout on tablets */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card h3 {
    font-size: 13px;
  }

  .stat-card .value {
    font-size: 28px;
  }

  .stat-card .subtitle {
    font-size: 13px;
  }

  /* Form layouts - 2 fields per row on tablets */
  .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 15px;
  }

  /* Cards styling for tablets */
  .card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
  }

  .card-header h2 {
    font-size: 20px;
  }

  .card-header > div {
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  .card-header .btn,
  .card-header a.btn {
    width: auto;
    text-align: center;
  }

  /* TABLE STYLES - Keep traditional table layout on tablets */
  table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  table thead {
    display: table-header-group;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: table;
    width: auto;
  }

  table tbody {
    display: table-row-group;
  }

  table tr {
    display: table-row;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
  }

  table th {
    display: table-cell;
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: #212121;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  table td {
    display: table-cell;
    padding: 14px;
    border-bottom: 1px solid #f5f5f5;
    color: #616161;
    text-align: left;
    position: static;
    font-size: 14px;
  }

  table td:before {
    content: none;
  }

  table tr:hover {
    background: #fafafa;
  }

  /* Table container for horizontal scroll if needed */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
  }

  /* Filters layout for tablets */
  .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
  }

  /* DASHBOARD TABLET LAYOUT */
  .dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* SETTINGS PAGE TABLET LAYOUT */
  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;
    font-size: 14px;
  }

  .tab-content {
    padding: 0;
  }

  .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* REPORTS PAGE TABLET LAYOUT */
  .reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .reports-full-width {
    grid-column: 1 / -1;
  }

  /* CUSTOMERS PAGE TABLET LAYOUT */
  .customers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .customer-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
  }

  .customer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }

  /* NEW ACCOMMODATION FORM TABLET LAYOUT */
  .accommodation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .accommodation-form-full {
    grid-column: 1 / -1;
  }

  /* Buttons on tablets */
  .btn {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 15px;
  }

  .btn-sm {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .action-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .action-buttons .btn {
    width: auto;
    flex: 0 0 auto;
  }

  /* Modals on tablets */
  .modal-content {
    width: 85%;
    max-width: 600px;
    padding: 24px;
    max-height: 85vh;
  }

  /* Login page tablet adjustments */
  .login-card {
    padding: 40px;
    max-width: 400px;
  }

  .tab-buttons {
    grid-template-columns: 1fr 1fr;
  }

  /* Badges */
  .badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Search containers */
  .search-container #global-search {
    padding: 14px 18px;
    font-size: 15px;
  }

  /* Skeleton loading adjustments for tablet */
  .skeleton-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .skeleton-row {
    display: flex;
    flex-wrap: nowrap;
  }

  .skeleton-table-header {
    display: flex;
  }
}

/* ==========================================
   SKELETON LOADING SCREENS
   ========================================== */

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #e0e0e0 0%,
    #f5f5f5 50%,
    #e0e0e0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.skeleton-text-sm {
  height: 12px;
  width: 60%;
}

.skeleton-text.skeleton-text-md {
  height: 16px;
  width: 80%;
}

.skeleton-text.skeleton-text-lg {
  height: 24px;
  width: 50%;
}

.skeleton-text.skeleton-text-xl {
  height: 32px;
  width: 40%;
}

.skeleton-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-stat {
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
  border-radius: 12px;
  padding: 24px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-stat .skeleton-text {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.3) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-stat .skeleton-title {
  height: 14px;
  width: 70%;
  border-radius: 4px;
}

.skeleton-stat .skeleton-value {
  height: 32px;
  width: 50%;
  border-radius: 4px;
  margin: 4px 0;
}

.skeleton-stat .skeleton-subtitle {
  height: 14px;
  width: 60%;
  border-radius: 4px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  gap: 16px;
}

.skeleton-row:last-child {
  border-bottom: none;
}

.skeleton-row .skeleton-cell {
  height: 16px;
  border-radius: 4px;
  flex: 1;
}

.skeleton-row .skeleton-cell:first-child {
  flex: 0.8;
}

.skeleton-row .skeleton-cell:last-child {
  flex: 0.6;
}

.skeleton-row .skeleton-badge {
  height: 24px;
  width: 80px;
  border-radius: 9999px;
}

.skeleton-row .skeleton-button {
  height: 32px;
  width: 120px;
  border-radius: 8px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}

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

.skeleton-list-item .skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-table-header {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  display: flex;
  gap: 16px;
}

.skeleton-table-header .skeleton-cell {
  height: 14px;
  border-radius: 4px;
  flex: 1;
  background: linear-gradient(
    90deg,
    #d8d8d8 0%,
    #e8e8e8 50%,
    #d8d8d8 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-table-body {
  background: white;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.skeleton-container {
  width: 100%;
}

.skeleton-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .skeleton-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .skeleton-stat {
    padding: 20px;
    min-height: 110px;
  }

  .skeleton-row {
    flex-wrap: wrap;
    padding: 12px;
  }

  .skeleton-row .skeleton-cell {
    flex: 0 0 45%;
    margin-bottom: 8px;
  }

  .skeleton-table-header {
    display: none;
  }

  .skeleton-table-body .skeleton-row {
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
  }
}

/* ==========================================
   PRINT STYLES FOR CLEAN REPORTS
   ========================================== */

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: white !important;
    color: #212121 !important;
    font-size: 12pt !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .header,
  .nav,
  .mobile-menu-toggle,
  .mobile-overlay,
  .offline-banner,
  .btn-logout,
  .admin-login-link,
  .manager-login-link,
  .action-buttons,
  .search-container,
  #mobile-menu-toggle,
  #mobile-overlay {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }

  .card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .card-header {
    border-bottom: 2px solid #d32f2f !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }

  .card-header h2 {
    font-size: 16pt !important;
    color: #d32f2f !important;
  }

  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    background: #f5f5f5 !important;
    color: #212121 !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    padding: 12px !important;
    page-break-inside: avoid !important;
  }

  .stat-card h3 {
    font-size: 10pt !important;
    color: #616161 !important;
  }

  .stat-card .value {
    font-size: 18pt !important;
    font-weight: 700 !important;
    color: #d32f2f !important;
  }

  .stat-card .subtitle {
    font-size: 9pt !important;
    color: #757575 !important;
  }

  table {
    width: 100% !important;
    border-collapse: collapse !important;
    box-shadow: none !important;
    font-size: 10pt !important;
    page-break-inside: auto !important;
  }

  table thead {
    display: table-header-group !important;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: table !important;
    width: auto !important;
  }

  table tbody {
    display: table-row-group !important;
  }

  table tr {
    display: table-row !important;
    page-break-inside: avoid !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  table td,
  table th {
    display: table-cell !important;
    padding: 8px 12px !important;
    border: 1px solid #e0e0e0 !important;
    text-align: left !important;
    position: static !important;
  }

  table td:before {
    display: none !important;
  }

  table th {
    background: #f5f5f5 !important;
    font-weight: 600 !important;
    color: #212121 !important;
  }

  .badge {
    border: 1px solid currentColor !important;
    padding: 2px 8px !important;
    font-size: 9pt !important;
  }

  .badge-pending {
    background: #fff3e0 !important;
    color: #e65100 !important;
  }

  .badge-resolved {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
  }

  .modal,
  .modal-content {
    display: none !important;
  }

  a {
    text-decoration: none !important;
    color: inherit !important;
  }

  a[href]:after {
    content: none !important;
  }

  .table-container {
    overflow: visible !important;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid !important;
  }

  @page {
    margin: 1.5cm;
    size: auto;
  }
}
