/* ═══════════════════════════════════════════════════════════════════════
   Professional Page Styling for All Pages
   Consistent Design Across Application
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   PROFESSIONAL PAGE HEADER
   ────────────────────────────────────────────────────────────────────── */
.page-header-banner {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
    color: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(27, 94, 32, 0.25);
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    animation: slideInDown 0.6s ease-out;
}

.page-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 8s ease-in-out infinite;
}

.page-header-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
    border-radius: 50%;
    animation: pulse-glow 10s ease-in-out infinite reverse;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.page-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.page-header-text {
    flex: 1;
}

.page-header-title {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 2rem !important;
}

.page-header-subtitle {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    color: rgba(255, 255, 255, 0.9) !important;
    opacity: 0.9;
}

.page-header-actions {
    position: relative;
    z-index: 10;
}

.page-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-header-toolbar .page-header-content {
    flex: 1;
}

.tracking-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ──────────────────────────────────────────────────────────────────────
   PROFESSIONAL FORM CARDS
   ────────────────────────────────────────────────────────────────────── */
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(27, 94, 32, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.1);
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.form-card:hover {
    box-shadow: 0 8px 24px rgba(27, 94, 32, 0.12);
    transform: translateY(-2px);
}

.form-card-header {
    background: linear-gradient(135deg, #f8faf9 0%, #e8f5e9 100%);
    border-bottom: 2px solid #2e7d32;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.form-card-header-icon .mud-icon-root {
    color: white !important;
}

.form-card-title {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 700 !important;
    color: #1b5e20 !important;
    font-size: 1.2rem !important;
    flex: 1;
}

.form-card-body {
    padding: 28px;
    direction: rtl;
    text-align: right;
}

.form-card-footer {
    padding: 20px 24px;
    background: #f8faf9;
    border-top: 1px solid #e5e9e7;
    direction: rtl;
}

/* ──────────────────────────────────────────────────────────────────────
   PROFESSIONAL TABLES
   ────────────────────────────────────────────────────────────────────── */
.professional-table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(27, 94, 32, 0.08);
}

.professional-table .mud-table-head {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

.professional-table .mud-table-head .mud-table-cell {
    color: white !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 700 !important;
    padding: 16px !important;
    text-align: center !important;
    border: none !important;
}

.professional-table tbody tr:nth-child(odd) {
    background-color: #f8faf9;
}

.professional-table tbody tr:nth-child(even) {
    background-color: white;
}

.professional-table tbody tr:hover {
    background-color: #e8f5e9 !important;
    transition: background-color 0.2s ease;
}

.professional-table .mud-table-cell {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #e5e9e7 !important;
    text-align: right !important;
}

/* ──────────────────────────────────────────────────────────────────────
   RTL INPUT FIELDS - PROFESSIONAL STYLING
   ────────────────────────────────────────────────────────────────────── */
.mud-input-root {
    direction: rtl !important;
}

.mud-input-label {
    right: 14px !important;
    left: auto !important;
    transform-origin: top right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

.mud-input-outlined-label {
    right: 14px !important;
    left: auto !important;
}

.mud-input-adornment.mud-input-adornment-start {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

.mud-input {
    text-align: right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

.mud-select-input {
    text-align: right !important;
    direction: rtl;
}

/* ──────────────────────────────────────────────────────────────────────
   PROFESSIONAL BUTTONS
   ────────────────────────────────────────────────────────────────────── */
.btn-professional {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%) !important;
    color: white !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-professional:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4) !important;
}

.btn-secondary-professional {
    background: white !important;
    color: #2e7d32 !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    border: 2px solid #2e7d32 !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    transition: all 0.3s ease !important;
}

.btn-secondary-professional:hover {
    background: #f1f5f4 !important;
    transform: translateY(-1px);
}

/* ──────────────────────────────────────────────────────────────────────
   STATUS BADGES & CHIPS
   ────────────────────────────────────────────────────────────────────── */
.status-badge-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Jameel Noori Nastaleeq', serif;
}

.status-badge-warning {
    background: #fff3e0;
    color: #f57c00;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Jameel Noori Nastaleeq', serif;
}

.status-badge-error {
    background: #ffebee;
    color: #c62828;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Jameel Noori Nastaleeq', serif;
}

.status-badge-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Jameel Noori Nastaleeq', serif;
}

/* ──────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

/* ──────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-header-banner {
        padding: 24px;
    }

    .page-header-content {
        flex-direction: column;
        text-align: center;
    }

    .page-header-icon {
        width: 64px;
        height: 64px;
    }

    .page-header-title {
        font-size: 1.5rem !important;
    }

    .page-header-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-toolbar .page-header-actions {
        text-align: center;
    }

    .form-card-body {
        padding: 20px;
    }

    .form-card-header {
        padding: 16px 20px;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ────────────────────────────────────────────────────────────────────── */
