/* ============ CSS Variables ============ */
:root {
  --ios-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ios-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ios-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --color-success: #56d9ff;
  --color-warning: #8adfff;
  --color-danger: #2cbcff;
  --color-info: #4f8dff;

  /* ثيم مستخرج من الشعار */
  --color-primary-red: #2cbcff;
  --color-primary-green: #56d9ff;
  --color-gradient-start: #030b16;
  --color-gradient-mid: #071426;
  --color-gradient-end: #103b76;
  --color-panel-start: rgba(7, 20, 38, 0.88);
  --color-panel-end: rgba(15, 51, 108, 0.74);
  --color-glow: rgba(86, 217, 255, 0.35);
  --color-accent-deep: #174fbf;

  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-blur: 40px;
}

/* ============ Base Styles ============ */
* {
  font-family:
    "Cairo",
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  background: linear-gradient(145deg, #020913 0%, #071426 45%, #103b76 100%);
}

body {
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(74, 206, 255, 0.12) 0%,
      transparent 24%
    ),
    linear-gradient(145deg, #020913 0%, #071426 48%, #103b76 100%);
  height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ============ iOS Scrollbar ============ */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
}

/* ============ Glassmorphism - Glossy خفيف ============ */
.glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.glass-dark {
  background: linear-gradient(
    135deg,
    rgba(4, 12, 24, 0.92) 0%,
    rgba(8, 28, 56, 0.9) 100%
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: linear-gradient(
    145deg,
    rgba(7, 20, 38, 0.88) 0%,
    rgba(15, 51, 108, 0.76) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(76, 208, 255, 0.04),
    0 18px 40px rgba(0, 11, 24, 0.28);
}

/* ============ iOS Spring Animations ============ */
@keyframes ios-slide-up {
  from {
    transform: translateY(50%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes ios-scale-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ios-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ios-bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
}

@keyframes ios-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes ios-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.animate-slide-up {
  animation: ios-slide-up 0.15s ease-out;
}

.animate-scale-in {
  animation: ios-scale-in 0.15s ease-out;
}

.animate-fade-in {
  animation: ios-fade-in 0.1s ease-out;
}

/* ============ iOS Button Press Effect ============ */
button,
.cursor-pointer,
[onclick] {
  transition:
    transform 0.15s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}

button:active,
.cursor-pointer:active,
[onclick]:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ============ iOS Cards - Glossy خفيف ============ */
.ios-card {
  background: linear-gradient(
    145deg,
    rgba(13, 33, 64, 0.88) 0%,
    rgba(18, 76, 150, 0.78) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease;
}

.ios-card:active {
  transform: scale(0.98);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============ iOS Inputs ============ */
input,
select,
textarea {
  font-size: 16px !important;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.28);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ============ iOS Modal - سريع بدون blur ============ */
.modal {
  background: rgba(0, 0, 0, 0.75);
}

.modal-content {
  background: rgb(6, 18, 35);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  padding: 0 !important;
}

/* Header ثابت */
.modal-header {
  position: sticky;
  top: 0;
  background: rgb(6, 18, 35);
  padding: 16px 24px;
  border-radius: 28px 28px 0 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* المحتوى القابل للتمرير */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 24px;
  -webkit-overflow-scrolling: touch;
}

/* تعطيل التأثيرات الثقيلة داخل الـ modals */
.modal-content .glass,
.modal-content .glass-card {
  background: rgba(24, 16, 48, 0.9) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.modal-content .transition-all {
  transition:
    background 0.1s ease,
    color 0.1s ease !important;
}

.modal-content .animate-slide-up {
  animation: none !important;
}

/* Modal Handle (iOS style) */
.modal-handle {
  width: 36px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin: 8px auto 16px;
}

/* ============ iOS Bottom Nav - Glossy خفيف ============ */
.ios-nav {
  background: linear-gradient(
    180deg,
    rgba(3, 11, 22, 0.94) 0%,
    rgba(9, 32, 67, 0.94) 100%
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
  /* iOS Safe Area */
  padding-bottom: env(safe-area-inset-bottom);
}

.ios-nav-item {
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-nav-item.active {
  color: #56d9ff;
  text-shadow: 0 0 20px rgba(86, 217, 255, 0.45);
}

.ios-nav-item:active {
  transform: scale(0.9);
}

/* ============ iOS Toast - Glossy خفيف ============ */
#toast {
  transition: all 0.25s ease-out;
  background: linear-gradient(
    135deg,
    rgba(5, 18, 35, 0.96) 0%,
    rgba(12, 48, 101, 0.94) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#toast.hidden {
  opacity: 0;
  transform: translate(-50%, -30px) scale(0.8);
}

#toast:not(.hidden) {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* ============ iOS Loading Spinner ============ */
@keyframes ios-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: ios-spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ios-spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #56d9ff;
  border-radius: 50%;
  animation: ios-spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* ============ iOS Buttons - Glossy ============ */
.ios-btn-primary {
  background: linear-gradient(145deg, #56d9ff 0%, #2cbcff 52%, #174fbf 100%);
  box-shadow:
    0 6px 20px rgba(44, 188, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  font-weight: 600;
  color: white;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 3px 12px rgba(44, 188, 255, 0.28);
}

.ios-btn-secondary {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  font-weight: 600;
  color: white;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ios-btn-secondary:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.97);
}

.ios-btn-danger {
  background: linear-gradient(145deg, #2cbcff 0%, #1f89ff 50%, #174fbf 100%);
  box-shadow:
    0 6px 20px rgba(44, 188, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  font-weight: 600;
  color: white;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-btn-danger:active {
  transform: scale(0.97);
  box-shadow: 0 3px 12px rgba(44, 188, 255, 0.25);
}

/* ============ iOS Input - Glossy ============ */
.ios-input {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px 16px;
  color: white;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Fix date input on iOS */
input[type="date"].ios-input {
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
  line-height: 24px;
}

input[type="date"].ios-input::-webkit-date-and-time-value {
  text-align: right;
}

input[type="date"].ios-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.6;
}

.ios-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ios-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(86, 217, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.18);
  outline: none;
}

/* ============ iOS Segmented Control - Glossy ============ */
.ios-segment {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ios-segment-item {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-segment-item.active {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ============ iOS Chips - Glossy ============ */
.ios-chip {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: #9ca3af;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-chip:active {
  transform: scale(0.95);
}

.ios-chip-active {
  background: linear-gradient(
    135deg,
    rgba(86, 217, 255, 0.18) 0%,
    rgba(23, 79, 191, 0.24) 100%
  );
  border-color: rgba(86, 217, 255, 0.45);
  color: #56d9ff;
  box-shadow: 0 2px 8px rgba(86, 217, 255, 0.16);
}

/* ============ iOS List - Glossy ============ */
.ios-list-item {
  background: linear-gradient(
    145deg,
    rgba(61, 35, 128, 0.7) 0%,
    rgba(36, 22, 80, 0.7) 100%
  );
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.ios-list-item:first-child {
  border-radius: 14px 14px 0 0;
}

.ios-list-item:last-child {
  border-radius: 0 0 14px 14px;
  border-bottom: none;
}

.ios-list-item:only-child {
  border-radius: 14px;
}

.ios-list-item:active {
  background: rgba(255, 255, 255, 0.1);
}

/* ============ iOS Search Bar - Glossy ============ */
.ios-search {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ios-search:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(86, 217, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.14);
}

/* ============ iOS Toggle Switch - Glossy ============ */
.ios-toggle {
  width: 51px;
  height: 31px;
  background: linear-gradient(
    145deg,
    rgba(120, 120, 128, 0.4) 0%,
    rgba(100, 100, 108, 0.3) 100%
  );
  border-radius: 16px;
  position: relative;
  transition: background 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
  display: inline-block;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ios-toggle.active {
  background: linear-gradient(145deg, #56d9ff 0%, #1d6dff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(44, 188, 255, 0.28);
}

.ios-toggle-thumb {
  width: 27px;
  height: 27px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.ios-toggle.active .ios-toggle-thumb {
  right: 22px;
}

/* ============ iOS Custom Select (Country Picker) - Glossy ============ */
.ios-select-wrapper {
  position: relative;
  display: inline-block;
}

.ios-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 16px;
  padding-left: 36px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  min-width: 160px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ios-select:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(86, 217, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.15);
  outline: none;
}

.ios-select option {
  background: #0b2347;
  color: white;
  padding: 12px;
  font-size: 16px;
}

.ios-select-arrow {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

/* ============ Country Slider ============ */
.country-slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

.country-slider::-webkit-scrollbar {
  display: none;
}

.country-chip {
  flex-shrink: 0;
  padding: 8px 12px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  white-space: nowrap;
}

.country-chip:hover {
  background: rgba(255, 255, 255, 0.18);
}

.country-chip.active {
  background: linear-gradient(
    145deg,
    rgba(86, 217, 255, 0.22) 0%,
    rgba(23, 79, 191, 0.2) 100%
  );
  border-color: rgba(86, 217, 255, 0.42);
  color: #56d9ff;
  box-shadow: 0 2px 8px rgba(86, 217, 255, 0.16);
}

/* ============ Safe Areas ============ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  nav {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .modal-content {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

/* حساب ارتفاع الصفحات مع مراعاة المناطق الآمنة (الكاميرا/الشريط العلوي/مؤشر الرجوع) */
.h-\[calc\(100vh-7rem\)\] {
  height: calc(
    100vh - 7rem - env(safe-area-inset-top, 0px) -
      env(safe-area-inset-bottom, 0px)
  ) !important;
}

/* ============ Skeleton Loading ============ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: ios-shimmer 1.5s ease infinite;
  border-radius: 8px;
}

/* ============ Floating Action Button - Glossy ============ */
.ios-fab {
  background: linear-gradient(145deg, #56d9ff 0%, #2cbcff 50%, #174fbf 100%);
  box-shadow:
    0 8px 25px rgba(44, 188, 255, 0.45),
    0 0 40px rgba(86, 217, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  /* iOS Safe Area - lift above bottom nav */
  bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
}

.ios-fab:active {
  transform: scale(0.92);
  box-shadow: 0 4px 15px rgba(44, 188, 255, 0.34);
}

.ios-fab:hover {
  box-shadow:
    0 10px 30px rgba(44, 188, 255, 0.54),
    0 0 50px rgba(86, 217, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ============ Badge - Glossy ============ */
.ios-badge {
  background: linear-gradient(145deg, #2cbcff 0%, #174fbf 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow:
    0 2px 8px rgba(44, 188, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ============ Pull to Refresh - Glossy ============ */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 12px 24px;
  background: rgb(10, 39, 82);
  border-radius: 0 0 24px 24px;
  transition: transform 0.2s ease-out;
  z-index: 100;
}

.ptr-indicator.visible {
  transform: translateX(-50%) translateY(0);
}

/* ============ Status Colors - Glossy ============ */
.status-success {
  color: #56d9ff;
}
.status-warning {
  color: #8adfff;
}
.status-danger {
  color: #2cbcff;
}
.status-info {
  color: #4f8dff;
}

.bg-status-success {
  background: linear-gradient(
    145deg,
    rgba(86, 217, 255, 0.18) 0%,
    rgba(44, 188, 255, 0.12) 100%
  );
}
.bg-status-warning {
  background: linear-gradient(
    145deg,
    rgba(138, 223, 255, 0.18) 0%,
    rgba(86, 217, 255, 0.12) 100%
  );
}
.bg-status-danger {
  background: linear-gradient(
    145deg,
    rgba(44, 188, 255, 0.18) 0%,
    rgba(23, 79, 191, 0.14) 100%
  );
}
.bg-status-info {
  background: linear-gradient(
    145deg,
    rgba(79, 141, 255, 0.18) 0%,
    rgba(44, 188, 255, 0.14) 100%
  );
}

/* ============ Glow Effects - Enhanced ============ */
.glow-red {
  box-shadow:
    0 0 25px rgba(44, 188, 255, 0.35),
    0 0 50px rgba(44, 188, 255, 0.16);
}

.glow-green {
  box-shadow:
    0 0 25px rgba(86, 217, 255, 0.35),
    0 0 50px rgba(86, 217, 255, 0.16);
}

/* ============ Logo Theme Utility Overrides ============ */
[class*="text-fuchsia-"],
[class*="text-violet-"],
[class*="text-purple-"] {
  color: #56d9ff !important;
}

[class*="text-indigo-"] {
  color: #4f8dff !important;
}

[class*="border-fuchsia-"],
[class*="border-violet-"],
[class*="border-purple-"] {
  border-color: rgba(86, 217, 255, 0.28) !important;
}

[class*="border-indigo-"] {
  border-color: rgba(79, 141, 255, 0.28) !important;
}

[class*="bg-fuchsia-"],
[class*="bg-violet-"],
[class*="bg-purple-"] {
  background-color: rgba(44, 188, 255, 0.14) !important;
}

[class*="bg-indigo-"] {
  background-color: rgba(79, 141, 255, 0.14) !important;
}

[class*="shadow-fuchsia-"],
[class*="shadow-violet-"],
[class*="shadow-purple-"] {
  --tw-shadow-color: rgba(44, 188, 255, 0.26) !important;
}

[class*="peer-checked:border-fuchsia-"],
[class*="peer-checked:border-violet-"],
[class*="peer-checked:border-purple-"] {
  border-color: rgba(86, 217, 255, 0.38) !important;
}

[class*="peer-checked:bg-fuchsia-"],
[class*="peer-checked:bg-violet-"],
[class*="peer-checked:bg-purple-"] {
  background-color: rgba(44, 188, 255, 0.12) !important;
}

[class*="peer-checked:text-fuchsia-"],
[class*="peer-checked:text-violet-"],
[class*="peer-checked:text-purple-"] {
  color: #56d9ff !important;
}

[class*="from-fuchsia-"][class*="to-fuchsia-"],
[class*="from-violet-"][class*="to-violet-"],
[class*="from-purple-"][class*="to-fuchsia-"],
[class*="from-fuchsia-"][class*="to-violet-"],
[class*="from-violet-"][class*="to-fuchsia-"],
[class*="from-purple-"][class*="to-purple-"],
[class*="from-indigo-"][class*="to-indigo-"],
[class*="from-violet-"][class*="to-indigo-"],
[class*="from-indigo-"][class*="to-violet-"] {
  background-image: linear-gradient(
    135deg,
    #56d9ff 0%,
    #2cbcff 52%,
    #174fbf 100%
  ) !important;
}

[class*="from-fuchsia-"][class*="/"],
[class*="from-violet-"][class*="/"],
[class*="from-purple-"][class*="/"],
[class*="to-fuchsia-"][class*="/"],
[class*="to-violet-"][class*="/"],
[class*="to-purple-"][class*="/"] {
  background-image: linear-gradient(
    145deg,
    rgba(7, 20, 38, 0.88) 0%,
    rgba(16, 59, 118, 0.7) 100%
  ) !important;
}

/* ============ Account Choice Cards ============ */
.account-choice-card {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.02) 100%
    ),
    rgba(7, 20, 38, 0.72);
}

.account-choice-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.peer:checked + .account-choice-card {
  border-color: rgba(86, 217, 255, 0.6) !important;
  background:
    radial-gradient(
      circle at top,
      rgba(86, 217, 255, 0.18) 0%,
      transparent 58%
    ),
    linear-gradient(
      145deg,
      rgba(20, 64, 120, 0.8) 0%,
      rgba(9, 28, 56, 0.94) 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(86, 217, 255, 0.15),
    0 10px 26px rgba(8, 44, 88, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.peer:checked + .account-choice-card .account-choice-check {
  background: linear-gradient(145deg, #56d9ff 0%, #2cbcff 100%);
  color: #03101f;
  border-color: rgba(86, 217, 255, 0.8);
  box-shadow: 0 0 12px rgba(86, 217, 255, 0.35);
}

.peer:checked + .account-choice-card p {
  color: #ffffff !important;
}

/* ============ Delete Modal Red Theme ============ */
.danger-modal-card {
  border-color: rgba(239, 68, 68, 0.22) !important;
  box-shadow:
    0 18px 40px rgba(34, 5, 5, 0.34),
    0 0 0 1px rgba(239, 68, 68, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.danger-glow {
  background: rgba(239, 68, 68, 0.28) !important;
}

.danger-icon-wrap {
  background: linear-gradient(
    145deg,
    rgba(239, 68, 68, 0.18) 0%,
    rgba(127, 29, 29, 0.28) 100%
  ) !important;
  border-color: rgba(239, 68, 68, 0.32) !important;
}

.danger-icon,
.danger-title {
  color: #f87171 !important;
}

.danger-spinner {
  border-color: rgba(239, 68, 68, 0.24) !important;
  border-top-color: #ef4444 !important;
}

.danger-action {
  background: linear-gradient(
    145deg,
    #ef4444 0%,
    #dc2626 55%,
    #b91c1c 100%
  ) !important;
  box-shadow:
    0 8px 22px rgba(239, 68, 68, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.danger-action:hover {
  background: linear-gradient(
    145deg,
    #f87171 0%,
    #ef4444 55%,
    #dc2626 100%
  ) !important;
}

/* ============ Haptic Feedback Simulation ============ */
@keyframes haptic {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  75% {
    transform: translateX(1px);
  }
}

.haptic {
  animation: haptic 0.1s ease;
}

/* ============ Typography ============ */
.ios-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.ios-headline {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.ios-body {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.2px;
}

.ios-caption {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

/* ============ Divider ============ */
.ios-divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 16px;
}

/* ============ Context Menu - خفيف ============ */
.ios-context-menu {
  background: rgb(46, 28, 95);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ios-context-item {
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
}

.ios-context-item:last-child {
  border-bottom: none;
}

.ios-context-item:active {
  background: rgba(255, 255, 255, 0.12);
}

.ios-context-item.destructive {
  color: #d946ef;
}

/* ============ iOS Spring Animation Helper ============ */
.ios-spring {
  transition: all 0.4s var(--ios-spring);
}

/* ============ Scale Utilities ============ */
.active\:scale-98:active {
  transform: scale(0.98);
}

.active\:scale-95:active {
  transform: scale(0.95);
}

.active\:scale-90:active {
  transform: scale(0.9);
}

/* ============ Focus Ring ============ */
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
}

/* ============ Selection Color ============ */
::selection {
  background: rgba(168, 85, 247, 0.3);
  color: white;
}

/* ============ Smooth Scroll ============ */
* {
  scroll-behavior: smooth;
}

/* ============ Theme colors are now applied dynamically via JavaScript ============ */

/* ============================================================
   AUTH PAGE — Premium Design
   ============================================================ */

/* --- Page Container --- */
.auth-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: #050a12;
}

/* --- Animated Background Orbs --- */
.auth-bg-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: auth-orb-float 12s ease-in-out infinite;
}

.auth-orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(223, 32, 32, 0.35), transparent 70%);
  top: -10%;
  right: -8%;
  animation-delay: 0s;
  animation-duration: 14s;
}
.auth-orb-2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(255, 100, 80, 0.25),
    transparent 70%
  );
  bottom: -5%;
  left: -10%;
  animation-delay: -4s;
  animation-duration: 16s;
}
.auth-orb-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(200, 50, 50, 0.2), transparent 70%);
  top: 40%;
  left: 60%;
  animation-delay: -7s;
  animation-duration: 18s;
}
.auth-orb-4 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 80, 60, 0.18), transparent 70%);
  top: 60%;
  right: 70%;
  animation-delay: -2s;
  animation-duration: 20s;
}

@keyframes auth-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 15px) scale(0.95);
  }
  75% {
    transform: translate(15px, 25px) scale(1.02);
  }
}

/* --- Noise Texture --- */
.auth-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Wrapper --- */
.auth-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 24px 20px;
  margin: auto;
  animation: auth-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Brand --- */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-ring {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 26px;
  background: linear-gradient(
    145deg,
    rgba(223, 32, 32, 0.1),
    rgba(180, 20, 20, 0.04)
  );
  border: 1px solid rgba(223, 32, 32, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: auth-logo-pulse 3s ease-in-out infinite;
  overflow: hidden;
}

.auth-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
}

@keyframes auth-logo-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(223, 32, 32, 0.15);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(223, 32, 32, 0.1);
  }
}

@keyframes auth-ring-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.auth-subtitle-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

/* --- Card --- */
.auth-card {
  position: relative;
  padding: 28px 24px;
  border-radius: 24px;
  background: linear-gradient(
    160deg,
    rgba(18, 8, 8, 0.92) 0%,
    rgba(30, 12, 12, 0.88) 50%,
    rgba(45, 15, 15, 0.82) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.auth-card-glow {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(223, 32, 32, 0.6),
    rgba(255, 107, 92, 0.4),
    transparent
  );
  border-radius: 2px;
  pointer-events: none;
}

/* --- Form Header --- */
.auth-form-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-form-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.auth-form-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
}

/* --- Fields Container --- */
.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Input Group --- */
.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 1;
}

.auth-input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #ffffff;
  font-size: 14px !important;
  font-weight: 400;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  text-align: center;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
  font-weight: 400;
}

.auth-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(223, 32, 32, 0.45);
  box-shadow:
    0 0 0 3px rgba(223, 32, 32, 0.1),
    0 0 16px rgba(223, 32, 32, 0.06);
  outline: none;
}

.auth-input:focus + .auth-input-icon,
.auth-input-group:focus-within .auth-input-icon {
  color: rgba(223, 32, 32, 0.7);
}

/* --- Primary Button --- */
.auth-btn-primary {
  position: relative;
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(145deg, #e83030 0%, #c41a1a 50%, #8a1010 100%);
  box-shadow:
    0 4px 16px rgba(223, 32, 32, 0.3),
    0 0 40px rgba(223, 32, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.auth-btn-primary:hover {
  box-shadow:
    0 6px 24px rgba(223, 32, 32, 0.4),
    0 0 50px rgba(223, 32, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.auth-btn-primary:active {
  transform: scale(0.98) translateY(0);
  box-shadow:
    0 2px 8px rgba(223, 32, 32, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-btn-text {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.auth-btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  animation: auth-btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auth-btn-shimmer {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* --- Links --- */
.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-links-center {
  justify-content: center;
  gap: 6px;
}

.auth-link-primary {
  font-size: 13px;
  font-weight: 600;
  color: rgba(223, 32, 32, 0.85);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.auth-link-primary:hover {
  color: #ff5c5c;
}

.auth-link-secondary {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.auth-link-secondary:hover {
  color: rgba(255, 255, 255, 0.55);
}

.auth-link-muted {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* --- Footer --- */
.auth-footer {
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.15);
  margin-top: 24px;
}

/* --- Message Boxes (login-message, register-message, etc.) --- */
.auth-card .hidden {
  display: none !important;
}

/* --- Responsive --- */
@media (max-height: 680px) {
  .auth-brand {
    margin-bottom: 16px;
  }
  .auth-logo-ring {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
  }
  .auth-title {
    font-size: 22px;
  }
  .auth-card {
    padding: 22px 20px;
  }
  .auth-fields {
    gap: 10px;
  }
  .auth-input {
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .auth-btn-primary {
    padding: 12px;
  }
}

/* --- Dynamic Forms (verify, forgot, reset) shared classes --- */
.auth-dynamic-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 6px;
}

.auth-dynamic-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}

.auth-dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-dynamic-input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #ffffff;
  font-size: 14px !important;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.auth-dynamic-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.auth-dynamic-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(223, 32, 32, 0.45);
  box-shadow:
    0 0 0 3px rgba(223, 32, 32, 0.1),
    0 0 16px rgba(223, 32, 32, 0.06);
  outline: none;
}

.auth-dynamic-btn {
  position: relative;
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(145deg, #e83030 0%, #c41a1a 50%, #8a1010 100%);
  box-shadow:
    0 4px 16px rgba(223, 32, 32, 0.3),
    0 0 40px rgba(223, 32, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.auth-dynamic-btn:active {
  transform: scale(0.98);
}

.auth-dynamic-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-dynamic-link:hover {
  color: rgba(255, 255, 255, 0.55);
}

.auth-dynamic-link-accent {
  font-size: 13px;
  font-weight: 600;
  color: rgba(223, 32, 32, 0.85);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-dynamic-link-accent:hover {
  color: #ff5c5c;
}
