/* ═══════════════════════════════════════════════════════
   Shift Manager — Parking Solutions Colombia
   Mobile-first responsive, matching operator app theme
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0A0B0E;
  --bg-card: #12141A;
  --bg-elevated: #1A1D26;
  --bg-input: #0D0E12;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #bb2921;
  --primary: #bb2921;
  --primary-hover: #e03d34;
  --primary-dark: #8a1e18;
  --primary-glow: rgba(187, 41, 33, 0.15);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.4);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-sm: 6px;
  --radius-full: 100px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-up: 0 -4px 24px rgba(0,0,0,0.5);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.screen { display: none; }
.screen.active { display: flex; flex-direction: column; }

/* ═══ AUTH ═══ */
.auth-screen {
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 28px;
  text-align: center;
}

.auth-logo {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 28px; }

.auth-field { margin-bottom: 14px; text-align: left; }
.auth-field label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.auth-field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  outline: none; transition: border-color var(--transition);
}
.auth-field input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }

.auth-error {
  background: var(--danger-bg); color: var(--danger); font-size: 13px;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  display: none;
}
.auth-error.visible { display: block; }

.auth-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; font-size: 14px; font-weight: 700; border: none;
  border-radius: var(--radius); cursor: pointer; transition: all var(--transition);
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(187,41,33,0.4); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ═══ APP LAYOUT ═══ */
.app { display: none; height: 100dvh; flex-direction: column; overflow: hidden; }
.app.visible { display: flex; }

/* ═══ TOPBAR ═══ */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  z-index: 50; flex-shrink: 0;
  min-height: 48px;
}
.topbar-back {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.topbar-back:hover { background: var(--bg-elevated); color: var(--text); }
.topbar-title { font-size: 15px; font-weight: 700; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user { font-size: 12px; color: var(--text-muted); display: none; }
.topbar-logout {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.topbar-logout:hover { color: var(--danger); background: var(--danger-bg); }

/* ═══ HOME SCREEN ═══ */
#screen-home { flex: 1; position: relative; overflow: hidden; }
#screen-home.active { display: flex; flex-direction: column; }

/* Map */
.home-map {
  flex: 1; min-height: 0; z-index: 1;
  background: var(--bg-elevated);
}
.home-map .leaflet-container { background: #1a1d26 !important; }

/* Bottom panel (mobile: slide-up sheet) */
.home-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 10;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-up);
  max-height: 55dvh;
  min-height: 140px;
  display: flex; flex-direction: column;
  transition: max-height 0.3s ease;
  padding-bottom: var(--safe-bottom);
}
.home-panel.expanded { max-height: 80dvh; }
.home-panel.collapsed { max-height: 140px; }

.panel-handle {
  width: 36px; height: 4px;
  background: var(--text-muted); border-radius: 2px;
  margin: 10px auto 6px; cursor: pointer; flex-shrink: 0;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px 8px; flex-shrink: 0;
}
.panel-title { font-size: 15px; font-weight: 700; }
.panel-count {
  font-size: 12px; font-weight: 700;
  background: var(--primary-glow); color: var(--primary);
  padding: 2px 10px; border-radius: var(--radius-full);
}

.panel-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 10px; padding: 9px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); flex-shrink: 0;
  color: var(--text-muted);
}
.panel-search input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 13px; outline: none;
}
.panel-search input::placeholder { color: var(--text-muted); }

.panel-list {
  flex: 1; overflow-y: auto; padding: 0 12px 12px;
  -webkit-overflow-scrolling: touch;
}

/* Point cards in list */
.point-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: all var(--transition); width: 100; text-align: left;
  border: none; color: var(--text); width: 100%;
}
.point-card:hover, .point-card:active { background: var(--bg-card); border-color: var(--primary); }

