/* ═══ Index Page Styles ═══ */
:root {
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --text-dark: #1a1a2e;
  --text-muted: #64748b;
  --accent-green: #22c55e;
}


* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Tahoma, sans-serif;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative;
}

.background {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 25%, #a5d6a7 50%, #81c784 75%, #66bb6a 100%);
}
.background::before { content: ''; position: absolute; top: -20%; right: -10%; width: 60%; height: 60%; background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%); border-radius: 50%; }
.background::after { content: ''; position: absolute; bottom: -30%; left: -20%; width: 80%; height: 80%; background: radial-gradient(circle, rgba(129,199,132,0.5) 0%, transparent 60%); border-radius: 50%; }

.bg-shape { position: fixed; border-radius: 50%; background: rgba(255, 255, 255, 0.2); animation: float 20s infinite ease-in-out; }
.bg-shape:nth-child(2) { width: 300px; height: 300px; top: 10%; left: -5%; animation-delay: 0s; }
.bg-shape:nth-child(3) { width: 200px; height: 200px; top: 60%; right: -5%; animation-delay: -5s; }
.bg-shape:nth-child(4) { width: 150px; height: 150px; bottom: 10%; left: 20%; animation-delay: -10s; }

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

.app-container { position: relative; z-index: 1; width: 100%; max-width: 400px; animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.glass-card { background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 28px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); padding: 30px 25px; }

.header { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 25px; }
.logo-box { width: 65px; height: 65px; background: rgba(255, 255, 255, 0.8); border-radius: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); border: 1px solid rgba(255, 255, 255, 0.9); }
.logo-box img { width: 50px; height: 50px; object-fit: contain; }
.logo-divider { width: 2px; height: 45px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15), transparent); border-radius: 1px; }

.title { text-align: center; margin-bottom: 25px; }
.title h1 { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; letter-spacing: -0.3px; }
.title p { font-size: 0.85rem; color: var(--text-muted); }

.access-list { display: flex; flex-direction: column; gap: 10px; }
.access-btn { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 16px; cursor: pointer; transition: all 0.25s ease; text-decoration: none; color: inherit; }
.access-btn:hover { background: rgba(255, 255, 255, 0.85); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); text-decoration: none; }
.access-btn:active { transform: scale(0.98); }

.btn-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.btn-icon.amber { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.btn-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.btn-icon.teal { background: linear-gradient(135deg, #ccfbf1, #99f6e4); }
.btn-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }

.btn-content { flex: 1; min-width: 0; text-align: start; }
.btn-title { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; }
.btn-subtitle { font-size: 0.78rem; color: var(--text-muted); }
.btn-arrow { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.2s ease; }
.access-btn:hover .btn-arrow { transform: translateX(3px); }
[dir="rtl"] .access-btn:hover .btn-arrow { transform: translateX(-3px); }

.lang-toggle { display: flex; justify-content: center; margin-top: 16px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 50px; cursor: pointer; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); transition: all 0.25s ease; font-family: inherit; }
.lang-btn:hover { background: rgba(255, 255, 255, 0.8); color: var(--text-dark); }

.footer { margin-top: 25px; text-align: center; }
.footer-logo { margin-bottom: 8px; }
.footer-logo img { height: 28px; opacity: 0.9; }
.footer p { font-size: 0.7rem; color: var(--text-muted); }
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--text-dark); }

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.65rem; color: var(--text-muted); margin-top: 8px; }
.status-dot { width: 5px; height: 5px; background: var(--accent-green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.version { position: fixed; bottom: 8px; left: 8px; font-size: 10px; color: rgba(0, 0, 0, 0.3); font-family: monospace; }

body.lang-ar .fr-only { display: none !important; }
body.lang-fr .ar-only { display: none !important; }
body.lang-ar .ar-only { display: inline; }
body.lang-fr .fr-only { display: inline; }

/* Install Banner */
.install-banner { position: fixed; bottom: 20px; left: 12px; right: 12px; z-index: 300; animation: fadeIn 0.3s ease; }
.install-banner-content { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: white; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.06); }
.install-banner-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; object-fit: contain; }
.install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-banner-text strong { font-size: 0.85rem; color: var(--text-dark); }
.install-banner-text span { font-size: 0.7rem; color: var(--text-muted); }
.install-banner-btn { padding: 8px 16px; background: var(--accent-green); color: white; border: none; border-radius: 10px; font-size: 0.8rem; font-weight: 700; font-family: inherit; cursor: pointer; flex-shrink: 0; }
.install-banner-close { background: none; border: none; font-size: 1rem; color: var(--text-muted); cursor: pointer; padding: 4px; flex-shrink: 0; }

