/* 관리자 화면 */
.adm { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.adm-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; }
.adm-nav nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); }
.adm-nav nav a:hover { background: var(--surface-2); color: var(--ink); }
.adm-nav nav a.on { background: var(--ink); color: var(--bg); }
.adm-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.adm-foot a { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.adm-main { padding: 28px 32px 60px; min-width: 0; max-width: 1280px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adm-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.adm-card h2 { font-size: 15px; margin: 0 0 12px; }
.adm-card label, .settings-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.adm-card label.check { flex-direction: row; align-items: center; gap: 8px; }
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.small { font-size: 12.5px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat strong { font-family: var(--mono); font-size: 22px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 160px; align-items: end; }
.bars .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; position: relative; }
.bars .bar span { width: 100%; max-width: 26px; background: var(--accent); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.bars .bar small { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.bars .bar b { position: absolute; top: -4px; font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 500; opacity: 0; }
.bars .bar:hover b { opacity: 1; }
.adm-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.adm-filter input { max-width: 280px; }
.adm-filter select { width: 130px; }
.adm-table td, .adm-table th { text-align: center; }
.adm-table .left { text-align: left; }
.adm-table td.left a:hover { color: var(--accent); }
.adm-table td.wrap-cell { white-space: normal; max-width: 420px; }
.adm-table input:not([type=checkbox]), .adm-table select { min-width: 120px; }
.adm-table .w-num { width: 70px; min-width: 0 !important; }
.adm-table .nowrap { white-space: nowrap; }
.adm-table .new-row td { background: var(--surface-2); }
form.inline { display: inline; }
.settings-form { max-width: 760px; }

/* 에디터 */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.editor-side { position: sticky; top: 16px; }
.title-input { height: 54px !important; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.editor-tabs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.editor-tabs button { border: 1px solid var(--line-strong); background: var(--surface); padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.editor-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.editor-tabs .muted { margin-left: auto; }
#editor { background: var(--surface); min-height: 480px; font-size: 16px; }
.ql-toolbar.ql-snow { background: var(--surface-2); border-color: var(--line-strong) !important; border-radius: 12px 12px 0 0; position: sticky; top: 0; z-index: 5; }
.ql-container.ql-snow { border-color: var(--line-strong) !important; border-radius: 0 0 12px 12px; font-family: var(--font); }
.ql-editor { min-height: 480px; line-height: 1.8; }
.ql-editor img { max-width: 100%; }
.ql-snow .ql-stroke { stroke: var(--ink-2); }
.ql-snow .ql-fill { fill: var(--ink-2); }
.ql-snow .ql-picker { color: var(--ink-2); }
.ql-snow .ql-picker-options { background: var(--surface); }
.ql-editor.ql-blank::before { color: var(--muted); }
#htmlEditor { min-height: 520px; }
.uploading { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 100; }
.att-admin { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.att-admin li { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.small-drop { padding: 16px; font-size: 13.5px; }
.thumb-preview { width: 100%; border-radius: 10px; margin-top: 4px; }
.danger-link { color: var(--err); margin-top: 10px; display: block; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-box label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); }
.login-box .brand { margin-bottom: 6px; }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } .editor-layout { grid-template-columns: 1fr; } .editor-side { position: static; } }
@media (max-width: 760px) {
  .adm { grid-template-columns: 1fr; }
  .adm-nav { position: static; height: auto; flex-direction: column; padding: 14px; }
  .adm-nav nav { flex-direction: row; overflow-x: auto; }
  .adm-nav nav a { white-space: nowrap; }
  .adm-main { padding: 18px 14px 40px; }
  .adm-2col { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .att-admin li { grid-template-columns: 1fr; }
}

/* 브랜드 (ChocoLab) */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--ink); }
.brand .bar { width: 34px; height: 26px; transform: rotate(-8deg); }
.adm-nav { background: var(--bg-2); }
.adm-head h1 { font-family: var(--display); font-weight: 400; font-size: 28px; }
.adm-card h2 { font-family: var(--display); font-weight: 400; font-size: 18px; }
.adm-nav nav a.on { background: var(--choco); color: #FFF8F2; }
.adm-card, .stat { box-shadow: none; }
.title-input { font-family: var(--display); font-weight: 400 !important; }
.bars .bar span { background: var(--choco); }
