:root {
  /* Apple Vision & macOS Sequoia Color Palette */
  --bg-space: #000000;
  --apple-canvas: #090a0f;
  --glass-base: rgba(18, 20, 29, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.06);
  --glass-active: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.05);

  --apple-blue: #0a84ff;
  --apple-green: #30d158;
  --apple-purple: #bf5af2;
  --apple-orange: #ff9f0a;
  --apple-red: #ff453a;
  --apple-indigo: #5e5ce6;

  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #636366;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --shadow-apple: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  --blur-apple: blur(28px) saturate(180%);
}

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

body {
  background-color: var(--apple-canvas);
  color: var(--text-primary);
  font-family: var(--font-ar);
  min-height: 100vh;
  min-height: 100dvh;
  direction: rtl;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Apple Vision Pro Glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--apple-blue), transparent 70%);
  top: -150px;
  right: -100px;
}
.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--apple-purple), transparent 70%);
  bottom: -200px;
  left: -150px;
}
.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--apple-green), transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.15;
}

/* Base Layout */
.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1540px;
  margin: 0 auto;
  padding: 20px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Apple Bento Glass Base */
.bento-glass {
  background: var(--glass-base);
  backdrop-filter: var(--blur-apple);
  -webkit-backdrop-filter: var(--blur-apple);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-apple);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. TOP APPLE DYNAMIC HEADER */
.apple-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(15, 17, 26, 0.75);
  backdrop-filter: var(--blur-apple);
  -webkit-backdrop-filter: var(--blur-apple);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.main-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-brand-link:hover {
  transform: translateY(-1px);
}

.header-main-logo-box {
  background: #ffffff;
  padding: 4px 12px;
  border-radius: 9px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.main-brand-link:hover .header-main-logo-box {
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.4);
  transform: scale(1.02);
}

.header-main-logo {
  height: 20px;
  width: auto;
  max-width: 90px;
  display: block;
  object-fit: contain;
}

.main-brand-info {
  display: flex;
  flex-direction: column;
}

.system-ver {
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Elattal co. Header Partner Pill */
.elattal-partner-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-ar);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  margin-right: 6px;
}

.elattal-partner-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(10, 132, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.2);
}

.elattal-partner-pill b {
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.elattal-sparkle {
  color: var(--apple-blue);
  font-size: 12px;
  animation: elattalPulse 2s ease-in-out infinite;
}

@keyframes elattalPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.elattal-arrow {
  font-size: 11px;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.elattal-partner-pill:hover .elattal-arrow {
  transform: translate(-2px, -2px);
  color: var(--apple-blue);
}

/* Elattal Official Brand Logo Integration */
.elattal-badge-box {
  background: #ffffff;
  padding: 2.5px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.elattal-badge-box:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.5);
}

.elattal-logo-img {
  height: 14px;
  width: auto;
  max-width: 72px;
  display: block;
  object-fit: contain;
}

/* Footer Elattal Logo */
.elattal-badge-box.footer-box {
  padding: 3px 9px;
  border-radius: 8px;
}

.elattal-logo-img.footer-logo {
  height: 16px;
  max-width: 85px;
}

/* Center Island Navigation Tabs */
.center-island-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-subtle);
  gap: 4px;
}

.island-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.island-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.island-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tab-icon {
  font-size: 14px;
}

/* Right Nav Controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apple-btn-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.35);
  color: var(--apple-green);
  border-radius: var(--radius-pill);
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.apple-btn-toggle.paused {
  background: rgba(255, 69, 58, 0.12);
  border-color: rgba(255, 69, 58, 0.35);
  color: var(--apple-red);
}

.apple-btn-toggle:hover {
  transform: scale(1.02);
}

.toggle-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.apple-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apple-icon-btn:hover {
  background: rgba(255, 69, 58, 0.2);
  color: var(--apple-red);
  border-color: rgba(255, 69, 58, 0.4);
}

.apple-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}

.apple-status-badge.ready {
  color: var(--apple-green);
  border-color: rgba(48, 209, 88, 0.3);
  background: rgba(48, 209, 88, 0.1);
}

.apple-status-badge.qr {
  color: var(--apple-orange);
  border-color: rgba(255, 159, 10, 0.3);
}

.apple-status-badge.disconnected {
  color: var(--apple-red);
  border-color: rgba(255, 69, 58, 0.3);
}

.status-radar {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* 2. APPLE BENTO METRICS */
.bento-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
}

