:root {
  --copelt-primary: #0a1b39;
  --copelt-accent: #c07f21;
  --copelt-bg: #ffffff;
  --copelt-surface: #f8f9fa;
  --copelt-border: #e5e7eb;
  --copelt-text-muted: #64748b;
  --tenant-primary: var(--copelt-primary);
  --tenant-accent: var(--copelt-accent);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--copelt-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--copelt-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.header-brand-img {
  height: 42px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.header-brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--copelt-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(10, 27, 57, 0.15);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--copelt-accent);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Interactive Explanatory Tooltips for Technical Terms */
.tech-tooltip {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tech-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(10, 27, 57, 0.96);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  text-transform: none;
  letter-spacing: normal;
}

.tech-tooltip::before {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(10, 27, 57, 0.96) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
}

.tech-tooltip:hover::after,
.tech-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--copelt-primary);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--copelt-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--copelt-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #a96f1b;
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--copelt-primary);
  color: #ffffff;
}

.btn-dark:hover {
  background: #0f274e;
}

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

.btn-outline:hover {
  background: var(--copelt-surface);
  border-color: var(--copelt-primary);
}

/* Grid & Cards */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #ffffff;
  border: 1px solid var(--copelt-border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(10, 27, 57, 0.04);
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--copelt-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; line-height: 1.15; }
h2 { font-size: 1.85rem; line-height: 1.25; }
h3 { font-size: 1.35rem; line-height: 1.3; }

/* Dashboard layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
  width: 100%;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--copelt-border);
  padding: 1.5rem 1rem;
  transition: all 0.3s ease;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--copelt-primary);
  transition: background 0.15s;
}

.sidebar-item.active a, .sidebar-item a:hover {
  background: var(--copelt-surface);
  color: var(--copelt-accent);
}

.main-content {
  padding: clamp(1rem, 2.5vw, 2rem);
  background: #ffffff;
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--copelt-border);
    padding: 0.75rem 1rem;
    display: none;
  }
  .sidebar.mobile-open {
    display: block;
    animation: fadeIn 0.2s ease-out;
  }
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .sidebar-item a {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 900px) {
  .feature-split {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .feature-split .feature-img {
    order: -1 !important;
  }
}

/* ==========================================================================
   Hero Cinematic & Multi-Style Enhancements (2026 Design System)
   ========================================================================== */
.mall-hero-cinematic {
  animation: heroFadeIn 0.8s ease-out forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0.85;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-pill-cta {
  cursor: pointer;
  user-select: none;
}

.hero-pill-cta:hover {
  filter: brightness(1.06);
}

@media (max-width: 768px) {
  .mall-hero-cinematic {
    padding: 2rem 0 1.5rem 0 !important;
    min-height: auto !important;
  }
  .mall-hero-cinematic .container {
    padding: 0 1.25rem !important;
  }
}

/* =========================================================================
   3D FLIP CARDS SYSTEM (INTERACTIVE EVENT & STORE SHOWCASES)
   ========================================================================= */
.flip-card-container {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* =========================================================================
   IMPECCABLE RESPONSIVE MALL / HOSPITAL HEADER SYSTEM
   ========================================================================= */
.mall-header-sticky {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  box-shadow: 0 4px 20px rgba(10, 27, 57, 0.03) !important;
  transition: all 0.25s ease;
}

.mall-navbar-inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 70px !important;
  padding: 0 1.25rem !important;
  max-width: 1320px !important;
  margin: 0 auto !important;
}

.mall-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.mall-header-logo-img {
  height: 40px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.mall-header-avatar {
  background: var(--copelt-primary);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(10, 27, 57, 0.15);
  flex-shrink: 0;
}

.mall-header-avatar.is-hospital {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.mall-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.mall-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--copelt-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.mall-brand-subtitle {
  font-size: 0.65rem;
  color: var(--copelt-text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mall-status-badge {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.62rem;
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.desktop-only-badge {
  display: inline-block;
  margin-left: 0.25rem;
}

.mobile-only-badge {
  display: none;
}

.mall-desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mall-nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.mall-nav-link:hover {
  color: var(--copelt-primary);
  background: rgba(10, 27, 57, 0.04);
}

.mall-nav-link.nav-link-featured {
  color: var(--copelt-accent);
  background: rgba(192, 127, 33, 0.08);
}

.mall-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.mall-desktop-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mall-mobile-controls {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger Toggle Button */
.mall-hamburger-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.mall-hamburger-toggle:hover {
  background: #f8fafc;
  border-color: var(--copelt-accent);
}

.mall-hamburger-bar {
  width: 20px;
  height: 2px;
  background: var(--copelt-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mall-hamburger-toggle.is-active .mall-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mall-hamburger-toggle.is-active .mall-hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mall-hamburger-toggle.is-active .mall-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.mall-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 27, 57, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mall-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Drawer Panel */
.mall-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 360px);
  background: #ffffff;
  z-index: 1050;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mall-mobile-drawer.is-open {
  transform: translateX(0);
}

.mall-drawer-header {
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.mall-drawer-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mall-drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--copelt-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.mall-drawer-avatar.is-hospital {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.mall-drawer-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--copelt-primary);
  line-height: 1.2;
}

.mall-drawer-subtitle {
  font-size: 0.62rem;
  color: var(--copelt-text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.mall-drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  color: #64748b;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mall-drawer-close-btn:hover {
  background: #f1f5f9;
  color: var(--copelt-primary);
}

.mall-drawer-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.mall-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mall-drawer-nav {
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.mall-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.18s ease;
  min-height: 48px;
}

.mall-drawer-link:hover,
.mall-drawer-link:active {
  background: #f1f5f9;
}

.mall-drawer-link.drawer-featured {
  background: rgba(192, 127, 33, 0.08);
  border: 1px solid rgba(192, 127, 33, 0.2);
}

.drawer-icon {
  font-size: 1.35rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.drawer-link-content {
  display: flex;
  flex-direction: column;
}

.drawer-link-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--copelt-primary);
  line-height: 1.2;
}

.drawer-link-desc {
  font-size: 0.7rem;
  color: var(--copelt-text-muted);
  margin-top: 2px;
}

.mall-drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

/* Responsive Breakpoints for Mall Header */
@media (max-width: 991px) {
  .mall-desktop-nav,
  .mall-desktop-actions,
  .desktop-only-badge {
    display: none !important;
  }

  .mall-mobile-controls,
  .mobile-only-badge {
    display: flex !important;
  }

  .mall-brand-name {
    font-size: 1rem;
    max-width: 220px;
  }

  .mall-brand-subtitle {
    font-size: 0.6rem;
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .mall-navbar-inner {
    height: 64px !important;
    padding: 0 0.85rem !important;
  }

  .mall-brand-name {
    max-width: 160px;
    font-size: 0.95rem;
  }

  .mall-brand-subtitle {
    max-width: 160px;
    font-size: 0.58rem;
  }

  .mall-header-avatar {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .mall-hamburger-toggle {
    width: 38px;
    height: 38px;
  }
}

/* =========================================================================
   IMPECCABLE CARDS SYSTEM REDESIGN
   ========================================================================= */
.store-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.store-card-modern {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.store-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  border-color: rgba(56, 189, 248, 0.4);
}

.store-card-badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.store-card-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pill-local {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.pill-floor {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.pill-status-open {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

@media (max-width: 640px) {
  .store-dir-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}
