/* ============================================================
   아해뜰 숲 어린이집 — 관리자 (크레용 숲 테마)
   공개 사이트와 같은 색·손그림 카드·둥근 글꼴. 밝은 톤 하나로 통일.
   ── 컴포넌트 클래스 이름은 기존 그대로 두고 색/형태만 바꿨다.
      (25개 관리자 페이지가 이 클래스들을 그대로 쓰므로 절대 바꾸지 않는다)
   ============================================================ */

/* 제목·버튼용 표시 글꼴 (학교안심 시간표 — 공개 사이트와 동일) */
@font-face {
  font-family:"Hakgyoansim Siganpyo";
  src:url("/assets/fonts/hakgyoansim-siganpyo-r.otf") format("opentype");
  font-weight:400 800; font-style:normal; font-display:swap;
}

/* 다크모드는 없앴다 — data-theme 값과 상관없이 모두 밝은 크레용 톤으로 고정한다. */
:root,
[data-theme="dark"],
[data-theme="light"] {
  --bg:           #FFFCEE;   /* 따뜻한 파스텔 크림 — 페이지 바탕 (홈페이지 톤) */
  --bg-2:         #FFFEF8;   /* 사이드바 — 아주 옅은 웜화이트 */
  --surface:      #FFFDF7;   /* 카드 — 홈페이지 카드와 동일 */
  --surface-2:    #FBF4E2;   /* 입력창·hover — 옅은 크림 */
  --surface-3:    #F2EAD4;
  --border:       #EEE6D0;   /* 옅은 크림 테두리 */
  --border-2:     #E1D7BC;
  --fg:           #2B2118;   /* 본문 */
  --fg-2:         #5A4A39;   /* 보조 */
  --muted:        #9B8A70;
  --primary:      #55701F;   /* 숲 초록 — 주요 버튼 */
  --primary-2:    #6E8F2A;
  --primary-soft: #EDF3E0;   /* 옅은 연둣빛 파스텔 */
  --success:      #4E7A2E;  --success-soft: #E7F1DA;
  --danger:       #C0392B;  --danger-soft:  #F8E5E1;
  --warning:      #B67D10;  --warning-soft: #FBEFD1;
  --info:         #2E7FA8;  --info-soft:    #E2EFF6;
  --sketch-ink:   #40403A;   /* 손그림 테두리색 */
  --shadow-sm:    0 1px 2px rgba(64,64,58,.10);
  --shadow:       3px 4px 0 rgba(64,64,58,.10);
  --shadow-lg:    5px 7px 0 rgba(64,64,58,.14);
  --radius:       14px;
  --radius-sm:    10px;
  --radius-lg:    20px;
  --side-w:       264px;
  --side-w-mini:  74px;
  --top-h:        64px;
  --font-body:    "Pretendard","Pretendard Variable",-apple-system,BlinkMacSystemFont,system-ui,"Malgun Gothic",sans-serif;
  --font-display: "Hakgyoansim Siganpyo", var(--font-body);
  color-scheme: light;

  /* ── 공개 사이트(main.css) 토큰 별칭 ──────────────────────────────────
     본문 에디터(editor.css)·기타 공유 컴포넌트가 main.css 변수를 쓰는데,
     관리자는 main.css 를 로드하지 않아 그 변수가 비어 아이콘이 stroke:none 으로
     사라졌다(툴바가 안 보이던 원인). 여기서 크레용 톤으로 매핑해 채운다. */
  --line:       #EEE6D0;
  --bg-soft:    #FBF4E2;
  --font:       var(--font-body);
  --fs-body:    16.5px;
  --lh-body:    1.65;
  --ink-900:    #2B2118;
  --ink-700:    #4A3B2E;
  --ink-500:    #5A4A39;
  --ink-300:    #9B8A70;
  --forest-050: #F7FBF3;
  --forest-100: #EDF3E0;
  --forest-300: #AAD480;
  --forest-500: #6E8F2A;
  --forest-700: #55701F;
  --forest-900: #2F4A1F;
  --r-sm:       10px;
  --r-md:       14px;
  --shadow-md:  var(--shadow);
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-2); }
button { font-family: inherit; }
input, select, textarea, button { font-family: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 2px dashed var(--border-2); margin: 20px 0; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

h1, h2, h3, .brand-text, .stat-num, .page-header h1 { font-family: var(--font-display); }

/* ----- Login screen ----- */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background:
    radial-gradient(ellipse at top left,  rgba(110,143,42,.16), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(244,196,48,.20), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; padding: 40px 34px;
  background: var(--surface);
  border: 2.5px solid var(--sketch-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 {
  font-size: 26px; margin: 0; text-align: center; font-weight: 700; color: var(--primary);
}
.login-card .muted { text-align: center; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--fg-2); }
.login-card input {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 2px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border .15s, box-shadow .15s;
}
.login-card input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.login-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ----- Shell layout ----- */
body.admin { display: flex; min-height: 100vh; background: var(--bg); }

/* Sidebar */
.sidebar {
  width: var(--side-w);
  background: var(--bg-2);
  border-right: 2px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  transition: width .2s ease;
  z-index: 50;
}
body.sidebar-mini .sidebar { width: var(--side-w-mini); }
body.sidebar-mini .sidebar .brand-text,
body.sidebar-mini .sidebar nav a span:not(.icon),
body.sidebar-mini .side-foot div.user-meta,
body.sidebar-mini .side-foot a span,
body.sidebar-mini .nav-section-label,
body.sidebar-mini .nav-adv > summary span:not(.icon),
body.sidebar-mini .side-site-link span:not(.icon) { display: none; }
body.sidebar-mini .sidebar nav a { justify-content: center; padding: 11px; }

.brand {
  padding: 0 18px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 2px solid var(--border);
  height: var(--top-h);
}
.brand-mark { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.brand-text { font-size: 18px; font-weight: 700; color: var(--primary); line-height: 1.15; }
.brand-text small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; font-family: var(--font-body); }

.sidebar nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-section-label {
  padding: 14px 12px 6px; font-size: 13px; color: var(--muted);
  letter-spacing: .02em; font-weight: 700; font-family: var(--font-display);
}
.sidebar nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  color: var(--fg-2);
  font-size: 16.5px; font-weight: 600;
  margin: 2px 0;
  white-space: nowrap;
  transition: all .12s;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.sidebar nav a.on {
  background: var(--primary-soft); color: var(--primary);
  border: 2px solid var(--primary-2); padding: 9px 11px;
}
.sidebar nav a .icon {
  width: 22px; height: 22px; flex-shrink: 0; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar nav a .badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700;
}

/* 자주 하는 일 — 첫 그룹은 조금 더 눈에 띄게 */
.nav-primary a { font-size: 17px; }

/* 고급 설정 — 접이식 (native <details>, JS 불필요) */
.nav-adv { margin-top: 8px; border-top: 2px dashed var(--border-2); padding-top: 6px; }
.nav-adv > summary {
  list-style: none; cursor: pointer;
  padding: 12px 13px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; color: var(--muted);
  font-family: var(--font-display);
  display: flex; align-items: center; gap: 11px;
}
.nav-adv > summary::-webkit-details-marker { display: none; }
.nav-adv > summary:hover { background: var(--surface-2); color: var(--fg-2); }
.nav-adv > summary .chev { margin-left: auto; transition: transform .18s; font-size: 12px; }
.nav-adv[open] > summary .chev { transform: rotate(90deg); }

.side-foot {
  padding: 14px;
  border-top: 2px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.side-foot .avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary); border: 2px solid var(--sketch-ink);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.side-foot .user-meta { font-size: 14px; line-height: 1.3; min-width: 0; }
.side-foot .user-meta strong { display: block; color: var(--fg); }
.side-foot .user-meta small { color: var(--muted); font-size: 12px; }
.side-foot a { color: var(--muted); margin-left: auto; font-size: 18px; }
.side-foot a:hover { color: var(--danger); }

/* Content */
.content {
  flex: 1;
  margin-left: var(--side-w);
  min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left .2s;
}
body.sidebar-mini .content { margin-left: var(--side-w-mini); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,253,247,.92);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  height: var(--top-h);
  display: flex; align-items: center; gap: 14px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.topbar-toggle, .topbar-theme, .topbar-notif {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 2px solid transparent; color: var(--fg-2);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .12s;
  position: relative; font-size: 18px;
}
.topbar-toggle:hover, .topbar-theme:hover, .topbar-notif:hover {
  background: var(--surface-2); color: var(--fg); border-color: var(--border-2);
}
.topbar h1 { font-size: 20px; font-weight: 700; margin: 0; color: var(--primary); }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs span.sep { color: var(--border-2); }

/* 명령 팔레트 검색창은 원장님껜 불필요 — 숨긴다 (JS 는 optional chaining 이라 없어도 무해) */
.cmd-trigger { display: none; }
.cmd-trigger kbd { display: none; }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-notif .dot {
  position: absolute; top: 8px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--bg-2);
}
.user-menu-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; background: transparent; border: 2px solid var(--border-2);
  cursor: pointer; border-radius: 999px; color: var(--fg-2); font-weight: 600;
}
.user-menu-trigger:hover { background: var(--surface-2); }
.user-menu-trigger .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--sketch-ink);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}

