/* ===== GLOBAL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
  --primary: #1A6B4A;
  --primary-light: #22916A;
  --primary-dark: #124D35;
  --primary-bg: #E8F5EF;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F97316;
  --warning-light: #FFEDD5;
  --success: #22C55E;
  --success-light: #DCFCE7;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}

/* ===== APP CONTAINER ===== */
#app {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: 0 auto;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  right: 0;
  background: var(--gray-100);
  transition: all 0.3s ease;
}

.screen.active {
  display: flex;
}

/* ===== STATUS BAR ===== */
.status-bar {
  background: var(--primary);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  z-index: 100;
}

/* ===== TOP BAR / HEADER ===== */
.top-bar {
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 90;
}

.top-bar-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
}

.top-bar-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 1px;
}

.top-bar-action {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 18px;
  transition: all 0.2s;
}

.top-bar-action:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== SCREEN CONTENT ===== */
.screen-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 80px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.screen-content::-webkit-scrollbar {
  width: 0;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-400);
  border: none;
  background: transparent;
  gap: 3px;
}

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

.nav-item.active .nav-icon {
  background: var(--primary-bg);
  color: var(--primary);
}

.nav-icon {
  width: 40px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.card-sm {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  border-radius: 0 var(--radius-lg) 0 60px;
  opacity: 0.08;
}

.stat-card.green::before { background: var(--primary); }
.stat-card.amber::before { background: var(--accent); }
.stat-card.red::before { background: var(--danger); }
.stat-card.blue::before { background: var(--info); }

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-card.green .stat-icon { background: var(--primary-bg); }
.stat-card.amber .stat-icon { background: var(--accent-light); }
.stat-card.red .stat-icon { background: var(--danger-light); }
.stat-card.blue .stat-icon { background: var(--info-light); }

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===== BALANCE CARD ===== */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1E8B5C 100%);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 107, 74, 0.35);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.balance-label {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 6px;
  font-weight: 500;
}

.balance-amount {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.balance-currency {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 600;
  margin-right: 4px;
}

.balance-sub-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.balance-sub-item {
  flex: 1;
  text-align: center;
}

.balance-sub-value {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.balance-sub-label {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(26, 107, 74, 0.3);
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: var(--success-light); color: #15803D; }
.badge-danger { background: var(--danger-light); color: #B91C1C; }
.badge-warning { background: var(--warning-light); color: #C2410C; }
.badge-info { background: var(--info-light); color: #1D4ED8; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }

/* ===== LIST ITEMS ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.list-item:hover {
  transform: translateX(-2px);
  box-shadow: var(--shadow);
}

.list-item:last-child { margin-bottom: 0; }

.list-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.list-item-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
}

.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Tajawal', sans-serif;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  direction: rtl;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.1);
}

.form-control::placeholder {
  color: var(--gray-400);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

/* ===== قائمة اختيار الساكن في مودال الفاتورة الخاصة ===== */
#si-resident-select {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#si-resident-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,74,0.12);
  background: var(--primary-bg);
}
#si-resident-select option {
  font-size: 14px;
  font-weight: 500;
  padding: 8px;
  color: var(--gray-800);
}
#si-resident-select option:first-child {
  color: var(--gray-400);
}

/* أيقونة الشخص تلتزم يمين القائمة */
#si-select-wrap {
  position: relative;
}
#si-select-wrap > span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
  z-index: 1;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 8px 20px 32px;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  margin: 10px auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 20px;
  text-align: center;
}

/* ===== PAYMENT METHODS ===== */
.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
}

.payment-method:hover,
.payment-method.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.payment-method-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--gray-100);
  flex-shrink: 0;
}

.payment-method-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.payment-method-desc {
  font-size: 12px;
  color: var(--gray-500);
}

.payment-radio {
  margin-right: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.payment-method.selected .payment-radio {
  border-color: var(--primary);
}

.payment-method.selected .payment-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  display: block;
}

/* ===== NOTIFICATION BANNER ===== */
.notification {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-right: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.notification.warning { border-right-color: var(--warning); }
.notification.danger { border-right-color: var(--danger); }
.notification.success { border-right-color: var(--success); }

.notif-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-content {}
.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.notif-body {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.notif-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 8px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ===== FILTER CHIPS ===== */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: 'Tajawal', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26, 107, 74, 0.25);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.empty-state-body {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0;
}

/* ===== SEARCH ===== */
.search-box {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 10px 14px;
  gap: 8px;
  margin-bottom: 14px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  color: var(--gray-700);
  outline: none;
  direction: rtl;
}

.search-icon {
  color: var(--gray-400);
  font-size: 18px;
}

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 72px;
  left: 20px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 107, 74, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 80;
  transition: all 0.2s;
}

