/* Approved water-glass surfaces shared by panels, pointer popups and toasts (owner, 2026-10-21). */
/* Floating panels (More Options, dropdown / lookup panels, Search, Notifications, pickers, chart popups, toasts) use
   the application outline (owner, 2026-11-26: "dark and visible"; was translucent rgba(112,145,173,.85)):
   #64748b by day, #8b949e at night through --crm-outline. */
:root { --crm-glass-outline: var(--crm-outline, #64748b); }
/* Toasts (Save confirmation, new-notification preview - top right) float over busy content, so their edge is darker
   still (owner, 2026-11-26: "more darker and visible"): #334155 by day, #aab6c4 at night (dark-theme-overrides.css). */
:root { --crm-toast-outline: #334155; }
:root .clue-toast { border: 1px solid var(--crm-toast-outline) !important; }

/* A slightly darker rim defines the glass on both light and busy backgrounds. */
.crm-search-panel,
.crm-notifications-panel,
.clue-toast,
:root .designer-field-popover,
:root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup,
:root .crm-workspace .insight-period-custom { border-color: var(--crm-glass-outline); }
:root .designer-field-popover::before,
:root .crm-workspace .index-transfer-menu.designer-field-popover::before,
:root .dashboard-trend-popup::after,
:root .crm-workspace .insight-period-custom::before {
    border-left-color: var(--crm-glass-outline);
    border-top-color: var(--crm-glass-outline);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .crm-search-panel,
    .crm-notifications-panel,
    .clue-toast,
    :root .designer-field-popover,
    :root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup,
:root .crm-workspace .insight-period-custom {
        background:
            radial-gradient(ellipse at 16% 0%, rgba(255,255,255,.58), transparent 38%),
            radial-gradient(ellipse at 50% 110%, rgba(159,232,255,.32), transparent 58%),
            linear-gradient(145deg, rgba(248,252,255,.26), rgba(202,228,248,.12));
        border-color: var(--crm-glass-outline);
        -webkit-backdrop-filter: blur(8px) saturate(145%);
        backdrop-filter: blur(8px) saturate(145%);
        box-shadow:
            inset 0 -3px 5px rgba(190,239,255,.48),
            inset 0 2px 4px rgba(27,59,91,.14),
            0 14px 32px rgba(15,35,62,.18);
    }
    :root .designer-field-popover::before,
    :root .crm-workspace .index-transfer-menu.designer-field-popover::before,
:root .dashboard-trend-popup::after,
:root .crm-workspace .insight-period-custom::before {
        background: rgba(225,243,253,.82);
        border-left-color: var(--crm-glass-outline);
        border-top-color: var(--crm-glass-outline);
    }
    .clue-toast::before { background: none; box-shadow: none; }
    .crm-search-result.active,
    .crm-search-result:focus-visible,
    .crm-notifications-list a:focus-visible {
        background: linear-gradient(135deg, rgba(255,255,255,.38), rgba(167,220,248,.22));
    }
    @media (hover: hover) and (pointer: fine) {
        .crm-search-result:hover,
        .crm-notifications-list a:hover {
            background: linear-gradient(135deg, rgba(255,255,255,.38), rgba(167,220,248,.22));
        }
    }
    @media (prefers-reduced-transparency: reduce) {
        .crm-search-panel,
        .crm-notifications-panel,
        .clue-toast,
        :root .designer-field-popover,
        :root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup,
:root .crm-workspace .insight-period-custom { background: #eef3f8; -webkit-backdrop-filter: none; backdrop-filter: none; }
        :root .designer-field-popover::before,
        :root .crm-workspace .index-transfer-menu.designer-field-popover::before,
:root .dashboard-trend-popup::after,
:root .crm-workspace .insight-period-custom::before { background: #eef3f8; }
        .crm-search-result:is(:hover, :focus-visible, .active),
        .crm-notifications-list a:is(:hover, :focus-visible) { background: #e7eff7; }
    }
}

/* Darker secondary copy remains readable over the clear water-glass surface. */
.crm-notifications-panel :is(.crm-notifications-header span, .crm-notifications-list span, .crm-notifications-empty, .crm-notifications-settings span),
.crm-search-panel :is(.crm-search-result span, .crm-search-group-label, .crm-search-empty, .crm-search-tab:not(.active)),
.clue-toast-copy span { color: #1e293b; }
.crm-search-panel .crm-search-tab span { opacity: 1; }
.crm-search-panel .crm-search-tab.active span { color: inherit; }

/* Helper copy needs its own contrast; it must not inherit muted/disabled opacity. */
:root :is(.designer-field-popover,.index-transfer-menu,.dashboard-trend-popup,.crm-notifications-panel,.crm-search-panel,.clue-toast)
:is(small,.text-muted,.customization-hint,.form-text,.designer-field-popover__caption,.designer-lookup-settings > label:not(.designer-lookup-allow)) {
    color:#334155;
    opacity:1;
}
:root .designer-field-popover .designer-lookup-settings small {font-weight:500;line-height:1.4;}

/* Keep the count legible even when a dark page action sits behind the glass. */
.crm-notifications-panel .crm-notifications-header span {
    padding: 3px 9px;
    border-radius: 999px;
    border:1px solid #9a6512; /* darker tag rim (owner, 2026-11-26) */
    background:linear-gradient(180deg,#fff0b8 0%,#ffe298 48%,#ffc95b 52%,#ffd77b 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 1px 3px rgba(146,90,15,.18);
    color:#713f12;
    font-weight: 600;
    white-space: nowrap;
}

/* Fine blue-gray separators remain visible through the transparent panels. */
.crm-search-panel,
.crm-notifications-panel { --crm-glass-divider: rgba(91,116,147,.55); }
.crm-notifications-header { border-bottom-color: var(--crm-glass-divider); }
.crm-notifications-list li + li,
.crm-notifications-settings,
.crm-search-tabs,
.crm-search-group + .crm-search-group,
.crm-search-tabs[hidden] + .crm-search-results:not(:empty) { border-top-color: var(--crm-glass-divider); }
/* A separate straight line avoids bending around the hover card's rounded corners. */
.crm-search-result + .crm-search-result { position: relative; }
.crm-search-result + .crm-search-result::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--crm-glass-divider);
    pointer-events: none;
}

:root .designer-field-popover :is(.designer-field-popover__caption, .designer-subgrid-popover__options small) { color: #1e293b; }

/* Only the popup surface blurs the page; its actions must not create nested blur layers. */
:root .designer-field-popover,
:root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    :root .designer-field-popover,
    :root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup { animation: none; }
}

/* Pointer popups match the notification panel's transparent crystal surface. */
:root .designer-field-popover,
:root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .dashboard-trend-popup {
    background:
        radial-gradient(ellipse at 16% 0%,rgba(255,255,255,.58),transparent 38%),
        radial-gradient(ellipse at 50% 110%,rgba(159,232,255,.32),transparent 58%),
        linear-gradient(145deg,rgba(248,252,255,.26),rgba(202,228,248,.12));
    -webkit-backdrop-filter:blur(8px) saturate(145%);
    backdrop-filter:blur(8px) saturate(145%);
}
:root .designer-field-popover::before,
:root .crm-workspace .index-transfer-menu.designer-field-popover::before,
:root .dashboard-trend-popup::after,
:root .crm-workspace .insight-period-custom::before {background:rgba(225,243,253,.82);}
@media (prefers-reduced-transparency: reduce) {
    :root .dashboard-trend-popup,
    :root .designer-field-popover,
    :root .crm-workspace .index-transfer-menu.designer-field-popover,
    :root .designer-field-popover::before,
    :root .crm-workspace .index-transfer-menu.designer-field-popover::before,
    :root .dashboard-trend-popup::after,
:root .crm-workspace .insight-period-custom::before { background: #eef3f8; -webkit-backdrop-filter:none;backdrop-filter:none; }
}

/* Dropdown panels use the notification panel's water glass - same tint, transparency and blur, in light and dark
   mode (owner, 2026-11-24; replaces the earlier opaque .98 backing). Night colours are generated from these values. */
:root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {
    background:
        radial-gradient(ellipse at 16% 0%,rgba(255,255,255,.58),transparent 38%),
        radial-gradient(ellipse at 50% 110%,rgba(159,232,255,.32),transparent 58%),
        linear-gradient(145deg,rgba(248,252,255,.26),rgba(202,228,248,.12));
    border-width: 1px !important;
    border-style: solid !important;
    border-color:var(--crm-glass-outline) !important;
    box-shadow:inset 0 -3px 5px rgba(190,239,255,.48),inset 0 2px 4px rgba(27,59,91,.14),0 14px 32px rgba(15,35,62,.18);
    -webkit-backdrop-filter:blur(8px) saturate(145%);backdrop-filter:blur(8px) saturate(145%);
    color:#20344f;
}
:root .select2-dropdown :is(.select2-search--dropdown,.select2-results,.select2-results__options) {background:transparent;}
:root .select2-dropdown .select2-search--dropdown {border-bottom-color:var(--crm-glass-outline);}
:root .select2-dropdown .select2-search__field {background:rgba(250,253,255,.97);color:#172554;}
:root .select2-dropdown .select2-search__field::placeholder {color:#52657f;opacity:1;}
:root .select2-dropdown .select2-results__option:not(.select2-results__option--selected):not(.select2-results__option--highlighted):not([aria-selected="true"]):not(.select2-results__option--disabled):not([aria-disabled="true"]) {
    background:transparent;color:#20344f;font-weight:500;
}
:root .select2-dropdown .select2-results__group {color:#17365f;}
:root .select2-dropdown :is(.select2-results__option--disabled,[aria-disabled="true"]) {color:#657489;}
:root .select2-dropdown .select2-results__message {color:#344c68;}
:root .select2-dropdown .lookup-dropdown-footer {
    background:linear-gradient(180deg,rgba(243,250,255,.98),rgba(214,235,250,.98));border-top-color:#a8bed2;
}
:root .select2-dropdown .lookup-dropdown-footer button {color:#1e3a8a;}
@media(prefers-reduced-transparency:reduce){
    :root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {background:#eef3f8;}
}

:root :is(.phone-country-search,.challan-address-options .picker-search input) {background:rgba(250,253,255,.97);color:#172554;}
:root :is(.phone-country-list,.challan-address-options .picker-search) {background:transparent;border-top-color:#b9cbdc;border-bottom-color:#b9cbdc;}
:root :is(.phone-country-option,.challan-address-options > button) {color:#20344f;transition:background-color .12s ease,box-shadow .12s ease;}
:root .phone-country-option small {color:#52657f;}
:root .phone-country-option:is(:hover,:focus-visible) {
    background:var(--crm-gloss-hover);box-shadow:var(--crm-gloss-hover-shadow);color:var(--crm-gloss-text);outline:none;
}
:root .phone-country-option[aria-selected="true"] {
    background:var(--crm-gloss-selected);box-shadow:var(--crm-gloss-selected-shadow);color:var(--crm-gloss-selected-text);
}
:root .phone-country-option:is(:hover,:focus-visible,[aria-selected="true"]) small {color:inherit;}
/* Address picker (Change on Customer / Shipping Address): the dark option text above outranked the selected gloss's light
   text, leaving the selected address navy-on-navy (owner, 2026-11-24). Same hover / selected states as the phone list. */
:root .challan-address-options > button:is(:hover,:focus-visible) {
    background:var(--crm-gloss-hover);box-shadow:var(--crm-gloss-hover-shadow);color:var(--crm-gloss-text);outline:none;
}
:root .challan-address-options > button[aria-pressed="true"],
:root .challan-address-options > button[aria-pressed="true"]:is(:hover,:focus-visible) {
    background:var(--crm-gloss-selected);box-shadow:var(--crm-gloss-selected-shadow);color:var(--crm-gloss-selected-text);
    text-shadow:0 1px 1px rgba(0,0,0,.35);
}
:root :is(.phone-country-empty,.challan-address-options .picker-no-results) {color:#344c68;}
:root .challan-address-options .picker-add-new-footer {background:linear-gradient(180deg,rgba(243,250,255,.98),rgba(214,235,250,.98));border-top-color:#a8bed2;}
/* Flag rows are stationary controls: hover must never scale, fade or animate the image. */
:root :is(.phone-country-option,.phone-country-button,.phone-country-option:hover,.phone-country-button:hover) {transform:none !important;scale:1 !important;}
:root :is(.phone-country-option img,.phone-country-button img,.country-select-flag):not([hidden]) {
    display:block;flex-shrink:0;pointer-events:none;transition:none !important;animation:none !important;transform:none !important;filter:none !important;
}
.phone-country-option[hidden] {display:none !important;}

/* Date/calendar and time setup share the dropdown crystal; keep navy navigation and selection. */
:root :is(.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) :is(.calendar-body,.custom-field-datetime-panel-body,.custom-field-datetime-panel-time-col,.wheel-time-columns,.wheel-col) {background:transparent;}
:root :is(.calendar-panel,.custom-field-datetime-panel) .calendar-day:not(.calendar-day--selected):not(.calendar-day--muted):not(:hover):not(:focus-visible) {color:#20344f;}
:root :is(.calendar-panel,.custom-field-datetime-panel) .calendar-day--muted:not(.calendar-day--selected):not(:hover):not(:focus-visible) {color:#657489;}
:root :is(.calendar-panel,.custom-field-datetime-panel) .calendar-weekdays {color:#52657f;}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-col li {color:#52657f;}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-col li.is-centered {color:var(--crm-gloss-selected-text,#f5fbff);text-shadow:0 1px 1px rgba(0,0,0,.35);opacity:1;}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-columns::before {background:linear-gradient(to bottom,rgba(237,247,254,.96) 15%,rgba(237,247,254,0));}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-columns::after {background:linear-gradient(to top,rgba(215,235,250,.96) 15%,rgba(215,235,250,0));}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-actions {border-top-color:#a8bed2;}
:root .custom-field-datetime-panel-divider {background:#a8bed2;}

/* Compact search controls inside every shared dropdown; keep iOS focus from zooming. */
:root :is(.select2-dropdown .select2-search__field,.phone-country-search,.challan-address-options .picker-search input) {
    box-sizing:border-box;height:30px !important;min-height:30px !important;padding:0 10px !important;border-radius:8px !important;font-size:12px !important;line-height:normal !important;
}
:root .select2-dropdown .select2-search--dropdown {padding:6px 8px;}
:root .phone-country-search {width:calc(100% - 16px);margin:6px 8px;}
:root .challan-address-options .picker-search {padding:6px 8px;}
:root :is(.phone-country-search,.challan-address-options .picker-search input)::placeholder {color:#52657f;opacity:1;}
@media(max-width:900px){
    :root :is(.select2-dropdown .select2-search__field,.phone-country-search,.challan-address-options .picker-search input) {font-size:16px !important;}
}

/* Shared transparent crystal grid and designer action surfaces. */
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)) {
    background:radial-gradient(ellipse at 28% 0%,rgba(255,255,255,.48),transparent 64%),linear-gradient(145deg,rgba(255,255,255,.18),rgba(191,225,245,.06)) !important;
    border:1px solid rgba(137,168,191,.42) !important;border-radius:50% !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 1px 2px rgba(15,35,62,.08) !important;
    color:#123653 !important;text-shadow:none !important;filter:none !important;transform:none !important;scale:1 !important;
    font-size:11px !important;line-height:1;
    -webkit-backdrop-filter:none;backdrop-filter:none;
    transition:background .15s ease,border-color .15s ease !important;
}
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)) :is(i,svg) {color:inherit !important;font-size:11px !important;opacity:1;text-shadow:none;}
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props))::after {display:none !important;}
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)):hover:not(:disabled):not([aria-disabled="true"]) {border-color:rgba(97,155,194,.68) !important;background:radial-gradient(ellipse at 28% 0%,rgba(255,255,255,.62),transparent 64%),linear-gradient(145deg,rgba(255,255,255,.28),rgba(170,220,249,.12)) !important;}
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)):focus-visible {outline:2px solid #3977a8 !important;outline-offset:2px;}
:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)):is(:disabled,[aria-disabled="true"]) {opacity:.45;box-shadow:none !important;cursor:default;}
:root .crm-workspace :is(.party-grid-action,.configured-subgrid .subgrid-edit-open) {box-sizing:border-box;}
@media(prefers-reduced-transparency:reduce){:root .crm-workspace :is(.row-actions a,.row-actions button,.party-grid-action,.inventory-table .permission-configure-button,.configured-subgrid .subgrid-unlink,.configured-subgrid .subgrid-edit-open,.remove-bill-line,.custom-field-choice-row .iv-delete-icon,.inventory-table .remove-contact,.designer-page .designer-section__header :is(.designer-section-edit,.designer-section-props,.iv-delete-icon),.entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props)) {background:#edf6fc !important;}}

/* Blue glass for standard Index row actions. */
:root {
    --index-action-ink: #174a91;
    --index-action-rim: #6494c7;
    --index-action-fill: #d6eaff;
    --index-action-glass: linear-gradient(180deg, rgba(231,246,255,.92), rgba(181,216,249,.74));
    --index-action-hover-glass: linear-gradient(180deg, rgba(219,240,255,.96), rgba(157,201,246,.86));
}

:root .crm-workspace .inventory-page:not(.inventory-form-page) .inventory-table :is(.row-actions a, .row-actions button, .party-grid-action, .permission-configure-button):not(.index-group-expand) {
    color: var(--index-action-ink) !important;
    border-color: var(--index-action-rim) !important;
    background: var(--index-action-glass) !important;
}
:root .crm-workspace .inventory-page:not(.inventory-form-page) .inventory-table :is(.row-actions a, .row-actions button, .party-grid-action, .permission-configure-button):not(.index-group-expand):where(:hover:not(:disabled):not([aria-disabled="true"])) {
    background: var(--index-action-hover-glass) !important;
}
@media (prefers-reduced-transparency: reduce) {
    :root .crm-workspace .inventory-page:not(.inventory-form-page) .inventory-table :is(.row-actions a, .row-actions button, .party-grid-action, .permission-configure-button):not(.index-group-expand) {
        background: var(--index-action-fill) !important;
    }
}

/* Light icons contrast against the navy showing through designer headers. */
:root .crm-workspace .designer-page .designer-section:not(.designer-tab-editor) > .designer-section__header :is(.designer-section-edit,.designer-section-props),
:root .crm-workspace .designer-page .form-tab-item--selected .designer-section__header :is(.designer-section-edit,.designer-section-props),
:root .crm-workspace .entity-view-designer .ev-view-heading :is(.designer-section-edit,.designer-section-props) {color:#9edfff !important;}
/* The same red glass palette for compact Delete and Remove actions. */
:root {
    --delete-action-ink: #86192d;
    --delete-action-rim: #bf7080;
    --delete-action-fill: #f8d9df;
    --delete-action-tint: linear-gradient(145deg, rgba(255,201,211,.62), rgba(228,129,151,.36));
    --delete-action-hover-tint: linear-gradient(145deg, rgba(255,190,204,.74), rgba(228,109,136,.48));
}
.crm-workspace .designer-page .designer-section__header .iv-delete-icon {
    --delete-action-ink: #f78090;
    --delete-action-rim: rgba(224,141,163,.52);
    --delete-action-fill: #60364b;
    --delete-action-tint: linear-gradient(145deg, rgba(238,140,164,.30), rgba(214,86,123,.16));
    --delete-action-hover-tint: linear-gradient(145deg, rgba(238,140,164,.40), rgba(214,86,123,.24));
}
:root .crm-workspace :is(
    .inventory-page:not(.inventory-form-page) .inventory-table .row-actions .iv-delete-icon,
    .iv-delete-icon,
    .configured-subgrid .subgrid-unlink,
    .remove-bill-line,
    .inventory-table .remove-contact,
    .entity-view-designer .ev-preview .inventory-table .index-group-header .row-actions button.ev-group-remove,
    .entity-view-designer .ev-preview .ev-preview-column-remove
) {
    color: var(--delete-action-ink) !important;
    border-color: var(--delete-action-rim) !important;
    background: radial-gradient(ellipse at 28% 0%, var(--delete-action-highlight, rgba(255,255,255,.48)), transparent 64%),
                var(--delete-action-tint) !important;
}
:root .crm-workspace :is(
    .inventory-page:not(.inventory-form-page) .inventory-table .row-actions .iv-delete-icon,
    .iv-delete-icon,
    .configured-subgrid .subgrid-unlink,
    .remove-bill-line,
    .inventory-table .remove-contact,
    .entity-view-designer .ev-preview .inventory-table .index-group-header .row-actions button.ev-group-remove,
    .entity-view-designer .ev-preview .ev-preview-column-remove
):where(:hover:not(:disabled):not([aria-disabled="true"])) {
    background: radial-gradient(ellipse at 28% 0%, var(--delete-action-hover-highlight, rgba(255,255,255,.62)), transparent 64%),
                var(--delete-action-hover-tint) !important;
}
:root .crm-workspace :is(
    .inventory-page:not(.inventory-form-page) .inventory-table .row-actions .iv-delete-icon,
    .iv-delete-icon,
    .configured-subgrid .subgrid-unlink,
    .remove-bill-line,
    .inventory-table .remove-contact,
    .entity-view-designer .ev-preview .inventory-table .index-group-header .row-actions button.ev-group-remove,
    .entity-view-designer .ev-preview .ev-preview-column-remove
):where(:disabled,[aria-disabled="true"]) { opacity: var(--delete-action-disabled-opacity, .65); }
@media (prefers-reduced-transparency: reduce) {
    :root .crm-workspace :is(
    .inventory-page:not(.inventory-form-page) .inventory-table .row-actions .iv-delete-icon,
    .iv-delete-icon,
    .configured-subgrid .subgrid-unlink,
    .remove-bill-line,
    .inventory-table .remove-contact,
    .entity-view-designer .ev-preview .inventory-table .index-group-header .row-actions button.ev-group-remove,
    .entity-view-designer .ev-preview .ev-preview-column-remove
) { background: var(--delete-action-fill) !important; }
}

@media (prefers-color-scheme: light) {
    .crm-workspace .designer-page .designer-section__header .iv-delete-icon {
        --delete-action-highlight: rgba(255,255,255,.20);
        --delete-action-hover-highlight: rgba(255,255,255,.28);
        --delete-action-rim: rgba(224,141,163,.76);
        --delete-action-disabled-opacity: .78;
    }
}

/* Group heading chevron (owner, 2026-11-25: barely visible, then black on hover): the transparent crystal surface above
   showed the heading through it. On the (light blue) group heading it is a solid white chevron with a blue rim and navy
   icon, hover light blue - the same by day and at night. */
:root .crm-workspace .inventory-table .index-group-header .row-actions button.index-group-expand {
    background:#ffffff !important;border-color:#3977a8 !important;color:#123f70 !important;
    box-shadow:0 1px 3px rgba(18,63,112,.22),inset 0 1px 0 rgba(255,255,255,.75) !important;
}
/* Hover stays light blue (owner, 2026-11-25: it turned black) - this must outrank the crystal :hover:not(:disabled) rule. */
:root .crm-workspace .inventory-table .index-group-header .row-actions button.index-group-expand.index-group-expand:hover:not(:disabled) {
    background:#d9effb !important;border-color:#0f4f87 !important;color:#082f5b !important;
    box-shadow:0 0 0 2px rgba(57,119,168,.18),0 0 8px rgba(57,119,168,.30) !important;
}
:root .crm-workspace .inventory-table .index-group-header .row-actions button.index-group-expand:focus-visible {outline:2px solid #3977a8;outline-offset:2px;}

/* Grid pagination shares the transparent crystal action surface. */
:root .crm-workspace .party-page-btn {
    background:radial-gradient(ellipse at 28% 0%,rgba(255,255,255,.48),transparent 64%),linear-gradient(145deg,rgba(255,255,255,.18),rgba(191,225,245,.06)) !important;
    border-color:rgba(137,168,191,.42) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 1px 2px rgba(15,35,62,.08) !important;
    color:#123653 !important;filter:none !important;transform:none !important;
    -webkit-backdrop-filter:none;backdrop-filter:none;
}
:root .crm-workspace .party-page-btn:hover:not(:disabled, [aria-disabled="true"], .active, [aria-current="page"]) {
    border-color:rgba(97,155,194,.68) !important;
    background:radial-gradient(ellipse at 28% 0%,rgba(255,255,255,.62),transparent 64%),linear-gradient(145deg,rgba(255,255,255,.28),rgba(170,220,249,.12)) !important;
}
:root .crm-workspace .party-page-btn:is(.active,[aria-current="page"]) {
    background:radial-gradient(ellipse at 28% 0%,rgba(255,255,255,.16),transparent 64%),linear-gradient(180deg,#172f68,#081841) !important;
    color:#d8f4ff !important;border-color:rgba(121,212,255,.5) !important;
}
:root .crm-workspace .party-page-btn:focus-visible {outline:2px solid #3977a8;outline-offset:2px;}
:root .crm-workspace .party-page-btn:is(:disabled,[aria-disabled="true"]) {opacity:.45;box-shadow:none !important;cursor:default;}
@media(prefers-reduced-transparency:reduce){
    :root .crm-workspace .party-page-btn:not(.active):not([aria-current="page"]) {background:#edf6fc !important;}
}

/* One approved Configuration crystal opacity for floating panels everywhere. */
:root {--crm-floating-surface:radial-gradient(ellipse at 16% 0%,rgba(255,255,255,.58),transparent 38%),radial-gradient(ellipse at 50% 110%,rgba(159,232,255,.32),transparent 58%),linear-gradient(145deg,rgba(248,252,255,.26),rgba(202,228,248,.12));}
:root :is(.designer-field-popover,.index-transfer-menu,.dashboard-trend-popup,.crm-notifications-panel,.crm-search-panel,.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {
    background:var(--crm-floating-surface);-webkit-backdrop-filter:blur(8px) saturate(145%);backdrop-filter:blur(8px) saturate(145%);
}
@media(prefers-reduced-transparency:reduce){
    :root :is(.designer-field-popover,.index-transfer-menu,.dashboard-trend-popup,.crm-notifications-panel,.crm-search-panel,.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {background:#eef3f8;-webkit-backdrop-filter:none;backdrop-filter:none;}
}

/* Configuration and More Options reuse the lookup dropdown's single glass edge and depth.
   Surface-only properties preserve each popup's typography, padding and placement. */
:root { --crm-floating-shadow: inset 0 -3px 5px rgba(190,239,255,.48), inset 0 2px 4px rgba(27,59,91,.14), 0 14px 32px rgba(15,35,62,.18); }
:root .designer-field-popover,
:root .crm-workspace .index-transfer-menu.designer-field-popover,
:root .select2-dropdown {
    background:var(--crm-floating-surface);
    border-color:var(--crm-glass-outline);
    box-shadow:var(--crm-floating-shadow);
    -webkit-backdrop-filter:blur(8px) saturate(145%);
    backdrop-filter:blur(8px) saturate(145%);
}
@media(prefers-reduced-transparency:reduce){
    :root .designer-field-popover,
    :root .crm-workspace .index-transfer-menu.designer-field-popover,
    :root .select2-dropdown {background:#eef3f8;-webkit-backdrop-filter:none;backdrop-filter:none;}
}

/* Selection panels use the notification panel's water glass (owner, 2026-11-24, replacing the earlier opaque backing);
   the 8px backdrop blur keeps busy forms behind them soft. */
:root { --crm-selection-surface: radial-gradient(ellipse at 16% 0%,rgba(255,255,255,.58),transparent 38%), radial-gradient(ellipse at 50% 110%,rgba(159,232,255,.32),transparent 58%), linear-gradient(145deg,rgba(248,252,255,.26),rgba(202,228,248,.12)); }
:root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) { background:var(--crm-selection-surface); }
@media(prefers-reduced-transparency:reduce){
    :root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {background:#eef3f8;-webkit-backdrop-filter:none;backdrop-filter:none;}
}

/* Same notification glass (owner, 2026-11-24): no solid backing any more. */
:root { --crm-selection-surface: radial-gradient(ellipse at 16% 0%,rgba(255,255,255,.58),transparent 38%), radial-gradient(ellipse at 50% 110%,rgba(159,232,255,.32),transparent 58%), linear-gradient(145deg,rgba(248,252,255,.26),rgba(202,228,248,.12)); }
:root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {
    background:var(--crm-selection-surface);
    box-shadow:inset 0 -3px 5px rgba(190,239,255,.48),inset 0 2px 4px rgba(27,59,91,.14),0 14px 32px rgba(15,35,62,.18);
    -webkit-backdrop-filter:blur(8px) saturate(145%);backdrop-filter:blur(8px) saturate(145%);
}
/* Fade only reel content, rather than painting blue rectangles above the footer. */
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-columns::before,
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-columns::after {display:none;}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-col {
    -webkit-mask-image:linear-gradient(to bottom,transparent,#000 18%,#000 82%,transparent);
    mask-image:linear-gradient(to bottom,transparent,#000 18%,#000 82%,transparent);
}
:root :is(.wheel-time-panel,.custom-field-datetime-panel) .wheel-time-actions {border-top:0;background:transparent;box-shadow:none;}
@media(prefers-reduced-transparency:reduce){
    :root :is(.select2-dropdown,.phone-country-menu,.challan-address-options,.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {background:#eef3f8;-webkit-backdrop-filter:none;backdrop-filter:none;}
}

/* Shield the picker footer from buttons and borders behind the translucent popover. */
:is(.calendar-panel,.custom-field-datetime-panel)::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58px;
    background: linear-gradient(to bottom, transparent, #e6eff7 20px);
    pointer-events: none;
}
.calendar-panel > .calendar-body,
.custom-field-datetime-panel > .custom-field-datetime-panel-body {
    position: relative;
    z-index: 1;
}
.calendar-viewport { position: relative; overflow: hidden; }
.calendar-level--outgoing { position: absolute; inset: 0; pointer-events: none; }

/* All calendars and time pickers use the same compact sizing as Edit Filters. */
:root :is(.calendar-panel,.wheel-time-panel,.custom-field-datetime-panel) {animation:none;transform-origin:top left;}

/* Floating dropdowns keep one 1px glass edge; their shading must not add a second inset outline. */
:root :is(
    .designer-field-popover,
    .dashboard-trend-popup,
    .insight-period-custom,
    .crm-search-panel,
    .crm-notifications-panel,
    .select2-dropdown,
    .phone-country-menu,
    .challan-address-options,
    .calendar-panel,
    .wheel-time-panel,
    .custom-field-datetime-panel
):not(.index-transfer-menu) {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: var(--crm-glass-outline) !important;
}

/* More popup body and pointer share one SVG surface/outline, with no join to cover. */
:root .crm-workspace .index-transfer-menu.designer-field-popover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    isolation: isolate;
}
:root .crm-workspace .index-transfer-menu.designer-field-popover::before,
:root .crm-workspace .index-transfer-menu.designer-field-popover::after { content: none; }
.index-transfer-menu__surface {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: calc(100% + 20px);
    overflow: visible;
    z-index: -1;
    pointer-events: none;
    filter: drop-shadow(0 14px 16px rgba(15,35,62,.18));
}
/* The More Options glass matches the notification panel (owner, 2026-11-24): the SVG shape gets the panel's light
   tint (CSS fill beats the script's .65 / .45 gradient) and the popup blurs what is behind it the same way. */
:root .crm-workspace .index-transfer-menu.designer-field-popover {
    -webkit-backdrop-filter: blur(8px) saturate(145%);
    backdrop-filter: blur(8px) saturate(145%);
    border-radius: 14px;
}
/* One glass for every More Options popup - heading, footer and row menus (owner, 2026-11-24): the footer menu no longer
   has its own denser fill, so it is as transparent as the heading one. */
.index-transfer-menu__surface > path {
    fill: rgba(240,248,253,.32);
    stroke: var(--crm-glass-outline);
    stroke-width: 1;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
@media (prefers-reduced-transparency: reduce) {
    .index-transfer-menu__surface > path { fill: #eef3f8; }
}

/* Match the More Options popup's single 1px glass rim; don't stack an inset outline on these panels. */
:root .crm-search-panel,
:root .crm-notifications-panel {
    border-width: 1px;
    box-shadow:
        inset 0 -3px 5px rgba(190,239,255,.48),
        inset 0 2px 4px rgba(27,59,91,.14),
        0 14px 32px rgba(15,35,62,.18);
}

/* Right-sliding toasts keep one 1px border without a sharp inset glass ring. */
:root .clue-toast {
    border-width: 1px;
    box-shadow:
        inset 0 -3px 5px rgba(190,239,255,.48),
        inset 0 2px 4px rgba(27,59,91,.14),
        0 16px 36px rgba(15,23,42,.18),
        0 0 18px rgba(52,214,255,.12);
}
