@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0a0b10;
  --panel-bg: rgba(13, 15, 23, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary-glow: rgba(0, 242, 254, 0.15);
  
  --color-primary: #00f2fe;
  --color-secondary: #4facfe;
  --color-accent: #00ff87;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  
  --font-title: 'Outfit', 'Cairo', sans-serif;
  --font-body: 'Cairo', 'Plus Jakarta Sans', sans-serif;
  
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 
               0 0 20px rgba(0, 242, 254, 0.05);
  --glass-blur: 16px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--color-text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#app-container {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  flex: 1;
  height: 100%;
  width: 100%;
  background-color: var(--bg-dark);
  z-index: 1;
}

/* Glassmorphism Sidebar */
#sidebar {
  position: absolute;
  top: 20px;
  right: 20px; /* Positioned on the right for RTL layout */
  bottom: 20px;
  width: 420px;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

#sidebar:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 
              0 0 30px rgba(0, 242, 254, 0.1);
}

/* Header & Gradient Text */
header {
  margin-bottom: 24px;
}

.title-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.logo-glow {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 12px 3px var(--color-primary);
  animation: pulse-glow 2s infinite ease-in-out;
}

h1 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 242, 254, 0.15);
  transform: translateY(-2px);
}

.stat-val {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-val.highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-lbl {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filters and Search */
.section-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-group {
  margin-bottom: 24px;
}

.section-hint {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 0 12px 0;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 42px 12px 16px; /* Swapped padding for RTL search icon */
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.search-icon {
  position: absolute;
  right: 14px; /* Icon positioned on the right for RTL search box */
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Choice Chips / Filters */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.chip.active[data-religion="muslim"] {
  background: rgba(0, 255, 135, 0.15);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.1);
}

.chip.active[data-religion="musalla"] {
  background: rgba(79, 172, 254, 0.15);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.1);
}

.chip.active[data-religion="other"] {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.chip.active[data-religion="all"] {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.chip.active[data-basemap] {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}


/* Range Sliders */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.3s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--color-primary);
  transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Info Panel for Selected Point */
#details-panel {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  display: none; /* Shown dynamically */
  animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.details-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.details-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.details-title-ar {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
  text-align: right;
  font-family: 'Outfit', sans-serif;
}

.details-title-en {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.details-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.details-label {
  color: var(--color-text-muted);
}

.details-val {
  font-weight: 500;
  color: var(--color-text);
}

.details-val.accent {
  color: var(--color-accent);
}

.details-link {
  color: var(--color-primary);
  text-decoration: none;
}

.details-link:hover {
  text-decoration: underline;
}

/* Custom Zoom Controls */
.leaflet-control-zoom {
  border: 1px solid var(--panel-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow-lg) !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  background: var(--panel-bg) !important;
  backdrop-filter: blur(var(--glass-blur)) !important;
  color: var(--color-text) !important;
  border: none !important;
  transition: all 0.2s ease !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--color-primary) !important;
}

/* Custom Marker Styling */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  transition: all 0.3s ease;
}

.custom-marker.muslim {
  background: rgba(0, 255, 135, 0.15);
  border-color: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
}

.custom-marker.christian {
  background: rgba(79, 172, 254, 0.15);
  border-color: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary);
}

.custom-marker-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

.custom-marker.muslim .custom-marker-inner {
  background: var(--color-accent);
}

.custom-marker.christian .custom-marker-inner {
  background: var(--color-secondary);
}

/* Scrollbar Customization */
#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes pulse-glow {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
    box-shadow: 0 0 8px 1px var(--color-primary);
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 15px 4px var(--color-primary);
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
    box-shadow: 0 0 8px 1px var(--color-primary);
  }
}

/* Dashboard Mode Toggle Button Group */
.mode-toggle-container {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  width: 100%;
  margin-top: 6px;
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-btn:hover {
  color: var(--color-text);
}

.mode-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.05);
}

.mode-btn.active[data-mode="gap"] {
  background: rgba(255, 59, 48, 0.15);
  border-color: #ff3b30;
  color: #ff3b30;
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.05);
}

/* Info Alert box style */
.info-alert {
  display: flex;
  gap: 12px;
  background: rgba(255, 59, 48, 0.06);
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 11px;
  line-height: 1.5;
  color: #ffbaba;
  margin-bottom: 24px;
  animation: fade-in 0.3s ease;
  align-items: flex-start;
}

.alert-icon {
  flex-shrink: 0;
  color: #ff3b30;
  margin-top: 2px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Loading / Error Overlay */
#loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#loading-overlay .loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 36px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  text-align: center;
}

#loading-overlay .loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}

#loading-overlay.error .loading-spinner {
  display: none;
}

#loading-overlay #loading-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
}

#loading-overlay.error #loading-text {
  color: #ffbaba;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Qibla Compass & Toggle Switch Styles
   ========================================================================== */

/* Switch Toggle Option in Sidebar */
.switch-control-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 6px;
  transition: all 0.3s ease;
}

.switch-control-wrapper:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 242, 254, 0.15);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-text-muted);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.switch input:checked + .slider-switch {
  background-color: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
}