.fab:hover { transform: scale(1.05); }
.fab:active { transform: scale(0.95); }

/* ===== TIMELINE ===== */
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.timeline-item::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 44px;
  bottom: 0;
  width: 1px;
  background: var(--gray-200);
}

.timeline-item:last-child::after { display: none; }

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ===== CHART PLACEHOLDER ===== */
.chart-container {
  position: relative;
  height: 180px;
  margin: 8px 0;
}

/* ===== AVATAR ===== */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== TOGGLE ===== */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(-20px);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--gray-800);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

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

.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
}

.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 20px;
  color: white;
  text-align: center;
}

.login-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.login-app-name {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-tagline {
  font-size: 15px;
  opacity: 0.8;
  line-height: 1.5;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 24px 40px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.role-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.role-btn {
  flex: 1;
  padding: 14px 8px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.role-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.role-btn-icon {
  font-size: 26px;
  margin-bottom: 6px;
  display: block;
}

.role-btn-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  font-family: 'Tajawal', sans-serif;
}

.role-btn.active .role-btn-name {
  color: var(--primary);
}

/* ===== BACK BUTTON ===== */
.back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gray-600);
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--gray-200);
}

/* ===== REPORT CARDS ===== */
.report-month-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.report-row:last-child { border-bottom: none; }

.report-row-label { 
  font-size: 13px; 
  color: var(--gray-600); 
  font-weight: 500;
}

.report-row-value { 
  font-size: 14px; 
  font-weight: 700; 
  color: var(--gray-800); 
}

/* ===== UNIT CARD ===== */
.unit-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.unit-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(-2px);
}

.unit-number-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

/* ===== WALLET TX ===== */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-amount {
  font-size: 15px;
  font-weight: 800;
}

.tx-amount.income { color: var(--success); }
.tx-amount.expense { color: var(--danger); }

/* ===== PLAN FEATURE ===== */
.plan-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-answer {
  padding: 0 16px;
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-answer.open {
  max-height: 200px;
  padding: 0 16px 14px;
}

/* ===== PRICING HIGHLIGHT ===== */
.pricing-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

/* ===== SUBSCRIPTION BADGE ===== */
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 430px) {
  .balance-amount { font-size: 28px; }
}

@media (min-width: 430px) {
  #app {
    box-shadow: 0 0 60px rgba(0,0,0,0.2);
  }
}

/* ============================================================
   PAYMENT MODAL — تحويل بنكي
============================================================ */

/* المودال الرئيسي */
.pay-modal { padding: 0 0 24px; overflow-y: auto; max-height: 90vh; }

/* شريط ملخص الفاتورة */
.pay-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  padding: 20px 20px 18px;
  margin-bottom: 0;
}
.pay-summary-label  { font-size: 12px; color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.pay-summary-amount { font-size: 30px; font-weight: 900; color: #fff; line-height: 1; }
.pay-summary-month  { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.pay-summary-icon   { font-size: 40px; opacity: .6; }

/* تبويبات */
.pay-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  background: var(--white);
}
.pay-tab {
  flex: 1;
  padding: 13px 8px;
  background: none;
  border: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.pay-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* لوحات المحتوى */
.pay-panel { display: none; padding: 16px 20px 0; }
.pay-panel.active { display: block; }

/* بطاقة بيانات البنك */
.bank-info-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.bank-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary-bg);
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
}
.bank-info-title { font-size: 14px; font-weight: 800; color: var(--primary-dark); }
.bank-info-sub   { font-size: 11px; color: var(--gray-500); margin-top: 1px; }

.bank-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-200);
  gap: 8px;
}
.bank-field-label { font-size: 12px; color: var(--gray-500); flex-shrink: 0; }
.bank-field-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bank-field-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  word-break: break-all;
}
.bank-copy-btn {
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.bank-copy-btn:active { background: var(--gray-200); }

/* خطوات التحويل */
.bank-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.bank-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
}
.bank-step-num {
  width: 26px; height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}

/* منطقة رفع الإيصال */
.receipt-upload-area {
  border: 2.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gray-50);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.receipt-upload-area:active,
.receipt-upload-area:hover { border-color: var(--primary); background: var(--primary-bg); }
.receipt-upload-area.has-file { border-style: solid; border-color: var(--success); background: var(--success-light); }

.receipt-remove-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  font-weight: 700;
}