.bento-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bento-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.bento-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
}

.bento-icon-box.blue { background: rgba(10, 132, 255, 0.15); }
.bento-icon-box.purple { background: rgba(191, 90, 242, 0.15); }
.bento-icon-box.green { background: rgba(48, 209, 88, 0.15); }
.bento-icon-box.gold { background: rgba(255, 159, 10, 0.15); }

.bento-value {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}

.bento-footer {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 3. WORKSPACE MULTI-TAB VIEWPORT */
.workspace-viewport {
  position: relative;
  min-height: 640px;
}

.tab-view {
  display: none;
  animation: fadeInApple 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-view.active {
  display: block;
}

@keyframes fadeInApple {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* TAB 1: SPLIT CONSOLE (CHATS & CONVERSATION) */
.split-console {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  height: calc(100vh - 270px);
  min-height: 600px;
}

.chats-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-top-bar {
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.title-with-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-with-pill h3 {
  font-size: 17px;
  font-weight: 700;
}

.live-dot-tag {
  font-size: 11px;
  color: var(--apple-green);
  background: rgba(48, 209, 88, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  color: #fff;
  font-family: var(--font-ar);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--apple-blue);
  background: rgba(0, 0, 0, 0.5);
}

.conversations-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversations-scroll::-webkit-scrollbar {
  width: 4px;
}
.conversations-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.conv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.conv-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-3px);
}

.conv-item.active {
  background: rgba(10, 132, 255, 0.15);
  border-color: rgba(10, 132, 255, 0.4);
}

.conv-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conv-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.conv-phone {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--text-secondary);
}

.conv-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.conv-lead-tag {
  background: rgba(48, 209, 88, 0.15);
  color: var(--apple-green);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.admin-tag {
  background: rgba(94, 92, 230, 0.2) !important;
  color: #a5b4fc !important;
}

.conv-paused-tag {
  background: rgba(255, 69, 58, 0.15);
  color: var(--apple-red);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

/* Chat Viewport Area */
.chat-viewport {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat-nav-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--glass-border);
}

.user-meta h2 {
  font-size: 16px;
  font-weight: 700;
}

.user-phone {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--text-secondary);
}

.wa-direct-link {
  color: var(--apple-green);
  text-decoration: none;
  margin-right: 8px;
  font-weight: 600;
}

.header-action-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.apple-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ar);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.apple-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.apple-pill-btn:active {
  transform: scale(0.96);
}

