/**
 * ============================================================================
 * 회원 대시보드 - 풀스크린 스타일
 * ============================================================================
 *
 * 파일: /assets/css/member-dashboard.css
 * 설명: 회원 대시보드 전용 스타일시트
 *
 * ============================================================================
 */

/* ========================================================================
   풀스크린 대시보드 래퍼
   ======================================================================== */

.member-dashboard-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 활성화 상태 */
.member-dashboard-fullscreen.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================================================
   반투명 배경
   ======================================================================== */

.dashboard-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* ========================================================================
   메인 컨테이너
   ======================================================================== */

.dashboard-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* ========================================================================
   헤더 (닫기 버튼 영역)
   ======================================================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    z-index: 10;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.dashboard-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-close:hover {
    background: #f5f5f5;
    color: #333;
}

.dashboard-close:active {
    transform: scale(0.95);
}

/* ========================================================================
   메인 컨텐츠 (2컬럼)
   ======================================================================== */

.dashboard-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================================================
   좌측: 회원 정보 카드
   ======================================================================== */

/* .dashboard-sidebar {
    width: 430px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
} */
/* 여기부터 바꿈 이상하다 그러면 이부분 지워버리면 댐*/
.dashboard-sidebar {
    width: 430px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    /* overflow-y: auto; */
}

/* 스크롤바 스타일 */
.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.info-card.memo-sticky {
    display: flex;
    flex-direction: column;
    height: calc(83vh - 100px);
    overflow: hidden;
    padding-bottom: 0;
}

#MemCardMemo {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0;
    min-height: 0;
    padding-bottom: 10px;
}

@media(max-width :1300px){

    .info-card.memo-sticky {
        height: calc(72vh - 100px);
    }

}

/* 반응형 추가 */
@media (max-width: 1200px) {
    .dashboard-sidebar {
        width: 300px;
    }

    .tab-item {
        padding: 12px 20px;
    }

    /* 높이 조정 */
    .info-card.memo-sticky {
        height: calc(92vh - 120px);
    }
}

