:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
  --error: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --sidebar-width: 300px;
}
.tip{
  font-size: 0.775rem;
  color: var(--gray-500);
} 
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
}

.sidebar {
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem;
  overflow-y: auto;
  height: 100vh;
}

.main-content {
  overflow-y: auto;
  padding: 1rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.control-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.control-section:last-child {
  border-bottom: none;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

label {
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.75rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select[multiple] {
  min-height: 135px;
  max-height: 120px;
}

button {
  padding: 0.375rem 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  font-size: 0.875rem;
}

button:hover {
  background: var(--primary-dark);
}

button:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

.location-controls {
  background: var(--gray-50);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.last-updated {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.refresh-button {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

table {
  width: 100%;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

tr:hover td {
  background: var(--gray-50);
}

tr.sold-out td {
  color: var(--gray-400);
  background: var(--gray-50);
  font-style: italic;
}

tr.sold-out:hover td {
  background: var(--gray-100);
}

tr.sold-out .price {
  color: var(--gray-500);
}

tr.sold-out .hotel-link {
  color: var(--gray-500);
}

.price {
  font-family: 'Inter', monospace;
  font-weight: 500;
  color: var(--gray-900);
}

.discounted {
  color: var(--success);
  font-weight: 500;
}

.summary {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-combination {
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
}

.price-combination:last-child {
  border-bottom: none;
}

.total-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 1rem;
}

.daily-price-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0;
}

.hotel-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.hotel-link:hover {
  text-decoration: underline;
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.error {
  color: var(--error);
  background: #fee2e2;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* Sidebar Overlay Styles (default: hidden) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35; /* Below sidebar (40), above toggle button (30) */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Default state for toggle button - hidden */
.toggle-sidebar {
  display: none;
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 100%;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 40;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* Show overlay when sidebar is active */
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .toggle-sidebar {
    display: block;
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 30;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .toggle-sidebar:hover {
    background: var(--primary-dark);
  }
}

.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.5rem;
}

.tab-button {
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button:hover {
  background: var(--gray-200);
}

.tab-button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tab-content {
  display: none;
}

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

table {
  font-size: 0.875rem;
  border-collapse: collapse;
}

th, td {
  padding: 0.5rem;
  line-height: 1.2;
}

th {
  position: sticky;
  top: 0;
  background: var(--gray-50);
  z-index: 10;
}

tr:nth-child(even) {
  background: var(--gray-50);
}

.summary {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.price-combination {
  padding: 0.75rem 0;
}

.total-price {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.daily-price-row {
  padding: 0.25rem 0;
  gap: 0.5rem;
}

.main-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

#combinationsTab {
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#combinationsTab .summary {
  padding: 0.75rem;
}

#combinationsTab h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

#combinationsTab .price-combination {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

#combinationsTab .total-price {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--gray-50);
  border-radius: 0.25rem;
  display: inline-block;
}

#combinationsTab .daily-prices {
  font-size: 0.8125rem;
}

#combinationsTab .daily-price-row {
  grid-template-columns: 80px 1fr 70px;
  gap: 0.5rem;
  padding: 0.125rem 0;
}

#combinationsTab .hotel-info {
  min-width: 0;
  line-height: 1.3;
}

#combinationsTab .rate-info {
  font-size: 0.75rem;
  color: var(--gray-500);
}

#combinationsTab .daily-price {
  text-align: right;
  white-space: nowrap;
}

#combinationsTab .date {
  color: var(--gray-600);
  font-size: 0.75rem;
}

#combinationsTab .hotel-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#combinationsTab .price-combination:hover {
  background: var(--gray-50);
}

#combinationsTab .price-combination + .price-combination {
  margin-top: 0.25rem;
}

.map-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 2rem;
}

.map-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-container {
  background: white;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 800px;
  height: 80vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.close-map {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.5rem;
  width: auto;
}

.close-map:hover {
  color: var(--gray-700);
  background: none;
}

#map {
  flex: 1;
  width: 100%;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 1;
}

.map-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.map-footer button {
  width: auto;
}

.map-button {
  width: auto !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.combinations-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.combinations-toggle label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: normal;
}

.combinations-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.coordinates-group {
  margin-bottom: 0.5rem;
}

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

.location-button {
  white-space: nowrap;
  padding: 0.375rem 0.75rem;
  width: auto;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.map-button {
  width: 100% !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem;
  margin: 0;
}

.directions-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.directions-link:hover {
  text-decoration: underline;
}

.header-controls {
  margin-bottom: 1rem;
}

.last-updated {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.refresh-controls {
  background: var(--gray-50);
  padding: 0.25rem;
  /* border-radius: 0.5rem; */
  display: flex;
  flex-direction: column;
  /* gap: 1rem; */
}

.refresh-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.refresh-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.last-updated {
  font-size: 0.775rem;
  color: var(--gray-600);
}

.weeks-input {
  max-width: 100px;
}

.weeks-input input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.refresh-button {
  background: var(--success);
  color: white;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  width: fit-content;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.refresh-button:hover {
  background: var(--success);
  opacity: 0.9;
}

.refresh-icon {
  font-size: 1rem;
}

.refresh-icon.spinning {
  animation: spin 1s linear infinite;
}

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

/* Styles for new Auth elements */
.auth-section #passwordAuthContainer input {
  margin-bottom: 0.25rem; /* Add a little space below inputs */
}

.auth-section #passwordAuthContainer label {
  font-size: 0.7rem; /* Slightly smaller label */
}

.auth-prompt {
  padding: 1rem;
  text-align: center;
  color: var(--gray-500);
  background-color: var(--gray-50);
  border-radius: 0.375rem;
  margin: 1rem;
} 