/* Calm Muted Bot Takeover States */
.apple-pill-btn.takeover.active {
  background: rgba(255, 69, 58, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(255, 69, 58, 0.25);
}

.apple-pill-btn.takeover.active:hover {
  background: rgba(255, 69, 58, 0.16);
  border-color: rgba(255, 69, 58, 0.4);
}

.apple-pill-btn.takeover.paused {
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.apple-pill-btn.takeover.paused:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

.apple-pill-btn.reset-memory {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.apple-pill-btn.reset-memory:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.apple-icon-btn.wa-icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.28);
  color: var(--apple-green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.apple-icon-btn.wa-icon-btn:hover {
  background: rgba(48, 209, 88, 0.2);
  border-color: rgba(48, 209, 88, 0.45);
  transform: scale(1.05);
}

.apple-lead-pill {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

/* Messages Stream */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-bubble {
  max-width: 68%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-bubble.user {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble.model {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.25), rgba(10, 132, 255, 0.15));
  color: #e0edff;
  border: 1px solid rgba(10, 132, 255, 0.35);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--text-tertiary);
  align-self: flex-end;
}

.chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 12px;
  text-align: center;
}

.placeholder-glyph {
  font-size: 52px;
  opacity: 0.25;
}

.lead-insight-banner {
  background: rgba(48, 209, 88, 0.08);
  border-top: 1px solid rgba(48, 209, 88, 0.2);
  padding: 12px 24px;
  font-size: 13px;
  color: var(--apple-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* LIVE HUMAN INPUT COMPOSER (2026 Apple Vision Bar) */
.live-composer {
  display: flex;
  padding: 16px 20px;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--glass-border-subtle);
}

.live-composer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  color: #fff;
  font-family: var(--font-ar);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.live-composer input:focus {
  border-color: var(--apple-blue);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.live-composer button {
  background: var(--apple-blue);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0 24px;
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.live-composer button:hover {
  background: #0071e3;
  transform: scale(1.02);
}

/* TAB 2: SETTINGS & STRATEGY GRID */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-bento {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.icon-avatar.indigo { background: rgba(94, 92, 230, 0.18); }
.icon-avatar.emerald { background: rgba(48, 209, 88, 0.18); }
.icon-avatar.green { background: rgba(48, 209, 88, 0.18); }

.card-title-row h3 {
  font-size: 17px;
  font-weight: 700;
}

.card-title-row p {
  font-size: 12px;
  color: var(--text-secondary);
}

.glass-form-group {
  display: flex;
  gap: 10px;
}

.glass-form-group input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-en);
  font-size: 14px;
  outline: none;
}

.glass-form-group input:focus {
  border-color: var(--apple-blue);
}

.glass-btn {
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.glass-btn.primary {
  background: var(--apple-blue);
  color: white;
}
.glass-btn.primary:hover { background: #0071e3; }

.glass-btn.danger {
  background: rgba(255, 69, 58, 0.2);
  color: var(--apple-red);
  border: 1px solid rgba(255, 69, 58, 0.35);
}
.glass-btn.danger:hover { background: rgba(255, 69, 58, 0.35); }

.tag-chips-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-chips-box label {
  font-size: 12px;
  color: var(--text-secondary);
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.number-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
}

.admin-badge-tag {
  background: rgba(94, 92, 230, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(94, 92, 230, 0.35);
}

.blacklist-badge-tag {
  background: rgba(255, 69, 58, 0.15);
  color: #ff9992;
  border: 1px solid rgba(255, 69, 58, 0.35);
}

.remove-tag-btn {
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  font-size: 14px;
}

/* Radio Tiles for Reply Strategy */
.radio-strategy-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apple-radio-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-radio-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.apple-radio-tile input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--apple-blue);
  width: 16px;
  height: 16px;
}

.tile-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.tile-badge {
  font-size: 10px;
  background: rgba(10, 132, 255, 0.15);
  color: var(--apple-blue);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.tile-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.blacklist-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border-subtle);
}

.blacklist-panel label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* TAB 3: CONNECTION VIEW */
.connection-layout-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.apple-connect-card {
  width: 520px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.card-title-row.center {
  flex-direction: column;
  text-align: center;
}

.apple-segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-subtle);
  width: 100%;
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  padding: 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.connect-body {
  width: 100%;
}

.apple-qr-frame {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.qrcode-surface img {
  border: 8px solid #fff;
  border-radius: 16px;
  width: 210px;
  height: 210px;
}

.apple-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--apple-blue);
  border-radius: 50%;
  animation: appleSpin 0.9s linear infinite;
}

@keyframes appleSpin {
  to { transform: rotate(360deg); }
}

.qr-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.qr-connected-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.badge-success-glyph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(48, 209, 88, 0.15);
  color: var(--apple-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.apple-pill-btn.unlink {
  margin-top: 10px;
  background: rgba(255, 69, 58, 0.12);
  color: var(--apple-red);
  border: 1px solid rgba(255, 69, 58, 0.35);
}

.phone-link-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
}

.code-result-panel {
  background: rgba(10, 132, 255, 0.08);
  border: 1px solid rgba(10, 132, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.code-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.apple-code-pill {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--apple-blue);
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 28px;
  border-radius: var(--radius-md);
}

.apple-alert-box {
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: var(--apple-red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
}

/* ===================================================
   APPLE GLOBAL CORPORATE FOOTER (ELATTAL CO. OWNERSHIP)
   =================================================== */
.apple-global-footer {
  margin-top: 18px;
  width: 100%;
}

.footer-glass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(15, 17, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-subtle);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.footer-corp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-badge-icon {
  font-size: 16px;
}

.elattal-corp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.elattal-corp-link:hover {
  background: rgba(10, 132, 255, 0.18);
  border-color: rgba(10, 132, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.25);
}

.corp-logo-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--apple-blue), var(--apple-indigo));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corp-verified-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--apple-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-sub-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-rights {
  font-family: var(--font-en);
}

.footer-direct-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--apple-green);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-direct-contact:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===================================================
   APPLE MOBILE UI/UX ENGINE 2026 (ZERO BOTTLENECK)
   =================================================== */

/* 1. Mobile Back Button in Chat Viewport */
.apple-mobile-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.apple-mobile-back-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.16);
}

