/* =========================================================
   1. 공통 변수 및 초기화 (Pretendard 기반)
   ========================================================= */
:root {
    --bg: #0b0b0b;
    --panel: #161616;
    --accent: #bb86fc;      /* 보라색 포인트 */
    --accent-dark: #a277ff;
    --text: #ffffff;
    --muted: #9a9a9a;
    --border: rgba(255, 255, 255, 0.14);
    --red: #ff4d4d;
    --green: #00ff88;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* 폰트 쨍하게 만들기 (전체 적용) */
body, input, textarea, button, pre {
    color: var(--text) !important;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.2);
}

/* =========================================================
   2. 로그인 화면 전용 (중앙 정렬 보정)
   ========================================================= */
.login-body {
    height: 100vh;
    display: flex;
    align-items: center;    /* 세로 중앙 */
    justify-content: center; /* 가로 중앙 */
    background: 
        radial-gradient(600px 420px at 50% 25%, rgba(187, 134, 252, .15), transparent 60%),
        #000;
}

.login-card {
    width: 360px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}

.login-header h1 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.login-header p { font-size: 0.85rem; color: var(--muted); text-align: center; margin-bottom: 25px; }

.field label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.field input {
    width: 100%; padding: 13px 14px; background: #0a0a0a; 
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px;
    margin-bottom: 16px; font-size: 0.9rem;
}

.btn-login {
    width: 100%; height: 48px; background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none; border-radius: 10px; font-weight: 800; cursor: pointer; color: #000;
}

/* =========================================================
   3. 관리자/유저 메인 레이아웃 (Sidebar + Main)
   ========================================================= */
#layout-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* 사이드바 */
#sidebar {
    width: 280px;
    height: 100vh;
    background: #111;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header { padding: 20px; border-bottom: 1px solid #222; }
.user-info { color: var(--accent) !important; font-weight: 700; margin-bottom: 15px; font-size: 1.1rem; }

.nav-row { display: flex; gap: 8px; margin-bottom: 12px; }
.nav-btn {
    flex: 1; padding: 10px 0; background: #222; border: 1px solid #333;
    border-radius: 4px; cursor: pointer; text-align: center; font-size: 13px; text-decoration: none;
}

.new-post-btn {
    width: 100%; padding: 12px 0; background: var(--accent-dark) !important;
    color: #000 !important; font-weight: 800; border: none; border-radius: 4px; cursor: pointer;
}

/* 필터 아이템 */
.folder-label { padding: 15px 20px; font-size: 13px; font-weight: 800; color: var(--accent) !important; background: #1a1a1a; }
.stat-item {
    padding: 14px 20px; display: flex; justify-content: space-between;
    cursor: pointer; transition: 0.2s; border-bottom: 1px solid #1a1a1a;
}
.stat-item.active { background: rgba(187, 134, 252, 0.1); border-left: 3px solid var(--accent); }

/* 메인 영역 */
#main-wrapper {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    background: #0b0b0b;
    padding: 30px;
}

/* =========================================================
   4. 게시글 리스트 및 테이블
   ========================================================= */
#memo-table {
    width: 100%; border-collapse: collapse; table-layout: fixed;
    background: var(--panel); border-radius: 8px; overflow: hidden;
}

#memo-table th { background: #1a1a1a; padding: 15px; color: var(--muted); font-size: 14px; border-bottom: 1px solid #333; }
#memo-table td { padding: 18px 15px; border-bottom: 1px solid #222; font-size: 15px; }

.title-cell { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 상태별 색상 */
.status-wait { color: #ffffff !important; font-weight: 700; }
.status-confirm { color: var(--red) !important; font-weight: 700; }
.status-done { color: var(--green) !important; font-weight: 700; }

/* =========================================================
   5. 아코디언 상세 보기
   ========================================================= */
.memo-detail-row { display: none; background: #121212 !important; }
.memo-detail-content {
    padding: 30px 40px;
    border-left: 5px solid var(--accent);
    background: #111 !important;
    border: 1px solid #333;
}

.memo-detail-content pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 1rem;
    line-height: 1.8;
    min-height: 100px;
    color: #fff !important;
}

.tr-active { background: rgba(187, 134, 252, 0.08) !important; }
.tr-active td { color: var(--accent) !important; }

/* 유틸리티 */
.t-center { text-align: center !important; }