/* shake لمنطقة الرفع */
@keyframes shakeReceipt {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.receipt-upload-area.shake-receipt {
  animation: shakeReceipt 0.4s ease;
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ===== نجوم التقييم ===== */
.star-btn {
  display: inline-block;
  transition: transform 0.15s, opacity 0.15s;
  cursor: pointer;
  opacity: 0.35;
  user-select: none;
}
.star-btn:hover { opacity: 1 !important; transform: scale(1.25) !important; }

/* ===== فلاتر التقارير ===== */
.report-month-chip { font-size: 12px; padding: 5px 12px; }
.exp-month-chip    { font-size: 12px; padding: 5px 12px; }

/* بطاقة "قريباً" */
.coming-soon-card {
  text-align: center;
  padding: 28px 16px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  margin-bottom: 14px;
}
.coming-soon-icon  { font-size: 48px; margin-bottom: 10px; }
.coming-soon-title { font-size: 18px; font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
.coming-soon-sub   { font-size: 13px; color: var(--gray-500); line-height: 1.7; }
.coming-soon-methods {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.coming-method {
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
}

/* badge قيد المراجعة */
.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

/* ============================================================
   TRANSFER REVIEW — شاشة مراجعة التحويلات البنكية
============================================================ */

/* بطاقة طلب التحويل */
.tr-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.tr-card:active { box-shadow: var(--shadow-sm); }

/* شريط الحالة العلوي */
.tr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.tr-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.tr-card-time {
  font-size: 11px;
  color: var(--gray-400);
}

/* محتوى البطاقة */
.tr-card-body {
  padding: 12px 14px;
}
.tr-card-resident {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.tr-card-unit {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.tr-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
}
.tr-card-row-label { color: var(--gray-500); }
.tr-card-row-val   { font-weight: 700; color: var(--gray-800); }

/* منطقة الإيصال */
.tr-receipt-thumb {
  margin-top: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  position: relative;
}
.tr-receipt-thumb img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.tr-receipt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

/* أزرار الإجراء */
.tr-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px 14px;
}
.tr-btn-approve {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: Tajawal, sans-serif;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tr-btn-reject {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: Tajawal, sans-serif;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tr-btn-approve:active, .tr-btn-reject:active { opacity: 0.75; }
.tr-btn-approve:disabled, .tr-btn-reject:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* حالة مقبول / مرفوض في البطاقة */
.tr-result-box {
  margin: 0 14px 14px;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}
.tr-result-box.approved {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}
.tr-result-box.rejected {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

/* تفاصيل المودال */
.tr-detail-section {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.tr-detail-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* أيقونة شارة التنبيه في الشاشة */
.notif-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* btn-danger (إضافة لو مش موجود) */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}
/* بطاقات اختيار طريقة الدفع الإلكتروني */
.pay-method-card {
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
}
.pay-method-card.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.pay-method-card:active { opacity: .7; }

.btn-danger:hover { background: #DC2626; }

/* ============================================================
   RESIDENT DETAIL MODAL
============================================================ */
.rd-tab-panel { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

.settings-code-card {
  border: 2px solid var(--primary-bg);
  position: relative;
  overflow: hidden;
}
.settings-code-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: var(--primary-bg);
  border-radius: 50%;
  opacity: 0.5;
}
#settings-building-code {
  user-select: all;
  cursor: pointer;
  transition: transform 0.15s;
}
#settings-building-code:active { transform: scale(0.96); }

/* ===== Auth System — شاشات التسجيل والدخول الجديدة ===== */

/* Auth Wrapper */
#screen-auth-wrapper {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  max-width: 430px;
  margin: 0 auto;
}

/* Auth Screens (داخل الـ wrapper) */
.auth-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 30px;
}
.auth-screen.active { display: flex; }

/* Auth Hero */
.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 28px;
  color: white;
  text-align: center;
}
.auth-logo { font-size: 64px; margin-bottom: 12px; }
.auth-hero img {
  animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.auth-app-name { font-size: 28px; font-weight: 900; letter-spacing: 1px; }
.auth-tagline { font-size: 14px; opacity: .85; margin-top: 6px; line-height: 1.7; font-weight: 500; }

/* Auth Card */
.auth-card {
  background: white;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 32px;
  flex: 1;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
}
.auth-card-scroll { overflow-y: auto; }
.auth-card-title { font-size: 20px; font-weight: 800; color: var(--gray-800); margin-bottom: 4px; }
.auth-card-subtitle { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }

/* Auth Topbar */
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}
.auth-topbar-title { font-size: 15px; font-weight: 700; color: white; }
.auth-back {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border: none; border-radius: 50%;
  color: white; font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Role Choice Cards */
.role-choice-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
}
.role-choice-card:hover, .role-choice-card:active {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
}
.role-choice-icon { font-size: 28px; }
.role-choice-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.role-choice-sub   { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Auth Step Badge */
.auth-step-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Form Hint */
.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 5px; }

/* Required star */
.required { color: var(--danger); }

/* Password toggle */
.pass-toggle {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; font-size: 16px;
}

/* Auth switch link */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 16px;
}
.auth-switch button {
  background: none; border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  text-decoration: underline;
}
.auth-link-btn {
  background: none; border: none;
  color: var(--primary); font-size: 13px;
  cursor: pointer; font-family: 'Tajawal', sans-serif;
  font-weight: 600;
}
.auth-link-btn:disabled { color: var(--gray-400); }

/* ===== OTP Inputs ===== */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  direction: ltr;
}
.otp-digit {
  width: 60px; height: 64px;
  text-align: center;
  font-size: 28px; font-weight: 800;
  border: 2px solid var(--gray-300);
  border-radius: 14px;
  background: var(--gray-50);
  color: var(--primary);
  outline: none;
  transition: all 0.2s;
  font-family: monospace;
}
.otp-digit:focus {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(26,107,74,0.15);
}
.otp-inputs.shake {
  animation: otpShake 0.4s ease-in-out;
}
@keyframes otpShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.8; }
}

