/* LG전자 UP 통합 인증 시스템 프리미엄 스타일 */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --accent: #f093fb;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
    --info: #0984e3;
    --light: #f5f7fa;
    --dark: #2d3436;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 전역 스타일 */
body {
    font-family: var(--font-family);
    background-color: #f0f2f5;
    color: #444;
    margin: 0;
    overflow-x: hidden;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 전역 레이아웃 구성 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 네비게이션 */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1040;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 사이드바 */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    height: 100%;
}

.sidebar .list-group-item {
    margin: 4px 15px;
    border-radius: var(--border-radius);
    border: none;
    padding: 10px 18px;
    font-weight: 500;
    color: #636e72;
    transition: all 0.2s;
    background: transparent;
}

.sidebar .list-group-item i {
    font-size: 1.1rem;
    width: 25px;
}

.sidebar .list-group-item:hover {
    background-color: #f8f9fa;
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar .list-group-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 콘텐츠 영역 */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: #f8f9fc;
    padding: 30px;
    width: 100%;
}

/* 카드 프리미엄 스타일 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 18px 25px;
    font-weight: 700;
    color: #2d3436;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 통계 카드 */
.stats-card {
    padding: 15px;
}

.stats-card .stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.stats-card.primary .stats-icon {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.stats-card.success .stats-icon {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.stats-card.warning .stats-icon {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning);
}

.stats-card.danger .stats-icon {
    background: rgba(255, 118, 117, 0.1);
    color: var(--danger);
}

/* 테이블 컨테이너 */
.table-responsive {
    border-radius: var(--border-radius);
    background: white;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-top: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px;
    color: #636e72;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    color: #2d3436;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    font-size: 0.9rem;
}

/* 버튼 스타일 */
.btn {
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.82rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* 모바일 전용 스타일 */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 1050;
        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.15);
        border-radius: 0 20px 20px 0;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1045;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        padding: 15px;
    }

    .stats-card {
        margin-bottom: 15px;
    }

    /* 테이블 모바일 최적화 */
    .table-responsive {
        border: 0;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--border-radius);
    }

    .table thead th {
        white-space: nowrap;
    }

    .table tbody td {
        white-space: nowrap;
    }

    /* 필터 영역 모바일 최적화 */
    .row.mb-4>div {
        margin-bottom: 10px;
    }

    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .btn-group-mobile .btn {
        width: 100%;
    }
}

/* 모달 애니메이션 및 유리 효과 */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 10px;
    margin: -5px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 25px;
}

/* 폼 컨트롤 */
.form-control,
.form-select {
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 유리 효과 배경 */
.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* 상태 배지 개선 */
.badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
}

.bg-success {
    background-color: rgba(0, 184, 148, 0.1) !important;
    color: var(--success) !important;
}

.bg-danger {
    background-color: rgba(255, 118, 117, 0.1) !important;
    color: var(--danger) !important;
}

.bg-warning {
    background-color: rgba(253, 203, 110, 0.1) !important;
    color: var(--warning) !important;
}

.bg-info {
    background-color: rgba(9, 132, 227, 0.1) !important;
    color: var(--info) !important;
}

/* 유틸리티 */
.fw-bold-700 {
    font-weight: 700;
}

.mb-panel {
    margin-bottom: 30px;
}

/* --- 추가 프리미엄 스타일 및 로그인 페이지 전용 --- */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-left {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-right {
    padding: 60px 50px;
    background: white;
}

.login-form h3 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-btn {
    height: 54px;
    border-radius: 14px !important;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 1.5rem;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3) !important;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4) !important;
}

@media (max-width: 768px) {
    .login-card-content {
        grid-template-columns: 1fr;
    }

    .login-left {
        padding: 40px 20px;
        min-height: 180px;
    }

    .login-left h2 {
        font-size: 1.8rem;
    }

    .login-left p {
        margin-bottom: 0px;
    }

    .login-features {
        display: none;
    }

    .login-right {
        padding: 40px 25px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 15px;
    }
}

/* 추가 프리미엄 터치: 로딩 애니메이션 및 그림자 */
.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    border: none;
    border-radius: 16px;
}

.badge-pill {
    padding: 5px 12px;
    border-radius: 50px;
}

/* --- 회원가입 및 프로필 전용 프리미엄 스타일 --- */

.signup-container-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.signup-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 850px;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.signup-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 2.5rem 1rem;
    text-align: center;
}

.signup-body {
    padding: 3rem;
}

/* 통계 카드 높이 균일화 */
.row-equal-height {
    display: flex;
    flex-wrap: wrap;
}

.row-equal-height>[class*='col-'] {
    display: flex;
    flex-direction: column;
}

.row-equal-height .card {
    flex: 1;
}

/* 자동완성 프리미엄 스타일 */
.autocomplete-items {
    position: absolute;
    border: none;
    z-index: 1050;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f1f1;
}

.autocomplete-item:hover {
    background-color: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

.autocomplete-item.active {
    background-color: var(--primary) !important;
    color: white !important;
}

/* 해제 요청 모달 전용 스타일 */
#unlockRequestModal .modal-header {
    padding: 2rem !important;
}

.alert-soft-indigo {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    color: var(--primary-dark);
}