/* ========================================================
   APPLIANCE CRM - MOBILE APP & PLAY STORE EDITION
   New Modern Color Theme: Royal Sapphire & Electric Indigo
   Google AdMob Placements & Android Phone Simulator Frame
   ======================================================== */

:root {
  --crm-primary: #2563eb;
  --crm-primary-dark: #1d4ed8;
  --crm-primary-light: #eff6ff;
  --crm-primary-glow: rgba(37, 99, 235, 0.22);
  --crm-secondary: #4f46e5;
  --crm-accent-cyan: #0ea5e9;
  --crm-bg: #f8fafc;
  --crm-card: #ffffff;
  --crm-border: #e2e8f0;
  --crm-sidebar: #0f172a;
  --crm-sidebar-hover: #1e293b;
  --crm-text-main: #0f172a;
  --crm-text-muted: #64748b;
  --crm-success: #10b981;
  --crm-warning: #f59e0b;
  --crm-danger: #ef4444;

  /* Overriding old ehs variables */
  --ehs-black: #0f172a;
  --ehs-zinc-900: #1e293b;
  --ehs-border-crisp: #e2e8f0;
}

/* 1. BASE & MODERN APP FONT SMOOTHING */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100vw !important;
  background-color: var(--crm-bg) !important;
  color: var(--crm-text-main) !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  -webkit-text-size-adjust: 100% !important;
  overflow-x: hidden !important;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* 2. THEME COLOR OVERRIDES & HIGH-CONTRAST ACCESSIBILITY */
.btn-primary {
  background: var(--crm-primary) !important;
  border-color: var(--crm-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px var(--crm-primary-glow);
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.15s ease-in-out;
}
.btn-primary *, .btn-primary i, .btn-primary span {
  color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--crm-primary-dark) !important;
  border-color: var(--crm-primary-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--crm-primary-glow);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--crm-primary) !important;
  border-color: var(--crm-primary) !important;
  background: transparent !important;
  font-weight: 600;
  border-radius: 8px;
}
.btn-outline-primary *, .btn-outline-primary i, .btn-outline-primary span {
  color: var(--crm-primary) !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: var(--crm-primary) !important;
  color: #ffffff !important;
}
.btn-outline-primary:hover *, .btn-outline-primary:hover i, .btn-outline-primary:hover span {
  color: #ffffff !important;
}

/* Success Button & Outline */
.btn.btn-success, .btn-success {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  font-weight: 600;
}
.btn.btn-success *, .btn.btn-success i, .btn.btn-success span {
  color: #ffffff !important;
}
.btn.btn-success:hover, .btn.btn-success:focus {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

.btn.btn-outline-success, .btn-outline-success {
  background: #f0fdf4 !important;
  border: 1.5px solid #86efac !important;
  color: #15803d !important;
  font-weight: 600;
}
.btn.btn-outline-success *, .btn.btn-outline-success i, .btn.btn-outline-success span {
  color: #15803d !important;
}
.btn.btn-outline-success:hover, .btn.btn-outline-success:focus {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}
.btn.btn-outline-success:hover *, .btn.btn-outline-success:hover i, .btn.btn-outline-success:hover span {
  color: #ffffff !important;
}

/* Warning Button & Outline */
.btn.btn-warning, .btn-warning {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #0f172a !important;
  font-weight: 700;
}
.btn.btn-warning *, .btn.btn-warning i, .btn.btn-warning span {
  color: #0f172a !important;
}
.btn.btn-warning:hover, .btn.btn-warning:focus {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #0f172a !important;
}

/* Danger Button & Outline */
.btn.btn-danger, .btn-danger {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  font-weight: 600;
}
.btn.btn-danger *, .btn.btn-danger i, .btn.btn-danger span {
  color: #ffffff !important;
}
.btn.btn-danger:hover, .btn.btn-danger:focus {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

/* Info Button */
.btn.btn-info, .btn-info {
  background: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #ffffff !important;
  font-weight: 600;
}
.btn.btn-info *, .btn.btn-info i, .btn.btn-info span {
  color: #ffffff !important;
}

/* Light Button */
.btn.btn-light, .btn-light {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
}
.btn.btn-light:hover, .btn.btn-light:focus {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Secondary & Outline Secondary */
.btn.btn-secondary, .btn-secondary {
  background: #475569 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}
.btn.btn-outline-secondary, .btn-outline-secondary {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600;
}
.btn.btn-outline-secondary *, .btn.btn-outline-secondary i, .btn.btn-outline-secondary span {
  color: #334155 !important;
}
.btn.btn-outline-secondary:hover, .btn.btn-outline-secondary:focus {
  background: #334155 !important;
  border-color: #334155 !important;
  color: #ffffff !important;
}
.btn.btn-outline-secondary:hover *, .btn.btn-outline-secondary:hover i, .btn.btn-outline-secondary:hover span {
  color: #ffffff !important;
}

/* High Contrast Subtle Badge Classes (Fixes Invisible Status Text) */
.bg-success-subtle {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}
.text-success {
  color: #16a34a !important;
}
.border-success-subtle {
  border-color: #86efac !important;
}

.bg-warning-subtle {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fcd34d !important;
}
.text-warning {
  color: #d97706 !important;
}
.border-warning-subtle {
  border-color: #fcd34d !important;
}

.bg-info-subtle {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
}
.text-info {
  color: #0284c7 !important;
}
.border-info-subtle {
  border-color: #7dd3fc !important;
}

.bg-danger-subtle {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}
.text-danger {
  color: #dc2626 !important;
}
.border-danger-subtle {
  border-color: #fca5a5 !important;
}

.bg-primary-subtle {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}
.border-primary-subtle {
  border-color: #bfdbfe !important;
}

/* Standard Badges High Contrast */
.badge.bg-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
}
.badge.bg-warning {
  background-color: #f59e0b !important;
  color: #0f172a !important;
}
.badge.bg-danger {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}
.badge.bg-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
}
.badge.bg-info {
  background-color: #0ea5e9 !important;
  color: #ffffff !important;
}

/* General Light Badges */
.badge.text-bg-light,
.badge.bg-light {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}
.badge.text-bg-light *,
.badge.bg-light * {
  color: #1e293b !important;
}

/* Form Controls & Inputs Contrast */
.form-control,
.form-select,
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="email"],
input[type="number"],
select,
textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
  outline: none !important;
}

