/* Tailwind-lite: local fallback covering common utilities used in the app.
   This is not a full Tailwind build but recreates the most-used classes
   so the UI stays styled without CDN access. */

/* Base reset */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

a { color: inherit; text-decoration: none; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flex/Grid helpers */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.max-w-7xl { max-width: 80rem; }
.min-h-screen { min-height: 100vh; }

/* Margin */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

/* Padding */
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Border & radius */
.border { border: 1px solid #e5e7eb; }
.border-2 { border: 2px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-slate-200 { border-color: #e2e8f0; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text colors */
.text-white { color: #ffffff; }
.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-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-purple-500 { color: #a855f7; }
.text-purple-600 { color: #7c3aed; }
.text-green-600 { color: #16a34a; }
.text-yellow-700 { color: #b45309; }
.text-orange-600 { color: #ea580c; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-900 { color: #0f172a; }
.text-red-600 { color: #dc2626; }

/* Background colors */
.bg-white { background-color: #ffffff; }
.bg-transparent { background-color: transparent; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-600 { background-color: #2563eb; color: #fff; }
.bg-blue-500 { background-color: #3b82f6; color: #fff; }
.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-purple-500 { background-color: #a855f7; color: #fff; }
.bg-purple-600 { background-color: #7c3aed; color: #fff; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-600 { background-color: #16a34a; color: #fff; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-yellow-700 { background-color: #a16207; color: #fff; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-[#FFF5F7] { background-color: #fff5f7; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-from, #6366f1), var(--tw-gradient-to, #8b5cf6)); color: #fff; }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from, #6366f1), var(--tw-gradient-to, #8b5cf6)); color: #fff; }
.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-to: rgba(37, 99, 235, 0); }
.from-purple-600 { --tw-gradient-from: #7c3aed; --tw-gradient-to: rgba(124, 58, 237, 0); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-to: rgba(79, 70, 229, 0); }
.to-blue-500 { --tw-gradient-to: #3b82f6; }
.to-purple-600 { --tw-gradient-to: #7c3aed; }
.to-pink-500 { --tw-gradient-to: #ec4899; }
.to-indigo-700 { --tw-gradient-to: #4338ca; }

/* Borders/rings */
.ring-4 { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.ring-purple-100 { box-shadow: 0 0 0 4px #f3e8ff; }
.outline-none { outline: 0; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6); outline: 0; }
.focus\:ring-blue-500:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6); outline: 0; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Transitions */
.transition-colors { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.transition-all { transition: all 200ms ease; }

/* Hover/active states */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; color: #fff; }
.hover\:bg-blue-600:hover { background-color: #2563eb; color: #fff; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-blue-600:hover { color: #2563eb; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Borders for chips/badges */
.uppercase { text-transform: uppercase; }

/* Misc sizing/spacing */
.ring-offset-2 { box-shadow: 0 0 0 2px #fff, 0 0 0 calc(2px + 2px) rgba(59,130,246,0.45); }

/* Buttons/disabled */
.disabled\:opacity-50:disabled { opacity: 0.5; cursor: not-allowed; }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity:1; transform:none; } }
.animate-fade-in { animation: fade-in 250ms ease-out; }
@keyframes slide-up { from { transform: translateY(16px); opacity:0; } to { transform:none; opacity:1; } }
.animate-slide-up { animation: slide-up 220ms ease-out; }

/* Lists & misc */
.list-none { list-style: none; padding: 0; margin: 0; }
.break-words { word-break: break-word; }
.whitespace-nowrap { white-space: nowrap; }

/* Alignment helpers */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Rounded chip/backdrop helpers */
.backdrop-blur { backdrop-filter: blur(6px); }

/* Simple badge styles for statuses */
.status-completed { background: #dcfce7; color: #166534; }
.status-pending { background: #fef9c3; color: #b45309; }
