:root {
  --primary-color: #2d3748;
  --bg-color: #f8fafc;
  --white: #ffffff;
  --free-bg: #e6fffa;
  --free-text: #234e52;
  --free-border: #b2f5ea;
  --occupied-bg: #fff5f5;
  --occupied-text: #742a2a;
  --occupied-border: #feb2b2;
  --border-color: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  padding: 20px;
}

.app-wrapper {
  width: 100%;
  max-width: 800px;
  text-align: center;
}

.loading-screen {
  text-align: center;
  padding: 100px;
  font-weight: 600;
}

.error-banner {
  background: var(--occupied-bg);
  color: var(--occupied-text);
  border: 1px solid var(--occupied-border);
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

header {
  margin-bottom: 25px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #1a202c;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.date-display {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.date-picker {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #4a5568;
  cursor: pointer;
  background: white;
}

/* Location section */

.location-section {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.location-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  color: #4a5568;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.location-toggle:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.maps-container {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.map-card:first-child {
  grid-column: 2;
}

.map-card:last-child {
  grid-column: 3;
}

.map-card {
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.map-card h3 {
  font-size: 0.8rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #718096;
}

.map-card iframe {
  width: 100%;
  height: 200px;
  border: none;
  border-radius: 4px;
}

.phone-info {
  margin-top: 8px;
  font-weight: 700;
  color: #2d3748;
  font-size: 0.85rem;
}

.phone-info span {
  color: #718096;
  font-weight: 500;
  margin-right: 5px;
}

.nav-button {
  display: inline-block;
  margin-top: 10px;
  background-color: #4285f4;
  color: white;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background-color 0.2s;
  border: none;
}

.nav-button:hover {
  background-color: #357ae8;
}

.driving-instructions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.7rem;
  color: #4a5568;
  text-align: left;
  line-height: 1.4;
}

.driving-instructions strong {
  display: block;
  margin-bottom: 4px;
  color: #2d3748;
  text-transform: uppercase;
  font-size: 0.65rem;
}

/* Dashboard grid */

.dashboard-grid {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 24px;
  background: transparent;
}

.column-header {
  text-align: center;
  font-weight: 700;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #2d3748;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.time-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 52px;
}

.time-label {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #718096;
  font-size: 0.8rem;
}

.gate-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slot {
  height: 38px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  padding: 2px;
  text-align: center;
}

.slot.free {
  background-color: var(--free-bg);
  color: var(--free-text);
  border: 1px solid var(--free-border);
}

.slot.occupied {
  background-color: var(--occupied-bg);
  color: var(--occupied-text);
  border: 1px solid var(--occupied-border);
  box-shadow: inset 0 0 0 1px var(--occupied-border);
}

.company-name { font-weight: 700; font-size: 0.75rem; line-height: 1; }
.slot-id { font-size: 0.6rem; opacity: 0.7; margin-top: 1px; }
.slot-free-text { font-weight: 500; letter-spacing: 0.05em; font-size: 0.65rem; }

/* Source badge */

.source-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
}

.source-dalux {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.source-mock {
  background: #fed7d7;
  color: #822727;
  border: 1px solid #feb2b2;
}

.source-error {
  background: #fed7d7;
  color: #822727;
  border: 1px solid #feb2b2;
}
