﻿/* ===== ADDITIONAL STYLES MERGE ===== */

/* BODY COLOR - Safe addition */
/*body {
    color: black !important;
}
*/
/* BUTTON LABEL - MERGED VERSION (combines both sets of styles) */
.mud-button-label {
    width: 100%;
    display: flex; /* Keep flex from original */
    align-items: center; /* Keep center from original */
    justify-content: inherit;
    gap: 5px; /* Keep gap from original */
    font-weight: lighter !important;
    font-size: small !important;
}

/* INPUT BORDER - Safe addition (specific selector) */
.mud-input.mud-input-outlined .mud-input-outlined-border {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 90% !important;
    text-align: start;
    pointer-events: none;
    border-radius: var(--mud-default-borderradius);
    border-color: var(--mud-palette-lines-inputs);
    border-width: 1px;
    border-style: solid;
    transition: border-width, border-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}

/* PAGE FONT - CONDITIONAL: Only apply to .page, not globally */
.page {
    font-family: Tahoma, arial, verdana, sans-serif !important;
    font-size: small !important;
}

/* RESPONSIVE BREAKPOINTS - Safe additions */
@media (min-width: 576px) {
    .responsive-item {
        flex: 1 1 48%; /* 50% width */
    }
}

/* ===== COMBINED ONESHIELD CSS - FONT AWESOME SAFE VERSION ===== */
/* ===== GLOBAL VARIABLES & FOUNDATION ===== */
:root {
    /* Color Palette */
    --bg: #f6f7fb;
    --surface: #fff;
    --text: #222;
    --muted: #777;
    --border: #e5e7eb;
    --primary: #2563eb;
    --header-bg: #1e40af;
    --sidebar-bg: #1e40af;
    --focus-color: #2e2fe3;
    --focus-width: 0.16rem;
    /* UNIFIED TYPOGRAPHY SYSTEM - SEGOE UI */
    --universal-font: 'Segoe UI', Arial, sans-serif;
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--universal-font);
}

body {
    font-family: var(--universal-font);
    background: #f3f4f6;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;
}

/* ===== SAFE SEGOE UI APPLICATION - AVOID FONT AWESOME COMPLETELY ===== */

/* TEXT ELEMENTS ONLY */
h1, h2, h3, h4, h5, h6, p, span:not([class]), div:not([class]),
label, legend, blockquote, pre, code, kbd, samp,
table, caption, thead, tbody, tfoot, tr, th, td,
ul, ol, li, dl, dt, dd,
fieldset, form, input, select, textarea, button:not([class*="fa"]):not([class*="icon"]) {
    font-family: var(--universal-font) !important;
}

/* MUDBLAZOR SPECIFIC COMPONENTS - NO ICONS */
.mud-typography:not([class*="icon"]),
.mud-input-label,
.mud-input-helper-text,
.mud-button-label,
.mud-list-item-text,
.mud-dialog-title,
.mud-dialog-content,
.mud-card-header,
.mud-card-content,
.mud-paper:not([class*="icon"]) {
    font-family: var(--universal-font) !important;
}

/* INPUT FIELDS - NO ICONS */
.mud-input-slot:not([class*="icon"]),
.mud-select-input:not([class*="icon"]),
.mud-picker-input:not([class*="icon"]) {
    font-family: var(--universal-font) !important;
}

/* MULTISELECT DROPDOWN POPOVER ITEMS */
.mud-popover .mud-list-item,
.mud-popover .mud-list-item-text,
.mud-select-popover .mud-list-item,
.mud-select-popover .mud-list-item-text {
    font-family: var(--universal-font) !important;
    font-size: 0.875rem !important;
}

/* MULTISELECT CONTAINER CHIPS */
.meta-multiselect-container .mud-chip,
.meta-multiselect-container .mud-chip-content {
    font-family: var(--universal-font) !important;
    font-size: 0.8rem !important;
}

/* ===== COMPLETELY AVOID TOUCHING FONT AWESOME ===== */
/* Don't apply any styles to these - let them work naturally */
/* Font Awesome classes are left unstyled intentionally */

