/* Final layout reset loaded after all module styles.
   Keep these bands in the normal page flow; no sticky overlays. */

.fd-sticky-page-head,
.fd-sticky-tab-tools,
.workpaper-header-card,
.flowkv-header-card,
.flowkv-filter-card {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    transform: none !important;
    isolation: auto !important;
    backface-visibility: visible !important;
}

.fd-sticky-page-head::before,
.fd-sticky-page-head::after,
.fd-sticky-tab-tools::before,
.workpaper-header-card::before,
.flowkv-header-card::before,
.flowkv-filter-card::before {
    content: none !important;
    display: none !important;
}

.fd-sticky-page-head {
    margin-bottom: 14px !important;
    padding-bottom: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fd-sticky-tab-tools {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.card-custom.workpaper-header-card,
.card-custom.flowkv-header-card,
.card-custom.flowkv-filter-card,
.card-custom.flowskills-head,
.card-custom.flowskills-query-card,
.card-custom.flowskills-results-card,
.card-custom.flowcheck-head,
.card-custom.flowcheck-body,
.card-custom.flowcrm-header-card,
.card-custom.flowcrm-filter-card,
.card-custom.fd-sticky-tab-tools,
.fd-sticky-tab-tools.card-custom,
.settings-card,
.settings-system-card {
    background: var(--fd-surface, #ffffff) !important;
    background-color: var(--fd-surface, #ffffff) !important;
    background-clip: padding-box;
    border: 1px solid var(--fd-border, #d7e2f1) !important;
    border-radius: 10px !important;
    box-shadow: var(--fd-shadow, 0 10px 24px rgba(15, 23, 42, .07)) !important;
}

body.darkmode .card-custom.workpaper-header-card,
body.darkmode .card-custom.flowkv-header-card,
body.darkmode .card-custom.flowkv-filter-card,
body.darkmode .card-custom.flowskills-head,
body.darkmode .card-custom.flowskills-query-card,
body.darkmode .card-custom.flowskills-results-card,
body.darkmode .card-custom.flowcheck-head,
body.darkmode .card-custom.flowcheck-body,
body.darkmode .card-custom.flowcrm-header-card,
body.darkmode .card-custom.flowcrm-filter-card,
body.darkmode .card-custom.fd-sticky-tab-tools,
body.darkmode .fd-sticky-tab-tools.card-custom,
body.darkmode .settings-card,
body.darkmode .settings-system-card {
    background: #111827 !important;
    background-color: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}

.main .modern-search,
.main .input-group.modern-search {
    min-height: 46px !important;
    border: 1px solid #d7e2f1 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
    overflow: hidden !important;
}

.main .modern-search .input-group-text {
    width: 50px !important;
    min-height: 44px !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    color: #64748b !important;
}

.main .modern-search .form-control {
    min-height: 44px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 0 !important;
}

.main .fd-sticky-tab-tools .form-select,
.main .flowkv-filter-card .form-select,
.main .flowcrm-filter-card .form-select,
.main .settings-card .form-select {
    min-height: 46px !important;
    border-color: #d7e2f1 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

body.darkmode .main .modern-search,
body.darkmode .main .input-group.modern-search,
body.darkmode .main .fd-sticky-tab-tools .form-select,
body.darkmode .main .flowkv-filter-card .form-select,
body.darkmode .main .flowcrm-filter-card .form-select,
body.darkmode .main .settings-card .form-select {
    border-color: #334155 !important;
    background-color: #111827 !important;
    color: #e5e7eb !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18) !important;
}

body.darkmode .main .modern-search .input-group-text,
body.darkmode .main .modern-search .form-control {
    color: #e5e7eb !important;
}
