:root {
    --gt-shell-bg: rgba(255, 255, 255, 0.72);
    --gt-shell-border: rgba(148, 163, 184, 0.24);
    --gt-shell-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
    --gt-shell-blur: 16px;
    --gt-surface: rgba(255, 255, 255, 0.72);
    --gt-surface-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    --gt-surface-active: linear-gradient(180deg, rgba(236, 254, 255, 0.98), rgba(208, 250, 245, 0.92));
    --gt-border: rgba(203, 213, 225, 0.72);
    --gt-border-strong: rgba(45, 212, 191, 0.56);
    --gt-text: #0f172a;
    --gt-muted: #5f7288;
    --gt-accent: #0f766e;
    --gt-accent-strong: #115e59;
    --gt-divider: linear-gradient(90deg, rgba(203, 213, 225, 0), rgba(148, 163, 184, 0.68) 18%, rgba(148, 163, 184, 0.68) 82%, rgba(203, 213, 225, 0));
    --gt-panel-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    --gt-link-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --gt-brand-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
    --gt-shell-bg: rgba(8, 15, 27, 0.76);
    --gt-shell-border: rgba(45, 212, 191, 0.14);
    --gt-shell-shadow: 0 26px 48px rgba(2, 8, 23, 0.34);
    --gt-surface: rgba(15, 23, 42, 0.72);
    --gt-surface-soft: linear-gradient(180deg, rgba(20, 31, 49, 0.96), rgba(13, 22, 36, 0.92));
    --gt-surface-active: linear-gradient(180deg, rgba(18, 52, 62, 0.98), rgba(12, 40, 48, 0.92));
    --gt-border: rgba(43, 58, 82, 0.86);
    --gt-border-strong: rgba(94, 234, 212, 0.48);
    --gt-text: #e6f0fb;
    --gt-muted: #98abc0;
    --gt-accent: #67e8f9;
    --gt-accent-strong: #99f6e4;
    --gt-divider: linear-gradient(90deg, rgba(43, 58, 82, 0), rgba(71, 85, 105, 0.9) 18%, rgba(71, 85, 105, 0.9) 82%, rgba(43, 58, 82, 0));
    --gt-panel-shadow: 0 22px 42px rgba(2, 8, 23, 0.42);
    --gt-link-shadow: 0 16px 34px rgba(2, 8, 23, 0.28);
    --gt-brand-shadow: 0 20px 38px rgba(2, 8, 23, 0.28);
}

.global-topbar {
    position: relative;
    z-index: 12;
    margin: -4px 0 16px;
    padding: 0;
}

.global-topbar-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0 12px;
}

.global-topbar-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.global-topbar-brand {
    flex: 0 0 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gt-text);
    padding: 6px 8px 6px 0;
}

.global-topbar-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(15, 23, 42, 0.08));
    border: 1px solid rgba(15, 118, 110, 0.18);
    box-shadow: var(--gt-brand-shadow);
    color: var(--gt-accent-strong);
}

[data-theme="dark"] .global-topbar-brand-mark {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(14, 165, 233, 0.12));
    border-color: rgba(94, 234, 212, 0.16);
}

.global-topbar-brand-mark svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-topbar-brand-copy {
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.global-topbar-brand-copy strong {
    color: var(--gt-text);
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.01em;
}

.global-topbar-brand-copy span {
    color: var(--gt-muted);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.global-topbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--gt-shell-border);
    border-radius: 22px;
    background: var(--gt-shell-bg);
    box-shadow: var(--gt-shell-shadow);
    backdrop-filter: blur(var(--gt-shell-blur));
}