@media (max-height: 600px) {
  body { padding: 15px; }
  .glass-card { padding: 25px 20px; }
  .header { margin-bottom: 20px; }
  .logo-box { width: 55px; height: 55px; }
  .logo-box img { width: 42px; height: 42px; }
  .title { margin-bottom: 20px; }
  .title h1 { font-size: 1.25rem; }
  .access-btn { padding: 14px 16px; }
  .btn-icon { width: 42px; height: 42px; }
  .footer { margin-top: 20px; }
}


/* ═══ DARK MODE ═══ */

/* Background */
[data-theme="dark"],
[data-theme="dark"] body {
  background: #13141f !important;
  color: #f0f0f5 !important;
}
[data-theme="dark"] .background {
  background: linear-gradient(135deg, #13141f 0%, #1a1b2a 50%, #1e2030 100%) !important;
}
[data-theme="dark"] .background::before,
[data-theme="dark"] .background::after { opacity: 0.05; }
[data-theme="dark"] .bg-shape { opacity: 0.03; background: rgba(78,205,196,0.08); }
[data-theme="dark"] img { opacity: 0.9; }

/* All text */
[data-theme="dark"] * { color: #f0f0f5; }

/* Glass card */
[data-theme="dark"] .glass-card {
  background: #1e2030 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(20px);
}

/* Logo boxes */
[data-theme="dark"] .logo-box {
  background: #2a2c42 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] .logo-divider { background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent); }

/* Access buttons */
[data-theme="dark"] .access-btn {
  background: #2a2c42 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] .access-btn:hover {
  background: #363850 !important;
  border-color: #4ecdc4 !important;
}

/* Button icon gradients — vibrant in dark */
[data-theme="dark"] .btn-icon.amber  { background: linear-gradient(135deg, rgba(245,197,66,0.2), rgba(245,197,66,0.1)); }
[data-theme="dark"] .btn-icon.blue   { background: linear-gradient(135deg, rgba(78,205,196,0.2), rgba(78,205,196,0.1)); }
[data-theme="dark"] .btn-icon.teal   { background: linear-gradient(135deg, rgba(179,157,219,0.2), rgba(179,157,219,0.1)); }
[data-theme="dark"] .btn-icon.purple { background: linear-gradient(135deg, rgba(232,115,90,0.2), rgba(232,115,90,0.1)); }

/* Role button titles */
[data-theme="dark"] .btn-title { color: #f0f0f5 !important; }
[data-theme="dark"] .title h1 { color: #f0f0f5 !important; }

/* Subtitles */
[data-theme="dark"] .btn-subtitle,
[data-theme="dark"] .title p { color: #9a9bb0 !important; }

/* Language button */
[data-theme="dark"] .lang-btn {
  background: rgba(78, 205, 196, 0.08) !important;
  border-color: rgba(78, 205, 196, 0.2) !important;
  color: #4ecdc4 !important;
}
[data-theme="dark"] .lang-btn:hover {
  background: rgba(78, 205, 196, 0.15) !important;
  color: #f0f0f5 !important;
}

/* Footer */
[data-theme="dark"] .footer p,
[data-theme="dark"] .footer a { color: #5c5d72 !important; }
[data-theme="dark"] .footer a:hover { color: #f0f0f5 !important; }
[data-theme="dark"] .version { color: rgba(255, 255, 255, 0.15) !important; }

/* Install banner */
[data-theme="dark"] .install-banner-content {
  background: #1e2030 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] .install-banner-btn { background: #4ecdc4 !important; color: #13141f !important; }

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track { background: #13141f; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #363850; border-radius: 4px; }