/* Shared icon library — single source of truth for SVG icons across all
   ACS apps (Angular + ExtJS). The library is imported globally from
   ext-acs-theme.css so every ExtJS page sees the `--icon-NAME` CSS
   custom properties; we don't re-import here. */

/* TODO(A1): this file currently uses inline literals for dark-surface
   theme values (e.g. #1c2127, #00aeef, #b0b8c4, rgba(255,255,255,0.06|0.08|0.12),
   rgba(0,174,239,0.15)). Once the shared theme's CSS-properties file is
   built and served by Flask, swap to:
     #1c2127                       -> var(--acs-dark-bg)
     rgba(255,255,255,0.06)        -> var(--acs-dark-default-bg-icon)
     rgba(255,255,255,0.12)        -> var(--acs-dark-hover-bg-icon)
     rgba(255,255,255,0.08) (menu) -> var(--acs-dark-hover-bg-menu)
     rgba(0,174,239,0.15)          -> var(--acs-dark-active-bg)
     #00aeef                       -> var(--acs-brand-cyan)
     #b0b8c4                       -> --icon-default token (TBD by A1)
   The token definitions live in shared-theme/scss/_variables.scss + the
   CSS-properties output of shared-theme/scss/css-properties.scss. */

/*password fields eye-slash style*/
.pwd-field-icon {
  float: right;
  margin-right: 8px;
  margin-top: -31px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.chg-pwd-field-icon {
  float: right;
  margin-right: 31px;
  margin-top: -24px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

input::-ms-reveal,
input::-ms-clear {
display: none;
}

/* Shift toolbar up 4pxs to make a dark horizontal separator line appear below */
.acs_toolbar {
    top: -4px;
    /*background-color: #EAEAEA; */
    background-color: #F1F1F1;
    padding-top:4px;
}

.flex_header {
    width: 100%;
    display: -webkit-flex;
    display: flex;
}

/* Legacy checkout selector - hidden, replaced by toolbar menu button */
#checkout-selector {
    font-size: 13px;
}

/* Default hidden — JS owns the inline display so the sys-admin "Show
   checkout selector" toggle in the Configuration menu can re-enable it. */
#checkout-selector-wrap {
    display: none;
}

#checkout-selector-combo {
    width: 400px;
}

.header_title {
    color: #EAEAEA;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-size: 16pt;
    font-family: "Segoe UI", tahoma, arial, verdana, sans-serif;
}

/* Legacy styling - overridden by S1 restyling section below */
#acs_header_title {
    z-index: 100;
    max-width: 600px;
    /* padding-top: 40px - removed for S1 restyling */
}

.acs_top_menu {
    z-index: 100;
    background-image: none;
    background-color: transparent;
    border-bottom:0 !important;
}

/* Legacy styling - overridden by S1 restyling section below */
#acs_top_menu_div {
    z-index: 100;
    /* padding-top: 35px - removed for S1 restyling */
    margin-left: auto;
    min-width: 60px;
}

/*.mod-arrow em.x-btn-arrow { background-image: url("../extJS_3_4_1_1/resources/images/azzurra-legacy/button/arrow-w.gif"); }*/
.acs_top_menu .x-btn-mc em.x-btn-arrow {background-image: none !important }
.acs_top_menu .x-btn-arrow { padding-left: 1px !important; padding-right: 1px !important}
/* Customize top menu button colors */
#acs_top_menu_div .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn .x-btn-text { color: #f5f6f7; font-size: 11px; font-family: "Segoe UI", tahoma, arial, verdana, sans-serif; font-weight: normal; text-shadow: none; }
#acs_top_menu_div .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over .x-btn-text { color: #00aeef; }
#acs_top_menu_div .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over { background-color: #444444; border-color: #333333; }
#acs_top_menu_div .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn { width: 40px; }
#acs_top_menu_div .x-toolbar-right button { color: #f5f6f7; }

/* Header Panel's background color — S1 sets #1c2127 below on #viewer-header */
#ext-acs-header-wrap {
    background-color: #1c2127;
}

#viewer-header .x-panel-body, #ext-acs-header-wrap .x-panel-body {
	background-color: inherit;
}

/* Make the main vertical split bar dark */
body .x-splitbar-h {
    background-color: #1c2127;
}


/* Switch button icon - adjust FA icon to match acsfont icons visually */
#acs_top_menu_div .x-toolbar .x-btn .fa.fa-3x.fa-fw {
    font-size: 2.6em;
    line-height: 1em;
    vertical-align: text-bottom;
}

/* =============================================
   HEADER BAR - Modern restyling (S1)
   Target: match docs/welcome_page/mocks/mock_home_screen.html
   ============================================= */

