/* -----------------------------------------------------------------------
   Extended Custom Styles for Tanzeem Application
   ----------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   MUDBLAZOR COMPONENT OVERRIDES
   ---------------------------------------------------------------------- */

html,
body,
.mud-application,
.mud-typography,
.mud-button,
.mud-input,
.mud-input-control,
.mud-input-label,
.mud-table,
.mud-table-cell,
.mud-list,
.mud-list-item,
.mud-menu,
.mud-dialog,
.mud-snackbar,
input,
textarea,
select,
button {
    font-family: 'Jameel Noori Nastaleeq', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Navigation Menu Enhancements */
.mud-nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 4px 8px;
    border-radius: 12px;
}

.mud-nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(-3px);
}

.mud-nav-link.active {
    color: white !important;
    background: linear-gradient(135deg, #d4af37 0%, #ffa726 100%) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.mud-nav-item, .mud-nav-group {
    border-bottom: none !important;
    padding: 4px 0;
}

.mud-nav-group {
    margin: 4px 0;
}

.mud-nav-group-header:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* MudBlazor Input RTL Adjustments */
.mud-input-root {
    direction: rtl;
}

.mud-input-label {
    right: 14px !important;
    left: auto !important;
    transform-origin: top right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

.mud-input-outlined-label {
    right: 14px !important;
    left: auto !important;
}

.mud-input-adornment {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

.mud-input-adornment.mud-input-adornment-start {
    margin-right: 8px !important;
    margin-left: 0 !important;
}

/* MudBlazor Select Dropdown RTL */
.mud-select-input {
    text-align: right !important;
    direction: rtl;
}

.mud-popover {
    direction: rtl;
}

.mud-list-item {
    direction: rtl;
    text-align: right;
}

/* MudBlazor Dialog RTL */
.mud-dialog {
    direction: rtl;
}

.mud-dialog-title {
    text-align: right;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

.mud-dialog-content {
    text-align: right;
    direction: rtl;
}

/* MudBlazor AppBar Enhancements */
.mud-appbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(27, 94, 32, 0.12) !important;
}

/* MudBlazor Drawer Professional Styling */
.mud-drawer {
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1) !important;
}

.mud-drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* MudBlazor Card Enhancements */
.mud-card {
    border-radius: 16px !important;
    transition: all 0.3s ease;
}

.mud-card:hover {
    box-shadow: 0 8px 24px rgba(27, 94, 32, 0.15) !important;
}

.mud-card-header {
    padding: 20px !important;
    border-bottom: 1px solid #e5e9e7;
}

.mud-card-content {
    padding: 24px !important;
}

/* MudBlazor Button Enhancements */
.mud-button-filled-primary {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%) !important;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
    transition: all 0.3s ease !important;
}

.mud-button-filled-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4) !important;
}

.mud-button-filled-success {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%) !important;
}

.mud-button-filled-error {
    background: linear-gradient(135deg, #e53935 0%, #ef5350 100%) !important;
}

/* MudBlazor Snackbar RTL */
.mud-snackbar {
    direction: rtl;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

.mud-snackbar-content-message {
    text-align: right;
}

/* MudBlazor Table Enhancements */
.mud-table-root {
    border-radius: 16px;
    overflow: hidden;
}

.mud-table-container {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(27, 94, 32, 0.08);
}

/* MudBlazor Pagination RTL */
.mud-pagination {
    direction: rtl;
}

.mud-pagination-item {
    font-family: 'Jameel Noori Nastaleeq', serif;
}

/* ----------------------------------------------------------------------
   CUSTOM COMPONENT CLASSES
   ---------------------------------------------------------------------- */

/* Professional Header Banner */
.page-header-banner {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
    color: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(27, 94, 32, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.page-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    border-radius: 50%;
}

/* Dashboard Welcome Card */
.dashboard-welcome-card {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-radius: 24px;
    padding: 48px;
    color: #fff;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(27, 94, 32, 0.3);
}

.dashboard-welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
    animation: pulse-glow 6s ease-in-out infinite;
}

/* Quick Action Cards */
.quick-action-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(27, 94, 32, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.quick-action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(27, 94, 32, 0.16);
    border-color: #2e7d32;
}

.quick-action-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
}

/* Form Section Card */
.form-section-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(27, 94, 32, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #e5e9e7;
}

.form-section-header {
    background: linear-gradient(135deg, #f8faf9 0%, #e8f5e9 100%);
    padding: 16px 24px;
    border-bottom: 2px solid #2e7d32;
    font-family: 'Jameel Noori Nastaleeq', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #1b5e20;
}

.form-section-body {
    padding: 24px;
}

/* Data Table Container */
.data-table-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(27, 94, 32, 0.08);
    overflow: hidden;
}

/* Search & Filter Bar */
.search-filter-bar {
    background: #f8faf9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e9e7;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Jameel Noori Nastaleeq', serif;
}

.status-badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge-warning {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-badge-error {
    background-color: #ffebee;
    color: #c62828;
}

.status-badge-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Icon Badge */
.icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

/* Utility Classes */
.blue-underlined-text {
    color: #29b6f6 !important;
    text-decoration: underline !important;
}

.gold-accent {
    color: #d4af37 !important;
}

.green-accent {
    color: #2e7d32 !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #718096;
}

.empty-state-icon {
    font-size: 4rem;
    color: #cbd5d0;
    margin-bottom: 16px;
}

.empty-state-text {
    font-family: 'Jameel Noori Nastaleeq', serif;
    font-size: 1.1rem;
}

/* ----------------------------------------------------------------------
   ANIMATIONS
   ---------------------------------------------------------------------- */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hover-lift:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

/* ----------------------------------------------------------------------
   PRINT STYLES
   ---------------------------------------------------------------------- */
@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }
    
    .mud-main-content {
        padding: 0 !important;
    }
    
    body {
        background: white !important;
    }
}
