@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-accent: #384cd1;
    --primary-indigo: #405189;
    --primary-blue: #384cd1;
    --success-green: #22c55e;
    --danger-red: #ef4444;
    --bg-color: #f3f3f9;
    --text-main: #212529;
    --text-muted: #878a99;
    --border-color: #e9ebec;
    --grid-header-bg: #f3f6f9;
}

/* --- Standardized Full Width Form Card --- */
.form-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 4px;
    overflow: visible;
}

.form-header {
    padding: 8px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fcfdfe;
}

.form-body {
    padding: 15px 20px;
}

.form-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 0 !important;
}

.form-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-main);
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
}

/* Hide Numeric Spinners Globally */
.e-numeric.e-control-wrapper .e-input-group-icon.e-spin-up,
.e-numeric.e-control-wrapper .e-input-group-icon.e-spin-down {
    display: none !important;
}

/* --- Standard Page Header Pattern --- */
.page-header-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4) !important;
}

.page-title-area h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.025em;
}

.header-action-buttons {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

/* --- Grid Toolbar with Title, Search, and Button --- */
.standard-grid-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #eef2f7;
    margin-top: 8px;
}

.grid-top-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: #fcfdfe;
    border-bottom: 1px solid #eef2f7;
    gap: 12px;
}

.page-title-inline {
    flex: 0 0 auto;
}

.page-title-inline h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
}

.header-action-buttons {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.search-wrapper {
    flex: 0 0 320px;
    min-width: 200px;
}

.grid-search-input {
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grid-top-bar {
        padding: 10px 15px;
        gap: 10px;
    }

    .page-title-inline h2 {
        font-size: 18px;
    }

    .search-wrapper {
        flex: 1 1 100%;
        order: 3;
    }

    .header-action-buttons {
        order: 2;
        margin-left: 0;
    }
}

/* Reminder page filters */
.filters-container {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
}


/* --- Styled Action Buttons (HYPER-SPECIFIC FOR VISIBILITY) --- */
.header-action-buttons button.e-primary.e-btn,
.header-action-buttons button.e-primary.e-btn.e-control.e-lib,
.header-action-buttons button.e-primary {
    background: #4f46e5 !important;
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border: none !important;
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    text-transform: none !important;
    transition: all 0.2s ease !important;
}

.header-action-buttons button.e-primary.e-btn:hover,
.header-action-buttons button.e-primary:hover {
    background-color: #4338ca !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45) !important;
    color: #ffffff !important;
}

.header-action-buttons button.e-primary.e-btn .e-btn-icon,
.header-action-buttons button.e-primary i {
    color: #ffffff !important;
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* --- Grid Action Buttons --- */
.action-buttons-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.action-icon-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.action-icon-btn:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
}

.action-icon-btn.edit-btn:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
}

.action-icon-btn .e-btn-icon,
.action-icon-btn i {
    font-size: 14px !important;
    margin: 0 !important;
    color: #64748b !important;
}

.action-icon-btn.edit-btn:hover .e-btn-icon,
.action-icon-btn.edit-btn:hover i {
    color: #3b82f6 !important;
}

/* --- PREMIUM FORM DESIGN SYSTEM --- */
.form-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    margin-top: 4px;
    overflow: visible;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    padding: 8px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to right, #ffffff, #f8fafc);
}

.form-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.form-body {
    padding: 8px 15px;
    background: #ffffff;
}

.form-header+.form-body {
    padding-top: 2px;
}

/* Premium Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
}

.form-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-group.full-width {
    grid-column: span 2;
}

.form-grid.grid-4 .form-group.span-2 {
    grid-column: span 2;
}

.form-grid.grid-4 .form-group.span-3 {
    grid-column: span 3;
}

.form-grid.grid-4 .form-group.span-4,
.form-grid.grid-4 .section-title.span-4 {
    grid-column: span 4;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    background: #f8fafc;
    border-radius: 4px;
    margin: 4px 0 1px 0;
    line-height: 1;
    min-height: auto;
    display: flex;
    align-items: center;
    border: 1px solid #f1f5f9;
}

.form-body>.form-grid>.section-title:first-child,
.form-body>.section-title:first-child {
    margin-top: 0;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #4f46e5;
    margin-right: 12px;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

/* Standardizing Input Appearance (Global Compact Design) */
/*.e-input-group,
.e-input-group.e-control-wrapper,
.e-float-input.e-control-wrapper,
.e-dropdownlist.e-control-wrapper,
.e-numerictextbox.e-control-wrapper,
.e-textbox.e-control-wrapper,
.e-combobox.e-control-wrapper {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 0 10px !important;
    height: 36px !important;
    min-height: 36px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 2px !important;
}
*/
/* Specific handling for Outlined inputs */
/*.e-input-group.e-outline,
.e-float-input.e-outline,
.e-control-wrapper.e-outline {
    background: #ffffff !important;
}

.e-input-group.e-input-focus,
.e-control-wrapper.e-input-focus,
.e-float-input.e-control-wrapper.e-input-focus {
    border-color: #4f46e5 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}*/

