/* nav.css - 사이트 공통 네비게이션 */

.stura-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 11000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stura-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stura-nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.stura-nav-tagline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.stura-nav-tagline .line1,
.stura-nav-tagline .line2 {
    font-size: 11px;
    font-weight: 500;
    color: #4b5563;
    letter-spacing: -0.01em;
}

.stura-nav-logo img {
    height: 36px;
    display: block;
}

.stura-nav-logo img.stura-nav-icon {
    height: 40px;
    width: 40px;
    margin-right: -8px; /* 아이콘과 로고 사이 간격을 좁히기 위해 음수 마진 적용 */
    margin-top: -2px; /* 아이콘 높이 정렬 조정 (5px에서 2px로 완화) */
}

.stura-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.stura-nav-links a {
    text-decoration: none;
    color: #888;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}

.stura-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1a1a1a;
    border-radius: 0;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.stura-nav-links a:hover {
    color: #1a1a1a;
}

.stura-nav-links a:hover::after {
    transform: scaleX(1);
}

.stura-nav-links a.active {
    color: #1a1a1a;
    font-weight: 500;
}

.stura-nav-links a.active::after {
    transform: scaleX(1);
}

.stura-nav-login {
    color: #fff !important;
    font-weight: 500 !important;
    background: #1a1a1a;
    padding: 6px 16px !important;
    border-radius: 0;
    transition: background 0.2s, color 0.2s !important;
}

.stura-nav-login:hover {
    background: #333 !important;
    color: #fff !important;
}

.stura-nav-login::after {
    display: none !important;
}

/* 프로필 드롭다운 */
.stura-nav-dropdown {
    position: relative;
}

.stura-nav-dropdown-trigger {
    cursor: pointer;
}

.stura-nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 8px 0 4px 0;
    min-width: 120px;
    z-index: 1001;
}

.stura-nav-dropdown:hover .stura-nav-dropdown-menu {
    display: block;
}

.stura-nav-dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #555 !important;
    font-weight: 400 !important;
    white-space: nowrap;
}
.stura-nav-logout-form {
    margin: 0;
    padding: 0;
}
.stura-nav-dropdown-menu li .stura-nav-logout-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    font-size: 13px;
    color: #555 !important;
    font-weight: 400 !important;
    border: 0;
    background: #fff;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.stura-nav-dropdown-menu li a::after {
    display: none !important;
}

.stura-nav-dropdown-menu li a:hover {
    background: #f5f5f5;
    color: #1a1a1a !important;
}
.stura-nav-dropdown-menu li .stura-nav-logout-btn:hover {
    background: #f5f5f5;
    color: #1a1a1a !important;
}

/* Admin 하위 링크 - 데스크톱에서는 숨김 */
.stura-nav-admin-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 언어 전환 토글 */
.stura-nav-lang {
    margin-left: 4px;
}

.stura-lang-toggle {
    display: inline-block;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #666 !important;
    border: 1px solid #d1d5db;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.stura-lang-toggle:hover {
    color: #1a1a1a !important;
    border-color: #1a1a1a;
}

.stura-lang-toggle::after {
    display: none !important;
}

.stura-nav-toggle {
    display: none;
}

.stura-nav-line {
    display: none;
}

.stura-nav-backdrop {
    display: none;
}

