/* Aaroh Business OS - Premium Indian SaaS Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --color-brand-50: #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-500: #6366f1;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
  --color-brand-800: #3730a3;

  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  --color-emerald-50: #ecfdf5;
  --color-emerald-100: #d1fae5;
  --color-emerald-600: #059669;
  --color-emerald-700: #047857;

  --color-amber-50: #fffbebf;
  --color-amber-100: #fef3c7;
  --color-amber-600: #d97706;
  --color-amber-700: #b45309;

  --color-rose-50: #fff1f2;
  --color-rose-100: #ffe4e6;
  --color-rose-600: #e11d48;
  --color-rose-700: #be123c;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-slate-100);
  color: var(--color-slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.02em;
}

a {
  color: var(--color-brand-600);
  text-decoration: none;
}

/* App Shell Layout */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Auth Container & Keyframe Animations */
@keyframes authCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoPulseGlow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4), 0 0 0 0 rgba(129, 140, 248, 0.4);
  }
  50% {
    box-shadow: 0 6px 22px rgba(79, 70, 229, 0.65), 0 0 0 8px rgba(129, 140, 248, 0);
  }
}

@keyframes floatIconBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.05);
  }
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #0f172a 100%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35), 0 0 30px rgba(99, 102, 241, 0.2);
  animation: authCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-brand-600), #818cf8);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  animation: logoPulseGlow 3s infinite;
}

.brand-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  animation: logoPulseGlow 3s infinite;
  flex-shrink: 0;
}

/* Language Selector Animations & Styles */
@keyframes langPillFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes langSwitchGlow {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.lang-selector-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  background: var(--color-slate-100);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  scrollbar-width: thin;
  animation: langPillFade 0.4s ease;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-slate-600);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lang-pill:hover {
  color: var(--color-brand-600);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.lang-pill.active {
  background: white;
  color: var(--color-brand-700);
  border-color: var(--color-brand-500);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
  font-weight: 700;
  animation: langSwitchGlow 1.2s ease-out;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lang-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1.5px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-card:hover {
  border-color: var(--color-brand-500);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.lang-card.selected {
  border-color: var(--color-brand-600);
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.lang-card-native {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-slate-900);
}

.lang-card-name {
  font-size: 11px;
  color: var(--color-slate-500);
}

.otp-box {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--color-slate-200);
}

.otp-box:focus {
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
  transform: scale(1.08);
  outline: none;
}

.auth-page .btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.auth-page .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -4px rgba(79, 70, 229, 0.55);
}

.auth-page .btn-primary:active {
  transform: translateY(0);
}

.otp-icon-wrapper {
  animation: floatIconBounce 2.5s ease-in-out infinite;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-slate-900);
  line-height: 1.1;
}

.logo-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-slate-500);
}

/* Setup Onboarding */
.setup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-slate-50);
  padding: 24px;
}

.setup-card {
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-slate-200);
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.step-dot {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-slate-200);
  transition: background-color 0.2s ease;
}

.step-dot.active {
  background: var(--color-brand-600);
}

.step-dot.completed {
  background: var(--color-emerald-600);
}

.grid-business-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.business-type-card {
  border: 2px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.business-type-card:hover {
  border-color: var(--color-brand-500);
  background-color: var(--color-brand-50);
}

.business-type-card.selected {
  border-color: var(--color-brand-600);
  background-color: var(--color-brand-50);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.business-type-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.business-type-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-slate-800);
}

/* Main Dashboard Shell */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-slate-900);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-text {
  color: white;
  font-size: 20px;
}

.sidebar-logo .logo-tagline {
  color: var(--color-slate-400);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-slate-500);
  padding: 8px 12px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--color-slate-400);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
  text-decoration: none;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: white;
  background: var(--color-brand-600);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-brand-500);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-business {
  font-size: 11px;
  color: var(--color-slate-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-navbar {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--color-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--color-slate-700);
  cursor: pointer;
}

.header-title-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.business-tag {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--color-brand-100);
}

.content-container {
  padding: 28px;
  flex: 1;
}

/* Card Component */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-slate-200);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-slate-900);
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-slate-200);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-500);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.brand { background: var(--color-brand-50); color: var(--color-brand-600); }
.stat-icon.emerald { background: var(--color-emerald-50); color: var(--color-emerald-600); }
.stat-icon.amber { background: var(--color-amber-50); color: var(--color-amber-600); }
.stat-icon.rose { background: var(--color-rose-50); color: var(--color-rose-600); }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-slate-900);
  letter-spacing: -0.03em;
}

.stat-footer {
  font-size: 12px;
  color: var(--color-slate-500);
  margin-top: 6px;
}

/* Quick Actions Bar */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* Form Elements */
.form-group {
  margin-bottom: 18px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-slate-300);
  font-family: inherit;
  font-size: 14px;
  color: var(--color-slate-800);
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-brand-700);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--color-slate-700);
  border-color: var(--color-slate-300);
}

.btn-secondary:hover {
  background: var(--color-slate-100);
}

.btn-danger {
  background: var(--color-rose-600);
  color: white;
}

.btn-danger:hover {
  background: var(--color-rose-700);
}

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

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-slate-200);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  background: var(--color-slate-50);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-600);
  border-bottom: 1px solid var(--color-slate-200);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-slate-200);
  color: var(--color-slate-700);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: var(--color-slate-50);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-success { background: var(--color-emerald-50); color: var(--color-emerald-700); border: 1px solid var(--color-emerald-100); }