.input-group-text {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1.5px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

.form-label {
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* Background Opacity & Translucent Glass Utilities */
.bg-white.bg-opacity-10 { background-color: rgba(255, 255, 255, 0.1) !important; }
.bg-white.bg-opacity-15 { background-color: rgba(255, 255, 255, 0.15) !important; }
.bg-white.bg-opacity-20 { background-color: rgba(255, 255, 255, 0.2) !important; }
.bg-white.bg-opacity-25 { background-color: rgba(255, 255, 255, 0.25) !important; }
.bg-primary.bg-opacity-10 { background-color: rgba(37, 99, 235, 0.1) !important; }
.bg-warning.bg-opacity-10 { background-color: rgba(245, 158, 11, 0.1) !important; }
.bg-success.bg-opacity-10 { background-color: rgba(16, 185, 129, 0.1) !important; }
.bg-danger.bg-opacity-10 { background-color: rgba(239, 68, 68, 0.1) !important; }

/* High Contrast Section Boxes */
.bg-light,
.bg-light-subtle {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}
.bg-light .text-dark,
.bg-light strong,
.bg-light b {
  color: #0f172a !important;
}
.bg-light .text-secondary,
.bg-light .text-muted {
  color: #475569 !important;
}

.text-primary {
  color: var(--crm-primary) !important;
}

.bg-primary {
  background-color: var(--crm-primary) !important;
}

.text-dark {
  color: #0f172a !important;
}

.text-secondary {
  color: #64748b !important;
}

.text-muted {
  color: #64748b !important;
}

/* 3. SIDEBAR - SLEEK MODERN DEEP NAVY */
.ehs-sidebar {
  background-color: var(--crm-sidebar) !important;
  border-right: 1px solid #1e293b !important;
  color: #f1f5f9 !important;
}

.ehs-sidebar .ehs-brand {
  border-bottom: 1px solid #1e293b !important;
  background: rgba(15, 23, 42, 0.8) !important;
}

.ehs-sidebar .brand-badge {
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
}

.ehs-sidebar .nav-heading {
  color: #94a3b8 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ehs-sidebar .nav-link {
  color: #cbd5e1 !important;
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: 10px;
  margin: 2px 10px;
  padding: 0.55rem 0.85rem;
  transition: all 0.15s ease;
}

.ehs-sidebar .nav-link i {
  color: #94a3b8 !important;
  font-size: 1.1rem;
  transition: color 0.15s ease;
}

.ehs-sidebar .nav-link:hover {
  background-color: var(--crm-sidebar-hover) !important;
  color: #ffffff !important;
}

.ehs-sidebar .nav-link:hover i {
  color: #60a5fa !important;
}

.ehs-sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.28) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
  color: #ffffff !important;
  border-left: 3.5px solid #3b82f6 !important;
  font-weight: 700;
}

.ehs-sidebar .nav-link.active i {
  color: #60a5fa !important;
}

