/* ============================
   CSS Variables & Theme
   ============================ */
:root {
  /* Light theme */
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef1f5;
  --bg-hover: #e8ecf1;
  --bg-card: #ffffff;
  --bg-modal: #ffffff;
  --bg-input: #f5f7fa;
  --text-primary: #1a1d23;
  --text-secondary: #5f6680;
  --text-tertiary: #9098a9;
  --text-on-accent: #ffffff;
  --border: #e2e6ed;
  --border-light: #eef1f5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --accent: #4f6ef7;
  --accent-hover: #3b5ce4;
  --accent-light: #eef1ff;
  --accent-glow: rgba(79, 110, 247, 0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 60px;
  --sidebar-width: 320px;
  --sidebar-collapsed: 0px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-tertiary: #232731;
  --bg-hover: #2a2e3a;
  --bg-card: #1e2130;
  --bg-modal: #1e2130;
  --bg-input: #252836;
  --text-primary: #e4e7f0;
  --text-secondary: #9098b0;
  --text-tertiary: #5f6680;
  --text-on-accent: #ffffff;
  --border: #2e3240;
  --border-light: #252836;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
  --accent: #6b8aff;
  --accent-hover: #8da4ff;
  --accent-light: #1e2444;
  --accent-glow: rgba(107, 138, 255, 0.25);
}

/* ============================
   Base Reset
   ============================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* ============================
   Scrollbar
   ============================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============================
   Views
   ============================ */
.view {
  display: none;
  height: 100vh;
  width: 100vw;
}
.view.active {
  display: flex;
  flex-direction: column;
}

/* ============================
   Animations
   ============================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(5deg); }
  66% { transform: translateY(10px) rotate(-3deg); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

.animate-in {
  animation: fadeInScale 0.5s ease-out forwards;
}
.animate-stagger-1 { animation: fadeIn 0.5s ease-out 0.1s forwards; opacity: 0; }
.animate-stagger-2 { animation: fadeIn 0.5s ease-out 0.2s forwards; opacity: 0; }
.animate-stagger-3 { animation: fadeIn 0.5s ease-out 0.3s forwards; opacity: 0; }

/* ============================
   LOGIN PAGE
   ============================ */
.login-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  position: relative;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: white;
}
.shape-1 { width: 300px; height: 300px; top: -100px; left: -50px; animation: float 12s ease-in-out infinite; }
.shape-2 { width: 200px; height: 200px; top: 50%; right: -60px; animation: float 10s ease-in-out infinite 2s; }
.shape-3 { width: 150px; height: 150px; bottom: -40px; left: 30%; animation: float 14s ease-in-out infinite 1s; }
.shape-4 { width: 80px; height: 80px; top: 20%; left: 60%; animation: float 9s ease-in-out infinite 3s; }
.shape-5 { width: 120px; height: 120px; bottom: 20%; right: 30%; animation: float 11s ease-in-out infinite 0.5s; }
.shape-6 { width: 60px; height: 60px; top: 40%; left: 20%; animation: float 8s ease-in-out infinite 4s; }

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 420px;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .login-card {
  background: rgba(30, 33, 48, 0.95);
}

.login-logo {
  margin-bottom: 32px;
}

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  color: var(--text-primary);
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.login-logo h1 span {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-google:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-google:active { transform: translateY(0); }

.login-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.feature-item .material-icons-round {
  font-size: 28px;
  color: var(--accent);
}

/* ============================
   HEADER
   ============================ */
.app-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 100;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

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

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-small {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Project selector */
.project-selector { position: relative; }

.btn-project-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  max-width: 250px;
}
.btn-project-select:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.project-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
}
.project-avatar-small svg { width: 100%; height: 100%; }

/* Maps usage */
.maps-usage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.maps-usage .material-icons-round { font-size: 16px; }
.usage-bar {
  width: 100px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}
.usage-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
  width: 0%;
}
.usage-fill.warning { background: var(--warning); }
.usage-fill.danger { background: var(--danger); }
.usage-text { font-family: var(--font-mono); font-size: 11px; }