@media (max-width: 992px) {
    .dashboard-header {
        padding: 15px 20px;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    .dashboard-sidebar {
        width: 220px;
    }

    .tab-content-wrapper {
        padding: 20px;
    }

    /* 높이 조정 */
    .info-card.memo-sticky {
        height: calc(100vh - 140px);
    }

    /* textarea 높이 줄이기 */
    #MM_Reg textarea {
        height: 80px !important;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 50vh; /* 40vh에서 50vh로 증가 */
        overflow: visible; /* 스크롤 제거 */
    }

    /* 메모 카드 높이 자동 조정 */
    .info-card.memo-sticky {
        height: auto;
        max-height: calc(40vh - 60px);
        min-height: 345px; /* 최소 높이 보장 */
    }

    /* 메모 리스트 영역 축소 */
    #MemCardMemo {
        max-height: calc(50vh - 200px);
    }

    .dashboard-tabs {
        overflow-x: auto;
    }

    .tab-item {
        flex-shrink: 0;
        padding: 12px 20px;
        font-size: 14px;
    }

    .tab-content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 12px 15px;
    }

    .dashboard-header h2 {
        font-size: 18px;
    }

    .dashboard-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .member-profile {
        padding: 15px;
    }

    .member-avatar {
        font-size: 48px;
    }

    .member-profile h3 {
        font-size: 18px;
    }

    .tab-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .tab-item i {
        margin-right: 4px;
    }

    /* 모바일에서 메모 카드 높이 조정 */
    .info-card.memo-sticky {
        min-height: 350px;
        max-height: calc(41vh - 40px);
    }

    /* textarea 더 작게 */
    #MM_Reg textarea {
        height: 60px !important;
        font-size: 14px;
    }

    /* padding 축소 */
    #MM_Reg {
        padding: 10px;
    }

    .MM_Button {
        margin-top: 8px;
    }

    .MM_Button .btn {
        min-width: 60px;
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* 여기부터 바꿈*/


/* ========================================================================
   회원 프로필
   ======================================================================== */

.member-profile {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.member-avatar {
    font-size: 64px;
    color: #007bff;
    margin-bottom: 10px;
}

.member-profile h3 {
    margin: 10px 0 5px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.member-profile p {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px;
}

/* ========================================================================
   정보 카드
   ======================================================================== */

.info-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.info-card h4 i {
    margin-right: 5px;
    color: #007bff;
}

/* 정보 리스트 */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li i {
    margin-right: 8px;
    color: #007bff;
    width: 16px;
}

.info-list li .text-muted {
    color: #6c757d;
}

/* 통계 리스트 */
.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    padding: 10px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.stats-list li:last-child {
    border-bottom: none;
}

.stats-list li i {
    margin-right: 8px;
}

.stats-list strong {
    font-size: 16px;
}

/* 빠른 액션 버튼 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================================================
   우측: 탭 컨텐츠 영역
   ======================================================================== */

.dashboard-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================================================
   탭 네비게이션
   ======================================================================== */

.dashboard-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #e0e0e0;
    background: #fff;
}

.tab-item {
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.tab-item:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-item.active {
    border-bottom-color: #007bff;
    color: #007bff;
    background: #f8f9fa;
}

.tab-item i {
    margin-right: 8px;
}

/* ========================================================================
   탭 컨텐츠 래퍼
   ======================================================================== */

.tab-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #fff;
}

/* 스크롤바 스타일 */
.tab-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.tab-content-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tab-content-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.tab-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================================================
   로딩 상태
   ======================================================================== */

.loading-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

.loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ========================================================================
   메모 영역
   ======================================================================== */

.memo-input-area {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.memo-input-area textarea {
    resize: vertical;
    min-height: 80px;
}

.memo-item {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.memo-item.important {
    border-left: 4px solid #dc3545;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.memo-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.memo-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

/* ========================================================================
   반응형 (작은 화면)
   ======================================================================== */

@media (max-width: 1200px) {
    .dashboard-sidebar {
        width: 300px;
    }

    .tab-item {
        padding: 12px 20px;
    }
}

@media (max-width: 992px) {
    .dashboard-header {
        padding: 15px 20px;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    .dashboard-sidebar {
        width: 220px;
    }

    .tab-content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 40vh;
    }

    .dashboard-tabs {
        overflow-x: auto;
    }

    .tab-item {
        flex-shrink: 0;
        padding: 12px 20px;
        font-size: 14px;
    }

    .tab-content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 12px 15px;
    }

    .dashboard-header h2 {
        font-size: 18px;
    }

    .dashboard-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .member-profile {
        padding: 15px;
    }

    .member-avatar {
        font-size: 48px;
    }

    .member-profile h3 {
        font-size: 18px;
    }

    .tab-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .tab-item i {
        margin-right: 4px;
    }
}

/* ========================================================================
   유틸리티 클래스
   ======================================================================== */

.text-primary {
    color: #007bff !important;
}

.text-success {
    color: #28a745 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* ========================================================================
   애니메이션
   ======================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}


.form-inline {
    display: flex;
    flex-wrap: wrap; /* nowrap -> wrap으로 변경 */
    align-items: center;
}

.form-inline .form-group {
    margin-bottom: 5px; /* 줄바꿈 됐을 때를 위한 여백 */
}

.form-inline .form-control {
    min-width: 120px; /* 최소 너비 설정 */
}

.form-inline input[type="date"] {
    min-width: 150px;
}

.btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    margin-top: 5px; /* 버튼이 내려갔을 때 여백 */
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .form-inline .form-group {
        flex: 0 0 48%; /* 모바일에서는 2개씩 */
        margin-bottom: 10px;
    }
    
    .form-inline .btn {
        flex: 0 0 48%;
    }
}

@media (max-width: 576px) {
    .form-inline .form-group {
        flex: 0 0 100%; /* 작은 화면에서는 1개씩 */
    }
    
    .form-inline .btn {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }
}