/**
 * Zino brand theme — matched to design/ui-mockups/application
 * Palette: navy chrome + matte gold accent + soft off-white surface
 * (NOT bright Material blue)
 */
:root {
  --zino-navy: #0f172a;
  --zino-navy-2: #1a1c2e;
  --zino-navy-3: #1e293b;
  --zino-gold: #d4af37;
  --zino-gold-soft: #e5c76b;
  --zino-gold-muted: rgb(212 175 55 / 16%);
  --zino-bg: #f5f6f8;
  --zino-card: #ffffff;
  --zino-fg: #111827;
  --zino-muted: #6b7280;
  --zino-border: #e8e6e1;
  --zino-radius: 1rem;
  --zino-shadow: 0 8px 28px -18px rgb(15 23 42 / 28%);

  --ui-bg: var(--zino-bg) !important;
  --ui-card: var(--zino-card) !important;
  --ui-fg: var(--zino-fg) !important;
  --ui-muted: var(--zino-muted) !important;
  --ui-border: var(--zino-border) !important;
  --ui-primary: var(--zino-gold) !important;
  --ui-primary-fg: #ffffff !important;
  --ui-accent: #fbf7ec !important;
  --ui-blue: var(--zino-navy-3) !important;
  --ui-blue-600: var(--zino-navy-3) !important;
  --ui-blue-700: var(--zino-navy-2) !important;
  --ui-blue-800: var(--zino-navy) !important;
  --ui-chrome-solid: var(--zino-navy-2) !important;
  --ui-ring: var(--zino-gold) !important;
}

