
    .ccws-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 65px !important;
        padding: 6px 12px !important;
        border-bottom: 1px solid var(--ccws-border, #e2e8f0) !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        width: 100% !important;
    }

    .ccws-brand--docked {
        justify-content: center !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .ccws-brand__logo {
        height: 100% !important;
        max-height: 52px !important;
        width: 110px !important;
        max-width: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block !important;
        margin: auto !important;
    }

    .ccws-brand__logo--mini {
        height: 32px !important;
        width: 56px !important;
        max-height: 32px !important;
        max-width: 100% !important;
        object-fit: contain !important;
        display: block !important;
        margin: auto !important;
    }

    .ccws-nav {
        overflow-x: hidden !important;
        padding: 8px 4px !important;
    }

    .ccws-nav-section-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        color: var(--ccws-text-muted, #94a3b8);
        padding: 14px 16px 6px 16px;
        text-transform: uppercase;
    }

    .ccws-sidebar-version-badge {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px;
        margin-bottom: 8px;
        background: var(--ccws-bg-subtle, rgba(0, 0, 0, 0.04));
        border: 1px solid var(--ccws-border, rgba(255, 255, 255, 0.08));
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .ccws-sidebar-version-badge:hover {
        background: rgba(0, 118, 255, 0.08);
        border-color: var(--ccws-primary, #0076FF);
    }

    .ccws-version-pulse-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #10B981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
        display: inline-block;
    }

    .ccws-version-badge-text {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--ccws-text, #1E293B);
    }

    .ccws-version-badge-pill {
        margin-left: auto;
        font-size: 0.62rem;
        font-weight: 800;
        padding: 1px 5px;
        border-radius: 4px;
        background: rgba(0, 118, 255, 0.15);
        color: var(--ccws-primary, #0076FF);
        letter-spacing: 0.04em;
    }

.ccws-nav-mini-actions { display:flex; flex-direction:column; align-items:center; gap:6px; }
.ccws-theme-sun { color: #F59E0B; }
.ccws-theme-moon { color: #64748B; }
.ccws-notification-anchor { position: relative; }
.ccws-notification-menu { width: 320px; right: 0; padding: 0; }
.ccws-notification-heading { padding: 12px 16px; font-weight: 700; font-size: 0.88rem; border-bottom: 1px solid var(--ccws-border); display: flex; align-items: center; justify-content: space-between; }
.ccws-mark-read { font-size: 0.72rem; color: var(--ccws-primary); cursor: pointer; }
.ccws-notification-list { max-height: 260px; overflow-y: auto; }
.ccws-notification-card { padding: 10px 16px; border-bottom: 1px solid var(--ccws-border); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.ccws-notification-critical { font-weight: 700; font-size: 0.82rem; color: #EF4444; }
.ccws-notification-text { font-size: 0.76rem; color: var(--ccws-text-muted); }
.ccws-notification-time { font-size: 0.7rem; color: var(--ccws-text-muted); }
.ccws-notification-title { font-weight: 700; font-size: 0.82rem; color: var(--ccws-text); }
.ccws-notification-footer { justify-content: center; font-weight: 700; color: var(--ccws-primary); }
.ccws-user-anchor { position:relative; }
.ccws-user-avatar { width: 38px !important; height: 38px !important; max-width: 38px !important; max-height: 38px !important; border-radius: 50% !important; object-fit: cover !important; display: block !important; flex-shrink: 0 !important; }
.ccws-version-chip { margin-left: auto; font-size: 0.7rem; font-weight: 700; background: rgba(0, 118, 255, 0.12); color: var(--ccws-primary, #0076FF); padding: 2px 6px; border-radius: 4px; }

/* MudBlazor components share the existing Roca layout and theme tokens. */
.ccws-mud-sidebar.mud-drawer { background:var(--ccws-sidebar-bg); color:var(--ccws-sidebar-text); border-right:1px solid var(--ccws-sidebar-border); }
.ccws-mud-sidebar .mud-drawer-content { display:flex; flex-direction:column; height:100%; overflow:hidden; }
.ccws-mud-sidebar .ccws-nav { flex:1; overflow-y:auto; min-height:0; }
.ccws-nav__item .mud-nav-link-text { display:flex; align-items:center; gap:12px; margin:0; }
.ccws-nav__item--docked .mud-nav-link-text { justify-content:center; }
.ccws-topbar .mud-button-root { min-width:0; text-transform:none; }
.ccws-topbar .mud-button-label { display:flex; align-items:center; gap:8px; }
.ccws-notification-card { width:100%; text-align:left; }
.ccws-notification-card .mud-button-label { flex-direction:column; align-items:flex-start; gap:2px; }
.ccws-mud-topbar-search { margin-top:0; width:100%; }
.ccws-search-wrap:has(.ccws-mud-topbar-search) { background:var(--ccws-surface) !important; }
.ccws-mud-topbar-search input { color:var(--ccws-text); }
.ccws-mud-topbar-search input::placeholder { color:var(--ccws-text-muted); opacity:1; }
.ccws-mud-topbar-search .mud-input-control-input-container { padding:0; }
.ccws-mud-dialog.mud-dialog { max-width:calc(100vw - 32px); color:var(--mud-palette-text-primary); background:var(--mud-palette-surface); --ccws-text:var(--mud-palette-text-primary); --ccws-text-muted:var(--mud-palette-text-secondary); --ccws-bg:var(--mud-palette-background); --ccws-border:var(--mud-palette-divider); }
.ccws-mud-dialog .mud-dialog-content { overflow-y:auto; }
.ccws-mud-dialog .mud-dialog-actions { gap:8px; padding:16px 24px; }
.ccws-mud-grid { overflow-x:auto; }
.ccws-print-frame { position:fixed; width:0; height:0; border:0; }
@media (max-width:959.98px) { .ccws-main--expanded, .ccws-main--collapsed { margin-left:0; } }
@media (max-width:600px) {
    .ccws-topbar__center { display:none !important; }
    .ccws-topbar { padding:0 12px; }
    .ccws-topbar__right { gap:4px !important; }
    .ccws-topbar__right .mud-button-root { padding:6px; }
    .ccws-topbar__right > .ccws-topbar__icon-btn:last-of-type { display:none; }
    .ccws-mud-dialog .mud-dialog-content { padding:16px; }
}

.ccws-dialog-width-420.mud-dialog { width:420px; }
.ccws-dialog-width-480.mud-dialog { width:480px; }
.ccws-dialog-width-500.mud-dialog { width:500px; }
.ccws-dialog-width-550.mud-dialog { width:550px; }
.ccws-dialog-width-600.mud-dialog { width:600px; }
.ccws-dialog-width-700.mud-dialog { width:700px; }
.ccws-dialog-width-760.mud-dialog { width:760px; }
.ccws-dialog-width-800.mud-dialog { width:800px; }

/* ── MudDataGrid Enterprise Styling Overrides ─────────────────────── */
.ccws-mud-grid .mud-table-head .mud-table-cell {
    background: #F8FAFC !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    border-bottom: 1px solid #E2E8F0 !important;
    padding: 12px 16px !important;
    height: 44px !important;
    font-family: var(--ccws-font) !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-head .mud-table-cell {
    background: #0F172A !important;
    color: #94A3B8 !important;
    border-bottom-color: #334155 !important;
}

.ccws-mud-grid .mud-table-body .mud-table-cell {
    font-size: 14px !important;
    color: #0F172A !important;
    border-bottom: 1px solid #F1F5F9 !important;
    padding: 10px 16px !important;
    height: 52px !important;
    font-family: var(--ccws-font) !important;
    vertical-align: middle !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-body .mud-table-cell {
    color: #F8FAFC !important;
    border-bottom-color: #1E293B !important;
}

/* Row hover: brand-tinted (follows the user's accent colour) with a left accent bar */
.ccws-mud-grid .mud-table-body .mud-table-row {
    transition: background-color 0.15s ease;
}

.ccws-mud-grid .mud-table-body .mud-table-row:hover .mud-table-cell {
    background-color: color-mix(in srgb, var(--ccws-primary, #2563eb) 9%, #ffffff) !important;
}

.ccws-mud-grid .mud-table-body .mud-table-row:hover .mud-table-cell:first-child {
    box-shadow: inset 3px 0 0 var(--ccws-primary, #2563eb);
}

.ccws-theme-dark .ccws-mud-grid .mud-table-body .mud-table-row:hover .mud-table-cell {
    background-color: color-mix(in srgb, var(--ccws-primary, #3b82f6) 20%, #0F172A) !important;
}

/* Selected row: slightly stronger than hover so both states stay distinguishable */
.ccws-mud-grid .mud-table-body .mud-table-row.mud-selected-item .mud-table-cell {
    background-color: color-mix(in srgb, var(--ccws-primary, #2563eb) 14%, #ffffff) !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-body .mud-table-row.mud-selected-item .mud-table-cell {
    background-color: color-mix(in srgb, var(--ccws-primary, #3b82f6) 28%, #0F172A) !important;
}

/* Pager clean refinement */
.ccws-mud-grid .mud-table-pagination {
    border-top: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    padding: 6px 16px !important;
    min-height: 44px !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-pagination {
    border-top-color: #334155 !important;
    background: #1E293B !important;
}

.ccws-mud-grid .mud-table-pagination-caption {
    font-size: 12px !important;
    color: #64748B !important;
    font-family: var(--ccws-font) !important;
}

/* ── Middle Toolbar & Filter Card ────────────────────────────── */
.ccws-middle-toolbar-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.ccws-theme-dark .ccws-middle-toolbar-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.ccws-pills-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.ccws-pills-row.mb-0 {
    margin-bottom: 0 !important;
}

/* DataGrid top toolbar with pills & count */
.ccws-mud-grid .mud-table-toolbar {
    padding: 10px 18px !important;
    min-height: 52px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
}

.ccws-mud-grid .mud-table-toolbar .mud-toolbar-spacer {
    flex-grow: 1 !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-toolbar {
    background: #1e293b !important;
    border-bottom-color: #334155 !important;
}

/* ── Thin Enterprise Scrollbars (Theme Matched) ─────────────── */
html,
body,
.ccws-page-content,
.ccws-mud-grid .mud-table-container {
    scrollbar-width: thin !important;
    scrollbar-color: #CBD5E1 transparent !important;
}

.ccws-theme-dark html,
.ccws-theme-dark body,
.ccws-theme-dark .ccws-page-content,
.ccws-theme-dark .ccws-mud-grid .mud-table-container {
    scrollbar-color: #475569 transparent !important;
}

/* Scrollbar sizing on page & table only */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.ccws-page-content::-webkit-scrollbar,
.ccws-mud-grid .mud-table-container::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.ccws-page-content::-webkit-scrollbar-track,
.ccws-mud-grid .mud-table-container::-webkit-scrollbar-track {
    background: transparent !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.ccws-page-content::-webkit-scrollbar-thumb,
.ccws-mud-grid .mud-table-container::-webkit-scrollbar-thumb {
    background: #CBD5E1 !important;
    border-radius: 9999px !important;
    transition: background 0.15s ease !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.ccws-page-content::-webkit-scrollbar-thumb:hover,
.ccws-mud-grid .mud-table-container::-webkit-scrollbar-thumb:hover {
    background: #94A3B8 !important;
}

.ccws-theme-dark html::-webkit-scrollbar-thumb,
.ccws-theme-dark body::-webkit-scrollbar-thumb,
.ccws-theme-dark .ccws-page-content::-webkit-scrollbar-thumb,
.ccws-theme-dark .ccws-mud-grid .mud-table-container::-webkit-scrollbar-thumb {
    background: #475569 !important;
}

.ccws-theme-dark html::-webkit-scrollbar-thumb:hover,
.ccws-theme-dark body::-webkit-scrollbar-thumb:hover,
.ccws-theme-dark .ccws-page-content::-webkit-scrollbar-thumb:hover,
.ccws-theme-dark .ccws-mud-grid .mud-table-container::-webkit-scrollbar-thumb:hover {
    background: #64748B !important;
}

/* ── Hide Scrollbars completely on Sidebar / Icon Rail / Navigation Menu ── */
.ccws-rail,
.ccws-rail *,
.ccws-nav-menu,
.ccws-nav-menu *,
.ccws-sidebar,
.ccws-sidebar *,
.ccws-drawer,
.ccws-drawer *,
.ccws-mud-sidebar,
.ccws-mud-sidebar *,
.ccws-nav,
.ccws-nav * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.ccws-rail::-webkit-scrollbar,
.ccws-rail *::-webkit-scrollbar,
.ccws-nav-menu::-webkit-scrollbar,
.ccws-nav-menu *::-webkit-scrollbar,
.ccws-sidebar::-webkit-scrollbar,
.ccws-sidebar *::-webkit-scrollbar,
.ccws-drawer::-webkit-scrollbar,
.ccws-drawer *::-webkit-scrollbar,
.ccws-mud-sidebar::-webkit-scrollbar,
.ccws-mud-sidebar *::-webkit-scrollbar,
.ccws-nav::-webkit-scrollbar,
.ccws-nav *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* ── Column-wise Filter Funnel Icons in DataGrid Header ────────────── */
.ccws-mud-grid .mud-table-head .filter-button,
.ccws-mud-grid .filter-button {
    opacity: 0.75 !important;
    display: inline-flex !important;
    visibility: visible !important;
    color: #64748B !important;
    padding: 2px !important;
    margin-left: 4px !important;
    transition: opacity 0.15s ease, color 0.15s ease !important;
}

.ccws-mud-grid .mud-table-head .filter-button:hover,
.ccws-mud-grid .filter-button:hover,
.ccws-mud-grid .filter-button.filtered {
    opacity: 1 !important;
    color: var(--ccws-primary, #2563EB) !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-head .filter-button,
.ccws-theme-dark .ccws-mud-grid .filter-button {
    color: #94A3B8 !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-head .filter-button:hover,
.ccws-theme-dark .ccws-mud-grid .filter-button.filtered {
    color: #38BDF8 !important;
}

/* ── Body & Page Scrolling (Enabled with Comfortable Padding) ──── */
.ccws-page-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding-bottom: 36px !important;
}

.ccws-page-fill {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.ccws-main-panel-card {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 24px !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.ccws-theme-dark .ccws-main-panel-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.ccws-mud-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.ccws-mud-grid .mud-table-container {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 200px) !important;
    min-height: 290px !important;
}

.ccws-mud-grid .mud-table-head th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #F8FAFC !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-head th {
    background: #0F172A !important;
}

.ccws-mud-grid .mud-table-head .mud-table-cell {
    background: #F8FAFC !important;
}

.ccws-theme-dark .ccws-mud-grid .mud-table-head .mud-table-cell {
    background: #0F172A !important;
}

.ccws-filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 18px !important;
    border-radius: 9999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-family: var(--ccws-font) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    outline: none !important;
}

.ccws-filter-pill--active {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
}

.ccws-filter-pill--inactive {
    background: #FFFFFF !important;
    color: #334155 !important;
    border: 1px solid #E2E8F0 !important;
}

.ccws-filter-pill--inactive:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
}

.ccws-theme-dark .ccws-filter-pill--inactive {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.ccws-filter-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.ccws-filter-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.ccws-filter-right {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

/* Search input */
.ccws-filter-search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 38px !important;
    width: 280px !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.ccws-theme-dark .ccws-filter-search-box {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.ccws-filter-search-box:focus-within {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
}

.ccws-filter-search-icon {
    position: absolute !important;
    left: 10px !important;
    color: #64748B !important;
    pointer-events: none !important;
    font-size: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ccws-filter-search-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 13.5px !important;
    color: #0F172A !important;
    font-family: var(--ccws-font) !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 28px 0 34px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.ccws-theme-dark .ccws-filter-search-input {
    color: #F8FAFC !important;
}

.ccws-filter-search-input::placeholder {
    color: #94A3B8 !important;
}

.ccws-filter-search-clear {
    position: absolute !important;
    right: 8px !important;
    border: none !important;
    background: transparent !important;
    color: #94A3B8 !important;
    cursor: pointer !important;
    padding: 2px !important;
    display: flex !important;
    align-items: center !important;
}

/* Dropdowns */
.ccws-filter-select-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 38px !important;
    padding: 0 12px !important;
    min-width: 155px !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #334155 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    font-family: var(--ccws-font) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    justify-content: space-between !important;
}

.ccws-filter-select-btn:hover {
    border-color: #CBD5E1 !important;
    background: #F8FAFC !important;
}

.ccws-theme-dark .ccws-filter-select-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* Export button */
.ccws-export-black-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    height: 38px !important;
    padding: 0 14px !important;
    border: 1px solid #0F172A !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: var(--ccws-font) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.ccws-export-black-btn:hover {
    background: #F8FAFC !important;
    border-color: #334155 !important;
}

.ccws-theme-dark .ccws-export-black-btn {
    background: #1e293b !important;
    border-color: #94a3b8 !important;
    color: #f8fafc !important;
}


/* ═══ Shared dialog (AppDialog): gradient header, roomy body, clean footer ═══ */
.ccws-dlg {
    /* Same navy as the sidebar rail (#111c38), lifted slightly for a subtle gradient */
    --ccws-dlg-from: var(--ccws-rail-bg, #111c38);
    --ccws-dlg-to: color-mix(in srgb, var(--ccws-rail-bg, #111c38) 78%, #3b5bdb);
}
.ccws-dlg--danger { --ccws-dlg-from: #991b1b; --ccws-dlg-to: #dc2626; }

.ccws-dlg.mud-dialog {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
    width: 100% !important;
    max-width: 760px;
    margin: 16px auto !important;
}
.ccws-dlg .mud-dialog-title { padding: 0; }

.ccws-dlg-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    color: #ffffff;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(96, 135, 255, 0.22) 0%, rgba(96, 135, 255, 0) 55%),
        linear-gradient(120deg, var(--ccws-dlg-from) 0%, var(--ccws-dlg-to) 100%);
}
.ccws-dlg-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.ccws-dlg-header__icon .mud-icon-root { width: 26px; height: 26px; color: #ffffff; }
.ccws-dlg-header__text { flex: 1; min-width: 0; }
.ccws-dlg-header__title {
    margin: 0;
    font-family: var(--ccws-font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    overflow-wrap: anywhere;
}
.ccws-dlg-header__subtitle {
    margin: 2px 0 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.82);
}
.ccws-dlg-header .ccws-dlg-header__close.mud-icon-button {
    color: #ffffff;
    align-self: flex-start;
    margin: -6px -8px 0 0;
}
.ccws-dlg-header .ccws-dlg-header__close.mud-icon-button:hover { background: rgba(255, 255, 255, 0.16); }

.ccws-dlg .mud-dialog-content { padding: 24px 28px 8px; }
.ccws-dlg .mud-dialog-actions {
    padding: 16px 28px;
    margin-top: 16px;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--mud-palette-divider);
}
.ccws-dlg .mud-dialog-actions .mud-button-root {
    min-width: 120px;
    height: 42px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: none;
}

/* Field label above the control (icon + text + required star) */
.ccws-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}
.ccws-field-label .mud-icon-root { width: 20px; height: 20px; color: var(--ccws-primary, #2563eb); }
.ccws-field-label__req { color: #dc2626; }
.ccws-dlg .mud-input-outlined-border { border-radius: 10px; }
.ccws-dlg .mud-input-control > .mud-input-control-input-container > .mud-input.mud-input-outlined { background: transparent; }
.ccws-dlg .mud-input-control.mud-input-control-disabled .mud-input-outlined { background: color-mix(in srgb, var(--ccws-primary, #2563eb) 5%, transparent); }

/* Info note strip */
.ccws-dlg .ccws-dlg-note.mud-alert {
    border-radius: 10px;
    background: color-mix(in srgb, var(--ccws-primary, #2563eb) 9%, var(--mud-palette-surface));
    color: var(--mud-palette-text-primary);
    border: 1px solid color-mix(in srgb, var(--ccws-primary, #2563eb) 25%, transparent);
}

@media (max-width: 600px) {
    .ccws-dlg-header { padding: 18px 16px; }
    .ccws-dlg .mud-dialog-content { padding: 16px 16px 4px; }
    .ccws-dlg .mud-dialog-actions { padding: 12px 16px; }
    .ccws-dlg .mud-dialog-actions .mud-button-root { flex: 1; min-width: 0; }
}

/* Suppress default browser focus outline on headings and topbar brand */
h1:focus,
h1:focus-visible,
h2:focus,
h2:focus-visible,
.ccws-topbar__page-title,
.ccws-topbar__page-title:focus,
.ccws-topbar__page-title:focus-visible,
.ccws-appbar__titles,
.ccws-appbar__titles:focus,
.ccws-appbar__titles:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ── Fixed / Sticky Actions Column in MudDataGrid (Desktop / Tablet) ── */
@media (min-width: 641px) {
    .ccws-mud-grid .mud-table-container {
        position: relative !important;
        overflow-x: auto !important;
    }

    .ccws-mud-grid th.ccws-col-actions,
    .ccws-mud-grid td.ccws-col-actions,
    .ccws-mud-grid .mud-table-head th:last-child,
    .ccws-mud-grid .mud-table-body td:last-child {
        position: sticky !important;
        right: 0 !important;
        min-width: 130px !important;
        width: 130px !important;
        box-shadow: -4px 0 8px -2px rgba(15, 23, 42, 0.08) !important;
        border-left: 1px solid #E2E8F0 !important;
        text-align: right !important;
    }

    .ccws-mud-grid th.ccws-col-actions,
    .ccws-mud-grid .mud-table-head th:last-child {
        top: 0 !important;
        z-index: 6 !important;
        background-color: #F8FAFC !important;
        color: #475569 !important;
    }

    .ccws-mud-grid td.ccws-col-actions,
    .ccws-mud-grid .mud-table-body td:last-child {
        z-index: 4 !important;
        background-color: #FFFFFF !important;
    }

    .ccws-mud-grid .mud-table-body .mud-table-row:hover td.ccws-col-actions,
    .ccws-mud-grid .mud-table-body .mud-table-row:hover td:last-child {
        background-color: #F1F5F9 !important;
    }

    /* Dark Theme Support */
    .ccws-theme-dark .ccws-mud-grid th.ccws-col-actions,
    .ccws-theme-dark .ccws-mud-grid .mud-table-head th:last-child {
        background-color: #0F172A !important;
        border-left-color: #334155 !important;
        box-shadow: -4px 0 8px -2px rgba(0, 0, 0, 0.45) !important;
    }

    .ccws-theme-dark .ccws-mud-grid td.ccws-col-actions,
    .ccws-theme-dark .ccws-mud-grid .mud-table-body td:last-child {
        background-color: #1E293B !important;
        border-left-color: #334155 !important;
        box-shadow: -4px 0 8px -2px rgba(0, 0, 0, 0.45) !important;
    }

    .ccws-theme-dark .ccws-mud-grid .mud-table-body .mud-table-row:hover td.ccws-col-actions,
    .ccws-theme-dark .ccws-mud-grid .mud-table-body .mud-table-row:hover td:last-child {
        background-color: #273549 !important;
    }
}

/* ── Mobile View: Action items justified to END (Right edge) ── */
@media (max-width: 640px) {
    .ccws-mud-grid td.ccws-col-actions,
    .ccws-mud-grid .mud-table-body td:last-child,
    .ccws-mud-grid .mud-table-cell[data-label="Actions"] {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        border-left: none !important;
        box-shadow: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .ccws-actions-cell-content {
        margin-left: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
    }
}
