/* ==========================================================================
   AveLynx - Universal Platform Navigation Header & Contextual Help
   ========================================================================== */

:root {
  --ax-header-bg: rgba(15, 23, 42, 0.92);
  --ax-header-border: rgba(255, 255, 255, 0.08);
  --ax-text-main: #f8fafc;
  --ax-text-muted: #94a3b8;
  --ax-primary: #3b82f6;
  --ax-primary-glow: rgba(59, 130, 246, 0.35);
  --ax-surface: #1e293b;
  --ax-surface-hover: #334155;
  --ax-radius: 10px;
  --ax-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ax-z-index: 99999;
  --ax-text-strong: #fff;     /* headings and names on the dark surfaces */
  --ax-on-accent: #fff;       /* text on a coloured button or avatar */
  --ax-primary-btn: #0284c7;  /* the small blue buttons written into the header markup */
  --ax-text-faint: #64748b;   /* the quietest text */
  --ax-info: #38bdf8;         /* links and highlights written into the header markup */
  --ax-info-soft: rgba(14, 165, 233, 0.08);
  --ax-info-line: rgba(14, 165, 233, 0.25);
  --ax-avatar-guest: #475569; /* the avatar of a visitor who is not signed in */
  --ax-popup-bg: #0f172a;     /* the small pop-ups the header opens (time zone, phone, booking) */
  --ax-popup-field: #0b1220;
  --ax-popup-text: #e2e8f0;
  --ax-popup-line: rgba(56, 189, 248, 0.45);
  --ax-hairline: rgba(255, 255, 255, 0.06);
}

/* LIGHT THEME. A dimmed warm palette for people who are light sensitive (the same family as Project Controls). Every light colour
   is defined here once; nothing in the light theme is pure white, cooler than neutral, above 84% lightness (backgrounds) or 88%
   (anything else, apart from the off-white on dark buttons). Text pairs are 7:1 or better. scripts/test-header-light-theme.mjs checks it. */
[data-theme="light"] {
  --ax-l-page: #d3c6ae;          /* the strip at the top and the page edges */
  --ax-l-card: #e3d8c3;          /* menus, dialogs, drawers */
  --ax-l-field: #d9cdb6;         /* tiles, rows, inputs and pills inside a card */
  --ax-l-hover: #cbbea5;         /* hover and the selected row */
  --ax-l-sunk: #cdbfa6;          /* card headers and footers */
  --ax-l-line: #a89a80;          /* borders and dividers */
  --ax-l-text: #1f1a14;
  --ax-l-muted: #33291e;
  --ax-l-accent: #4a1d05;        /* buttons, links and the avatar: warm brown */
  --ax-l-accent-hover: #351403;
  --ax-l-accent-soft: #d6c2a4;   /* a tag or highlight behind accent text */
  --ax-l-secondary: #4a3d2e;     /* the grey button, dark with off-white text */
  --ax-l-secondary-hover: #33291e;
  --ax-l-danger: #5e140e;
  --ax-l-danger-soft: #dcc3b0;
  --ax-l-ok: #4a7a22;
  --ax-l-star: #573a00;
  --ax-l-scrim: rgba(31, 26, 20, 0.55);
  --ax-l-shadow: rgba(31, 26, 20, 0.22);
  --ax-header-bg: var(--ax-l-page);
  --ax-header-border: var(--ax-l-line);
  --ax-text-main: var(--ax-l-text);
  --ax-text-muted: var(--ax-l-muted);
  --ax-text-strong: var(--ax-l-text);
  --ax-on-accent: #f8f3e8;
  --ax-primary-btn: var(--ax-l-accent);
  --ax-text-faint: var(--ax-l-muted);
  --ax-info: var(--ax-l-accent);
  --ax-info-soft: var(--ax-l-accent-soft);
  --ax-info-line: var(--ax-l-line);
  --ax-avatar-guest: var(--ax-l-secondary);
  --ax-popup-bg: var(--ax-l-card);
  --ax-popup-field: var(--ax-l-field);
  --ax-popup-text: var(--ax-l-text);
  --ax-popup-line: var(--ax-l-line);
  --ax-hairline: var(--ax-l-line);
  --ax-primary: var(--ax-l-accent);
  --ax-primary-glow: rgba(74, 29, 5, 0.25);
  --ax-surface: var(--ax-l-card);
  --ax-surface-hover: var(--ax-l-hover);
  color-scheme: light;
}

.axios-universal-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 58px;
  background: var(--ax-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ax-header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  box-sizing: border-box;
  z-index: var(--ax-z-index);
  font-family: var(--ax-font);
  color: var(--ax-text-main);
  user-select: none;
}

/* Left Group */
.ax-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ax-brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.ax-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--ax-primary-glow);
  color: var(--ax-on-accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.ax-brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-transform: uppercase;
}

