/* PlanMaps Modern Theme Stylesheet */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.94);
  --bg-surface: #1e293b;
  --bg-surface-hover: #2d3748;
  --bg-input: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

[data-theme="light"] {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.12);
  --success: #059669;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #d97706;
  --danger: #dc2626;
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100%;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  width: 100vw;
  overflow: hidden;
  position: relative;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Container */
.app-container {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Map Canvas */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #e2e8f0;
}

/* Reposition MapLibre navigation controls */
.maplibregl-ctrl-top-right {
  top: max(74px, calc(env(safe-area-inset-top, 0px) + 60px)) !important;
  right: 14px !important;
  z-index: 990 !important;
}

.maplibregl-ctrl-group {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-lg) !important;
}

.maplibregl-ctrl-group button {
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--text-main) !important;
}

.maplibregl-ctrl-group button:last-child {
  border-bottom: none !important;
}

.maplibregl-ctrl-group button:hover {
  background: var(--bg-surface-hover) !important;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: var(--ctrl-icon-filter, none);
}

[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: invert(1);
}

/* Custom locate button inside map control group */
.map-ctrl-locate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main) !important;
  font-size: 1rem;
}

/* Top Floating Bar */
.top-bar {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

/* Compact Brand Badge (No stretch) */
.brand-badge {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  flex: 0 0 auto;
  max-width: 320px;
}

.brand-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.brand-badge i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Glass Buttons with strict size preservation */
.glass-btn {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  white-space: nowrap;
}

.glass-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.glass-btn.primary {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.glass-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

/* Adaptive Add Button Text */
.btn-text-full {
  display: inline;
}
.btn-text-short {
  display: none;
}

@media (max-width: 460px) {
  .btn-text-full {
    display: none;
  }
  .btn-text-short {
    display: inline;
  }
  .glass-btn.primary {
    padding: 8px 12px;
  }
}

@media (max-width: 340px) {
  .btn-text-short {
    display: none;
  }
  .glass-btn.primary {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }
}

/* ==========================================================
   Mobile Bottom Sheet (Apple Maps style 3-tier swipe + snap)
   ========================================================== */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: 60vh;
  height: 60dvh;
  max-height: 94vh;
  max-height: 94dvh;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, height;
}

/* 3 Snap States on Mobile */
.bottom-sheet.state-collapsed {
  transform: translateY(calc(100% - 68px - env(safe-area-inset-bottom, 0px))) !important;
}

.bottom-sheet.state-mid {
  height: 55vh;
  height: 55dvh;
  transform: translateY(0) !important;
}

.bottom-sheet.state-full {
  height: 92vh;
  height: 92dvh;
  transform: translateY(0) !important;
}

.sheet-handle-wrap {
  width: 100%;
  padding: 10px 0 6px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: 0.35;
}

.sheet-header {
  padding: 4px 18px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.sheet-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-count {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sheet-content {
  overflow-y: auto;
  padding: 0 16px 20px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Compact Quick Action Pills with Hidden Scrollbar */
.quick-action-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

.quick-action-bar::-webkit-scrollbar {
  display: none; /* Chrome / Safari / Opera */
}

.action-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
  white-space: nowrap;
}

.action-pill.nav-all {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  color: #ffffff;
}

.action-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.action-pill.edit-mode-active {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Places List */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  position: relative;
}

.place-card-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.place-swipe-actions-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 70px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 16px 0 0 16px;
  font-size: 1.1rem;
}

.place-swipe-actions-right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-right: 12px;
  border-radius: 0 16px 16px 0;
}

.place-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease;
  position: relative;
  z-index: 2;
  user-select: none;
  touch-action: pan-y;
}

.place-card.completed {
  opacity: 0.6;
  border-color: transparent;
}

.place-card.completed .place-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.place-card.is-dragging {
  opacity: 0.95;
  position: fixed !important;
  z-index: 9999 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transform: scale(1.03) !important;
  pointer-events: none;
}

.place-card-placeholder {
  border: 2px dashed var(--primary);
  background: var(--primary-light);
  border-radius: 16px;
  margin-bottom: 8px;
}

.place-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.place-drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1.1rem;
  padding: 4px;
  touch-action: none;
}

.place-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.place-card.completed .place-index {
  background: var(--success-light);
  color: var(--success);
}