/* Header container */
#viewer-header {
    background-color: #1c2127;
    overflow: visible;
}

/* Main header layout */
#acs_header {
    position: relative;
    height: 70px !important;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    border-bottom: 2px solid #00aeef;
    background-color: #1c2127;
}

/* A bar under the header (checkout session or production data): taller header,
   the bar replaces the cyan border. acs.headerStatusBar() decides which one.
   The bottom padding (the bar plus the 2px the border took) keeps the row centred
   where it sits without a bar. */
#acs_header.checkout-mode,
#acs_header.production-mode {
    height: 90px !important;
    padding-bottom: 22px;
    border-bottom: none;
}

/* The bar fills the bottom 20px of the 90px header */
#checkout-banner,
#production-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    box-sizing: border-box;
    line-height: 16px;
    /* A long checkout name ends in an ellipsis; the bar's tooltip carries the full name */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #1A9E7A;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 2px 16px;
    letter-spacing: 0.05em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 102;
}

/* Affini Crimson: 6.7:1 against the white text */
#production-banner {
    background: #BB0113;
}

/* Logo */
#acs_header_logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#acs_header_logo img {
    height: 40px;
}

/* Library title */
#acs_header_title {
    margin-left: 32px;
    padding-top: 0;
    padding-left: 0;
    z-index: auto;
    max-width: none;
    flex-shrink: 1;
    min-width: 0;
}

.header_title {
    font-size: 18px;
    color: #8c95a0;
    font-weight: 500;
}

/* Right side container */
#acs_header_right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Menu container - override old padding-top: 35px */
#acs_top_menu_div {
    padding-top: 0;
    margin-left: 0;
    z-index: auto;
}

/* User name */
#acs_header_user {
    color: #8c95a0;
    font-size: 13px;
    margin-left: 8px;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    position: relative;
    z-index: 101;
}

/* Toolbar - reset ExtJS table layout */
#acs_top_menu_div .x-toolbar {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#acs_top_menu_div .x-toolbar-ct {
    padding: 0 !important;
}

#acs_top_menu_div .x-toolbar table.x-toolbar-ct {
    height: auto !important;
}

/* Toolbar cells - control spacing between buttons */
#acs_top_menu_div .x-toolbar td.x-toolbar-cell {
    padding: 0 4px !important;
    vertical-align: middle !important;
}

/* Remove ExtJS button 9-slice backgrounds */
#acs_top_menu_div .x-btn .x-btn-tl,
#acs_top_menu_div .x-btn .x-btn-tr,
#acs_top_menu_div .x-btn .x-btn-tc,
#acs_top_menu_div .x-btn .x-btn-ml,
#acs_top_menu_div .x-btn .x-btn-mr,
#acs_top_menu_div .x-btn .x-btn-mc,
#acs_top_menu_div .x-btn .x-btn-bl,
#acs_top_menu_div .x-btn .x-btn-br,
#acs_top_menu_div .x-btn .x-btn-bc {
    background-image: none !important;
}

/* Icon buttons - force uniform 40x40 sizing */
#acs_top_menu_div .x-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0 !important;
    margin: 0 !important;
}

/* Reset ExtJS button inner elements */
#acs_top_menu_div .x-btn table,
#acs_top_menu_div .x-btn tbody,
#acs_top_menu_div .x-btn tr,
#acs_top_menu_div .x-btn td {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
}

#acs_top_menu_div .x-btn .x-btn-text {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 !important;
}

/* Icon styling - acsfont icons (32px per mock) */
/* Use !important to override inline styles like "color: white" on dashboard icon */
/* Font smoothing makes icons appear thinner/crisper like in the mock */
#acs_top_menu_div .x-btn .x-btn-text i,
#acs_top_menu_div .x-btn .x-btn-text [class^="icon-"],
#acs_top_menu_div .x-btn .x-btn-text [class*=" icon-"] {
    color: #b0b8c4 !important;
    font-size: 32px !important;
    line-height: 1 !important;
    width: auto !important;
    transition: color 0.15s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hover state */
#acs_top_menu_div .x-btn.x-btn-over {
    background: rgba(255, 255, 255, 0.12);
}

#acs_top_menu_div .x-btn.x-btn-over .x-btn-text i,
#acs_top_menu_div .x-btn.x-btn-over .x-btn-text [class^="icon-"],
#acs_top_menu_div .x-btn.x-btn-over .x-btn-text [class*=" icon-"] {
    color: #00aeef !important;
}

/* Active/pressed state */
#acs_top_menu_div .x-btn.x-btn-pressed,
#acs_top_menu_div .x-btn.x-btn-menu-active {
    background: rgba(0, 174, 239, 0.15);
}