/* Brand tagline: shown on wide screens only, so the header never wraps */
.ax-brand-tagline {
  font-size: 0.72rem;
  color: var(--ax-text-muted, #94a3b8);
  white-space: nowrap;
  margin-left: 0.35rem;
}
@media (max-width: 1400px) {
  .ax-brand-tagline { display: none; }
}

.ax-divider-v {
  width: 1px;
  height: 24px;
  background: var(--ax-header-border);
}

/* Workspace / Tenant Selector Pill */
.ax-workspace-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--ax-surface);
  border: 1px solid var(--ax-header-border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ax-text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ax-workspace-pill:hover {
  background: var(--ax-surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.ax-workspace-avatar {
  font-size: 1rem;
}

/* A narrow window: the header is one 58px row, so nothing in it may wrap. The workspace name is cut with an ellipsis, then the less important
   parts give way (the Platform tag, the words on the AI Copilot button, the workspace name itself, which stays available to a screen reader
   through the button's own label and to the pointer through its title). */
.ax-header-left { min-width: 0; flex: 0 1 auto; }
.ax-header-right { flex: none; }
.ax-workspace-pill { min-width: 0; max-width: 16rem; white-space: nowrap; flex: 0 1 auto; }
.ax-workspace-pill #axHeaderOrgName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .ax-brand-tag { display: none; }
}
@media (max-width: 900px) {
  .ax-copilot-pill span:last-child { display: none; }
  .ax-workspace-pill { max-width: 11rem; }
}
@media (max-width: 700px) {
  .ax-workspace-pill #axHeaderOrgName { display: none; }
  .axios-universal-header { padding: 0 0.75rem; }
}
/* From 600px down the buttons on the right no longer fit beside the logo, the name and the organization button, so the name, the divider and the
   user's name label give way first (at 546px the organization button used to sit on top of the Copilot and app buttons). */
@media (max-width: 600px) {
  .ax-header-right .ax-divider-v, .ax-user-menu-label { display: none; }
  .ax-brand-link > span:last-child { display: none; }
}
@media (max-width: 480px) {
  .ax-header-right { gap: 0.15rem; }
}
@media (max-width: 420px) {
  .ax-header-right .ax-icon-btn { width: 30px; height: 32px; }
  .ax-header-right .ax-copilot-pill { padding-left: 0.4rem; padding-right: 0.4rem; }
}

/* Right Actions */
.ax-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.ax-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ax-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.ax-icon-btn:hover {
  background: var(--ax-surface);
  color: var(--ax-text-main);
  border-color: var(--ax-header-border);
}

.ax-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.ax-copilot-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.ax-copilot-pill:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

/* User / Account Button Trigger */
.ax-user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
  background: var(--ax-surface);
  border: 1px solid var(--ax-header-border);
  border-radius: 20px;
  color: var(--ax-text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--ax-font);
  font-size: 0.85rem;
  font-weight: 600;
}

.ax-user-menu-btn:hover {
  background: var(--ax-surface-hover);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.ax-user-avatar-badge {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  color: var(--ax-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* The initials are drawn from data-initials, not written as page text: the button's spoken name is its visible name, and the initials would otherwise be visible text that the spoken name does not contain */
#axUserAvatarText::before {
  content: attr(data-initials);
}

.ax-status-indicator {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
}

.ax-status-indicator.online {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.ax-user-menu-label {
  font-size: 0.85rem;
  color: var(--ax-text-main);
}

/* Standardized User Dropdown Popover */
.ax-user-dropdown-popover {
  position: absolute;
  top: 52px;
  right: 0;
  width: 330px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
  z-index: 100002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: axFadeIn 0.2s ease;
  font-family: var(--ax-font);
  color: #f8fafc;
}

.ax-user-dropdown-popover.active {
  display: flex;
}

.ax-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
}

.ax-user-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  color: var(--ax-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.4);
}

.ax-user-dropdown-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.ax-user-dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ax-text-strong);
}

.ax-user-dropdown-email {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: monospace;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.ax-user-dropdown-badge-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.ax-badge-role {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.ax-badge-tenant {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.ax-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.ax-dropdown-menu-list {
  padding: 0.35rem 0;
  display: flex;
  flex-direction: column;
}

.ax-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  color: #e2e8f0;
  text-decoration: none;
  font-family: var(--ax-font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.ax-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--ax-text-strong);
}

.ax-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.ax-dropdown-item-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.ax-dropdown-item-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ax-dropdown-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: inherit;
}

.ax-dropdown-item-subtitle {
  font-size: 0.72rem;
  color: var(--ax-text-muted);
}

.ax-dropdown-item-arrow {
  color: #64748b;
  font-size: 1rem;
}

.ax-dropdown-footer {
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.65rem;
  color: var(--ax-text-muted, #94a3b8);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.35;
}

/* Modals General */
.ax-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: axFadeIn 0.2s ease;
}

.ax-modal-overlay.active {
  display: flex;
}

.ax-app-switcher-card {
  width: 90%;
  max-width: 680px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #f8fafc;
  /* On a short window the dialog stays inside it and scrolls; centred and unlimited, its top was cut off */
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.ax-search-bar {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}

.ax-search-bar:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.ax-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* In the app switcher the grid takes the height that is left, so the title and search stay in view on a short window */
#axAppModal .ax-apps-grid {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: none;
}

/* While a dialog is open the page behind it does not scroll */
html.ax-scroll-locked,
html.ax-scroll-locked body {
  overflow: hidden !important;
}
html.ax-scroll-locked body {
  min-height: 100vh;
}
/* The page's own scrollbar goes away while locked; its width (measured by the header) is kept as padding so nothing shifts sideways */
html.ax-scroll-locked {
  padding-right: var(--ax-scrollbar-gap, 0px);
}
/* A menu with its own scrollbar never hands the end of its scrolling on to the page */
.ax-user-dropdown-popover,
.ax-notif-popover,
#axAppModal .ax-apps-grid {
  overscroll-behavior: contain;
}

.ax-app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: #f8fafc;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.ax-app-tile:hover {
  background: #334155;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ax-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.ax-app-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Tenant Selection List */
.ax-tenant-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.ax-tenant-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ax-tenant-option:hover {
  background: #334155;
  border-color: rgba(59, 130, 246, 0.4);
}

.ax-tenant-option.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

.ax-tenant-option-avatar {
  font-size: 1.4rem;
}

.ax-tenant-option-info {
  flex: 1;
}

.ax-tenant-option-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ax-text-strong);
}

.ax-tenant-option-id {
  font-size: 0.75rem;
  color: #94a3b8;
}

.ax-tenant-active-check {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Profile Modal Body */
#axProfileModal {
  animation: none;
}

.ax-profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1rem;
}

.ax-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.ax-profile-large-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  color: var(--ax-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
  flex-shrink: 0;
}

.ax-profile-details {
  min-width: 0;
  flex: 1;
}

.ax-profile-email {
  font-size: 1rem;
  color: #cbd5e1;
  font-family: monospace;
  overflow-wrap: anywhere;
}

