/* ==========================================================================
   SEEYOUSOON SUPER-APP — ULTRA-GLASS LUXURY CORE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  background-color: var(--ink);
  background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
  color: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
  direction: rtl;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Offline Indicator Bar */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-offline);
  background: linear-gradient(90deg, #F43F5E, #E11D48);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 16px;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}
.offline-banner.visible { display: flex; }

/* Full-Screen Map Container */
#map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-map);
  background-color: var(--ink);
}

.maplibregl-map { width: 100%; height: 100%; font-family: inherit; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { display: none !important; }

/* Floating Ultra-Glass Topbar */
.floating-topbar {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 16px;
  right: 16px;
  z-index: var(--z-topbar);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.location-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-luxe);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.location-chip:active { transform: scale(0.96); border-color: var(--purple); }

.location-dot {
  width: 9px;
  height: 9px;
  background-color: var(--kr-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--kr-green-glow);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.location-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFF;
}

.topbar-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn-glass {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-luxe);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s, background 0.2s;
  position: relative;
  pointer-events: auto;
}
.icon-btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-hi);
}
.icon-btn-glass:active { transform: scale(0.94); border-color: var(--purple); }
.icon-btn-glass svg { width: 19px; height: 19px; }

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple-glow);
}

/* Locate Me FAB */
.fab-locate {
  position: fixed;
  right: 16px;
  bottom: calc(var(--sheet-half) + 16px);
  z-index: var(--z-map-controls);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
}
.fab-locate:hover { border-color: var(--purple); transform: scale(1.06); }
.fab-locate:active { transform: scale(0.94); }

/* Sliding Sidebar Drawer */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: calc(var(--z-sheet) + 20);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

.sidebar-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 440px;
  max-width: 100vw;
  background: #070A14;
  background: linear-gradient(180deg, #0A0F22 0%, #05070F 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 24px 0 80px rgba(0, 0, 0, 0.95);
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
@media (max-width: 600px) {
  .sidebar-drawer {
    width: 100vw;
    max-width: 100vw;
    border-right: none;
  }
}
html[dir="rtl"] .sidebar-drawer {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateX(100%);
}
.sidebar-drawer.open { transform: translateX(0); }

/* City Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-float);
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal-dialog { transform: scale(1); }

/* ==========================================================================
   ROLE SWITCHER MODAL & IDENTITIES (SUPER-APP PERSONA OS)
   ========================================================================== */
.role-switcher-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.role-switcher-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.role-switcher-sheet {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(175deg, rgba(17, 24, 48, 0.98) 0%, rgba(9, 13, 28, 0.99) 100%);
  border: 1px solid var(--glass-border-hi);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 24px 20px calc(var(--safe-bottom) + 24px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.role-switcher-modal-backdrop.open .role-switcher-sheet {
  transform: translateY(0);
}
.role-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
}
.role-switcher-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.role-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.role-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.role-option-card.active {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.role-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* ==========================================================================
   MOBILE POS & SOFTPOS CASHIER SYSTEM
   ========================================================================== */
.pos-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 80px;
}
.pos-display-screen {
  background: linear-gradient(135deg, rgba(14, 20, 39, 0.9) 0%, rgba(8, 12, 24, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pos-display-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10B981, transparent);
}
.pos-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pos-num-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 16px;
  font-size: 22px;
  font-weight: 800;
  color: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}
.pos-num-btn:active {
  background: var(--purple);
  transform: scale(0.92);
}
.pos-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pos-product-card {
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.pos-product-card:active {
  transform: scale(0.96);
  border-color: #10B981;
}

/* ==========================================================================
   DRIVER TAXAMETER & FLEET COCKPIT
   ========================================================================== */
.driver-taxameter-box {
  background: radial-gradient(ellipse at top, rgba(245, 158, 11, 0.12) 0%, rgba(10, 14, 28, 0.95) 75%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.15);
}
.taxameter-ticker {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 900;
  color: #F59E0B;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  letter-spacing: -1px;
}
.pulse-online {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 12px #10B981;
  animation: pulseLed 1.6s infinite ease-in-out;
}
@keyframes pulseLed {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 18px #10B981; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   PARTNER & KITCHEN ORDER STREAM
   ========================================================================== */
.merchant-order-card {
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}
.merchant-order-card.new-order {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}