#acs_top_menu_div .x-btn.x-btn-pressed .x-btn-text i,
#acs_top_menu_div .x-btn.x-btn-menu-active .x-btn-text i,
#acs_top_menu_div .x-btn.x-btn-pressed .x-btn-text [class^="icon-"],
#acs_top_menu_div .x-btn.x-btn-pressed .x-btn-text [class*=" icon-"],
#acs_top_menu_div .x-btn.x-btn-menu-active .x-btn-text [class^="icon-"],
#acs_top_menu_div .x-btn.x-btn-menu-active .x-btn-text [class*=" icon-"] {
    color: #00aeef !important;
}

/* Notification bell — give the text container a positioning context for
   the .bell-badge defined below in the N1.c block. Badge styling itself
   targets .bell-badge (not blanket span) to avoid colliding with the icon
   mask span. */
#acs_top_menu_div #button_bell .x-btn-text {
    position: relative;
}

/* Fix chat-bot link margin (overrides inline style margin-top: -0.25rem) */
#acs_top_menu_div .x-btn a.x-btn-text {
    margin-top: 0 !important;
}

/* =============================================
   N1.c — Top-nav button icons (mask-image, shared library)
   =============================================
   Each top-nav button renders <span class="h-icon-mask h-icon-mask--NAME">
   whose silhouette comes from --icon-NAME (defined in shared-icons.css)
   and whose color is set by background-color. Hover/pressed/menu-active
   states recolor via the existing .x-btn.x-btn-over chain. */

#acs_top_menu_div .x-btn .x-btn-text .h-icon-mask {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: #b0b8c4;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: 22px 22px;
            mask-size: 22px 22px;
    transition: background-color 0.15s;
}

.h-icon-mask--home        { -webkit-mask-image: var(--icon-home);        mask-image: var(--icon-home); }
.h-icon-mask--bell        { -webkit-mask-image: var(--icon-bell);        mask-image: var(--icon-bell); }
.h-icon-mask--info        { -webkit-mask-image: var(--icon-info);        mask-image: var(--icon-info); }
.h-icon-mask--user        { -webkit-mask-image: var(--icon-user);        mask-image: var(--icon-user); }
.h-icon-mask--sparkles      { -webkit-mask-image: var(--icon-sparkles);      mask-image: var(--icon-sparkles); }
.h-icon-mask--chevron-down  { -webkit-mask-image: var(--icon-chevron-down);  mask-image: var(--icon-chevron-down); }
.h-icon-mask--settings    { -webkit-mask-image: var(--icon-settings);    mask-image: var(--icon-settings); }
.h-icon-mask--message     { -webkit-mask-image: var(--icon-message-circle); mask-image: var(--icon-message-circle); }
.h-icon-mask--affinidocs  { -webkit-mask-image: var(--icon-affinidocs);  mask-image: var(--icon-affinidocs); }
.h-icon-mask--affinitask  { -webkit-mask-image: var(--icon-affinitask);  mask-image: var(--icon-affinitask); }

#acs_top_menu_div .x-btn.x-btn-over .x-btn-text .h-icon-mask,
#acs_top_menu_div .x-btn.x-btn-pressed .x-btn-text .h-icon-mask,
#acs_top_menu_div .x-btn.x-btn-menu-active .x-btn-text .h-icon-mask {
    background-color: #00aeef;
}

/* Per-feature hover colors — each feature button uses its module color
   on hover instead of the default cyan, with a soft tinted halo on the
   button background. Matches mock lines 162–183.

   AffiniAI = #B261D5 purple, Browse Library (AffiniDocs) = #00B3FA blue,
   Tasks (AffiniTask) = #1A9E7A green. Home / Config / Bell / Info / User
   keep the default cyan from the .x-btn-over rule above.

   TODO(A1): replace literals with var(--acs-ai-purple), var(--acs-docs-blue),
   var(--acs-tasks-accent) once the shared theme's CSS-properties file is
   served. */

/* AffiniAI — purple */
#acs_top_menu_div #chat-bot-button.x-btn-over .x-btn-text .h-icon-mask,
#acs_top_menu_div #chat-bot-button.x-btn-pressed .x-btn-text .h-icon-mask,
#acs_top_menu_div #chat-bot-button.x-btn-menu-active .x-btn-text .h-icon-mask {
    background-color: #B261D5;
}
#acs_top_menu_div #chat-bot-button.x-btn-over,
#acs_top_menu_div #chat-bot-button.x-btn-pressed,
#acs_top_menu_div #chat-bot-button.x-btn-menu-active {
    background: rgba(178, 97, 213, 0.10) !important;
}

