/* =============================================================================
   aira-shell.css — the frame: profile menu, menu queue counts, the financial
   year in the header chip / scope modal / entry sheets.
   Logic: erpJs/Menu/menu-shell.js, erpJs/fin-year.js.

   The profile menu uses its own classes (not .nav-link): the "darker" top bar
   paints every .navbar-top .nav-link white, which made the old Phoenix
   profile items invisible on the light panel. Colours here come from the
   body tokens, so light and dark themes both read.
   ============================================================================= */

/* ---------- avatar (initials; no stock photo) ---------- */
.aira-avatar { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; flex: none;
    font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--aira-on-accent, #fff);
    background: linear-gradient(135deg, var(--phoenix-primary), color-mix(in srgb, var(--phoenix-primary) 70%, #0c0b10));
    box-shadow: 0 0 0 2px var(--phoenix-emphasis-bg, #fff), 0 0 0 3px rgba(var(--phoenix-primary-rgb), .35); }
.aira-avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; border-radius: 14px; box-shadow: none; }

/* ---------- the panel ---------- */
.aira-pm.dropdown-menu { min-width: 17.5rem; max-width: 20rem; padding: 0; border-radius: 16px; overflow: hidden;
    background: var(--phoenix-emphasis-bg, #fff); color: var(--phoenix-body-color, #31374a); }
html[data-bs-theme="dark"] .aira-pm.dropdown-menu { background: #1b2030; border-color: rgba(255, 255, 255, .08) !important; }

.aira-pm-head { display: flex; gap: .75rem; align-items: center; padding: .95rem 1rem .85rem;
    background: linear-gradient(135deg, rgba(var(--phoenix-primary-rgb), .1), rgba(var(--phoenix-primary-rgb), .02));
    border-bottom: 1px solid rgba(var(--phoenix-primary-rgb), .12); }
.aira-pm-who { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.aira-pm-who b { font-size: .92rem; font-weight: 700; color: var(--phoenix-emphasis-color, #141824);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aira-pm-who small { font-size: .72rem; color: var(--lnx-muted, #6e7891); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aira-pm-scope { display: inline-flex; align-items: center; gap: .3rem; margin-top: .2rem; font-size: .7rem; font-weight: 600;
    color: var(--phoenix-primary); min-width: 0; }
.aira-pm-scope svg { width: 12px; height: 12px; flex: none; }
.aira-pm-scope i { font-style: normal; opacity: .6; }
.aira-pm-scope span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.aira-pm-list { display: flex; flex-direction: column; padding: .4rem; }
.aira-pm-item, .aira-pm-signout { display: flex; align-items: center; gap: .65rem; width: 100%; margin: 0; padding: .55rem .7rem;
    border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; font-size: .84rem; font-weight: 600;
    color: var(--phoenix-emphasis-color, #141824); cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.aira-pm-item svg, .aira-pm-signout svg { width: 16px; height: 16px; flex: none; color: var(--lnx-muted, #6e7891); transition: color .12s ease; }
.aira-pm-item:hover, .aira-pm-item:focus-visible { outline: none; background: rgba(var(--phoenix-primary-rgb), .08); color: var(--phoenix-primary); }
.aira-pm-item:hover svg, .aira-pm-item:focus-visible svg { color: var(--phoenix-primary); }
html[data-bs-theme="dark"] .aira-pm-item, html[data-bs-theme="dark"] .aira-pm-signout { color: #e3e6ed; }
html[data-bs-theme="dark"] .aira-pm-who b { color: #eff2f6; }

.aira-pm-signout { width: auto; margin: 0 .4rem .45rem; padding-top: .6rem; border-radius: 10px; color: var(--phoenix-danger, #ec1f00);
    border-top: 1px solid rgba(var(--phoenix-primary-rgb), .1); border-top-left-radius: 0; border-top-right-radius: 0; }
.aira-pm-signout svg { color: currentColor; }
.aira-pm-signout:hover, .aira-pm-signout:focus-visible { outline: none; background: rgba(var(--phoenix-danger-rgb, 236, 31, 0), .08); }
html[data-bs-theme="dark"] .aira-pm-signout { color: #ff7a66; }

/* ---------- profile / password / help dialogs ---------- */
.aira-pm-modal .modal-dialog { max-width: 500px; }
.aira-pm-mhead { min-width: 0; }
.aira-pm-mhead .modal-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aira-pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .9rem; }
.aira-pm-row { display: flex; flex-direction: column; min-width: 0; padding: .45rem .6rem; border-radius: 10px;
    background: rgba(var(--phoenix-primary-rgb), .04); border: 1px solid rgba(var(--phoenix-primary-rgb), .08); }
.aira-pm-row span { font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--lnx-muted, #6e7891); }
.aira-pm-row b { font-size: .84rem; font-weight: 600; color: var(--phoenix-emphasis-color); overflow-wrap: anywhere; }
.aira-pm-note { display: flex; gap: .5rem; align-items: flex-start; margin: 1rem 0 0; padding: .6rem .75rem; border-radius: 12px; font-size: .76rem;
    line-height: 1.45; color: var(--phoenix-body-color); background: rgba(var(--phoenix-primary-rgb), .05); border: 1px dashed rgba(var(--phoenix-primary-rgb), .3); }
.aira-pm-note svg { flex: none; margin-top: .1rem; color: var(--phoenix-primary); }
.aira-pm-keys { display: flex; flex-direction: column; gap: .35rem; }
.aira-pm-key { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: .75rem; font-size: .82rem; }
.aira-pm-key b { font-weight: 500; color: var(--phoenix-emphasis-color); }
.aira-pm-key kbd { font-size: .7rem; padding: .15rem .4rem; border-radius: 6px; background: rgba(var(--phoenix-primary-rgb), .1);
    color: var(--phoenix-primary); border: 1px solid rgba(var(--phoenix-primary-rgb), .2); box-shadow: none; }
.aira-pm-modal .modal-footer .btn svg { width: 15px; height: 15px; margin-right: .2rem; vertical-align: -2px; }
@media (max-width: 480px) { .aira-pm-grid { grid-template-columns: 1fr; } }

/* ---------- side menu: work-queue counts ---------- */
.aira-nav-count { margin-left: auto; padding: 0 .42rem; min-width: 1.35rem; height: 1.15rem; line-height: 1.15rem; border-radius: 999px;
    text-align: center; font-size: .64rem; font-weight: 800; font-variant-numeric: tabular-nums;
    color: var(--phoenix-primary); background: rgba(var(--phoenix-primary-rgb), .12); }
.navbar-vertical .nav-link.active .aira-nav-count { color: var(--aira-on-accent, #fff); background: var(--phoenix-primary); }
.navbar-vertical .nav-link .d-flex:has(.aira-nav-count) { padding-right: .25rem; }
@media (min-width: 992px) {
    html.navbar-vertical-collapsed:not(.lnx-peek) .navbar-vertical .label-1 .aira-nav-count { display: none; }
}

/* ---------- financial year: header chip ---------- */
.aira-fy-tag { font-style: normal; margin-left: .3rem; padding: 0 .35rem; border-radius: 6px; letter-spacing: .04em;
    color: var(--phoenix-primary); background: rgba(var(--phoenix-primary-rgb), .1); }
.lnx-scope.aira-fy-off { border-color: rgba(229, 120, 11, .55) !important; }
.lnx-scope.aira-fy-off .aira-fy-tag { color: #fff; background: #d97706; }

/* ---------- financial year: the row in the scope modal ---------- */
.aira-fy-pick { margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed rgba(var(--phoenix-primary-rgb), .25); }
.aira-fy-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; font-size: .8rem; color: var(--phoenix-emphasis-color); }
.aira-fy-head svg { width: 15px; height: 15px; color: var(--phoenix-primary); }
.aira-fy-head small { margin-left: auto; font-size: .68rem; color: var(--lnx-muted, #6e7891); }
.aira-fy-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.aira-fy-opt { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 6.2rem; margin: 0; padding: .4rem .75rem;
    font: inherit; text-align: left; cursor: pointer; border-radius: 12px; color: inherit;
    border: 1px solid var(--phoenix-border-color, #e3e6ed); background: var(--aira-card, var(--phoenix-emphasis-bg, #fff));
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.aira-fy-opt b { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--phoenix-emphasis-color); }
.aira-fy-opt small { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--lnx-muted, #6e7891); }
.aira-fy-opt.is-current small { color: var(--phoenix-success, #25b003); }
.aira-fy-opt:hover { border-color: rgba(var(--phoenix-primary-rgb), .45); }
.aira-fy-opt:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--phoenix-primary-rgb), .3); }
.aira-fy-opt.is-on { border-color: var(--phoenix-primary); background: rgba(var(--phoenix-primary-rgb), .08); box-shadow: inset 0 -3px 0 var(--phoenix-primary); }
.aira-fy-skel { display: inline-block; width: 6.2rem; height: 2.6rem; border-radius: 12px; background: rgba(var(--phoenix-primary-rgb), .07); }
.aira-fy-none { font-size: .78rem; color: var(--lnx-muted, #6e7891); }

/* ---------- financial year: entry sheet of another year ---------- */
.aira-fy-warn { display: flex; gap: .6rem; align-items: flex-start; margin: .25rem 0 .9rem; padding: .6rem .85rem; border-radius: 12px;
    font-size: .8rem; line-height: 1.45; color: #7c3a00; background: #fff4e5; border: 1px solid #f5c27a; }
.aira-fy-warn svg { flex: none; margin-top: .1rem; color: #d97706; }
.aira-fy-warn-btn { margin-left: .4rem; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: #b45309; text-decoration: underline; cursor: pointer; }
html[data-bs-theme="dark"] .aira-fy-warn { color: #fcd9a8; background: rgba(217, 119, 6, .14); border-color: rgba(245, 158, 11, .4); }
html[data-bs-theme="dark"] .aira-fy-warn-btn { color: #fbbf24; }
.doc-scope-chip.doc-scope-year.is-off { color: #b45309; background: #fff4e5; border-color: #f5c27a; }
html[data-bs-theme="dark"] .doc-scope-chip.doc-scope-year.is-off { color: #fbbf24; background: rgba(217, 119, 6, .14); }