.global-nav-link {
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--gt-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 10px 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .15s ease, border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.global-nav-link:hover {
    transform: translateY(-1px);
    color: var(--gt-text);
    border-color: var(--gt-border);
    background: color-mix(in srgb, var(--gt-surface) 80%, transparent);
}

.global-nav-link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-nav-link.is-active {
    color: var(--gt-accent-strong);
    border-color: var(--gt-border-strong);
    background: var(--gt-surface-active);
    font-weight: 700;
    box-shadow: var(--gt-link-shadow);
}

[data-theme="dark"] .global-nav-link.is-active {
    color: var(--gt-accent-strong);
}

.global-topbar-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.global-quick-btn {
    border: 1px solid var(--gt-border);
    border-radius: 14px;
    background: var(--gt-surface-soft);
    color: var(--gt-text);
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.global-quick-btn:hover {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    background: var(--gt-surface-active);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.global-quick-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-quick-btn span {
    color: var(--gt-muted);
    font-size: 12px;
}

.global-quick-btn kbd {
    border: 1px solid var(--gt-border);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.16);
    color: var(--gt-muted);
    font-size: 10px;
    line-height: 1;
    padding: 3px 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.global-notification-shell {
    position: relative;
}

.global-notification-trigger {
    position: relative;
    border: 1px solid var(--gt-border);
    border-radius: 14px;
    background: var(--gt-surface-soft);
    color: var(--gt-text);
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.global-notification-trigger:hover,
.global-notification-shell.is-open .global-notification-trigger {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    background: var(--gt-surface-active);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.global-notification-trigger svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-notification-badge[hidden] {
    display: none;
}

.global-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.3);
}

.global-notification-panel[hidden] {
    display: none;
}

.global-notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 258px;
    max-height: min(70vh, 460px);
    border: 1px solid var(--gt-border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--gt-surface) 92%, transparent);
    box-shadow: var(--gt-panel-shadow);
    padding: 10px;
    z-index: 42;
    backdrop-filter: blur(var(--gt-shell-blur));
    overflow: hidden;
}

.global-notification-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px 8px;
}

.global-notification-kicker {
    color: var(--gt-muted);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.global-notification-title {
    margin-top: 3px;
    color: var(--gt-text);
    font-size: 16px;
    font-weight: 700;
}

.global-notification-head-link {
    flex: 0 0 auto;
    color: var(--gt-accent);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.global-notification-head-link:hover {
    color: var(--gt-accent-strong);
}

.global-notification-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    border: 1px solid var(--gt-border);
    border-radius: 12px;
    background: var(--gt-surface-active);
}

.global-notification-unread span {
    display: block;
    color: var(--gt-muted);
    font-size: 11px;
}

.global-notification-unread strong {
    display: block;
    margin-top: 3px;
    color: var(--gt-text);
    font-size: 20px;
    line-height: 1;
}

.global-notification-read-all {
    border: 1px solid var(--gt-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--gt-surface) 88%, transparent);
    color: var(--gt-text);
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

.global-notification-read-all:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    background: var(--gt-surface-active);
}

.global-notification-read-all:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.global-notification-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    max-height: min(54vh, 320px);
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.global-notification-state {
    border: 1px dashed var(--gt-border);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    color: var(--gt-muted);
    font-size: 12px;
    line-height: 1.6;
}

.global-notification-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 0;
    border-radius: 10px;
    padding: 8px 9px;
    color: inherit;
    text-decoration: none;
    background: transparent;
    transition: transform .15s ease, background .2s ease, color .2s ease;
}

.global-notification-item:hover {
    transform: translateY(-1px);
    background: var(--gt-surface-active);
}

.global-notification-item.is-unread {
    background: color-mix(in srgb, var(--gt-surface-active) 84%, transparent);
}

.global-notification-item-avatar {
    width: 34px;
    height: 34px;
}

.global-notification-item-avatar .global-avatar {
    width: 34px;
    height: 34px;
}

.global-notification-item-main {
    min-width: 0;
}

.global-notification-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gt-muted);
    font-size: 10px;
}

.global-notification-item-tag {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    border-radius: 999px;
    padding: 0 7px;
    background: color-mix(in srgb, var(--gt-surface-active) 84%, transparent);
    color: var(--gt-accent);
    font-weight: 600;
}