.apple-mobile-back-btn .back-arrow {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.apple-mobile-back-btn:hover .back-arrow {
  transform: translateX(2px);
}

/* 2. Apple Dynamic Glass Bottom Navigation Bar */
.apple-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 8px 16px max(10px, env(safe-area-inset-bottom, 10px));
  pointer-events: none;
  justify-content: center;
}

.bottom-nav-glass {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(14, 16, 24, 0.85);
  backdrop-filter: blur(30px) saturate(210%);
  -webkit-backdrop-filter: blur(30px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 5px 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.bottom-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 6px 4px;
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.bottom-tab-item:active {
  transform: scale(0.92);
}

.bottom-tab-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.tab-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
}

.tab-icon-box .tab-icon {
  font-size: 18px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-tab-item.active .tab-icon {
  transform: scale(1.15);
}

.tab-title {
  font-family: var(--font-ar);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tab-badge-dot {
  position: absolute;
  top: 0;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apple-blue);
  box-shadow: 0 0 8px var(--apple-blue);
}

.tab-status-dot {
  position: absolute;
  top: 0;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 8px var(--apple-green);
}

/* ===================================================
   RESPONSIVE BREAKPOINTS (DESKTOP -> TABLET -> MOBILE)
   =================================================== */

/* Tablet (Large) */
@media (max-width: 1100px) {
  .bento-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Small Tablets (Max Width: 820px) */
@media (max-width: 820px) {
  /* 1. Base Layout & Scroll */
  .app-layout {
    padding: 12px 14px calc(76px + env(safe-area-inset-bottom, 12px)) 14px;
    gap: 14px;
  }

  /* 2. Header Mobile Optimization */
  .apple-nav {
    padding: 8px 12px;
    border-radius: 18px;
    height: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
    gap: 8px;
    box-sizing: border-box;
  }

  /* Hide Desktop Island Tabs & brand subtitle on mobile */
  .center-island-tabs,
  .main-brand-info {
    display: none !important;
  }

  .nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .main-brand-link {
    gap: 0;
  }

  .header-main-logo-box {
    padding: 3px 8px;
    border-radius: 7px;
  }

  .header-main-logo {
    height: 16px;
    max-width: 78px;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: nowrap !important;
  }

  .apple-btn-toggle {
    padding: 5px 10px;
    font-size: 11px;
    height: 30px;
    min-height: 30px;
    white-space: nowrap !important;
    border-radius: var(--radius-pill);
    gap: 5px;
    flex-shrink: 0;
  }

  .apple-btn-toggle .toggle-indicator {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
  }

  .apple-icon-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .apple-status-badge {
    padding: 5px 9px;
    font-size: 11px;
    height: 30px;
    min-height: 30px;
    white-space: nowrap !important;
    border-radius: var(--radius-pill);
    gap: 5px;
    flex-shrink: 0;
  }

  .apple-status-badge .status-radar {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
  }

  /* 3. Bento Metrics Mobile (2x2 Compact Grid) */
  .bento-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .bento-card {
    padding: 12px 14px;
    border-radius: 18px;
    gap: 3px;
  }

  .bento-icon-box {
    width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 8px;
  }

  .bento-value {
    font-size: 24px;
  }

  .bento-label {
    font-size: 11px;
  }

  .bento-footer {
    font-size: 10px;
  }

  /* 4. Show Apple Bottom Navigation */
  .apple-bottom-nav {
    display: flex;
  }

  /* 5. Master-Detail Smooth Sliding Console (Zero Bottleneck) */
  .split-console {
    position: relative;
    overflow: hidden;
    height: calc(100dvh - 290px);
    min-height: 480px;
    border-radius: 22px;
    display: block;
  }

  .chats-sidebar {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    will-change: transform, opacity;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
  }

  .chat-viewport {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    z-index: 3;
    transform: translate3d(105%, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    will-change: transform, opacity;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
  }

  /* When a chat is selected on mobile */
  body.mobile-chat-active {
    overflow: hidden;
  }

  body.mobile-chat-active .bento-metrics {
    display: none !important;
  }

  body.mobile-chat-active .apple-global-footer {
    display: none !important;
  }

  body.mobile-chat-active .split-console {
    height: calc(100dvh - 152px - env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(100dvh - 152px);
  }

  .split-console.mobile-chat-open .chats-sidebar {
    transform: translate3d(-30%, 0, 0);
    opacity: 0;
    pointer-events: none;
  }

  .split-console.mobile-chat-open .chat-viewport {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Show mobile back button in chat room */
  .split-console.mobile-chat-open .apple-mobile-back-btn {
    display: inline-flex;
  }

  /* Chat header in mobile - Single Sleek Native Apple Bar (Zero Wrapping & Eye-Friendly) */
  .chat-nav-header {
    padding: 8px 12px;
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
    gap: 8px;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
  }

  .user-meta {
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .user-text-info {
    min-width: 0;
    overflow: hidden;
  }

  .avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .user-meta h2 {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin: 0;
    color: #f1f5f9;
  }

  .user-phone {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.1;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .apple-mobile-back-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 14px;
  }

  .header-action-pills {
    width: auto !important;
    padding-top: 0 !important;
    gap: 5px;
    flex-shrink: 0;
    flex-wrap: nowrap !important;
  }

  .apple-pill-btn {
    padding: 4px 8px;
    font-size: 11px;
    height: 28px;
    border-radius: var(--radius-pill);
    gap: 3px;
  }

  .apple-icon-btn.wa-icon-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 12px;
  }

  .apple-lead-pill {
    padding: 3px 7px;
    font-size: 10px;
  }

  /* Chat stream with iOS momentum scrolling */
  .chat-stream {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 12px 14px;
  }

  .message-bubble {
    max-width: 90%;
    font-size: 13px;
    padding: 10px 14px;
  }

  /* Live composer pinned at bottom of viewport */
  .live-composer {
    position: sticky;
    bottom: 0;
    background: rgba(12, 14, 22, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    padding: 8px 12px;
    z-index: 5;
  }

  .live-composer input {
    padding: 10px 14px;
    font-size: 13px;
  }

  .live-composer button {
    padding: 10px 16px;
    font-size: 12px;
  }

  /* 6. Corporate Footer Mobile */
  .apple-global-footer {
    margin-top: 14px;
    margin-bottom: 8px;
  }

  .footer-glass-bar {
    padding: 12px 14px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .footer-corp-meta {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    gap: 8px;
  }

  .footer-sub-links {
    font-size: 11px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .elattal-partner-pill {
    padding: 4px 10px;
    font-size: 11px;
    gap: 5px;
  }
}

/* Small Smart Phones (Max Width: 480px) */
@media (max-width: 480px) {
  .brand-pill .brand-name {
    font-size: 14px;
  }

  .bento-metrics {
    gap: 8px;
  }

  .bento-card {
    padding: 10px 12px;
  }

  .bento-value {
    font-size: 20px;
  }

  .apple-code-pill {
    font-size: 22px;
    letter-spacing: 3px;
    padding: 8px 16px;
  }

  .settings-bento {
    padding: 16px;
  }

  .apple-qr-frame {
    padding: 16px;
  }

  .qrcode-surface img {
    width: 180px;
    height: 180px;
  }
}

/* ===================================================
   APPLE GLASS CONFIRMATION MODAL & TOAST SYSTEM 2026
   =================================================== */
.apple-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: appleModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-modal-dialog {
  width: 100%;
  max-width: 400px;
  background: rgba(28, 28, 32, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-align: center;
  animation: appleModalScaleUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 69, 58, 0.14);
  border: 1px solid rgba(255, 69, 58, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px auto;
  box-shadow: 0 0 20px rgba(255, 69, 58, 0.25);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.2px;
}

.modal-target {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 12px;
  border-radius: 100px;
  margin: 0 auto 12px auto;
  direction: ltr;
}

.modal-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 22px 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
}

.apple-btn-secondary {
  flex: 1;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.apple-btn-danger {
  flex: 1.3;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff453a, #e02d24);
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 69, 58, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 69, 58, 0.45);
}

.apple-btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Apple Toast Floating Pill */
.apple-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: rgba(24, 24, 28, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 100px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: appleToastSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes appleModalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes appleToastSlide {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===================================================
   🛡️ ZERO-TRUST EXECUTIVE SECURITY SUITE 2026
   =================================================== */
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(5, 10, 14, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: appleModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(145deg, rgba(16, 26, 32, 0.95), rgba(7, 13, 17, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 230, 153, 0.15);
  animation: appleModalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-shield-icon {
  font-size: 48px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 20px rgba(0, 230, 153, 0.4));
}

.auth-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #00e699;
  background: rgba(0, 230, 153, 0.12);
  border: 1px solid rgba(0, 230, 153, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}

.auth-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 26px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.auth-key-icon {
  position: absolute;
  right: 14px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.auth-input-wrapper input {
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0 44px 0 44px;
  font-family: inherit;
  font-size: 15px;
  color: #ffffff;
  direction: ltr;
  text-align: center;
  letter-spacing: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: #00e699;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 230, 153, 0.15);
}

.auth-toggle-visibility {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.15s;
}

.auth-toggle-visibility:hover {
  color: #ffffff;
}

.auth-error-banner {
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff6b6b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: right;
}

.auth-submit-button {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #00e699, #059669);
  color: #041a13;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 230, 153, 0.3);
}

.auth-submit-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 230, 153, 0.45);
}

.auth-submit-button:active {
  transform: scale(0.985);
}

.auth-btn-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.auth-submit-button:hover .auth-btn-arrow {
  transform: translateX(-4px);
}

.auth-footer-note {
  margin-top: 24px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.4);
}

.apple-icon-btn.security {
  background: rgba(0, 230, 153, 0.1);
  border-color: rgba(0, 230, 153, 0.25);
  color: #00e699;
}

.apple-icon-btn.security:hover {
  background: rgba(0, 230, 153, 0.2);
  border-color: rgba(0, 230, 153, 0.4);
  color: #ffffff;
}

/* ===================================================
   ADMIN CREDENTIALS & SECURITY STYLES 2026
   =================================================== */
.auth-input-wrapper.auth-email-field input {
  text-align: left;
  letter-spacing: normal;
  font-family: var(--font-en, sans-serif);
}

.security-current-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13px;
}

.security-current-email-box .sec-label {
  color: var(--text-secondary);
}

.sec-badge-email {
  font-family: var(--font-en, sans-serif);
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  letter-spacing: 0.3px;
}

.security-form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group-apple {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-apple label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.auth-input-wrapper.inside-settings {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper.inside-settings input {
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 13.5px;
  letter-spacing: normal;
  text-align: right;
  direction: rtl;
  padding: 0 40px 0 40px;
}

.auth-input-wrapper.inside-settings input[type="email"],
.auth-input-wrapper.inside-settings input[type="password"] {
  direction: ltr;
  text-align: left;
}

.auth-input-wrapper.inside-settings input:focus {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.auth-input-wrapper.inside-settings .auth-key-icon {
  right: 12px;
  font-size: 14px;
}

.auth-input-wrapper.inside-settings .auth-toggle-visibility {
  left: 10px;
  font-size: 14px;
}

.sec-alert-banner {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
}

.sec-alert-banner.error {
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff6b6b;
}

.sec-alert-banner.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.glass-btn.full-width {
  width: 100%;
  justify-content: center;
  height: 44px;
  font-size: 14px;
  font-weight: 800;
}