/* View mode toggle */
.view-mode-toggle {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.mode-btn .material-icons-round { font-size: 18px; }
.mode-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-sm);
}
.mode-btn:not(.active):hover { color: var(--text-primary); background: var(--bg-hover); }

/* User menu */
.user-menu-wrapper { position: relative; }

.btn-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-user-menu:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================
   DROPDOWNS
   ============================ */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
  transition: background var(--transition), border-color var(--transition);
}
.dropdown-menu.hidden { display: none; }

.project-dropdown { left: 0; width: 280px; }
.user-dropdown { right: 0; width: 220px; }

.dropdown-section { padding: 12px 16px; }
.dropdown-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  display: block;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item .material-icons-round { font-size: 18px; }

/* Theme toggle */
.theme-toggle-row {
  display: flex;
  gap: 6px;
}
.theme-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-btn .material-icons-round { font-size: 20px; }
.theme-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.theme-btn:not(.active):hover { border-color: var(--accent); }

/* Language grid */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.lang-btn {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.lang-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Project list in dropdown */
.project-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}
.project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.project-item:hover { background: var(--bg-hover); }
.project-item.active { background: var(--accent-light); }
.project-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.project-item-avatar svg { width: 100%; height: 100%; }
.project-item-info { flex: 1; min-width: 0; }
.project-item-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-item-count {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ============================
   MAIN CONTENT AREA
   ============================ */
.app-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: width var(--transition-slow), border-color var(--transition), background var(--transition);
  flex-shrink: 0;
  z-index: 10;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  border-right: none;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.sidebar-search .material-icons-round {
  font-size: 18px;
  color: var(--text-tertiary);
}
.sidebar-search input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-primary);
  outline: none;
  font-size: 13px;
}
.sidebar-search input::placeholder { color: var(--text-tertiary); }

/* Sidebar view toggle */
.sidebar-view-toggle {
  display: flex;
  gap: 4px;
  padding: 8px 16px 4px;
  flex-shrink: 0;
}
.view-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.view-toggle-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.view-toggle-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.sidebar-filters {
  display: flex;
  gap: 6px;
  padding: 4px 16px 8px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.filter-select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Marker list */
.marker-list {
  flex: 1 1 0;
  overflow-y: scroll;
  padding: 6px;
}
.marker-list::-webkit-scrollbar { width: 5px; }
.marker-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.marker-list::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

.marker-card:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.marker-card.active {
  background: var(--accent-light);
  border-color: var(--accent);
}
.marker-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  overflow: hidden;
}
.marker-card-icon svg { width: 28px; height: 28px; }
.marker-card-info { flex: 1; min-width: 0; }
.marker-card-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marker-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
/* old .marker-card-status replaced by .marker-card-status-dot in new section */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  text-align: center;
}
.empty-state .material-icons-round {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Sidebar stats — always pinned at bottom */
.sidebar-stats {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  gap: 8px;
  flex-shrink: 0;
}
.stat {
  flex: 1;
  text-align: center;
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}
.stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar expand button */
.btn-expand-sidebar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  transition: all var(--transition);
}
.btn-expand-sidebar:hover {
  background: var(--accent);
  color: var(--text-on-accent);
  width: 32px;
}
.btn-expand-sidebar.hidden { display: none; }

/* ============================
   MAP
   ============================ */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 6px;
  min-width: 0;
}

.map {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color var(--transition);
}

/* Main area — ensure proper spacing */
.app-main {
  gap: 0;
}

.map-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity var(--transition);
}
.map-overlay.hidden { display: none; }
.map-overlay-content {
  text-align: center;
  color: var(--text-secondary);
}
.map-overlay-content h2 {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 600;
}
.map-overlay-content p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Map controls */
.map-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 6;
  pointer-events: none;
}
.map-controls > * { pointer-events: auto; }

.map-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  box-shadow: var(--shadow-md);
  flex: 1;
  max-width: 400px;
  position: relative;
}
.map-search-box.hidden { display: none; }
.map-search-box .material-icons-round { font-size: 18px; color: var(--text-tertiary); }
.map-search-box input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
}
.map-search-box input::placeholder { color: var(--text-tertiary); }