.point-card-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.point-card-dot.enabled { background: var(--success); box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.point-card-dot.disabled { background: var(--text-muted); }

.point-card-info { flex: 1; min-width: 0; }
.point-card-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.point-card-addr { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.point-card-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.point-card-shifts { font-size: 11px; color: var(--text-muted); }
.point-card-people { font-size: 11px; color: var(--primary); font-weight: 600; }

.point-card-arrow { color: var(--text-muted); flex-shrink: 0; }

/* ═══ POINT DETAIL SCREEN ═══ */
#screen-point { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#screen-point.active { display: flex; flex-direction: column; }

.point-header {
  padding: 24px 20px 16px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.point-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.point-address { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.point-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mini-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; text-align: center;
}
.mini-stat-val { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-stat-val.primary { color: var(--primary); }
.mini-stat-val.success { color: var(--success); }
.mini-stat-val.warning { color: var(--warning); }
.mini-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.point-content { padding: 0 20px 24px; flex: 1; }

.section-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 10px; margin-bottom: 8px; margin-top: 8px;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ═══ TIMELINE ═══ */
.timeline {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px;
}
.tl-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.tl-track { position: relative; height: 32px; background: var(--bg-input); border-radius: var(--radius-sm); overflow: hidden; }
.tl-marker { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.06); }
.tl-marker span { position: absolute; top: 1px; left: 3px; font-size: 8px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tl-bar {
  position: absolute; top: 10px; height: 18px; border-radius: 3px;
  opacity: 0.85; display: flex; align-items: center; overflow: hidden; min-width: 2px;
  transition: opacity var(--transition);
}
.tl-bar:hover { opacity: 1; }
.tl-bar-label { font-size: 8px; font-weight: 700; color: white; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.tl-now {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--danger); z-index: 2; box-shadow: 0 0 6px rgba(239,68,68,0.6);
}
.tl-now::after { content: ''; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }

/* ═══ SHIFT LANES ═══ */
.shift-lane {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 12px; transition: border-color var(--transition);
}
.shift-lane:hover { border-color: rgba(187,41,33,0.2); }
.shift-lane.inactive { opacity: 0.5; }
.shift-lane.shift-bad { border-color: var(--danger) !important; }
.shift-lane.shift-bad .shift-header { background: var(--danger-bg); }
.shift-lane.shift-overlap { border-color: var(--warning) !important; }
.shift-lane.shift-overlap .shift-header { background: var(--warning-bg); }

.shift-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border); gap: 8px;
}
.shift-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.shift-name { font-size: 13px; font-weight: 700; }
.shift-time {
  font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums;
  background: var(--bg-input); padding: 2px 8px; border-radius: var(--radius-sm);
}
.shift-duration { font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--bg); padding: 1px 6px; border-radius: var(--radius-sm); }
.shift-overnight { font-size: 9px; font-weight: 700; color: #818cf8; background: rgba(99,102,241,0.12); padding: 1px 6px; border-radius: var(--radius-sm); letter-spacing: 0.05em; }
.shift-actions { display: flex; gap: 4px; flex-shrink: 0; }

.shift-warnings { padding: 6px 12px; display: flex; flex-direction: column; gap: 3px; }
.shift-warning {
  display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
}
.shift-bad .shift-warning { color: var(--danger); background: var(--danger-bg); }
.shift-overlap .shift-warning { color: var(--warning); background: var(--warning-bg); }

/* People chips */
.shift-people {
  padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 36px; align-items: center;
}
.no-people { font-size: 11px; color: var(--text-muted); font-style: italic; padding: 2px 6px; }

.person-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 7px 5px 5px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
}
.person-chip:hover { border-color: rgba(255,255,255,0.15); }

.person-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.person-info { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.person-email { font-size: 9px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

.person-actions { display: flex; gap: 3px; flex-shrink: 0; }
.person-action-btn {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: all var(--transition);
  text-decoration: none; color: var(--text-muted);
}
.person-action-btn.phone { background: rgba(59,130,246,0.1); color: #60a5fa; }
.person-action-btn.phone:hover { background: rgba(59,130,246,0.25); }
.person-action-btn.whatsapp { background: rgba(34,197,94,0.1); color: #4ade80; }
.person-action-btn.whatsapp:hover { background: rgba(34,197,94,0.25); }

.person-remove {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm); transition: all var(--transition); flex-shrink: 0;
}
.person-remove:hover { color: var(--danger); background: var(--danger-bg); }

/* Inline add */
.shift-add { padding: 8px 10px; border-top: 1px solid var(--border); background: var(--bg); }
.add-row { display: flex; gap: 5px; align-items: center; }
.add-select {
  flex: 1; padding: 7px 8px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 12px; outline: none; cursor: pointer; min-width: 0;
}
.add-select:focus { border-color: var(--border-focus); }
.add-role {
  width: 60px; padding: 7px 4px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 12px; outline: none; cursor: pointer; flex-shrink: 0;
}

/* ═══ BADGES ═══ */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-host { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-operator { background: rgba(34,197,94,0.15); color: #4ade80; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 11px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-success { background: var(--success); color: white; }
.btn-ghost { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: rgba(255,255,255,0.15); }
.btn-icon {
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--bg-elevated);
  border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.btn-icon:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.btn-icon.danger:hover { color: var(--danger); border-color: rgba(239,68,68,0.3); }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; opacity: 0; visibility: hidden; transition: all 0.25s;
}
.modal-overlay.visible { opacity: 1; visibility: visible; }

.modal {
  width: 100%; max-width: 480px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 0 20px 20px; padding-bottom: calc(20px + var(--safe-bottom));
  transform: translateY(100%); transition: transform 0.3s ease;
  max-height: 85dvh; overflow-y: auto;
}
.modal-overlay.visible .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 12px; position: sticky; top: 0;
  background: var(--bg-card); z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: none; color: var(--text-muted);
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-field { margin-bottom: 14px; }
.modal-field label {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.modal-field input, .modal-field select {
  width: 100%; padding: 10px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  outline: none; transition: border-color var(--transition);
}
.modal-field input:focus, .modal-field select:focus {
  border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow);
}
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal-error {
  background: var(--danger-bg); color: var(--danger); font-size: 12px;
  padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; display: none;
}
.modal-error.visible { display: block; }

/* ═══ LOADING / EMPTY / TOAST ═══ */
.loading { display: flex; justify-content: center; padding: 32px; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 13px; }
.empty-state p { margin-bottom: 12px; }

/* ═══ TOASTS ═══ */
.toast-container { position: fixed; bottom: 24px; right: 16px; left: 16px; z-index: 300; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px; box-shadow: var(--shadow);
  animation: toastIn 0.3s ease-out; max-width: 360px; pointer-events: auto;
  backdrop-filter: blur(8px);
}
.toast.success { border-color: var(--success); color: var(--success); background: rgba(34,197,94,0.08); }
.toast.error { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.08); }
.toast span { flex: 1; }
.toast-close {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: inherit; opacity: 0.5; cursor: pointer;
  border-radius: var(--radius-sm); transition: opacity var(--transition); flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ═══ CONFIRM DIALOG ═══ */
.confirm-overlay { z-index: 250; }
.confirm-modal {
  max-width: 380px; text-align: center;
  padding: 28px 24px 20px !important;
  padding-bottom: calc(20px + var(--safe-bottom)) !important;
  border-radius: var(--radius-xl) !important;
  animation: confirmIn 0.25s ease-out;
}
@keyframes confirmIn { from { opacity: 0; transform: scale(0.92) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.confirm-icon { margin-bottom: 12px; }
.confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.confirm-message { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.confirm-details {
  text-align: left; font-size: 12px; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  margin: 8px 0 4px; line-height: 1.7; font-family: monospace;
  max-height: 120px; overflow-y: auto;
}
.confirm-actions { display: flex; gap: 8px; margin-top: 20px; }
.confirm-actions .btn { flex: 1; padding: 11px; justify-content: center; font-size: 13px; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.1); }

/* ═══ LEAFLET DARK THEME OVERRIDES ═══ */
.leaflet-container { background: #1a1d26 !important; }
.leaflet-control-zoom { border: 1px solid var(--border) !important; }
.leaflet-control-zoom a {
  background: var(--bg-card) !important; color: var(--text) !important;
  border-color: var(--border) !important; width: 34px !important; height: 34px !important;
  line-height: 34px !important; font-size: 16px !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-elevated) !important; }
.leaflet-control-attribution { display: none !important; }

/* Custom markers */
.marker-icon {
  width: 32px; height: 32px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  font-size: 11px; font-weight: 800; color: white;
  border: 2px solid rgba(255,255,255,0.3);
}
.marker-icon span { transform: rotate(45deg); }
.marker-icon.enabled { background: var(--primary); }
.marker-icon.disabled { background: var(--text-muted); }
.marker-icon.selected { background: var(--success); border-color: white; box-shadow: 0 0 16px rgba(34,197,94,0.5); }

.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; border-color: var(--border) !important; }
.leaflet-popup-content { margin: 10px 14px !important; font-size: 13px !important; }
.leaflet-popup-content .popup-name { font-weight: 700; margin-bottom: 2px; }
.leaflet-popup-content .popup-addr { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.leaflet-popup-content .popup-btn {
  display: block; width: 100%; padding: 8px; margin-top: 4px;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center;
}

/* ═══ DESKTOP (>768px) ═══ */
@media (min-width: 769px) {
  .topbar-user { display: block; }

  /* Home: side-by-side map + list */
  #screen-home.active { flex-direction: row; }
  .home-map { flex: 1; }
  .home-panel {
    position: relative; bottom: auto; left: auto; right: auto;
    width: 340px; max-height: none; min-height: auto;
    border-radius: 0; border-top: none; border-left: 1px solid var(--border);
    box-shadow: none; flex-shrink: 0;
  }
  .home-panel.expanded, .home-panel.collapsed { max-height: none; }
  .panel-handle { display: none; }

  /* Point detail: wider content */
  .point-content { max-width: 800px; margin: 0 auto; width: 100%; padding: 0 32px 32px; }
  .point-header { max-width: 800px; margin: 0 auto; width: 100%; padding: 28px 32px 20px; }

  /* Modal: centered, not bottom-sheet */
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius-xl); padding: 0 24px 24px; }
  .confirm-modal { border-radius: var(--radius-xl) !important; }

  /* Bigger person chips */
  .person-name { max-width: 160px; }
  .person-email { max-width: 160px; }
}