/* Ensure child input elements fit the compact height */
/*.e-input-group .e-input,
.e-input-group.e-control-wrapper .e-input,
.e-float-input.e-control-wrapper input,
.e-textbox.e-control-wrapper .e-input,
.e-dropdownlist.e-control-wrapper .e-input,
.e-numerictextbox.e-control-wrapper .e-input,
.e-combobox.e-control-wrapper .e-input {
    font-size: 13px !important;
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 !important;
    color: #1e293b !important;
    background: transparent !important;
}*/

/* Floating Label Adjustment for Compact Height */
/*.e-float-input.e-control-wrapper .e-float-text,
.e-float-input.e-control-wrapper.e-float-input .e-float-text {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    transform: translate(0, 0) scale(1) !important;
    top: 9px !important;
    z-index: 10 !important;
}

.e-float-input.e-control-wrapper.e-input-focus .e-float-text,
.e-float-input.e-control-wrapper.e-filled .e-float-text {
    transform: translate(-4px, -24px) scale(0.8) !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    padding: 0 4px !important;
}*/

/* Remove default underline indicators */
/*.e-input-group::before,
.e-input-group::after,
.e-float-input::before,
.e-float-input::after,
.e-float-line::before,
.e-float-line::after {
    display: none !important;
}*/

/* Sticky Footer (Standardized) */
.form-footer {
    padding: 20px 30px;
    background: #fcfdfe;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-radius: 0 0 20px 20px;
}

.form-footer .e-primary.e-btn {
    background-color: #4f46e5 !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
}

.form-footer .e-outline.e-btn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 500 !important;
}

/* --- PREMIUM MASTER GRID SYSTEM --- */
.standard-grid-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 0;
    /* Removed overflow: hidden to prevent clipping of filter popups */
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.page-content,
.page-container,
.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

.page-content-wrapper {
    padding-top: 0 !important;
}

/* Main Grid Style */
.e-grid {
    border: none !important;
    background: transparent !important;
    min-height: 300px !important;
    /* Increased to ensure enough height for filter popups */
    overflow: visible !important;
}

.e-grid .e-gridcontent,
.e-grid .e-content {
    overflow: visible !important;
}

/* Grid Top Bar (Search Area) */
.grid-top-bar {
    padding: 6px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
/*    z-index: 1000;*/
}