.map-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
}
.map-search-results.hidden { display: none; }
.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item:last-child { border-bottom: none; }

.coord-input {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  box-shadow: var(--shadow-md);
}
.coord-input.hidden { display: none; }
.coord-input input {
  width: 110px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
  outline: none;
}
.coord-input input:focus { border-color: var(--accent); }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn:active::after { opacity: 1; }

.btn-accent {
  background: var(--accent);
  color: var(--text-on-accent);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-sm.btn-accent { background: var(--accent); color: white; }
.btn-sm.btn-accent:hover { background: var(--accent-hover); }

.btn-icon {
  padding: 6px;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============================
   MODALS
   ============================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-modal);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  transition: background var(--transition);
}
.modal-medium { width: 560px; max-width: 95vw; }
.modal-large { width: 720px; max-width: 95vw; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* ============================
   FORMS
   ============================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.col-span-2 { grid-column: span 2; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input[readonly] { opacity: 0.6; }

textarea.form-input { resize: vertical; }

.input-with-suffix {
  display: flex;
  gap: 6px;
}
.input-with-suffix .form-input { flex: 1; }
.form-suffix {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  outline: none;
}

/* Icon picker container (used by marker-icon-picker) */
.icon-picker {
  padding: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
/* .icon-option styles moved to ICON PICKER TABS section */

/* Images area */
.images-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.image-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-thumb-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.image-thumb:hover .image-thumb-delete { opacity: 1; }

.upload-btn {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 11px;
}
.upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.upload-btn .material-icons-round { font-size: 24px; }

/* ============================
   PROJECT MANAGEMENT MODAL
   ============================ */
.new-project-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.new-project-form .form-input { flex: 1; }

.avatar-picker-section {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}
.avatar-picker-section.hidden { display: none; }
.avatar-picker-section label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avatar-option {
  width: 48px;
  height: 48px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  background: var(--bg-secondary);
}
.avatar-option:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}
.avatar-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.avatar-option svg { width: 100%; height: 100%; }

.manage-project-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manage-project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  animation: fadeIn 0.3s ease-out;
}
.manage-project-item:hover { background: var(--bg-hover); }
.manage-project-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.manage-project-avatar svg { width: 100%; height: 100%; }
.manage-project-info { flex: 1; min-width: 0; }
.manage-project-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.manage-project-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}
.manage-project-actions {
  display: flex;
  gap: 4px;
}

/* ============================
   TOAST NOTIFICATIONS
   ============================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
  max-width: 360px;
}
.toast.removing {
  opacity: 0;
  transform: translateX(100px);
}
.toast .material-icons-round { font-size: 20px; }
.toast.success .material-icons-round { color: var(--success); }
.toast.error .material-icons-round { color: var(--danger); }
.toast.warning .material-icons-round { color: var(--warning); }
.toast.info .material-icons-round { color: var(--info); }

/* ============================
   CUSTOM MAP INFO WINDOW
   ============================ */
.info-window {
  padding: 4px;
  max-width: 280px;
  font-family: var(--font);
}
.info-window-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1a1d23;
}
.info-window-meta {
  font-size: 12px;
  color: #5f6680;
  line-height: 1.6;
}
.info-window-meta strong {
  color: #1a1d23;
}
.info-window-icon {
  width: 32px;
  height: 32px;
  float: right;
  margin-left: 8px;
}

/* ============================
   CLUSTER STYLES
   ============================ */
.cluster-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(79,110,247,0.4);
  border: 3px solid white;
  transition: transform 0.2s;
  font-family: var(--font);
}
.cluster-marker:hover { transform: scale(1.15); }
.cluster-marker.large {
  width: 50px; height: 50px;
  font-size: 16px;
  background: #e74c3c;
  box-shadow: 0 2px 8px rgba(231,76,60,0.4);
}
.cluster-marker.medium {
  width: 45px; height: 45px;
  font-size: 15px;
  background: #f39c12;
  box-shadow: 0 2px 8px rgba(243,156,18,0.4);
}

/* ============================
   RIGHT-CLICK CONTEXT MENU
   ============================ */
