/* Header Ana Container */
.header-container 
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: var(--color-card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
    z-index: 1000;
    font-family: var(--font-family) !important;
}

.header-container.hide 
{
    transform: translateY(-100%);
}

/* Header İç Yapı — tek satır: logo | nav (flex:1) | sağ */
.header-inner 
{
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 16px;
    gap: 0;
}

/* Orta Nav Alanı — taşan öğeler arama kutusunun üstüne binmesin */
.header-nav-row
{
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    padding: 0 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.header-nav-row:empty
{
    display: none;
}

/* Logo Alanı */
.header-logo 
{
    height: 40px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: var(--color-card-bg);
}

.header-logo img 
{
    max-height: 35px;
    width: auto;
}

/* Sağ Menü — menü taşsa da arama ve kullanıcı üstte kalsın */
.header-right 
{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 2;
    background: var(--color-card-bg);
    padding-left: 8px;
}

/* Arama Kutusu */
.header-search 
{
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.header-search input 
{
    padding: 5px 32px 5px 28px;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    width: 112px;
    transition: width 0.25s ease, border-color var(--transition-base);
    font-family: var(--font-family) !important;
    color: var(--color-text-dark);
    background: transparent;
}

.header-search input:focus
{
    width: 168px;
    outline: none;
    border-color: var(--color-action);
    box-shadow: 0 0 0 3px rgba(61, 148, 155, 0.15);
}

.header-search .modul-header-search-icon
{
    position: absolute;
    left: 8px;
    font-size: 14px;
    color: var(--color-text-light);
    pointer-events: none;
}

.header-search-icon 
{
    display: none !important;
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    cursor: pointer;
}

/* Mobil Arama Alanı */
.mobile-search-container 
{
    display: none;
    position: fixed;
    top: 48px;
    left: 0;
    width: 100%;
    padding: 8px 12px;
    background: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 999;
    box-sizing: border-box;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-search-container.active 
{
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    opacity: 1;
}

.modul-header-search-mobile-inner
{
    position: relative;
    display: flex;
    align-items: center;
}

.modul-header-search-mobile-inner .modul-header-search-icon
{
    position: absolute;
    left: 10px;
    font-size: 15px;
    color: var(--color-text-light);
    pointer-events: none;
}

.mobile-search-container input 
{
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-sizing: border-box;
    font-family: var(--font-family) !important;
    color: var(--color-text-dark);
    background: var(--color-bg-light);
}

.mobile-search-container input:focus
{
    outline: none;
    border-color: var(--color-action);
    box-shadow: 0 0 0 3px rgba(61, 148, 155, 0.15);
    background: var(--color-card-bg);
}

/* API sağlık — bayrağın solu */
.header-api-saglik
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    color: #6b7280;
    background: rgba(27, 42, 73, 0.06);
    flex-shrink: 0;
}

.header-api-saglik:hover
{
    text-decoration: none;
    color: var(--color-text-dark, #1b2a49);
}

.header-api-saglik .ph
{
    font-size: 18px;
    line-height: 1;
}

.header-api-saglik.is-bekler .ph
{
    animation: headerApiSaglikNabiz 1s ease-in-out infinite;
}

.header-api-saglik.is-ok
{
    color: #fff;
    background: var(--color-success, #008a00);
}

.header-api-saglik.is-uyari
{
    color: #fff;
    background: var(--color-warning, #F39C12);
}

.header-api-saglik.is-hata
{
    color: #fff;
    background: var(--color-danger, #c95245);
}

@keyframes headerApiSaglikNabiz
{
    0%, 100%
    {
        opacity: 0.35;
    }

    50%
    {
        opacity: 1;
    }
}

/* Dil Seçimi */
.header-lang 
{
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header-lang img 
{
    width: 24px;
    height: auto;
    border-radius: 2px;
}

.lang-dropdown 
{
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 10px;
    margin-top: 5px;
    z-index: 1001;
    border: 1px solid var(--color-border);
}

.lang-dropdown.active 
{
    display: block;
}

.lang-option 
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.lang-option:hover 
{
    background: var(--color-bg-light);
}

.lang-option img 
{
    width: 20px;
}

/* Kullanıcı İkonu */
.header-user 
{
    font-size: var(--font-size-xl);
    color: var(--color-text-light);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.header-user:hover 
{
    color: var(--color-action);
}

/* Kullanıcı Dropdown */
.header-user-dropdown
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-user-span.logged-in .user-name.dropdown-toggle
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    cursor: pointer;
    line-height: 1;
}

.user-initial-circle
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--color-primary, #1b2a49);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0;
}

.header-user-info-wrap
{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    max-width: 140px;
    overflow: hidden;
}

.header-user-firma
{
    font-size: 10px;
    font-weight: 400;
    color: var(--color-text-light, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.2;
}

.header-user-metin-ayrac
{
    display: none;
}

.header-user-name
{
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-dark, #1b2a49);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.2;
}

.header-user-caret
{
    font-size: 11px;
    color: var(--color-text-light, #6b7280);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.header-user-span.logged-in .open .header-user-caret,
.header-user-span.logged-in .dropdown.open .header-user-caret
{
    transform: rotate(180deg);
}

.header-user-span.logged-in .dropdown-menu.header-user-dropdown-menu
{
    cursor: pointer;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 1001;
    min-width: 210px;
    margin-top: 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.header-user-dropdown-menu > li > a
{
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-user-dropdown-menu > li > a .ph
{
    font-size: 16px;
    opacity: 0.85;
}

.header-nav-row .yonetim-yatay-menu-wrap
{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.header-nav-row .yonetim-yatay-menu-inner
{
    min-height: 28px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.header-nav-row .yonetim-yatay-menu-list
{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scroll-behavior: auto;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.header-nav-row .yonetim-yatay-menu-list.is-dragging
{
    cursor: grabbing;
}

.header-nav-row .yonetim-yatay-menu-item
{
    cursor: grab;
}

.header-nav-row .yonetim-yatay-menu-list::-webkit-scrollbar
{
    display: none;
}

.header-nav-row .yonetim-yatay-menu-link
{
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    background: rgba(27, 42, 73, 0.07);
    color: var(--color-text-dark, #1b2a49);
}

.header-nav-row .yonetim-yatay-menu-link:hover,
.header-nav-row .yonetim-yatay-menu-item.open > .yonetim-yatay-menu-link,
.header-nav-row .yonetim-yatay-menu-item.is-open > .yonetim-yatay-menu-link
{
    background: var(--color-primary, #1b2a49);
    color: #fff;
}

.header-nav-row .yonetim-yatay-menu-item--admin .yonetim-yatay-menu-link
{
    background: rgba(201, 82, 69, 0.08);
}

.header-nav-row .yonetim-yatay-chevron
{
    font-size: 9px;
}

/* Giriş Butonu */
.header-login 
{
    padding: 6px 15px;
    background: var(--color-action);
    color: var(--color-text-white);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-family: var(--font-family) !important;
    transition: all var(--transition-fast);
}

.header-login:hover
{
    background: var(--color-action-dark);
    color: var(--color-text-white) !important;
}

/* Mobil Menu Butonu */
.mobile-menu-btn 
{
    display: none;
    cursor: pointer;
    padding: 5px;
}

/* Responsive Tasarım */
@media screen and (max-width: 1024px) 
{
    .header-nav-row
    {
        padding: 0 6px;
    }
}

@media screen and (max-width: 900px) 
{
    .header-user-info-wrap
    {
        max-width: 100px;
    }

    .header-search input 
    {
        width: 96px;
    }
}

@media screen and (max-width: 768px) 
{
    .header-inner 
    {
        padding: 0 12px;
        gap: 0;
    }

    .header-nav-row
    {
        padding: 0 4px;
    }

    .header-user-info-wrap
    {
        display: none;
    }

    .header-user-span.logged-in .user-name.dropdown-toggle
    {
        max-width: none;
        gap: 6px;
    }

    .header-right 
    {
        gap: 8px;
        margin-left: auto;
    }
}

@media screen and (max-width: 576px) 
{
    .header-inner 
    {
        padding: 0 10px;
    }

    .header-logo
    {
        flex-shrink: 0;
    }

    .header-nav-row
    {
        display: none !important;
    }

    .header-search 
    {
        display: none;
    }

    .header-search-icon 
    {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 18px;
        color: var(--color-text-dark);
        cursor: pointer;
    }

    .header-right 
    {
        gap: 6px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .user-initial-circle
    {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .header-user-caret
    {
        display: none;
    }

    .header-user-span.logged-in .dropdown-menu.header-user-dropdown-menu
    {
        right: -10px;
    }
} 