/*
 * ملف تنسيق محلي شامل — بديل كامل عن Tailwind CDN، بدون أي اعتماد على إنترنت خارجي.
 * يغطي كل صنف (class) مستخدم فعلياً بكل صفحات المشروع (لوحة المالك، لوحة العميل،
 * الموقع العام). إن احتجت صنفاً جديداً لاحقاً وما لقيته هنا، أضفه بنفس النمط.
 */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: Tahoma, Arial, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.6; color: #1f2937; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
hr { border: none; border-top: 1px solid #e5e7eb; margin: 16px 0; }

/* ==== Layout: flex/grid ==== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.self-center { align-self: center; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }
.group:hover .group-hover\:text-blue-600 { color: #2563eb; }
.group:hover .group-hover\:underline { text-decoration: underline; }

/* ==== Position ==== */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.inset-0 { top: 0; left: 0; right: 0; bottom: 0; }
.top-1 { top: 4px; } .top-2 { top: 8px; } .top-4 { top: 16px; }
.left-0 { left: 0; } .left-1 { left: 4px; } .left-2 { left: 8px; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.z-50 { z-index: 50; }

/* ==== أحجام ==== */
.w-5 { width: 20px; } .w-8 { width: 32px; } .w-10 { width: 40px; } .w-12 { width: 48px; }
.w-16 { width: 64px; } .w-20 { width: 80px; } .w-24 { width: 96px; } .w-32 { width: 128px; }
.w-48 { width: 192px; } .w-56 { width: 224px; } .w-full { width: 100%; }
.h-5 { height: 20px; } .h-8 { height: 32px; } .h-10 { height: 40px; } .h-12 { height: 48px; }
.h-16 { height: 64px; } .h-20 { height: 80px; } .h-24 { height: 96px; } .h-28 { height: 112px; }
.h-32 { height: 128px; } .h-40 { height: 160px; } .h-full { height: 100%; } .h-fit { height: fit-content; }
.max-w-none { max-width: none; } .max-w-sm { max-width: 384px; } .max-w-md { max-width: 448px; }
.max-w-lg { max-width: 512px; } .max-w-2xl { max-width: 672px; } .max-w-5xl { max-width: 1024px; }
.min-h-screen { min-height: 100vh; }
.max-h-24 { max-height: 96px; } .max-h-32 { max-height: 128px; } .max-h-40 { max-height: 160px; }

/* ==== مسافات: padding/margin ==== */
.p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; }
.p-5 { padding: 20px; } .p-6 { padding: 24px; } .p-8 { padding: 32px; } .p-10 { padding: 40px; }
.px-2 { padding-left: 8px; padding-right: 8px; } .px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; } .px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; } .px-8 { padding-left: 32px; padding-right: 32px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; } .py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; } .py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; } .py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; } .py-12 { padding-top: 48px; padding-bottom: 48px; }
.pb-2 { padding-bottom: 8px; } .pb-4 { padding-bottom: 16px; }
.pt-3 { padding-top: 12px; } .pt-6 { padding-top: 24px; }
.pr-3 { padding-right: 12px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mb-10 { margin-bottom: 40px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; } .-mt-3 { margin-top: -12px; }
.my-3 { margin-top: 12px; margin-bottom: 12px; } .my-4 { margin-top: 16px; margin-bottom: 16px; } .my-6 { margin-top: 24px; margin-bottom: 24px; }
.mx-1 { margin-left: 4px; margin-right: 4px; } .mx-auto { margin-left: auto; margin-right: auto; }
.ml-2 { margin-left: 8px; } .mr-1 { margin-right: 4px; } .mr-6 { margin-right: 24px; } .mr-8 { margin-right: 32px; }
.space-y-1 > * + * { margin-top: 4px; } .space-y-2 > * + * { margin-top: 8px; } .space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; } .space-y-6 > * + * { margin-top: 24px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-reverse > * + * { margin-left: 0; margin-right: 8px; }
.divide-y > * + * { border-top: 1px solid #e5e7eb; }

/* ==== ألوان الخلفية ==== */
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-purple-100 { background-color: #ede9fe; }
.bg-purple-600 { background-color: #7c3aed; }
.bg-green-100 { background-color: #dcfce7; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-600 { background-color: #dc2626; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-opacity-60 { opacity: 0.94; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:opacity-90:hover { opacity: 0.9; }

/* ==== ألوان النص ==== */
.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-300 { color: #93c5fd; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-green-800 { color: #166534; }
.text-purple-700 { color: #6d28d9; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-yellow-600 { color: #ca8a04; }
.text-yellow-700 { color: #a16207; }
.hover\:text-blue-200:hover { color: #bfdbfe; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:underline:hover { text-decoration: underline; }

/* ==== خط ==== */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.font-mono { font-family: 'Courier New', monospace; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-4xl { font-size: 36px; }
.text-5xl { font-size: 48px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.list-none { list-style: none; padding: 0; margin: 0; }

/* ==== حدود وظلال ==== */
.border { border: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-r-2 { border-right: 2px solid #e5e7eb; }
.border-r-4 { border-right: 4px solid #e5e7eb; }
.rounded { border-radius: 6px; }
.rounded-l { border-radius: 6px 0 0 6px; }
.rounded-r { border-radius: 0 6px 6px 0; }
.rounded-lg { border-radius: 10px; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05); }
.ring-2 { box-shadow: 0 0 0 2px currentColor; }
.ring-blue-600 { color: #2563eb; }

/* ==== صور ومحتوى ==== */
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.opacity-80 { opacity: 0.8; }
.cursor-pointer { cursor: pointer; }
.prose { max-width: 65ch; line-height: 1.8; }
.prose h2, .prose h3 { margin-top: 1.4em; margin-bottom: 0.6em; }
.prose p { margin: 0.9em 0; }
.prose img { border-radius: 8px; margin: 12px 0; }
.prose blockquote { border-right: 3px solid #d1d5db; padding-right: 12px; color: #6b7280; }

/* ==== شاشات صغيرة ==== */
@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-6 { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3, .col-span-4 { grid-column: span 1; }
}