.map-context-menu {
  position: absolute;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 220px;
  max-height: 360px;
  overflow-y: auto;
  animation: slideDown 0.15s ease-out;
  transition: background var(--transition), border-color var(--transition);
}
.map-context-menu.hidden { display: none; }

.ctx-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.ctx-icon-grid {
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ctx-cat-label {
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  padding: 6px 4px 2px;
  margin-top: 4px;
}
.ctx-cat-label:first-child { margin-top: 0; }

.ctx-icon-option {
  width: 36px;
  height: 36px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  overflow: hidden;
}
.ctx-icon-option svg { width: 28px; height: 28px; }
.ctx-icon-option:hover {
  border-color: var(--accent);
  transform: scale(1.15);
  box-shadow: var(--shadow-sm);
}

.ctx-icon-more {
  width: 36px;
  height: 36px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.15s ease;
}
.ctx-icon-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================
   ICON PICKER TABS (in marker modal)
   ============================ */
.picker-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.picker-tab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.picker-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.picker-tab.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.picker-tab-manage {
  margin-left: auto;
  padding: 6px 8px;
  display: flex;
  align-items: center;
}

.picker-grid-container {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.picker-cat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--accent);
  padding: 8px 4px 4px;
  margin-top: 4px;
}
.picker-cat-label:first-child { margin-top: 0; padding-top: 4px; }

.picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px;
}

.icon-option {
  width: 44px;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  overflow: hidden;
  padding: 3px;
}
.icon-option svg { width: 30px; height: 30px; flex-shrink: 0; }
.icon-label {
  font-size: 7px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.1;
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.icon-option:hover {
  border-color: var(--accent);
  transform: scale(1.08);
}
.icon-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ============================
   MARKER CARD - inactive state
   ============================ */
.marker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  animation: fadeIn 0.3s ease-out;
}
.marker-card.inactive {
  opacity: 0.5;
}
.marker-card.inactive .marker-card-icon {
  filter: grayscale(0.8);
}
.marker-card-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.marker-card-status-dot.active { background: var(--success); }
.marker-card-status-dot.inactive { background: var(--text-tertiary); }
.marker-card-status-dot.maintenance { background: var(--warning); }

.marker-card-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition);
}
.marker-card:hover .marker-card-actions { opacity: 1; }
.btn-edit-marker { color: var(--text-tertiary); }
.btn-edit-marker:hover { color: var(--accent); }

/* ============================
   MANAGE MARKER TYPES MODAL
   ============================ */
.new-type-form {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.new-type-form .form-group { margin-bottom: 10px; }

.preset-svgs { margin-top: 8px; }
.preset-svg-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.preset-svg-option {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  overflow: hidden;
}
.preset-svg-option svg { width: 28px; height: 28px; }
.preset-svg-option:hover { border-color: var(--accent); transform: scale(1.1); }
.preset-svg-option.selected { border-color: var(--accent); background: var(--accent-light); }

.types-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  padding: 8px 0;
}
.types-info-text {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 0 0 8px;
  line-height: 1.5;
}

.manage-type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: all var(--transition);
  animation: fadeIn 0.3s ease-out;
}
.manage-type-item:hover { background: var(--bg-hover); }
.manage-type-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.manage-type-icon svg { width: 32px; height: 32px; }
.manage-type-info { flex: 1; min-width: 0; }
.manage-type-name { font-weight: 500; font-size: 14px; }
.manage-type-scope { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.manage-type-actions { display: flex; gap: 4px; }

/* ============================
   MARKER POPUP (click on existing marker)
   ============================ */
.marker-popup {
  position: absolute;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 260px;
  animation: slideDown 0.15s ease-out;
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
.marker-popup.hidden { display: none; }

.popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}
.popup-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.popup-icon svg { width: 32px; height: 32px; }
.popup-title { font-size: 14px; font-weight: 600; }
.popup-meta { font-size: 11px; color: var(--text-tertiary); display: flex; gap: 6px; margin-top: 2px; }
.popup-status {
  background: var(--success); color: white; font-size: 10px;
  padding: 1px 6px; border-radius: 99px; font-weight: 600;
}
.popup-coords { font-family: var(--font-mono); font-size: 10px; }

.popup-obs {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  line-height: 1.4;
}

.popup-actions {
  display: flex;
  flex-direction: column;
  padding: 6px;
}
.popup-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: none; background: none;
  color: var(--text-primary); font-size: 13px;
  cursor: pointer; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.popup-btn:hover { background: var(--bg-hover); }
.popup-btn .material-icons-round { font-size: 18px; color: var(--text-tertiary); }
.popup-btn.danger { color: var(--danger); }
.popup-btn.danger .material-icons-round { color: var(--danger); }

/* ============================
   MOVE BAR (bottom of map when moving marker)
   ============================ */
.move-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-glow);
  font-size: 13px;
  font-weight: 500;
  animation: slideDown 0.2s ease-out;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}