.badge-warning { background: var(--color-amber-50); color: var(--color-amber-700); border: 1px solid var(--color-amber-100); }
.badge-danger { background: var(--color-rose-50); color: var(--color-rose-700); border: 1px solid var(--color-rose-100); }
.badge-neutral { background: var(--color-slate-100); color: var(--color-slate-700); border: 1px solid var(--color-slate-200); }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-slate-900);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--color-slate-400);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-slate-700);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-slate-200);
  background: var(--color-slate-50);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--color-slate-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: slideUp 0.3s ease;
}

.toast.success { border-left: 4px solid var(--color-emerald-600); }
.toast.error { border-left: 4px solid var(--color-rose-600); }
.toast.info { border-left: 4px solid var(--color-brand-600); }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Empty States */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin-bottom: 4px;
}

.empty-desc {
  font-size: 13px;
  color: var(--color-slate-500);
  max-width: 360px;
  margin: 0 auto 20px;
}

/* POS Billing Modal Specifics */
.pos-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.pos-cart-items {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
}

/* Receipt Modal & Print View */
.receipt-paper {
  background: white;
  padding: 24px;
  border: 1px dashed var(--color-slate-300);
  border-radius: var(--radius-md);
  font-family: 'Courier New', Courier, monospace;
}

.receipt-header {
  text-align: center;
  margin-bottom: 16px;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 12px;
}

.receipt-title {
  font-size: 18px;
  font-weight: bold;
}

/* Responsive Mobile Layout */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .pos-grid {
    grid-template-columns: 1fr;
  }

  .grid-business-types {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-container {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* --- CINEMATIC LOGO REVEAL & SPLASH OVERLAY --- */
@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes logoRevealScale {
  0% { transform: scale(0.4) rotate(-10deg); opacity: 0; filter: blur(12px); }
  50% { transform: scale(1.1) rotate(2deg); opacity: 1; filter: blur(0px); }
  75% { transform: scale(0.96) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes logoPulseShimmer {
  0% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 0 0 rgba(79, 70, 229, 0.4); }
  50% { box-shadow: 0 0 50px rgba(212, 175, 55, 0.75), 0 0 0 24px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 0 0 rgba(79, 70, 229, 0); }
}

@keyframes taglineSlideUp {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes splashFadeOut {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.06); filter: blur(8px); visibility: hidden; }
}

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-overlay.fade-out {
  animation: splashFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splashFadeIn 0.5s ease-out;
}

.splash-logo-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 22px;
}

.splash-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  border: 2.5px solid rgba(212, 175, 55, 0.85);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  animation: logoRevealScale 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, logoPulseShimmer 2.5s infinite 0.9s;
}

.splash-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  opacity: 0;
  animation: taglineSlideUp 0.6s ease-out 0.35s forwards;
}

.splash-title span {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-tagline {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.06em;
  opacity: 0;
  animation: taglineSlideUp 0.6s ease-out 0.55s forwards;
}

.splash-spinner {
  margin-top: 26px;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #6366f1;
  border-radius: 50%;
  opacity: 0;
  animation: taglineSlideUp 0.6s ease-out 0.65s forwards, spin 0.8s linear infinite 0.65s;
}

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

/* --- MOBILE ANIMATIONS & VIEW TRANSITION ENGINE --- */
@keyframes viewFadeInSlide {
  0% { opacity: 0; transform: translateY(12px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardPopIn {
  0% { opacity: 0; transform: scale(0.94); }
  70% { transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes fabPulse {
  0% { box-shadow: 0 4px 18px rgba(79, 70, 229, 0.45); }
  50% { box-shadow: 0 4px 28px rgba(79, 70, 229, 0.85); }
  100% { box-shadow: 0 4px 18px rgba(79, 70, 229, 0.45); }
}

.view-animated {
  animation: viewFadeInSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card, .stat-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Active Touch Ripple & Press Feedback */
.btn:active, .nav-item:active, .lang-pill:active, .stat-card:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s ease;
}

/* --- MOBILE FLOATING ACTION BUTTON (FAB) --- */
.mobile-fab-container {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

@media (max-width: 768px) {
  .mobile-fab-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
}

.mobile-fab-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border: none;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fabPulse 3s infinite;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-fab-btn.open {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
}

.mobile-fab-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  align-items: flex-end;
  animation: cardPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-fab-menu.active {
  display: flex;
}

.mobile-fab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  white-space: nowrap;
}

/* ==========================================
   APPLE SIGN-IN ULTRA CLEAN UI STYLES
   ========================================== */
.apple-auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: authCardEntrance 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  box-sizing: border-box;
}

.apple-auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.apple-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  margin: 0 auto 12px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: block;
}

.apple-auth-title {
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.apple-auth-subtitle {
  font-size: 14px;
  color: #86868b;
  font-weight: 400;
}

.apple-input-group {
  margin-bottom: 16px;
  text-align: left;
}

.apple-input-label {
  font-size: 12px;
  font-weight: 600;
  color: #515154;
  margin-bottom: 6px;
  display: block;
}

.apple-input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  padding: 0 16px;
  font-size: 15px;
  background: #ffffff;
  color: #1d1d1f;
  transition: all 0.18s ease;
  outline: none;
  box-sizing: border-box;
}

.apple-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

.apple-btn-black {
  width: 100%;
  height: 48px;
  background: #000000;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.apple-btn-black:hover {
  background: #1d1d1f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.apple-btn-black:active {
  transform: translateY(0) scale(0.99);
}

.apple-btn-google {
  width: 100%;
  height: 48px;
  background: #ffffff;
  color: #1d1d1f;
  border: 1px solid #d2d2d7;
  border-radius: 9999px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.18s ease;
}

.apple-btn-google:hover {
  background: #f5f5f7;
  border-color: #c6c6c8;
}

.apple-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #86868b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.apple-divider::before,
.apple-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5ea;
}

.apple-lang-select {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.apple-lang-select:hover {
  background: #e8e8ed;
}



