/* ---------- Theme Toggle (Animated SVG) ---------- */
#themeToggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.theme-track {
    fill: #4ab3f4;
    transition: fill 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .theme-track {
    fill: #1c2938;
}

.theme-knob {
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .theme-knob {
    transform: translateX(50px);
}

.theme-sun {
    opacity: 1;
    transform: rotate(0deg);
    transform-origin: 50px 50px;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .theme-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}

.theme-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
    transform-origin: 50px 50px;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .theme-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-clouds {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.6s ease;
}

body.dark-mode .theme-clouds {
    opacity: 0;
    transform: translateY(15px);
}

.theme-stars {
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.5s ease, transform 0.6s ease;
}

body.dark-mode .theme-stars {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar-wrapper {
    background: var(--kpm-navy);
    position: sticky;
    top: 0;
    z-index: 200;
}

.topbar {
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1080px;
    margin: 0 auto;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.topbar-brand {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

.topbar-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    text-transform: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.topbar-time-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.topbar-logout {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.topbar-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .topbar-user-name,
    .topbar-time-label {
        display: none;
    }

    .topbar {
        padding: 0 12px;
    }

    .topbar-right {
        gap: 8px;
    }
}