.ehs-sidebar-footer {
  border-top: 1px solid #1e293b !important;
  background: #090e1a !important;
}

/* 4. TOPBAR & APP HEADER */
.ehs-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--crm-border) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ehs-page-title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  color: #0f172a !important;
}

/* 5. CARDS - MODERN APP ELEVATION */
.card {
  border-radius: 14px !important;
  border: 1px solid var(--crm-border) !important;
  background-color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-header {
  border-bottom: 1px solid var(--crm-border) !important;
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
  font-weight: 700;
}

/* Stat Cards */
.ehs-stat-card {
  border-radius: 14px !important;
  border: 1px solid var(--crm-border) !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.15s ease;
}

.ehs-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08) !important;
}

/* 6. MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-top: 1px solid var(--crm-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1040;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 12px;
}

.mobile-bottom-nav .nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item.active {
  color: var(--crm-primary) !important;
}

.mobile-bottom-nav .nav-item.active i {
  transform: scale(1.15);
  color: var(--crm-primary);
}

.mobile-bottom-nav .nav-item .badge-pill {
  position: absolute;
  top: 3px;
  right: 14px;
  background: var(--crm-danger);
  color: white;
  border-radius: 999px;
  font-size: 0.56rem;
  padding: 1px 4px;
  font-weight: 700;
}

/* Mobile Floating Action Button */
.mobile-fab {
  position: fixed;
  bottom: 128px; /* Room for Bottom Nav + Sticky Banner Ad */
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  z-index: 1039;
  text-decoration: none;
  transition: transform 0.2s;
}

.mobile-fab:hover, .mobile-fab:active {
  transform: scale(1.08);
  color: white;
}

@media (min-width: 992px) {
  body:not(.phone-mockup-active) .mobile-bottom-nav,
  body:not(.phone-mockup-active) .mobile-fab {
    display: none !important;
  }
}

/* ========================================================
   7. GOOGLE ADMOB PLACEHOLDER AD STYLES
   ======================================================== */

.admob-placeholder {
  transition: opacity 0.2s ease, max-height 0.2s ease;
}

/* Hidden State when Ads are Toggled Off */
body.admob-hidden .admob-placeholder {
  display: none !important;
}

/* Ad Badge Pill */
.admob-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.admob-choices-icon {
  color: #94a3b8;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s ease;
}

.admob-choices-icon:hover {
  color: var(--crm-primary);
}

