/**
 * Siva Autos v2.0.0 Theme & Responsive Stylesheet
 * Cross-platform modern design system for desktop & mobile
 */

:root {
  --v2-primary: #2563eb;
  --v2-primary-hover: #1d4ed8;
  --v2-primary-subtle: #eff6ff;
  --v2-primary-border: #bfdbfe;
  --v2-success: #10b981;
  --v2-success-subtle: #ecfdf5;
  --v2-warning: #f59e0b;
  --v2-warning-subtle: #fffbeb;
  --v2-danger: #ef4444;
  --v2-danger-subtle: #fef2f2;
  --v2-info: #0ea5e9;
  
  --v2-bg: #f8fafc;
  --v2-surface: #ffffff;
  --v2-card-bg: #ffffff;
  --v2-card-border: rgba(15, 23, 42, 0.08);
  --v2-text: #0f172a;
  --v2-text-secondary: #475569;
  --v2-text-muted: #64748b;
  --v2-border: #e2e8f0;
  
  --v2-radius: 12px;
  --v2-radius-sm: 8px;
  --v2-radius-lg: 16px;
  --v2-radius-pill: 9999px;
  
  --v2-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --v2-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --v2-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  --v2-bottom-nav-height: 64px;
}

/* Dark Mode Variables */
[data-bs-theme="dark"],
body[data-bs-theme="dark"],
body.dark-mode {
  --v2-bg: #0f172a;
  --v2-surface: #1e293b;
  --v2-card-bg: #1e293b;
  --v2-card-border: rgba(255, 255, 255, 0.08);
  --v2-text: #f8fafc;
  --v2-text-secondary: #cbd5e1;
  --v2-text-muted: #94a3b8;
  --v2-border: #334155;
  --v2-primary-subtle: rgba(37, 99, 235, 0.18);
  --v2-primary-border: rgba(59, 130, 246, 0.35);
  --v2-success-subtle: rgba(16, 185, 129, 0.18);
  --v2-warning-subtle: rgba(245, 158, 11, 0.18);
  --v2-danger-subtle: rgba(239, 68, 68, 0.18);
}

/* Base Typography & Background */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--v2-text);
  background-color: var(--v2-bg);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TOPBAR & HEADER MODERNIZATION (v2.0.0)
   Overrides Qovex body[data-topbar="colored"] white-on-white conflicts
   ========================================================================== */

#page-topbar {
  background: var(--v2-surface) !important;
  border-bottom: 1px solid var(--v2-border) !important;
  box-shadow: var(--v2-shadow-sm) !important;
  height: 70px;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1002;
  transition: all 0.2s ease;
}

.navbar-header {
  height: 70px;
  padding: 0;
  margin: 0 !important;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Force Hamburger Menu Button Visibility & Appearance */
#vertical-menu-btn,
.navbar-header .toggle-btn,
body[data-layout="detached"] .toggle-btn,
body[data-layout="detached"] #vertical-menu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--v2-radius-sm);
  color: var(--v2-text) !important;
  background: var(--v2-bg) !important;
  border: 1px solid var(--v2-border) !important;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0 !important;
}

#vertical-menu-btn:hover,
#vertical-menu-btn:focus {
  background: var(--v2-primary-subtle) !important;
  color: var(--v2-primary) !important;
  border-color: var(--v2-primary-border) !important;
}

#vertical-menu-btn i {
  color: var(--v2-text) !important;
  font-size: 1.35rem;
  line-height: 1;
}

#vertical-menu-btn:hover i {
  color: var(--v2-primary) !important;
}

/* Brand Box & Version Badge Alignment */
.navbar-brand-box {
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: left !important;
  display: inline-flex !important;
  align-items: center;
}

.navbar-brand-box a.logo {
  display: inline-flex !important;
  align-items: center;
  height: 70px;
  line-height: normal !important;
  text-decoration: none !important;
}

.v2-brand-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--v2-text) !important;
}

.v2-brand-title {
  color: var(--v2-text) !important;
  font-weight: 700;
  display: inline-block !important;
}

.v2-version-pill {
  display: inline-flex !important;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--v2-radius-pill);
  background: var(--v2-primary-subtle) !important;
  color: var(--v2-primary) !important;
  border: 1px solid var(--v2-primary-border) !important;
  line-height: 1.2;
}

/* Header Action Icons & Dropdowns - High Contrast */
#page-topbar .header-item,
body[data-topbar="colored"] #page-topbar .header-item,
body[data-topbar="colored"] #page-topbar .noti-icon i {
  color: var(--v2-text) !important;
}