@media (max-width: 900px) {
    body.stura-nav-open {
        overflow: auto;
    }

    .stura-nav-inner {
        padding: 0 16px;
        height: 56px;
    }

    .stura-nav-logo img {
        height: 30px;
    }

    .stura-nav-logo img.stura-nav-icon {
        width: 34px;
        height: 34px;
        margin-right: -6px;
    }

    .stura-nav-tagline {
        display: none;
    }

    .stura-nav-toggle {
        display: inline-flex;
        position: relative;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 36px;
        height: 36px;
        border: 1px solid #d1d5db;
        background: #fff;
        cursor: pointer;
        z-index: 11025;
    }

    .stura-nav-toggle.is-open {
        border-color: #1a1a1a;
    }

    .stura-nav-line {
        display: block;
        width: 18px;
        height: 2px;
        background: #1a1a1a;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .stura-nav-toggle.is-open .stura-nav-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .stura-nav-toggle.is-open .stura-nav-line:nth-child(2) {
        opacity: 0;
    }

    .stura-nav-toggle.is-open .stura-nav-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .stura-nav-links {
        position: fixed;
        top: 56px;
        right: 0;
        height: calc(100dvh - 56px);
        width: min(34vw, 125px);
        background: transparent;
        border-left: none;
        padding: 10px 10px 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        overflow: visible;
        z-index: 11020;
        box-shadow: none;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        pointer-events: none;
    }

    .stura-nav-links.is-open {
        transform: translateX(0);
        pointer-events: none;
    }

    .stura-nav-links.is-open li,
    .stura-nav-links.is-open a {
        pointer-events: auto;
    }

    .stura-nav-backdrop {
        display: none;
    }

    .stura-nav-links li {
        width: 100%;
    }

    .stura-nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.35;
        color: #1a1a1a;
        border: 2px solid #e5e7eb;
        background: #fff;
        box-sizing: border-box;
    }

    .stura-nav-links a::after {
        display: none;
    }

    .stura-nav-links a.active {
        border-color: #1a1a1a;
        background: #f8f9fa;
    }

    .stura-nav-dropdown {
        width: 100%;
    }

    .stura-nav-links .stura-nav-dropdown-trigger {
        display: none !important;
    }

    .stura-nav-dropdown-menu {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        position: static;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: transparent;
        min-width: 0;
        list-style: none;
    }

    .stura-nav-dropdown-menu li a {
        display: flex !important;
        align-items: center;
        width: 100%;
        font-size: 12px;
        min-height: 36px;
        padding: 8px 10px;
        border: 2px solid #1a1a1a;
        background: #1a1a1a;
        color: #fff !important;
        font-weight: 600 !important;
        box-sizing: border-box;
    }
    .stura-nav-dropdown-menu li .stura-nav-logout-btn {
        display: flex !important;
        align-items: center;
        width: 100%;
        font-size: 12px;
        min-height: 36px;
        padding: 8px 10px;
        border: 2px solid #1a1a1a;
        background: #1a1a1a;
        color: #fff !important;
        font-weight: 600 !important;
        box-sizing: border-box;
        cursor: pointer;
        font-family: inherit;
    }
    .stura-nav-dropdown-menu li a:hover {
        border-color: #333;
        background: #333;
        color: #fff !important;
    }
    .stura-nav-dropdown-menu li .stura-nav-logout-btn:hover {
        border-color: #333;
        background: #333;
        color: #fff !important;
    }

    .stura-nav-login {
        justify-content: center;
        min-height: 36px;
    }
    .stura-nav-links a.stura-nav-login {
        background: #1a1a1a !important;
        color: #fff !important;
        border-color: #1a1a1a !important;
        font-weight: 600 !important;
    }
    .stura-nav-links a.stura-nav-login:hover {
        background: #333 !important;
        color: #fff !important;
        border-color: #333 !important;
    }

    /* Admin 그룹 - 모바일 */
    .stura-nav-admin-group {
        width: 100%;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid #d1d5db;
    }

    .stura-nav-links .stura-nav-admin-trigger {
        display: none !important;
    }

    .stura-nav-admin-links {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        position: static;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: transparent;
        min-width: 0;
        list-style: none;
    }

    .stura-nav-admin-links li a {
        display: flex !important;
        align-items: center;
        width: 100%;
        font-size: 12px;
        min-height: 36px;
        padding: 8px 10px;
        border: 2px solid #e5e7eb;
        background: #fff;
        color: #1a1a1a !important;
        box-sizing: border-box;
    }

    .stura-nav-admin-links li a.active {
        border-color: #1a1a1a;
        background: #f8f9fa;
    }

    .stura-nav-lang {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding-top: 84px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .page-title,
    .notice-title,
    .detail-title {
        font-size: clamp(22px, 7vw, 30px) !important;
        line-height: 1.25 !important;
        word-break: keep-all;
    }

    .products-grid,
    .quick-stats-grid,
    .stats-grid,
    .sub-card-grid,
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        width: calc(100% - 24px) !important;
        max-width: 560px !important;
        padding: 18px !important;
    }

    .period-selector {
        gap: 6px !important;
    }

    .csv-btn {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .chart-container {
        height: 220px !important;
    }

    .action-btns {
        flex-wrap: wrap !important;
    }
}