table {
    table-layout: fixed;
    width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ===== APPLICATION LAYOUT SYSTEM ===== */
.application-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    max-width: 100%;
    background: #ffffff;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.minimal-layout-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.layout-body {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto 1fr;
    flex: 1;
    height: 0;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

    /* L1 sidebar: spans all rows, column 1 */
    .layout-body > .nav-level1-drawer {
        grid-column: 1;
        grid-row: 1 / -1;
    }

/* Row 1: Breadcrumb — full width after L1 */
.breadcrumb-row {
    grid-column: 2 / -1;
    grid-row: 1;
}

/* Row 2: Banner — full width after L1 */
.module-banner-row {
    grid-column: 2 / -1;
    grid-row: 2;
}

/* L2 drawer: column 2, row 3 (below breadcrumb + banner) */
.layout-body > .nav-level2-drawer {
    grid-column: 2;
    grid-row: 3 / -1;
}

/* Content: default spans full width after L1 (no L2) */
.content-area {
    grid-column: 2 / -1;
    grid-row: 3 / -1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

/* When L2 drawer IS present, content moves to column 3 only */
.nav-level2-drawer ~ .content-area {
    grid-column: 3;
}

.page-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

    .page-container::-webkit-scrollbar {
        width: 8px;
    }

    .page-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .page-container::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
    }

        .page-container::-webkit-scrollbar-thumb:hover {
            background: #a0aec0;
        }

/* ===== HEADER SYSTEM ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1049AE;
    color: white;
    padding: 4px 16px;
    min-height: 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

    .menu-toggle-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.05);
    }

.header-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.title-separator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

    .status-badge.status-active {
        background-color: #28a745;
        color: white;
    }

    .status-badge.status-inactive {
        background-color: #dc3545;
        color: white;
    }

    .status-badge.status-pending {
        background-color: #ffc107;
        color: #000;
    }

    .status-badge.status-suspended {
        background-color: #fd7e14;
        color: white;
    }

    .status-badge.status-default {
        background-color: #6c757d;
        color: white;
    }

    .status-badge.status-closed {
        background-color: #6c757d;
        color: white;
    }

    .status-badge.status-open {
        background-color: #17a2b8;
        color: white;
    }

.header-right {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .action-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.user-menu-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin-left: 8px;
}

    .user-menu-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ===== BREADCRUMB SYSTEM ===== */
.breadcrumb-container {
    background: #f1f5f9;
    padding: 6px 16px 4px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.breadcrumb {
    display: flex;
    align-items: center;
    /* gap: 8px;*/
    color: #6b7280;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    /* gap: 8px;*/
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-link {
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
    font-weight: 400;
}

    .breadcrumb-link:hover {
        text-decoration: underline;
        color: #1d4ed8;
    }

.breadcrumb-current {
    color: #1f2937;
    font-weight: 500;
    margin-left: -.5rem;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-size: 12px;
    margin: 0 4px;
}

/* ===== DYNAMIC CONTAINER SYSTEM ===== */

/* STANDARD CONTAINER (CLEAN MUDBLAZOR DEFAULTS) */
.standard-container {
    width: 100%;
    margin-top: -50px !important;
    margin-left: -40px;
}

    .standard-container .search-section,
    .standard-container .grid-section,
    .standard-container .form-section {
        margin-bottom: 16px;
        padding-left: 40px !important;
    }

    .standard-container .mud-input-label,
    .standard-container .mud-input-helper-text,
    .standard-container .mud-input,
    .standard-container .mud-select,
    .standard-container .mud-button,
    .standard-container .mud-typography {
        font-size: 1rem !important;
        font-weight: 400 !important;
        line-height: 1.43 !important;
        letter-spacing: 0.01071em !important;
    }

    .standard-container .mud-typography-h6,
    .standard-container h6,
    .standard-container .section-header {
        font-size: 1.25rem !important;
        font-weight: 500 !important;
        line-height: 1.6 !important;
        letter-spacing: 0.0075em !important;
        color: rgba(0, 0, 0, 0.87) !important;
    }

    .standard-container .mud-button {
        font-size: 1rem !important;
        font-weight: 500 !important;
        line-height: 1.75 !important;
        letter-spacing: 0.02857em !important;
        text-transform: uppercase !important;
    }

/* SEAMLESS PAGE CONTAINER (GRID + FORM ALIGNMENT) */
.seamless-page-container {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
}

    .seamless-page-container .search-section,
    .seamless-page-container .grid-section,
    .seamless-page-container .form-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

        .seamless-page-container .grid-section > * {
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            box-sizing: border-box !important;
        }

    .seamless-page-container .form-section {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

        .seamless-page-container .form-section > *,
        .seamless-page-container .form-section .mud-container,
        .seamless-page-container .form-section .mud-grid,
        .seamless-page-container .form-section .form-container {
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            margin: 8px !important;
            box-sizing: border-box !important;
        }

        .seamless-page-container .form-section .mud-container-fixed,
        .seamless-page-container .form-section .mud-container-maxwidth-lg,
        .seamless-page-container .form-section .mud-container-maxwidth-xl {
            padding-left: 0 !important;
            padding-right: 0 !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
        }

        .seamless-page-container .form-section .mud-grid-item {
            padding: 8px 16px !important;
            box-sizing: border-box !important;
        }

        .seamless-page-container .form-section .mud-paper,
        .seamless-page-container .form-section .mud-card {
            width: 100% !important;
            margin: 0 !important;
            padding: 16px !important;
            box-sizing: border-box !important;
        }

        .seamless-page-container .form-section .mud-grid-spacing-xs-3,
        .seamless-page-container .form-section .mud-grid-spacing-sm-3,
        .seamless-page-container .form-section .mud-grid-spacing-md-6 {
            padding: 0 !important;
            margin: 0 !important;
        }

/* ===== FORM SYSTEM (SPECIALIZED STYLING) ===== */

/* FORM CONTAINER - USES SEGOE UI */
.form-container {
    color: black !important;
    font-size: large !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    margin: 0 !important;
}

    .form-container * {
        color: black !important;
        font-size: large !important;
    }

    .form-container .mud-input,
    .form-container .mud-select,
    .form-container .mud-button,
    .form-container .mud-typography {
        color: black !important;
        font-size: smaller !important;
    }

/* FORM CONTAINER SETUP */
.custom-form-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: -4px !important;
    width: 100% !important;
    gap: 32px !important;
}

    .custom-form-row .field-column {
        padding: 0 !important;
        margin-bottom: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 48px !important;
    }

/* HORIZONTAL LABEL-INPUT LAYOUT */
.row.align-items-center {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    /* min-height: 48px !important;*/
    width: 100% !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
}

    /* LABEL COLUMN */
    .row.align-items-center .col-md-4.text-start {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        padding: 0 !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 120px !important;
    }

    /* INPUT COLUMN */
    .row.align-items-center .col-md-8.text-start {
        flex: 1 1 70% !important;
        max-width: 70% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    /* LABEL TYPOGRAPHY */
    .row.align-items-center .col-md-4 .mud-typography {
        margin: 0 !important;
        font-size: 1rem !important;
        font-weight: 400 !important;
        color: #000000 !important;
        line-height: 1.57 !important;
        /* white-space: nowrap !important;*/
        text-align: left !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* REQUIRED ASTERISK */
    .row.align-items-center .col-md-4 .mud-error-text {
        color: #d32f2f !important;
        font-weight: 400 !important;
        margin-left: 2px !important;
    }

    /* INPUT CONTAINER */
    .row.align-items-center .col-md-8 .mud-input-control {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        flex: 1 !important;
    }

    /* SELECT DROPDOWN CONTAINER */
    .row.align-items-center .col-md-8 .mud-select {
        width: 100% !important;
        min-width: 0 !important;
        /* min-height: 40px !important;*/
        flex: 1 !important;
        position: relative !important;
    }

    /* DATE PICKER */
    .row.align-items-center .col-md-8 .mud-picker {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 !important;
    }

    /* MULTI-SELECT CONTAINER */
    .row.align-items-center .col-md-8 .meta-multiselect-container {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        flex: 1 !important;
    }

    /* INPUT FIELD STYLING */
    .row.align-items-center .col-md-8 .mud-input {
        width: 100% !important;
        min-height: 40px !important;
        margin: 0 !important;
    }

    .row.align-items-center .col-md-8 input.mud-input-slot {
        padding: 8px 12px !important;
        font-size: 1rem !important;
        border-radius: 4px !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Keep MudBlazor's hidden measurement div hidden (it has display:none inline) */
    .row.align-items-center .col-md-8 div.mud-input-slot {
        display: none !important;
    }

    /* But allow MudField (DL/readonly controls) to show their content */
    .row.align-items-center .col-md-8 .mud-field div.mud-input-slot {
        display: block !important;
    }

/* Generic inline loader overlay — used by MetaInlineLoader component */
.oms-inline-loader-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
    border-radius: 4px;
}

/* Remove extra height from MetaInlineLoader inside MudField (DL controls) */
.mud-field .oms-inline-loader {
    min-height: unset;
}

/* DL controls — display label styling (not input field) */
.oms-display-label {
    padding: 8px 0;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
}

/* EXCLUDE hidden-trigger-select from form layout styles (MetaMultiSelectDropDown) */
.row.align-items-center .col-md-8 .hidden-trigger-select div.mud-input-slot {
    display: block !important;
    height: 0px !important;
    min-height: 0px !important;
}

.row.align-items-center .col-md-8 .hidden-trigger-select.mud-select .mud-select-input {
    height: 0px !important;
    min-height: 0px !important;
}

/* SELECT DROPDOWN INPUT STYLING */
.row.align-items-center .col-md-8 .mud-select .mud-select-input {
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 40px 8px 12px !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
}

/* DROPDOWN TRIANGLE POSITIONING */
.row.align-items-center .col-md-8 .mud-select .mud-input-adornment-end {
    position: absolute !important;
    right: -10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
}

    .row.align-items-center .col-md-8 .mud-select .mud-input-adornment-end .mud-icon-root {
        color: #666666 !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        transition: color 0.2s ease !important;
    }

/* DROPDOWN TRIANGLE HOVER STATES */
.row.align-items-center .col-md-8 .mud-select:hover .mud-input-adornment-end .mud-icon-root {
    color: #333333 !important;
}

.row.align-items-center .col-md-8 .mud-select.mud-input-focused .mud-input-adornment-end .mud-icon-root {
    color: var(--focus-color) !important;
}

/* ENSURE TRIANGLE DOESN'T INTERFERE WITH TEXT */
.row.align-items-center .col-md-8 .mud-select-input .mud-typography {
    margin-right: 32px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 !important;
}

/* DATE PICKER INPUT STYLING */
.row.align-items-center .col-md-8 .mud-picker-input .mud-input-slot {
    height: 40px !important;
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
    width: 100% !important;
}

/* CHECKBOX STYLING */
.row.align-items-center .col-md-8 .mud-checkbox {
    margin: 0 !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* SPECIAL INPUT CONTROL */
.row.align-items-center .col-md-8 .mud-input-filled-with-label {
    width: 100% !important;
    max-width: none !important;
}

    .row.align-items-center .col-md-8 .mud-input-filled-with-label .mud-input-slot {
        width: 100% !important;
    }

/* SELECT DROPDOWN FOCUS - NO SHADOWS */
.row.align-items-center .col-md-8 .mud-select.mud-input-focused .mud-select-input {
    border: none !important;
    box-shadow: none !important;
}

/* MUDBLAZOR OVERRIDES */
.row.align-items-center .mud-input-margin-dense,
.row.align-items-center .mud-input-control-margin-dense {
    margin: 0 !important;
}

/* CUSTOM CONTROL HEIGHTS */
.row.align-items-center .custom-control-height {
    min-height: 40px !important;
    height: 40px !important;
}

    .row.align-items-center .custom-control-height .mud-select-input {
        height: 40px !important;
        min-height: 40px !important;
    }




/* ===== COMPREHENSIVE FOCUS STYLING SYSTEM - NO SHADOWS ===== */

/* NORMAL STATE - DARK GRAY BORDER */
.mud-input-outlined .mud-input-outlined-border,
fieldset.mud-input-outlined-border {
    border-color: #999999 !important;
    transition: all 0.3s ease !important;
}

/* HOVER STATE - DARKEST GRAY BORDER */
.mud-input-outlined:hover .mud-input-outlined-border,
.mud-input-outlined:hover fieldset.mud-input-outlined-border {
    border-color: #666666 !important;
    transition: all 0.2s ease !important;
}

/* COMPREHENSIVE FOCUS STATE - ALL POSSIBLE SELECTORS - NO SHADOWS */
.mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-input-outlined:focus-within fieldset.mud-input-outlined-border,
.mud-input-outlined.mud-input-focused .mud-input-outlined-border,
.mud-input-outlined.mud-input-focused fieldset.mud-input-outlined-border,
.mud-picker:focus-within .mud-input-outlined-border,
.mud-picker:focus-within fieldset.mud-input-outlined-border,
.mud-picker.mud-input-focused .mud-input-outlined-border,
.mud-picker.mud-input-focused fieldset.mud-input-outlined-border,
.row.align-items-center .mud-input-outlined:focus-within .mud-input-outlined-border,
.row.align-items-center .mud-input-outlined.mud-input-focused .mud-input-outlined-border,
.row.align-items-center .mud-picker:focus-within .mud-input-outlined-border,
.row.align-items-center .mud-picker.mud-input-focused .mud-input-outlined-border,
.form-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.form-container .mud-input-outlined.mud-input-focused .mud-input-outlined-border,
.form-container .mud-picker:focus-within .mud-input-outlined-border,
.form-container .mud-picker.mud-input-focused .mud-input-outlined-border {
    border-color: var(--focus-color) !important;
    border-width: var(--focus-width) !important;
    box-shadow: none !important; /*  NO SHADOWS */
    transition: all 0.2s ease !important;
}

/* FORCE REMOVAL OF ALL FOCUS SHADOWS */
.mud-input-outlined:focus-within,
.mud-input-outlined.mud-input-focused,
.mud-picker:focus-within,
.mud-picker.mud-input-focused,
.mud-input-control:focus-within,
.mud-input-control.mud-input-focused,
.mud-select:focus-within,
.mud-select.mud-input-focused {
    box-shadow: none !important;
}

/* ===== MAIN FORM COLUMN WIDTHS ===== */
.field-column.col-md-6 {
    flex: 0 0 calc(50% - 16px) !important;
    max-width: calc(50% - 16px) !important;
}

.field-column.col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

.field-column.col-md-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}

.field-column.col-md-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ===== SECTION HEADERS ===== */
.page-header {
    margin: 20px 0 12px 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

    .page-header h5,
    .page-header span {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        color: #333333 !important;
        margin-left: -8px !important;
    }

/* ===== DIVIDERS ===== */
.mud-divider {
    margin: 8px 0 16px 0 !important;
    border-color: #e0e0e0 !important;
}

/* ===== REQUIRED FIELD STYLING ===== */
.row.align-items-center .oms-required .mud-input-slot {
    background-color: #fffbf0 !important;
}

.row.align-items-center .oms-required .mud-input-outlined-border {
    border-color: #999999 !important;
}

/* ===== BUTTON STYLING ===== */
.btn-insert-update {
    margin-top: 24px !important;
    padding: 0 !important;
}

    .btn-insert-update .mud-button {
        margin: 0 4px !important;
        min-width: 80px !important;
    }

/* ===== PAGE CONTENT SYSTEM ===== */
.page-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.shell {
    display: flex;
    min-height: 100vh;
}

.content {
    flex: 1;
}

/* CARDS AND LAYOUT */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #1049AE !important;
    border-radius: 1rem !important;
    padding: 16px;
    margin-bottom: 10px;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.header-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.header-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    background: #1049AE;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.title {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    background: #e7f8ee;
    color: #166534;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    display: inline-block;
    flex-shrink: 0;
}

    .badge.green {
        background: #e7f8ee;
        color: #136a35;
    }

.subtitle {
    color: #6b7280;
    font-size: 0.85rem;
}

/* TABLES */
.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .table th,
    .table td {
        border-bottom: 1px solid #e5e7eb;
        padding: 8px 6px;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table th {
        background: #fafafa;
        text-align: left;
        font-weight: 600;
    }

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

    .table-responsive table {
        width: 100%;
        min-width: 600px;
    }

/* FORMS */
.form {
    width: 100%;
    max-width: 100%;
}

    .form .row {
        margin-bottom: 12px;
    }

    .form label {
        display: block;
        margin-bottom: 4px;
        color: #444;
        font-weight: 600;
    }

    .form input {
        width: 360px;
        max-width: 100%;
        padding: 8px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-sizing: border-box;
    }

.form-container-generic {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* BUTTONS */
.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

    .btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.primary-btn {
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    margin-top: 10px;
}

.secondary-btn {
    background: #e5e7eb;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

/* ===== GENERIC BUTTON STYLES ===== */

/* Pencil edit button - icon-only edit button */
.pencil-edit-btn {
    background: none !important;
    border: none !important;
    color: #6b7280 !important;
    cursor: pointer;
    font-size: 16px !important;
    padding: 4px !important;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 8px;
    margin-top: -10px;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .pencil-edit-btn:hover {
        background-color: none !important;
        color: #4b5563 !important;
        transform: scale(1.1);
    }

    .pencil-edit-btn i {
        font-size: 16px !important;
        color: inherit;
    }

/* MudBlazor button variant */
.mud-button.pencil-edit-btn .mud-icon-root {
    font-size: 16px !important;
    color: #6b7280 !important;
}

.mud-button.pencil-edit-btn:hover .mud-icon-root {
    color: #4b5563 !important;
}

/* Icon-only buttons */
.btn-icon-only {
    min-width: 24px;
    min-height: 24px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add button - primary action button with icon */
.add-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .add-btn i {
        margin-right: 6px;
    }

/* Pay button - success/green action button */
.pay-btn {
    background: #059669;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .pay-btn i {
        margin-right: 6px;
    }

/* CHIPS AND TAGS */
.chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    background: #eef2ff;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.customer-header .chip {
    display: inline-block;
    overflow: visible;
}

.card.customer-header .row, .card.customer-header [class*="col-"] {
    overflow: visible;
}

/* Reduce gap between avatar and name in customer-header */
.card.customer-header > .row > .col-1 {
    flex: 0 0 auto;
    max-width: fit-content;
    padding-right: 12px;
}

/* Make name section fill remaining space for uniform distribution */
.card.customer-header > .row > .col-2 {
    flex: 1;
    max-width: none;
}

    .card.customer-header > .row > .col-2 > .row > .col-8 {
        flex: 0 0 auto;
        max-width: fit-content;
    }

    .card.customer-header > .row > .col-2 > .row > .col-4 {
        flex: 0 0 auto;
        max-width: fit-content;
        padding-left: 8px;
    }

/* Active Since label and year value closer together */
.card.customer-header .row.person-only > .col-6 {
    flex: 0 0 auto;
    max-width: fit-content;
    padding-right: 6px;
}

.card .field-group {
    background-color: #ffffff !important;
    border-left: 4px solid #00aaff !important;
    border-top: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.5rem !important;
}

.chip-label {
    font-weight: 500;
}

.chip.action-link {
    background: rgba(37, 99, 235, 0.05);
}

/* LINKS */
.action-link {
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

    .action-link:hover {
        text-decoration: underline;
    }

.cell-link.action-link {
    font-weight: 400;
}

/* GRID SYSTEM */
/*.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
    max-width: 100%;
    overflow-x: hidden;
}

    .row > * {
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        padding-right: 8px;
        padding-left: 8px;
        margin-top: 0;
    }*/

.col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
}

.col-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
}

.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

.col-8 {
    flex: 0 0 66.66%;
    max-width: 66.66%;
}

.col-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.col-4 {
    flex: 0 0 33.33%;
    max-width: 33.33%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.col-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

/* KPI AND STATS */
.kpi-row {
    display: flex;
    gap: 12px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.kpi {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 180px;
    flex: 1;
}

.kpi-title {
    font-size: 12px;
    color: #666;
}

.kpi-value {
    font-size: 28px;
    font-weight: 600;
}

.stats-card .stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat {
    min-width: 160px;
    flex: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: #6b7280;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 600;
}

.stat-sub {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* CARD TITLES AND HEADERS */
.card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #eef2ff 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    border: 1px solid rgba(99, 102, 241, 0.18);
    margin-bottom: 12px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.view-all {
    font-size: 0.75rem;
    color: #0b5ed7;
    text-decoration: none;
}

/* DETAIL GRIDS */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
}

.detail-label {
    font-size: 0.7rem;
    color: #6b7280;
}

.detail-value {
    font-size: 0.9rem;
    word-break: break-word;
}

.field-label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
    font-size: 0.995rem;
}

.field-value {
    color: #6b7280;
    font-size: 0.995rem;
    word-break: break-word;
}

/* ALERTS AND MESSAGES */
.alert {
    padding: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

    .alert.error {
        background: #fee2e2;
        border: 1px solid #f87171;
        padding: 10px;
        border-radius: 8px;
    }

.loading-indicator {
    font-style: italic;
    color: gray;
    padding: 5px;
}

.meta-button .mud-button-label i[class*="bi"],
.meta-button .mud-button-label i[class*="fa"] {
    margin-right: 6px;
}

/* ===== GRID/TABLE FONT ENHANCEMENTS - SLIM ONLY (NO GLOW) ===== */

/* MUDBLAZOR TABLE CONTENT - SLIM TEXT */
/*.mud-table-cell,
.mud-table-cell *,
.mud-table-row .mud-table-cell,
.mud-table-body .mud-table-cell,
.mud-table .mud-table-cell {
    color: #2a2a2a !important;*/ /*  Slightly lighter text */
/*font-weight: 400 !important;*/ /*  Slim weight */
/*font-weight: 400 !important;*/ /*  Slim weight */
/*font-size: 0.98rem !important;
}*/

/* MUDBLAZOR TABLE CONTENT - SLIM TEXT (scoped to main app only) */
.main-app-scope .mud-table-cell,
.main-app-scope .mud-table-cell *,
.main-app-scope .mud-table-row .mud-table-cell,
.main-app-scope .mud-table-body .mud-table-cell,
.main-app-scope .mud-table .mud-table-cell {
    color: #2a2a2a !important; /*  Slightly lighter text */
    font-weight: 400 !important; /*  Slim weight */
    font-size: 0.98rem !important;
}

    .main-app-scope .mud-table-cell .column-header .sortable-column-header {
        font-weight: 600 !important;
    }

/* EXCLUDE: MudBlazor SelectColumn checkbox/radio SVG icons from the color override above.
   MudBlazor renders these with mud-ripple-checkbox / mud-checkbox-false / mud-checkbox-true classes. */
.mud-table-cell .mud-ripple-checkbox,
.mud-table-cell .mud-checkbox-false,
.mud-table-cell .mud-checkbox-true {
    overflow: hidden !important;
    background-color: transparent !important;
}

   /* .mud-table-cell .mud-checkbox-false svg,
    .mud-table-cell .mud-checkbox-false path {
        color: rgba(0, 0, 0, 0.26) !important;
        fill: rgba(0, 0, 0, 0.26) !important;
    }

    .mud-table-cell .mud-checkbox-true svg,
    .mud-table-cell .mud-checkbox-true path {
        color: #1976d2 !important;
        fill: #1976d2 !important;
    }*/

/* TABLE HEADERS - SLIGHTLY BOLDER */
/*.mud-table-head .mud-table-cell,
.mud-table-head th,
thead .mud-table-cell {
    color: #1a1a1a !important;*/ /*  Darker for headers */
/*font-weight: 400 !important;*/ /*  Normal weight for headers */
/*font-size: 0.98rem !important;
}*/

/* TABLE HEADERS - SLIGHTLY BOLDER (scoped to main app only) */
.main-app-scope .mud-table-head .mud-table-cell,
.main-app-scope .mud-table-head th,
.main-app-scope thead .mud-table-cell {
    color: #1a1a1a !important; /*  Darker for headers */
    font-weight: 400 !important; /*  Normal weight for headers */
    font-size: 0.98rem !important;
}

/* GENERAL TABLE TEXT ENHANCEMENT */
/*.table th,
.table td,
table th,
table td {
    color: #2a2a2a !important;
    font-weight: 300 !important;*/ /*  Slim */
/*}*/

/* GENERAL TABLE TEXT ENHANCEMENT (scoped to main app only) */
.main-app-scope .table th,
.main-app-scope .table td,
.main-app-scope table th,
.main-app-scope table td {
    color: #2a2a2a !important;
    font-weight: 300 !important; /*  Slim */
}

/* TABLE HEADERS */
/*.table th,
table th {
    color: #1a1a1a !important;
    font-weight: 400 !important;*/ /*  Normal for headers */
/*}*/

/* TABLE HEADERS (scoped to main app only) */
.main-app-scope .table th,
.main-app-scope table th {
    color: #1a1a1a !important;
    font-weight: 400 !important; /*  Normal for headers */
}

/* DATA GRID SPECIFIC ENHANCEMENTS */
/*.mud-data-grid .mud-table-cell,
.mud-data-grid-cell,
[class*="data-grid"] .mud-table-cell {
    color: #2a2a2a !important;
    font-weight: 400 !important;*/ /*  Slim */
/*}*/

/* DATA GRID SPECIFIC ENHANCEMENTS (scoped to main app only) */
.main-app-scope .mud-data-grid .mud-table-cell,
.main-app-scope .mud-data-grid-cell,
.main-app-scope [class*="data-grid"] .mud-table-cell {
    color: #2a2a2a !important;
    font-weight: 400 !important; /*  Slim */
}

/* GLOBAL SCROLLBAR FIXES */
.mud-input-control,
.mud-input-control-input-container,
.mud-select-input,
.mud-input-outlined,
.mud-input-adorned-end,
.mud-select {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Allow text inputs to scroll horizontally so long text is not clipped */
.mud-input-slot,
.mud-input-root {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    .mud-input-control::-webkit-scrollbar,
    .mud-input-control-input-container::-webkit-scrollbar,
    .mud-input-slot::-webkit-scrollbar,
    .mud-input-root::-webkit-scrollbar,
    .mud-select-input::-webkit-scrollbar,
    .mud-input-outlined::-webkit-scrollbar,
    .mud-input-adorned-end::-webkit-scrollbar,
    .mud-select::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

/* DROPDOWN POPOVER SCROLLBARS */
.mud-select-popover .mud-list {
    max-height: 256px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
}

    .mud-select-popover .mud-list::-webkit-scrollbar {
        width: 6px !important;
        display: block !important;
    }

    .mud-select-popover .mud-list::-webkit-scrollbar-track {
        background: transparent !important;
    }

    .mud-select-popover .mud-list::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.3) !important;
        border-radius: 3px !important;
    }

        .mud-select-popover .mud-list::-webkit-scrollbar-thumb:hover {
            background-color: rgba(0, 0, 0, 0.5) !important;
        }

/* POPOVER POSITIONING */
.mud-popover {
    z-index: 9999 !important;
}

/* DATE PICKER SCROLLBARS */
.mud-picker-input-control,
.mud-picker-input-control-input-container,
.mud-datepicker {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    .mud-picker-input-control::-webkit-scrollbar,
    .mud-picker-input-control-input-container::-webkit-scrollbar,
    .mud-datepicker::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

/* CHECKBOX AND RADIO SCROLLBARS */
.mud-checkbox,
.mud-radio,
.mud-switch {
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

    .mud-checkbox::-webkit-scrollbar,
    .mud-radio::-webkit-scrollbar,
    .mud-switch::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

/* COMPONENT-SPECIFIC STYLES */
.custom-control-height {
    height: 40px;
    min-height: 40px;
    line-height: normal;
}

    .custom-control-height .mud-select-input {
        height: 40px;
        min-height: 40px;
        line-height: normal;
    }

    .custom-control-height div.mud-select-input.mud-input-slot.mud-input-root {
        align-items: center;
        display: inline-flex !important;
    }

span.mud-icon-button.mud-ripple-checkbox {
    padding: 0;
}

.oms-required {
    background-color: lightyellow;
}

.mud-button-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* HOVER EFFECTS */
.field-column:hover {
    background-color: rgba(0, 0, 0, 0.01) !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}

/* LINK WRAPPER */
.meta-link-wrapper {
    margin-top: 4px !important;
    width: 100% !important;
}

/* FORM OVERRIDES */
.mud-form {
    width: 100% !important;
}

/* CONTENT AREA */
#contentArea {
    width: 100% !important;
    margin-bottom: 16px !important;
}

/* Push form content down when no section header exists as the first control */
.mud-form.no-section-header {
    padding-top: 0;
}

/* FORM CONTROL WIDTH UTILITIES (used via cssClass on DataControl in XML) */
.oms-w-25 {
    max-width: 25% !important;
}

.oms-w-33 {
    max-width: 33.333% !important;
}

.oms-w-50 {
    max-width: 50% !important;
}

.oms-w-75 {
    max-width: 75% !important;
}

.oms-max-w-200 {
    max-width: 200px !important;
}

.oms-max-w-300 {
    max-width: 300px !important;
}

.oms-max-w-400 {
    max-width: 400px !important;
}

.oms-max-w-500 {
    max-width: 500px !important;
}

.oms-max-w-600 {
    max-width: 600px !important;
}

/* UTILITY CLASSES */
.no-overflow {
    overflow-x: hidden;
    max-width: 100%;
}

.grid-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.skeleton {
    background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 37%, #f4f4f5 63%);
    background-size: 400% 100%;
    animation: pulse 1.4s ease infinite;
    border-radius: 12px;
    padding: 16px;
}

.info-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    font-size: 0.6rem;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.req {
    color: #dc2626;
    margin-left: 4px;
}

/* LOADING AND ERROR CONTAINERS */
.loading-container,
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.html-button.icon-only {
    min-width: 24px;
    min-height: 36px !important;
}

/* ANIMATIONS */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

/* CONSOLIDATED RESPONSIVE BREAKPOINTS */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .row.align-items-center .col-md-4.text-start {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }

    .row.align-items-center .col-md-8.text-start {
        flex: 1 1 75% !important;
        max-width: 75% !important;
    }

    .seamless-page-container {
        gap: 24px;
    }
}

/* Medium screens (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .row.align-items-center .col-md-4.text-start {
        flex: 0 0 30% !important;
        max-width: 30% !important;
    }

    .row.align-items-center .col-md-8.text-start {
        flex: 1 1 70% !important;
        max-width: 70% !important;
    }

    .field-column.col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .custom-form-row .field-column.col-md-6:first-child {
        margin-right: 0 !important;
    }

    .seamless-page-container {
        gap: 16px;
    }
}

/* Standard tablet/mobile breakpoint */
@media (max-width: 768px) {
    .layout-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto 1fr;
    }

    .app-header {
        padding: 12px 16px;
    }

    .header-title {
        font-size: 18px;
    }

    .header-title-section {
        gap: 8px;
    }

    .page-container {
        padding: 12px;
    }

    .kpi-row {
        flex-direction: column;
    }

    .row {
        flex-direction: column;
    }

    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Small screens (768px and below) - Form-specific */
@media (max-width: 767px) {
    .custom-form-row .field-column.col-md-6:first-child {
        margin-right: 0 !important;
    }

    .row.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        min-height: auto !important;
        gap: 4px !important;
    }

        .row.align-items-center .col-md-4.text-start,
        .row.align-items-center .col-md-8.text-start {
            flex: 0 0 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            text-align: left !important;
            justify-content: flex-start !important;
        }

        .row.align-items-center .col-md-4 .mud-typography {
            text-align: left !important;
            margin-bottom: 4px !important;
        }

    .field-column.col-md-6,
    .field-column.col-md-4,
    .field-column.col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .header-title {
        font-size: 16px;
    }

    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .header-actions {
        gap: 4px;
    }

    .action-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .page-container {
        padding: 8px;
    }

    .card {
        padding: 12px;
        margin-bottom: 8px;
        margin-top: 8px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================= END OF COMBINED CSS ======================================*/


/* ================================================= MASKED FIELD STYLES starts ===== */
.masked-field {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    border: 1px solid transparent;
}

    .masked-field:hover {
        background-color: rgba(37, 99, 235, 0.05);
        border-color: rgba(37, 99, 235, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.field-value-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-value {
    transition: all 0.2s ease;
    font-family: inherit;
    flex: 1;
}

    .field-value.masked {
        color: #6b7280;
        font-weight: 500;
        letter-spacing: 1px;
        font-family: 'Courier New', monospace;
        user-select: none;
        -webkit-user-select: none;
    }

    .field-value.unmasked {
        color: #1f2937;
        font-weight: 600;
        background-color: rgba(16, 185, 129, 0.1);
        padding: 2px 6px;
        border-radius: 3px;
        animation: unmaskReveal 0.2s ease;
        border: 1px solid rgba(16, 185, 129, 0.2);
        user-select: text;
        -webkit-user-select: text;
    }

.mask-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: all 0.2s ease;
    pointer-events: none;
}

.masked-field:hover .mask-indicator {
    color: #2563eb;
    transform: translateY(-50%) scale(1.1);
}

.masked-field.unmasked .mask-indicator {
    color: #10b981;
}

/* Unmask animation */
@keyframes unmaskReveal {
    from {
        opacity: 0;
        transform: translateY(-2px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Security: Prevent text selection on masked content */
.field-value.masked::selection {
    background: transparent;
}

/* Enhanced hover effects for masked fields */
.masked-field .field-label {
    transition: color 0.2s ease;
}

.masked-field:hover .field-label {
    color: #2563eb;
    font-weight: 500;
}

/* Accessibility: Screen reader support */
.field-value.masked[aria-label]:before {
    content: "Masked content. Hover to reveal.";
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Mobile: Prevent hover on touch devices */
@media (hover: none) {
    .masked-field {
        cursor: default;
    }

        .masked-field:hover {
            background-color: transparent;
            border-color: transparent;
            transform: none;
            box-shadow: none;
        }

        /* On mobile, show unmasked on tap/touch */
        .masked-field:active .field-value.masked {
            color: #1f2937;
            background-color: rgba(16, 185, 129, 0.1);
            padding: 2px 6px;
            border-radius: 3px;
        }
}

/* =================================================  MASKED FIELD STYLES ends==================*/



/* =================================================NAVIGATION ITEM STYLES starts===== */

@media (min-width: 769px) {
    .navigation-sidebar {
        width: 15vw;
        min-width: 180px;
        max-width: 250px;
        background: var(--sidebar-bg);
        color: white;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100%;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

        .navigation-sidebar.desktop-collapsed {
            width: 60px;
            min-width: 60px;
        }

    /* Content area width handled by CSS Grid - no manual calc needed */
}

@media (max-width: 768px) {
    .navigation-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        z-index: 1000;
        height: calc(100vh - 64px);
        width: 250px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        background: var(--sidebar-bg);
        color: white;
        overflow-y: auto;
        transition: transform 0.3s ease;
    }

        .navigation-sidebar.mobile-hidden {
            transform: translateX(-100%);
        }

        .navigation-sidebar.mobile-visible {
            transform: translateX(0);
        }

    .content-area {
        width: 100% !important;
    }

    .mobile-backdrop {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        cursor: pointer;
    }
}

/* ===== COLLAPSIBLE NAVIGATION STYLES ===== */

/* ===== NAVIGATION ITEM STYLES ===== */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .nav-item.active {
        background: rgba(255, 255, 255, 0.15);
        color: white;
        font-weight: 500;
    }

.nav-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-initials {
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: #1049AE;
    text-align: center;
    width: 100%;
    display: block;
    letter-spacing: 0.5px;
}

.expand-icon {
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 12px;
}

.nav-item.expandable.expanded .expand-icon {
    transform: rotate(90deg);
}

.nav-subitems {
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-subitem {
    padding: 12px 20px 12px 52px !important;
    font-size: 13px !important;
    opacity: 0.95;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .nav-subitem:last-child {
        border-bottom: none;
    }

/* ===== HOVER POPUP STYLES ===== */
.navigation-sidebar .nav-item-container {
    position: relative;
}

.navigation-sidebar .nav-hover-popup {
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 1500;
    margin-left: 8px;
    opacity: 0;
    animation: navFadeInPopup 0.2s ease forwards;
    pointer-events: auto;
}

.navigation-sidebar .nav-hover-popup-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    max-width: 250px;
    padding: 8px 0;
    overflow: hidden;
}

.navigation-sidebar .nav-hover-main-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 600;
    color: #374151;
    transition: background-color 0.2s;
}

    .navigation-sidebar .nav-hover-main-item:hover {
        background-color: #f9fafb;
    }

    .navigation-sidebar .nav-hover-main-item.nav-hover-active {
        background-color: #eff6ff;
        color: #2563eb;
    }

/* ===== HOVER POPUP STYLES ===== */

.navigation-sidebar .nav-hover-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navigation-sidebar .nav-hover-subitems {
    padding-top: 4px;
}

.navigation-sidebar .nav-hover-subitem {
    padding: 10px 16px 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    transition: background-color 0.2s;
}

    .navigation-sidebar .nav-hover-subitem:hover {
        background-color: #f9fafb;
        color: #374151;
    }

    .navigation-sidebar .nav-hover-subitem.nav-hover-active {
        background-color: #eff6ff;
        color: #2563eb;
        font-weight: 500;
    }

.navigation-sidebar .nav-hover-subitem-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navigation-sidebar .nav-hover-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background-color: #dc3545;
    margin-left: 8px;
}


/* ===== WORKING HOVER POPUP STYLES ===== */
.working-hover-popup {
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 1500;
    margin-left: 10px;
    pointer-events: auto;
}

.working-popup-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    max-width: 250px;
    padding: 8px 0;
    overflow: hidden;
}

.working-main-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #333;
    transition: background-color 0.2s;
}

    .working-main-item:hover {
        background-color: #f8f9fa;
    }

    .working-main-item.working-active {
        background-color: #e3f2fd;
        color: #1976d2;
    }

.working-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.working-subitems {
    padding-top: 4px;
}

.working-subitem {
    padding: 10px 16px 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: background-color 0.2s;
}

    .working-subitem:hover {
        background-color: #f8f9fa;
        color: #333;
    }

    .working-subitem.working-active {
        background-color: #e3f2fd;
        color: #1976d2;
        font-weight: 500;
    }

.working-subitem-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.working-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background-color: #dc3545;
    margin-left: 8px;
}

/* Ensure containers support positioning */
.navigation-sidebar {
    overflow: visible !important;
    background-color: #1e40af;
}

    .navigation-sidebar .nav-item-container {
        position: relative;
        overflow: visible !important;
    }




/* ===== NAVIGATION ITEM STYLES ===== */


/* ===== ANIMATIONS ===== */
@keyframes navFadeInPopup {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== COLLAPSED STATE STYLES ===== */
@media (min-width: 769px) {
    .navigation-sidebar.desktop-collapsed .nav-item {
        padding: 16px 8px;
        justify-content: center;
        text-align: center;
        min-height: 48px;
    }

    .navigation-sidebar.desktop-collapsed .nav-initials {
        font-size: 12px;
        font-weight: 700;
    }
    /* Disable tooltips when popup is enabled */
    .navigation-sidebar.desktop-collapsed .nav-item:hover::after {
        display: none;
    }

    .navigation-sidebar.desktop-collapsed .nav-item:hover::before {
        display: none;
    }
}

/* Mobile - hide popup */
@media (max-width: 768px) {
    .navigation-sidebar .nav-hover-popup {
        display: none;
    }
}


/* ================================================= NAVIGATION STYLES ends ===== */

/* ===== ADDRESS ROW CONTINUATION STYLES ===== */
/* Use these classes instead of inline margin-left styles for address continuation */

/* Address row container - makes fields flow as continuous text */
.address-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
}

    /* Address row - override Bootstrap grid so all cols auto-size to content */
    .address-row > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        flex: 0 0 auto !important;
        max-width: none !important;
        width: auto !important;
    }

/* Address value column - can shrink on very long addresses */
.address-value-col {
    flex: 0 1 auto !important;
}

/* Address edit button column - sit right after address text */
.address-edit-btn-col {
    margin-left: 8px !important;
}

/* Address continuation - pull content left to close gap */
.address-continuation {
    margin-left: -180px !important;
}

/* Medium continuation for contact edit buttons */
.address-continuation-medium {
    margin-left: -30px !important;
}

/* Stronger continuation for tighter spacing */
.address-continuation-tight {
    margin-left: -200px !important;
}

/* Responsive adjustments for address continuation */
@media (max-width: 1400px) {
    .address-continuation {
        margin-left: -140px !important;
    }

    .address-continuation-tight {
        margin-left: -160px !important;
    }
}

@media (max-width: 1200px) {
    .address-continuation {
        margin-left: -100px !important;
    }

    .address-continuation-medium {
        margin-left: -20px !important;
    }

    .address-continuation-tight {
        margin-left: -120px !important;
    }
}

@media (max-width: 992px) {
    .address-continuation,
    .address-continuation-medium,
    .address-continuation-tight {
        margin-left: 0 !important;
    }

    .address-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .address-row {
        flex-direction: column;
    }

    .address-continuation,
    .address-continuation-medium,
    .address-continuation-tight {
        margin-left: 0 !important;
        margin-top: 4px;
    }
}

/* Alternative: Inline address display (all parts on same line) */
.address-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: baseline;
}

    .address-inline .field-value-container,
    .address-inline .field-value {
        display: inline;
        margin-right: 4px;
    }

/* Hide label for continuation fields */
.address-continuation .field-label,
.address-continuation-medium .field-label,
.address-continuation-tight .field-label,
.hide-label .field-label {
    display: none !important;
}

/* ===== END ADDRESS ROW STYLES ===== */

/* ===== WIZARD MODAL STYLES ===== */

/* Backdrop */
.wizard-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(17, 24, 39, 0.7);
    padding: 20px;
}

/* Dialog container */
.wizard-modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 90vw;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.wizard-header {
    padding: 16px 24px;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eaeef5;
}

.wizard-header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: black;
}

.wizard-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #374151;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

    .wizard-close-btn:hover {
        opacity: 1;
    }

/* Step Indicator */
.wizard-step-indicator {
    padding: 8px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.wizard-step-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

    .wizard-step-circle.active {
        background: #1049AE;
        color: white;
    }

    .wizard-step-circle.completed {
        background: #1049AE;
        color: white;
    }

.wizard-step-title {
    color: #6b7280;
    font-size: 14px;
}

    .wizard-step-title.active {
        font-weight: 600;
        color: #1f2937;
    }

.wizard-step-connector {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
}

    .wizard-step-connector.completed {
        background: #1049AE;
    }

/* Body */
.wizard-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: white;
}

/* Error message */
.wizard-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    margin-bottom: 16px;
}

/* Card selection container */
.wizard-card-description-text {
    text-align: center;
    margin-bottom: 32px;
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
}

.wizard-card-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wizard-card-item {
    width: 200px;
    padding: 16px 12px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid #e5e7eb;
    background: white;
}

    .wizard-card-item:hover {
        border-color: #93c5fd;
        background: #f0f7ff;
    }

    .wizard-card-item.selected {
        border-color: #1049AE;
        background: #e8f0fa;
    }

.wizard-card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #f3f4f6;
    color: #6b7280;
}

    .wizard-card-icon .wizard-icon {
        display: inline-block;
        width: 20px;
        height: 20px;
        background-size: contain;
        background-repeat: no-repeat;
    }

    .wizard-card-icon i {
        font-size: 18px;
    }

        /* ===== WIZARD CARD ICONS (CSS-only — edit here to change icons, no code change needed) ===== */
        /* Default icon for any unrecognized code */
        .wizard-card-icon i[class*="wizard-card-icon-"]::before {
            content: "\f287"; /* bi-circle */
        }

/* Person wizard: contact type codes */
.wizard-card-icon-wizard_internal::before {
    content: "\f4d3" !important;
}
/* bi-person-badge */
.wizard-card-icon-wizard_partner::before {
    content: "\f4d0" !important;
}
/* bi-people */
.wizard-card-icon-wizard_external::before {
    content: "\f4e1" !important;
}
/* bi-person */

/* Organization wizard */
/* Uses wizard_external (bi-person) and wizard_partner (bi-people) from above */

/* Location wizard: location type codes — add specific codes as needed */
/* Example: .wizard-card-icon-office::before  { content: "\f124" !important; }  bi-building */
/* Example: .wizard-card-icon-home::before    { content: "\f3dc" !important; }  bi-house */
/* Fallback for all location codes: */
.wizard-card-icon i[class*="wizard-card-icon-"]:not(.wizard-card-icon-wizard_internal):not(.wizard-card-icon-wizard_partner):not(.wizard-card-icon-wizard_external)::before {
    content: "\f3ab"; /* bi-geo-alt — override this per-code as needed */
}
/* ===== END WIZARD CARD ICONS ===== */

.wizard-card-item.selected .wizard-card-icon {
    background: #1049AE;
    color: white;
}

.wizard-card-label {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.wizard-card-item.selected .wizard-card-label {
    color: #1049AE;
}

.wizard-card-desc {
    font-size: 12px;
    color: #6b7280;
}

/* No matches result */
.wizard-no-matches {
    text-align: center;
    padding: 40px;
}

.wizard-no-matches-icon {
    font-size: 48px;
    color: #1049AE;
    margin-bottom: 16px;
}

.wizard-no-matches h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
}

.wizard-no-matches p {
    margin: 0;
    color: #6b7280;
}

/* Matches found */
.wizard-matches-found h4 {
    margin: 0 0 8px 0;
    color: #dc2626;
}

.wizard-matches-found p {
    margin: 0;
    color: #6b7280;
    margin-bottom: 16px;
}

/* Standard form grid */
.wizard-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.wizard-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

    .wizard-form-field label .wizard-required {
        color: #dc2626;
        margin-left: 4px;
    }

.wizard-form-field input,
.wizard-form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

    .wizard-form-field input:focus,
    .wizard-form-field select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Footer */
.wizard-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer bottom gradient bar (matches header) */
.wizard-footer-bar {
    height: 4px;
    background: linear-gradient(90deg, #1049AE 0%, #f0c040 100%);
}

.wizard-footer-left,
.wizard-footer-right {
    display: flex;
    gap: 12px;
}

/* Wizard buttons */
.wizard-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.wizard-btn-secondary {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
}

    .wizard-btn-secondary:hover {
        background: #f3f4f6;
    }

.wizard-btn-primary {
    border: none;
    background: #1049AE;
    color: white;
}

    .wizard-btn-primary:hover {
        background: #0d3d8f;
    }

.wizard-btn-success {
    border: none;
    background: #1049AE;
    color: white;
}

    .wizard-btn-success:hover {
        background: #0d3d8f;
    }

/* Processing overlay */
.wizard-processing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    color: #6b7280;
    gap: 16px;
}

.wizard-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #1049AE;
    border-radius: 50%;
    animation: wizard-spin 0.8s linear infinite;
}

@keyframes wizard-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Card selection layout from XML attribute layout="horizontal"/"vertical" */
.wizard-card-selection-cards.layout-horizontal {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
}

.wizard-card-selection-cards.layout-vertical {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Hide grid toolbar/search/download inside wizard popup */
.wizard-body .mud-table-toolbar,
.wizard-body .mud-toolbar {
    display: none !important;
}

.wizard-body .standard-container {
    width: 100%;
    margin-top: -1px !important;
    margin-left: 0;
}

/* Global MudBlazor popover z-index fix - must be above all modals/dialogs */
.mud-popover-provider,
.mud-popover,
.mud-popover-open,
.mud-menu,
.mud-autocomplete-popover,
.mud-select-popover {
    z-index: 99999 !important;
}

/* Global loader must appear above wizard/popup modals (z-index 9999) */
.loader-container {
    z-index: 10001 !important;
}

/* Ensure popovers inside wizard are also above wizard modal */
.wizard-modal-backdrop .mud-popover-provider,
.wizard-modal-backdrop .mud-popover {
    z-index: 100000 !important;
}

/* Processing overlay - lock screen */
.wizard-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    gap: 16px;
}

/* Card description text spacing */
.wizard-card-description-text {
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

/* Wizard match result messages */
.wizard-match-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 400;
}

    .wizard-match-message i {
        font-size: 20px;
        margin-top: 2px;
        flex-shrink: 0;
    }

.wizard-match-message-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .wizard-match-message-text strong {
        font-size: 15px;
        font-weight: 600;
    }

    .wizard-match-message-text span {
        font-size: 13px;
        font-weight: 400;
        opacity: 0.85;
    }

.wizard-match-found {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

    .wizard-match-found i {
        color: #f59e0b;
    }

.wizard-no-match {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

    .wizard-no-match i {
        color: #10b981;
    }

/* Wizard grid: ensure pager is visible (toolbar is hidden but pager must show) */
.wizard-body .mud-table-pagination-toolbar {
    display: flex !important;
}

/* Wizard grid: remove extra spacing inside wizard body — override global .standard-container padding */
.wizard-body .form-section,
.wizard-body .standard-container .form-section,
.wizard-body .standard-container .grid-section {
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
}

.wizard-body .grid-scroll-wrapper {
    margin: 0;
    padding: 0;
}

/* Align Edit container and standard-container width with message banner inside wizard */
.wizard-body .container,
.wizard-body .standard-container {
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Wizard form: reduce label width so inputs get more space in narrow columns */
.wizard-body .row.align-items-center .col-md-4.text-start {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

.wizard-body .row.align-items-center .col-md-8.text-start {
    flex: 1 1 0% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* Card selection label spacing */
.wizard-card-selection-label {
    margin-bottom: 16px;
}

/* ===== END WIZARD MODAL STYLES ===== */

/* ===== BREADCRUMB & BACK TO SEARCH ===== */
.breadcrumb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .breadcrumb-container .breadcrumb-item + .breadcrumb-item::before {
        content: "" !important;
    }

.back-to-search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #1049AE;
    border: 1px solid #1049AE;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .back-to-search-btn:hover {
        background-color: #0d47a1;
        border-color: #0d47a1;
    }

    .back-to-search-btn i {
        font-size: 14px;
    }

/* ===== MASKED FIELD (SSN, DOB, etc.) ===== */
.oms-masked-field input {
    -webkit-text-security: disc;
    text-security: disc;
}

.oms-mask-toggle {
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    z-index: 1;
}

    .oms-mask-toggle:hover {
        color: #1049AE;
    }

.oms-mask-wrapper {
    position: relative;
}

/* ===== SEARCH FORM — CONTAINER QUERY RESPONSIVE COLUMNS ===== */
/* Column width is controlled by Bootstrap col-xl-* classes generated from NumberOfDataCols in XML.
   Only override for very narrow containers where Bootstrap breakpoints cannot respond correctly. */
.search_control_row {
    container-type: inline-size;
}

/* Container 400–699px: 2 columns — tablet/narrow windows */
@container (min-width: 400px) and (max-width: 699px) {
    .search_control_row > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Container <400px: 1 column — mobile */
@container (max-width: 399px) {
    .search_control_row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Inside search rows, let labels shrink instead of overflowing */
.search_control_row .row.align-items-center .col-md-4.text-start {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    max-width: none !important;
}

.search_control_row .row.align-items-center .col-md-8.text-start {
    flex: 1 1 0% !important;
    max-width: none !important;
    min-width: 0 !important;
}
