/*
FILE: app/static/css/header-footer.css
PURPOSE: Navbar, dropdown, lang-switcher, flash-container styles
BATCH: 1 (Phase 0)

EXTRACTED FROM: original app/templates/base.html <style> block (992 lines)
NO CHANGES to rules — all colors use var() so theme.css overrides apply.
*/

/* ============================================
   NAVBAR STYLES - MODERN
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--background) 85%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid color-mix(in srgb, var(--border-light) 30%, transparent);
    padding: 0;
    height: 72px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: color-mix(in srgb, var(--background) 95%, transparent);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
    border-bottom-color: color-mix(in srgb, var(--primary) 15%, transparent);
    height: 64px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 32px;
    gap: 12px;
}

/* ===== Brand ===== */
.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
}

.nav-brand .brand-link:hover {
    opacity: 0.85;
    transform: scale(0.98);
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.brand-logo-wrapper .material-icons {
    font-size: 1.1rem;
}

.brand-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-size: 1.3rem;
}

.brand-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 20%, transparent);
    -webkit-text-fill-color: var(--success);
}

/* ===== Hamburger ===== */
.nav-toggle-checkbox {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
    z-index: 1001;
    background: none;
    border: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-toggle-label span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

/* ===== Nav Menu ===== */
.nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links > li {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.nav-link {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 60%;
}

.nav-link .material-icons {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* ============================================
   DROPDOWN - Categorized Admin Menu
   ============================================ */
.nav-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid color-mix(in srgb, var(--border-light) 30%, transparent);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    height: 44px;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 5%, transparent);
}

.dropdown-toggle .nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.dropdown-toggle .user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-toggle .chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.dropdown-toggle.open .chevron {
    transform: rotate(180deg);
}

/* ============================================
   Categorized Dropdown Menu Styles
   ============================================ */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    margin: 0;
    list-style: none;
    z-index: 1001;
    backdrop-filter: blur(20px);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    scrollbar-width: thin;
}

.dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.dropdown-menu.open {
    display: block;
    animation: dropdownFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===== Dropdown Header (User Info) ===== */
.dropdown-menu .dropdown-header {
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown-menu .dropdown-header .header-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-menu .dropdown-header .header-email {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Category Headers ===== */
.dropdown-menu .dropdown-category {
    padding: 8px 20px 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu .dropdown-category i {
    font-size: 0.7rem;
    opacity: 0.5;
}

/* ===== Dropdown Items ===== */
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-family);
    border-left: 2px solid transparent;
}

.dropdown-menu a:hover {
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    color: var(--text-primary);
    border-left-color: var(--primary);
}

.dropdown-menu a .material-icons {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.dropdown-menu a:hover .material-icons {
    color: var(--primary);
}

.dropdown-menu a .nav-badge {
    margin-left: auto;
    font-size: 0.6rem;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
}

.dropdown-menu a .nav-badge.success {
    background: var(--success);
}

/* ===== Divider ===== */
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 16px;
}

/* ===== Footer ===== */
.dropdown-menu .dropdown-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dropdown-menu .dropdown-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu .dropdown-footer .material-icons {
    font-size: 0.8rem;
}

/* ============================================
   LANGUAGE SWITCHER - MODERN
   ============================================ */
.lang-switcher {
    display: flex;
    align-items: center;
    position: relative;
}

.lang-switcher .lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid color-mix(in srgb, var(--border-light) 30%, transparent);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 38px;
    position: relative;
}

.lang-switcher .lang-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    color: var(--text-primary);
}

.lang-switcher .lang-toggle .lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-switcher .lang-toggle .lang-code {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
}

.lang-switcher .lang-toggle .lang-chevron {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.lang-switcher .lang-toggle.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-switcher .lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 1002;
}

.lang-switcher .lang-dropdown.open {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

.lang-switcher .lang-dropdown .lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-family);
    border-left: 2px solid transparent;
}

.lang-switcher .lang-dropdown .lang-item:hover {
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    color: var(--text-primary);
    border-left-color: var(--primary);
}

.lang-switcher .lang-dropdown .lang-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-left-color: var(--primary);
}

.lang-switcher .lang-dropdown .lang-item .lang-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lang-switcher .lang-dropdown .lang-item .lang-label {
    flex: 1;
}

.lang-switcher .lang-dropdown .lang-item .lang-code {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.5;
    text-transform: uppercase;
}

/* ============================================
   FOOTER - LOGIN HIDDEN LINK + POLISH
   ============================================ */
.footer-login-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    opacity: 0.5;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-login-link:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-login-link .material-icons {
    font-size: 14px;
    opacity: 0.7;
}

.footer-section h4 {
    position: relative;
}

.footer-section h4::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-top: 8px;
}

.footer-section ul li a {
    transition: all 0.25s ease;
}

.footer-section ul li a:hover {
    transform: translateX(4px);
}

