/* main_style.css - 통합 스타일시트 */

/* ===== 기본 스타일 및 레이아웃 ===== */
body {
    margin: 0;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    min-height: 100vh;
    box-sizing: border-box;
    background: white;
    display: flex;
    flex-direction: column;
}

/* ===== 로그인/회원가입 분할 화면 레이아웃 ===== */
.split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.split-left {
    flex-basis: 50%;
    background: linear-gradient(135deg, #ff8a5c 0%, #ff7e36 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.welcome-content {
    max-width: 450px;
    text-align: left;
}

.welcome-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.welcome-content p {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.welcome-content ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    font-size: 16px;
    line-height: 2;
}

.split-right {
    flex-basis: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== 폼 컨테이너 (로그인/회원가입) ===== */
.form-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: left;
}

.form-container h2 {
    font-size: 28px;
    color: #ff7e36;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 500;
    color: #1c1e21;
    transition: border-color 0.2s ease-in-out;
}

.input-group input:focus {
    outline: none;
    border-color: #ff7e36;
}

/* ===== 버튼 스타일 ===== */
.btn-login {
    padding: 12px;
    background-color: #ff7e36;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn-login:hover {
    background-color: #e66a26;
}

.btn-register {
    display: block;
    padding: 12px;
    background-color: #28a745;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

.btn-register:hover {
    background-color: #218838;
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #6c757d;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.form-actions .btn-login,
.form-actions .btn-register {
    flex: 1;
}

.find-account-link {
    display: block;
    margin-top: 25px;
    font-size: 14px;
    color: #606770;
    text-align: center;
}

/* ===== 메인 레이아웃 컨테이너 ===== */
.main-layout-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px;
    gap: 10px;
}

.page-content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 5px auto 0;
    box-sizing: border-box;
    padding-bottom: 80px;
    background: white;
    padding: 0px 0px;
    min-height: calc(100vh - 80px);
}

.main-container {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: calc(100vh - 200px);
    max-width: 1000px;
    margin: 0 auto;
    min-width: 0;
}

/* ===== 사이드바 레이아웃 ===== */
.site-sidebar,
.board-nav-container {
    width: 300px;
    min-width: 280px;
    box-sizing: border-box;
    flex: 0 0 260px;
    max-width: 320px;
    min-width: 200px;
    padding: 20px;
    background: transparent;
}

.sidebar-top-container {
    margin-bottom: 14px;
}

.sidebar-main-container {
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    padding: 8px 10px;
}

/* ===== 사이드바 프로필 카드 ===== */
.sidebar-profile-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e6e8eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px;
    margin-bottom: 12px;
}

/* 상단 그리드: 프로필 사진 + 닉네임/로그아웃 */
.spc-grid {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.spc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e6e8eb;
    overflow: hidden;
    position: relative;
}

.spc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 우측 유저 정보 */
.spc-user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.spc-nickname {
    font-size: 18px;
    font-weight: 700;
    color: #202124;
    line-height: 1.3;
}

.spc-btn-logout {
    display: inline-block;
    padding: 6px 14px;
    background: #6c757d;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    width: fit-content;
}

.spc-btn-logout:hover {
    background: #5a6268;
}

/* 하단: 캐롯포인트 | 회원등급 (1:1 그리드) */
.spc-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.spc-stats-row .summary-card {
    background-color: #fff9f2;
    border: 1px solid #ffe8d6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.spc-stats-row .summary-card h3 {
    margin: 0 0 4px;
    font-size: 13px;
    color: #d96824;
    font-weight: 600;
}

.spc-stats-row .summary-card p {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ff7e36;
}

.spc-stats-row .summary-card p.small-text {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* 하단 4탭 */
.spc-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid #e6e8eb;
    margin-top: 8px;
}

.spc-tab {
    padding: 10px 0;
    text-align: center;
    color: #3c4043;
    border-right: 1px solid #e6e8eb;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.spc-tab:last-child {
    border-right: none;
}