.switch input:checked + .slider-switch:before {
  transform: translateX(20px);
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

.slider-switch.round {
  border-radius: 24px;
}

.slider-switch.round:before {
  border-radius: 50%;
}

.switch-label {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
  user-select: none;
  cursor: pointer;
  flex-grow: 1;
  text-align: right;
}

.switch input:checked ~ .switch-label {
  color: var(--color-text);
}

/* Qibla Compass Center Overlay */
.qibla-compass {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5; /* Between map (1) and sidebar (10) */
  pointer-events: none; /* Allows click-through to map */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: compass-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.qibla-compass.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Needle Container - Sleek minimalist redesign */
.compass-needle-container {
  position: relative;
  width: 44px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.5))
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.compass-needle-svg {
  width: 100%;
  height: 100%;
}

@keyframes compass-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Data Quality Mode Specific styles */
.mode-btn.active[data-mode="improve"] {
  background: rgba(255, 176, 58, 0.12);
  border: 1px solid #ffb03a;
  color: #ffb03a;
  box-shadow: 0 0 10px rgba(255, 176, 58, 0.05);
}

.chip.active[data-improve] {
  background: rgba(255, 176, 58, 0.15);
  border-color: #ffb03a;
  color: #ffb03a;
  box-shadow: 0 0 10px rgba(255, 176, 58, 0.1);
}

/* Custom Marker - Data Quality Warning Dot */
.custom-marker.improve {
  background: rgba(255, 176, 58, 0.15);
  border-color: #ffb03a;
  box-shadow: 0 0 10px #ffb03a;
}

.custom-marker.improve .custom-marker-inner {
  background: #ffb03a;
}

/* Quality Issues Warnings Card */
.quality-issues-box {
  margin-top: 16px;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.quality-issues-title {
  font-size: 13px;
  font-weight: 700;
  color: #ff453a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.issues-list {
  list-style: none;
  padding-right: 0;
  margin: 0;
}

.issues-list li {
  font-size: 11.5px;
  color: #ffbaba;
  margin-bottom: 6px;
  padding-right: 14px;
  position: relative;
  text-align: right;
}

.issues-list li::before {
  content: '•';
  position: absolute;
  right: 0;
  color: #ff453a;
  font-weight: bold;
}

.issues-list li:last-child {
  margin-bottom: 0;
}

/* Mapper Editing Tools Card */
.mapper-tools-box {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.mapper-tools-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.mapper-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mapper-btn {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.mapper-btn:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.mapper-btn.id-editor {
  background: rgba(79, 172, 254, 0.08);
  border-color: rgba(79, 172, 254, 0.2);
}

.mapper-btn.id-editor:hover {
  background: rgba(79, 172, 254, 0.15);
  border-color: var(--color-secondary);
  color: #fff;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.2);
}

.mapper-btn.josm-editor {
  background: rgba(0, 255, 135, 0.08);
  border-color: rgba(0, 255, 135, 0.2);
}

.mapper-btn.josm-editor:hover {
  background: rgba(0, 255, 135, 0.15);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

/* Toast Notifications styling */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(13, 15, 23, 0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  padding: 12px 20px;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  animation: slide-in-left 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  direction: rtl;
}

.toast-notification.error {
  border-color: #ff3b30;
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-left {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-120%);
    opacity: 0;
  }
}

/* ==========================================
   OpenStreetMap Auth (OSM Auth) Styling
   ========================================== */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
}

.auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

.auth-card {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: rgba(18, 20, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  direction: rtl;
}

.auth-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(0, 242, 254, 0) 70%);
  pointer-events: none;
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-icon {
  font-size: 36px;
  background: rgba(0, 242, 254, 0.1);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
  margin-bottom: 8px;
}

.auth-header h2 {
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.auth-header p {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.auth-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.client-id-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-id-config label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.auth-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  font-family: monospace;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
}

.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  background: rgba(0, 0, 0, 0.4);
}

.input-help {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
}

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #0b0c10;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.45);
}

.auth-submit-btn:active {
  transform: translateY(0);
}


.auth-footer {
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-text-muted);
}

/* User Profile Sidebar Widget */
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 12px;
  margin-bottom: 8px;
  animation: fade-in 0.3s ease;
}

.user-avatar {
  font-size: 18px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.user-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.user-status-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-muted);
}

.user-status-text strong {
  color: var(--color-primary);
  font-weight: 700;
}

.user-role-text {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.osm-logout-btn {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: #ff5b5b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.osm-logout-btn:hover {
  background: rgba(255, 59, 48, 0.18);
  color: #ff3b30;
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.1);
}

/* ==========================================
   Multi-tab Auth Card & Guest Access Styles
   ========================================== */
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 8px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-tab-btn:hover {
  color: var(--color-text);
}

.auth-tab-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--color-primary);
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: tab-fade-in 0.3s ease;
}

.tab-content.hidden {
  display: none;
}

@keyframes tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Copy Redirect URI Button styling */
.copy-uri-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-uri-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Divider styling */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-family: var(--font-body);
  margin: 6px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
  margin-left: 12px;
}

.auth-divider:not(:empty)::after {
  margin-right: 12px;
}

/* Guest Skip Button styling */
.auth-skip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-skip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text);
  transform: translateY(-1px);
}

.auth-skip-btn:active {
  transform: translateY(0);
}

/* Sidebar Guest Small Login Button */
.osm-login-btn-small {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.osm-login-btn-small:hover {
  background: rgba(0, 242, 254, 0.18);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

/* Guide Container & Steps styling */
.guide-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-intro {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--color-text);
  line-height: 1.5;
  flex-grow: 1;
}

.guide-sublist {
  margin: 6px 0 0 0;
  padding-right: 18px;
  list-style-type: square;
  color: var(--color-text-muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.guide-sublist li {
  margin-bottom: 4px;
}