@keyframes paySuccessIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

#payment-processing-layer { animation: fadeIn 0.25s ease; }
#payment-processing-layer .success-icon { animation: paySuccessIn 0.4s cubic-bezier(.17,.67,.35,1.3) both; }

/* ===== OTP SMS Simulator ===== */
.otp-simulator {
  position: fixed;
  bottom: -200px;
  left: 50%; transform: translateX(-50%);
  width: min(400px, 94vw);
  background: #1E293B;
  border-radius: 20px 20px 0 0;
  z-index: 9999;
  transition: bottom 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}
.otp-simulator.visible { bottom: 0; }
.otp-sim-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 8px;
  font-size: 13px; font-weight: 700; color: #CBD5E1;
}
.otp-sim-body { padding: 8px 18px 24px; }

/* ===== Building Code Screen ===== */
#screen-auth-code .auth-card {
  border-radius: 28px 28px 0 0;
  padding: 36px 24px 48px;
}

/* ===================================================
   COMING SOON CARDS — خدمة الصيانة / اتحاد الملاك / AI
   =================================================== */

/* البطاقة الأساسية */
.coming-soon-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border: 1.5px solid #E2E8F0;
}

/* شارة "قريباً" */
.coming-soon-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 30px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
  animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(249,115,22,0.4); }
  50%       { transform: scale(1.08); box-shadow: 0 4px 14px rgba(249,115,22,0.55); }
}

/* أيقونة البطاقة */
.coming-soon-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ميزات صغيرة داخل البطاقة */
.coming-soon-feature {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  text-align: center;
  border: 1px solid #E2E8F0;
}

/* وصف البطاقة */
.coming-soon-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.7;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-right: 3px solid #E2E8F0;
}

/* زر قريباً (معطّل بتصميم جميل) */
.coming-soon-btn {
  width: 100%;
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  color: #EA580C;
  border: 1.5px solid #FED7AA;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: not-allowed;
  opacity: 0.9;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.coming-soon-btn:disabled {
  opacity: 0.85;
  filter: none;
}

/* تأثير shimmer للبطاقة */
.coming-soon-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transform: skewX(-15deg);
  animation: shimmerCard 4s infinite;
}

@keyframes shimmerCard {
  0%   { left: -60%; }
  100% { left: 120%; }
}

/* =====================
   بطاقة الذكاء الاصطناعي
   ===================== */
.ai-preview-box {
  background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1.5px solid #BAE6FD;
  position: relative;
  overflow: hidden;
}

.ai-preview-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(14,165,233,0.04) 8px,
    rgba(14,165,233,0.04) 16px
  );
  pointer-events: none;
}

.ai-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* نقطة نابضة زرقاء */
.ai-dot {
  width: 8px;
  height: 8px;
  background: #0EA5E9;
  border-radius: 50%;
  animation: aiDotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes aiDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.6; }
}

/* إحصاء صغير داخل معاينة AI */
.ai-stat-mini {
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  border: 1px solid #E0F2FE;
}

/* إشارة اقتراح AI */
.ai-insight {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
  border: 1px solid #BAE6FD;
}

/* ألوان مخصصة لكل بطاقة */
.maintenance-card {
  border-color: #FED7AA;
  background: linear-gradient(160deg, #FFFFFF 60%, #FFF7ED 100%);
}

.union-card {
  border-color: #DDD6FE;
  background: linear-gradient(160deg, #FFFFFF 60%, #F5F3FF 100%);
}

.ai-card {
  border-color: #BAE6FD;
  background: linear-gradient(160deg, #FFFFFF 60%, #F0F9FF 100%);
}

