:root {
  --primary: #0a74da;
  --primary-light: #60a5fa;
  --success: #0d9488;
  --success-bg: #f0fdfa;
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --dark: #0f172a;
  --gray-900: #1e293b;
  --gray-800: #334155;
  --gray-400: #94a3b8;
  --gray-200: #e2e8f0;
  --gray-100: #f3f4f6;
  --white: #ffffff;

  /* Improved Premium Shadows (Tinted with primary color) */
  --shadow-sm: 0 2px 8px rgba(10, 116, 218, 0.04);
  --shadow-md: 0 8px 16px rgba(10, 116, 218, 0.08);
  --shadow-lg: 0 16px 32px rgba(10, 116, 218, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Tajawal", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* لمنع ظهور شريط التمرير بسبب كرات الإضاءة */
  position: relative;
  z-index: 0;
}

/* كرات الإضاءة المحيطية المتحركة خلف الزجاج */
body::before, body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px); /* تمويه عالي جداً لإضاءة ناعمة */
  z-index: -1;
  animation: floatOrbs 18s ease-in-out infinite alternate;
}

body::before {
  width: 55vw; height: 55vw;
  max-width: 600px; max-height: 600px;
  background: rgba(96, 165, 250, 0.4); /* أزرق فاتح مضيء */
  top: -10%; left: -10%;
}

body::after {
  width: 65vw; height: 65vw;
  max-width: 700px; max-height: 700px;
  background: rgba(10, 116, 218, 0.3); /* أزرق أساسي عميق */
  bottom: -10%; right: -10%;
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}

@keyframes floatOrbs {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 12%) scale(1.1); }
  100% { transform: translate(-6%, 6%) scale(0.95); }
}

/* اللوح الزجاجي الفاخر الذي يغطي الشاشة بالكامل */
.presentation-area {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh; /* تغطية الشاشة بالكامل بالزجاج */
  padding: 24px;
  position: relative;
  z-index: 1;
  
  /* تأثير الـ Glassmorphism */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Thin Pro Scrollbar */
::-webkit-scrollbar {
  width: 0px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

.hidden {
  display: none !important;
}
.mb-2 {
  margin-bottom: 12px;
}
.mt-2 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 24px;
}
.text-danger {
  color: var(--danger) !important;
}
.text-muted {
  color: var(--gray-400) !important;
}

/* Clean Phone Device (No weird bezel) */
.phone-device {
  width: 100%;
  max-width: 400px;
  height: 93vh;
  max-height: 850px;
  background-color: var(--white);
  
  /* إطار يشبه الألمنيوم الفاتح */
  border: 3px solid var(--gray-900);
  border-radius: 44px;
  
  /* ظل عميق ملوّن لرفع الهاتف عن الزجاج */
  box-shadow: 
    0 40px 80px -20px rgba(10, 116, 218, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 4px 10px rgba(0, 0, 0, 0.04);
    
  position: relative;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen-content {
  width: 100%;
  height: 100%;
  position: relative;
}

/* --- Animated Premium Gradient --- */
@keyframes premiumGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* App Screens with Animated Gradient */
.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Light Sky Blue Gradient */
  background: linear-gradient(180deg, #daeffd 0%, #ffffff 30%, #ffffff 100%);
  background-size: 300% 300%;
}
.app-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================
   Toasts & Banners (Restoring the strict borders)
   ========================================= */
.toast {
  position: absolute;
  top: 24px;
  left: 5%;
  width: 90%;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  z-index: 900;
  transform: translateY(-150%);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy enter */
  border: 2px solid transparent;
}
.toast.show {
  transform: translateY(0);
}

.toast.success {
  border-color: var(--success);
  background-color: var(--success-bg);
}
.toast.success .toast-icon {
  color: var(--success);
}
.toast.danger {
  border-color: var(--danger);
  background-color: var(--danger-bg);
}
.toast.danger .toast-icon {
  color: var(--danger);
}
.toast.warning {
  border-color: var(--warning);
  background-color: var(--warning-bg);
}
.toast.warning .toast-icon {
  color: var(--warning);
}
.toast.urgent {
  border-color: #ea580c;
  background-color: #fff7ed;
}
.toast.urgent .toast-icon {
  color: #ea580c;
}
.toast.info {
  border-color: var(--primary);
  background-color: #eff6ff;
}
.toast.info .toast-icon {
  color: var(--primary);
}

.toast-icon {
  font-size: 22px;
}
.toast-message {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
}

/* Banners */
#consultation-alert-banner,
#watch-alert-banner {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease;
}
#consultation-alert-banner:hover,
#watch-alert-banner:hover {
  transform: scale(1.02);
}

#consultation-alert-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #ea580c;
  color: #c2410c;
  box-shadow: 0 8px 16px -4px rgba(234, 88, 12, 0.2);
  animation: urgentPulse 2s infinite;
}
#watch-alert-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 2px solid #e11d48;
  box-shadow: 0 8px 16px -4px rgba(225, 29, 72, 0.2);
  animation: dangerPulse 1.5s infinite;
}