.grid-search-input.e-input-group {
    width: 280px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 2px 12px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.grid-search-input.e-input-group:focus-within {
    border-color: #4f46e5 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Redesigned Grid Action Buttons */
.action-buttons-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

/* Consolidated Action Icon Buttons */
.action-icon-btn.e-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
}

.action-icon-btn.e-btn .e-btn-icon {
    margin: 0 !important;
    font-size: 14px !important;
}

/* Edit Button Style */
.btn-edit-row.e-btn {
    color: #4f46e5 !important;
}

.btn-edit-row.e-btn:hover {
    background: #eef2ff !important;
    border-color: #e0e7ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1) !important;
}

/* Delete Button Style */
.btn-delete-row.e-btn {
    color: #ef4444 !important;
}

.btn-delete-row.e-btn:hover {
    background: #fef2f2 !important;
    border-color: #fee2e2 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1) !important;
}

/* Status Badges */
.status-badge {
    padding: 6px 6px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.status-active {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.status-inactive {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

/* Additional Grid Overrides */

.e-grid .e-headercell {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 2px solid #e2e8f0 !important;
    height: 36px !important;
    padding: 0 12px !important;
}

/* Fix for filter icons being too far from column names */
.e-grid .e-headercell .e-headercelldiv {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 4px !important;
    width: 100% !important; /* Changed from auto to 100% for justification */
    overflow: visible !important;
}

.e-grid .e-headercell .e-headertext {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: inline-block !important;
}

.e-grid .e-headercell .e-filtericon,
.e-grid .e-headercell .e-sortfilterdiv {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    order: 2 !important;
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 auto !important;
    float: none !important;
}

/* Parent alignment for inline-flex container */
.e-grid .e-headercell.e-rightalign {
    text-align: right !important;
}
.e-grid .e-headercell.e-rightalign .e-headercelldiv {
    justify-content: flex-end !important;
}

.e-grid .e-headercell.e-centeralign {
    text-align: center !important;
}
.e-grid .e-headercell.e-centeralign .e-headercelldiv {
    justify-content: center !important;
}

.e-grid .e-headercell.e-leftalign {
    text-align: left !important;
}
.e-grid .e-headercell.e-leftalign .e-headercelldiv {
    justify-content: flex-start !important;
}

.e-grid .e-headercelldiv span {
    flex: 0 0 auto !important;
}

/* Hide Syncfusion's default absolute filter icon if it exists separately */
.e-grid .e-headercell .e-filtericon.e-icons.e-filterset {
    position: static !important;
}

.e-grid .e-rowcell {
    height: 32px !important;
    font-size: 13px !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0 8px !important;
}

/* Action buttons are consolidated above */

.e-grid .e-row:hover .e-rowcell {
    background-color: #f8fafc !important;
}

.e-grid .e-pager {
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 12px !important;
}

.e-grid .e-pager .e-currentitem,
.e-grid .e-pager .e-currentitem:hover {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

/* Fix for Excel Filter Menu and Popups */
.e-filter-popup.e-popup,
.e-excel-filter.e-popup {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    padding: 0 !important;
    /* Reset padding to handle internal margins */
    min-width: 260px !important;
    overflow: hidden !important;
}

.e-excel-filter .e-filter-main-panel {
    background: #ffffff !important;
    padding: 15px !important;
}

.e-excel-filter .e-searchwrapper {
    margin-bottom: 15px !important;
}

/* Cleaning the Search Box */
.e-excel-filter .e-searchwrapper .e-input-group,
.e-excel-filter .e-searchwrapper .e-input-group.e-control-wrapper {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    height: 36px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.e-excel-filter .e-searchwrapper .e-input-group::before,
.e-excel-filter .e-searchwrapper .e-input-group::after,
.e-excel-filter .e-searchwrapper .e-input-group.e-input-focus::before,
.e-excel-filter .e-searchcontainer {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.e-excel-filter .e-searchwrapper .e-input-group .e-input {
    background: transparent !important;
    font-size: 14px !important;
    color: #1e293b !important;
}

.e-excel-filter .e-checkboxlist {
    max-height: 200px !important;
    margin: 10px 0 !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 8px !important;
    background: #fcfdfe !important;
}

.e-excel-filter .e-ftrbtns {
    padding: 12px 15px !important;
    background: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.e-excel-filter .e-ftrbtns .e-btn {
    margin: 0 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}

.e-excel-filter .e-ftrbtns .e-primary {
    background-color: #4f46e5 !important;
    border: none !important;
}

/* Enhancing Grid Selection and Hover */
.e-grid .e-selectionbackground {
    background-color: #eef2ff !important;
}

.e-grid .e-row:hover .e-rowcell {
    background-color: #f1f5f9 !important;
    cursor: pointer;
}

.e-filter-popup .e-footer-content {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 10px !important;
    border-radius: 0 0 12px 12px !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

.e-grid .e-filterbarcell.e-filterbarbackcolor {
    background-color: #ffffff !important;
}

/* --- Grid Image Styling --- */
.grid-row-img-container {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #eff2f7;
    border: 1px solid #e9ebec;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-row-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-row-img-placeholder {
    color: #94a3b8;
    font-size: 14px;
}

.item-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-main-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name-text {
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.2;
}

.item-sub-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Breadcrumbs --- */
.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    padding: 2px 0;
}

.breadcrumb-wrapper i {
    font-size: 12px;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #cbd5e1;
}

/* --- Search Box Refinement --- */
.search-wrapper .e-input-group {
    border: none !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 2px 0 !important;
}

.search-wrapper .e-input-group.e-input-focus {
    border-bottom-color: #4f46e5 !important;
}

.search-wrapper .e-input-group::before,
.search-wrapper .e-input-group::after {
    display: none !important;
}


/* Standardized Dropdown Popups and List Items */
/*.e-dropdownbase.e-content,
.e-dropdownbase,
.e-popup.e-dropdownlist,
.e-popup.e-combobox {
    max-height: 350px !important;
    min-height: 40px !important;
    min-width: 220px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    overflow: visible !important;
    z-index: 1000001 !important;
}

.e-dropdownbase .e-list-item,
.e-combobox.e-popup .e-list-item,
.e-dropdownlist.e-popup .e-list-item {
    color: #334155 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    padding: 8px 14px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    line-height: normal !important;
    height: auto !important;
}

.e-dropdownbase .e-list-item.e-active,
.e-dropdownbase .e-list-item.e-hover,
.e-combobox.e-popup .e-list-item.e-active,
.e-combobox.e-popup .e-list-item.e-hover {
    color: #4f46e5 !important;
    background-color: #f1f5f9 !important;
    font-weight: 500 !important;
}*/

/* DatePicker & Calendar Popups Fix */
/*.e-datepicker.e-popup,
.e-calendar.e-lib,
.e-popup.e-datepicker {
    z-index: 1000002 !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 300px !important;
    min-width: 250px !important;
    display: block !important;
}

.e-calendar {
    background-color: #ffffff !important;
    border: none !important;
    width: 100% !important;
}

.e-calendar .e-content span,
.e-calendar .e-day,
.e-calendar .e-content td {
    color: #334155 !important;
    visibility: visible !important;
}

.e-calendar .e-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.e-calendar .e-header .e-title,
.e-calendar .e-header .e-prev,
.e-calendar .e-header .e-next {
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.e-calendar .e-content td.e-today span.e-day {
    color: #4f46e5 !important;
    font-weight: 700 !important;
}

.e-calendar .e-content td.e-selected span.e-day {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}

.e-dropdownlist.e-popup.e-control.e-lib,
.e-combobox.e-popup.e-control.e-lib {
    z-index: 1000001 !important;
    width: auto !important;
    min-width: 250px !important;
}*/

/* --- Grid Action Buttons & Badges --- */
.status-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-active {
    background-color: #22c55e !important;
    color: white !important;
}

.status-inactive {
    background-color: #ef4444 !important;
    color: white !important;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-buttons .edit-btn,
.action-buttons .delete-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    min-width: 32px !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s !important;
}

.action-buttons .edit-btn {
    color: #2563eb !important;
}

.action-buttons .delete-btn {
    color: #dc2626 !important;
}

.action-buttons .edit-btn:hover {
    background: #eff6ff !important;
    border-color: #2563eb !important;
}

.action-buttons .delete-btn:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
}

/* --- Grid Paging Customization --- */
.e-grid .e-pager .e-currentitem,
.e-grid .e-pager .e-currentitem:hover {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border-radius: 4px !important;
}


/* --- PREMIUM HEADER & MOBILE DRAWER SYSTEM --- */

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    height: 60px;
    padding: 0 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 34px;
    width: auto;
}

/* Desktop Navigation */
.header-nav-desktop {
    flex: 1;
    display: flex;
    justify-content: center;
}

@media (max-width: 991px) {
    .header-nav-desktop {
        display: none;
    }
}

/* Premium Buttons Styling */
.mobile-hamburger-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-hamburger-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

.logout-icon-btn.e-btn {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #ffe4e6 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(225, 29, 72, 0.1) !important;
}

.logout-icon-btn.e-btn:hover {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2) !important;
}



/* 4. PREMIUM MOBILE DRAWER */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 3001;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.drawer-open {
    transform: translateX(-320px);
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 3000;
}

.drawer-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}

.drawer-logo {
    height: 30px;
}

.close-drawer-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-vertical-menu.e-menu-wrapper {
    background: transparent;
    border: none;
    width: 100%;
}



.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
}

.mobile-logout-btn {
    width: 100%;
    height: 50px;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 12px;
    color: #e11d48;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
}

/* DASHBOARD & RESPONSIVE FIXES */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
}

.dashboard-container {
    padding: 40px 24px;
    width: 100%;
}

@media (max-width: 991px) {
    .main-layout {
        overflow-y: auto !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px !important;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .quick-actions-grid {
        grid-template-columns: 1fr !important;
    }
}

.d-none {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-flex {
        display: flex !important;
    }

    .d-md-none {
        display: none !important;
    }
}

.e-caret {
    margin-left: auto !important;
}

/* Timeline Components */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.timeline-line {
    position: absolute;
    top: 40px;
    left: 20px;
    bottom: -20px;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding-top: 4px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.timeline-time {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* --- RESPONSIVE DESIGN SYSTEM --- */

/* Tablet & Smaller Screens (< 992px) */
@media (max-width: 991.98px) {
    .page-header-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 5px 0 !important;
    }

    .header-action-buttons {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .header-action-buttons button.e-primary.e-btn {
        width: 100% !important;
        padding: 8px 16px !important;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .form-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .form-group.full-width,
    .form-grid.grid-4 .form-group.span-2,
    .form-grid.grid-4 .form-group.span-3,
    .form-grid.grid-4 .form-group.span-4,
    .form-grid.grid-4 .section-title.span-4 {
        grid-column: span 2 !important;
    }

    .page-content-wrapper {
        padding: 8px 12px 20px 12px !important;
    }

    .form-header,
    .form-body,
    .form-footer {
        padding: 10px 15px !important;
    }

    body .e-menu-popup.e-popup {
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
    }
}

/* Mobile Screens (< 768px) */
@media (max-width: 767.98px) {

    .form-grid,
    .form-grid.grid-4 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .form-group.full-width,
    .form-grid.grid-4 .form-group.span-2,
    .form-grid.grid-4 .form-group.span-3,
    .form-grid.grid-4 .form-group.span-4,
    .form-grid.grid-4 .section-title.span-4 {
        grid-column: span 1 !important;
    }

    /* Prevents the entire page from scrolling horizontally on mobile */
    .page-content-wrapper,
    .main-content-area,
    .container-fluid,
    .layout-wrapper {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .form-footer {
        flex-direction: column-reverse !important;
        gap: 10px !important;
    }

    .form-footer .e-btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* --- GRID RESPONSIVE SYSTEM --- */
    /* Ensure all columns are displayed, not hidden */
    .e-grid .e-headercell.hide-on-mobile,
    .e-grid .e-rowcell.hide-on-mobile,
    .hide-on-mobile {
        display: table-cell !important;
    }

    /* Grid search and top bar adjustments */
    .grid-top-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .grid-search-input.e-input-group {
        width: 100% !important;
    }

    .status-badge {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    .page-title-inline h2 {
        font-size: 18px !important;
    }

    .standard-grid-card {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        /* Force internal scroll here */
        -webkit-overflow-scrolling: touch;
        border-radius: 8px !important;
        position: relative;
        display: block !important;
    }

    .e-grid {
        min-width: 850px !important;
        /* Enough width to ensure scrolling */
        width: 100% !important;
        border: none !important;
    }

    /* CRITICAL: Allow sticky to work by making internal containers visible */
    .e-grid .e-gridheader,
    .e-grid .e-gridcontent,
    .e-grid .e-content,
    .e-grid .e-headercontent {
        overflow: visible !important;
    }

    /* Sticky Action Column (Last Column) */
    .e-grid .e-headercell:last-child,
    .e-grid .e-rowcell:last-child {
        position: sticky !important;
        right: 0 !important;
        background-color: white !important;
        z-index: 20 !important;
        /* Keep above other cells */
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1) !important;
        border-left: 1px solid #f1f5f9 !important;
    }

    .e-grid .e-headercell:last-child {
        background-color: #f8fafc !important;
        z-index: 21 !important;
        /* Header above row cells */
    }

    /* Adjust cell padding for mobile density */
    .e-grid .e-rowcell,
    .e-grid .e-headercell {
        padding-left: 8px !important;
        padding-right: 8px !important;
        height: auto !important;
        min-height: 40px !important;
    }

    /* Prevent the page from bouncing/scrolling horizontally when dragging the grid */
    .standard-grid-card {
        touch-action: pan-x pan-y !important;
    }
}

/* Fix for Syncfusion Popups on Mobile */
@media (max-width: 576px) {
    .e-popup.e-control.e-dropdownlist {
        max-width: 90vw !important;
    }

    .e-filter-popup.e-popup,
    .e-excel-filter.e-popup {
        width: 95vw !important;
        left: 2.5vw !important;
    }
}

/* Sale Voucher & Complex Transaction Form Responsiveness */
@media (max-width: 1200px) {
    .entry-row-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
    }

    .entry-item.barcode-input,
    .entry-item.item-select {
        grid-column: span 2 !important;
    }

    .entry-item.per-select,
    .entry-item.action-item {
        grid-column: span 1 !important;
    }
}

@media (max-width: 991.98px) {
    .form-row-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .full-span-master {
        grid-column: span 2 !important;
    }

    .entry-row-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .entry-item.barcode-input,
    .entry-item.item-select,
    .entry-item.amount-item {
        grid-column: span 2 !important;
    }

    .voucher-summary-section {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .summary-details {
        padding-left: 0 !important;
        border-left: none !important;
        border-top: 1px dashed #d1d5db !important;
        padding-top: 15px !important;
    }
}

@media (max-width: 767.98px) {

    .form-row-grid,
    .entry-row-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .full-span-master,
    .lg-span,
    .entry-item.barcode-input,
    .entry-item.item-select,
    .entry-item.amount-item {
        grid-column: span 1 !important;
    }

    .payment-mode-group {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .payment-mode-group .account-select {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .entry-item:not(.action-item) {
        margin-bottom: 5px;
    }

    .entry-item.action-item {
        margin-top: 10px;
    }

    .grand-total {
        font-size: 14px !important;
    }

    .grand-total .summary-value {
        font-size: 18px !important;
    }

    .e-grid .e-headercell,
    .e-grid .e-rowcell {
        padding: 0 5px !important;
    }
}

/* Utility Pages (Merge Accounts/Items) Responsiveness */
@media (max-width: 767.98px) {
    .merge-arrow-divider-horizontal {
        position: relative !important;
        left: 50% !important;
        top: 0 !important;
        margin: 20px 0 !important;
        transform: translate(-50%, 0) !important;
    }

    .merge-arrow-divider-horizontal i {
        transform: rotate(90deg) !important;
    }

    .col-md-6.border-end {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 20px !important;
    }
}

.e-outline.e-input-group input.e-input,
.e-outline.e-float-input.e-input-group input,
.e-outline.e-input-group.e-control-wrapper input.e-input,
.e-outline.e-float-input.e-input-group.e-control-wrapper input,
.e-outline.e-float-input input,
.e-outline.e-float-input.e-control-wrapper input {
    box-sizing: border-box;
    min-height: 27px !important;
}

.e-outline.e-input-group input.e-input,
.e-outline.e-float-input.e-input-group input,
.e-outline.e-input-group.e-control-wrapper input.e-input,
.e-outline.e-float-input.e-input-group.e-control-wrapper input,
.e-outline.e-float-input input,
.e-outline.e-float-input.e-control-wrapper input {
    box-sizing: border-box;
    height: 25px;
}

input.e-outline.e-input,
.e-outline.e-input-group input.e-input,
.e-outline.e-input-group input,
.e-outline.e-input-group.e-control-wrapper input.e-input,
.e-outline.e-input-group.e-control-wrapper input,
.e-outline.e-float-input input.e-input,
.e-outline.e-float-input input,
.e-outline.e-float-input.e-control-wrapper input.e-input,
.e-outline.e-float-input.e-control-wrapper input,
.e-outline.e-input-group:not(.e-float-icon-left) input.e-input:focus,
.e-outline.e-input-group.e-control-wrapper:not(.e-float-icon-left) input.e-input:focus,
.e-outline.e-float-input.e-control-wrapper:not(.e-float-icon-left) input:focus,
.e-outline.e-float-input:not(.e-float-icon-left) input:focus,
.e-outline.e-float-input.e-control-wrapper:not(.e-float-icon-left).e-input-focus input,
.e-outline.e-float-input:not(.e-float-icon-left).e-input-focus input,
.e-outline.e-input-group:not(.e-float-icon-left).e-input-focus input.e-input,
.e-outline.e-input-group.e-control-wrapper:not(.e-float-icon-left).e-input-focus input.e-input {
    box-sizing: border-box;
    padding: 0px 6px 0px !important;
}

.e-ddl.e-lib.e-input-group.e-control-container.e-control-wrapper.e-outline.e-float-input.e-valid-input {
    height: 31px !important;
}

.e-ddl.e-lib.e-input-group.e-control-container.e-control-wrapper.e-outline.e-float-input {
    height: 31px !important;
}

.e-ddl.e-lib.valid.e-input-group.e-control-container.e-control-wrapper.e-outline.e-float-input {
    height: 31px !important;
}

.e-outline.e-float-input:not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input.e-control-wrapper:not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input:not(.e-valid-input):not(.e-input-focus) input:valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input.e-control-wrapper:not(.e-valid-input):not(.e-input-focus) input:valid~label.e-float-text.e-label-bottom,
.e-outline:not(.e-valid-input):not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid)~label.e-float-text,
.e-outline.e-float-input:not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid):not(.e-valid-input)~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper:not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid):not(.e-valid-input)~label.e-float-text {
    line-height: 28px !important;
}

.e-outline.e-float-input textarea:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input.e-control-wrapper textarea:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline label.e-float-text,
.e-outline.e-float-input label.e-float-text,
.e-outline.e-float-input.e-control-wrapper label.e-float-text,
.e-outline.e-float-input:not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input.e-control-wrapper:not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input textarea:-webkit-autofill~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper.e-autofill textarea:-webkit-autofill~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper.e-autofill textarea:not(:focus):valid:-webkit-autofill~label.e-float-text.e-label-bottom {
    font-size: 12px !important;
}

.e-outline.e-float-input.e-valid-input:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input:hover:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-control-wrapper:hover:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-control-wrapper:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-control-wrapper:hover:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left):not(.e-disabled),
.e-outline.e-float-input.e-valid-input.e-control-wrapper:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left):not(.e-disabled),
.e-outline.e-float-input.e-input-group.e-valid-input:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input:hover:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-control-wrapper.e-valid-input:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-control-wrapper.e-valid-input:hover:not(.e-success):not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-success:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-success:hover:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-success:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-success:hover:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-success:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-success:hover:not(.e-error):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-error:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-error:hover:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-error:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-error:hover:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-error:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-error:hover:not(.e-success):not(.e-warning):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-warning:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-valid-input.e-warning:hover:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-warning:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-warning:hover:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-warning:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-warning:hover:not(.e-success):not(.e-error):not(.e-float-icon-left),
.e-outline.e-float-input.e-input-group.e-valid-input.e-float-icon-left:hover:not(.e-input-focus):not(.e-success):not(.e-warning):not(.e-error):not(.e-disabled),
.e-outline.e-float-input.e-input-group.e-valid-input.e-control-wrapper.e-float-icon-left:hover:not(.e-input-focus):not(.e-success):not(.e-warning):not(.e-error):not(.e-disabled),
.e-outline.e-float-input.e-valid-input.e-float-icon-left:hover:not(.e-input-focus):not(.e-success):not(.e-warning):not(.e-error):not(.e-disabled),
.e-outline.e-float-input.e-valid-input.e-control-wrapper.e-float-icon-left:not(.e-input-focus):hover:not(.e-success):not(.e-warning):not(.e-error):not(.e-disabled),
.e-outline.e-float-input.e-control-wrapper.e-valid-input.e-float-icon-left:not(.e-warning):not(.e-success):not(.e-error) {
    border-top-color: rgba(0, 0, 0, 0);
    height: 30px !important;
    font-size: 11px !important;
}

.e-outline.e-float-input.e-input-group.e-small .e-input-group-icon,
.e-small .e-outline.e-float-input.e-input-group .e-input-group-icon,
.e-outline.e-float-input.e-control-wrapper.e-input-group.e-small .e-input-group-icon,
.e-small .e-outline.e-float-input.e-control-wrapper.e-input-group .e-input-group-icon {
    margin-top: 3px !important;
}

.e-outline.e-float-input input:focus~label.e-float-text,
.e-outline.e-float-input input:valid~label.e-float-text,
.e-outline.e-float-input input~label.e-label-top.e-float-text,
.e-outline.e-float-input input[readonly]~label.e-label-top.e-float-text,
.e-outline.e-float-input input[disabled]~label.e-label-top.e-float-text,
.e-outline.e-float-input input label.e-float-text.e-label-top,
.e-outline.e-float-input.e-control-wrapper input:focus~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper input:valid~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper input~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper input[readonly]~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper input[disabled]~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper input label.e-float-text.e-label-top,
.e-outline.e-float-input textarea:focus~label.e-float-text,
.e-outline.e-float-input textarea:valid~label.e-float-text,
.e-outline.e-float-input textarea~label.e-label-top.e-float-text,
.e-outline.e-float-input textarea[readonly]~label.e-label-top.e-float-text,
.e-outline.e-float-input textarea[disabled]~label.e-label-top.e-float-text,
.e-outline.e-float-input textarea label.e-float-text.e-label-top,
.e-outline.e-float-input.e-control-wrapper textarea:focus~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper textarea:valid~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper textarea~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper textarea[readonly]~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper textarea[disabled]~label.e-label-top.e-float-text,
.e-outline.e-float-input.e-control-wrapper textarea label.e-float-text.e-label-top,
.e-outline.e-float-input.e-input-focus input~label.e-float-text,
.e-outline.e-float-input.e-control-wrapper.e-input-focus input~label.e-float-text {
    font-size: 10px !important;
    top: -7px;
    transform: translate3d(0, 0, 0) scale(1);
}


/* Dropdown Compact */
/* Compact SfDropDownList adjustments for existing classes */
.e-small.e-ddl {
    width: 180px;
    /* desired width */
    height: 34px;
    /* maintain small height */
    display: flex;
    align-items: center;
    /* vertical center */
}

/* Input field inside dropdown */
.e-small.e-ddl .e-input-group {
    height: 100%;
    display: flex;
    align-items: center;
    /* vertical center text */
    padding: 0 8px;
    /* optional padding */
}

/* Placeholder / floating text */
.e-small.e-ddl .e-float-text {
    line-height: 34px;
    /* same as dropdown height */
}

/* Dropdown arrow vertical center */
.e-small.e-ddl .e-input-group .e-icons {
    display: flex;
    align-items: center;
    height: 100%;
}

.e-popup.e-ddl {
    max-height: 300px !important;
    /* Increase popup height */
    min-width: 180px !important;
    /* Match input width */
}

/* Content inside popup */
.e-popup.e-ddl .e-content {
    max-height: 300px !important;
    /* Scroll if many items */
    overflow-y: auto;
}

/* Each option styling */
.e-popup.e-ddl .e-list-item {
    align-items: center;
    /* Text vertically center */
}

/* Optional: hover effect for items */
.e-popup.e-ddl .e-list-item:hover {
    background-color: #f0f4ff;
    /* Light hover color */
}

/* Compact Input Fields */
.e-small .e-input-group,
.e-small.e-input-group {
    min-height: 28px;
}

.e-small .e-input-group input,
.e-small.e-input-group input,
.e-small .e-input-group .e-input,
.e-small.e-input-group .e-input {
    font-size: 12px;
    padding: 4px 8px;
    height: 28px;
}

.e-small .e-input-group.e-float-input input,
.e-small.e-input-group.e-float-input input {
    padding: 4px 8px;
}

.e-small .e-float-text,
.e-small.e-float-text {
    font-size: 11px;
}

/* Multiline Textbox Compact */
.e-small .e-input-group textarea,
.e-small.e-input-group textarea {
    min-height: 60px;
    font-size: 12px;
    padding: 4px 8px;
    height: auto !important;
}

/* Numeric Textbox Compact */
.e-small .e-numerictextbox,
.e-small.e-numerictextbox {
    font-size: 12px;
}

.e-small .e-numerictextbox .e-input-group,
.e-small.e-numerictextbox .e-input-group {
    min-height: 28px;
}

/* Button Compact */
.e-btn.e-small {
    padding: 4px 12px;
    font-size: 12px;
    height: 28px;
}

e-control e-numerictextbox e-lib {
    text-align: right !important;
}

.e-outline.e-float-input.e-small:not(.e-error):not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-small .e-outline.e-float-input:not(.e-error):not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-outline.e-float-input.e-control-wrapper.e-small:not(.e-error):not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-small .e-outline.e-float-input.e-control-wrapper:not(.e-error):not(.e-valid-input):not(.e-input-focus) input:not(:focus):valid~label.e-float-text.e-label-bottom,
.e-small.e-outline:not(.e-valid-input):not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid)~label.e-float-text,
.e-small.e-outline.e-float-input:not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid):not(.e-valid-input)~label.e-float-text,
.e-small.e-outline.e-float-input.e-control-wrapper:not(.e-valid-input):not(.e-input-focus) input:not(:focus):not(:valid):not(.e-valid-input)~label.e-float-text {
    line-height: 30px !important;
}

/* Grid Inputs */
.grid-input.e-input-group,
.grid-input.e-numeric-wrapper {
    height: 24px !important;
    border: 1px solid transparent;
    background: transparent;
}

.grid-input.e-input-group.e-input-focus,
.grid-input.e-numeric-wrapper.e-input-focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 1px #3b82f6;
}

.grid-input:hover {
    background-color: #f3f4f6;
}

.grid-input input {
    font-size: 12px !important;
    text-align: right;
    padding-right: 4px !important;
}

.grid-input.e-dropdownlist {
    text-align: left;
}

.page-header-wrapper {
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title-area h2 {
    font-size: 16px;
    margin: 0;
}

/* Dropdown Popup Box - Border & Shadow Fix */
.e-ddl.e-popup,
.e-dropdownbase.e-popup,
.e-small.e-ddl .e-popup.e-ddl {
    max-height: 500px !important;
    height: auto !important;
    min-width: 180px !important;
    border: 1px solid #c4c4c4 !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    background: var(--bg-primary);
    overflow-y: auto !important;
    z-index: 1000;
    transition: all 0.2s ease;
}

/* Content inside popup - Generalize for all dropdowns */
.e-ddl.e-popup .e-content,
.e-dropdownbase.e-popup .e-content,
.e-small.e-ddl.e-popup.e-ddl .e-content {
    height: unset !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Each option styling */
.e-small.e-ddl .e-popup.e-ddl .e-list-item {
    align-items: center;
}

.e-float-text e-label-bottom {
    left: -5px !important;
    top: -2px !important;
}
.e-outline.e-input-group .e-input-group-icon, .e-outline.e-input-group.e-control-wrapper .e-input-group-icon {
    font-size: 16px !important;
    margin: -5px 5px 1px -5px !important;
}