/* ==========================================================================
   Al-Maktab — UX & Accessibility Design System (Module 20)
   Authentic Bangladeshi Typography, Large Touch Targets, Accessible States
   ========================================================================== */

/* Load Noto Sans Bengali for universal fallback */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

:root {
    --font-bengali: 'SolaimanLipi', 'Kalpurush', 'Nikosh', 'Noto Sans Bengali', system-ui, sans-serif;
    --touch-min-size: 48px;
}

/* Global Bengali Typography */
body, 
.fi-body,
.filament-main,
.fi-layout,
input, 
select, 
textarea, 
button {
    font-family: var(--font-bengali) !important;
}

.fi-body {
    line-height: 1.7 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Touch & Tablet Optimization (Minimum 48px touch targets)
   ========================================================================== */

/* Primary, Secondary, Action Buttons */
.fi-btn,
.btn,
button.fi-btn,
a.fi-btn {
    min-height: var(--touch-min-size) !important;
    font-size: 0.975rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    border-radius: 0.625rem !important;
    transition: all 0.15s ease-in-out !important;
}

.fi-btn:active,
.btn:active {
    transform: scale(0.98);
}

/* Form Inputs & Selects */
.fi-input-wrp,
.fi-select-input,
.form-control,
.fi-input-wrp input,
.fi-input-wrp select {
    min-height: var(--touch-min-size) !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
}

/* Navigation items in sidebar */
.fi-sidebar-item-button,
.fi-sidebar-group-button {
    min-height: 44px !important;
    font-size: 0.95rem !important;
    border-radius: 0.5rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Pagination & standalone table actions */
.fi-pagination-item-button,
.table-action {
    min-height: 40px !important;
    min-width: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Table action buttons inside tables - compact & neat */
.fi-ta-actions .fi-btn,
.fi-ta-actions .fi-ta-action,
.fi-ta-cell .fi-btn {
    min-height: 32px !important;
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
    font-size: 0.8125rem !important;
    white-space: nowrap !important;
}

/* Table container full width */
.fi-ta-ctn {
    width: 100% !important;
}
.fi-ta-content {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Color-Coded Status System (Universal & Jargon-Free)
   ========================================================================== */

/* 🟢 Green / সম্পন্ন / পরিশোধিত (OK / Done) */
.badge-status-ok,
.status-paid,
.status-present,
.status-completed,
.status-approved {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* 🟡 Yellow / অপেক্ষমাণ (Pending / Due soon) */
.badge-status-pending,
.status-pending,
.status-late {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* 🔴 Red / জরুরি / বকেয়া (Urgent / Overdue / Absent) */
.badge-status-urgent,
.status-unpaid,
.status-overdue,
.status-absent,
.status-rejected {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* 🔵 Blue / নির্ধারিত (Scheduled / Info) */
.badge-status-info,
.status-scheduled {
    background-color: #f0f9ff !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ⚫ Grey / নিষ্ক্রিয় (Inactive / Disabled) */
.badge-status-inactive,
.status-inactive {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==========================================================================
   Touch-Friendly Action Card Layout (3-Tap Rule)
   ========================================================================== */
.action-card {
    min-width: 120px;
    min-height: 120px;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.action-card:active {
    transform: scale(0.97);
}

.action-card .card-icon {
    font-size: 2.25rem;
    line-height: 1;
}

.action-card .card-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
}

/* ==========================================================================
   Skeleton Screens & Shimmer Animations
   ========================================================================== */
@keyframes al-maktab-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 200% 100%;
    animation: al-maktab-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.dark .skeleton-shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 37%, #1e293b 63%);
    background-size: 200% 100%;
    animation: al-maktab-shimmer 1.5s ease-in-out infinite;
}

/* ==========================================================================
   Step Wizard Component Styles
   ========================================================================== */
.wizard-container {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wizard-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.wizard-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.wizard-step-pill.active {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.wizard-step-pill.completed {
    background-color: #f8fafc;
    color: #10b981;
}

.wizard-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   Filament Custom Pages Layout & Utility Support
   ========================================================================== */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.grid { display: grid; }
.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)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .sm\:grid-cols-12 { grid-template-columns: repeat(12, 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)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.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; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; }

.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-12 { padding: 3rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }

.border { border-width: 1px; border-style: solid; border-color: rgba(51, 65, 85, 0.6); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: rgba(51, 65, 85, 0.6); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(51, 65, 85, 0.6); }

.border-slate-800 { border-color: rgba(51, 65, 85, 0.7); }
.border-slate-700 { border-color: rgba(71, 85, 105, 0.8); }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }
.border-emerald-500\/30 { border-color: rgba(16, 185, 129, 0.3); }
.border-emerald-500\/40 { border-color: rgba(16, 185, 129, 0.4); }
.border-red-500\/30 { border-color: rgba(239, 68, 68, 0.3); }
.border-red-500\/40 { border-color: rgba(239, 68, 68, 0.4); }
.border-amber-500\/30 { border-color: rgba(245, 158, 11, 0.3); }
.border-amber-500\/40 { border-color: rgba(245, 158, 11, 0.4); }

.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/60,
.bg-slate-900\/80,
.bg-slate-900\/90 { background-color: rgba(15, 23, 42, 0.85); }
.bg-slate-950\/60 { background-color: rgba(2, 6, 23, 0.6); }
.bg-slate-800 { background-color: #1e293b; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-500\/20 { background-color: rgba(16, 185, 129, 0.2); }
.bg-emerald-500\/80 { background-color: rgba(16, 185, 129, 0.8); }
.bg-emerald-950\/20,
.bg-emerald-950\/60 { background-color: rgba(6, 78, 59, 0.3); }
.bg-red-500 { background-color: #ef4444; }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.1); }
.bg-red-500\/20 { background-color: rgba(239, 68, 68, 0.2); }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-500\/10 { background-color: rgba(245, 158, 11, 0.1); }
.bg-amber-500\/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-rose-500 { background-color: #f43f5e; }
.bg-rose-500\/20 { background-color: rgba(244, 63, 94, 0.2); }
.bg-teal-500\/20 { background-color: rgba(20, 184, 166, 0.2); }

.text-white { color: #ffffff !important; }
.text-slate-100 { color: #f1f5f9 !important; }
.text-slate-200 { color: #e2e8f0 !important; }
.text-slate-300 { color: #cbd5e1 !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-emerald-300 { color: #6ee7b7 !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-emerald-500 { color: #10b981 !important; }
.text-teal-300 { color: #5eead4 !important; }
.text-teal-400 { color: #2dd4bf !important; }
.text-amber-300 { color: #fcd34d !important; }
.text-amber-400 { color: #fbbf24 !important; }
.text-amber-500 { color: #f59e0b !important; }
.text-red-400 { color: #f87171 !important; }
.text-red-500 { color: #ef4444 !important; }
.text-rose-300 { color: #fda4af !important; }
.text-rose-400 { color: #fb7185 !important; }

.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-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.h-2 { height: 0.5rem; }
.h-40 { height: 10rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3); }

/* ==========================================================================
   Filament Layout: Full Height & Bottom Screen Footer
   ========================================================================== */
.fi-layout {
    min-height: 100vh !important;
}

.fi-main-ctn {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.fi-main {
    flex: 1 0 auto !important;
}

.fi-footer-bar {
    margin-top: auto !important;
    width: 100% !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

