/* Admin styles */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
}

.login-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.login-logo h2 {
    font-weight: 700;
    color: #343a40;
}

/* Admin Dashboard */
.admin-dashboard {
    padding-top: 56px; /* 네비게이션 바 높이만큼 */
}

.sidebar {
    position: fixed;
    top: 56px; /* 네비게이션 바 아래에 위치 */
    bottom: 0;
    left: 0;
    z-index: 10; /* z-index 낮춤 (네비게이션 바보다 낮게) */
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #f8f9fa;
}

.navbar.bg-dark {
    z-index: 100; /* 네비게이션 바의 z-index를 높임 */
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important; /* 더 밝은 색상 */
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

.navbar-dark .navbar-brand {
    color: #ffffff !important;
}

.navbar-dark .navbar-text {
    color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 1rem;
}

.sidebar .nav-link.active {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 3px solid #007bff;
}

.sidebar .nav-link:hover {
    color: #007bff;
}

/* Dashboard cards */
.card {
    border: none;
    border-radius: 0; /* 라운드 제거 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card .display-6 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Main content */
main {
    margin-left: 16.66667%; /* 사이드바 너비만큼 마진 */
    padding-top: 1rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        padding: 0;
    }
    
    main {
        margin-left: 0;
        padding-top: 1rem;
    }
}

/* Admin tables */
.table-admin {
    background-color: white;
    border-radius: 0; /* 라운드 제거 */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-admin th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Admin forms */
.admin-form {
    background-color: white;
    padding: 2rem;
    border-radius: 0; /* 라운드 제거 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-form .form-label {
    font-weight: 600;
}

/* Button style override */
.btn {
    border-radius: 0; /* 버튼 라운드 제거 */
}

/* Form controls */
.form-control, .form-select {
    border-radius: 0; /* 폼 컨트롤 라운드 제거 */
}

/* Alert boxes */
.alert {
    border-radius: 0; /* 알림 박스 라운드 제거 */
}

/* SimpleMDE 에디터 스타일 개선 */
.CodeMirror {
    border: 1px solid #ced4da !important;
    border-radius: 0 !important;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
}

.CodeMirror-focused {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.editor-toolbar {
    border: 1px solid #ced4da !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    background-color: #f8f9fa !important;
}

.editor-toolbar a {
    color: #495057 !important;
    border-radius: 0 !important;
}

.editor-toolbar a:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

.editor-toolbar a.active {
    background-color: #007bff !important;
    color: #ffffff !important;
}

.editor-preview-side {
    border: 1px solid #ced4da !important;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
}

/* SimpleMDE 미리보기에서 들여쓰기 문제 방지 */
.editor-preview h1,
.editor-preview h2,
.editor-preview h3,
.editor-preview h4,
.editor-preview h5,
.editor-preview h6,
.editor-preview-side h1,
.editor-preview-side h2,
.editor-preview-side h3,
.editor-preview-side h4,
.editor-preview-side h5,
.editor-preview-side h6 {
    margin-left: 0 !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
}