/* --- FORMAT 1: ADMOB ADAPTIVE SMART BANNER (BOTTOM/STICKY) --- */
.admob-banner-wrap {
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 12px;
  position: relative;
  z-index: 1030;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

/* Mobile Sticky Banner directly above Bottom Nav */
@media (max-width: 991.98px) {
  .admob-banner-sticky-bottom {
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    z-index: 1035;
  }
  body:has(.admob-banner-sticky-bottom) {
    padding-bottom: 130px !important;
  }
}

.admob-banner-container {
  max-width: 780px;
  margin: 0 auto;
}

.admob-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.admob-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admob-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--crm-primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.admob-text-box {
  flex-grow: 1;
  min-width: 0;
}

.admob-title {
  font-weight: 700;
  font-size: 0.8rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admob-desc {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admob-cta-btn {
  background: var(--crm-primary);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admob-test-badge {
  font-size: 0.58rem;
  color: #94a3b8;
  font-family: monospace;
  margin-top: 3px;
  text-align: center;
}

/* --- FORMAT 2: ADMOB NATIVE ADVANCED IN-FEED AD --- */
.admob-native-card {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.admob-native-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--crm-primary);
}

.admob-native-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admob-native-sponsor {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.admob-native-app-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.admob-native-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.admob-native-text {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.35;
}

.admob-native-cta {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 14px;
  border-radius: 8px;
}

.admob-native-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

/* --- FORMAT 3: ADMOB MEDIUM RECTANGLE (MREC 300x250) --- */
.admob-mrec-card {
  max-width: 320px;
  margin: 0 auto;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.admob-mrec-header {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admob-mrec-banner-art {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0ea5e9 100%);
  color: white;
  padding: 22px 18px;
  overflow: hidden;
}

.admob-mrec-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 5rem;
  opacity: 0.15;
}

.admob-mrec-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.admob-mrec-banner-art h5 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.25;
}

.admob-mrec-banner-art p {
  font-size: 0.72rem;
  opacity: 0.9;
  margin-bottom: 0;
}

.admob-mrec-footer {
  background: #f8fafc;
  padding: 6px 12px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

/* --- FORMAT 4: ADMOB FULL-SCREEN INTERSTITIAL SIMULATOR OVERLAY --- */
.admob-interstitial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admob-interstitial-modal {
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border-radius: 20px;
  border: 1px solid #334155;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admob-interstitial-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  background: #090e1a;
}

.admob-countdown-badge {
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #334155;
}

.admob-close-btn {
  background: #334155;
  color: #94a3b8;
  border: none;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 3px 8px;
  opacity: 0.5;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.admob-close-btn.btn-skip-ready {
  background: #ef4444 !important;
  color: white !important;
  opacity: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.admob-interstitial-stage {
  padding: 24px 18px;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  text-align: center;
}

.admob-video-sim-art {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.admob-play-icon {
  font-size: 2.4rem;
  color: white;
}

.admob-pulse-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.admob-interstitial-footer {
  padding: 16px;
  background: #090e1a;
  border-top: 1px solid #1e293b;
}

.admob-app-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.admob-install-btn {
  background: #10b981 !important;
  border-color: #10b981 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Toast Notification for Ad Interactions */
.app-sim-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid #334155;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sim-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================
   8. ANDROID SMARTPHONE MOCKUP FRAME (DESKTOP APP PREVIEW)
   ======================================================== */

body.phone-mockup-active {
  background: #0b1120 !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 0 30px !important;
  min-height: 100vh;
  overflow-x: hidden !important;
}

/* Hide desktop sidebar in mockup mode */
body.phone-mockup-active .ehs-sidebar {
  display: none !important;
}

/* Constrain CRM content inside authentic phone shell */
body.phone-mockup-active .ehs-content {
  margin-left: 0 !important;
  width: 420px !important;
  max-width: min(420px, calc(100vw - 16px)) !important;
  height: min(870px, calc(100vh - 36px)) !important;
  border-radius: 36px !important;
  border: 10px solid #1e293b !important;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.7), 0 0 0 2px #334155 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #f8fafc !important;
  position: relative;
  scrollbar-width: thin;
}

/* On mobile screens, disable artificial borders so it fills screen naturally */
@media (max-width: 575.98px) {
  body.phone-mockup-active {
    padding: 0 !important;
    background: #f8fafc !important;
  }
  body.phone-mockup-active .ehs-content {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Android Phone Camera Punch Hole */
body.phone-mockup-active .ehs-content::before {
  content: '';
  position: sticky;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #090e1a;
  border-radius: 50%;
  z-index: 1060;
  display: block;
  box-shadow: inset 0 0 2px #38bdf8;
  margin-bottom: -14px;
}

/* Show Mobile Bottom Nav inside mockup mode on desktop */
body.phone-mockup-active .mobile-bottom-nav {
  display: flex !important;
  position: sticky !important;
  bottom: 0 !important;
  width: 100% !important;
}

body.phone-mockup-active .mobile-fab {
  display: flex !important;
  position: sticky !important;
  float: right;
  bottom: 74px !important;
  right: 14px !important;
}

/* ========================================================
   9. CUSTOMER MOBILE APP (கஸ்டமர் ஆப் - CUSTOMER-FACING VIEW)
   ======================================================== */

.customer-app-body {
  background-color: #0b1120 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden !important;
}

/* Mobile Screens: 100% Full-Screen Fluid Responsive PWA / App */
@media (max-width: 575.98px) {
  .customer-app-body {
    background-color: #f8fafc !important;
  }
  .customer-mobile-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100vh !important;
    padding-bottom: 0 !important;
  }
  .customer-app-main {
    padding-bottom: 140px !important;
  }
  .customer-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    z-index: 1040 !important;
  }
  .customer-admob-sticky {
    position: fixed !important;
    bottom: 60px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    z-index: 1035 !important;
  }
}

/* Desktop Screens: Centered Android Smartphone Mockup */
@media (min-width: 576px) {
  .customer-mobile-container {
    width: 420px !important;
    max-width: min(420px, calc(100vw - 20px)) !important;
    margin: 18px auto !important;
    border-radius: 36px !important;
    border: 10px solid #1e293b !important;
    height: min(880px, calc(100vh - 36px)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 2px #334155 !important;
    scrollbar-width: thin;
    position: relative;
    background: #f8fafc;
  }

  .customer-mobile-container::before {
    content: '';
    position: sticky;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #090e1a;
    border-radius: 50%;
    z-index: 1060;
    display: block;
    box-shadow: inset 0 0 2px #38bdf8;
    margin-bottom: -12px;
  }

  .customer-app-main {
    padding-bottom: 20px !important;
  }

  .customer-bottom-nav {
    position: sticky !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 1040 !important;
  }

  .customer-admob-sticky {
    position: sticky !important;
    bottom: 60px !important;
    width: 100% !important;
    z-index: 1035 !important;
  }
}

.customer-mobile-container {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
}

.customer-app-header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.customer-app-main {
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 0.85rem !important;
}

/* Customer Welcome Card & Button Visibility */
.customer-welcome-card {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%) !important;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
  box-sizing: border-box;
  width: 100%;
  color: #ffffff !important;
}

.customer-welcome-card .btn-light {
  background: #ffffff !important;
  color: #1d4ed8 !important;
  border: 1px solid #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.customer-welcome-card .btn-light * {
  color: #1d4ed8 !important;
}

.customer-welcome-card .btn-light:hover,
.customer-welcome-card .btn-light:active {
  background: #eff6ff !important;
  color: #1e40af !important;
}

.customer-welcome-card .btn-light:hover *,
.customer-welcome-card .btn-light:active * {
  color: #1e40af !important;
}

/* Service Tiles Visibility & Hover Contrast */
.service-app-tile {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.15s ease-in-out;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

.service-app-tile .service-app-icon-wrap {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.service-app-tile .fw-bold {
  color: #0f172a !important;
}

.service-app-tile small,
.service-app-tile .text-secondary {
  color: #64748b !important;
}

.service-app-tile:hover, .service-app-tile:active {
  transform: translateY(-2px);
  background-color: #f8fafc !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
  border-color: #93c5fd !important;
}

.service-app-tile:hover .fw-bold,
.service-app-tile:active .fw-bold {
  color: #2563eb !important;
}

.service-app-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Brand Pills in Customer App */
.customer-app-main a.badge,
.customer-app-main .badge.text-bg-light {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.customer-app-main a.badge:hover,
.customer-app-main a.badge:active {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #2563eb !important;
}

.customer-admob-sticky {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.customer-bottom-nav {
  height: 60px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.05);
}

.customer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 6px;
  position: relative;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.customer-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.customer-nav-item.active {
  color: #2563eb !important;
}

.customer-nav-item.active i {
  color: #2563eb !important;
}

/* Floating App Controls Bar for Desktop Viewers */
.app-mode-floating-bar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 1055;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--crm-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* 9. MOBILE TOUCH CARDS & RESPONSIVE REFINEMENT */
@media (max-width: 991.98px) {
  .ehs-main {
    padding: 0.85rem 0.75rem !important;
  }
}

/* 10. WARRANTY BADGES & ALERT EFFECTS */
.badge-warranty-active {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 600;
}

.badge-warranty-warning {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 700;
  animation: pulse-amber 2s infinite ease-in-out;
}

.badge-warranty-expired {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 600;
}

@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.warranty-alert-card {
  border-left: 4px solid var(--crm-warning) !important;
  background: #fffdf5;
}

/* Print Invoice styles */
@media print {
  .ehs-sidebar, .ehs-topbar, .mobile-bottom-nav, .mobile-fab, .btn-print, .btn-back, footer, .no-print, .admob-placeholder, .app-mode-floating-bar {
    display: none !important;
  }
  .ehs-content, .ehs-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
  }
  .invoice-card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* ========================================================
   11. CUSTOMER APP BOOKING PAGE (APP-NATIVE INTERACTIVE UI)
   ======================================================== */

.booking-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  margin-right: 6px;
  flex-shrink: 0;
}

.booking-cat-tile {
  cursor: pointer;
  border-radius: 14px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.booking-cat-tile:hover {
  transform: translateY(-2px);
  border-color: #93c5fd !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
}

.booking-cat-tile.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25), 0 6px 16px rgba(37, 99, 235, 0.18) !important;
}

.booking-cat-tile.active .booking-cat-check {
  display: flex !important;
}

.booking-cat-check {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.booking-brand-chip {
  cursor: pointer;
  border-radius: 999px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 6px 14px !important;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.booking-brand-chip:hover {
  border-color: #93c5fd !important;
  background: #f8fafc !important;
}

.booking-brand-chip.active {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
}

.booking-problem-chip {
  cursor: pointer;
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  transition: all 0.15s ease;
  user-select: none;
}

.booking-problem-chip:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.booking-problem-chip.active {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #3b82f6 !important;
}

.booking-slot-card {
  cursor: pointer;
  border-radius: 12px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  padding: 10px 8px !important;
  text-align: center;
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.booking-slot-card:hover {
  border-color: #93c5fd !important;
  background: #f8fafc !important;
}

.booking-slot-card.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

.booking-slot-card.active .fw-bold {
  color: #2563eb !important;
}

.booking-guarantee-card {
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #bbf7d0;
  padding: 12px;
}