#page-topbar .header-item:hover,
body[data-topbar="colored"] #page-topbar .header-item:hover {
  color: var(--v2-primary) !important;
}

/* Desktop & Mobile Search Input & Icons */
.app-search {
  padding: 0 !important;
  margin: 0 0 0 10px !important;
}

.app-search .v2-header-search,
body[data-topbar="colored"] .app-search .form-control {
  background-color: var(--v2-bg) !important;
  color: var(--v2-text) !important;
  border: 1px solid var(--v2-border) !important;
  border-radius: 20px !important;
  height: 38px !important;
  padding-left: 36px !important;
  padding-right: 14px !important;
  font-size: 0.85rem;
  box-shadow: none !important;
  width: 200px;
  transition: width 0.2s ease, border-color 0.2s ease;
}

.app-search .v2-header-search:focus,
body[data-topbar="colored"] .app-search .form-control:focus {
  width: 240px;
  border-color: var(--v2-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.app-search .v2-header-search::placeholder,
body[data-topbar="colored"] .app-search input.form-control::-webkit-input-placeholder {
  color: var(--v2-text-muted) !important;
  opacity: 1 !important;
}

.app-search span.v2-search-icon,
.app-search span.bx-search-alt,
body[data-topbar="colored"] .app-search span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--v2-text-muted) !important;
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}

.header-profile-user {
  border: 2px solid var(--v2-border);
}

/* Sidebar Modernization */
.vertical-menu {
  background: var(--v2-surface) !important;
  border-right: 1px solid var(--v2-border);
  box-shadow: none;
}

#sidebar-menu ul li a {
  color: var(--v2-text-secondary);
  border-radius: var(--v2-radius-sm);
  margin: 2px 10px;
  padding: 9px 12px;
  transition: all 0.15s ease-in-out;
  display: flex;
  align-items: center;
  font-weight: 500;
}

#sidebar-menu ul li a i {
  font-size: 1.15rem;
  min-width: 1.5rem;
  color: var(--v2-text-muted);
  transition: color 0.15s ease-in-out;
}

#sidebar-menu ul li a:hover,
#sidebar-menu ul li a.active,
#sidebar-menu ul li.mm-active > a {
  background-color: var(--v2-primary-subtle) !important;
  color: var(--v2-primary) !important;
  font-weight: 600;
}

#sidebar-menu ul li a:hover i,
#sidebar-menu ul li a.active i,
#sidebar-menu ul li.mm-active > a i {
  color: var(--v2-primary) !important;
}

#sidebar-menu .menu-title {
  color: var(--v2-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 20px 6px;
}

/* Cards & Containers */
.card {
  background-color: var(--v2-card-bg);
  border: 1px solid var(--v2-card-border);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-sm);
  margin-bottom: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--v2-shadow);
}

.card-title {
  color: var(--v2-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-title-desc {
  color: var(--v2-text-muted);
}

/* Quick Action Buttons Group */
.addbuttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.addbuttons .buttonsgap {
  padding: 0 !important;
}

.addbuttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--v2-radius-sm);
  font-weight: 500;
  padding: 8px 16px;
  box-shadow: var(--v2-shadow-sm);
}

/* Modern Tab Design */
.nav-tabs {
  border-bottom: 2px solid var(--v2-border);
  gap: 4px;
}

.nav-tabs .nav-link {
  color: var(--v2-text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-weight: 500;
  border-radius: 0;
  background: transparent;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--v2-primary);
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--v2-primary) !important;
  background-color: transparent !important;
  border-bottom: 2px solid var(--v2-primary) !important;
  font-weight: 600;
}

/* Tables & DataTables */
.table {
  color: var(--v2-text);
  vertical-align: middle;
}

.table th {
  color: var(--v2-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: var(--v2-bg);
  border-bottom: 1px solid var(--v2-border);
  padding: 12px 14px;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--v2-border);
}

.table-hover tbody tr:hover {
  background-color: var(--v2-primary-subtle);
}