#resolve-watch-alert-btn,
#resolve-consultation-btn,
#call-patient-btn {
  height: 38px;
  width: 38px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#resolve-watch-alert-btn {
  background: var(--success);
  color: white;
}
#resolve-consultation-btn {
  background: #ea580c;
  color: white;
}
#call-patient-btn {
  background: #2563eb;
  color: white;
}

#resolve-watch-alert-btn:hover,
#resolve-consultation-btn:hover,
#call-patient-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}
#resolve-watch-alert-btn:active,
#resolve-consultation-btn:active,
#call-patient-btn:active {
  transform: scale(0.9);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 800;
}
.banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* =========================================
   Premium Buttons & Inputs (Smaller & Sleeker)
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px; /* Was 56px */
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}
.btn:active {
  transform: scale(0.96) translateY(0);
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(10, 116, 218, 0.2);
}
.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}
.btn-secondary {
  background: var(--white);
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-icon {
  width: 40px;
  height: 40px; /* Was 44px */
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: all 0.2s;
}
.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
}

/* Login Screen */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  background: transparent;
}
.logo {
  text-align: center;
  margin-bottom: 40px;
}
.logo-icon {
  width: 76px;
  height: 76px;
  background: rgba(10, 116, 218, 0.1);
  color: var(--primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  transition: transform 0.3s;
}

.logo-icon img {
  width: 90px;
  height: 90px;
}

.logo-icon:hover {
  transform: scale(1.05) rotate(5deg);
}
.logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}
.input-group .icon-right {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}
.input-group input {
  width: 100%;
  height: 48px; /* Was 56px */
  padding: 0 44px 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  font-size: 14px;
  background: var(--white);
  color: var(--gray-900);
  transition: all 0.3s ease;
}
.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 116, 218, 0.15);
}

.demo-hints {
  margin-top: 32px;
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 600;
}
.hint-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}
.hint-tags span {
  background: var(--white);
  padding: 8px 20px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  color: var(--gray-800);
  transition: all 0.2s;
}
.hint-tags span:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Headers & Layout */
.app-header {
  padding: 24px 24px 16px;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.app-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
  background: rgba(13, 148, 136, 0.1);
  /* color: var(--success); */
}

/* Disconnected State */
.status-badge.disconnected {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

/* Connected State */
.status-badge.success {
    background-color: var(--success);
    color: white;
}


.screen-body {
  padding: 0 24px 40px;
  flex-grow: 1;
}
.bottom-fixed {
  padding: 16px 24px 24px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.section-title h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  margin-top: 12px;
}

/* New Patient Inputs */
.simple-input {
  width: 100%;
  height: 44px; /* Was 48px */
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  background: var(--gray-100);
  color: var(--gray-900);
  transition: all 0.2s;
}
.simple-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}

/* =========================================
   Dashboard Cards & Meds (Subtle Gradients)
   ========================================= */

/* List Items Hover & Shadow Improvements */
.patient-list-item {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s;
  box-shadow: var(--shadow-sm);
}
.patient-list-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.patient-list-item:active {
  transform: scale(0.97);
}

