/* include되는 다른 화면에 영향을 주지 않도록 헤더 내부에만 적용 */
#dbhb-erp-header,
#dbhb-erp-header * {
    box-sizing: border-box;
}

#dbhb-erp-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
    line-height: 1.5;
}

#dbhb-erp-header a {
    color: inherit;
    text-decoration: none;
}

#dbhb-erp-header button {
    font: inherit;
}

#dbhb-erp-header [hidden] {
    display: none !important;
}

#dbhb-erp-header a:focus-visible,
#dbhb-erp-header button:focus-visible {
    outline: 2px solid #2c6732;
    outline-offset: 4px;
}

#dbhb-erp-header .dbhb-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 80px;
    padding: 0 32px;
}

/* 브랜드 */
#dbhb-erp-header .dbhb-header-brand {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
}

#dbhb-erp-header .dbhb-header-symbol {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #f0f6ee;
}

#dbhb-erp-header .dbhb-header-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#dbhb-erp-header .dbhb-header-brand-text strong {
    color: #2c6732;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.3;
}

#dbhb-erp-header .dbhb-header-brand-text > span {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

/* 시스템 안내 */
#dbhb-erp-header .dbhb-header-description {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 24px;
    border-left: 1px solid #e2e8f0;
}

#dbhb-erp-header .dbhb-header-description strong {
    font-size: 14px;
    font-weight: 700;
}

#dbhb-erp-header .dbhb-header-description > span {
    color: #64748b;
    font-size: 12px;
}

/* 우측 도구 */
#dbhb-erp-header .dbhb-header-tools {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

#dbhb-erp-header .dbhb-header-date {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#dbhb-erp-header .dbhb-header-account {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid #e2e8f0;
}

#dbhb-erp-header .dbhb-header-account-button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 5px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #1e293b;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#dbhb-erp-header .dbhb-header-account-button:hover,
#dbhb-erp-header .dbhb-header-account-button[aria-expanded="true"] {
    background: #f8fafc;
}

#dbhb-erp-header .dbhb-header-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f6ee;
    color: #2c6732;
    font-size: 14px;
    font-weight: 700;
}

#dbhb-erp-header .dbhb-header-account-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 60px;
}

#dbhb-erp-header .dbhb-header-account-text strong {
    font-size: 14px;
    font-weight: 700;
}

#dbhb-erp-header .dbhb-header-account-text > span {
    color: #64748b;
    font-size: 12px;
}

#dbhb-erp-header .dbhb-header-arrow {
    flex-shrink: 0;
    margin-left: 4px;
    color: #64748b;
    transition: transform 0.15s ease;
}

#dbhb-erp-header [aria-expanded="true"] .dbhb-header-arrow {
    transform: rotate(180deg);
}

/* 관리자 드롭다운 */
#dbhb-erp-header .dbhb-header-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(250px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

#dbhb-erp-header .dbhb-header-dropdown-info {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

#dbhb-erp-header .dbhb-header-dropdown-info strong {
    font-size: 14px;
    font-weight: 700;
}

#dbhb-erp-header .dbhb-header-dropdown-info p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
}

#dbhb-erp-header .dbhb-header-dropdown-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
}

#dbhb-erp-header .dbhb-header-dropdown-link:hover {
    background: #f8fafc;
}

/* 하단 브랜드 라인 */
#dbhb-erp-header .dbhb-header-accent {
    display: flex;
    height: 2px;
    background: #f8fafc;
}

#dbhb-erp-header .dbhb-header-accent span:first-child {
    width: 96px;
    background: #2c6732;
}

#dbhb-erp-header .dbhb-header-accent span:last-child {
    width: 48px;
    background: #f2b69d;
}

#dbhb-erp-header .dbhb-header-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1100px) {
    #dbhb-erp-header .dbhb-header-description {
        display: none;
    }
}

@media (max-width: 767px) {
    #dbhb-erp-header .dbhb-header-inner {
        gap: 12px;
        min-height: 72px;
        padding: 0 16px;
    }

    #dbhb-erp-header .dbhb-header-date {
        display: none;
    }

    #dbhb-erp-header .dbhb-header-tools {
        gap: 0;
    }

    #dbhb-erp-header .dbhb-header-account {
        padding-left: 0;
        border-left: 0;
    }

    #dbhb-erp-header .dbhb-header-brand-text strong {
        font-size: 19px;
    }
}

@media (max-width: 479px) {
    #dbhb-erp-header .dbhb-header-account-text {
        display: none;
    }

    #dbhb-erp-header .dbhb-header-brand {
        gap: 9px;
    }

    #dbhb-erp-header .dbhb-header-account-button {
        gap: 6px;
        padding: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #dbhb-erp-header .dbhb-header-account-button,
    #dbhb-erp-header .dbhb-header-arrow {
        transition: none;
    }
}