/* Page header */
.page-header {
  padding: 26px 28px 8px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-size: 29px; margin: 0 0 4px; font-weight: 700; color: var(--primary); }
.page-header .lead { color: var(--fg-2); font-size: 16.5px; margin: 0; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.content-inner { padding: 16px 28px 48px; min-height: 200px; }

/* Cards / panels */
.panel, .card-v2 {
  background: var(--surface);
  border: 2.5px solid var(--sketch-ink);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 21px; font-weight: 700; margin: 0 0 16px; color: var(--fg); }
.panel h3 { font-size: 16.5px; margin: 20px 0 8px; font-weight: 700; color: var(--fg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border: 2.5px solid var(--sketch-ink);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 14.5px; color: var(--muted);
  letter-spacing: .01em; font-weight: 700; margin-bottom: 6px;
}
.stat-card .stat-num { font-size: 36px; font-weight: 700; color: var(--fg); }
.stat-card .stat-delta { font-size: 14px; margin-top: 4px; display: inline-flex; gap: 4px; color: var(--muted); }
.stat-card .stat-delta.up   { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }
.stat-card .stat-icon {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50% 45% 50% 45%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); border: 2px solid var(--sketch-ink);
  font-size: 18px;
}
.stat-card.success .stat-icon { background: var(--success-soft); }
.stat-card.warning .stat-icon { background: var(--warning-soft); }
.stat-card.danger  .stat-icon { background: var(--danger-soft); }
.stat-card.info    .stat-icon { background: var(--info-soft); }

/* Buttons */
.btn, .btn-primary, .btn-danger, .btn-ghost, .btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 19px; font-size: 16.5px; font-weight: 700;
  font-family: var(--font-display);
  border-radius: var(--radius-sm); border: 2.5px solid var(--sketch-ink);
  background: var(--surface); color: var(--fg);
  cursor: pointer; text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s;
  white-space: nowrap; box-shadow: 2px 3px 0 rgba(64,64,58,.14);
}
.btn:hover { background: var(--surface-2); text-decoration: none; transform: translate(-1px,-1px); box-shadow: 3px 4px 0 rgba(64,64,58,.16); }
.btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(64,64,58,.14); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; transform: translate(-1px,-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--fg-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); box-shadow: none; }
.btn.small { padding: 7px 13px; font-size: 14.5px; box-shadow: 1px 2px 0 rgba(64,64,58,.12); }
.btn.large { padding: 14px 28px; font-size: 19px; }

