/* ===== نظام إدارة الكاراج ===== */
* { -webkit-tap-highlight-color: transparent; }
body { font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(30,58,138,0.3); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(30,58,138,0.5); }

.gradient-blue { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
.gradient-blue-light { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.pattern-blue { background-image: radial-gradient(circle at 1px 1px, rgba(30,58,138,0.04) 1px, transparent 0); background-size: 24px 24px; }
.pattern-blue-dark { background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0); background-size: 24px 24px; }

.soft-shadow { box-shadow: 0 2px 8px -2px rgba(30,58,138,0.08), 0 4px 16px -4px rgba(30,58,138,0.06); }
.soft-shadow-lg { box-shadow: 0 4px 16px -4px rgba(30,58,138,0.12), 0 8px 32px -8px rgba(30,58,138,0.08); }

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-up { animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1); }
.animate-scale-in { animation: scaleIn 0.25s cubic-bezier(0.16,1,0.3,1); }
.animate-slide-in-right { animation: slideInRight 0.3s cubic-bezier(0.16,1,0.3,1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

.card { background: white; border-radius: 1rem; box-shadow: 0 2px 8px -2px rgba(30,58,138,0.08), 0 4px 16px -4px rgba(30,58,138,0.06); border: 1px solid rgba(30,58,138,0.05); }
.btn-primary { background: #2563eb; color: white; border-radius: 0.75rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: #f3f4f6; color: #1f2937; border-radius: 0.75rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s; }
.btn-secondary:hover { background: #e5e7eb; }

.form-input { width: 100%; background: rgba(248,250,252,0.7); border-radius: 0.75rem; padding: 0.625rem 0.75rem; font-size: 0.875rem; border: 1px solid transparent; outline: none; transition: all 0.2s; font-family: inherit; }
.form-input:focus { border-color: rgba(37,99,235,0.3); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); background: white; }

.badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.625rem; font-weight: 500; border: 1px solid; }
.badge-paid { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.badge-unpaid { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge-partial { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.badge-active { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge-inactive { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }

.avatar { border-radius: 9999px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 600; color: white; flex-shrink: 0; }
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1rem; }
.avatar-xl { width: 5rem; height: 5rem; font-size: 1.5rem; }

.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
@media (min-width: 640px) { .modal-overlay { align-items: center; padding: 1rem; } }
.modal-content { background: white; width: 100%; max-width: 32rem; border-radius: 1.5rem 1.5rem 0 0; padding: 1.25rem; max-height: 90vh; overflow-y: auto; }
@media (min-width: 640px) { .modal-content { border-radius: 1.5rem; } }

.progress-bar { height: 0.375rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }

.spinner { width: 1.25rem; height: 1.25rem; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
