/* ==========================================================================
   기본 초기화 & 전역 스타일
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo", sans-serif;
    color: #222222;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 중앙 정렬 컨테이너 */
.header-container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
}

.content-container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 0 60px 0;
}

/* ==========================================================================
   1단 상단 바: 로고 ("Django Shop MTV") & 인증 링크
   ========================================================================== */
.header-top-wrap {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0 16px 0;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 200;
    color: #111111;
    letter-spacing: -0.5px;
}

.auth-group {
    display: flex;
    align-items: center;
    gap: 22px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    color: #222222;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.auth-btn:hover {
    color: #000000;
}

.auth-btn .icon {
    font-size: 1.3rem;
    color: #444444;
}

.inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   2단 상단 바: 대메뉴 ("공지사항" / "게시판")
   ========================================================================== */
.header-nav-wrap {
    width: 100%;
    border-bottom: 1px solid #d4d4d4;
    background: #ffffff;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 18px 0;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #222222;
    letter-spacing: -0.5px;
}

.nav-title.active {
    color: #111111;
}

/* ==========================================================================
   본문 헤딩 & 검색 영역
   ========================================================================== */
.board-wrapper {
    width: 100%;
}

.board-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222222;
    margin-bottom: 24px;
}

.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 620px;
    height: 42px;
}

.search-box input {
    flex: 1;
    border: 1px solid #c8d1dc;
    border-radius: 4px 0 0 4px;
    padding: 0 14px;
    font-size: 0.95rem;
    outline: none;
}

.search-box input:focus {
    border-color: #1a73e8;
}

.search-box button {
    width: 60px;
    border: none;
    background-color: #1864e6;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.search-box button:hover {
    background-color: #1352c2;
}

/* ==========================================================================
   게시판 테이블 목록
   ========================================================================== */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.board-table th {
    background-color: #f8fafc;
    color: #111111;
    font-weight: 700;
    padding: 12px 10px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.board-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #333333;
}

.col-no { width: 7%; text-align: center; font-weight: 600; }
.col-title { width: 45%; text-align: left; padding-left: 20px !important; }
.col-title a { color: #222222; }
.col-title a:hover { text-decoration: underline; }
.col-author { width: 20%; text-align: center; }
.col-count { width: 8%; text-align: center; }
.col-date { width: 20%; text-align: center; color: #444444; }

.empty-row {
    text-align: center;
    padding: 40px 0 !important;
    color: #888888;
}

/* 하단 페이지네이션 */
.pagination-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    font-size: 1rem;
}

.page-link {
    color: #333333;
    padding: 4px 6px;
}

.page-link.current {
    font-weight: 700;
    color: #000000;
}

.bottom-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-write {
    display: inline-block;
    padding: 8px 18px;
    background-color: #1864e6;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================================================
   게시글 상세 페이지 (.detail-card)
   ========================================================================== */
.detail-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 32px 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.detail-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.detail-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    line-height: 1.4;
    word-break: break-all;
}

.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.92rem;
    color: #64748b;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-label {
    color: #64748b;
    font-weight: 500;
}

.meta-value {
    color: #334155;
    font-weight: 600;
}

.meta-divider {
    color: #cbd5e1;
    font-size: 0.85rem;
}

.detail-body {
    /* min-height: 220px; */
    padding: 10px 0 24px 0;
    height:auto;
}

.detail-image-wrap {
    margin-bottom: 24px;
    border-radius: 6px;
    overflow: hidden;
    max-width: 100%;
}

.detail-image-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.detail-text {
    font-size: 1.05rem;
    /* line-height: 1.85; */
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 첨부파일 다운로드 박스 */
.detail-file-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 18px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.detail-file-box .icon {
    font-size: 1.25rem;
    color: #64748b;
}

.detail-file-box .file-label {
    font-weight: 600;
    color: #475569;
}

.detail-file-box .file-link {
    color: #1864e6;
    text-decoration: underline;
    word-break: break-all;
}

.detail-file-box .file-link:hover {
    color: #1352c2;
}

/* 상세 화면 액션 버튼 */
.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.detail-actions .left-actions,
.detail-actions .right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   공통 버튼 시스템 (primary / secondary / danger 완벽 호환)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
}

/* 기본 파란색 (수정, 확인, 검색) */
.btn,
.btn-primary,
.btn.primary {
    background-color: #1864e6;
    color: #ffffff !important;
}

.btn:hover,
.btn-primary:hover,
.btn.primary:hover {
    background-color: #1352c2;
    color: #ffffff !important;
}

/* 보조 회색 (목록, 취소) */
.btn-secondary,
.btn.secondary {
    background-color: #64748b;
    color: #ffffff !important;
}

.btn-secondary:hover,
.btn.secondary:hover {
    background-color: #475569;
    color: #ffffff !important;
}

/* 위험 빨간색 (삭제, 회원탈퇴) */
.btn-danger,
.btn.danger {
    background-color: #dc2626;
    color: #ffffff !important;
}

.btn-danger:hover,
.btn.danger:hover {
    background-color: #b91c1c;
    color: #ffffff !important;
}

.btn-small, .btn.small {
    padding: 5px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   폼 및 알림창 (.clean-box, .narrow-box)
   ========================================================================== */
.clean-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 32px 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.narrow-box {
    max-width: 580px;
    margin: 20px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c8d1dc;
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: #1864e6;
}

.field-error {
    color: #dc2626;
    font-size: 0.88rem;
    margin-top: 6px;
}

.help-text {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 4px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.confirm-msg {
    font-size: 1.05rem;
    color: #334155;
    margin: 18px 0 28px 0;
    line-height: 1.6;
}

/* 알림 메시지 배너 */
.message-area {
    margin-bottom: 24px;
}

.message {
    padding: 14px 20px;
    border-radius: 6px;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.message.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fee2e2;
}

.message.success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}

/* 프로필 화면 그리드 */
.detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 16px;
    margin: 24px 0;
    font-size: 0.95rem;
}

.detail-grid dt {
    font-weight: 600;
    color: #475569;
}

.detail-grid dd {
    color: #1e293b;
}

.profile-photo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #edf2f7;
}

/* 관리자 상태 뱃지 */
.badge-success {
    display: inline-block;
    padding: 3px 8px;
    background-color: #dcfce7;
    color: #15803d;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-danger {
    display: inline-block;
    padding: 3px 8px;
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