.patient-list-item .p-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(10, 116, 218, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.patient-list-item .p-info {
  flex-grow: 1;
  min-width: 0;
}
.patient-list-item h4 {
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 6px;
  font-weight: 800;
}
.patient-list-item p {
  font-size: 13px;
  color: var(--gray-400);
}
.p-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.patient-list-item .p-arrow {
  color: var(--gray-400);
  font-size: 14px;
}

.patient-list-item.danger-pulse-border {
  border: 2px solid var(--danger) !important;
  background: linear-gradient(
    to left,
    rgba(225, 29, 72, 0.08),
    var(--white)
  ) !important;
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
  /* Bug fix for hidden list */
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Glass Panel Details */
.glass-panel {
  background: var(--white);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
  transition: box-shadow 0.3s;
}
.glass-panel:hover {
  box-shadow: var(--shadow-md);
}

.patient-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.patient-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(10, 116, 218, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.patient-info h3 {
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--gray-900);
  font-weight: 800;
}
.patient-id {
  margin-right: auto;
  font-size: 13px;
  color: var(--gray-400);
  font-family: monospace;
  font-weight: 700;
}
.patient-details {
  display: flex;
  gap: 14px;
  border-top: 1px dashed var(--gray-200);
  padding-top: 14px;
  font-size: 13px;
  color: var(--gray-800);
  align-items: center;
  font-weight: 700;
}

/* Medication List (With Gradients) */
.med-item {
  background: var(--white);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.med-item:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}

.med-item.taken {
  border-right: 6px solid var(--success);
  background: linear-gradient(to left, rgba(13, 148, 136, 0.05), var(--white));
}
.med-item.missed {
  border-right: 6px solid var(--danger);
  background: linear-gradient(to left, rgba(225, 29, 72, 0.05), var(--white));
}

.med-info h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--gray-900);
  font-weight: 800;
}
.med-time {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  justify-content: flex-end;
  font-weight: 700;
}
.med-actions {
  display: flex;
  gap: 10px;
}

/* Badges */
.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
}
.badge-warning {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}
.badge-urgent {
  background: var(--danger);
  color: white;
  animation: dangerPulse 1.5s infinite;
}

.btn-reminder {
  background: rgba(10, 116, 218, 0.1);
  color: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-reminder:hover {
  background: rgba(10, 116, 218, 0.15);
  transform: translateY(-2px);
}
.btn-reminder:active {
  transform: scale(0.95);
}

.btn-sm {
  width: 42px;
  height: 42px; /* Was 48px */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-sm.success-outline {
  background: rgba(13, 148, 136, 0.1);
  color: var(--success);
}
.btn-sm.success-outline:hover {
  background: var(--success);
  color: white;
  transform: scale(1.05) translateY(-2px);
}
.btn-sm.danger-outline {
  background: rgba(225, 29, 72, 0.1);
  color: var(--danger);
}
.btn-sm.danger-outline:hover {
  background: var(--danger);
  color: white;
  transform: scale(1.05) translateY(-2px);
}
.btn-sm:active {
  transform: scale(0.9) translateY(0);
}

/* =========================================
   Watch Simulator Fixes (No weird containers)
   ========================================= */
/* =========================================
   Watch Simulator (Ultra-Premium OLED Design)
   ========================================= */
.watch-device { 
  display: flex; flex-direction: column; align-items: center; justify-content: center; 
  animation: watchEnter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; 
}

.watch-bezel {
  width: 330px; height: 400px; 
  background: #000000;
  border-radius: 60px; 
  border: 14px solid #1a1a1c; /* مظهر التيتانيوم الداكن */
  position: relative; overflow: hidden;
  box-shadow: 
    0 40px 80px -15px rgba(0, 0, 0, 0.7),
    inset 0 0 25px rgba(255, 255, 255, 0.05),
    0 0 0 2px rgba(255, 255, 255, 0.08); /* إطار خارجي لامع خفيف */
}

/* انعكاس زجاجي (Screen Glare) لمحاكاة الشاشة الحقيقية */
.watch-bezel::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none; z-index: 10;
}

.watch-screen {
  width: 100%; height: 100%; 
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; color: white; text-align: center;
  position: relative; z-index: 5;
}

.watch-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.watch-view.hidden { display: none !important; opacity: 0; transform: scale(0.9); }

/* OLED Typography (توهج النصوص) */
.watch-time { 
  font-size: 55px; font-weight: 900; color: #ffffff; 
  margin-bottom: 4px; font-family: monospace; letter-spacing: -3px; 
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.35); /* توهج شاشة OLED */
}