#axProfileModal .ax-badge-role {
  font-size: 1rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: #1e3a8a;
  color: #f8fafc;
  border: 1px solid #3b82f6;
}

.ax-profile-section-title {
  margin: 0.25rem 0 0 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
}

.ax-profile-info-list,
.ax-profile-info-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ax-info-cell {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ax-info-label {
  font-size: 1rem;
  font-weight: 600;
  color: #cbd5e1;
}

.ax-info-val {
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.5;
}

.ax-access-summary {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.5;
}

.ax-access-app-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 500;
  color: #f8fafc;
}

.ax-access-app-item {
  font-size: 1rem;
  line-height: 1.5;
  color: #f8fafc;
}

.ax-api-key-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.85rem;
  border-radius: 8px;
}

/* Notifications Popover */
.ax-notif-popover {
  position: absolute;
  top: 52px;
  right: 1.25rem;
  width: 380px;
  max-width: calc(100vw - 2.5rem);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  z-index: 100002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: axFadeIn 0.2s ease;
  font-family: var(--ax-font);
  color: #f8fafc;
}

.ax-notif-popover.active {
  display: flex;
}

.ax-notif-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ax-notif-header-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ax-text-strong);
}

.ax-notif-mark-read {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: #3b82f6;
  cursor: pointer;
}

.ax-notif-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ax-notif-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.ax-notif-row:hover {
  background: #1e293b;
}

.ax-notif-row.unread {
  background: rgba(59, 130, 246, 0.08);
}

.ax-notif-icon-box {
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.ax-notif-content {
  flex: 1;
}

.ax-notif-row-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f8fafc;
}

.ax-notif-row-msg {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 2px 0 4px 0;
  line-height: 1.35;
}

.ax-notif-row-time {
  font-size: 0.68rem;
  color: #64748b;
}

.ax-notif-footer {
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ax-notif-footer-link {
  font-size: 0.78rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

/* Contextual Help Drawer */
.ax-help-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: none;
}

.ax-help-drawer-overlay.active {
  display: block;
}

.ax-help-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 100001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--ax-font);
  color: #f8fafc;
}

.ax-help-drawer.active {
  right: 0;
}

.ax-help-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ax-help-context-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #60a5fa;
  letter-spacing: 0.05em;
}

.ax-help-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ax-text-strong);
  margin-top: 2px;
}

.ax-help-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.ax-help-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ax-help-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ax-text-strong);
}

.ax-help-card-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
}

.ax-help-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ax-help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--ax-on-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ax-help-btn:hover {
  background: #475569;
  border-color: rgba(255, 255, 255, 0.2);
}

.ax-help-btn.primary {
  background: #1d4ed8;   /* white text on this is 6.7:1 (on the old lighter blue it was 3.7:1) */
  border-color: #1d4ed8;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.ax-help-btn.primary:hover {
  background: #1e40af;
}

.ax-escalation-box {
  margin-top: auto;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ax-escalation-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f87171;
}

.ax-escalation-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.ax-escalation-btn {
  padding: 0.55rem;
  border-radius: 8px;
  background: #ef4444;
  border: none;
  color: var(--ax-on-accent);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ax-escalation-btn:hover {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

@keyframes axFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Fix zoomed-in app switcher images */
.ax-app-icon-wrap {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.05) !important;
  flex-shrink: 0 !important;
}

.ax-app-icon-wrap img,
.ax-app-tile img,
.ax-app-icon {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block !important;
}


.ax-brand-logo-img {
  height: 32px;
  max-height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.4));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.ax-brand-link:hover .ax-brand-logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 14px rgba(56, 189, 248, 0.65));
}


/* ==========================================================================
   Universal Standardized Help, Tutorial, Ticket & Feedback Modal Styles
   ========================================================================== */

.ax-help-center-card {
  max-width: 820px !important;
  width: 95% !important;
  background: #0f172a !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8) !important;
}

.ax-help-modal-header {
  padding: 1.1rem 1.4rem;
  background: linear-gradient(180deg, #111e38, #0f172a);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ax-help-tabs-nav {
  display: flex;
  background: #0b1329;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 1rem;
  gap: 0.5rem;
  overflow-x: auto;
}

.ax-help-tab-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-family: var(--ax-font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ax-help-tab-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.03);
}

.ax-help-tab-link.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.ax-tab-icon {
  font-size: 1rem;
}

.ax-tab-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
}

.ax-help-modal-body {
  padding: 1.4rem;
  max-height: 65vh;
  overflow-y: auto;
  color: #e2e8f0;
  font-family: var(--ax-font);
}

.ax-help-tab-panel {
  display: none;
  flex-direction: column;
}

.ax-help-tab-panel.active {
  display: flex;
}

.ax-help-guide-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.ax-help-procedures-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ax-procedure-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.ax-proc-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0284c7;
  color: var(--ax-on-accent);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ax-proc-text strong {
  color: var(--ax-text-strong);
  font-size: 0.88rem;
  display: block;
  margin-bottom: 2px;
}

.ax-proc-text p {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.ax-tutorial-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ax-step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.ax-step-badge {
  padding: 3px 8px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.7rem;
  white-space: nowrap;
}

.ax-step-title {
  color: var(--ax-text-strong);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.ax-step-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Forms in Help Modal */
.ax-form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.ax-form-input, .ax-form-select, .ax-form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f8fafc;
  font-family: var(--ax-font);
  font-size: 0.82rem;
  box-sizing: border-box;
  outline: none;
}

.ax-form-input:focus, .ax-form-select:focus, .ax-form-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.ax-diagnostics-badge {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.ax-star-rating-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 1.8rem;
  cursor: pointer;
}

.ax-star {
  color: #475569;
  transition: color 0.15s ease, transform 0.15s ease;
}

.ax-star.selected {
  color: #facc15;
}

.ax-star:hover {
  transform: scale(1.15);
}

.ax-recent-tickets-list, .ax-recent-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ax-recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.75rem;
}


