﻿.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
}

.topbar {
    position: relative;
    height: 64px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #e9edf3;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(12px);
}

.topbar-inner {
    width: auto;
    height: 100%;
    margin: 0 auto;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

    .menu-btn:hover {
        background: #f1f5f9;
        border-color: #e2e8f0;
        color: #5f27cd;
    }

    .menu-btn:active {
        transform: scale(0.94);
    }

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

    .logo:hover {
        opacity: 0.82;
    }

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 34px;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(37, 117, 252, 0.22);
}

.auth-area {
    display: flex;
    align-items: center;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 5px 12px rgba(37, 117, 252, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 7px 17px rgba(37, 117, 252, 0.25);
    }

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 4px 10px 4px 5px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .user-btn:hover {
        border-color: #e2e8f0;
        background: #f8fafc;
    }

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    color: white;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(37, 117, 252, 0.18);
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.user-arrow {
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-size: 13px;
    transition: transform 0.2s ease;
}

.user-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: white;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12), 0 3px 8px rgba(15, 23, 42, 0.05);
    animation: dropdown-in 0.15s ease-out;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu li {
    margin: 0;
    padding: 0;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

    .user-menu a span {
        width: 20px;
        text-align: center;
    }

    .user-menu a:hover {
        background: #f1f5f9;
        color: #111827;
    }

.user-menu .logout {
    color: #ef4444;
}

    .user-menu .logout:hover {
        background: #fef2f2;
        color: #dc2626;
    }

@media (max-width: 600px) {
    .topbar {
        height: 58px;
    }

    .topbar-inner {
        width: calc(100% - 24px);
    }

    .topbar-left {
        gap: 6px;
    }

    .logo {
        font-size: 16px;
    }

    .logo-icon {
        width: 31px;
        height: 31px;
        border-radius: 9px;
    }

    .menu-btn {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }

    .user-name {
        display: none;
    }

    .user-arrow {
        display: none;
    }

    .user-btn {
        padding-right: 5px;
    }

    .btn-login {
        min-width: 72px;
        height: 36px;
        padding: 0 14px;
    }
}