.watch-bpm { 
  font-size: 22px; font-weight: 800; color: #a1a1aa; 
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px;
}

/* Animated Glowing Icons (توهج الأيقونات المتحركة) */
.heartbeat-icon {
  font-size: 32px; display: inline-block; margin-bottom: 16px;
  animation: heartbeatPulse 1.2s infinite;
  filter: drop-shadow(0 0 16px rgba(225, 29, 72, 0.7)); /* توهج نيون أحمر */
}

.fa-satellite-dish.heartbeat-icon {
  filter: drop-shadow(0 0 16px rgba(10, 116, 218, 0.7)); /* توهج نيون أزرق */
  animation: scanPulse 1.5s infinite;
}

.watch-alert-text { 
  font-size: 19px; font-weight: 800; color: white; margin-bottom: 24px; line-height: 1.4; 
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Premium Watch Buttons (أزرار الساعة الفاخرة) */
.watch-btn {
  cursor: pointer !important; 
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 800; font-size: 17px; color: white; border: none;
}
.watch-btn.wide { width: 100%; border-radius: 20px; height: 54px; }

.watch-btn.btn-danger { 
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%); 
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.watch-btn.btn-success { 
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important; 
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.watch-btn:hover { filter: brightness(1.2); transform: scale(1.05) translateY(-2px); }
.watch-btn:active { transform: scale(0.95); }

/* زر التجاوز/الإلغاء (شفافية زجاجية أنيقة) */
#watch-dismiss-anomaly-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
}
#watch-dismiss-anomaly-btn:hover { background: rgba(255, 255, 255, 0.2) !important; color: white; }

/* زر المحاكاة (مخفي بذكاء) */
.watch-demo-btn {
  background: rgba(255, 255, 255, 0.05); color: #a1a1aa; 
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px; border-radius: 24px; font-size: 13px; font-weight: 800; 
  cursor: pointer; transition: all 0.3s; margin-top: auto;
  backdrop-filter: blur(5px);
}
.watch-demo-btn:hover { background: rgba(255, 255, 255, 0.15); color: white; border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }

/* =========================================
   Watch Specific Animations
   ========================================= */
@keyframes watchEnter {
  0% { opacity: 0; transform: scale(0.85) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes heartbeatPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.5)); }
  15% { transform: scale(1.15); filter: drop-shadow(0 0 25px rgba(225, 29, 72, 0.9)); }
  30% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.5)); }
  45% { transform: scale(1.15); filter: drop-shadow(0 0 25px rgba(225, 29, 72, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.5)); }
}

@keyframes scanPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 25px rgba(10, 116, 218, 0.9)); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* =========================================
   Animations & Stepper
   ========================================= */
.stepper-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px 24px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--gray-200);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  transition: all 0.3s;
  width: 60px;
  font-weight: 700;
  font-size: 13px;
}
.step.active {
  color: var(--primary);
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  transition: all 0.3s;
}
.step.active .step-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(10, 116, 218, 0.15);
  transform: scale(1.1);
}
.step-line {
  flex-grow: 1;
  height: 3px;
  background: var(--gray-200);
  margin: 15px 8px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
.step-line.active {
  background: var(--primary);
}

.fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dangerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(225, 29, 72, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
  }
}

@keyframes urgentPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(234, 88, 12, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.15);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.device:not(.hidden) {
  animation: smoothEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes smoothEnter {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
