@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

* { font-family: 'Cairo', 'Tajawal', sans-serif; }
body { direction: rtl; background: #f8f9fb; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Nav items */
.nav-item { color: #94a3b8; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.nav-item.active { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; box-shadow: 0 4px 15px rgba(59,130,246,0.35); }

/* Cards */
.card { background: white; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.stat-card { transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #e5e7eb; background: white; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.07); }

/* Status badges */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* Table */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th { background: #f8fafc; padding: 12px 16px; text-align: right; font-size: 0.8rem; color: #475569; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #e2e8f0; letter-spacing: 0.02em; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem; }
.data-table tr:hover td { background: #f8fafc; }

/* Inputs */
.form-input { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 12px; outline: none; transition: all 0.2s; font-size: 0.875rem; background: white; }
.form-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.form-select { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 12px; outline: none; background: white; font-size: 0.875rem; }
.form-select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; font-size: 0.875rem; font-weight: 600; transition: all 0.2s; cursor: pointer; border: none; }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.btn-primary:hover { box-shadow: 0 4px 15px rgba(59,130,246,0.4); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-outline { background: white; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.btn-sm { padding: 6px 12px; font-size: 0.75rem; border-radius: 8px; }

/* Loading */
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid #dbeafe; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shift pattern builder */
.pattern-entry { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.pattern-entry:hover { border-color: #93c5fd; }

/* Schedule preview */
.schedule-day { padding: 8px 12px; border-radius: 8px; text-align: center; font-size: 0.8rem; }
.schedule-work { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.schedule-off { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; }
.schedule-late { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* Responsive */
@media (max-width: 1024px) {
    #sidebar { transform: translateX(100%); }
    #sidebar.open { transform: translateX(0); }
    #mainContent { margin-right: 0 !important; }
}

/* Fade in */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Tabs */
.tab-btn { padding: 10px 20px; border-radius: 10px; font-size: 0.875rem; font-weight: 600; color: #64748b; background: transparent; cursor: pointer; transition: all 0.2s; border: none; }
.tab-btn.active { background: white; color: #2563eb; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.tabs-container { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 12px; }

/* Multi-color accent bar */
.color-bar { height: 3px; background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981); border-radius: 0 0 4px 4px; }

/* Amber colors (missing from Tailwind v2) */
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-600 { background-color: #d97706; }
.hover\:bg-amber-600:hover { background-color: #d97706; }
.text-amber-500 { color: #f59e0b; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-500 { border-color: #f59e0b; }
.from-amber-500 { --tw-gradient-from: #f59e0b; }
.to-amber-500 { --tw-gradient-to: #f59e0b; }

/* Emerald colors */
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.text-emerald-500 { color: #10b981; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.border-emerald-200 { border-color: #a7f3d0; }

/* Violet colors */
.bg-violet-50 { background-color: #f5f3ff; }
.bg-violet-500 { background-color: #8b5cf6; }
.text-violet-500 { color: #8b5cf6; }
.text-violet-600 { color: #7c3aed; }
.border-violet-200 { border-color: #ddd6fe; }

/* Slate colors */
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.border-slate-200 { border-color: #e2e8f0; }

/* Hide Moyasar branding */
#moyasar-payment-form a[href*="moyasar"],
#moyasar-payment-form .powered-by,
#moyasar-payment-form footer,
#moyasar-payment-form small:last-child,
.mysr-form a[href*="moyasar"],
.mysr-form .powered-by,
.mysr-form footer,
.mysr-form small:last-child { display: none !important; }

/* Print styles */
@media print {
    .print\\:hidden { display: none !important; }
    body { background: white !important; }
    .bg-gradient-to-br { background: #3b82f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
