/* ── TOP BAR - PROFESSIONAL ── */
:root {
    --kf-green: #82ae46;
    --kf-green-dark: #6a9438;
    --kf-green-deep: #4f7027;
    --kf-ink: #1e2f22;
    --kf-muted: #6c7b73;
    --kf-line: #eef3ea;
    --kf-tint: #f4f9ef;
    --kf-white: #ffffff;
    --kf-shadow: rgba(20,40,10,0.08);
    --kf-shadow-dark: rgba(20,40,10,0.15);
}

.top-bar {
    background: var(--kf-green);
    color: var(--kf-white);
    padding: 8px 0;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2147483647;
    transition: all 0.3s ease;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
    overflow: hidden;
}

.top-bar-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}

.top-bar-link:hover {
    color: #ffffff;
    opacity: 0.85;
}

.top-bar-link i {
    font-size: 13px;
    opacity: 0.8;
}

.top-bar-divider {
    color: rgba(255,255,255,0.2);
    font-size: 14px;
    font-weight: 200;
}

.top-bar-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-account {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-account .account-btn {
    background: rgba(255,255,255,0.12);
    color: var(--kf-white);
    padding: 4px 18px 4px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
}

.top-bar-account .account-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.top-bar-account .account-btn i {
    font-size: 14px;
}

.top-bar-account .account-btn.is-logged-in {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 220px;
    cursor: pointer;
    padding: 4px 14px 4px 14px;
}

.top-bar-account .account-btn .account-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 130px;
    font-weight: 400;
    font-size: 11.5px;
}

.top-bar-account .account-btn .fa-caret-down {
    font-size: 10px;
    opacity: 0.85;
    transition: transform 0.25s ease;
}

.top-bar-account .account-wrap.open .account-btn .fa-caret-down {
    transform: rotate(180deg);
}

.top-bar-account .account-wrap {
    position: relative;
    display: inline-block;
}

/* Reparented to <body> by topbar.min.js on open, so this is no longer
   scoped under .top-bar-account — it must work as a standalone,
   top-level element positioned with fixed coordinates set inline by JS. */
.account-menu {
    position: fixed;
    background: var(--kf-white);
    border-radius: 14px;
    box-shadow: 0 20px 48px var(--kf-shadow-dark);
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition: all 0.25s ease;
    z-index: 2147483647;
    border: 1px solid var(--kf-line);
}

.account-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.account-menu .account-menu-email {
    font-size: 12px;
    color: var(--kf-muted);
    padding: 8px 14px 6px;
    border-bottom: 1px solid var(--kf-line);
    margin-bottom: 4px;
    word-break: break-all;
    font-weight: 600;
}

.account-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--kf-ink);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.account-menu a i {
    width: 18px;
    text-align: center;
    color: var(--kf-green);
    font-size: 14px;
}

.account-menu a:hover {
    background: var(--kf-tint);
    color: var(--kf-green-deep);
}

.account-menu a.logout-link i {
    color: #e0604a;
}

.account-menu a.logout-link:hover {
    background: #fdf2f0;
    color: #c2402c;
}

@media (max-width: 992px) {
    .top-bar { font-size: 12px; padding: 6px 0; }
    .top-bar-link { font-size: 11.5px; }
    .top-bar-hide-mobile { display: none; }
}

@media (max-width: 768px) {
    .top-bar { font-size: 11px; padding: 4px 0; }
    .top-bar-inner { gap: 8px; }
    .top-bar-left { gap: 10px; }
    .top-bar-link { font-size: 10.5px; }
    .top-bar-link i { font-size: 11px; }
    .top-bar-divider { display: none; }
    .top-bar-account .account-btn { font-size: 10.5px; padding: 2px 12px 2px 10px; }
    .top-bar-account .account-btn.is-logged-in { max-width: 38px; padding: 3px 8px; }
    .top-bar-account .account-btn.is-logged-in .account-email { display: none; }
    .top-bar-account .account-menu { min-width: 190px; }
}

@media (max-width: 480px) {
    .top-bar { font-size: 10px; padding: 3px 0; }
    .top-bar-link i { font-size: 10px; }
    .top-bar-link span { display: none; }
    .top-bar-account .account-btn { font-size: 10px; padding: 2px 8px; }
    .top-bar-account .account-btn i { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .top-bar,
    .top-bar-account .account-btn,
    .top-bar-account .account-menu,
    .top-bar-account .account-btn .fa-caret-down {
        transition: none !important;
    }
    .top-bar-account .account-wrap.open .account-menu {
        transform: none !important;
    }
}

body { padding-top: 0 !important; margin: 0; }