.global-notification-item-title {
    margin: 4px 0 0;
    color: var(--gt-text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.global-notification-item-excerpt {
    margin: 4px 0 0;
    color: var(--gt-muted);
    font-size: 11px;
    line-height: 1.5;
}

.global-notification-item-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}

.global-user-shell {
    position: relative;
}

.global-user-menu {
    position: relative;
}

.global-user-menu summary {
    list-style: none;
}

.global-user-menu summary::-webkit-details-marker {
    display: none;
}

.global-user-trigger {
    border: 1px solid var(--gt-border);
    border-radius: 999px;
    background: var(--gt-surface-soft);
    color: var(--gt-text);
    padding: 4px 8px 4px 4px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.global-user-trigger:hover {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.global-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    object-fit: cover;
    background: #dbe5ef;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.global-user-name {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gt-text);
}

.global-user-caret {
    width: 14px;
    height: 14px;
    color: var(--gt-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.global-user-caret svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-user-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 258px;
    border: 1px solid var(--gt-border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--gt-surface) 92%, transparent);
    box-shadow: var(--gt-panel-shadow);
    padding: 10px;
    z-index: 40;
    backdrop-filter: blur(var(--gt-shell-blur));
}

.global-user-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: var(--gt-surface-active);
    margin-bottom: 4px;
}

.global-user-avatar-lg {
    width: 38px;
    height: 38px;
}

.global-user-label {
    color: var(--gt-muted);
    font-size: 11px;
}

.global-user-fullname {
    color: var(--gt-text);
    font-size: 14px;
    font-weight: 700;
    margin-top: 1px;
}

.global-user-meta {
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gt-muted);
    font-size: 12px;
}

.global-user-meta svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.global-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    padding: 8px 9px;
    color: var(--gt-text);
    font-size: 13px;
    text-decoration: none;
}

.global-user-item:hover {
    background: var(--gt-surface-active);
    color: var(--gt-accent);
}

.global-user-item.is-active {
    background: var(--gt-surface-active);
    color: var(--gt-accent-strong);
}

.global-user-item svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-user-item.danger {
    color: #b91c1c;
}

:root {
    --global-loader-overlay:
        radial-gradient(circle at top, rgba(45, 212, 191, 0.18), transparent 40%),
        rgba(15, 23, 42, 0.22);
    --global-loader-panel:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 254, 255, 0.96));
    --global-loader-panel-border: rgba(148, 163, 184, 0.22);
    --global-loader-panel-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
    --global-loader-spinner-track: rgba(148, 163, 184, 0.24);
    --global-loader-spinner-accent: #0f766e;
    --global-loader-title: #0f172a;
    --global-loader-sub: #64748b;
    --global-loader-fallback-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --global-loader-overlay:
        radial-gradient(circle at top, rgba(45, 212, 191, 0.22), transparent 40%),
        rgba(2, 8, 23, 0.48);
    --global-loader-panel:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(14, 35, 52, 0.94));
    --global-loader-panel-border: rgba(45, 212, 191, 0.18);
    --global-loader-panel-shadow: 0 28px 60px rgba(2, 8, 23, 0.52);
    --global-loader-spinner-track: rgba(71, 85, 105, 0.35);
    --global-loader-spinner-accent: #2dd4bf;
    --global-loader-title: #ecfeff;
    --global-loader-sub: #9fb4c8;
    --global-loader-fallback-border: rgba(148, 163, 184, 0.18);
}

html[data-page-loading="1"] {
    overflow: hidden;
}

body.global-page-loader-active {
    overflow: hidden;
}

html[data-page-loading="1"]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 108;
    background: var(--global-loader-overlay);
    backdrop-filter: blur(8px);
}

html[data-page-loading="1"]::after {
    content: "";
    position: fixed;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -34px;
    border-radius: 999px;
    border: 3px solid var(--global-loader-spinner-track);
    border-top-color: var(--global-loader-spinner-accent);
    border-right-color: var(--global-loader-spinner-accent);
    z-index: 110;
    animation: global-page-loader-spin .72s linear infinite;
}

html[data-page-loading="1"] body::before {
    content: "";
    position: fixed;
    left: 50%;
    top: 50%;
    width: 124px;
    height: 124px;
    margin-left: -62px;
    margin-top: -62px;
    border: 1px solid var(--global-loader-fallback-border);
    border-radius: 30px;
    background: var(--global-loader-panel);
    box-shadow: var(--global-loader-panel-shadow);
    z-index: 109;
}

