/* 관리자 화면 */
:root {
  --ink: #14213D; --ink-2: #3A4757; --muted: #6B7684;
  --blue: #0B4A9E; --blue-deep: #083A7C; --blue-soft: #E9F1FB;
  --mist: #F4F6F9; --line: #D8DEE7; --red: #E70012; --green: #00913A;
  --side-w: 15.5rem;
  --bs-border-radius: 0; --bs-border-radius-sm: 0; --bs-border-radius-lg: 0; --bs-border-radius-xl: 0; --bs-border-radius-pill: 0;
  --bs-primary: #0B4A9E; --bs-primary-rgb: 11, 74, 158; --bs-link-color: #0B4A9E; --bs-link-hover-color: #083A7C;
  --bs-body-font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --bs-body-color: #14213D;
}
body.admin { background: var(--mist); font-size: .95rem; word-break: keep-all; }
.btn, .form-control, .form-select, .alert, .input-group-text, .page-link, .card, .dropdown-menu, .modal-content, .form-check-input { border-radius: 0 !important; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue-deep); --bs-btn-hover-border-color: var(--blue-deep); }
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(11, 74, 158, .15); }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }

.brand-rule { display: flex; height: 4px; width: 100%; }
.brand-rule > span { flex: 1; }
.brand-rule > span:nth-child(1) { background: var(--red); }
.brand-rule > span:nth-child(2) { background: var(--green); }
.brand-rule > span:nth-child(3) { background: var(--blue); }

/* shell */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: var(--side-w); flex: 0 0 var(--side-w); background: #fff; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side__brand { padding: 1.2rem 1.2rem 1rem; border-bottom: 1px solid var(--line); }
.admin-side__brand img { width: 100%; height: auto; display: block; }
.admin-side__brand span { display: inline-block; margin-top: .6rem; padding: .1rem .5rem; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700; }
.admin-side__nav { padding: .8rem 0; }
.admin-side__label { margin: 1rem 1.2rem .3rem; font-size: .75rem; font-weight: 700; color: var(--muted); }
.admin-side__nav a { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.2rem; color: var(--ink-2); font-weight: 500; border-left: 3px solid transparent; }
.admin-side__nav a:hover { background: var(--mist); color: var(--blue); }
.admin-side__nav a.is-active { background: var(--blue-soft); color: var(--blue); border-left-color: var(--blue); font-weight: 700; }
.admin-side__nav i { font-size: 1.05rem; }

.admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 1rem; height: 3.8rem; padding: 0 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
.admin-top__toggle { display: none; border: 1px solid var(--line); background: #fff; width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
.admin-top__title { font-size: 1.15rem; font-weight: 700; margin: 0; flex: 1; }
.admin-top__user { display: flex; align-items: center; gap: .8rem; color: var(--ink-2); }
.admin-main { padding: 1.5rem; flex: 1; }

@media (max-width: 991px) {
  .admin-side { position: fixed; left: 0; top: 0; z-index: 1100; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  .admin-side.is-open { transform: none; }
  .admin-top__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-main { padding: 1rem; }
}

/* panels */
.panel { background: #fff; border: 1px solid var(--line); padding: 1.4rem; margin-bottom: 1.4rem; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.panel__title { font-size: .95rem; font-weight: 700; margin: 0 0 .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 1.4rem; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); color: var(--ink); }
a.stat:hover { border-color: var(--blue); }
.stat__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.stat__value small { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: .3rem; }

.admin-table th { font-size: .85rem; font-weight: 700; color: var(--ink-2); background: var(--mist); border-bottom-color: var(--line); white-space: nowrap; }
.admin-table td { font-size: .92rem; }
.admin-table .cell-title a { color: var(--ink); font-weight: 500; }
.admin-table .cell-title a:hover { color: var(--blue); text-decoration: underline; }
.tag { display: inline-block; padding: .1rem .5rem; font-size: .75rem; font-weight: 700; background: var(--mist); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag--on { background: #E6F5EC; color: #0B6B2E; border-color: #BFE3CC; }
.tag--off { background: #FDECEC; color: #A3111E; border-color: #F3C2C6; }
.tag--pin { background: var(--blue-soft); color: var(--blue); border-color: #B9CDEB; margin-right: .3rem; }

.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.bulk-bar__actions { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }

.help-list li { padding: .5rem 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.help-list li:last-child { border-bottom: 0; }
.help-list strong { color: var(--ink); margin-right: .4rem; }
.help-list em { font-style: normal; color: var(--blue); font-weight: 600; }

/* post form */
.post-form__grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.4rem; align-items: start; }
@media (max-width: 1199px) { .post-form__grid { grid-template-columns: 1fr; } }
.post-form__actions { display: flex; flex-direction: column; gap: .5rem; }
.thumb-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.file-list li { padding: .3rem 0; border-bottom: 1px solid var(--mist); font-size: .9rem; }
.file-list label { cursor: pointer; }
.file-list input:checked + span { text-decoration: line-through; color: var(--muted); }
.note-editor.note-frame { border-color: var(--line) !important; border-radius: 0 !important; }
.note-editor .note-toolbar { background: var(--mist) !important; border-bottom: 1px solid var(--line) !important; }
.note-editor .note-editable { font-family: var(--bs-body-font-family); font-size: 1rem; line-height: 1.75; min-height: 24rem; }
.note-editor .note-editable img { max-width: 100%; height: auto; }
.note-btn, .note-modal .modal-content, .note-popover .popover-content, .note-dropdown-menu { border-radius: 0 !important; }

/* slides */
.slide-list { display: flex; flex-direction: column; gap: 1rem; }
.slide-item { display: grid; grid-template-columns: 18rem minmax(0, 1fr); gap: 1.2rem; padding: 1rem; border: 1px solid var(--line); background: #fff; }
@media (max-width: 991px) { .slide-item { grid-template-columns: 1fr; } }
.slide-item__preview { position: relative; }
.slide-item__preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); background: var(--mist); }
.slide-item__state { position: absolute; left: .5rem; top: .5rem; }

/* settings */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 1199px) { .settings-grid { grid-template-columns: 1fr; } }

/* login */
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #EEF3FA, #F4F6F9); }
.login-wrap { width: 100%; padding: 2rem 1rem; }
.login-box { max-width: 26rem; margin: 0 auto; background: #fff; border: 1px solid var(--line); padding: 2.4rem 2.2rem 2rem; box-shadow: 0 20px 50px -30px rgba(11, 74, 158, .35); }
.login-box__brand img { width: 100%; max-width: 15rem; height: auto; display: block; margin-bottom: 1rem; }
.login-box__brand .brand-rule { width: 3.6rem; margin-bottom: 1.6rem; }
.login-box h1 { font-size: 1.35rem; font-weight: 800; margin-bottom: .3rem; }
.login-box__desc { color: var(--muted); font-size: .92rem; margin-bottom: 1.4rem; }
.login-box__back { display: inline-block; margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.login-box__back:hover { color: var(--blue); }