.place-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.place-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.place-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(125, 125, 125, 0.1);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.15s ease;
}

.icon-btn-sm:active {
  transform: scale(0.9);
}

.icon-btn-sm.check-btn {
  color: #94a3b8;
  background: transparent;
}

.place-card.completed .icon-btn-sm.check-btn {
  color: #10b981;
  background: var(--success-light);
}

.icon-btn-sm.nav-btn {
  color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================
   Desktop Floating Modal Panel (Strictly positioned on the RIGHT)
   ========================================================== */
.sheet-side-toggle {
  display: none;
}

@media (min-width: 900px) {
  #map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }

  .top-bar {
    left: 20px;
    right: 440px; /* Keep clear of right floating panel */
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.desktop-panel-hidden .top-bar {
    right: 20px;
  }

  /* Desktop brand badge wider to show full plan title */
  .brand-badge {
    max-width: 480px;
  }

  .brand-badge span {
    max-width: 380px;
  }

  /* Shift MapLibre controls when panel opens/closes */
  .maplibregl-ctrl-top-right {
    top: 74px !important;
    right: 430px !important;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .maplibregl-ctrl-bottom-right {
    right: 430px !important;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.desktop-panel-hidden .maplibregl-ctrl-top-right,
  body.desktop-panel-hidden .maplibregl-ctrl-bottom-right {
    right: 20px !important;
  }

  .bottom-sheet {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: 20px !important;
    width: 390px !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 24px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35) !important;
    transform: none !important;
    padding-bottom: 12px !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: visible;
  }

  /* Desktop Left Edge Fold/Toggle Arrow Button - seamless fusion */
  .sheet-side-toggle {
    display: flex;
    position: absolute;
    top: 50%;
    left: -24px;
    transform: translateY(-50%);
    width: 26px;
    height: 58px;
    background: var(--bg-card);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 14px 0 0 14px;
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -6px 0 16px rgba(0, 0, 0, 0.12);
    z-index: 10;
    transition: all 0.25s ease;
  }

  .sheet-side-toggle:hover {
    color: var(--text-main);
    background: var(--bg-surface-hover);
    width: 28px;
    left: -26px;
  }

  .sheet-side-toggle i {
    font-size: 0.85rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Collapsed state on Desktop: moves completely to the right edge, only arrow protrudes */
  .bottom-sheet.desktop-hidden {
    transform: translateX(calc(100% + 20px)) !important;
  }

  .bottom-sheet.desktop-hidden .sheet-side-toggle {
    border-right: 1px solid var(--border);
    border-radius: 14px 0 0 14px;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.25);
  }

  .bottom-sheet.desktop-hidden .sheet-side-toggle i {
    transform: rotate(180deg);
  }

  .sheet-handle-wrap {
    padding: 8px 0 2px;
  }
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.modal-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.15s ease;
}

.modal-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

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

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-textarea {
  resize: none;
  min-height: 80px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary {
  flex: 1;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 12px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary {
  flex: 1;
  background: rgba(125, 125, 125, 0.12);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* User Settings Item in Profile Modal */
.user-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-input);
  border-radius: 14px;
  margin-bottom: 14px;
}

/* Custom Marker */
.custom-pin-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.2s ease;
}

.custom-pin-marker.completed {
  background: #10b981;
}

.custom-pin-marker:hover {
  transform: scale(1.15);
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 2100;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.plan-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.plan-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: 0.15s ease;
}

.plan-item-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
}

.plan-item-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: left;
}

.plan-item-card.active .plan-item-btn {
  color: var(--primary);
}

/* Multi-nav Checklist Beautification */
.multi-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.multi-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.multi-nav-item:hover {
  border-color: var(--primary);
}

.multi-nav-checkbox-custom {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.multi-nav-item input[type="checkbox"] {
  display: none;
}

.multi-nav-item input[type="checkbox"]:checked + .multi-nav-checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.multi-nav-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Navigation App Choices */
.nav-app-choice {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.nav-app-btn {
  flex: 1;
  padding: 16px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--text-main) !important;
}

.nav-app-btn span {
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-app-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.nav-app-btn i {
  font-size: 2.2rem;
}

.nav-app-btn.google i {
  color: #ea4335;
}

.nav-app-btn.apple i {
  color: var(--text-main);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
