/* Navigation and controls each reserve space, including legacy KMS pages. */
.kms-header {
  --kms-header-surface: #fff;
  --kms-header-soft: #f0f5fc;
  --kms-header-border: #e1e8f0;
  --kms-header-text: #273b4a;
  --kms-header-muted: #738397;
  --kms-header-primary: #084fb9;
}
html.dark-scheme .kms-header {
  --kms-header-surface: #152438;
  --kms-header-soft: #20344d;
  --kms-header-border: #31455f;
  --kms-header-text: #edf4ff;
  --kms-header-muted: #a8b9cc;
  --kms-header-primary: #90baff;
}
.header.kms-header .main-header { gap: 20px; }
.header.kms-header .main-header .header-left { flex: 1 1 auto; width: auto; min-width: 0; }
.header.kms-header .main-header .header-left .header-logo { flex: 0 0 auto; margin-right: 20px; }
.header.kms-header .main-header .header-left .header-nav { flex: 1 1 auto; width: auto; min-width: 0; }
.header.kms-header .nav-main-menu { float: none; }
.header.kms-header .main-menu { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 0; }
.header.kms-header .main-menu > li { float: none; flex: 0 0 auto; padding: 0; }
.header.kms-header .main-menu > li > a { padding: 12px 7px; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.header.kms-header .main-menu > .dropdown > .dropdown-menu { opacity: 1; visibility: visible; max-height: min(560px, 70vh); overflow-y: auto; }
.header.kms-header .main-header .header-right { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 12px; width: auto; max-width: none; padding-right: 0; }
.header.kms-header .kms-account .kms-profile-trigger { max-width: 190px; }
.header.kms-header .kms-notifications { flex: 0 0 auto; }
.kms-notification-trigger { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--kms-header-border); border-radius: 13px; background: var(--kms-header-surface); color: var(--kms-header-muted); cursor: pointer; transition: background .2s ease, color .2s ease; }
.kms-notification-trigger svg { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kms-notification-trigger:is(:hover,[aria-expanded="true"]) { background: var(--kms-header-soft); color: var(--kms-header-primary); }
.kms-notification-trigger:focus-visible { outline: 2px solid var(--kms-header-primary); outline-offset: 3px; }
.kms-notification-count { position: absolute; top: -5px; right: -5px; min-width: 19px; padding: 2px 5px; border: 2px solid var(--kms-header-surface); border-radius: 999px; background: #d94156; color: #fff; font-size: 10px; font-weight: 600; line-height: 13px; text-align: center; }
.header.kms-header .tableNotification { width: 360px; min-width: 0; max-width: calc(100vw - 32px); max-height: min(520px, 70vh); overflow-y: auto; margin-top: 10px !important; padding: 0; border: 1px solid var(--kms-header-border) !important; border-radius: 17px; background: var(--kms-header-surface); box-shadow: 0 16px 42px rgb(10 35 70 / 16%); }
.kms-notification-heading { padding: 18px 20px 15px; border-bottom: 1px solid var(--kms-header-border); }
.kms-notification-heading strong { display: block; color: var(--kms-header-text); font-size: 15px; font-weight: 600; line-height: 1.5; }
.kms-notification-heading small { display: block; margin-top: 3px; color: var(--kms-header-muted); font-size: 11px; line-height: 1.6; }
.kms-notification-entry { padding: 6px 8px; }
.kms-notification-entry + .kms-notification-entry { border-top: 1px solid var(--kms-header-border); }
.header.kms-header .tableNotification .kms-notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 11px; background: transparent; color: var(--kms-header-text); white-space: normal; }
.header.kms-header .tableNotification .kms-notification-item:is(.is-unread,:hover,:focus-visible) { background: var(--kms-header-soft); }
.kms-notification-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border: 1px solid var(--kms-header-border); border-radius: 11px; background: var(--kms-header-soft); color: var(--kms-header-primary); }
.kms-notification-icon i { font-size: 22px; }
.kms-notification-copy { min-width: 0; overflow-wrap: anywhere; }
.kms-notification-copy strong { display: block; margin-bottom: 5px; color: var(--kms-header-text); font-size: 12px; font-weight: 600; line-height: 1.6; }
.kms-notification-copy > span { display: -webkit-box; overflow: hidden; color: var(--kms-header-muted); font-size: 11px; line-height: 1.7; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.kms-notification-copy small { display: block; margin-top: 7px; color: var(--kms-header-primary); font-size: 10px; font-weight: 600; }
.kms-notification-empty { padding: 28px 24px; text-align: center; }
.kms-notification-empty .kms-notification-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; }
.kms-notification-empty .kms-notification-icon i { font-size: 28px; }
.kms-notification-empty strong { display: block; color: var(--kms-header-text); font-size: 14px; font-weight: 600; }
.kms-notification-empty p { margin: 7px 0 0; color: var(--kms-header-muted); font-size: 12px; line-height: 1.7; }
@media (max-width: 1199.98px) {
  .header.kms-header .main-header .header-left .header-nav { display: none; }
  .header.kms-header .main-header .header-right .burger-icon { position: relative; top: auto; right: auto; flex-shrink: 0; margin: 0; }
}
@media (max-width: 767.98px) {
  .header.kms-header .main-header { gap: 8px; }
  .header.kms-header .main-header .header-left { flex: 0 0 auto; }
  .header.kms-header .main-header .header-left .header-logo { margin: 0; }
  .header.kms-header .main-header .header-right { gap: 8px; min-width: 0; }
  .header.kms-header .kms-account .kms-profile-trigger { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .kms-notification-trigger { transition: none; }
}