/* ==========================================================================
   Universal AveLynx Document & Workspace Copilot Side Chat Drawer
   ========================================================================== */
.ax-copilot-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: none;
}
.ax-copilot-drawer-overlay.active {
  display: block;
}
.ax-copilot-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 440px;
  max-width: 95vw;
  /* the "working inside an organization" bar at the bottom reserves its own height (--act-as-bar) so it never covers the question box */
  height: calc(100% - var(--act-as-bar, 0px));
  background: #090d16;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.7);
  z-index: 100001;
  display: none;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--ax-font, 'Inter', sans-serif);
  color: #f8fafc;
}
.ax-copilot-drawer.active {
  display: flex;
  right: 0;
}
.ax-copilot-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
}
.ax-copilot-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ax-copilot-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ax-text-strong);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ax-copilot-app-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ax-copilot-doc-bar {
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
}
.ax-copilot-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ax-copilot-doc-chip.active {
  color: #38bdf8;
  font-weight: 600;
}
.ax-copilot-doc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ax-copilot-btn-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ax-copilot-btn-mini:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: #38bdf8;
  color: var(--ax-text-strong);
}
.ax-copilot-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ax-copilot-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  min-width: 0;
  overflow-wrap: anywhere;
  animation: axFadeIn 0.2s ease-out;
}
.ax-copilot-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: var(--ax-on-accent);
  padding: 0.75rem 1rem;
  border-radius: 14px 14px 2px 14px;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.ax-copilot-msg.assistant {
  align-self: flex-start;
  background: #151d2f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px 14px 14px 2px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #f1f5f9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.ax-copilot-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  color: #64748b;
  font-family: var(--ax-font-mono, monospace);
}
.ax-copilot-citation-pill {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.78rem;
  color: #cbd5e1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.ax-copilot-citations-list {
  list-style: none;
  margin: 0.6rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ax-copilot-citation-item {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.78rem;
  color: #cbd5e1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.ax-citation-doc {
  font-weight: 700;
  color: #38bdf8;
}
.ax-citation-page {
  color: #94a3b8;
  font-size: 0.72rem;
  margin-left: 0.25rem;
}
/* A long file name wraps inside the card; the relevance label drops to its own line when there is no room. */
.ax-copilot-citation-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.ax-copilot-citation-header > span:first-child {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ax-copilot-citation-header > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ax-copilot-citation-quote {
  font-style: italic;
  line-height: 1.45;
  border-left: 2px solid #38bdf8;
  padding-left: 6px;
  margin: 0.3rem 0;
  overflow-wrap: anywhere;
}
.ax-copilot-long-answer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ax-copilot-answer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ax-copilot-answer-scroll {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ax-copilot-loading {
  font-style: italic;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ax-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.ax-copilot-chips-row {
  padding: 0.5rem 1.15rem;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.ax-copilot-chip {
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.72rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ax-copilot-chip:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: #38bdf8;
  color: var(--ax-text-strong);
}
.ax-copilot-input-bar {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
}
.ax-copilot-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--ax-text-strong);
  outline: none;
}
.ax-copilot-input:focus {
  border-color: #38bdf8;
}
.ax-copilot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #06b6d4, #4f46e5);
  border: none;
  color: var(--ax-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ax-copilot-send-btn:hover {
  transform: scale(1.05);
}
.ax-floating-copilot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  color: var(--ax-on-accent);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.ax-floating-copilot-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.5);
}

/* Copilot Provider Mode (copilot="provider") */
@media (max-width: 480px) {
  .ax-header-provider-mode.axios-universal-header { padding: 0 0.5rem; }
  .ax-header-provider-mode .ax-header-left { gap: 0.4rem; }
  .ax-header-provider-mode .ax-workspace-pill { padding: 0.25rem 0.5rem; gap: 0.25rem; }
  .ax-header-provider-mode .ax-header-left .ax-divider-v,
  .ax-header-provider-mode .ax-header-right .ax-divider-v,
  .ax-header-provider-mode .ax-user-menu-label,
  .ax-header-provider-mode .ax-user-menu-btn svg,
  .ax-header-provider-mode .ax-header-right a.ax-help-btn.primary { display: none !important; }
  .ax-header-provider-mode .ax-user-menu-btn { padding: 0.2rem; }
}
@media (max-width: 380px) {
  .ax-header-provider-mode .ax-header-right .ax-icon-btn { width: 28px; height: 32px; }
  .ax-header-provider-mode .ax-header-right #axPlansBtn { padding: 0 0.4rem !important; font-size: 0.74rem !important; }
  .ax-header-provider-mode .ax-header-right .ax-copilot-pill { padding-left: 0.35rem; padding-right: 0.35rem; }
}
.ax-copilot-drawer.ax-copilot-provider-mode {
  right: -600px;
  width: 560px;
  max-width: 100vw;
  font-size: 1rem;
}
.ax-copilot-drawer.ax-copilot-provider-mode:not(.active) {
  display: none;
}
.ax-copilot-drawer.ax-copilot-provider-mode.active {
  right: 0;
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-header-title {
  font-size: 1.15rem;
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-app-tag {
  font-size: 1rem;
  color: #f8fafc;
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.22);
}
.ax-copilot-drawer.ax-copilot-provider-mode #axCloseCopilotBtn {
  min-width: 44px;
  min-height: 44px;
  width: auto;
  height: 44px;
  padding: 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #1e293b;
  transition: none;
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-msg,
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-msg.user,
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-msg.assistant {
  font-size: 1rem;
  line-height: 1.5;
  max-width: 100%;
  animation: none;
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-msg.user {
  background: #1d4ed8;
  color: var(--ax-on-accent);
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-loading {
  font-size: 1rem;
  color: #f8fafc;
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-input {
  font-size: 1rem;
  min-height: 44px;
  color: #f8fafc;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-send-btn {
  min-width: 64px;
  min-height: 44px;
  width: auto;
  height: 44px;
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: #1d4ed8;
  color: var(--ax-on-accent);
}
.ax-copilot-provider-opening {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
}
.ax-copilot-provider-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.ax-copilot-provider-example-btn,
.ax-copilot-provider-show-all {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #1e293b;
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
}
.ax-copilot-provider-show-all {
  margin-top: 0.65rem;
}
.ax-copilot-provider-example-btn:hover,
.ax-copilot-provider-show-all:hover {
  background: #334155;
}
.ax-copilot-provider-example-btn:focus-visible,
.ax-copilot-provider-show-all:focus-visible,
.ax-copilot-provider-summary:focus-visible,
.ax-copilot-provider-table-wrap:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
.ax-copilot-provider-answer {
  margin: 0 0 0.65rem 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: inherit;
}
.ax-copilot-provider-timing {
  margin: 0 0 0.65rem 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
}
.ax-copilot-provider-details {
  margin: 0.5rem 0;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0f172a;
  font-size: 1rem;
}
.ax-copilot-provider-summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
}
.ax-copilot-provider-plan {
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
}
.ax-copilot-provider-table-wrap {
  margin-top: 0.65rem;
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #0f172a;
}
.ax-copilot-provider-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.ax-copilot-provider-table th,
.ax-copilot-provider-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  font-size: 1rem;
  color: #f8fafc;
  white-space: nowrap;
}
.ax-copilot-provider-table th {
  font-weight: 700;
  background: #1e293b;
}
.ax-copilot-provider-table th.num,
.ax-copilot-provider-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-app-tag,
[data-theme="light"] .ax-copilot-drawer.ax-copilot-provider-mode #axCloseCopilotBtn,
[data-theme="light"] .ax-copilot-provider-example-btn,
[data-theme="light"] .ax-copilot-provider-show-all {
  background: var(--ax-l-field) !important;
  color: var(--ax-l-accent) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-copilot-provider-example-btn:hover,
[data-theme="light"] .ax-copilot-provider-show-all:hover,
[data-theme="light"] .ax-copilot-drawer.ax-copilot-provider-mode #axCloseCopilotBtn:hover {
  background: var(--ax-l-hover) !important;
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-copilot-provider-details,
[data-theme="light"] .ax-copilot-provider-table-wrap,
[data-theme="light"] .ax-copilot-provider-table td {
  background: var(--ax-l-card) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-copilot-provider-table th {
  background: var(--ax-l-sunk) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-copilot-drawer.ax-copilot-provider-mode .ax-copilot-loading {
  color: var(--ax-l-text) !important;
}

/* Pending in-memory authentication check: hide pill and account placeholder to prevent flash of demo org */
.ax-pill-pending {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ax-auth-pending-placeholder {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Universal Legal Footer Landmark (Bottom of Page, Normal Document Flow)
   ========================================================================== */
.ax-legal-footer {
  position: static;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--ax-header-border, rgba(255, 255, 255, 0.08));
  background: transparent;
  font-family: var(--ax-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ax-text-muted, #94a3b8);
}

.ax-legal-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
}

.ax-legal-footer-brand {
  color: var(--ax-text-muted, #94a3b8);
  font-size: 0.82rem;
}

.ax-legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.15rem;
}

.ax-legal-footer-link {
  color: var(--ax-text-muted, #94a3b8);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.84rem;
  padding: 0.15rem 0.1rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.ax-legal-footer-link:hover {
  color: var(--ax-text-main, #f8fafc);
}

.ax-legal-footer-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
  color: var(--ax-text-main, #f8fafc);
}

[data-theme="light"] .ax-legal-footer {
  border-top-color: var(--ax-l-line);
  color: var(--ax-l-muted);
}

[data-theme="light"] .ax-legal-footer-brand,
[data-theme="light"] .ax-legal-footer-link {
  color: var(--ax-l-muted);
}

[data-theme="light"] .ax-legal-footer-link:hover,
[data-theme="light"] .ax-legal-footer-link:focus-visible {
  color: var(--ax-l-text);
}

[data-theme="light"] .ax-legal-footer-link:focus-visible {
  outline-color: var(--ax-l-accent);
}

@media (max-width: 600px) {
  .ax-legal-footer {
    padding: 0.9rem 0.85rem;
  }
  .ax-legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* Moving between AveLynx apps: a quick fade-and-settle out and in. Timings live in the script (EXIT_MS, ENTER_MS).
   Transform and opacity only, so nothing shifts. The entrance ends with no transform left, so fixed items stay put. */
@keyframes ax-app-enter { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
html[data-ax-enter] body { animation: ax-app-enter var(--ax-enter-ms, 200ms) ease-out backwards; }
html[data-ax-exit] body {
  opacity: 0;
  transform: scale(0.985);
  transform-origin: var(--ax-ox, 50%) var(--ax-oy, 50%);
  transition: opacity var(--ax-exit-ms, 140ms) ease-in, transform var(--ax-exit-ms, 140ms) ease-in;
}
@media (prefers-reduced-motion: reduce) {
  html[data-ax-enter] body { animation: none; }
  html[data-ax-exit] body { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Theme, Switcher, Copilot Provider & Strict CSP Sign-Out Styles
   (Moved from ensureThemeAndSwitcherStyles and axCopilotProviderStyles so
   pages with <axios-platform-header strict-csp> need no inline <style> tags)
   ========================================================================== */

.ax-help-drawer:not(.active) {
  display: none;
}

html[data-theme="dark"],
body[data-theme="dark"] {
  background-color: #0f172a;
  color: #f8fafc;
}

/* --- Light Theme (warm and dimmed; the colours are the --ax-l-* tokens at the top of avelynx-shell-header.css) --- */
html[data-theme="light"],
body[data-theme="light"] {
  background-color: var(--ax-l-page) !important;
  color: var(--ax-l-text) !important;
}

/* Keyboard focus ring: dark enough to see on the warm background */
[data-theme="light"] axios-platform-header *:focus-visible {
  outline-color: var(--ax-l-accent) !important;
}

/* Containers: one warm card colour, no dark cards on the light page */
[data-theme="light"] .ax-app-switcher-card,
[data-theme="light"] .ax-user-dropdown-popover,
[data-theme="light"] .ax-notif-popover,
[data-theme="light"] .ax-help-drawer,
[data-theme="light"] .ax-copilot-drawer,
[data-theme="light"] .ax-profile-card,
[data-theme="light"] .ax-help-card,
[data-theme="light"] .ax-procedure-card,
[data-theme="light"] .ax-help-center-card {
  background: var(--ax-l-card) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
  box-shadow: 0 16px 36px -8px var(--ax-l-shadow) !important;
}
[data-theme="light"] .ax-help-modal-header,
[data-theme="light"] .ax-help-header,
[data-theme="light"] .ax-help-tabs-nav,
[data-theme="light"] .ax-user-dropdown-header,
[data-theme="light"] .ax-notif-header,
[data-theme="light"] .ax-copilot-header,
[data-theme="light"] .ax-dropdown-footer {
  background: var(--ax-l-sunk) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-modal-overlay,
[data-theme="light"] .ax-help-drawer-overlay,
[data-theme="light"] .ax-copilot-drawer-overlay {
  background: var(--ax-l-scrim) !important;
}

/* Pills, tags, badges and dividers in the strip */
[data-theme="light"] .ax-workspace-pill,
[data-theme="light"] .ax-user-menu-btn {
  background: var(--ax-l-field) !important;
  border-color: var(--ax-l-line) !important;
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-workspace-pill:hover,
[data-theme="light"] .ax-user-menu-btn:hover {
  background: var(--ax-l-hover) !important;
}
[data-theme="light"] .ax-divider-v,
[data-theme="light"] .ax-dropdown-divider {
  background: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-brand-tag,
[data-theme="light"] .ax-badge-role,
[data-theme="light"] .ax-badge-tenant,
[data-theme="light"] .ax-tab-badge,
[data-theme="light"] .ax-tenant-active-check,
[data-theme="light"] .ax-switcher-home-link,
[data-theme="light"] .ax-help-guide-banner,
[data-theme="light"] .ax-diagnostics-badge,
[data-theme="light"] .ax-step-badge {
  background: var(--ax-l-accent-soft) !important;
  color: var(--ax-l-accent) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-status-indicator.online {
  background: var(--ax-l-ok) !important;
}

/* Text */
[data-theme="light"] .ax-brand-tagline,
[data-theme="light"] .ax-icon-btn,
[data-theme="light"] .ax-dropdown-item-subtitle,
[data-theme="light"] .ax-dropdown-item-arrow,
[data-theme="light"] .ax-user-dropdown-email,
[data-theme="light"] .ax-profile-email,
[data-theme="light"] .ax-notif-row-msg,
[data-theme="light"] .ax-help-context-tag,
[data-theme="light"] .ax-help-card-desc,
[data-theme="light"] .ax-help-tab-link,
[data-theme="light"] .ax-profile-section-title,
[data-theme="light"] .ax-info-label,
[data-theme="light"] .ax-tenant-option-id,
[data-theme="light"] .ax-step-desc,
[data-theme="light"] .ax-escalation-desc,
[data-theme="light"] .ax-proc-text,
[data-theme="light"] .ax-help-guide-banner p,
[data-theme="light"] .ax-dropdown-footer {
  color: var(--ax-l-muted) !important;
}
[data-theme="light"] .ax-app-switcher-card h3,
[data-theme="light"] .ax-app-switcher-card h4,
[data-theme="light"] .ax-user-dropdown-name,
[data-theme="light"] .ax-notif-header-title,
[data-theme="light"] .ax-notif-row-title,
[data-theme="light"] .ax-help-title,
[data-theme="light"] .ax-help-card-title,
[data-theme="light"] .ax-step-title,
[data-theme="light"] .ax-info-val,
[data-theme="light"] .ax-access-summary,
[data-theme="light"] .ax-access-app-list,
[data-theme="light"] .ax-access-app-item,
[data-theme="light"] .ax-tenant-option-name,
[data-theme="light"] .ax-app-tile-name,
[data-theme="light"] .ax-dropdown-item-title,
[data-theme="light"] .ax-proc-text strong,
[data-theme="light"] .ax-form-label {
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-help-tab-link.active,
[data-theme="light"] .ax-tab-icon,
[data-theme="light"] .ax-notif-mark-read,
[data-theme="light"] #axTzChange,
[data-theme="light"] #axPhoneToggle,
[data-theme="light"] #axPlansBtn,
[data-theme="light"] #axHelpBtn {
  color: var(--ax-l-accent) !important;
}
[data-theme="light"] .ax-help-tab-link.active {
  background: var(--ax-l-hover) !important;
  border-color: var(--ax-l-accent) !important;
}
[data-theme="light"] .ax-star.selected {
  color: var(--ax-l-star) !important;
}
[data-theme="light"] .ax-escalation-title {
  color: var(--ax-l-danger) !important;
}
[data-theme="light"] .ax-icon-btn:hover {
  background: var(--ax-l-hover) !important;
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-help-modal-body,
[data-theme="light"] .ax-proc-text p,
[data-theme="light"] .ax-proc-text code,
[data-theme="light"] .ax-help-modal-body code,
[data-theme="light"] .ax-copilot-msg-meta {
  color: var(--ax-l-muted) !important;
}
[data-theme="light"] .ax-help-modal-body {
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-copilot-app-tag {
  background: var(--ax-l-accent-soft) !important;
  border-color: var(--ax-l-line) !important;
  color: var(--ax-l-accent) !important;
}
[data-theme="light"] .ax-copilot-input-bar {
  background: var(--ax-l-sunk) !important;
  border-top-color: var(--ax-l-line) !important;
}

/* Fields */
[data-theme="light"] .ax-search-bar,
[data-theme="light"] .ax-form-input,
[data-theme="light"] .ax-form-select,
[data-theme="light"] .ax-form-textarea,
[data-theme="light"] .ax-copilot-input,
[data-theme="light"] #axTzSearch {
  background: var(--ax-l-field) !important;
  color: var(--ax-l-text) !important;
  border: 1px solid var(--ax-l-line) !important;
}
[data-theme="light"] .ax-search-bar::placeholder,
[data-theme="light"] .ax-form-input::placeholder,
[data-theme="light"] .ax-form-textarea::placeholder,
[data-theme="light"] .ax-copilot-input::placeholder {
  color: var(--ax-l-muted) !important;
}

/* Tiles and rows */
[data-theme="light"] .ax-app-tile,
[data-theme="light"] .ax-tenant-option,
[data-theme="light"] .ax-info-cell,
[data-theme="light"] .ax-notif-row,
[data-theme="light"] .ax-recent-ticket-item,
[data-theme="light"] .ax-recent-feedback-item,
[data-theme="light"] .ax-step-item,
[data-theme="light"] .ax-copilot-msg.assistant {
  background: var(--ax-l-field) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-app-icon-wrap {
  background: var(--ax-l-card) !important;
}
[data-theme="light"] .ax-app-tile:hover,
[data-theme="light"] .ax-tenant-option:hover,
[data-theme="light"] .ax-tenant-option.active,
[data-theme="light"] .ax-notif-row:hover {
  background: var(--ax-l-hover) !important;
  border-color: var(--ax-l-accent) !important;
}
[data-theme="light"] .ax-dropdown-item {
  color: var(--ax-l-text) !important;
}
[data-theme="light"] .ax-dropdown-item:hover {
  background: var(--ax-l-hover) !important;
}
[data-theme="light"] .ax-dropdown-footer {
  border-top-color: var(--ax-l-line) !important;
}

/* Coloured buttons and avatars: solid colour, off-white text */
[data-theme="light"] .ax-brand-logo,
[data-theme="light"] .ax-user-avatar-badge,
[data-theme="light"] .ax-user-dropdown-avatar,
[data-theme="light"] .ax-profile-large-avatar,
[data-theme="light"] .ax-proc-num,
[data-theme="light"] .ax-help-btn.primary,
[data-theme="light"] .ax-copilot-msg.user,
[data-theme="light"] .ax-copilot-send-btn,
[data-theme="light"] .ax-floating-copilot-btn,
[data-theme="light"] #axTzSave {
  background: var(--ax-l-accent) !important;
  border-color: var(--ax-l-accent) !important;
  color: var(--ax-on-accent) !important;
}
[data-theme="light"] .ax-help-btn.primary:hover,
[data-theme="light"] .ax-copilot-send-btn:hover,
[data-theme="light"] .ax-floating-copilot-btn:hover {
  background: var(--ax-l-accent-hover) !important;
}
[data-theme="light"] .ax-help-btn:not(.primary) {
  background: var(--ax-l-secondary) !important;
  border-color: var(--ax-l-secondary) !important;
  color: var(--ax-on-accent) !important;
}
[data-theme="light"] .ax-help-btn:not(.primary):hover {
  background: var(--ax-l-secondary-hover) !important;
}
[data-theme="light"] .ax-escalation-box {
  background: var(--ax-l-danger-soft) !important;
  border-color: var(--ax-l-danger) !important;
}
[data-theme="light"] .ax-escalation-btn {
  background: var(--ax-l-danger) !important;
  color: var(--ax-on-accent) !important;
}
[data-theme="light"] .ax-copilot-pill,
[data-theme="light"] .ax-copilot-chip,
[data-theme="light"] .ax-copilot-btn-mini,
[data-theme="light"] .ax-copilot-drawer.ax-copilot-provider-mode #axCloseCopilotBtn,
[data-theme="light"] .ax-copilot-provider-example-btn,
[data-theme="light"] .ax-copilot-provider-show-all {
  background: var(--ax-l-field) !important;
  color: var(--ax-l-accent) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-copilot-provider-details,
[data-theme="light"] .ax-copilot-provider-table-wrap,
[data-theme="light"] .ax-copilot-provider-table td {
  background: var(--ax-l-card) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}
[data-theme="light"] .ax-copilot-provider-table th {
  background: var(--ax-l-sunk) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}

/* --- App Switcher Card Header & Portal Home Link --- */
.ax-switcher-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ax-switcher-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.35);
  border-radius: 8px;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.ax-switcher-home-link:hover {
  background: #0284c7;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

/* --- Frequently Used Section --- */
.ax-frequent-section {
  margin-bottom: 0.25rem;
}
.ax-frequent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ax-text-muted, #94a3b8);
}
.ax-frequent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 0.5rem;
}
.ax-frequent-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.55rem 0.35rem;
  border-radius: 10px;
  background: var(--ax-surface, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--ax-text-main, #f8fafc);
  transition: all 0.2s ease;
  gap: 0.35rem;
}
[data-theme="light"] .ax-frequent-tile {
  background: var(--ax-l-field);
  border-color: var(--ax-l-line);
  color: var(--ax-l-text);
}
.ax-frequent-tile:hover {
  background: var(--ax-surface-hover, #334155);
  border-color: rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
}
[data-theme="light"] .ax-frequent-tile:hover {
  background: var(--ax-l-hover);
}

.ax-frequent-tile-name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* --- Pin / Unpin Button --- */
.ax-tile-pin-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
  padding: 0;
  color: var(--ax-text-strong, #fff);
  z-index: 2;
}
[data-theme="light"] .ax-tile-pin-btn {
  background: var(--ax-l-hover);
  color: var(--ax-l-text);
}
.ax-app-tile:hover .ax-tile-pin-btn,
.ax-frequent-tile:hover .ax-tile-pin-btn,
.ax-tile-pin-btn.pinned {
  opacity: 1;
}
.ax-tile-pin-btn.pinned {
  color: #38bdf8;
  background: rgba(2, 132, 199, 0.25);
}
.ax-tile-pin-btn:hover {
  transform: scale(1.15);
}

.ax-app-tile {
  position: relative;
}

/* Support switcher-only mode on custom element */
axios-platform-header[switcher-only] .axios-universal-header,
axios-platform-header[data-switcher-only] .axios-universal-header,
axios-platform-header[switcher-only] #axLegacySupportModal,
axios-platform-header[data-switcher-only] #axLegacySupportModal,
axios-platform-header[switcher-only] #axSignOutModal,
axios-platform-header[data-switcher-only] #axSignOutModal,
axios-platform-header[switcher-only] #axOrgModal,
axios-platform-header[data-switcher-only] #axOrgModal,
axios-platform-header[switcher-only] #axProfileModal,
axios-platform-header[data-switcher-only] #axProfileModal,
axios-platform-header[switcher-only] #axHelpDrawer,
axios-platform-header[data-switcher-only] #axHelpDrawer,
axios-platform-header[switcher-only] #axHelpOverlay,
axios-platform-header[data-switcher-only] #axHelpOverlay {
  display: none !important;
}

/* Accessible Profile & Entitlements Modal defaults */
#axProfileModal {
  animation: none;
}
#axProfileModal .ax-profile-modal-body {
  font-size: 1rem;
}
#axProfileModal .ax-profile-email {
  font-size: 1rem;
  color: var(--ax-text-muted, #cbd5e1);
  font-family: monospace;
  word-break: break-word;
}
#axProfileModal .ax-badge-role {
  font-size: 1rem;
  padding: 0.25rem 0.65rem;
  background: #1e3a8a;
  color: #f8fafc;
  border: 1px solid #3b82f6;
}
#axProfileModal .ax-profile-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ax-text-muted, #cbd5e1);
  letter-spacing: 0.02em;
}
#axProfileModal .ax-profile-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
}
#axProfileModal .ax-info-cell {
  font-size: 1rem;
}
#axProfileModal .ax-info-label {
  font-size: 1rem;
  color: var(--ax-text-muted, #cbd5e1);
  font-weight: 600;
}
#axProfileModal .ax-info-val {
  font-size: 1rem;
  color: var(--ax-text-main, #f8fafc);
  font-weight: 600;
}
#axProfileModal .ax-access-summary {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ax-text-main, #f8fafc);
}
#axProfileModal .ax-access-app-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ax-text-main, #f8fafc);
}
#axProfileModal .ax-access-app-item {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ax-text-main, #f8fafc);
}

/* Additional Copilot Provider Builder rules */
.ax-copilot-provider-query { margin: 0 0 0.65rem 0; font-size: 1rem; line-height: 1.5; color: inherit; }
.ax-copilot-provider-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.65rem; }
.ax-copilot-provider-table-title { margin: 0.9rem 0 0 0; font-size: 1rem; font-weight: 700; color: inherit; }
.ax-copilot-provider-builder { margin: 0.75rem 0; padding: 0.75rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px; background: #0f172a; font-size: 1rem; }
.ax-copilot-provider-builder legend { font-size: 1.05rem; font-weight: 700; padding: 0 0.25rem; }
.ax-copilot-provider-builder .qb-field { margin: 0 0 0.85rem 0; }
.ax-copilot-provider-builder label { display: block; font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem 0; }
.ax-copilot-provider-builder select, .ax-copilot-provider-builder input { font-family: inherit; font-size: 1rem; min-height: 44px; width: 100%; box-sizing: border-box; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.35); background: #1e293b; color: #f8fafc; }
.ax-copilot-provider-builder select:focus-visible, .ax-copilot-provider-builder input:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.ax-copilot-provider-builder .qb-hint { margin: 0.25rem 0 0 0; font-size: 1rem; line-height: 1.4; opacity: 0.9; }
.ax-copilot-provider-builder .qb-error { margin: 0 0 0.75rem 0; font-size: 1rem; font-weight: 600; padding: 0.5rem 0.65rem; border-radius: 8px; border: 2px solid #fca5a5; }
.ax-copilot-provider-builder .qb-summary { margin: 0 0 0.85rem 0; font-size: 1rem; font-weight: 600; line-height: 1.5; }
.ax-copilot-provider-builder .qb-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ax-copilot-provider-builder [hidden] { display: none !important; }
[data-theme="light"] .ax-copilot-provider-builder { background: var(--ax-l-card) !important; color: var(--ax-l-text) !important; border-color: var(--ax-l-line) !important; }
[data-theme="light"] .ax-copilot-provider-builder select, [data-theme="light"] .ax-copilot-provider-builder input { background: var(--ax-l-field) !important; color: var(--ax-l-text) !important; border-color: var(--ax-l-line) !important; }

/* App-managed sign-out (signout-endpoint) access notice & persistent error alert */
.ax-dropdown-access-note {
  padding: 0.65rem 0.75rem;
  margin: 0.15rem 0;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ax-text-main, #f8fafc);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .ax-dropdown-access-note {
  background: var(--ax-l-field) !important;
  color: var(--ax-l-text) !important;
  border-color: var(--ax-l-line) !important;
}

.ax-signout-alert {
  margin: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 2px solid #f87171;
  background: #450a0a;
  color: #fef2f2;
  font-family: var(--ax-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.ax-signout-alert[hidden] {
  display: none !important;
}
[data-theme="light"] .ax-signout-alert {
  background: var(--ax-l-danger-soft) !important;
  border-color: var(--ax-l-danger) !important;
  color: var(--ax-l-danger) !important;
}