/* Browse Library — docs blue */
#acs_top_menu_div #button_browse.x-btn-over .x-btn-text .h-icon-mask,
#acs_top_menu_div #button_browse.x-btn-pressed .x-btn-text .h-icon-mask,
#acs_top_menu_div #button_browse.x-btn-menu-active .x-btn-text .h-icon-mask {
    background-color: #00B3FA;
}
#acs_top_menu_div #button_browse.x-btn-over,
#acs_top_menu_div #button_browse.x-btn-pressed,
#acs_top_menu_div #button_browse.x-btn-menu-active {
    background: rgba(0, 179, 250, 0.10) !important;
}

/* Tasks — muted green */
#acs_top_menu_div #button_calendar.x-btn-over .x-btn-text .h-icon-mask,
#acs_top_menu_div #button_calendar.x-btn-pressed .x-btn-text .h-icon-mask,
#acs_top_menu_div #button_calendar.x-btn-menu-active .x-btn-text .h-icon-mask {
    background-color: #1A9E7A;
}
#acs_top_menu_div #button_calendar.x-btn-over,
#acs_top_menu_div #button_calendar.x-btn-pressed,
#acs_top_menu_div #button_calendar.x-btn-menu-active {
    background: rgba(26, 237, 148, 0.10) !important;
}

/* Toolbar separator (mock lines 2140, 2349). Rendered as Ext.Toolbar
   tbtext with cls: 'h-sep'. Style only the inner element — the wrapping
   <td.x-toolbar-cell> is left padded normally so the line is centred
   between buttons with comfortable spacing. */
#acs_top_menu_div .h-sep {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.12);
    padding: 0 !important;
    margin: 0 8px;
    color: transparent;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}
/* Tighten the surrounding cell so the divider doesn't look like a block */
#acs_top_menu_div .x-toolbar-cell:has(> .h-sep) {
    background: transparent !important;
    padding: 0 !important;
    width: auto !important;
}

/* =============================================
   N1.f / N1.g — User chip + user-card menu header (mock 2353-2378)
   =============================================
   The User entry in the icon row is wider than the other 40x40 icon
   buttons because it carries an avatar + display name + chevron. The
   first item of the User menu is a non-clickable user-card showing a
   larger avatar + name + email. */

/* Hide the legacy #acs_header_user div — its content (display name) is
   read by JS into the chip; the visible username now lives in the chip. */
#acs_header_user { display: none !important; }

/* User chip — overrides the icon-button block's 40x40 / 6px-radius / 0.06-bg
   defaults so the chip is a pill (auto-width, full radius, transparent at
   rest), per mock lines 419–442. */
#acs_top_menu_div .x-btn.user-chip {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    border-radius: 9999px !important;
    background: transparent !important;
}
#acs_top_menu_div .x-btn.user-chip.x-btn-over {
    background: rgba(255, 255, 255, 0.08) !important;
}
#acs_top_menu_div .x-btn.user-chip.x-btn-menu-active,
#acs_top_menu_div .x-btn.user-chip.x-btn-pressed {
    background: rgba(255, 255, 255, 0.12) !important;
}
#acs_top_menu_div .x-btn.user-chip .x-btn-text {
    padding: 0 !important;
}

.user-chip-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
}
.user-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
}
.user-chip-avatar .h-icon-mask {
    width: 16px !important;
    height: 16px !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: #e6edf4 !important;
}
/* Force light color: azzurra-legacy applies a dark color via the parent
   `<em class="x-btn-arrow">` element which an inheriting <span> picks up,
   so we override explicitly. */
#acs_top_menu_div .x-btn.user-chip .user-chip-name {
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 500;
    /* Room for descenders (g, p, y): overflow is hidden for the ellipsis. */
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.user-chip-chev {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.user-chip-chev .h-icon-mask {
    width: 12px !important;
    height: 12px !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    background-color: #b0b8c4 !important;
}
#acs_top_menu_div .x-btn.user-chip.x-btn-menu-active .user-chip-chev {
    transform: rotate(180deg);
}

/* User-card menu header — first item of the User menu, non-clickable */
.x-menu.header-menu li.x-menu-list-item:has(.x-menu-item.menu-user-hd) {
    margin: 0 !important;
    pointer-events: none !important;
}
.x-menu.header-menu li.x-menu-list-item:has(.x-menu-item.menu-user-hd).x-menu-item-active {
    background: transparent !important;
}
.x-menu.header-menu a.x-menu-item.menu-user-hd {
    padding: 10px 10px 6px !important;
    cursor: default !important;
}
.x-menu.header-menu a.x-menu-item.menu-user-hd .x-menu-item-icon {
    display: none !important;
}
.x-menu.header-menu .user-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.x-menu.header-menu .user-card-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.x-menu.header-menu .user-card-avatar .h-icon-mask {
    width: 22px !important;
    height: 22px !important;
    -webkit-mask-size: 22px 22px !important;
            mask-size: 22px 22px !important;
    background-color: #e6edf4 !important;
}
.x-menu.header-menu .user-card-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.x-menu.header-menu .user-card-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.x-menu.header-menu .user-card-email {
    color: #9aa3ad;
    font-size: 12px;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notification bell badge — sits next to the icon mask, not on top */
#acs_top_menu_div #button_bell .x-btn-text .bell-badge {
    position: absolute;
    top: 2px;
    right: -2px;
    font-size: 10px;
    min-width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    background: #e53935;
    color: white;
    border-radius: 7px;
    padding: 0 3px;
}
#acs_top_menu_div #button_bell .x-btn-text .bell-badge:empty { display: none; }

