/* Local Fonts Fallback - No external internet requests */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    
    /* Mofid Deep Midnight Navy */
    --primary: #0c2340;
    --primary-hover: #16335a;
    --primary-light: #1e3a5f;
    --primary-dark: #07172b;
    
    /* Mofid Persian Turquoise / Teal */
    --teal: #0d9488;
    --teal-hover: #0f766e;
    --teal-light: #14b8a6;
    --teal-soft: rgba(13, 148, 136, 0.1);
    --teal-glow: rgba(13, 148, 136, 0.25);
    
    /* Mofid Gold / Warm Amber */
    --accent: #d97706;
    --accent-hover: #b45309;
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-soft: rgba(245, 158, 11, 0.12);
    --gold-glow: rgba(217, 119, 6, 0.25);
    
    --success: #059669;
    --warning: #f59e0b;
    --danger: #e11d48;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px 0 rgba(12, 35, 64, 0.05);
    --shadow-md: 0 4px 12px -1px rgba(12, 35, 64, 0.08), 0 2px 4px -1px rgba(12, 35, 64, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(12, 35, 64, 0.12), 0 4px 6px -2px rgba(12, 35, 64, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul, ol { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: rgba(12, 35, 64, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 2px solid var(--teal);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(7, 23, 43, 0.18);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
}
.brand-mark {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--teal), #0284c7);
    color: white;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px var(--teal-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff;
    line-height: 1.2;
    display: flex;
    align-items: center;
}
.brand-tag {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.nav-link {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}
.nav-link:hover { 
    color: #ffffff; 
    background: rgba(13, 148, 136, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.45rem;
    line-height: 1.4;
    user-select: none;
    vertical-align: middle;
}
.btn:hover {
    text-decoration: none;
}
.btn:active {
    transform: translateY(1px) !important;
}

/* Primary Button */
.btn-primary { 
    background: linear-gradient(135deg, var(--teal), #0f766e); 
    color: #ffffff !important; 
    border-color: transparent;
    box-shadow: 0 4px 14px var(--teal-glow); 
}
.btn-primary:hover { 
    background: linear-gradient(135deg, #14b8a6, var(--teal)); 
    color: #ffffff !important;
    transform: translateY(-2px); 
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35); 
}

/* Secondary Button - Return, Cancel, Neutral Actions */
.btn-secondary {
    background: #ffffff;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a !important;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Outline Button - Light Theme Default */
.btn-outline { 
    background: #ffffff;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.btn-outline:hover { 
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Header-scoped Outline Button (White & Translucent on dark background) */
.site-header .btn-outline { 
    border-color: rgba(255, 255, 255, 0.25); 
    color: #ffffff; 
    background: rgba(255, 255, 255, 0.08); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
}
.site-header .btn-outline:hover { 
    background: rgba(255, 255, 255, 0.2); 
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Accent Button */
.btn-accent { 
    background: linear-gradient(135deg, var(--gold), var(--accent)); 
    color: #0c2340 !important; 
    font-weight: 800;
    box-shadow: 0 4px 14px var(--gold-glow);
}
.btn-accent:hover { 
    background: linear-gradient(135deg, #fbbf24, var(--gold));
    color: #0c2340 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

/* Ghost Button */
.btn-ghost { 
    background: transparent; 
    color: #475569; 
    border-color: transparent;
}
.btn-ghost:hover { 
    background: #f1f5f9; 
    color: #0f172a;
}
.site-header .btn-ghost {
    color: #cbd5e1;
}
.site-header .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

/* Button Sizes */
.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.825rem;
    border-radius: 6px;
}
.btn-lg {
    padding: 0.85rem 1.85rem;
    font-size: 1.05rem;
    border-radius: 10px;
}

/* Back / Return Link Button Utility */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: #ffffff;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.btn-back:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0c2340 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Main Page content */
.page { padding: 3rem 0; min-height: calc(100vh - 160px); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 3rem; padding: 2rem 0; }
.hero-content { flex: 1 1 400px; }
.hero-title { font-size: 2.5rem; font-weight: 800; line-height: 1.3; margin-bottom: 1rem; color: var(--text-main); }
.hero-title span { color: var(--primary); }
.hero-sub { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Grid */
.grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.02);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h2, .card h3, .card h4 { margin-top: 0; color: var(--text-main); font-weight: 700; }

/* Forms */
.form-card { max-width: 480px; margin: 2rem auto; padding: 2.5rem; border-radius: var(--radius-lg); }
.form-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
input.form-control, select.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #fcfcfc;
    transition: all 0.2s;
}
input.form-control:focus, select.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); background: #fff; }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-weight: 500; font-size: 0.95rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Table */
.table-wrapper { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th, .table td { padding: 1.25rem 1rem; text-align: right; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.table th { background: #f9fafb; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.85rem; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-approved { background: #d1fae5; color: #059669; }
.badge-student { background: #e0e7ff; color: #4338ca; }
.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.18);
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; background: white; text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-top: auto; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
    }
    .nav.active { display: flex; }
    .hero { flex-direction: column; }
    .hero-title { font-size: 2rem; }
    .brand-mark { width: 40px; height: 40px; font-size: 1.2rem; }
    .form-card { padding: 1.5rem; margin: 1rem; }
}
/* Tabs Navigation */
.tabs-container {
    margin-top: 1rem;
}
.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tab-buttons::-webkit-scrollbar {
    display: none;
}
.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tab-btn:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhancements for Dashboard UI */
.dashboard-header {
    background: linear-gradient(135deg, var(--bg-card), #f8fafc);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar {
    width: 8px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hover Effects for Interactive Elements */
.interactive-hover {
    transition: all 0.3s ease;
}
.interactive-hover:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}
.status-dot.active { background: #10b981; }
.status-dot.pending { background: #f59e0b; }
.status-dot.inactive { background: #ef4444; }

/* Responsive Grid Improvements */
@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .btn, .tab-buttons {
        display: none;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* --- Persian Datepicker Custom Styling & Responsiveness --- */
.datepicker-plot-area {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    background-color: #ffffff !important;
    padding: 10px !important;
    z-index: 100000 !important; /* Above any modal */
}
.datepicker-plot-area .datepicker-day-view .table-days td span {
    border-radius: var(--radius-sm) !important;
    transition: all 0.2s ease;
}
.datepicker-plot-area .datepicker-day-view .table-days td.selected span {
    background-color: var(--primary) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
}
.datepicker-plot-area .datepicker-day-view .table-days td.today span {
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
}

@media (max-width: 768px) {
    .datepicker-plot-area {
        width: 300px !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
        border: 2px solid #cbd5e1 !important;
    }
}

/* --- Pagination Styling --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    background-color: white;
}
.pagination-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}
.pagination-link.active {
    background: #2a5298;
    color: white;
    border-color: #1e3c72;
}
.pagination-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* --- Custom Styled Alerts and Confirms --- */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-dialog-overlay.active {
    opacity: 1;
}

.custom-dialog-box {
    background: var(--bg-card);
    width: 92%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', system-ui, sans-serif;
}
.custom-dialog-overlay.active .custom-dialog-box {
    transform: scale(1) translateY(0);
}

.custom-dialog-header {
    padding: 1.75rem 1.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.custom-dialog-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* State-specific styling */
.custom-dialog-icon.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.custom-dialog-icon.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.custom-dialog-icon.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.custom-dialog-icon.info {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.custom-dialog-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.custom-dialog-body {
    padding: 0 1.75rem 1.75rem;
    color: var(--text-muted);
    font-size: 0.975rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.custom-dialog-footer {
    background: #f8fafc;
    padding: 1.25rem 1.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem;
    border-top: 1px solid var(--border);
}

.custom-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
}

.custom-dialog-btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
}
.custom-dialog-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}
.custom-dialog-btn-primary:active {
    transform: translateY(0);
}

.custom-dialog-btn-danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15);
}
.custom-dialog-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, var(--danger));
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.25);
}
.custom-dialog-btn-danger:active {
    transform: translateY(0);
}

.custom-dialog-btn-secondary {
    background-color: white;
    border-color: var(--border);
    color: var(--text-main);
}
.custom-dialog-btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* ==========================================================================
   Modern Form Controls (Inputs, Selects, Textareas, Input-Groups)
   ========================================================================== */
.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.45rem;
}

.form-control, 
textarea.form-control, 
input.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.form-control:hover, 
textarea.form-control:hover, 
input.form-control:hover {
    border-color: #94a3b8;
    background-color: #fbfcfd;
}

.form-control:focus, 
textarea.form-control:focus, 
input.form-control:focus {
    border-color: var(--primary, #2563eb);
    background-color: #ffffff;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.86rem;
}

textarea.form-control {
    min-height: 90px;
    line-height: 1.6;
    resize: vertical;
}

/* Custom Select Dropdown with RTL Left Arrow */
.form-select {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.85rem center;
    background-size: 14px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-sizing: border-box;
}

.form-select:hover {
    border-color: #94a3b8;
    background-color: #fbfcfd;
}

.form-select:focus {
    border-color: var(--primary, #2563eb);
    background-color: #ffffff;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-select-sm, .form-control-sm {
    padding: 0.5rem 0.85rem 0.5rem 2.2rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Input Groups for Combined Search Bars */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .btn {
    position: relative;
    z-index: 2;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    white-space: nowrap;
}

.input-group > .btn + .btn {
    margin-right: -1px;
}

.input-group-sm > .form-control {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-sm > .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.84rem;
    border-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}