html[data-page-loading="1"] body::after {
    content: "加载中...";
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translateX(-50%);
    margin-top: 22px;
    color: var(--global-loader-title);
    font-size: 13px;
    letter-spacing: 0.08em;
    z-index: 110;
}

.global-page-loader[hidden] {
    display: none;
}

.global-page-loader {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--global-loader-overlay);
    backdrop-filter: blur(10px);
}

.global-page-loader-card {
    width: min(320px, calc(100vw - 40px));
    border: 1px solid var(--global-loader-panel-border);
    border-radius: 26px;
    background: var(--global-loader-panel);
    box-shadow: var(--global-loader-panel-shadow);
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.global-page-loader-spinner {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 999px;
    border: 3px solid var(--global-loader-spinner-track);
    border-top-color: var(--global-loader-spinner-accent);
    border-right-color: var(--global-loader-spinner-accent);
    animation: global-page-loader-spin .72s linear infinite;
}

.global-page-loader-copy {
    min-width: 0;
}

.global-page-loader-title {
    margin: 0;
    color: var(--global-loader-title);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.global-page-loader-sub {
    margin: 6px 0 0;
    color: var(--global-loader-sub);
    font-size: 13px;
    line-height: 1.5;
}

@keyframes global-page-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.global-login-btn {
    border: 1px solid var(--gt-border);
    border-radius: 14px;
    background: var(--gt-surface-soft);
    color: var(--gt-text);
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: transform .15s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.global-login-btn:hover {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    color: var(--gt-accent);
    background: var(--gt-surface-active);
}

.global-login-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.global-theme-toggle {
    border: 1px solid var(--gt-border);
    border-radius: 14px;
    background: var(--gt-surface-soft);
    color: var(--gt-text);
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.global-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--gt-border-strong);
    background: var(--gt-surface-active);
}

.global-theme-toggle .icon {
    width: 18px;
    height: 18px;
    display: none;
}

.global-theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .global-theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .global-theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .global-user-item.danger {
    color: #fca5a5;
}

[data-theme="dark"] .global-user-head {
    background: var(--gt-surface-active);
}

.global-topbar-divider {
    height: 1px;
    width: 100%;
    background: var(--gt-divider);
    opacity: 0.95;
}

@media (max-width: 980px) {
    .global-topbar {
        margin: -2px 0 14px;
    }

    .global-topbar-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding-bottom: 10px;
    }

    .global-topbar-main {
        display: contents;
    }

    .global-topbar-brand {
        grid-column: 1;
        grid-row: 1;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        gap: 10px;
        padding: 2px 0;
    }

    .global-topbar-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        flex: 0 0 40px;
    }

    .global-topbar-brand-copy strong {
        font-size: 13px;
    }

    .global-topbar-brand-copy span {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .global-topbar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 5px;
        gap: 5px;
        border-radius: 18px;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .global-topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .global-nav-link {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 9px 12px;
        gap: 8px;
        border-radius: 14px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .global-nav-link svg {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .global-topbar-actions {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        justify-content: flex-end;
        gap: 8px;
        margin-left: 0;
    }

    .global-quick-btn,
    .global-notification-trigger,
    .global-login-btn,
    .global-theme-toggle {
        height: 40px;
        border-radius: 13px;
    }

    .global-user-trigger {
        min-height: 40px;
    }
}

@media (max-width: 820px) {
    .global-topbar {
        margin-bottom: 12px;
    }

    .global-topbar-shell {
        gap: 8px 10px;
        padding-bottom: 10px;
    }

    .global-topbar-main {
        display: contents;
    }

    .global-topbar-brand {
        width: auto;
        max-width: calc(100vw - 172px);
        padding-right: 0;
    }

    .global-topbar-brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .global-topbar-brand-copy strong {
        font-size: 13px;
    }

    .global-topbar-brand-copy span {
        font-size: 10px;
    }

    .global-topbar-nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 5px;
        scrollbar-width: none;
    }

    .global-topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .global-nav-link {
        flex: 0 0 auto;
        padding: 9px 12px;
        gap: 10px;
    }

    .global-topbar-actions {
        width: auto;
        justify-content: flex-end;
        gap: 6px;
    }

    .global-quick-btn span,
    .global-quick-btn kbd,
    .global-user-name,
    .global-user-caret {
        display: none;
    }

    .global-quick-btn,
    .global-notification-trigger,
    .global-theme-toggle,
    .global-login-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .global-login-btn span {
        display: none;
    }

    .global-user-trigger {
        min-width: 40px;
        min-height: 40px;
        padding-right: 3px;
    }

    .global-user-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        bottom: auto;
        width: min(260px, calc(100vw - 20px));
        max-height: min(70vh, 460px);
        overflow: auto;
    }

    .global-notification-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(260px, calc(100vw - 20px));
        max-height: min(70vh, 460px);
    }

    .global-notification-toolbar {
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .global-topbar {
        margin: 0 0 10px;
    }

    .global-topbar-shell {
        gap: 8px 8px;
        padding-bottom: 8px;
    }

    .global-topbar-main {
        display: contents;
    }

    .global-topbar-brand {
        max-width: none;
        width: auto;
        min-width: 0;
    }

    .global-topbar-brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
        flex-basis: 36px;
    }

    .global-topbar-brand-mark svg {
        width: 16px;
        height: 16px;
    }

    .global-topbar-brand-copy strong {
        font-size: 12px;
    }

    .global-topbar-brand-copy span {
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    .global-topbar-nav {
        padding: 4px;
        gap: 4px;
        border-radius: 16px;
    }

    .global-nav-link {
        min-height: 36px;
        padding: 8px 11px;
        gap: 7px;
        font-size: 12px;
        border-radius: 13px;
    }

    .global-nav-link svg {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

    .global-topbar-actions {
        gap: 6px;
        width: auto;
    }

    .global-quick-btn,
    .global-notification-trigger,
    .global-theme-toggle,
    .global-login-btn,
    .global-user-trigger {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        border-radius: 12px;
    }

    .global-avatar {
        width: 28px;
        height: 28px;
    }

    .global-user-panel {
        width: min(248px, calc(100vw - 16px));
        right: 0;
    }

    .global-notification-panel {
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(248px, calc(100vw - 16px));
        padding: 10px;
        max-height: min(70vh, 460px);
        border-radius: 20px;
    }

    .global-notification-toolbar {
        gap: 10px;
    }

    .global-notification-unread strong {
        font-size: 20px;
    }

    .global-notification-read-all {
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    .global-notification-item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        padding: 8px 9px;
    }

    .global-notification-item-avatar,
    .global-notification-item-avatar .global-avatar {
        width: 34px;
        height: 34px;
    }

    .global-notification-item-dot {
        position: absolute;
        top: 12px;
        right: 12px;
    }
}

.global-quick-overlay[hidden] {
    display: none;
}

.global-quick-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    padding: 12vh 16px 16px;
}

.global-quick-panel {
    width: min(680px, 100%);
    margin: 0 auto;
    border: 1px solid var(--gt-border);
    border-radius: 16px;
    background: var(--gt-surface);
    box-shadow: 0 22px 46px rgba(2, 8, 23, 0.34);
    overflow: hidden;
}

.global-quick-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--gt-border);
    padding: 14px 16px;
    font-size: 15px;
    background: transparent;
    color: var(--gt-text);
    outline: none;
}

.global-quick-list {
    max-height: 56vh;
    overflow: auto;
    padding: 8px;
}

.global-quick-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    border-radius: 10px;
    padding: 9px 10px;
    cursor: pointer;
}

.global-quick-item:hover,
.global-quick-item.active {
    background: var(--gt-surface-active);
}

.global-quick-title {
    margin: 0;
    font-size: 14px;
    color: var(--gt-text);
}

.global-quick-sub {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--gt-muted);
}

.global-quick-empty {
    padding: 18px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--gt-muted);
}

@media (prefers-reduced-motion: reduce) {
    html[data-page-loading="1"]::after,
    .global-page-loader-spinner {
        animation-duration: 1.4s;
    }
}