/* Switch library icon */
.switch-library-icon {
    background-image: url('../images/switch-library.svg');
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    width: 32px;
    height: 32px;
    display: inline-block;
    transition: opacity 0.15s;
}

#acs_top_menu_div .x-btn.x-btn-over .switch-library-icon {
    background-image: url('../images/switch-library-hover.svg');
}

/* Checkout selector icon */
.checkout-selector-icon {
    background-image: url('../images/checkout-selector.svg');
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    width: 32px;
    height: 32px;
    display: inline-block;
    transition: opacity 0.15s;
}

#acs_top_menu_div .x-btn.x-btn-over .checkout-selector-icon {
    background-image: url('../images/checkout-selector-hover.svg');
}

/* =============================================
   HEADER MENU DROPDOWN STYLING
   Scoped to .header-menu to avoid affecting other ExtJS menus
   ============================================= */

/* Menu container - scoped to header menus only.
   N1.e: dark-menu treatment per mock_library_navbar_proposal.html lines
   187–215: 10px radius, 1px subtle border, modest shadow, 4px padding so
   hover backgrounds extend edge-to-edge inside the menu surface. */
.x-menu.header-menu {
    background-color: #1c2127 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    padding: 4px !important;
    min-width: 200px !important;
}

/* Menu list items — no horizontal margin (mock has no per-item inset);
   hover background extends edge-to-edge inside the container's 4px pad.
   Border + padding zeroed on all rows (not just active) so the row
   height doesn't flip between resting/hover and shift items below by
   2px on hover. azzurra-legacy applies `padding: 1px` at rest and
   `padding: 0` when active to compensate for its own (now-suppressed)
   border switch — we lock both to zero. */
.x-menu.header-menu li.x-menu-list-item {
    margin: 0 !important;
    border: 0 !important;
    padding: 0 !important;
}

/* A header menu taller than the room it has scrolls with a normal scroll bar.
   Ext still sets the list height (`Menu.constrainScroll`); its arrow
   scrollers bind no wheel listener and sit over the first and last item. */
.x-menu.header-menu ul.x-menu-list {
    overflow-y: auto !important;
}
.x-menu.header-menu .x-menu-scroller {
    display: none !important;
}

/* Menu item links - flex layout, dark theme text.
   azzurra-legacy ships .x-menu-item with `border-left/right: 1px solid #555`
   plus a width rule that makes the <a> overflow its <li> by 1px on each
   side; on a dark surface that overflow reads as a visible outline around
   the hover row. We zero the borders, lock width: auto, and use border-box
   so the highlight sits flush inside the <li>. */
.x-menu.header-menu a.x-menu-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px 14px !important;
    color: #e6edf4 !important;
    font-size: 13px !important;
    line-height: 18px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    width: auto !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Suppress the <ul>'s default 2px padding so the <li> reaches edge-to-edge
   inside the menu container's 4px padding. */
.x-menu.header-menu .x-menu-list {
    padding: 0 !important;
    margin: 0 !important;
}

.x-menu.header-menu .x-menu-item-text {
    color: #e6edf4 !important;
    font-size: 13px !important;
}

/* Hover state — uses --acs-dark-hover-bg-menu from the shared theme.
   Note this is *softer* (0.08) than the icon-button hover (0.12) — see
   THEME_GUIDE §1.2 + §6.5 dark-menu spec for the rationale.
   No border-radius on the highlighted row: the mock fills the row corner-
   to-corner inside the menu's 4px container padding, no rounded inset.
   azzurra-legacy adds `border-top/bottom: 1px solid #555` to the active
   <li>; we zero those out so the hover bg has no horizontal lines.
   TODO(A1): replace the literal value with var(--acs-dark-hover-bg-menu)
   once the shared theme's CSS-properties file is built and served. */
.x-menu.header-menu li.x-menu-list-item.x-menu-item-active {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 0 !important;
}

