/* 나래유치원 관리자 화면 */
:root { --green:#8CC63F; --green-soft:#EEF7E2; --green-text:#3F7A2A; --orange:#E8774A; --orange-text:#C2562B; --yellow:#FFE08A; --brown:#8A5A33; --ink:#3B2F25; --ink-2:#6B5D50; --line:#E8E1D4; --bg:#F7F4EE; --danger:#B3261E; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15.5px; word-break: keep-all; }
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(180deg, #FFF3C9, var(--bg)); }
a { color: var(--green-text); }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 0 0 14px; }
h3 { font-size: 16px; margin: 24px 0 10px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-2); font-weight: 400; }
.small { font-size: 13.5px; }
.center { text-align: center; }

.ad-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 60px; background: #fff; border-bottom: 1px solid var(--line); }
.ad-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ad-brand b { background: var(--green); padding: 1px 8px; border-radius: 6px; font-size: 13px; }
.ad-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.ad-nav a { padding: 8px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.ad-nav a:hover { background: var(--bg); }
.ad-nav a[aria-current] { background: var(--green-soft); color: var(--green-text); }
.ad-right { display: flex; gap: 14px; align-items: center; font-size: 14px; white-space: nowrap; }
.ad-right a { color: var(--ink-2); text-decoration: none; }
.ad-right button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--ink); }
@media (max-width: 760px) {
  .ad-top { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px 12px; }
  .ad-nav { order: 3; flex-basis: 100%; }
  .ad-right { margin-left: auto; }
  .ad-right a { display: none; }
}

