/* =========================================
   Modern Theme for Blazor App (Arabic RTL)
   ========================================= */

/* --- 1. Typography & Global --- */
body {
    font-family: 'Cairo', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background-color: #f8f9fa;
    color: #2d3748;
}

/* --- 2. Sidebar (NavMenu) --- */
.sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar .top-row {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item a {
    color: #cbd5e1 !important;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.3s ease;
    padding: 10px 16px;
}

.sidebar .nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    transform: translateX(-4px); /* RTL hover move */
}

.sidebar .nav-item a.active {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* --- 3. Top Header / Navbar --- */
.top-row {
    background-color: rgba(255, 255, 255, 0.8) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* --- 4. Cards & Containers --- */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    padding: 1rem 1.25rem;
}

/* --- 5. Buttons --- */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}

/* --- 6. Inputs & Forms --- */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- 7. Tables --- */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 16px;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* --- 8. Modals --- */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    border-radius: 16px 16px 0 0;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
}

/* --- 9. Badges & Small Elements --- */
.badge {
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-weight: 600;
}