/* Forms */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 14px;
}
label.ck { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 600 !important; cursor: pointer; }
.panel label, .form-grid label {
  display: flex; flex-direction: column; gap: 6px;
  font-weight: 700; font-size: 15.5px; color: var(--fg-2);
}
.panel input[type=text], .panel input[type=email], .panel input[type=password],
.panel input[type=url], .panel input[type=number], .panel input[type=date],
.panel input[type=datetime-local], .panel input[type=search], .panel input[type=tel],
.panel input[type=file], .panel select, .panel textarea {
  padding: 12px 14px; background: var(--surface-2);
  border: 2px solid var(--border-2); border-radius: var(--radius-sm);
  font-size: 16.5px; color: var(--fg); transition: all .12s;
}
.panel input:focus, .panel select:focus, .panel textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.panel textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 8px 12px; background: var(--surface-2); border: 2px solid var(--border-2); border-radius: var(--radius-sm); font-size: 14px; color: var(--fg); }

/* Tables */
.data { width: 100%; border-collapse: collapse; font-size: 16px; }
.data thead { background: var(--surface-2); }
.data th { padding: 13px 14px; text-align: left; font-weight: 700; font-size: 14.5px; color: var(--fg-2); letter-spacing: .01em; border-bottom: 2px solid var(--border-2); }
.data td { padding: 12px 14px; border-bottom: 1.5px solid var(--border); }
.data tbody tr:hover { background: var(--surface-2); }
.data tbody tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--primary-2);
}
.tag.success { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
.tag.danger  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger); }
.tag.info    { background: var(--info-soft);    color: var(--info);    border-color: var(--info); }
.tag.muted   { background: var(--surface-2);    color: var(--muted);   border-color: var(--border-2); }