.move-bar.hidden { display: none; }
.move-bar-buttons { display: flex; gap: 6px; margin-left: 8px; }

/* ============================
   LANDING PAGE SHOWCASE ANIMATIONS
   ============================ */
.login-bg {
  gap: 40px;
}
.login-showcase {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 300px;
  z-index: 1;
}
.showcase-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  color: white;
  opacity: 0;
  transform: translateX(-40px);
  animation: slideShowcase 0.6s ease-out forwards;
}
.showcase-1 { animation-delay: 0.3s; }
.showcase-2 { animation-delay: 0.5s; }
.showcase-3 { animation-delay: 0.7s; }
.showcase-4 { animation-delay: 0.9s; }
@keyframes slideShowcase {
  to { opacity: 1; transform: translateX(0); }
}
.showcase-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.showcase-icon .material-icons-round { font-size: 28px; }
.showcase-text { font-size: 14px; font-weight: 500; line-height: 1.4; }
@media (max-width: 900px) {
  .login-showcase { display: none; }
}

/* ============================
   ADMIN ROLE TOGGLE
   ============================ */
.admin-role-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  background: rgba(245,158,11,0.08);
}
.switch { position: relative; width: 32px; height: 18px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--text-tertiary);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-slider::before {
  content: '';
  position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px;
  background: white; border-radius: 50%;
  transition: transform 0.2s;
}
.switch input:checked + .switch-slider { background: var(--warning); }
.switch input:checked + .switch-slider::before { transform: translateX(14px); }

/* ============================
   ADS SIDEBAR
   ============================ */
.ads-sidebar {
  width: 200px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  flex-shrink: 0;
  overflow-y: auto;
  transition: background var(--transition), border-color var(--transition);
}
.ads-sidebar.hidden { display: none; }

.promo-video-area { text-align: center; }
.promo-video-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600; font-size: 13px;
  transition: opacity 0.2s;
}
.promo-video-link:hover { opacity: 0.85; }
.promo-video-link .material-icons-round { font-size: 20px; }

.ad-slot { min-height: 250px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }

/* ============================
   AD SPLASH SCREEN
   ============================ */
.ad-splash {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.ad-splash.hidden { display: none; }
.ad-splash-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 500px; width: 90%;
  text-align: center;
  animation: fadeInScale 0.3s ease-out;
}
.ad-splash-header {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-bottom: 16px;
  font-size: 13px; color: var(--text-secondary);
}
.ad-splash-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}
.ad-slot-splash { min-height: 200px; background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: 16px; }

/* ============================
   ADMIN PANEL MODAL
   ============================ */
.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}
.admin-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 20px;
  border: none; background: none;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.admin-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tab .material-icons-round { font-size: 18px; }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
.badge {
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
  min-width: 18px; text-align: center;
}

.admin-user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.admin-user-row:last-child { border-bottom: none; }

.admin-msg-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}
.admin-msg-row.acked { opacity: 0.5; }

/* ============================
   HIDDEN UTILITY
   ============================ */
.hidden { display: none !important; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .app-header { padding: 0 8px; gap: 8px; }
  .user-name { display: none; }
  .maps-usage { display: none; }
  .sidebar { width: 260px; }
  .header-center { display: none; }
}
