/* css/mypage-style.css - 마이페이지 전용 스타일 수정본 */

:root {
    --primary-color: #4e73df;
    --primary-hover: #2e59d9;
    --primary-light: rgba(78, 115, 223, 0.1);
    --bg-light: #f8f9fc;
    --card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    --text-muted: #858796;
    --text-dark: #3a3b45;
    --border-color: #e3e6f0;
    --sidebar-width: 280px;
    --white: #ffffff;
    --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 기본 레이아웃 및 폰트 설정 */
body {
    background-color: var(--bg-light);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: #d1d3e2;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b7b9cc;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* 사이드바 디자인 */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.8px;
}

.sidebar-profile {
    padding: 0 1.5rem 1.5rem;
}

#userIcon {
    background: linear-gradient(135deg, var(--primary-color), #224abe) !important;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.25);
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    margin: 0 auto 15px;
    transition: var(--transition-base);
}

#userIcon:hover {
    transform: scale(1.05) rotate(5deg);
}

/* 사이드바 메뉴 스타일 */
.sidebar-menu .nav-link {
    padding: 12px 24px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-base);
    border-radius: 0;
    border: none;
    background: none;
    width: 100%;
}

.sidebar-menu .nav-link i {
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.sidebar-menu .nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 28px;
}

.sidebar-menu .nav-link:hover i {
    transform: translateX(3px);
}

.sidebar-menu .nav-link.active {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
    font-weight: 700;
    border-right: 4px solid var(--primary-color);
}

/* 메인 콘텐츠 영역 */
#content {
    flex: 1;
    padding: 2.5rem;
    max-width: 1100px;
}

/* 카드 및 컴포넌트 */
.card {
    border: none;
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
    background-color: var(--white);
}

/* 급여 명세서(Pay-Stub) 특화 디자인 */
.pay-stub {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition-base);
}

.pay-stub::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), #224abe);
}

.pay-stub table td:last-child {
    text-align: right;
}

.stub-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
    .pay-stub {
        padding: 1.25rem;
    }
}

/* 폼 스타일 커스텀 */
.form-control {
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    background-color: #fcfcfd;
}

.form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 0.25rem var(--primary-light);
}

.form-control-lg {
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
}

/* 캡차(CAPTCHA) 영역 */
#captchaCanvas {
    background-color: #fff;
    filter: contrast(110%);
    image-rendering: pixelated;
}

/* 애니메이션 효과 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-pane.active {
    animation: fadeIn 0.4s ease-out forwards;
    will-change: transform, opacity;
}

/* 채용 정보 리스트 효과 */
#publicJobList .list-group-item {
    transition: var(--transition-base);
    border-left: 0;
    border-right: 0;
    padding: 1.25rem;
}

#publicJobList .list-group-item:hover {
    background-color: var(--bg-light);
    transform: scale(1.01);
    z-index: 1;
}

/* 반응형 처리 */
@media (max-width: 991.98px) {
    .wrapper {
        flex-direction: column;
    }
    
    #sidebar {
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    #sidebar .sidebar-profile {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
        padding-bottom: 1rem;
    }

    #userIcon {
        width: 45px;
        height: 45px;
        margin: 0;
        font-size: 1.2rem;
    }

    .sidebar-menu {
        flex-direction: row !important;
        overflow-x: auto;
        padding: 0 1rem;
        white-space: nowrap;
    }

    .sidebar-menu .nav-link {
        padding: 10px 15px;
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-menu .nav-link.active {
        border-bottom: 3px solid var(--primary-color);
        background: transparent !important;
    }

    #content {
        padding: 1.25rem;
    }
}

/* 유틸리티 클래스 */
.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), #224abe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}