.ad-main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
body.bare .ad-main { padding: 0; width: 100%; max-width: 400px; }
.ad-h1 { font-size: 26px; margin: 0 0 20px; }
.ad-h1 small { font-size: 15px; color: var(--ink-2); font-weight: 500; margin-left: 6px; }
.ad-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ad-head .ad-h1 { margin: 0; }
.ad-head > div { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(59,47,37,.05), 0 4px 16px rgba(59,47,37,.05); margin-bottom: 20px; }
.pad { padding: 24px; }
@media (max-width: 600px) { .pad { padding: 18px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-block { width: 100%; padding: 13px; font-size: 16px; }
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: #7DB635; }
.btn-accent { background: var(--orange-text); color: #fff; }
.btn-accent:hover { background: #A94820; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.btn-danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px #F0C7C3; }
.btn-danger:hover { background: #FDECEA; }
.btn[disabled] { opacity: .5; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--danger); }
form.inline { display: inline; }

.form label { display: block; font-weight: 600; margin-bottom: 16px; }
.form input[type=text], .form input[type=password], .form input[type=url], .form input[type=date], .form textarea, .v-item input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
.form textarea { resize: vertical; line-height: 1.7; }
.form input:focus, .form textarea:focus, .v-item input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.form .row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.form .row > label { flex: 0 0 auto; min-width: 180px; }
.form .row > .grow { flex: 1 1 260px; }
.form .row > .btn { margin-bottom: 16px; }
.form label.check, label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; padding: 11px 0; }
label.check input { width: 18px; height: 18px; accent-color: var(--green-text); }
fieldset { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.files { list-style: none; padding: 0; margin: 0 0 12px; }
.files li { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.files label.check { padding: 0; font-weight: 500; color: var(--danger); font-size: 14px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.danger-zone { text-align: right; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: var(--green-soft); color: var(--green-text); }
.flash-err { background: #FDECEA; color: var(--danger); }

.auth { padding: 36px 32px 28px; }
.auth h1 { text-align: center; font-size: 22px; margin: 4px 0 6px; }
.auth > p.muted { text-align: center; margin: 0 0 20px; }
.auth-logo { width: 110px; height: 110px; margin: 0 auto 4px; display: block; }
.auth .form { margin-top: 20px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: block; padding: 20px 22px; text-decoration: none; color: var(--ink-2); }
.stat span { display: block; font-weight: 600; margin-bottom: 4px; }
.stat b { font-size: 28px; color: var(--ink); margin-right: 4px; }
.stat:hover { box-shadow: 0 0 0 2px var(--green); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .stats, .two { grid-template-columns: 1fr; } }
.simple { list-style: none; padding: 0; margin: 0; }
.simple li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.simple li:first-child { border-top: 0; }
.simple a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple a:hover { color: var(--green-text); text-decoration: underline; }
.simple time { color: var(--ink-2); font-size: 14px; flex: none; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; background: var(--orange-text); color: #fff; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); margin: 0; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--line); }
.tbl thead th { border-top: 0; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.tbl td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.tbl td a:hover { color: var(--green-text); text-decoration: underline; }
.tbl .w-date { width: 120px; white-space: nowrap; color: var(--ink-2); }
.tbl .w-act { width: 160px; white-space: nowrap; }
.tbl .w-act .link { margin-right: 10px; font-size: 14px; }
.tbl td.w-act a.link { color: var(--green-text); font-weight: 500; text-decoration: underline; }
@media (max-width: 640px) { .tbl thead { display: none; } .tbl tr { display: block; border-top: 1px solid var(--line); padding: 10px 16px; } .tbl td { display: block; border: 0; padding: 2px 0; } .tbl .w-date, .tbl .w-act { width: auto; } }

.pager { display: flex; justify-content: center; gap: 4px; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; text-decoration: none; color: var(--ink); }
.pager span[aria-current] { background: var(--ink); color: #fff; }

.new-album h2 { margin-bottom: 10px; }
.ad-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.ad-album { display: block; overflow: hidden; text-decoration: none; color: var(--ink); margin: 0; }
.ad-album:hover { box-shadow: 0 0 0 2px var(--green); }
.ad-album .cv { aspect-ratio: 4/3; background: var(--green-soft); display: grid; place-items: center; color: var(--ink-2); font-size: 14px; }
.ad-album .cv img { width: 100%; height: 100%; object-fit: cover; }
.ad-album .mt { padding: 12px 14px; }
.ad-album b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-album small { color: var(--ink-2); }

.dropzone { position: relative; border: 2.5px dashed #CFE3B4; border-radius: 16px; background: #FAFDF6; text-align: center; transition: .15s; }
.dropzone.over { border-color: var(--green); background: var(--green-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone label { display: block; padding: 40px 20px; cursor: pointer; }
.dropzone label b { display: block; font-size: 18px; margin-bottom: 6px; }
.dropzone label b::before { content: ""; display: block; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233B2F25' d='M11 16V7.8l-3.6 3.6L6 10l6-6 6 6-1.4 1.4L13 7.8V16zm-6 4v-5h2v3h10v-3h2v5z'/%3E%3C/svg%3E") center / 26px no-repeat; }
.dropzone label span { color: var(--ink-2); font-size: 14px; }
.dropzone input:focus-visible + label { outline: 3px solid var(--orange); border-radius: 14px; }
.up-status { margin-top: 16px; }
.bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.up-status p { margin: 8px 0 0; font-weight: 600; }
.up-errors { color: var(--danger); font-size: 14px; padding-left: 18px; margin: 6px 0 0; }

.tools { display: flex; gap: 8px; }
.ad-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ad-photos li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg); cursor: grab; }
.ad-photos li.dragging { opacity: .4; }
.ad-photos li.drop-target { box-shadow: 0 0 0 3px var(--orange); }
.ad-photos img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ad-photos label { position: absolute; top: 6px; cursor: pointer; }
.ad-photos input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-cover { left: 6px; }
.pc-cover span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); color: rgba(255,255,255,.7); font-size: 16px; }
.pc-cover input:checked + span { background: var(--yellow); color: var(--ink); }
.pc-del { right: 6px; }
.pc-del span { display: block; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.9); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.pc-del input:checked + span { background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: none; }
.ad-photos li:has(.pc-del input:checked) img { opacity: .45; filter: grayscale(1); }
.ad-photos input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 1px; }

.yt-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.yt-row .grow { flex: 1 1 320px; }
.yt-preview { width: 240px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--bg); display: grid; place-items: center; color: var(--ink-2); font-size: 14px; margin-top: 26px; }
.yt-preview img { width: 100%; height: 100%; object-fit: cover; }
.v-list { display: grid; gap: 8px; margin-bottom: 10px; }
.v-item { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.v-item input { margin-top: 0; }
@media (max-width: 600px) { .v-item { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px dashed var(--line); } }
.checks { list-style: none; padding: 12px 16px; margin: 0 0 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.checks li { padding: 2px 0; }
.checks .ok { color: var(--green-text); }
.checks .no { color: var(--danger); font-weight: 700; }
.checks .info { color: var(--ink-2); margin-top: 4px; }
.tag.ok { background: var(--green-soft); color: var(--green-text); }
.tbl.scan th { font-weight: 600; color: var(--ink); font-size: 15px; }
.tbl.scan th small { display: block; font-weight: 400; }
.imp-log { max-height: 260px; overflow: auto; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; margin: 10px 0 0; }
.imp-log:empty { display: none; }
.alert { padding: 16px 20px; border-radius: 14px; margin-bottom: 20px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.alert-warn { background: #FFF6D6; border: 1.5px solid #F1C84B; }
.alert-err { background: #FDECEA; border: 1.5px solid #F0C7C3; }
.alert p { margin: 0; }
.checks-inline { list-style: none; padding: 0; margin: 6px 0 0; font-size: 14px; }
.tag.warn { background: #FFF6D6; color: #8A5A33; margin-left: 6px; }
