/* ─── Base ─────────────────────────────────────────────── */
* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ─── Navigation ──────────────────────────────────────── */
.nav-link { color: rgba(255,255,255,0.7); }
.nav-link:hover { background: rgba(255,255,255,0.15); color: white; }
.nav-link.active { background: rgba(255,255,255,0.25); color: white; font-weight: 600; }
.nav-link.active svg { color: white; }

/* ─── Login Tabs ──────────────────────────────────────── */
.tab-active { background: white; color: #374151; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ─── Login Slideshow ─────────────────────────────────── */
.login-slide { transition: opacity 1.5s ease-in-out; }

/* ─── Drag & Drop ─────────────────────────────────────── */
.drop-zone { border: 2px dashed #d1d5db; transition: all .2s; }
.drop-zone:hover, .drop-zone.dragover { border-color: #e10031; background: #fff0f3; }

/* ─── Status Badges ───────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 500; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-archived { background: #f3f4f6; color: #6b7280; }

/* ─── Doc Type Badges ─────────────────────────────────── */
.dtype { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.dtype-invoice { background: #fce7f3; color: #9d174d; }
.dtype-contract { background: #ede9fe; color: #5b21b6; }
.dtype-report { background: #dbeafe; color: #1e40af; }
.dtype-letter { background: #d1fae5; color: #065f46; }
.dtype-form { background: #fef3c7; color: #92400e; }
.dtype-receipt { background: #ffedd5; color: #9a3412; }
.dtype-legal { background: #e0e7ff; color: #3730a3; }
.dtype-technical { background: #cffafe; color: #155e75; }
.dtype-hr { background: #fce7f3; color: #831843; }
.dtype-other { background: #f3f4f6; color: #6b7280; }

/* ─── Chat ────────────────────────────────────────────── */
.chat-msg-user { background: #ffd6de; border-radius: 18px 18px 4px 18px; }
.chat-msg-ai { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 18px 18px 18px 4px; }
.chat-msg-ai p { margin-bottom: .5em; }
.chat-msg-ai p:last-child { margin-bottom: 0; }
.chat-msg-ai code { background: #e5e7eb; padding: 1px 5px; border-radius: 4px; font-size: .875em; }
.chat-msg-ai strong { font-weight: 600; }

/* ─── Stat Cards ──────────────────────────────────────── */
.stat-card { transition: all .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* ─── Table ───────────────────────────────────────────── */
.doc-row { transition: background .15s; cursor: pointer; }
.doc-row:hover { background: #f9fafb; }

/* ─── RTL support for Arabic content ──────────────────── */
.rtl-text { direction: rtl; text-align: right; font-family: 'Segoe UI', Tahoma, 'Inter', sans-serif; }

/* ─── Animations ──────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.fade-in { animation: fadeIn .3s ease-out; }
.slide-up { animation: slideUp .4s ease-out; }

.typing-dots span { display: inline-block; width: 8px; height: 8px; background: #9ca3af; border-radius: 50%; margin: 0 2px; animation: pulse-dot 1.4s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

/* ─── Toast ───────────────────────────────────────────── */
.toast { animation: slideUp .3s ease-out; }

/* ─── Progress bar ────────────────────────────────────── */
.progress-bar { transition: width .5s ease; }

/* ─── File item ───────────────────────────────────────── */
.file-item { animation: fadeIn .2s ease-out; }

/* ─── Empty state ─────────────────────────────────────── */
.empty-state svg { opacity: .4; }