/* Touch-Friendly Row Action Buttons */
.table td .btn,
.table-edits .btn {
  min-height: 34px;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: var(--v2-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Form Controls */
.form-control,
.form-select {
  background-color: var(--v2-surface);
  color: var(--v2-text);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  padding: 8px 12px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--v2-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background-color: var(--v2-surface);
  color: var(--v2-text);
}

/* Footer Styling */
.footer {
  background-color: var(--v2-surface);
  border-top: 1px solid var(--v2-border);
  color: var(--v2-text-secondary);
  font-size: 0.85rem;
}

/* ==========================================================================
   MOBILE BOTTOM BAR & RESPONSIVE RULES (360px, 390px, 425px, 1440px)
   ========================================================================== */

#v2-mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: var(--v2-surface);
  border-top: 1px solid var(--v2-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 991.98px) {
  html, body {
    scroll-padding-bottom: calc(var(--v2-bottom-nav-height) + env(safe-area-inset-bottom, 16px) + 24px) !important;
  }

  #v2-mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(var(--v2-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  /* Critical: Keep content & save buttons completely clear of the mobile bar */
  .page-content {
    padding-bottom: calc(var(--v2-bottom-nav-height) + env(safe-area-inset-bottom, 16px) + 40px) !important;
  }

  .main-content {
    padding-bottom: calc(var(--v2-bottom-nav-height) + env(safe-area-inset-bottom, 16px) + 40px) !important;
  }

  .footer {
    margin-bottom: calc(var(--v2-bottom-nav-height) + env(safe-area-inset-bottom, 16px)) !important;
  }

  form .text-center {
    padding-bottom: 24px !important;
  }

  /* Mobile Slide-in Sidebar when toggled via Hamburger button */
  body.sidebar-enable .vertical-menu {
    display: block !important;
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 270px;
    z-index: 1045;
    background: var(--v2-surface) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
  }
}

.v2-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  color: var(--v2-text-muted);
  text-decoration: none !important;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.v2-nav-item i {
  font-size: 1.35rem;
  margin-bottom: 2px;
  line-height: 1;
}

.v2-nav-item:hover,
.v2-nav-item:focus,
.v2-nav-item.active {
  color: var(--v2-primary) !important;
}

/* Elevated Quick Add (+) FAB Button */
.v2-nav-fab-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.v2-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--v2-primary);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  border: 3px solid var(--v2-surface);
  transform: translateY(-8px);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.v2-nav-fab:hover,
.v2-nav-fab:focus {
  transform: translateY(-10px) scale(1.05);
  background: var(--v2-primary-hover);
  color: #ffffff !important;
}

.v2-nav-fab i {
  font-size: 1.5rem;
}

/* Bottom Sheet / Offcanvas for Quick Add & More Menu */
.v2-bottom-sheet {
  border-top-left-radius: var(--v2-radius-lg) !important;
  border-top-right-radius: var(--v2-radius-lg) !important;
  background-color: var(--v2-surface) !important;
  color: var(--v2-text);
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-lg);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

.v2-sheet-handle {
  width: 40px;
  height: 4px;
  background-color: var(--v2-border);
  border-radius: 2px;
  margin: 10px auto 14px;
}

.v2-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 16px 20px;
}

.v2-quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--v2-radius);
  background: var(--v2-bg);
  color: var(--v2-text);
  text-decoration: none !important;
  font-weight: 500;
  border: 1px solid var(--v2-border);
  transition: all 0.15s ease;
  min-height: 48px;
}

.v2-quick-action-btn:hover,
.v2-quick-action-btn:focus {
  background: var(--v2-primary-subtle);
  border-color: var(--v2-primary-border);
  color: var(--v2-primary);
  transform: translateY(-1px);
}

.v2-quick-action-btn i {
  font-size: 1.4rem;
  color: var(--v2-primary);
}

/* More Menu Offcanvas List */
.v2-more-list {
  list-style: none;
  padding: 0 16px 16px;
  margin: 0;
}

.v2-more-list li a,
.v2-more-list li button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--v2-radius-sm);
  color: var(--v2-text);
  text-decoration: none !important;
  font-weight: 500;
  background: transparent;
  border: none;
  text-align: left;
  transition: background-color 0.15s ease;
  min-height: 44px;
}

.v2-more-list li a:hover,
.v2-more-list li button:hover,
.v2-more-list li a:focus,
.v2-more-list li button:focus {
  background-color: var(--v2-primary-subtle);
  color: var(--v2-primary);
}

.v2-more-list li a i,
.v2-more-list li button i {
  font-size: 1.25rem;
  color: var(--v2-text-muted);
}

/* About Modal Styling */
.v2-about-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-top-left-radius: var(--v2-radius);
  border-top-right-radius: var(--v2-radius);
  padding: 24px;
}

.v2-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--v2-radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--v2-bg);
  border: 1px solid var(--v2-border);
  color: var(--v2-text-secondary);
  margin: 3px;
}

