/* ── Hamburger toggle button (hidden on desktop, shown on mobile via mobile.css) ── */
.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    color: #4a5568;
    line-height: 1;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.navbar-hamburger:hover {
    background: #f0f0ff;
    color: #667eea;
}

/* ── APP NAVBAR ── */
.app-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    z-index: 1500;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(102,126,234,0.12);
    box-shadow: 0 2px 12px rgba(102,126,234,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    box-sizing: border-box;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: #764ba2;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.navbar-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.navbar-links a:hover,
.navbar-links a.active {
    background: #f0f0ff;
    color: #667eea;
}

.navbar-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Authenticated user area */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.navbar-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 8px;
    color: #718096;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-icon-btn:hover {
    background: #f0f0ff;
    color: #667eea;
}

.navbar-logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* Unauthenticated buttons */
.navbar-auth-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-btn-login {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid #667eea;
    transition: background 0.2s;
    white-space: nowrap;
}

.navbar-btn-login:hover {
    background: rgba(102,126,234,0.08);
}

.navbar-btn-register {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 6px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
    transition: opacity 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.navbar-btn-register:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.navbar-contact-link {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.navbar-contact-link:hover {
    background: #f0f0ff;
    color: #667eea;
}

/* Language switcher (flag dropdown) */
.navbar-lang {
    position: relative;
    flex-shrink: 0;
}

.navbar-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 7px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
}

.navbar-lang-toggle:hover {
    background: #f0f0ff;
    border-color: #667eea;
}

.navbar-lang-flag {
    display: inline-flex;
    align-items: center;
}

.flag-ico {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    display: block;
    object-fit: cover;
}

.navbar-lang-caret {
    font-size: 0.65rem;
    color: #718096;
}

.navbar-lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 6px;
    min-width: 168px;
    display: none;
    z-index: 1200;
}

.navbar-lang-menu.open {
    display: block;
}

.navbar-lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-size: 0.9rem;
    white-space: nowrap;
}

.navbar-lang-menu a:hover {
    background: #f0f0ff;
}

.navbar-lang-menu a.active {
    background: #eef0ff;
    font-weight: 600;
}