.spc-tab:hover {
    background: #f6f8fa;
}

/* 반응형 */
@media (max-width: 767px) {
    .spc-grid {
        grid-template-columns: 56px 1fr;
        gap: 10px;
    }
    .spc-avatar {
        width: 56px;
        height: 56px;
    }
    .spc-nickname {
        font-size: 16px;
    }
    .spc-stats-row {
        gap: 6px;
    }
}

/* ===== 게시판 목록 테이블 ===== */
.post-list {
    width: 100%;
    border-collapse: collapse;
}

.post-list th, .post-list td {
    padding: 10px 5px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.post-list th:nth-child(1), .post-list td:nth-child(1) { padding-left: 5px; padding-right: 5px; }
.post-list th:nth-child(2), .post-list td:nth-child(2) { padding-left: 5px; padding-right: 5px; }

/* 컬럼 너비 */
.post-list th[width="6%"] { width: 6%; }
.post-list th[width="10%"] { width: 10%; }
.post-list th[width="48%"] { width: 48%; }
.post-list th[width="15%"] { width: 15%; }
.post-list th[width="13%"] { width: 13%; }
.post-list th[width="12%"] { width: 12%; }
.post-list th[width="14%"] { width: 14%; }
.post-list th[width="50%"] { width: 50%; }

.post-list th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.post-list .title {
    text-align: left;
}

.post-list .title a {
    text-decoration: none;
    color: #333;
    display: inline-block;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.post-list .title a:hover {
    text-decoration: underline;
}

.title-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.title-content a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-list .sold-out {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.post-list .sold-out a {
    color: #6c757d;
}

.post-list .thumbnail {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #eee;
    vertical-align: middle;
}

.post-list tr.notice-post {
    background-color: #fffbe6;
    font-weight: 600;
}

.notice-badge {
    background-color: #ffc107;
    color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 5px;
}

.comment-count-badge {
    margin-left: 8px;
    color: #8b95a0;
    font-size: 13px;
}

.image-icon {
    font-size: 12px;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
}

/* ===== 상태 배지 스타일 ===== */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.status-badge.status-reserved {
    background-color: #FFA500;
    color: #4A2E00;
}

.status-badge.status-completed,
.status-badge.status-sold {
    background-color: #E53935;
    color: #FFFFFF;
}

/* 기존 style.css의 배지(제거된 중복) */
.status-selling {
    background-color: #28a745;
}
.status-reserved {
    background-color: #ffc107;
    color: #212529;
}
.status-completed {
    background-color: #6c757d;
}

/* ===== 검색 폼 ===== */
.search-form-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-form-container form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form-container select,
.search-form-container input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form-container select:focus,
.search-form-container input[type="text"]:focus {
    outline: none;
    border-color: #ff7e36;
    box-shadow: 0 0 0 2px rgba(255, 126, 54, 0.2);
}

.search-form-container select {
    flex-basis: 150px;
}

.search-form-container input[type="text"] {
    flex-grow: 1;
}

.search-form-container button {
    flex-shrink: 0;
    padding: 10px 22px;
    background-color: #ff7e36;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.search-form-container button:hover {
    background-color: #e66a26;
}

/* ===== 페이지네이션 ===== */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination .page-link, .pagination .page-link-side {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #606770;
    background-color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.pagination .page-link {
    min-width: 36px;
}

.pagination .page-link.active {
    background-color: #ff7e36;
    color: white;
    border-color: #ff7e36;
    box-shadow: 0 2px 6px rgba(255, 126, 54, 0.3);
}

.pagination .page-link:hover:not(.active), .pagination .page-link-side:hover {
    border-color: #ff7e36;
    color: #ff7e36;
}

/* ===== 알림 배지 ===== */
.notification-badge {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: bold;
    vertical-align: super;
    margin-left: 4px;
    line-height: 1;
}

/* ===== 작성자 메뉴 드롭다운 ===== */
.author-menu-dropdown {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 100;
    padding: 0;
    min-width: 160px;
    overflow: hidden;
}

.author-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    text-align: left;
}

.author-menu-dropdown a:hover {
    background-color: #f5f5f5;
}

.author-link {
    text-decoration: none;
    color: #333;
    cursor: pointer;
}

.author-link:hover {
    text-decoration: underline;
}

/* ===== 모바일 푸터 네비게이션 ===== */
.mobile-footer-nav {
    display: flex;
    width: 100%;
    max-width: 450px;
    margin: 0 auto 10px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer-nav-btn {
    flex: 1;
    position: relative;
    padding: 12px 5px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.footer-nav-btn.main-action {
    background-color: #007bff;
    color: white;
}

.footer-nav-btn .notification-badge {
    vertical-align: super;
    margin-left: 4px;
    border: 1px solid white;
}

/* ===== 메인 소개(인트로) 및 요약 그리드 ===== */

/* 상단 3분할 요약 */
.summary-container { padding-top: 20px; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.summary-section {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.summary-header h2 {
    margin: 0;
    font-size: 18px;
    color: #343a40;
}

.summary-header .more-link {
    font-size: 13px;
    color: #868e96;
    text-decoration: none;
    font-weight: 600;
}

.summary-post-list {
    list-style: none;
    padding: 0;
    min-height: 330px; /* 레이아웃 안정화 */
    margin: 0;
}

.summary-post-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}
.summary-post-list li:last-child { border-bottom: none; }

.summary-post-list li a {
    display: grid;
    grid-template-columns: auto 1fr auto; /* [카테고리] 제목 댓글수 */
    gap: 8px;
    align-items: center;
    text-decoration: none;
    color: #495057;
    overflow: hidden;
    font-size: 14px;
}
.summary-post-list li a:hover .summary-title { text-decoration: underline; }

.summary-post-list .summary-category {
    color: #868e96;
    white-space: nowrap;
}
.summary-post-list .summary-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.summary-post-list .summary-comment-count {
    color: #ff7e36;
    font-weight: 600;
    white-space: nowrap;
}
.summary-post-list .no-posts {
    color: #adb5bd;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* 구분선 */
.section-divider {
    border: 0;
    height: 1px;
    background-color: #e9ecef;
    margin: 25px 0;
}

/* 하단 2분할 인트로 */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.intro-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
}

/* 반응형: 좁은 화면에서 1열로 전환 */
@media (max-width: 767px) {
    .summary-grid { grid-template-columns: 1fr; gap: 16px; }
    .summary-post-list { min-height: 0; }
    .intro-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ===== 반응형: 데스크톱 (768px 이상) ===== */
@media (min-width: 768px) {
    .post-list {
        min-width: 720px;
    }

    .board-nav-container {
        display: flex;
        flex-direction: column;
        width: 180px;
        flex-shrink: 0;
        padding: 0px 0;
        margin-top: 0;
        margin-bottom: 0;
        border: 0px solid #dee2e6;
        border-radius: 0px;
        background-color: #ffffff;
        height: auto;
        position: static;
        overflow-x: visible;
        white-space: normal;
    }

    .board-nav-btn {
        display: block;
        width: auto;
        text-align: left;
        margin: 0 10px 5px;
        padding: 10px 15px;
        border: none;
        border-radius: 6px;
    }

    .board-nav-btn:hover {
        background-color: #fff3e0;
        color: #ff7e36;
    }

    .board-nav-btn.active:hover {
        background-color: rgba(255, 126, 54, 0.1);
        color: #ff7e36;
    }
}

/* ===== 반응형: 모바일 (767px 이하) ===== */
@media (max-width: 767px) {
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .split-left {
        flex-basis: auto;
        min-height: auto;
        padding: 10px 20px;
    }

    .welcome-logo {
        display: none;
    }

    .split-right {
        flex-basis: auto;
        padding: 20px;
        flex-grow: 1;
        display: flex;
        align-items: center;
    }

    .welcome-content h1 {
        margin-top: 0;
        font-size: 32px;
    }

    .welcome-content p {
        font-size: 16px;
    }

    .form-container {
        padding: 0 20px 20px;
        box-shadow: none;
    }

    .form-container h2 {
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .input-group {
        margin-bottom: 15px;
    }

    .find-account-link {
        margin-top: 20px;
    }

    .register-page .split-left {
        display: none;
    }

    .site-sidebar,
    .board-nav-container {
        width: auto;
        min-width: 0;
    }

    .sidebar-main-container {
        margin: 0 12px;
    }

    .sidebar-profile-card {
        border-radius: 10px;
        padding: 12px;
        margin: 12px;
    }

    .sidebar-profile-card .spc-header {
        grid-template-columns: 48px 1fr auto;
        gap: 8px;
    }

    .spc-avatar {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .spc-actions {
        gap: 6px;
    }

    .spc-tabs {
        grid-template-columns: repeat(4, 1fr);
    }

    .spc-tab {
        font-size: 12px;
        padding: 9px 0;
    }

    .mobile-footer-nav {
        max-width: 412px;
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
    }

    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* --- 로그인/회원 관련 누락된 보조 스타일 복구 --- */
.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.remember-me {
    margin-top: 15px;
    text-align: left;
    font-size: 14px;
    color: #606770;
}
.remember-me input {
    margin-right: 5px;
    vertical-align: middle;
}

/* 필요 시 추가: 로그인 페이지 전용 중앙 정렬 좁은 화면 대응 */
@media (max-width: 767px) {
    .login-page-body {
        align-items: flex-start;
        padding-top: 30px;
    }
    .form-container {
        max-width: 380px;
    }
}

/* ===== 커스텀 셀렉트 박스 스타일 (카테고리 드롭다운) ===== */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 220px;
    font-family: 'Noto Sans KR', Arial, sans-serif;
}

.custom-select-trigger {
    background: #fff;
    border: 1px solid #e6e9ee;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-trigger:hover {
    border-color: #ff7e36;
}

.custom-select-trigger::after {
    content: '▼';
    font-size: 10px;
    color: #999;
    margin-left: 8px;
}

.custom-select-options {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    width: 100%;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(30,40,60,0.06);
    z-index: 40;
    max-height: 260px;
    overflow: auto;
}

.custom-select-options.open {
    display: block;
}

.custom-select-options .option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.15s;
}

.custom-select-options .option:hover {
    background: #fff8f2;
    color: #ff7e36;
}

.custom-select-options .option.selected {
    background: #fff3e0;
    color: #ff7e36;
    font-weight: 600;
}

/* ===== 글쓰기 버튼 스타일 ===== */
.btn-register-item {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    background: linear-gradient(180deg, #ff8a3d, #ff6a00);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255,110,40,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-register-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,110,40,0.18);
}

.btn-register-item:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(255,110,40,0.12);
}

/* 목록 하단 액션 영역 (페이지네이션 + 글쓰기) */
.list-footer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.pagination {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.write-button-container {
    order: 2;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
}

.btn-register-item {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    background: linear-gradient(180deg, #ff8a3d, #ff6a00);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255,110,40,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* ===== 포인트 내역 모달 ===== */
.point-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.point-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.point-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e6e8eb;
}

.point-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #202124;
}

.point-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9aa0a6;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.point-modal-close:hover {
    color: #202124;
}

.point-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.current-points {
    font-size: 16px;
    color: #5f6368;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.current-points strong {
    color: #1a73e8;
    font-size: 20px;
    margin-left: 8px;
}

.point-history-list {
    min-height: 200px;
}

.point-history-table {
    width: 100%;
    border-collapse: collapse;
}

.point-history-table thead th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    border-bottom: 2px solid #e6e8eb;
}

.point-history-table tbody td {
    padding: 12px 8px;
    font-size: 14px;
    border-bottom: 1px solid #f1f3f5;
}

.point-history-table tbody tr:last-child td {
    border-bottom: none;
}

.point-plus {
    color: #34a853;
    font-weight: 600;
}

.point-minus {
    color: #ea4335;
    font-weight: 600;
}

.loading,
.error,
.no-history {
    text-align: center;
    padding: 40px 20px;
    color: #9aa0a6;
    font-size: 14px;
}

.error {
    color: #ea4335;
}

/* 포인트 영역 호버 효과 */
.spc-points:hover {
    background: #f6f8fa;
    border-radius: 4px;
    padding: 4px 6px;
    margin: -4px -6px;
}

/* 반응형 */
@media (max-width: 767px) {
    .point-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .point-modal-header {
        padding: 16px 20px;
    }
    
    .point-modal-body {
        padding: 16px;
    }
    
    .point-history-table {
        font-size: 13px;
    }
    
    .point-history-table thead th,
    .point-history-table tbody td {
        padding: 10px 6px;
    }
}

/* 사이드바 요약 카드 재사용 (mypage_info.php 호환) */
.summary-card {
    background-color: #fff9f2;
    border: 1px solid #ffe8d6;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
    box-sizing: border-box;
}
.summary-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: #d96824;
    font-weight: 600;
}
.summary-card p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ff7e36;
}
.summary-card p.small-text {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

/* 사이드바용 크기 조정 */
.sidebar-carrot-card,
.sidebar-level-card {
    margin-top: 6px;
}
.sidebar-carrot-card p { font-size: 16px; }
.sidebar-level-card p.small-text { font-size: 13px; }

/* 좁은 화면 최적화 */
@media (max-width: 767px){
    .summary-card { padding:10px 12px; }
    .summary-card h3 { font-size:13px; }
    .summary-card p { font-size:16px; }
}

/* ===== 캐롯포인트 변동내역 오버레이 (사이드바에서 클릭 시 표시) ===== */
.rating-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none; /* 초기 숨김 */
    justify-content: center;
    align-items: center;
    z-index: 1001;
}
.rating-popup {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.rating-popup h2 {
    margin-top: 0;
    text-align: center;
    color: #ff7e36;
    font-size: 20px;
}
.point-history-list {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
}
.point-history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}
.point-history-list li:last-child { border-bottom: none; }
.history-points.gain { font-weight: 700; color: #28a745; flex-basis: 80px; }
.history-points.loss { font-weight: 700; color: #dc3545; flex-basis: 80px; }
.history-reason { flex-grow: 1; color: #333; text-align: left; padding: 0 10px; }
.history-date { font-size: 13px; color: #606770; flex-basis: 90px; text-align: right; }
.popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.btn-close-gift-popup {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #6c757d;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.btn-close-gift-popup:hover { background: #5a6268; }

@media (max-width: 767px) {
    .rating-popup { padding: 22px; max-width: 90%; }
    .point-history-list li { flex-wrap: wrap; gap: 6px; }
    .history-reason { flex-basis: 100%; padding: 0; }
    .history-date { flex-basis: auto; }
}

/* ===== edit_profile (내 정보 수정) ===== */
.edit-profile-container {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 16px;
    background: transparent;      /* main-container 배경 제거 대체 */
    box-shadow: none;              /* 기본 컨테이너 그림자 제거 */
    border-radius: 0;              /* 둥근 모서리 제거 (카드에만 적용) */
    min-height: auto;              /* main-container 상속 방지 */
}
.edit-card {
    background: #fff;
    border: 1px solid #eaecef;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    overflow: hidden;
}

.edit-card-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f0f2f5;
}

.edit-card-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #ff7e36;
    text-align: center;
    margin: 0;
}

.edit-card-body {
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 12px 0 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    color: #555;
}

.input-group input[type="text"],
.input-group input[type="tel"] {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    font-size: 15px;
}

.input-group input[readonly],
.input-group input[disabled] {
    background-color: #f7f8fa;
    color: #8a8f98;
}

.license-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.license-row input[type="text"] {
    width: 100%;
    min-width: 0; /* 좁은 화면에서 줄바꿈 방지 */
}

.btn-upload-license {
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 480px) {
    .btn-upload-license {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ===== edit_profile 추가/수정: 면허번호 & 버튼 동일 폭 ===== */
.edit-card .license-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.edit-card .license-row input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    box-sizing: border-box;
}

.edit-card .btn-upload-license {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

/* 매우 좁은 화면에서 글자 폭 대응 */
@media (max-width: 360px) {
    .edit-card .btn-upload-license {
        font-size: 13px;
        padding: 0 8px;
    }
}

/* ===== edit_profile 버튼 통일 스타일 ===== */
.btn-flat {
    display: inline-block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 44px;        /* 링크(a)에도 수직 정렬 맞춤 */
    cursor: pointer;
    box-sizing: border-box;
}

/* 색상 변형 */
.btn-gray {
    background-color: #6c757d;
}
.btn-gray:hover {
    background-color: #5a6268;
}

.btn-orange {
    background-color: #ff7e36;
}
.btn-orange:hover {
    background-color: #e66a26;
}

.btn-dark {
    background-color: #495057;
}
.btn-dark:hover {
    background-color: #3e454b;
}

/* 액션 영역: 정확히 반반 */
.edit-card .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

/* 면허증 첨부 버튼도 동일 형태 적용 */
.edit-card .btn-upload-license {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 44px;
    cursor: pointer;
    box-sizing: border-box;
}

/* 매우 좁은 화면 보정 */
@media (max-width: 360px) {
    .btn-flat,
    .edit-card .btn-upload-license {
        font-size: 13px;
        height: 42px;
        line-height: 42px;
    }
}

/* ===== sidebar-main-container 내부 스타일 ===== */
.sidebar-group {
    padding: 12px 10px;
    margin-bottom: 8px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #343a40;
    padding-bottom: 8px;
    margin: 0 0 8px 0;
    border-bottom: 2px solid #dee2e6;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 12px 0;
}

/* board-nav-btn 스타일이 이미 있으면 그대로 두고, 없으면 아래 추가 */
.board-nav-btn {
    display: block;
    padding: 10px 14px;
    margin: 4px 0;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
    background-color: transparent;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.board-nav-btn:hover {
    background-color: #f8f9fa;
}

.board-nav-btn.active {
    background-color: rgba(255, 126, 54, 0.1);
    color: #ff7e36;
    font-weight: 700;
}

/* ===== 작성자 프로필 카드 (main.php 작성자 클릭 시) ===== */
.author-profile-card {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    width: 280px;
    z-index: 1000;
    overflow: hidden;
}

.profile-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #fff9f2 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    gap: 14px;
    align-items: center;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f3f5;
    border: 2px solid #e6e8eb;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-placeholder::before {
    content: '👤';
    font-size: 32px;
    opacity: 0.5;
}

.avatar-loading {
    font-size: 11px;
    color: #9aa0a6;
    text-align: center;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-nickname {
    font-size: 17px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-level {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 2px;
}

.profile-points {
    font-size: 13px;
    color: #ff7e36;
    font-weight: 600;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
}

.profile-action-btn {
    display: block;
    padding: 10px 14px;
    background: #f8f9fa;
    color: #3c4043;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.profile-action-btn:hover {
    background: #e9ecef;
}

.profile-action-btn:first-child {
    background: #ff7e36;
    color: #fff;
}

.profile-action-btn:first-child:hover {
    background: #e66a26;
}

/* 작성자 링크 스타일 정리 (아이콘 제거) */
.author-link {
    color: #202124;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.author-link:hover {
    color: #ff7e36;
    text-decoration: underline;
}

.pharmacist-icon {
    display: none; /* 💊 아이콘 숨김 */
}
