/* 유테라 관리자 — 사이트 동일 톤 (서울남산체, ink #000000, gold #D8ADC1, bg #f4f4f4) */
@font-face { font-family: "Seoul Namsan"; src: url("https://cdn.jsdelivr.net/gh/fonts-archive/SeoulNamsan@main/SeoulNamsan-Medium.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Seoul Namsan"; src: url("https://cdn.jsdelivr.net/gh/fonts-archive/SeoulNamsan@main/SeoulNamsan-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Seoul Namsan"; src: url("https://cdn.jsdelivr.net/gh/fonts-archive/SeoulNamsan@main/SeoulNamsan-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root { --ink:#000000; --gold:#D8ADC1; --bg:#f4f4f4; --line:#e5e5e5; --gray:#505050; }
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Seoul Namsan", -apple-system, "Apple SD Gothic Neo", sans-serif; color:var(--ink); background:var(--bg); line-height:1.6; -webkit-font-smoothing:antialiased; }
button { font-family:inherit; cursor:pointer; }
input, textarea, select { font-family:inherit; }
a { color:inherit; }

/* 로그인 */
.login-body { min-height:100vh; display:flex; align-items:center; justify-content:center; background:#f4f4f4; }
.login-card { width:360px; max-width:90vw; background:#fff; padding:48px 36px; border:1px solid var(--line); text-align:center; }
.login-logo { line-height:0; }
.login-logo img { width:170px; height:auto; display:inline-block; }
.login-sub { color:var(--gray); margin:14px 0 28px; }
.login-card input { width:100%; padding:13px 14px; border:1px solid var(--line); font-size:16px; margin-bottom:12px; background:#fff; }
.login-card input:focus { outline:none; border-color:var(--gold); }
.login-card button { width:100%; padding:13px; border:0; background:var(--ink); color:#fff; font-size:16px; font-weight:700; }
.login-err { color:#c0392b; font-size:14px; margin-top:10px; }

/* 레이아웃 */
.topbar { position:sticky; top:0; z-index:10; display:flex; align-items:center; justify-content:space-between; background:#fff; border-bottom:1px solid var(--line); padding:14px 24px; }
.topbar .brand { display:flex; align-items:center; gap:10px; }
.topbar .brand-logo { height:30px; width:auto; display:block; }
.topbar .brand-sub { font-weight:400; color:var(--gray); font-size:15px; }
.topbar-actions { display:flex; align-items:center; gap:10px; }
.topbar .topsave { padding:9px 18px; font-size:14px; }
.topbar .logout { border:1px solid var(--line); background:#fff; padding:8px 16px; font-size:14px; border-radius:4px; }
.layout { display:grid; grid-template-columns:220px 1fr; min-height:calc(100vh - 57px); }
.sidenav { background:#fff; border-right:1px solid var(--line); padding:18px 0; }
.sidenav button { display:block; width:100%; text-align:left; background:none; border:0; padding:13px 24px; font-size:15px; color:var(--ink); border-left:3px solid transparent; }
.sidenav button:hover { background:#f4f4f4; }
.sidenav button.active { border-left-color:var(--gold); color:var(--ink); font-weight:700; background:#f4f4f4; }
.sidenav button:disabled { color:#bbb; cursor:not-allowed; }
.sidenav .tag { font-size:11px; color:#074430; margin-left:6px; }
.main { padding:28px 32px 80px; max-width:1000px; }
.main:has(.btable) { max-width:1400px; }   /* 블로그 글 목록은 넓게 */
.page-title { font-size:24px; font-weight:800; margin-bottom:6px; }
.page-desc { color:var(--gray); font-size:14px; margin-bottom:24px; }

/* 카드/폼 */
.card { background:#fff; border:1px solid var(--line); padding:22px; margin-bottom:18px; }
.card h3 { font-size:18px; font-weight:800; margin-bottom:4px; }
.row { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.field { flex:1; min-width:200px; }
.field label { display:block; font-size:13px; color:var(--gray); margin-bottom:5px; }
.field input, .field textarea, .field select { width:100%; padding:10px 12px; border:1px solid var(--line); font-size:15px; background:#fff; }
.field input:focus, .field textarea:focus, .field select:focus { outline:none; border-color:var(--gold); }
.field input:disabled, .field textarea:disabled { background:#f4f4f4; color:#8a857c; cursor:not-allowed; }
.field textarea { resize:vertical; min-height:90px; line-height:1.7; }
.hint { font-size:12px; color:#a99; margin-top:4px; }

.btn { border:0; padding:10px 18px; font-size:14px; font-weight:700; border-radius:4px; }
.btn-primary { background:var(--ink); color:#fff; }
.btn-gold { background:var(--gold); color:var(--ink); }
.btn-line { background:#fff; border:1px solid var(--line); }
.btn-danger { background:#fff; border:1px solid #e0b4b4; color:#c0392b; }
.btn-sm { padding:6px 12px; font-size:13px; }

.branch-acc { border:1px solid var(--line); margin-bottom:14px; background:#fff; }
.branch-acc-head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; cursor:pointer; background:#F3E5ED; }
.branch-acc-head .nm { font-weight:800; font-size:16px; }
.branch-acc-head .ext { font-size:12px; color:#074430; margin-left:8px; }
.branch-acc-body { padding:18px; border-top:1px solid var(--line); }
.branch-acc-body[hidden] { display:none; }

.thumbs { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:10px; }
.thumb { position:relative; width:120px; }
.thumb img { width:120px; height:80px; object-fit:cover; display:block; border:1px solid var(--line); }
.thumb .x { position:absolute; top:2px; right:2px; background:rgba(0,0,0,.6); color:#fff; border:0; width:22px; height:22px; border-radius:50%; font-size:14px; line-height:1; }
.thumb .mv { position:absolute; bottom:2px; background:rgba(0,0,0,.55); color:#fff; border:0; width:22px; height:22px; font-size:12px; }
.thumb .mv.l { left:2px; } .thumb .mv.r { left:28px; }

.doctor-edit { border:1px dashed var(--line); padding:16px; margin-bottom:14px; position:relative; }
.dphoto { width:120px; height:150px; object-fit:cover; border:1px solid var(--line); display:block; margin-bottom:6px; background:#f3f3f3; }
.dphoto.dphoto-mo { width:140px; height:105px; }   /* 모바일용(가로 4:3) 미리보기 */
.dphoto-label { font-size:13px; font-weight:700; color:var(--gray); margin-bottom:5px; }
.dphoto-hint { font-size:12px; color:#a8a39a; margin:4px 0 0; line-height:1.4; }
/* 의료진 폼 — 지점 필드를 골드 라벨로 구분(이름과 같은 줄, 슬림) */
.doc-branch-field label { color:#074430; font-weight:800; }
.doc-branch-field select { background:#f4f4f4; border-color:#EAE4E7; }
.doc-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.doc-head .t { font-weight:700; }

.savebar { position:fixed; bottom:0; left:220px; right:0; background:#fff; border-top:1px solid var(--line); padding:14px 32px; display:flex; gap:12px; align-items:center; z-index:20; }
.savebar .msg { color:var(--gray); font-size:14px; }
.toast { position:fixed; top:70px; right:24px; background:var(--ink); color:#fff; padding:12px 18px; border-radius:6px; font-size:14px; z-index:50; opacity:0; transition:opacity .25s; }
.toast.show { opacity:1; }
.toast.err { background:#c0392b; }

.popup-item { border:1px solid var(--line); background:#fff; padding:16px; margin-bottom:12px; }
@media (max-width:760px){ .layout{ grid-template-columns:1fr; } .savebar{ left:0; } .sidenav{ display:flex; overflow:auto; padding:0; } .sidenav button{ white-space:nowrap; border-left:0; border-bottom:3px solid transparent; } .sidenav button.active{ border-bottom-color:var(--gold); border-left:0; } }

/* ---- 블로그 글 목록(표) ---- */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:22px 0 12px; }
.toolbar input, .toolbar select { padding:9px 12px; border:1px solid var(--line); font-size:14px; background:#fff; }
.toolbar input:focus, .toolbar select:focus { outline:none; border-color:var(--gold); }
.toolbar input.search { min-width:240px; flex:1; }
.toolbar .tcount { margin-left:auto; font-size:13px; color:var(--gray); }
.btable { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); }
.btable th, .btable td { border-bottom:1px solid var(--line); padding:10px 12px; text-align:left; font-size:14px; vertical-align:middle; }
.btable th { background:#fafafa; font-weight:700; font-size:13px; color:var(--gray); }
.btable tr:last-child td { border-bottom:0; }
.btable td.col-thumb { width:96px; }
.btable td.col-thumb img { width:84px; height:54px; object-fit:cover; border:1px solid var(--line); display:block; }
.btable td.col-thumb .noimg { width:84px; height:54px; background:#f3f3f3; border:1px solid var(--line); }
.btable .ttl { font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.btable .sub { font-size:12px; color:#a8a39a; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.btable .cell-edit { width:100%; padding:7px 9px; border:1px solid var(--line); font-size:13px; background:#fff; }
.btable .cell-edit:focus { outline:none; border-color:var(--gold); }
.btable td.col-dx { width:130px; white-space:nowrap; color:var(--ink); }
.btable td.col-br, .btable td.col-pub, .btable td.col-doc { width:130px; }
.btable td.col-date { width:96px; white-space:nowrap; color:var(--gray); font-size:13px; }
.btable td.col-act { white-space:nowrap; width:1%; }
.btable tr.is-off td.col-thumb img, .btable tr.is-off .ttl { opacity:.45; }