.urdu-font {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

.rtl-content {
    direction: rtl;
    text-align: right;
}

.text-center {
    text-align: center !important;
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.ref-badge {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid #c8e6c9;
    display: inline-block;
    font-family: monospace;
}

/* Unified MudPaper page headers */
.page-hero-paper {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 48px rgba(27, 94, 32, 0.25) !important;
}

.page-hero-paper .mud-typography,
.page-hero-paper .mud-icon-root,
.page-hero-paper .mud-button-root,
.page-hero-paper .mud-button-label,
.page-hero-paper .urdu-font,
.page-hero-paper h1,
.page-hero-paper h2,
.page-hero-paper h3,
.page-hero-paper h4,
.page-hero-paper h5,
.page-hero-paper h6 {
    color: #fff !important;
}

.page-hero-paper .header-icon,
.page-hero-paper .rounded-lg[style*="rgba(255,255,255,0.1)"] {
    background: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px);
}

.page-hero-paper .mud-chip {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Shared cleanup for navigation and grid footers */
.mud-nav-item,
.mud-nav-group {
    border-bottom: 0 !important;
}

.mud-drawer .mud-divider,
.mud-navmenu .mud-divider {
    display: none !important;
}

.mud-table-pagination,
.mud-table-pager,
.mud-data-grid-pager,
.mud-table-pagination-toolbar,
.mud-table .border-t,
.mud-table tfoot,
.data-table-wrapper .mud-table-pagination {
    border-top: 0 !important;
}

.mud-table-pagination {
    min-height: 58px;
    overflow: visible !important;
}

.mud-table-pagination .mud-toolbar,
.mud-table-pagination .mud-table-pagination-toolbar {
    min-height: 58px;
    overflow: visible !important;
}

.mud-table-pagination .mud-select,
.mud-table-pagination .mud-input-control,
.mud-table-pagination .mud-input-control-input-container,
.mud-table-pagination .mud-input,
.mud-table-pagination .mud-input-slot {
    min-width: 84px;
    min-height: 40px;
    overflow: visible !important;
}

.mud-table-pagination .mud-select-input {
    height: auto !important;
    min-height: 40px;
    line-height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: center !important;
}

.mud-table-pagination .mud-table-pagination-caption,
.mud-table-pagination .mud-table-pagination-select {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    line-height: 2.2 !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

/* App-wide legacy MVC typography and table sizing parity */
html body .mud-table .mud-table-container .mud-table-cell,
html body .mud-table .mud-table-cell {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    padding: 6px 10px !important;
    text-align: right !important;
    vertical-align: middle !important;
}

html body .mud-table .table-header-beautified th,
html body .mud-table .table-header-beautified .mud-table-cell,
html body .mud-table .mud-table-head .mud-table-cell,
html body .mud-table thead .mud-table-cell {
    background-color: #f8fafc !important;
    color: #1b5e20 !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    white-space: nowrap !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

html body .mud-table tbody tr.row-premium-hover,
html body .mud-table tr.row-premium-hover {
    height: 58px !important;
    transition: background-color 0.2s ease !important;
}

html body .mud-table tbody tr.row-premium-hover:hover,
html body .mud-table tr.row-premium-hover:hover {
    background-color: #f0f7ff !important;
}

html body .mud-table .ref-badge,
html body .ref-badge {
    display: inline-block !important;
    padding: 0 6px !important;
    border: 1px solid #dbeafe !important;
    border-radius: 6px !important;
    background: #eff6ff !important;
    color: #1e40af !important;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 22px !important;
}

html body .mud-table .table-text-wrap,
html body .table-text-wrap {
    display: block !important;
    min-width: 240px;
    max-width: 360px;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

html body .mud-table .legacy-number-cell,
html body .mud-table .mud-table-cell[data-label*="نمبر"],
html body .mud-table .mud-table-cell[data-label*="رول"],
html body .mud-table .mud-table-cell[data-label*="رسید"],
html body .mud-table .mud-table-cell[data-label*="تاریخ"],
html body .mud-table .mud-table-cell[data-label*="شناختی"],
html body .mud-table .mud-table-cell[data-label*="رجسٹریشن"],
html body .mud-table .mud-table-cell[data-label*="الحاق"],
html body .mud-table .mud-table-cell[data-label*="حوالہ"],
html body .mud-table .mud-table-cell[data-label*="سیریل"] {
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

html body .mud-table .legacy-nowrap-cell {
    white-space: nowrap !important;
    min-width: 116px;
}

html body .mud-table .status-stack {
    min-width: 104px;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 4px 6px;
    align-items: center;
    justify-content: start;
    direction: rtl;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 12px !important;
}

html body .mud-table .status-stack > :nth-child(3) {
    grid-column: 1 / span 2;
    justify-self: start;
}

html body .mud-table .mud-icon-root,
html body .mud-table .status-stack .mud-icon-root {
    font-size: 20px !important;
}

html body .mud-table .actions-cell {
    white-space: nowrap !important;
    text-align: center !important;
}

html body .mud-table .photo-cell {
    width: 64px !important;
    min-width: 64px !important;
    text-align: center !important;
}

html body .mud-table .student-photo-frame {
    width: 50px !important;
    height: 50px !important;
}

.mud-input,
.mud-input-slot,
.mud-select-input,
.mud-list-item {
    font-size: 14px !important;
}

.mud-table-pagination .mud-table-pagination-caption,
.mud-table-pagination .mud-table-pagination-select,
.mud-table-pagination .mud-select-input {
    font-size: 14px !important;
}

/* Compact drawer/menu spacing */
.mud-drawer .mud-navmenu {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    direction: rtl !important;
    text-align: right !important;
}

.mud-drawer .mud-nav-item,
.mud-drawer .mud-nav-group {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 0 !important;
}

.mud-drawer .mud-nav-link,
.mud-drawer .mud-nav-group-header {
    width: calc(100% - 10px) !important;
    min-height: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 10px 0 8px !important;
    margin: 1px 5px !important;
    border-radius: 8px !important;
    line-height: 1.35 !important;
    direction: rtl !important;
    text-align: right !important;
}

.mud-drawer .mud-nav-link-content,
.mud-drawer .mud-nav-group-header .mud-nav-link-content {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    text-align: right !important;
}

.mud-drawer .mud-nav-link-text {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 140px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: right !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.mud-drawer .mud-nav-link .mud-icon-root,
.mud-drawer .mud-nav-group-header .mud-icon-root {
    flex: 0 0 24px !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    margin: 0 0 0 6px !important;
    padding: 0 !important;
    font-size: 1.35rem !important;
}

.mud-drawer .mud-nav-group .mud-collapse-wrapper,
.mud-drawer .mud-nav-group .mud-collapse-wrapper-inner,
.mud-drawer .mud-nav-group .mud-collapse-container,
.mud-drawer .mud-nav-group .mud-navmenu {
    padding: 0 !important;
    margin: 0 !important;
}

.mud-drawer .mud-nav-group .mud-nav-link {
    width: calc(100% - 14px) !important;
    min-height: 38px !important;
    height: 38px !important;
    margin: 1px 7px !important;
    padding: 0 10px 0 8px !important;
}

.mud-drawer .mud-nav-group-arrow,
.mud-drawer .mud-nav-link-expand-icon,
.mud-drawer .mud-nav-group-header .mud-icon-button-root {
    flex: 0 0 20px !important;
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
}

.mud-drawer .mud-navmenu.mud-navmenu-margin-normal,
.mud-drawer .mud-navmenu.mud-navmenu-margin-dense {
    margin: 0 !important;
}

/* Professional Urdu form labels */
.mud-input-label,
.mud-input-label-inputcontrol,
.entry-card .mud-input-label,
.entry-card .mud-input-label-inputcontrol,
.premium-input .mud-input-label,
.premium-input .mud-input-label-inputcontrol {
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    transform-origin: top right !important;
    white-space: nowrap !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.mud-input-outlined-label,
.mud-input-label label,
.premium-input .mud-input-outlined-label {
    white-space: nowrap !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Keep filter/form labels consistently on the top border instead of dropping into controls */
html body .mud-card-content .mud-input-control .mud-input-label,
html body .mud-card-content .mud-input-control .mud-input-label-inputcontrol,
html body .mud-card-content .mud-input-control .mud-input-outlined-label,
html body .form-card-body .mud-input-control .mud-input-label,
html body .form-card-body .mud-input-control .mud-input-label-inputcontrol,
html body .form-card-body .mud-input-control .mud-input-outlined-label,
html body .form-section-body .mud-input-control .mud-input-label,
html body .form-section-body .mud-input-control .mud-input-label-inputcontrol,
html body .form-section-body .mud-input-control .mud-input-outlined-label,
html body .card-body-professional .mud-input-control .mud-input-label,
html body .card-body-professional .mud-input-control .mud-input-label-inputcontrol,
html body .card-body-professional .mud-input-control .mud-input-outlined-label,
html body .mud-dialog-content .mud-input-control .mud-input-label,
html body .mud-dialog-content .mud-input-control .mud-input-label-inputcontrol,
html body .mud-dialog-content .mud-input-control .mud-input-outlined-label,
html body .data-table-search-bar .mud-input-control .mud-input-label,
html body .data-table-search-bar .mud-input-control .mud-input-label-inputcontrol,
html body .data-table-search-bar .mud-input-control .mud-input-outlined-label,
html body .premium-input .mud-input-label,
html body .premium-input .mud-input-label-inputcontrol,
html body .premium-input .mud-input-outlined-label {
    top: 0 !important;
    right: 14px !important;
    left: auto !important;
    transform: translateY(-9px) scale(0.88) !important;
    transform-origin: top right !important;
    background: #ffffff !important;
    padding: 0 6px !important;
    z-index: 3 !important;
    line-height: 1.25 !important;
    pointer-events: none !important;
}

html body .mud-card-content .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .mud-card-content .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .mud-card-content .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .form-card-body .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .form-card-body .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .form-card-body .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .form-section-body .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .form-section-body .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .form-section-body .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .card-body-professional .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .card-body-professional .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .card-body-professional .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .mud-dialog-content .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .mud-dialog-content .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .mud-dialog-content .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .data-table-search-bar .mud-input-control .mud-input-label.mud-input-label-shrink,
html body .data-table-search-bar .mud-input-control .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .data-table-search-bar .mud-input-control .mud-input-outlined-label.mud-input-label-shrink,
html body .premium-input .mud-input-label.mud-input-label-shrink,
html body .premium-input .mud-input-label-inputcontrol.mud-input-label-shrink,
html body .premium-input .mud-input-outlined-label.mud-input-label-shrink {
    transform: translateY(-9px) scale(0.88) !important;
}

/* App-wide consistent textbox/dropdown sizing */
html body .mud-card-content .mud-input-control:not(:has(textarea)),
html body .form-card-body .mud-input-control:not(:has(textarea)),
html body .mud-dialog-content .mud-input-control:not(:has(textarea)),
html body .data-table-search-bar .mud-input-control:not(:has(textarea)),
html body .premium-input.mud-input-control:not(:has(textarea)) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

html body .mud-card-content .mud-input-control:not(:has(textarea)) .mud-input,
html body .form-card-body .mud-input-control:not(:has(textarea)) .mud-input,
html body .mud-dialog-content .mud-input-control:not(:has(textarea)) .mud-input,
html body .data-table-search-bar .mud-input-control:not(:has(textarea)) .mud-input,
html body .premium-input.mud-input-control:not(:has(textarea)) .mud-input {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 8px !important;
}

html body .mud-card-content .mud-input-control:not(:has(textarea)):not(.mud-select) .mud-input-slot,
html body .form-card-body .mud-input-control:not(:has(textarea)):not(.mud-select) .mud-input-slot,
html body .mud-dialog-content .mud-input-control:not(:has(textarea)):not(.mud-select) .mud-input-slot,
html body .data-table-search-bar .mud-input-control:not(:has(textarea)):not(.mud-select) .mud-input-slot,
html body .premium-input.mud-input-control:not(:has(textarea)):not(.mud-select) .mud-input-slot {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

html body .mud-card-content .mud-input-control:not(:has(textarea)) input,
html body .form-card-body .mud-input-control:not(:has(textarea)) input,
html body .mud-dialog-content .mud-input-control:not(:has(textarea)) input,
html body .data-table-search-bar .mud-input-control:not(:has(textarea)) input,
html body .premium-input.mud-input-control:not(:has(textarea)) input {
    height: 42px !important;
    min-height: 42px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

html body .mud-card-content .mud-input-control:not(:has(textarea)) .mud-input-adornment,
html body .form-card-body .mud-input-control:not(:has(textarea)) .mud-input-adornment,
html body .mud-dialog-content .mud-input-control:not(:has(textarea)) .mud-input-adornment,
html body .data-table-search-bar .mud-input-control:not(:has(textarea)) .mud-input-adornment,
html body .premium-input.mud-input-control:not(:has(textarea)) .mud-input-adornment {
    height: 42px !important;
    max-height: 42px !important;
}

/* Compact sizing only for buttons that opt in with an explicit class */
html body .btn-premium.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root),
html body .filter-action-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root),
html body .clear-filter-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root),
html body .app-compact-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) {
    min-height: 36px !important;
    height: auto !important;
    min-width: 128px !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-size: 0.92rem !important;
    line-height: 1.25 !important;
}

html body .btn-premium.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-button-label,
html body .filter-action-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-button-label,
html body .clear-filter-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-button-label,
html body .app-compact-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-button-label {
    gap: 6px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
}

html body .btn-premium.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-icon-root,
html body .filter-action-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-icon-root,
html body .clear-filter-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-icon-root,
html body .app-compact-btn.mud-button-root:not(.mud-icon-button):not(.mud-icon-button-root) .mud-icon-root {
    font-size: 1.15rem !important;
}

/* App-wide compact filter/search panels */
.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions),
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions),
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) {
    padding: 14px 24px 18px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) > .mud-grid,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) > .mud-grid,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) > .mud-grid {
    margin-top: -6px !important;
    margin-bottom: -6px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) > .mud-grid > .mud-grid-item,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) > .mud-grid > .mud-grid-item,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) > .mud-grid > .mud-grid-item {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .mud-input-control,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .mud-input-control,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .mud-input,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .mud-input,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-input {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 8px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .premium-input:not(.mud-select) .mud-input,
.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .premium-input:not(.mud-select) .mud-input-slot,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .premium-input:not(.mud-select) .mud-input,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .premium-input:not(.mud-select) .mud-input-slot,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .premium-input:not(.mud-select) .mud-input,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .premium-input:not(.mud-select) .mud-input-slot {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .premium-input input,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .premium-input input,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .premium-input input {
    height: 42px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 14px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .mud-input-adornment,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .mud-input-adornment,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-input-adornment {
    height: 42px !important;
    max-height: 42px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .mud-input-adornment .mud-icon-root,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .mud-input-adornment .mud-icon-root,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-input-adornment .mud-icon-root {
    font-size: 1.35rem !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .inquiry-actions,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .search-actions,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-grid-item:has(.clear-filter-btn) {
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 0 !important;
    padding-top: 8px !important;
}

.mud-card-content:has(> .mud-grid .premium-input):has(.inquiry-actions) .mud-button-label,
.mud-card-content:has(> .mud-grid .premium-input):has(.search-actions) .mud-button-label,
.form-card-body:has(> .mud-grid .premium-input):has(.clear-filter-btn) .mud-button-label {
    white-space: nowrap !important;
}

.data-table-search-bar {
    padding: 14px 18px !important;
}

.data-table-search-bar > .mud-grid > .mud-grid-item {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.data-table-search-bar .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.mud-table thead .mud-table-cell,
.mud-table thead th,
.mud-table .table-header-beautified .mud-table-cell,
.mud-table .table-header-beautified th {
    white-space: nowrap !important;
}

.mud-table tbody .mud-table-cell::before,
.mud-table td[data-label]::before {
    white-space: nowrap !important;
}

/* App-wide admission-style grids */
html body .mud-table {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(27, 94, 32, 0.10) !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

html body .mud-table-container {
    border-radius: 16px !important;
    overflow: auto !important;
    scrollbar-width: thin;
}

html body .mud-table table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

html body .mud-table .mud-table-head,
html body .mud-table thead,
html body .mud-table .table-header-beautified {
    background: #f8fafc !important;
}

html body .mud-table .mud-table-head .mud-table-cell,
html body .mud-table thead .mud-table-cell,
html body .mud-table thead th,
html body .mud-table .table-header-beautified th,
html body .mud-table .table-header-beautified .mud-table-cell {
    background: #f8fafc !important;
    color: #1b5e20 !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    text-align: right !important;
    vertical-align: middle !important;
    padding: 12px 10px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

html body .mud-table .mud-table-body .mud-table-row,
html body .mud-table tbody tr {
    height: 58px !important;
    transition: background-color 0.2s ease !important;
}

html body .mud-table .mud-table-body .mud-table-row:nth-child(odd),
html body .mud-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

html body .mud-table .mud-table-body .mud-table-row:nth-child(even),
html body .mud-table tbody tr:nth-child(even) {
    background-color: #f8faf9 !important;
}

html body .mud-table .mud-table-body .mud-table-row:hover,
html body .mud-table tbody tr:hover,
html body .mud-table tbody tr.row-premium-hover:hover,
html body .mud-table tr.row-premium-hover:hover {
    background-color: #f0f7ff !important;
}

html body .mud-table .mud-table-body .mud-table-cell,
html body .mud-table tbody .mud-table-cell,
html body .mud-table tbody td {
    color: #111827 !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    text-align: right !important;
    vertical-align: middle !important;
    padding: 6px 10px !important;
    border-bottom: 1px solid #e5e9e7 !important;
}

html body .mud-table .mud-table-body tr:last-child .mud-table-cell,
html body .mud-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

html body .mud-table .legacy-number-cell,
html body .mud-table .mud-table-cell[data-label*="نمبر"],
html body .mud-table .mud-table-cell[data-label*="رول"],
html body .mud-table .mud-table-cell[data-label*="رسید"],
html body .mud-table .mud-table-cell[data-label*="تاریخ"],
html body .mud-table .mud-table-cell[data-label*="شناختی"],
html body .mud-table .mud-table-cell[data-label*="رجسٹریشن"],
html body .mud-table .mud-table-cell[data-label*="الحاق"],
html body .mud-table .mud-table-cell[data-label*="حوالہ"],
html body .mud-table .mud-table-cell[data-label*="سیریل"],
html body .mud-table .mud-table-cell[data-label*="رقم"],
html body .mud-table .mud-table-cell[data-label*="وزن"] {
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

html body .mud-table .legacy-nowrap-cell,
html body .mud-table .nowrap-urdu {
    white-space: nowrap !important;
}

html body .mud-table .table-text-wrap {
    display: block !important;
    min-width: 240px !important;
    max-width: 360px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

html body .mud-table .ref-badge,
html body .ref-badge {
    display: inline-block !important;
    min-width: 48px;
    padding: 0 6px !important;
    border: 1px solid #dbeafe !important;
    border-radius: 6px !important;
    background: #eff6ff !important;
    color: #1e40af !important;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 22px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

html body .mud-table .status-stack {
    min-width: 104px !important;
    display: grid !important;
    grid-template-columns: repeat(2, max-content) !important;
    gap: 4px 6px !important;
    align-items: center !important;
    justify-content: start !important;
    direction: rtl !important;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 12px !important;
}

html body .mud-table .status-stack > :nth-child(3) {
    grid-column: 1 / span 2 !important;
    justify-self: start !important;
}

html body .mud-table .actions-cell {
    width: 188px !important;
    min-width: 144px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

html body .mud-table .action-icon-group {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    direction: ltr !important;
}

html body .mud-table .action-icon-btn,
html body .mud-table .mud-icon-button-root {
    border-radius: 8px !important;
}

html body .mud-table .mud-icon-root,
html body .mud-table .status-stack .mud-icon-root {
    font-size: 20px !important;
}

html body .mud-table .photo-cell {
    width: 64px !important;
    min-width: 64px !important;
    text-align: center !important;
}

html body .mud-table .student-photo-frame {
    width: 50px !important;
    height: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 1px solid #d7eadc !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

html body .mud-table .student-photo-frame img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    border: 0 !important;
}

html body .mud-table .mud-table-pagination,
html body .mud-table .mud-table-pager,
html body .mud-table tfoot {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

html body .mud-table .mud-table-pagination .mud-toolbar,
html body .mud-table .mud-table-pagination-toolbar {
    min-height: 58px !important;
    padding: 8px 14px !important;
}

html body .mud-table .row-canceled .mud-table-cell,
html body .mud-table tr.row-canceled td {
    background-color: #fff1f2 !important;
}

html body .mud-table .row-frozen .mud-table-cell,
html body .mud-table tr.row-frozen td {
    background-color: #eff6ff !important;
}

/* Tanzeem app-wide design unification layer */
:root {
    --tanzeem-green-900: #14532d;
    --tanzeem-green-800: #166534;
    --tanzeem-green-700: #1b5e20;
    --tanzeem-green-600: #2e7d32;
    --tanzeem-surface: #ffffff;
    --tanzeem-page: #f8faf9;
    --tanzeem-panel: #f8fafc;
    --tanzeem-border: #e2e8f0;
    --tanzeem-border-soft: #e5e9e7;
    --tanzeem-text: #111827;
    --tanzeem-muted: #64748b;
    --tanzeem-radius: 12px;
    --tanzeem-radius-sm: 8px;
    --tanzeem-shadow: 0 10px 30px rgba(27, 94, 32, 0.10);
    --tanzeem-shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
}

html,
body,
.mud-layout,
.mud-main-content {
    background: var(--tanzeem-page) !important;
}

html body .mud-main-content {
    padding: 18px 22px 28px !important;
}

html body .mud-main-content > div {
    width: 100% !important;
    max-width: 1600px !important;
}

html body .mud-container {
    width: 100% !important;
    max-width: 1600px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-top: 18px !important;
}

html body .animate-fade-in,
html body .animate-fade-in-up,
html body .animate-slide-in-down,
html body .animate-slide-in-right,
html body .page-header-banner,
html body .page-header-professional,
html body .form-card,
html body .mud-card,
html body .mud-paper {
    animation: none !important;
}

html body .mud-card:hover,
html body .form-card:hover,
html body .quick-action-card:hover,
html body .btn-professional:hover,
html body .btn-professional-primary:hover,
html body .btn-professional-accent:hover,
html body .btn-secondary-professional:hover,
html body .app-compact-btn:hover,
html body .btn-premium:hover,
html body .filter-action-btn:hover,
html body .clear-filter-btn:hover {
    transform: none !important;
}

html body .page-header-banner,
html body .page-header-professional,
html body .page-hero-paper {
    min-height: 104px !important;
    padding: 22px 28px !important;
    margin: 0 0 20px !important;
    border-radius: var(--tanzeem-radius) !important;
    background: linear-gradient(135deg, var(--tanzeem-green-700) 0%, var(--tanzeem-green-600) 100%) !important;
    box-shadow: var(--tanzeem-shadow) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

html body .page-header-banner::before,
html body .page-header-banner::after,
html body .page-header-professional::before,
html body .page-header-professional::after,
html body .page-hero-paper::before,
html body .page-hero-paper::after,
html body .dashboard-welcome-card::before {
    display: none !important;
}

html body .page-header-content {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
}

html body .page-header-icon,
html body .page-hero-paper .header-icon,
html body .page-hero-paper .rounded-lg[style*="rgba"],
html body .page-hero-paper .pa-4.rounded-lg {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .page-header-title,
html body .page-header-professional .page-header-title,
html body .page-hero-paper .mud-typography-h3,
html body .page-hero-paper .mud-typography-h4,
html body .page-hero-paper h3,
html body .page-hero-paper h4 {
    color: #ffffff !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

html body .page-header-subtitle,
html body .page-hero-paper .mud-typography-subtitle1,
html body .page-hero-paper .mud-typography-body2 {
    color: rgba(255, 255, 255, 0.88) !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 1rem !important;
    line-height: 1.35 !important;
    margin: 2px 0 0 !important;
}

html body .mud-card,
html body .form-card,
html body .card-professional,
html body .form-section-card,
html body .entry-card,
html body .table-panel,
html body .student-help-grid-panel,
html body .data-table-wrapper {
    background: var(--tanzeem-surface) !important;
    border: 1px solid var(--tanzeem-border) !important;
    border-radius: var(--tanzeem-radius) !important;
    box-shadow: var(--tanzeem-shadow) !important;
    overflow: hidden !important;
}

html body .entry-card,
html body .form-card,
html body .form-section-card {
    border-top: 4px solid #1f2937 !important;
}

html body .mud-card-header,
html body .form-card-header,
html body .card-header-professional,
html body .card-title-bar,
html body .form-section-header {
    min-height: 52px !important;
    padding: 12px 18px !important;
    background: var(--tanzeem-panel) !important;
    border-bottom: 1px solid var(--tanzeem-border) !important;
    color: var(--tanzeem-green-700) !important;
}

html body .mud-card-header .mud-typography,
html body .form-card-title,
html body .card-header-title,
html body .form-section-header {
    color: var(--tanzeem-green-700) !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

html body .mud-card-content,
html body .form-card-body,
html body .card-body-professional,
html body .form-section-body {
    padding: 20px !important;
}

html body .mud-grid {
    row-gap: 12px !important;
}

html body .mud-input-outlined,
html body .mud-input-root.mud-input-outlined {
    border-radius: 8px !important;
}

html body .mud-input-label,
html body .mud-input-label-inputcontrol,
html body .mud-input-outlined-label {
    color: var(--tanzeem-text) !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    max-width: none !important;
}

html body .mud-input,
html body .mud-input-slot,
html body .mud-select-input,
html body .mud-list-item {
    font-size: 14px !important;
}

html body .mud-button-filled-primary,
html body .mud-button-filled-success,
html body .btn-professional,
html body .btn-professional-primary,
html body .btn-premium {
    background: linear-gradient(135deg, var(--tanzeem-green-700) 0%, var(--tanzeem-green-600) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(27, 94, 32, 0.18) !important;
}

html body .clear-filter-btn,
html body .mud-button-root.clear-filter-btn,
html body .clear-filter-btn.mud-button-filled,
html body .clear-filter-btn.mud-button-outlined,
html body .clear-filter-btn.mud-button-text {
    background: linear-gradient(135deg, var(--tanzeem-green-700) 0%, var(--tanzeem-green-600) 100%) !important;
    border-color: var(--tanzeem-green-600) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(27, 94, 32, 0.18) !important;
}

html body .clear-filter-btn:hover {
    background: linear-gradient(135deg, var(--tanzeem-green-800) 0%, var(--tanzeem-green-700) 100%) !important;
    color: #ffffff !important;
}

html body .clear-filter-btn .mud-icon-root,
html body .clear-filter-btn .mud-button-label {
    color: inherit !important;
}

html body .mud-button-outlined,
html body .btn-secondary-professional {
    border-color: var(--tanzeem-green-600) !important;
    color: var(--tanzeem-green-700) !important;
    background: #ffffff !important;
}

html body .search-filter-bar,
html body .data-table-search-bar,
html body .totals-panel {
    background: var(--tanzeem-panel) !important;
    border: 1px solid var(--tanzeem-border) !important;
    border-radius: var(--tanzeem-radius-sm) !important;
    padding: 16px !important;
}

html body .mud-chip,
html body .status-badge,
html body .badge-professional {
    border-radius: 999px !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

html body .mud-dialog {
    border-radius: var(--tanzeem-radius) !important;
    overflow: hidden !important;
}

html body .mud-dialog-title {
    padding: 16px 20px !important;
    background: var(--tanzeem-panel) !important;
    border-bottom: 1px solid var(--tanzeem-border) !important;
}

html body .mud-dialog-content {
    padding: 20px !important;
}

html body .mud-dialog-actions {
    padding: 14px 20px 18px !important;
    border-top: 1px solid var(--tanzeem-border) !important;
}

@media (max-width: 960px) {
    html body .mud-main-content {
        padding: 12px !important;
    }

    html body .mud-container {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    html body .page-header-banner,
    html body .page-header-professional,
    html body .page-hero-paper {
        min-height: 86px !important;
        padding: 16px !important;
        gap: 12px !important;
    }

    html body .page-header-icon,
    html body .page-hero-paper .header-icon,
    html body .page-hero-paper .rounded-lg[style*="rgba"],
    html body .page-hero-paper .pa-4.rounded-lg {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    html body .page-header-title,
    html body .page-hero-paper .mud-typography-h3,
    html body .page-hero-paper .mud-typography-h4,
    html body .page-hero-paper h3,
    html body .page-hero-paper h4 {
        font-size: 1.35rem !important;
    }

    html body .mud-card-content,
    html body .form-card-body,
    html body .card-body-professional,
    html body .form-section-body {
        padding: 14px !important;
    }
}

/* Global MudSelect RTL repair */
html body .mud-select.mud-input-control {
    direction: rtl !important;
    text-align: right !important;
    min-width: 0 !important;
}

html body .mud-select.mud-input-control .mud-input {
    min-height: 54px !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 8px !important;
}

html body .mud-select.mud-input-control .mud-input-outlined-border {
    border-color: #cbd5e1 !important;
    border-radius: 8px !important;
    pointer-events: none !important;
}

html body .mud-select.mud-input-control .mud-input:hover .mud-input-outlined-border,
html body .mud-select.mud-input-control .mud-input.mud-input-focused .mud-input-outlined-border {
    border-color: #1b5e20 !important;
}

html body .mud-select.mud-input-control .mud-input.mud-input-focused .mud-input-outlined-border {
    border-width: 2px !important;
}

html body .mud-select.mud-input-control .mud-input-outlined-border legend {
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
}

html body .mud-select.mud-input-control .mud-input-label,
html body .mud-select.mud-input-control .mud-input-label-inputcontrol,
html body .mud-select.mud-input-control .mud-input-outlined-label {
    right: 14px !important;
    left: auto !important;
    transform-origin: top right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    background: #ffffff !important;
    padding: 0 6px !important;
    z-index: 2 !important;
    max-width: calc(100% - 56px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

html body .mud-select.mud-input-control .mud-input-slot,
html body .mud-select.mud-input-control .mud-select-input {
    min-height: 52px !important;
    height: 52px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    padding: 16px 14px 6px 42px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body .mud-select.mud-input-control .mud-input-adornment {
    height: 54px !important;
    max-height: 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    color: #1b5e20 !important;
}

html body .mud-select.mud-input-control .mud-input-adornment .mud-icon-root {
    color: #1b5e20 !important;
    font-size: 1.25rem !important;
}

html body .mud-popover .mud-list,
html body .mud-popover .mud-list-item,
html body .mud-popover .mud-list-item-text {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Jameel Noori Nastaleeq', serif !important;
}

html body .mud-table-pagination .mud-select.mud-input-control .mud-input,
html body .mud-table-pagination .mud-select.mud-input-control .mud-input-slot,
html body .mud-table-pagination .mud-select.mud-input-control .mud-select-input {
    min-height: 36px !important;
    height: 36px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Compact form/search spacing repair */
html body .entry-card > .mud-card-content,
html body .entry-card .mud-card-content {
    padding: 16px 24px 18px !important;
}

html body .entry-card .mud-grid {
    row-gap: 4px !important;
}

html body .entry-card .mud-grid > .mud-grid-item {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

html body .entry-card .mud-input-control {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

html body .entry-card .form-actions,
html body .mud-card-content .filter-actions-item,
html body .mud-card-content .inquiry-actions,
html body .mud-card-content .search-actions {
    justify-content: flex-start !important;
    align-items: center !important;
    align-self: center !important;
    gap: 8px !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

html body .entry-card .form-actions .mud-button-root {
    min-width: 150px !important;
}

html body .mud-card-content .filter-actions-item .mud-button-root,
html body .mud-card-content .inquiry-actions .mud-button-root,
html body .mud-card-content .search-actions .mud-button-root {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 960px) {
    html body .entry-card .form-actions,
    html body .mud-card-content .filter-actions-item,
    html body .mud-card-content .inquiry-actions,
    html body .mud-card-content .search-actions {
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    html body .entry-card .form-actions .mud-button-root,
    html body .mud-card-content .filter-actions-item .mud-button-root,
    html body .mud-card-content .inquiry-actions .mud-button-root,
    html body .mud-card-content .search-actions .mud-button-root {
        width: 100% !important;
    }
}