/* Kill ANY SmartNav chrome that can leak over the org button */
.ui-shell .snm-container,
.ui-shell .snm-more-btn,
.ui-shell .snm-customise-btn,
.ui-shell .snm-item,
.ui-shell .snm-dropdown,
.ui-shell .snm-dropdown-card,
.ui-shell .snm-dropdown-card-wrap,
.ui-shell .next-catalog-menu-items,
body .ember-basic-dropdown-content.snm-dropdown,
body .snm-dropdown-header,
body .snm-dropdown-footer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* ---- Chrome: navy like app hero card ---- */
.ui-top-header.next-view-header,
.ui-shell .next-view-header,
.next-view-header {
  background:
    radial-gradient(circle at 85% 120%, rgb(212 175 55 / 22%), transparent 42%),
    linear-gradient(180deg, #121526 0%, #1a1c2e 55%, #1e293b 100%) !important;
  background-color: var(--zino-navy-2) !important;
  color: #f8fafc !important;
  border-bottom: 0 !important;
  box-shadow: 0 1px 0 rgb(212 175 55 / 18%) !important;
}

.ui-shell .next-view-header a:not(.next-dd-item):not(.next-dd-menu *),
.ui-shell .next-view-header > * a,
.ui-shell .next-view-header .navbar-logo,
.ui-shell .next-view-header .next-org-button-trigger,
.ui-shell .next-view-header .next-user-button-trigger,
.ui-shell .next-view-header .next-org-button-trigger span,
.ui-shell .next-view-header .next-user-button-trigger span,
.ui-shell .next-view-header .next-org-button-trigger svg,
.ui-shell .next-view-header button:not(.next-dd-item),
.ui-shell .next-view-header .locale-selector-tray svg,
.next-view-header .navbar-logo,
.next-view-header .next-org-button-trigger,
.next-view-header .next-user-button-trigger {
  color: #f8fafc !important;
  fill: currentColor !important;
}

/* Header dropdown menus — high contrast (never inherit chrome white text) */
.next-view-header .next-dd-menu,
.next-view-header .next-header-menu-item-dd-content .next-dd-menu,
.ember-basic-dropdown-content .next-dd-menu,
.next-dd-menu {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e8e6e1 !important;
  border-radius: 1rem !important;
  box-shadow: 0 18px 40px rgb(15 23 42 / 18%) !important;
  color: #111827 !important;
  overflow: hidden !important;
  min-height: auto !important;
  height: auto !important;
  width: 280px !important;
  padding: 0.4rem 0 !important;
  z-index: 1400 !important;
}

.next-dd-menu *:not(.status-badge):not(.status-badge *):not(.status-badge-inner-wrap):not(.org-badge),
.next-view-header .next-dd-menu a,
.next-view-header .next-dd-menu button,
.next-view-header .next-dd-menu .next-dd-item,
.next-view-header .next-dd-menu .next-dd-item span,
.next-view-header .next-dd-menu .next-dd-item svg,
.ember-basic-dropdown-content .next-dd-menu a,
.ember-basic-dropdown-content .next-dd-menu button,
.ember-basic-dropdown-content .next-dd-menu .next-dd-item,
.ember-basic-dropdown-content .next-dd-menu .next-dd-item span,
.ember-basic-dropdown-content .next-dd-menu .next-dd-item svg {
  color: #111827 !important;
  fill: currentColor !important;
}

.next-dd-menu .next-dd-title,
.next-dd-menu .next-dd-session-user-wrapper {
  color: #111827 !important;
}

.next-dd-menu .next-dd-session-user-wrapper > .inline-flex > div:first-child,
.next-dd-menu .next-dd-session-user-wrapper .font-semibold {
  color: #111827 !important;
}

.next-dd-menu .next-dd-session-user-wrapper .text-gray-400,
.next-dd-menu .next-dd-session-user-wrapper .text-gray-500,
.next-dd-menu .next-dd-session-user-wrapper .dark\:text-gray-400,
.next-dd-menu .text-gray-400,
.next-dd-menu .text-gray-500,
.next-dd-menu .dark\:text-gray-300,
.next-dd-menu .dark\:text-gray-400 {
  color: #6b7280 !important;
}

.next-dd-menu .next-dd-item,
.next-dd-menu a.next-dd-item,
.next-dd-menu button.next-dd-item {
  color: #111827 !important;
  background: transparent !important;
  border-radius: 0.65rem !important;
  margin: 0.15rem 0.4rem !important;
  padding: 0.45rem 0.65rem !important;
}

.next-dd-menu .next-dd-item svg,
.next-dd-menu .next-dd-item .fa,
.next-dd-menu .next-dd-item .svg-inline--fa {
  color: #1a1c2e !important;
  fill: currentColor !important;
  opacity: 1 !important;
}

.next-dd-menu .next-dd-item:hover,
.next-dd-menu .next-dd-item.ember-basic-dropdown-trigger:hover {
  background: #fbf7ec !important;
  color: #1a1c2e !important;
}

.next-dd-menu .next-dd-item.active,
.next-dd-menu .next-dd-item.active:hover {
  background: #1a1c2e !important;
  color: #fde68a !important;
}

.next-dd-menu .next-dd-item.active *,
.next-dd-menu .next-dd-item.active svg {
  color: #fde68a !important;
  fill: currentColor !important;
}

/* Role / status badge — gold on navy */
.next-dd-menu .status-badge,
.next-dd-menu .status-badge > span,
.next-dd-menu .status-badge .status-badge-inner-wrap,
.next-dd-menu .status-badge span,
.next-dd-menu .badge,
.next-dd-menu [class*='badge'],
.next-dd-menu .bg-blue-500,
.next-dd-menu .bg-blue-600,
.next-dd-menu .bg-indigo-500,
.next-dd-menu .next-dd-session-user-wrapper .status-badge,
.next-dd-menu .next-dd-session-user-wrapper .status-badge span {
  background: #1a1c2e !important;
  background-color: #1a1c2e !important;
  color: #fde68a !important;
  border-color: rgb(212 175 55 / 45%) !important;
}

.next-dd-menu .status-badge > span,
.next-dd-menu .status-badge span,
.next-dd-menu .status-badge svg {
  color: #fde68a !important;
  fill: currentColor !important;
}

.next-dd-menu .next-dd-separator,
.next-dd-menu .next-dd-seperator,
.next-dd-menu hr {
  border-color: #e8e6e1 !important;
  background: #e8e6e1 !important;
  opacity: 1 !important;
}

/* Org switcher — only the company pill (has .org-badge), not locale/tray triggers */
.next-view-header .next-org-button-trigger:has(.org-badge) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: rgb(255 255 255 / 8%) !important;
  border: 1px solid rgb(212 175 55 / 35%) !important;
  border-radius: 999px !important;
  padding: 0.2rem 0.7rem 0.2rem 0.35rem !important;
  color: #f8fafc !important;
  max-width: none !important;
  width: auto !important;
  min-width: 8.5rem !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.next-view-header .next-org-button-trigger:has(.org-badge) .org-badge {
  background: #d4af37 !important;
  color: #1a1c2e !important;
  flex-shrink: 0 !important;
  width: 1.35rem !important;
  height: 1.35rem !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 0.7rem !important;
}

.next-view-header .next-org-button-trigger:has(.org-badge) .text-sm,
.next-view-header .next-org-button-trigger:has(.org-badge) .w-10,
.next-view-header .next-org-button-trigger:has(.org-badge) .md\:w-14,
.next-view-header .next-org-button-trigger:has(.org-badge) .lg\:w-10\/12,
.next-view-header .next-org-button-trigger:has(.org-badge) .truncate,
.next-view-header .next-org-button-trigger:has(.org-badge) .text-gray-800,
.next-view-header .next-org-button-trigger:has(.org-badge) .dark\:text-white {
  color: #f8fafc !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
}

/* Locale / tray triggers stay compact icon buttons */
#view-header-tray-items .next-org-button-trigger {
  width: 2rem !important;
  min-width: 2rem !important;
  height: 2rem !important;
  padding: 0 !important;
  border-radius: 999px !important;
  justify-content: center !important;
}

