﻿* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

.app {
  display: flex;
  height: 100vh;
  width: 100%;
}

.sidebar {
  width: 500px;
  min-width: 360px;
  max-width: 550px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  padding: 20px;
}

.sidebar-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.sidebar-header p {
  margin: 0 0 20px;
  line-height: 1.5;
  color: #4b5563;
}

.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.panel h2 {
  margin-top: 0;
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

select,
input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}

button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.summary-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.stop-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.stop-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.stop-card p {
  margin: 4px 0;
}

.map-area {
  flex: 1;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100%;
}

ul {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #1f2937;
  color: white;
  border-bottom: 1px solid #374151;
}

.logo {
  font-size: 22px;
  font-weight: 700;
}

.topnav {
  display: flex;
  gap: 18px;
}

.topnav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s;
}

.topnav a:hover {
  background: rgba(255,255,255,0.12);
}

.currency-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
}

.currency-switcher select {
  width: auto;
  min-width: 84px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.currency-switcher select option {
  color: #111827;
}

.page-content {
  max-width: 1050px;
  margin: 0 auto;
  padding: 28px 20px;
}

.account-panel h1 {
  margin-top: 0;
}

.auth-page,
.profile-page {
  display: flex;
  justify-content: center;
}

.auth-shell,
.profile-shell {
  width: min(100%, 900px);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.auth-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.auth-form h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.auth-message {
  min-height: 24px;
  margin: 12px 0 0;
  font-weight: 600;
}

.auth-message.error {
  color: #b91c1c;
}

.auth-message.success {
  color: #047857;
}

.auth-status {
  align-self: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #d1fae5;
  font-size: 14px;
  font-weight: 600;
}

.profile-header-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 24px;
}

.avatar-stack {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.avatar-frame {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: #e5eefc;
  border: 4px solid #dbeafe;
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, transform 0.2s;
}

.avatar-dropzone {
  cursor: pointer;
}

.avatar-dropzone.drag-active {
  border-color: #2563eb;
  transform: scale(1.02);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  font-size: 48px;
  font-weight: 700;
  color: #1d4ed8;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(31, 41, 55, 0.58);
  color: white;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-dropzone:hover .avatar-overlay,
.avatar-dropzone.drag-active .avatar-overlay {
  opacity: 1;
}

.avatar-actions {
  display: grid;
  gap: 10px;
  width: 100%;
}

.avatar-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.avatar-upload:hover {
  background: #1d4ed8;
}

.avatar-remove-button {
  background: #e5e7eb;
  color: #1f2937;
}

.avatar-remove-button:hover {
  background: #d1d5db;
}

.profile-copy h1 {
  margin: 0 0 14px;
  font-size: 36px;
}

.profile-line {
  font-size: 18px;
  margin: 8px 0;
}

.profile-logout {
  max-width: 220px;
  margin-top: 20px;
}

.profile-routes-block {
  border-top: 1px solid #e5e7eb;
  padding-top: 22px;
}

.profile-routes-block h2 {
  margin-bottom: 16px;
}

.route-card {
  text-align: left;
}

.secondary-button:hover {
  background: #374151;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    height: 45vh;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .map-area {
    height: 55vh;
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .topnav {
    flex-wrap: wrap;
  }

  .currency-switcher {
    width: 100%;
  }

  .currency-switcher select {
    width: 100%;
  }

  .auth-grid,
  .profile-header-block {
    grid-template-columns: 1fr;
  }

  .profile-copy {
    text-align: center;
  }

  .profile-logout {
    max-width: none;
  }
}


.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.action-row button,
.compact-actions button {
  width: 100%;
  height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-size: 16px;
}

.action-row button:hover,
.compact-actions button:hover {
  background: #1d4ed8;
}

.compact-actions {
  margin-top: 16px;
}

@media (max-width: 700px) {
  .action-row {
    grid-template-columns: 1fr;
  }
}

.resend-shell {
  margin-top: 18px;
}

.single-form {
  max-width: 420px;
}

.feature-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.feature-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.feature-toggle span {
  font-weight: 600;
}

.rental-card {
  border-color: #bfdbfe;
  background: #eff6ff;
}



.map-area {
  position: relative;
}

.food-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.mini-store-btn {
  width: auto;
  min-width: 96px;
  height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.store-drawer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  width: min(360px, 92%);
  height: 100%;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid #dbeafe;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12);
  overflow-y: auto;
}

.store-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.store-kicker {
  margin: 0 0 6px;
  color: #2563eb;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

.icon-close-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  background: #e5e7eb;
  color: #1f2937;
  font-size: 22px;
  line-height: 1;
}

.icon-close-button:hover {
  background: #d1d5db;
}

.store-drawer-body {
  display: grid;
  gap: 14px;
}

.store-card {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.store-card h3 {
  margin: 0 0 8px;
}

.meal-list {
  display: grid;
  gap: 12px;
}

.meal-card {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eef4ff;
}

.meal-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.store-choice-list {
  display: grid;
  gap: 10px;
}

.store-choice-btn {
  width: 100%;
  height: auto;
  padding: 12px;
  text-align: left;
  border-radius: 12px;
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid #dbeafe;
}

.store-choice-btn:hover,
.store-choice-btn.active {
  background: #dbeafe;
}

.store-choice-name,
.store-choice-address {
  display: block;
}

.store-choice-name {
  margin-bottom: 4px;
  font-weight: 700;
}

.store-choice-address {
  color: #475569;
  font-size: 14px;
}

.store-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #e5e7eb;
}

.store-photo-fallback {
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 600;
}

.store-label {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.store-list {
  margin: 0;
  padding-left: 18px;
}

.store-list li {
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .store-drawer {
    width: 100%;
  }
}