.footer-social a.github:hover { background: #24292E; border-color: #24292E; }
.footer-social a.linkedin:hover { background: #0A66C2; border-color: #0A66C2; }
.footer-social a.youtube:hover { background: #FF0000; border-color: #FF0000; }

.newsletter-form {
    display: flex;
    gap: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.newsletter-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.newsletter-form input {
    flex: 1;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}

.newsletter-form input::placeholder { color: var(--text-muted); }

.newsletter-form button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover { opacity: 0.9; }
.newsletter-form button .material-icons { font-size: 1rem; }

/* ============================================
   Flash Messages
   ============================================ */
.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.flash-container .alert {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    min-width: 280px;
}

.flash-container .alert .alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.flash-container .alert .alert-content .material-icons {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.flash-container .alert .alert-content .alert-message {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.flash-container .alert .alert-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.3s ease;
    line-height: 1;
    flex-shrink: 0;
}

.flash-container .alert .alert-close:hover {
    color: var(--text-primary);
}

.flash-container .alert-success { border-left-color: var(--success); }
.flash-container .alert-success .material-icons { color: var(--success); }
.flash-container .alert-danger { border-left-color: var(--danger); }
.flash-container .alert-danger .material-icons { color: var(--danger); }
.flash-container .alert-warning { border-left-color: var(--warning); }
.flash-container .alert-warning .material-icons { color: var(--warning); }
.flash-container .alert-info { border-left-color: var(--info); }
.flash-container .alert-info .material-icons { color: var(--info); }

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .navbar .container { padding: 0 20px; }
    .nav-link { padding: 6px 14px; font-size: 0.85rem; }
    .dropdown-toggle .user-name { max-width: 80px; }
}

@media (max-width: 768px) {
    .navbar { height: 60px; }
    .navbar.scrolled { height: 56px; }
    .navbar .container { padding: 0 16px; }

    .nav-toggle-label { display: flex; }

    .nav-menu {
        display: none !important;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: color-mix(in srgb, var(--background) 98%, transparent);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px 24px;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-toggle-checkbox:checked ~ .nav-menu {
        display: block !important;
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        height: auto;
        width: 100%;
    }

    .nav-links > li {
        height: auto;
        width: 100%;
        display: block;
    }

    .nav-link {
        padding: 10px 16px;
        justify-content: flex-start;
        width: 100%;
        border-radius: var(--radius-sm);
        font-size: 1rem;
    }

    .nav-link::after { display: none; }

    .nav-dropdown {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .dropdown-toggle {
        padding: 10px 16px;
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-sm);
        height: auto;
        background: transparent;
        border: none;
        gap: 12px;
    }

    .dropdown-toggle:hover {
        background: rgba(255, 255, 255, 0.04);
        border: none;
    }

    .dropdown-toggle .user-name {
        max-width: none;
        flex: 1;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 4px 0 4px 20px;
        margin: 0;
        background: transparent;
        backdrop-filter: none;
        animation: none;
        width: 100%;
        min-width: auto;
    }

    .dropdown-menu.open {
        display: block !important;
    }

    .dropdown-menu a {
        padding: 8px 16px;
        border-left: none;
        font-size: 0.95rem;
    }

    .dropdown-menu a:hover {
        border-left: none;
        background: color-mix(in srgb, var(--primary) 4%, transparent);
    }

    .dropdown-divider { margin: 2px 0; }

    .lang-switcher {
        width: 100%;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
        position: relative;
    }

    .lang-switcher .lang-toggle {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.03);
        min-height: 44px;
    }

    .lang-switcher .lang-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 4px 0 4px 16px;
        margin: 0;
        background: transparent;
        backdrop-filter: none;
        animation: none;
        width: 100%;
        min-width: auto;
    }

    .lang-switcher .lang-dropdown.open {
        display: block !important;
    }

    .lang-switcher .lang-dropdown .lang-item {
        padding: 8px 16px;
        border-left: none;
        font-size: 0.95rem;
    }

    .lang-switcher .lang-dropdown .lang-item:hover {
        border-left: none;
        background: color-mix(in srgb, var(--primary) 4%, transparent);
    }

    .brand-name { font-size: 1.1rem; }
    .brand-logo-wrapper { width: 30px; height: 30px; font-size: 1rem; }
    .brand-badge { display: none; }

    .flash-container {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: 100%;
        width: auto;
    }

    .flash-container .alert { min-width: auto; padding: 12px 14px; }
    .flash-container .alert .alert-content .alert-message { font-size: 0.85rem; }

    .newsletter-form { flex-direction: column; }
    .newsletter-form button { justify-content: center; padding: 11px; }
}

@media (max-width: 480px) {
    .navbar { height: 56px; }
    .nav-menu { top: 56px; max-height: calc(100vh - 56px); padding: 12px 16px 20px; }
    .brand-name { font-size: 1rem; }
    .brand-logo-wrapper { width: 28px; height: 28px; font-size: 0.85rem; }
    .nav-link { padding: 8px 14px; font-size: 0.95rem; }
    .dropdown-toggle { padding: 8px 14px; }
    .dropdown-toggle .nav-avatar { width: 28px; height: 28px; }

    .lang-switcher .lang-toggle {
        font-size: 0.8rem;
        padding: 8px 14px;
        min-height: 38px;
    }

    .flash-container { top: 65px; right: 8px; left: 8px; }
    .flash-container .alert { padding: 10px 12px; }
    .flash-container .alert .alert-content { gap: 8px; }
    .flash-container .alert .alert-content .material-icons { font-size: 1rem; }
    .flash-container .alert .alert-content .alert-message { font-size: 0.8rem; }
    .flash-container .alert .alert-close { font-size: 1.1rem; }
}

/* END OF FILE */
# FILE NAME: app/static/css/header-footer.css
# SIGNED: admin@pandadevhub.com