.fi-login-pill-wrap { gap: 10px; align-items: center; flex-wrap: wrap; }
.fi-notifications { display: flex; gap: 6px; align-items: center; }
.fi-notification-box { position: relative; --fi-notification-accent: #bfd8f2; --fi-notification-tint: 151, 187, 224; }
.fi-notification-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid rgba(var(--fi-notification-tint), .3);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(51, 58, 72, .9), rgba(29, 35, 47, .94));
    color: var(--fi-notification-accent);
    box-shadow: inset 0 1px 0 #ffffff14, 0 2px 5px #0003;
    cursor: pointer;
    list-style: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.fi-notification-trigger:hover, .fi-notification-box[open] > summary {
    border-color: rgba(var(--fi-notification-tint), .65);
    background: linear-gradient(180deg, rgba(62, 72, 88, .98), rgba(36, 44, 58, .98));
    box-shadow: inset 0 1px 0 #ffffff1f, 0 2px 7px #0004;
}
.fi-notification-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.fi-notification-box > summary::-webkit-details-marker { display: none; }
.fi-notification-important { --fi-notification-accent: #e9cb8f; --fi-notification-tint: 219, 185, 120; }
.fi-notification-total { min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: rgba(var(--fi-notification-tint), .16); color: inherit; display: inline-flex; justify-content: center; align-items: center; font: 700 10px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fi-notification-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 40px)); z-index: 100; border: 1px solid #b7aa8b; border-radius: 10px; background: #f8f5eb; box-shadow: 0 12px 30px #0004; overflow: hidden; color: #302b23; }
.fi-notification-menu-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid #b7aa8b66; }
.fi-notification-menu-head form { margin: 0; }
.fi-notification-text-button { border: 0; padding: 3px; background: transparent; color: #354d6b; cursor: pointer; text-decoration: underline; font: inherit; font-size: 11px; }
.fi-notification-menu [data-notification-items] { max-height: min(300px, calc(100dvh - 170px)); overflow-y: auto; }
.fi-notification-item { margin: 0; border-bottom: 1px solid #b7aa8b44; }
.fi-notification-item:last-child { border-bottom: 0; }
.fi-notification-item > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title time" "body body"; gap: 3px 8px; width: 100%; padding: 8px 11px; text-align: left; border: 0; border-left: 2px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.fi-notification-item.is-unread > button { background: #edf1f6; border-left-color: #496d94; }
.fi-notification-important .fi-notification-item.is-unread > button { background: #f5eee1; border-left-color: #b18a46; }
.fi-notification-item > button:hover { background: #dbe5ee; }
.fi-notification-item strong { grid-area: title; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.4; }
.fi-notification-item > button > span { grid-area: body; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 1.4; color: #625e55; }
.fi-notification-item time { grid-area: time; align-self: center; color: #767166; font-size: 9px; white-space: nowrap; }
.fi-notification-view-all { display: block; padding: 8px 12px; border-top: 1px solid #b7aa8b44; text-align: center; color: #354d6b; font-size: 12px; font-weight: 700; }
.fi-notification-empty, .fi-notification-error { margin: 0; padding: 12px; font-size: 12px; }
.fi-notification-error { color: #922f36; }

/* Notification history uses the same inbox card and row styles as messages. */
.fi-notification-history {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.fi-history-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.fi-history-header .fi-title { margin: 0; }
.fi-history-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fi-history-header-actions form { margin: 0; }
.fi-history-status { display: inline-flex; align-items: center; gap: 5px; color: var(--fi-muted); font-size: 13px; }
.fi-history-tabs { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; border-bottom: 1px solid var(--fi-line); }
.fi-history-tab { display: inline-flex; align-items: center; gap: 7px; padding: 0 0 8px; border-bottom: 2px solid transparent; color: var(--fi-muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.fi-history-tab:hover { color: var(--fi-frost-blue-dark); text-decoration: none; }
.fi-history-tab.is-active { border-bottom-color: var(--fi-defender-gold); color: var(--fi-frost-blue-dark); }
.fi-history-tab-count { min-width: 19px; padding: 1px 5px; border-radius: 4px; background: rgba(20, 71, 188, .06); color: var(--fi-muted); font-size: 12px; }
.fi-history-tab.is-active .fi-history-tab-count { color: var(--fi-frost-blue-dark); }
.fi-history-list { gap: 6px; }
.fi-history-entry { margin: 0; }
.fi-history-entry.is-unread { border-left: 3px solid var(--fi-frost-blue); }
.fi-history-entry > button {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.fi-history-entry > button:hover { background: rgba(20, 71, 188, .05); }
.fi-history-entry > button:focus-visible { outline: 2px solid var(--fi-frost-blue); outline-offset: -3px; }
.fi-history-entry-copy { flex-direction: row; align-items: baseline; min-width: 0; gap: 12px; }
.fi-history-entry-title { flex: 0 1 auto; max-width: 45%; font-size: 15px; font-weight: 400; line-height: 1.3; }
.fi-history-entry.is-unread .fi-history-entry-title { font-weight: 900; }
.fi-history-entry-body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.fi-history-entry-date { display: flex; justify-content: flex-end; gap: 6px; font-size: 12px; font-weight: 400; line-height: 1.3; white-space: nowrap; }
.fi-history-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--fi-line); color: var(--fi-muted); font-size: 12px; }
.fi-history-pagination { display: flex; align-items: center; gap: 14px; }
.fi-history-pagination a { color: var(--fi-frost-blue-dark); font-weight: 700; text-decoration: none; }
.fi-history-pagination a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .fi-history-entry > button { gap: 8px; }
    .fi-history-entry-copy { display: grid; gap: 2px; }
    .fi-history-entry-title { max-width: none; font-size: 14px; }
    .fi-history-entry-date { display: grid; justify-items: end; gap: 2px; }
}
.fi-hub-link, .fi-char-panel-link, .fi-hub-dropdown-link, .fi-crafting-type { position: relative; }
.fi-nav-badge { position: absolute; top: -10px; right: -6px; min-width: 17px; height: 17px; padding: 0 3px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #1447bc; color: #fff; box-shadow: 0 2px 4px #0002; font: 700 9px/1 system-ui, sans-serif; pointer-events: none; z-index: 2; }
.fi-nav-badge[hidden], .fi-notification-error[hidden] { display: none; }
.fi-hub-dropdown-link .fi-nav-badge { top: calc(50% - 3px); right: 4px; transform: translateY(-50%); }
.fi-market-notifications .fi-hub-dropdown-link { padding-right: 35px; }
.fi-market-notifications:is(:hover, :focus-within) .fi-market-summary-badge { display: none; }
.fi-notification-box summary:focus-visible, .fi-notification-item button:focus-visible { outline: 3px solid #496d94; outline-offset: 2px; }
@media (max-width: 720px) {
    .fi-login-pill-wrap { justify-content: flex-start; }
    .fi-notifications { position: relative; }
    .fi-notification-box { position: static; }
    .fi-notification-menu { left: 0; right: auto; }
}