/* Mega menu sits on the SAME chrome row as the header (CSS overlay; Ember-safe) */
.ui-shell .ui-shell-container.fleetbase-next-container,
.ui-shell .ui-shell-container {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative !important;
}

.ui-shell .ui-top-header.next-view-header,
.ui-shell .next-view-header.ui-top-header {
  grid-row: 1;
  grid-column: 1;
  z-index: 4000 !important;
  min-height: 3.25rem !important;
  height: 3.25rem !important;
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
}

/* RTL chrome: menus on the physical right, profile/tools on the left */
html[dir='rtl'] .next-view-header,
.ui-shell[dir='rtl'] .next-view-header,
.ui-shell[dir='rtl'] .ui-top-header.next-view-header {
  direction: rtl !important;
}

html[dir='rtl'] .next-view-header .next-view-header-left,
html[dir='rtl'] .next-view-header .next-view-header-right,
.ui-shell[dir='rtl'] .next-view-header .next-view-header-left,
.ui-shell[dir='rtl'] .next-view-header .next-view-header-right {
  direction: rtl !important;
}

.ui-shell[dir='rtl'] .next-view-header .next-view-header-left {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: 0.15rem;
}

.ui-shell[dir='rtl'] .next-view-header .next-view-header-right {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  margin-inline-start: auto;
}

.ui-mega-wrap,
.ui-mega,
#zino-mega-nav {
  grid-row: 1 !important;
  grid-column: 1 !important;
  z-index: 5000 !important;
  position: absolute !important;
  top: 0 !important;
  left: 3.5rem !important;
  right: 19rem !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  height: 3.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important; /* cluster menus toward utilities / RTL start */
  background: transparent !important;
  background-image: none !important;
  border-bottom: 0 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.ui-mega-bar {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0.25rem !important;
  width: auto !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}

.ui-mega-panel {
  pointer-events: auto !important;
  z-index: 5001 !important;
  background: #fff !important;
  border-top: 3px solid var(--zino-gold) !important;
  box-shadow: 0 18px 40px rgb(15 23 42 / 16%) !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  min-height: 12rem !important;
}

.ui-mega-trigger,
.ui-mega-link,
.ui-mega-list,
.ui-mega-item {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 2;
}

.ui-mega-trigger {
  color: #e7e5e4 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  border-radius: 999px !important;
}

.ui-mega-item.is-active .ui-mega-trigger,
.ui-mega-item.is-open .ui-mega-trigger,
.ui-mega-trigger:hover {
  background: var(--zino-gold-muted) !important;
  border-color: rgb(212 175 55 / 35%) !important;
  color: #fde68a !important;
}

.ui-shell .ui-main {
  grid-row: 2;
  grid-column: 1;
  min-height: 0;
  z-index: 1 !important;
  position: relative !important;
}

.ui-shell .next-mobile-navbar,
.ui-shell [class*='mobile-navbar'] {
  grid-row: 2;
  grid-column: 1;
}

.ui-mega-col-title {
  color: var(--zino-gold) !important;
}

.ui-mega-link:hover {
  background: #fbf7ec !important;
  border-color: rgb(212 175 55 / 35%) !important;
}

.ui-mega-link-icon {
  background: #fbf7ec !important;
  border-color: rgb(212 175 55 / 40%) !important;
  color: var(--zino-navy-2) !important;
}

/* Surfaces */
.ui-shell,
.ui-shell .ui-main,
.ui-shell .ui-section,
.ui-page-shell {
  background: var(--zino-bg) !important;
  color: var(--zino-fg) !important;
}

.ui-card,
.ui-shell .zv-card,
.ui-shell .zv-kpi,
.ui-shell .zv-widget {
  background: var(--zino-card) !important;
  border: 1px solid var(--zino-border) !important;
  border-radius: var(--zino-radius) !important;
  box-shadow: var(--zino-shadow) !important;
}

/* Primary actions = gold pills (app mockup) */
.ui-btn-primary,
.ui-login-submit,
.ui-shell .zv-btn-primary,
.ui-shell .zv-btn.zv-btn-primary,
.ui-shell .btn-primary,
.ui-shell button.btn-primary,
.ui-shell a.btn-primary,
.fleet-ops-sidebar-primary-action,
.fleet-ops-sidebar-primary-action button,
.next-sidebar-navigator-primary-action button {
  background: var(--zino-gold) !important;
  background-color: var(--zino-gold) !important;
  background-image: none !important;
  border-color: #b8962c !important;
  color: #fff !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px -12px rgb(212 175 55 / 70%) !important;
}