/* Ultra-compact phone adjustments */
@media (max-width: 480px) {
  .v2-brand-title {
    font-size: 0.95rem !important;
  }
  .v2-version-pill {
    font-size: 0.65rem !important;
    padding: 1px 5px !important;
  }
}

/* =========================================================
   Footer — AscendDigital brand attribution  (v2.0.0)
   ========================================================= */
.v2-footer-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.v2-footer-label {
  color: var(--bs-secondary-color, #6c757d);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.v2-brand-link {
  font-weight: 600;
  color: var(--v2-primary, #2563eb);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, text-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.v2-brand-link i {
  font-size: 1rem;
  vertical-align: middle;
}

.v2-brand-link:hover,
.v2-brand-link:focus {
  color: var(--v2-primary-hover, #1d4ed8);
  text-shadow: 0 0 10px rgba(37, 99, 235, 0.25);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-bs-theme="dark"] .v2-footer-label {
  color: rgba(255,255,255,0.5);
}

[data-bs-theme="dark"] .v2-brand-link {
  color: #60a5fa;
}

[data-bs-theme="dark"] .v2-brand-link:hover {
  color: #93c5fd;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

/* =========================================================
   Siva Autos Brand Pack & Modern Typography (v2.0.0)
   ========================================================= */
.v2-brand-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 6px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.v2-brand-badge:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.v2-brand-icon {
  height: 26px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
  transition: transform 0.25s ease;
}

.v2-brand-badge:hover .v2-brand-icon {
  transform: scale(1.06);
}

.v2-brand-icon-dark {
  display: none !important;
}

[data-bs-theme="dark"] .v2-brand-icon-light {
  display: none !important;
}

[data-bs-theme="dark"] .v2-brand-icon-dark {
  display: inline-block !important;
}

.v2-brand-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #0f172a !important;
  line-height: 1;
  text-transform: uppercase;
}

[data-bs-theme="dark"] .v2-brand-title {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .v2-brand-badge {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .v2-brand-badge:hover {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.4);
}

/* =========================================================
   PWA Custom Install Popup UI (v2.0.0)
   ========================================================= */
.pwa-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: pwaFadeIn 0.25s ease forwards;
}

.pwa-popup-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 1.5rem;
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-bs-theme="dark"] .pwa-popup-card {
  background: #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.pwa-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pwa-popup-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

[data-bs-theme="dark"] .pwa-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.pwa-popup-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1rem;
  padding-right: 28px;
}

.pwa-app-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
  background: #0f172a;
}

.pwa-app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-badge-pulse {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

.pwa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

[data-bs-theme="dark"] .pwa-title {
  color: #f8fafc;
}

.pwa-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

[data-bs-theme="dark"] .pwa-subtitle {
  color: #94a3b8;
}

.pwa-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .pwa-description {
  color: #cbd5e1;
}

.pwa-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 8px;
  border: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .pwa-features-grid {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
}

.pwa-feature-item {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

[data-bs-theme="dark"] .pwa-feature-item {
  color: #94a3b8;
}

.pwa-feature-item i {
  font-size: 1.25rem;
}

.pwa-ios-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .pwa-ios-box {
  background: rgba(30, 58, 138, 0.3);
  border-color: rgba(96, 165, 250, 0.3);
}

.pwa-popup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pwa-btn-dismiss {
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 18px;
  font-size: 0.875rem;
  border-color: #cbd5e1;
  color: #475569;
}

.pwa-btn-dismiss:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-bs-theme="dark"] .pwa-btn-dismiss {
  border-color: rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

[data-bs-theme="dark"] .pwa-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.pwa-btn-install {
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 22px;
  font-size: 0.875rem;
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.pwa-btn-install:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 575.98px) {
  .pwa-popup-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .pwa-popup-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-width: 100%;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
  .v2-brand-title {
    font-size: 0.875rem !important;
  }
  .v2-brand-icon {
    height: 22px;
    max-width: 36px;
  }
}

/* Mobile Brand Header single-line fit */
.v2-brand-badge {
  white-space: nowrap !important;
}

.v2-brand-title {
  white-space: nowrap !important;
}

@media (max-width: 575.98px) {
  .v2-brand-badge {
    padding: 3px 8px 3px 5px !important;
    gap: 6px !important;
  }
  .v2-brand-title {
    font-size: 0.825rem !important;
    white-space: nowrap !important;
  }
  .v2-brand-icon {
    height: 20px !important;
    max-width: 32px !important;
  }
  .v2-version-pill {
    font-size: 0.65rem !important;
    padding: 1px 5px !important;
  }
}