.ok  { color: var(--success); font-weight: 700; }
.err { color: var(--danger);  font-weight: 700; }
.muted { color: var(--muted); }

/* Alerts / toast */
.alert {
  padding: 14px 17px; border-radius: var(--radius-sm);
  font-size: 16.5px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  border: 2.5px solid;
}
.alert.ok  { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.alert.err { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger); }
.alert.warn{ background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
.alert.info{ background: var(--info-soft);    color: var(--info);    border-color: var(--info); }

.toast-container {
  position: fixed; right: 22px; bottom: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 2.5px solid var(--sketch-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 15px 20px;
  min-width: 280px; max-width: 380px;
  font-size: 15px; font-weight: 600;
  animation: toastIn .25s ease-out;
  border-left: 8px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Command palette (숨겨져 있지만 스타일 유지) */
.cmd-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(43,33,24,.35);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.cmd-overlay.open { display: flex; }
.cmd-panel {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border: 2.5px solid var(--sketch-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmd-input {
  width: 100%; padding: 16px 20px;
  background: transparent; border: 0; border-bottom: 2px solid var(--border);
  font-size: 16px; color: var(--fg); outline: none;
}
.cmd-list { max-height: 50vh; overflow-y: auto; list-style: none; margin: 0; padding: 6px; }
.cmd-list li {
  padding: 11px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 15px;
  display: flex; align-items: center; gap: 10px;
}
.cmd-list li.on, .cmd-list li:hover { background: var(--surface-2); }
.cmd-list li small { margin-left: auto; color: var(--muted); font-size: 12px; }

/* Charts container */
.chart-card { padding: 22px; }
.chart-card .chart-wrap { position: relative; height: 260px; }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  padding: 13px 0;
  border-bottom: 1.5px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start; font-size: 16px;
}
.feed li:last-child { border-bottom: 0; }
.feed .feed-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--border-2);
}
.feed .feed-body { flex: 1; min-width: 0; }
.feed .feed-time { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; cursor: pointer; inset: 0; background: var(--surface-3); border: 2px solid var(--border-2); border-radius: 999px; transition: .2s; }
.switch span::before { content: ""; position: absolute; height: 16px; width: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::before { transform: translateX(20px); }

/* Notifications dropdown */
.notif-pane {
  position: absolute; right: 24px; top: var(--top-h);
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 2.5px solid var(--sketch-ink); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 35;
}
.notif-pane.open { display: block; }
.notif-pane .head { padding: 10px 12px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-list li { padding: 11px; border-radius: var(--radius-sm); cursor: pointer; }
.notif-list li:hover { background: var(--surface-2); }
.notif-list li.unread { background: var(--primary-soft); }
.notif-list li .t { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Misc helpers */
.flex-spacer { flex: 1; }
.kpi-row { display: flex; gap: 6px; flex-wrap: wrap; }
.code {
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, monospace;
  font-size: 13px; padding: 2px 7px; background: var(--surface-2);
  border: 1.5px solid var(--border-2); border-radius: 6px; color: var(--info);
}
.empty {
  text-align: center; padding: 44px 20px; color: var(--muted); font-size: 15px;
}
.empty .icon { font-size: 40px; opacity: .5; margin-bottom: 8px; }

/* Attachments */
.attachments { padding: 16px; border: 2px dashed var(--border-2); border-radius: var(--radius); }
.attachments legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
.att-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.att { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.att img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border-2); }
.file-row { margin: 5px 0; }

/* ── 대시보드 시작하기 카드 (index.php 의 원장님용 큰 버튼) ──────────
   .quick-grid > a.quick-card : "무엇을 하시겠어요?" 큰 작업 버튼 */
.quick-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin-bottom: 26px;
}
.quick-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; text-decoration: none;
  background: var(--surface); color: var(--fg);
  border: 2.5px solid var(--sketch-ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.quick-card:hover { transform: translate(-2px,-3px); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--fg); }
.quick-card .qc-icon {
  width: 56px; height: 56px; margin-bottom: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; border-radius: 50% 45% 50% 45%;
  background: var(--primary-soft); border: 2.5px solid var(--sketch-ink);
}
.quick-card .qc-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--primary); }
.quick-card .qc-desc { font-size: 16px; color: var(--fg-2); line-height: 1.6; }
.quick-card .qc-go { margin-top: 6px; font-weight: 700; color: var(--primary-2); font-size: 15.5px; }
.quick-card[data-tone="sun"]   .qc-icon { background: #FCEFC7; }
.quick-card[data-tone="sky"]   .qc-icon { background: #E1EFF6; }
.quick-card[data-tone="berry"] .qc-icon { background: #FBE4EC; }

/* 안내 배너 — 페이지 상단에 "이 화면은 이렇게 쓰세요" 설명 */
.guide {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 17px 20px; margin-bottom: 20px;
  background: var(--primary-soft); border: 2px dashed var(--primary-2);
  border-radius: var(--radius); font-size: 16.5px; line-height: 1.65; color: var(--fg);
}
.guide .g-icon { font-size: 26px; flex-shrink: 0; line-height: 1.3; }
.guide strong { color: var(--primary); }

/* ── 홈페이지 바로가기 (상단바 · 사이드바) ──────────────────────────── */
.topbar-site {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 15px; border-radius:var(--radius-sm);
  background:var(--surface); border:2px solid var(--border-2);
  color:var(--fg-2); font-size:14px; font-weight:700; text-decoration:none;
  white-space:nowrap;
}
.topbar-site:hover { background:var(--primary); border-color:var(--sketch-ink); color:#fff; }
@media (max-width: 900px) { .topbar-site-text { display:none; } }

.side-site-link {
  display:flex; align-items:center; gap:11px;
  margin:8px 12px; padding:12px 14px; border-radius:var(--radius-sm);
  border:2px dashed var(--border-2);
  color:var(--fg-2); font-size:14px; font-weight:700; text-decoration:none;
}
.side-site-link:hover { border-style:solid; border-color:var(--primary); color:var(--primary); }
.side-site-link .icon { font-size:18px; }
.side-site-link .ext { margin-left:auto; opacity:.6; }

/* Mobile */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0; }
  body.sidebar-mini .content { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .page-header { padding: 18px 16px 4px; }
  .content-inner { padding: 12px 16px 32px; }
}