.ui-btn-primary:hover,
.ui-shell .btn-primary:hover,
.fleet-ops-sidebar-primary-action:hover,
.fleet-ops-sidebar-primary-action button:hover {
  background: #c19b2e !important;
}

.ui-btn-outline {
  background: #fff !important;
  border: 1.5px solid var(--zino-gold) !important;
  color: #9a7b1a !important;
  border-radius: 999px !important;
}

.ui-tab.is-active,
.ui-tab:hover {
  background: var(--zino-gold) !important;
  color: #fff !important;
}

.ui-text-link {
  color: #9a7b1a !important;
}

.ui-status {
  background: #fbf7ec !important;
  border-color: rgb(212 175 55 / 40%) !important;
  color: #8a6d14 !important;
}

/* FO sidebar + map chrome */
body[class*='console-fleet-ops'] .ui-shell .next-sidebar,
body[class*='console-fleet-ops'] .fleet-ops-sidebar-navigator,
body[class*='console-fleet-ops'] .next-sidebar-content {
  background: #fbfbfc !important;
  border-inline-start: 1px solid var(--zino-border) !important;
}

body[class*='console-fleet-ops'] .next-map-container-view-switch > button.active,
body[class*='console-fleet-ops'] .tab-item--active,
body[class*='console-fleet-ops'] .next-nav-item.active {
  background-color: #fbf7ec !important;
  color: #8a6d14 !important;
  border-color: rgb(212 175 55 / 45%) !important;
}

body[class*='console-fleet-ops'] .next-map-container-topbar,
body[class*='console-fleet-ops'] .next-map-container-view-switch {
  background: #fbfbfc !important;
  border-bottom: 1px solid var(--zino-border) !important;
}

body[class*='console-fleet-ops'] .bg-indigo-500,
body[class*='console-fleet-ops'] .bg-indigo-600,
body[class*='console-fleet-ops'] .bg-purple-500,
body[class*='console-fleet-ops'] .bg-purple-600,
body[class*='console-fleet-ops'] .bg-violet-500,
body[class*='console-fleet-ops'] .bg-violet-600,
body[class*='console-fleet-ops'] .bg-blue-600,
body[class*='console-fleet-ops'] .bg-blue-700 {
  background-color: var(--zino-gold) !important;
}

/* Login brand pane — navy + gold glow like app hero */
.ui-login-brand-pane {
  background:
    radial-gradient(circle at 70% 80%, rgb(212 175 55 / 28%), transparent 42%),
    linear-gradient(160deg, #0f172a 0%, #1a1c2e 55%, #243044 100%) !important;
}

.ui-login-brand-badge {
  color: #fde68a !important;
  border-color: rgb(212 175 55 / 35%) !important;
  background: rgb(255 255 255 / 6%) !important;
}

/* Soften FO toolbar */
body[class*='console-fleet-ops'] .toolbar-button {
  background: #fff !important;
  color: var(--zino-navy-2) !important;
  border-color: var(--zino-border) !important;
}
body[class*='console-fleet-ops'] .toolbar-button.is-action {
  background: var(--zino-gold) !important;
  color: #fff !important;
  border-color: #b8962c !important;
}

/* Role-scoped gold-vault nav */
.zv-role-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem 1.25rem;margin:.75rem 1.5rem 0;padding:.65rem 1rem;border:1px solid rgb(212 175 55 / 35%);border-radius:.85rem;background:linear-gradient(180deg,#121526 0%,#1a1c2e 100%);color:#f8fafc}
.zv-role-nav-brand{display:flex;align-items:center;gap:.65rem}
.zv-role-nav-title{font-weight:800;font-size:.95rem}
.zv-role-nav-badge{display:inline-flex;align-items:center;padding:.2rem .65rem;border-radius:999px;font-size:.75rem;font-weight:600;background:rgb(212 175 55 / 18%);border:1px solid rgb(212 175 55 / 40%);color:#fde68a}
.zv-role-nav-list{display:flex;flex-wrap:wrap;gap:.35rem;list-style:none;margin:0;padding:0}
.zv-role-nav-link{display:inline-flex;padding:.35rem .75rem;border-radius:999px;color:#e2e8f0!important;text-decoration:none!important;font-size:.82rem;font-weight:600}
.zv-role-nav-link:hover,.zv-role-nav-link.active{background:rgb(212 175 55 / 22%);color:#fde68a!important}