.x-menu.header-menu li.x-menu-item-active a.x-menu-item,
.x-menu.header-menu .x-menu-item-active .x-menu-item-text {
    color: #00aeef !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* Menu separator - dark theme, subtler than before */
.x-menu.header-menu .x-menu-sep-li {
    margin: 6px 12px !important;
    padding: 0 !important;
    background: transparent !important;
}

.x-menu.header-menu .x-menu-sep {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: none !important;
    height: 0 !important;
}

/* Group label rows — non-clickable section headers (mock "menu-label").
   Applied via cls: 'menu-label' on Ext.menu.Item — ExtJS attaches the
   class to the anchor <a>, not the <li>, so we use :has() to roll the
   styling back up to the list item where needed. */
.x-menu.header-menu li.x-menu-list-item:has(.menu-label) {
    margin: 0 !important;
    pointer-events: none !important;
}
.x-menu.header-menu li.x-menu-list-item:has(.menu-label).x-menu-item-active {
    background: transparent !important;
}
.x-menu.header-menu a.menu-label.x-menu-item {
    padding: 10px 14px 4px 14px !important;
    cursor: default !important;
}
.x-menu.header-menu a.menu-label .x-menu-item-text {
    color: #7a818a !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}
.x-menu.header-menu li.x-menu-item-active a.menu-label .x-menu-item-text {
    color: #7a818a !important;
}
/* ExtJS menu items have an <img class="x-menu-item-icon"> placeholder before
   the text — hide it on label rows so the label aligns flush left. */
.x-menu.header-menu a.menu-label .x-menu-item-icon {
    display: none !important;
}

/* Icons in menu - consistent sizing for all icons */
.x-menu.header-menu .x-menu-item i[class^="icon-"],
.x-menu.header-menu .x-menu-item i[class*=" icon-"] {
    color: #b0b8c4 !important;
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    text-align: center !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.x-menu.header-menu .x-menu-item-active i[class^="icon-"],
.x-menu.header-menu .x-menu-item-active i[class*=" icon-"] {
    color: #00aeef !important;
}

/* SVG icons in menu - same size as acsfont icons */
.x-menu.header-menu .x-menu-item .switch-library-icon,
.x-menu.header-menu .x-menu-item .checkout-selector-icon {
    width: 25px !important;
    height: 25px !important;
    background-size: 21px 21px !important;
    vertical-align: middle !important;
}

.x-menu.header-menu .x-menu-item-active .switch-library-icon {
    background-image: url('../images/switch-library-hover.svg');
}

.x-menu.header-menu .x-menu-item-active .checkout-selector-icon {
    background-image: url('../images/checkout-selector-hover.svg');
}

/* Checkout menu indicator - radio button style */
.checkout-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #5a6370;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    position: relative;
}

.checkout-indicator.checkout-selected {
    border-color: #00aeef;
}

/* Submenu arrow — chevron-right SVG via ::after pseudo-element.
   ExtJS only puts .x-menu-item-arrow on anchors that open a submenu, so this
   only affects parent items. Using ::after keeps it isolated from the header
   menu's background overrides. */
.x-menu.header-menu a.x-menu-item-arrow {
    position: relative !important;
    padding-right: 28px !important;
    background-image: none !important;
}

.x-menu.header-menu a.x-menu-item-arrow::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b0b8c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

.x-menu.header-menu li.x-menu-item-active > a.x-menu-item-arrow::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300aeef' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}

.checkout-indicator.checkout-selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #00aeef;
    border-radius: 50%;
}

/* =============================================================
   My Profile Dialog — .my-profile-window
   JS: ext-acs-header.js my_profile(), ext-acs-user-sec.js create_form()
   ============================================================= */

.x-window.my-profile-window .x-tab-panel-bwrap .x-panel-body {
    padding: 0 !important;
}
.x-window.my-profile-window .x-tab-panel-header {
    margin-top: 0 !important;
}
.x-window.my-profile-window .x-tab-panel-bwrap {
    padding-top: 10px !important;
    box-sizing: border-box !important;
}
.x-window.my-profile-window .x-form-item.x-hide-label .x-form-element {
    padding-left: 0 !important;
}
.x-window.my-profile-window .x-form-element {
    width: auto !important;
}
/* Stretch text inputs to the dialog width. `.x-form-field` is on every field
   including checkboxes and radios, and this selector outranks the theme's
   `.x-window .x-form-checkbox { width: 16px }`, so exclude them: a stretched
   checkbox squeezes its own box label out of the row. */
.x-window.my-profile-window .x-form-element .x-form-text,
.x-window.my-profile-window .x-form-element .x-form-field:not(.x-form-checkbox):not(.x-form-radio) {
    width: 100% !important;
    box-sizing: border-box !important;
}
.x-window.my-profile-window .x-form-element .x-form-field-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
}
.x-window.my-profile-window .x-panel-body.x-box-layout-ct:has(#change_user_password_btn) {
    padding-left: 135px !important;
    margin-top: 6px !important;
}
.x-window.my-profile-window #change_user_password_btn table,
.x-window.my-profile-window #change_user_password_btn .x-btn-tl,
.x-window.my-profile-window #change_user_password_btn .x-btn-tc,
.x-window.my-profile-window #change_user_password_btn .x-btn-tr,
.x-window.my-profile-window #change_user_password_btn .x-btn-bl,
.x-window.my-profile-window #change_user_password_btn .x-btn-bc,
.x-window.my-profile-window #change_user_password_btn .x-btn-br,
.x-window.my-profile-window #change_user_password_btn .x-btn-ml,
.x-window.my-profile-window #change_user_password_btn .x-btn-mr {
    display: none !important;
}
.x-window.my-profile-window #change_user_password_btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
.x-window.my-profile-window #change_user_password_btn {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-sm) !important;
    box-shadow: var(--acs-shadow-sm) !important;
}
.x-window.my-profile-window #change_user_password_btn button {
    color: var(--acs-text-secondary) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    font-family: var(--acs-font-family) !important;
    padding: 6px 16px !important;
    height: auto !important;
    line-height: 1.2 !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
}
.x-window.my-profile-window #change_user_password_btn.x-btn-over {
    background: var(--acs-hover-bg) !important;
    border-color: var(--acs-brand-cyan) !important;
}
.x-window.my-profile-window #change_user_password_btn.x-btn-over button {
    color: var(--acs-brand-cyan) !important;
}
.x-window.my-profile-window .x-toolbar button.grid_exit,
.x-window.my-profile-window .x-toolbar button.grid_filter,
.x-window.my-profile-window .x-toolbar button.grid_run,
.x-window.my-profile-window .x-toolbar button.grid_excel {
    background-image: none !important;
    background-color: transparent !important;
}
.x-window.my-profile-window .x-toolbar button.grid_exit::before,
.x-window.my-profile-window .x-toolbar button.grid_filter::before,
.x-window.my-profile-window .x-toolbar button.grid_run::before,
.x-window.my-profile-window .x-toolbar button.grid_excel::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
.x-window.my-profile-window .x-toolbar button.grid_exit::before {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
.x-window.my-profile-window .x-toolbar button.grid_filter::before {
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
}
.x-window.my-profile-window .x-toolbar button.grid_run::before {
    -webkit-mask-image: var(--icon-play) !important;
            mask-image: var(--icon-play) !important;
}
.x-window.my-profile-window .x-toolbar button.grid_excel::before {
    -webkit-mask-image: var(--icon-file-spreadsheet) !important;
            mask-image: var(--icon-file-spreadsheet) !important;
}
.x-window.my-profile-window .x-toolbar .x-btn.x-btn-over button.grid_exit::before,
.x-window.my-profile-window .x-toolbar .x-btn.x-btn-over button.grid_filter::before,
.x-window.my-profile-window .x-toolbar .x-btn.x-btn-over button.grid_run::before,
.x-window.my-profile-window .x-toolbar .x-btn.x-btn-over button.grid_excel::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
.x-window.my-profile-window .x-toolbar .x-item-disabled button.grid_exit::before,
.x-window.my-profile-window .x-toolbar .x-item-disabled button.grid_filter::before,
.x-window.my-profile-window .x-toolbar .x-item-disabled button.grid_run::before,
.x-window.my-profile-window .x-toolbar .x-item-disabled button.grid_excel::before {
    background-color: var(--acs-text-disabled, #adb5bd) !important;
}
.x-window.my-profile-window .login-success-icon,
.x-window.my-profile-window .login-fail-icon {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    vertical-align: -3px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
}
.x-window.my-profile-window .login-success-icon {
    -webkit-mask-image: var(--icon-check) !important;
            mask-image: var(--icon-check) !important;
    background-color: #2e7d32 !important;
}
.x-window.my-profile-window .login-fail-icon {
    -webkit-mask-image: var(--icon-x) !important;
            mask-image: var(--icon-x) !important;
    background-color: #c62828 !important;
}
.x-window.my-profile-window .filter_change_warning {
    font-weight: 600 !important;
    font-size: 12px !important;
    font-family: var(--acs-font-family) !important;
    color: #7a4f00 !important;
    background-color: #fff8e1 !important;
    border: 1px solid var(--acs-warning, #ffb300) !important;
    border-radius: var(--acs-radius-sm) !important;
    padding: 4px 10px !important;
}
.x-window.my-profile-window .x-grid-panel {
    border: 1px solid var(--acs-border-light) !important;
    border-radius: var(--acs-radius-md) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.x-window.my-profile-window .x-grid-panel > .x-panel-bwrap {
    border-radius: var(--acs-radius-md) !important;
    overflow: hidden !important;
}
.x-window.my-profile-window .x-grid3 {
    border-radius: 0 0 var(--acs-radius-md) var(--acs-radius-md) !important;
    overflow: hidden !important;
}
.x-window.my-profile-window .x-grid-panel .x-panel-body {
    border: none !important;
}
.x-window.my-profile-window .x-grid-panel .x-toolbar {
    border-color: transparent !important;
    border-bottom-color: var(--acs-border-light) !important;
    background-color: var(--acs-card-bg) !important;
    background-image: none !important;
}

/* =============================================================
   Change Password Dialog — .change-password-window
   JS: ext-acs-user-sec.js show_change_password()
   Loaded here (ext-acs-header.css) because this dialog is
   triggered from the header and must be available on all pages.
   ============================================================= */

.x-window.change-password-window .passwordInfo.x-panel {
    border: 1px solid var(--acs-border-light) !important;
    border-radius: var(--acs-radius-md) !important;
    background-color: var(--acs-surface-secondary, #f8f9fa) !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
}
.x-window.change-password-window .passwordInfo .x-panel-body {
    background-color: transparent !important;
    padding: 10px 14px !important;
    border: none !important;
}
.x-window.change-password-window .passwordInfoHeader {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--acs-text-muted) !important;
}
.x-window.change-password-window .passwordInfo .x-panel-body br {
    display: none !important;
}
.x-window.change-password-window .passwordInfoProfile div p,
.x-window.change-password-window .passwordInfoBody div p {
    font-size: 0.8rem !important;
    margin: 3px 0 !important;
    line-height: 1.4 !important;
}
.x-window.change-password-window #divPwdBox p[style*="color: red"],
.x-window.change-password-window #divPwdBox p[style*="color:red"] {
    color: var(--acs-form-invalid-border, #dd7870) !important;
}
.x-window.change-password-window #divPwdBox p[style*="color: mediumseagreen"],
.x-window.change-password-window #divPwdBox p[style*="color:mediumseagreen"] {
    color: var(--acs-success, #2e7d32) !important;
}
/* The password form uses baseCls 'dialog_label', which ext-acs-compliance.css
   sizes as an 18px label. On compliance pages the panel collapsed, the
   autoHeight window measured it, and Save / Cancel ended up clipped below. */
.x-window.change-password-window .dialog_label {
    height: auto !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap {
    padding-left: 0 !important;
    position: relative !important;
    display: flex !important;
    align-items: stretch !important;
    border: 1px solid #d0d7e0 !important;
    border-radius: var(--acs-radius-sm, 4px) !important;
    overflow: hidden !important;
    background: #fff !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap > input {
    flex: 1 1 auto !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    min-width: 0 !important;
    background: transparent !important;
    /* Right padding keeps typed text clear of the validation icon pinned
       below. Always reserved: the confirm field has `invalidClass: ''`, so
       there is no invalid class to key it on. */
    padding: 4px 24px 4px 8px !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap > div:has(.chg-pwd-field-icon) {
    flex: 0 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-left: 1px solid #d0d7e0 !important;
    background: #f8f9fa !important;
    cursor: pointer !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap > div:has(.chg-pwd-field-icon):hover {
    background: #ecf0f6 !important;
}
.x-window.change-password-window .chg-pwd-field-icon {
    float: none !important;
    margin: 0 !important;
    font-size: 13px !important;
    color: var(--acs-text-secondary) !important;
    cursor: pointer !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap > div:has(.chg-pwd-field-icon):hover .chg-pwd-field-icon {
    color: var(--acs-brand-cyan) !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap .x-form-invalid-icon {
    position: absolute !important;
    right: 36px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
}
.x-window.change-password-window .x-form-element.form-field-wrap:has(.x-form-invalid) {
    border-color: var(--acs-form-invalid-border, #dd7870) !important;
}
.x-window.change-password-window .form-field[style*="color: red"],
.x-window.change-password-window .form-field[style*="color:red"] {
    display: block !important;
    color: #7a4f00 !important;
    background-color: #fff8e1 !important;
    border: 1px solid var(--acs-warning, #ffb300) !important;
    border-radius: var(--acs-radius-sm, 4px) !important;
    font-size: 0.8rem !important;
    padding: 8px 12px !important;
    margin-top: 10px !important;
    margin-bottom: 4px !important;
}
.x-window.change-password-window .x-panel-btns {
    border-top: 1px solid var(--acs-border-light) !important;
    background-color: var(--acs-card-bg) !important;
    padding-top: 12px !important;
}
