/* =========================================================
   삼일교회 이벤트 관리 — 단일 스타일시트
   색: 교회 기본색 검정(#000) + 포인트 빨강(#E60012)
   글꼴: Pretendard (없으면 시스템 고딕)
   호출: /samil_ui/css/samil_admin.css?v=N  (고칠 때마다 N 올리기)
   ========================================================= */

:root {
	--ink: #000000;
	--text: #23262c;
	--muted: #686e79;
	--faint: #9298a2;
	--line: #dcdfe4;
	--line-soft: #eceef1;
	--bg: #eef0f3;
	--surface: #ffffff;
	--surface-2: #f7f8fa;
	--red: #e60012;
	--red-ink: #b3000e;
	--red-wash: #fdecee;
	--ok: #116b45;
	--ok-wash: #e4f3ea;
	--warn: #8a5300;
	--warn-wash: #fff3db;
	--side: #000000;
	--side-text: #f4f5f7;
	--side-muted: #8d939d;
	--side-hover: #17191c;
	--focus: #e60012;
	--radius: 8px;
	--radius-sm: 6px;
	--shadow-pop: 0 18px 48px rgba(10, 12, 16, .22);
	--font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
	--side-w: 252px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #ffffff;
		--text: #e3e5e9;
		--muted: #a2a8b2;
		--faint: #767c87;
		--line: #2f333a;
		--line-soft: #262a30;
		--bg: #15171a;
		--surface: #1c1f23;
		--surface-2: #22262b;
		--red: #ff3b47;
		--red-ink: #ff6b74;
		--red-wash: #3a1a1d;
		--ok: #5fd39a;
		--ok-wash: #173326;
		--warn: #f2b45c;
		--warn-wash: #3a2c14;
		--side: #000000;
		--side-hover: #16181b;
		--shadow-pop: 0 18px 48px rgba(0, 0, 0, .6);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ink: #ffffff; --text: #e3e5e9; --muted: #a2a8b2; --faint: #767c87; --line: #2f333a; --line-soft: #262a30;
	--bg: #15171a; --surface: #1c1f23; --surface-2: #22262b; --red: #ff3b47; --red-ink: #ff6b74; --red-wash: #3a1a1d;
	--ok: #5fd39a; --ok-wash: #173326; --warn: #f2b45c; --warn-wash: #3a2c14; --side-hover: #16181b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	font-feature-settings: "tnum" 1;
	word-break: keep-all;
	overflow-wrap: anywhere;
}
a { color: inherit; }
a:hover { color: var(--red-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.muted { color: var(--faint); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- 앱 틀 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
	position: fixed; inset: 0 auto 0 0; z-index: 40;
	width: var(--side-w);
	display: flex; flex-direction: column;
	background: var(--side); color: var(--side-text);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark {
	display: grid; place-items: center;
	width: 38px; height: 38px; border-radius: 9px;
	background: var(--red); color: #fff;
	font-weight: 800; font-size: 17px; letter-spacing: -.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.brand-text small { font-size: 12.5px; color: var(--side-muted); margin-top: 2px; }
.sidebar .sidebar-close { display: none; color: var(--side-text); }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 20px; scrollbar-width: thin; scrollbar-color: #2a2d31 transparent; }
.nav-group { padding: 10px 0 6px; }
.nav-group + .nav-group { border-top: 1px solid #1b1d20; }
.nav-title { font-size: 12px; font-weight: 600; color: var(--side-muted); padding: 4px 10px 6px; }
.nav-link {
	position: relative;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px 8px 12px; border-radius: var(--radius-sm);
	color: #d8dbe0; text-decoration: none; font-size: 14.5px;
}
.nav-link:hover { background: var(--side-hover); color: #fff; }
.nav-link.is-active { background: #1d1f23; color: #fff; font-weight: 650; }
.nav-link.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--red); }
.nav-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

.sidebar-foot { border-top: 1px solid #1b1d20; padding: 14px 14px 16px; }
.me { display: flex; align-items: center; gap: 10px; }
.me-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #23262a; color: #fff; font-weight: 700; flex: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me-text b { font-size: 14px; }
.me-text small { font-size: 12px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-actions { display: flex; gap: 6px; margin-top: 12px; }
.me-actions .btn { flex: 1; color: #d8dbe0; border-color: #2a2d31; background: transparent; }
.me-actions .btn:hover { background: var(--side-hover); color: #fff; }

.main { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; }
.topbar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 16px;
	padding: 18px 32px; min-height: 76px;
	background: var(--bg);
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.topbar .nav-toggle { display: none; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 23px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; }
.topbar-title p { font-size: 14px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back-link .ico { width: 16px; height: 16px; }
.content { padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1680px; width: 100%; }
.content:focus { outline: none; }
.foot { padding: 0 32px 28px; font-size: 12.5px; color: var(--faint); }
.scrim { display: none; }

/* ---------- 버튼 · 입력 ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 38px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--surface); color: var(--text);
	font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
	cursor: pointer; transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: #b9bec6; color: var(--ink); background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ico { width: 17px; height: 17px; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-primary:hover { background: #26292e; border-color: #26292e; color: #fff; }
:root[data-theme="dark"] .btn-primary:hover { color: #000; background: #e6e6e6; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-dark:hover { background: #26292e; color: #fff; border-color: #26292e; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-soft); border-color: transparent; color: var(--ink); }
.btn-danger-ghost { background: transparent; border-color: var(--line); color: var(--red-ink); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--red-wash); border-color: var(--red); color: var(--red-ink); }
.icon-btn {
	display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }

input[type="text"], input[type="search"], input[type="password"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], input[type="time"], select, textarea {
	width: 100%; min-height: 40px; padding: 8px 11px;
	border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--surface); color: var(--text);
	font-size: 15px; line-height: 1.4;
}
textarea { min-height: 96px; resize: vertical; }
select { padding-right: 32px; appearance: none; -webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--ink); margin: 0; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field legend { font-size: 13.5px; font-weight: 650; color: var(--text); }
.field em { font-style: normal; color: var(--red-ink); font-size: 12px; font-weight: 600; margin-left: 4px; }
.field small { font-size: 12.5px; color: var(--muted); }
.field-radio { border: 0; padding: 0; margin: 0; }
.field-radio legend { padding: 0; margin-bottom: 6px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.radio:has(input:checked) { border-color: var(--ink); background: var(--surface-2); font-weight: 600; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.span-all { grid-column: 1 / -1; }

/* ---------- 알림 ---------- */
.notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14.5px; }
.notice-ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-wash); color: var(--ok); }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-wash); color: var(--warn); }
.notice-error { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: var(--red-wash); color: var(--red-ink); }
.notice b { font-weight: 700; }

/* ---------- 패널 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 20px 22px; }
.panel-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.panel-head p { font-size: 13.5px; color: var(--muted); }

/* 검색줄 */
.toolbar { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search select { width: auto; min-width: 128px; }
.search-input { position: relative; flex: 1 1 260px; min-width: 200px; }
.search-input .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-input input { padding-left: 36px; }
.from-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.from-date > span { white-space: nowrap; flex: none; }
.from-date input { width: 158px; }
.hint { font-size: 13.5px; color: var(--muted); }
.hint a { color: var(--text); font-weight: 600; }

/* 구분 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
	color: var(--text); text-decoration: none; font-size: 14px; font-weight: 550;
}
.chip b { font-weight: 700; color: var(--muted); font-size: 13px; }
.chip:hover { border-color: #b9bec6; color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.is-on b { color: color-mix(in srgb, var(--surface) 70%, transparent); }

/* ---------- 표 ---------- */
.table-panel { overflow: hidden; }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.count { font-size: 14.5px; color: var(--text); }
.count b { font-size: 18px; font-weight: 750; color: var(--ink); margin-right: 1px; }
.table-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.data-table thead th {
	position: sticky; top: 0; z-index: 1;
	padding: 10px 12px; background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	font-size: 13px; font-weight: 650; color: var(--muted); text-align: left; white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.data-table td.wide, .data-table td .clamp { white-space: normal; }
.data-table td.col-main { white-space: normal; min-width: 150px; max-width: 260px; overflow-wrap: anywhere; }
.data-table tbody tr[data-row] { cursor: pointer; }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.data-table tbody tr.is-checked td { background: color-mix(in srgb, var(--red-wash) 60%, var(--surface)); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { color: var(--faint); font-size: 13.5px; white-space: nowrap; width: 1%; }
.data-table .nowrap { white-space: nowrap; }
.data-table .center { text-align: center; }
.data-table .wide { min-width: 280px; max-width: 460px; }
.data-table .col-main { font-weight: 650; color: var(--ink); }
.data-table .col-check { width: 44px; padding-right: 0; cursor: default; }
.data-table .col-more { width: 48px; padding: 6px 8px; text-align: right; }
.cell-lines { display: flex; flex-direction: column; gap: 1px; }
.cell-lines .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-size: 14px; }
.table-foot { display: flex; justify-content: center; padding: 12px 16px 16px; }
.table-foot:empty { display: none; }

.badge {
	display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
	background: var(--line-soft); color: var(--text); font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.badge-ok { background: var(--ok-wash); color: var(--ok); }
.badge-warn { background: var(--warn-wash); color: var(--warn); }
.badge-red { background: var(--red-wash); color: var(--red-ink); }
.badge-dark { background: var(--ink); color: var(--surface); }

.pill {
	display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 12px;
	border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
	font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.pill .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.pill-on { background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
.pill-off { color: var(--muted); border-style: dashed; }
.pill:hover { border-color: var(--ink); color: var(--ink); }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty-title { font-size: 16px; font-weight: 650; color: var(--text); margin-bottom: 6px; }
.empty a { color: var(--text); font-weight: 600; }

/* 페이지 번호 */
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pager-num, .pager-btn {
	display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px;
	border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; color: var(--text);
}
.pager-num:hover, .pager-btn:hover { background: var(--line-soft); color: var(--ink); }
.pager-num.is-on { background: var(--ink); color: var(--surface); font-weight: 700; }
.pager-btn.is-off { color: var(--line); }
.pager-gap { color: var(--faint); padding: 0 2px; }

/* ---------- 행사 정보 / 정원 ---------- */
.event-strip { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.facts dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.facts dd { font-size: 15px; font-weight: 650; color: var(--ink); margin-top: 2px; }
.class-meter { display: flex; flex-direction: column; gap: 9px; }
.class-meter li { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; font-size: 14px; }
.cm-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.cm-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.cm-bar i.is-full { background: var(--red); }
.cm-num { font-weight: 650; white-space: nowrap; min-width: 72px; text-align: right; }

.capacity { padding: 14px 18px; }
.cap-form { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cap-text { display: flex; flex-direction: column; }
.cap-text b { font-size: 15px; color: var(--ink); }
.cap-text span { font-size: 13.5px; color: var(--muted); }
.cap-ctrl { display: flex; align-items: center; gap: 8px; }
.cap-ctrl input { width: 110px; text-align: right; }
.cap-now { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* ---------- 대시보드 ---------- */
.dash-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; }
.stat dt { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat dd { margin-top: 6px; font-size: 28px; font-weight: 750; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.stat dd small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-alert { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.stat-alert dd { color: var(--red-ink); }
.stat a { font-size: 13.5px; font-weight: 600; color: var(--text); display: inline-block; margin-top: 8px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.prog-list li { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px 112px; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.prog-list li:last-child { border-bottom: 0; }
.prog-list .ph { font-size: 12.5px; color: var(--muted); font-weight: 600; padding-top: 10px; padding-bottom: 8px; }
.prog-list a { font-weight: 650; color: var(--ink); text-decoration: none; }
.prog-list a:hover { color: var(--red-ink); }
.prog-list .n { text-align: right; font-weight: 650; }
.prog-list .n.zero { color: var(--faint); font-weight: 400; }
.prog-list .d { text-align: right; color: var(--muted); font-size: 13.5px; }
.prog-new { color: var(--red-ink); }
.log-list li { display: flex; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; align-items: baseline; }
.log-list li:last-child { border-bottom: 0; }
.log-list time { color: var(--faint); white-space: nowrap; min-width: 86px; }
.log-list .log-what { flex: 1; min-width: 0; }

/* ---------- 상세 / 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 9, 11, .48); }
.modal-panel {
	position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px);
	display: flex; flex-direction: column;
	background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop);
	animation: modal-in .16s ease-out;
}
.modal-sm .modal-panel { width: min(420px, 100%); }
.modal-lg .modal-panel { width: min(760px, 100%); }
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.modal-head h2 { font-size: 18px; font-weight: 750; color: var(--ink); }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.modal-body .modal-actions { padding: 14px 0 0; margin-top: 4px; }
.modal-actions .spacer { flex: 1; }
.detail-list { display: grid; grid-template-columns: 132px minmax(0, 1fr); border-top: 1px solid var(--line-soft); }
.detail-list dt, .detail-list dd { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.detail-list dt { color: var(--muted); font-weight: 600; padding-right: 12px; }
.detail-list dd { color: var(--text); white-space: pre-line; }

.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; padding: 11px 18px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-pop); animation: modal-in .16s ease-out; max-width: calc(100vw - 32px); }
.toast-error { background: var(--red); color: #fff; }

/* ---------- 근태 표 ---------- */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav strong { font-size: 18px; font-weight: 750; color: var(--ink); min-width: 104px; text-align: center; }
.attend-wrap { overflow: auto; max-height: calc(100vh - 230px); }
.attend { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.attend th, .attend td { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px 7px; vertical-align: top; min-width: 74px; }
.attend thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 650; color: var(--muted); text-align: center; white-space: nowrap; }
.attend thead th.is-sun { color: var(--red-ink); }
.attend thead th.is-sat { color: #2f5bd0; }
.attend thead th.is-today { background: var(--ink); color: var(--surface); }
.attend .who { position: sticky; left: 0; z-index: 1; background: var(--surface); font-weight: 700; color: var(--ink); min-width: 96px; white-space: nowrap; }
.attend thead .who { z-index: 3; background: var(--surface-2); text-align: left; }
.attend .who small { display: block; font-weight: 500; color: var(--faint); font-size: 12px; }
.attend td.is-weekend { background: var(--surface-2); }
.punch { display: block; white-space: nowrap; line-height: 1.5; }
.punch-in { color: var(--text); }
.punch-in::before { content: "출근 "; color: var(--faint); }
.punch-out { color: var(--muted); }
.punch-out::before { content: "퇴근 "; color: var(--faint); }

/* ---------- 로그인 / 계정 신청 ---------- */
.page-plain { min-height: 100vh; background: var(--bg); }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side {
	position: relative; overflow: hidden;
	background: #000; color: #fff;
	padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side .brand-mark { width: 46px; height: 46px; font-size: 20px; border-radius: 11px; }
.auth-word { font-size: clamp(56px, 8.2vw, 120px); font-weight: 800; line-height: .98; letter-spacing: -.055em; }
.auth-word span { display: block; }
.auth-word .r { color: var(--red); }
.auth-note { font-size: 14px; color: #a7adb6; max-width: 32em; }
.auth-note b { color: #fff; font-weight: 650; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: min(380px, 100%); }
.auth-box h1 { font-size: 26px; font-weight: 750; color: var(--ink); letter-spacing: -.02em; }
.auth-box > p { color: var(--muted); margin: 6px 0 24px; font-size: 14.5px; }
.auth-box .form-stack { gap: 16px; }
.auth-box .btn-primary { width: 100%; min-height: 46px; font-size: 15.5px; margin-top: 4px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.auth-links a { font-weight: 650; color: var(--text); }
.auth-wide { width: min(520px, 100%); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row img { height: 46px; width: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.captcha-q { font-size: 18px; font-weight: 700; color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.plain-box { width: min(480px, calc(100% - 32px)); margin: 12vh auto 0; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.plain-box .brand-mark { margin-bottom: 18px; }
.plain-box h1 { font-size: 22px; font-weight: 750; color: var(--ink); margin-bottom: 8px; }
.plain-box p { color: var(--muted); }
.plain-actions { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 계정 관리 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; }
.tab { padding: 12px 14px 11px; text-decoration: none; color: var(--muted); font-weight: 650; font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab b { font-weight: 700; margin-left: 4px; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--red); }
.flag { display: inline-flex; padding: 1px 7px; border-radius: 4px; background: var(--red-wash); color: var(--red-ink); font-size: 12px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.inline-approve { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.inline-approve select { width: auto; max-width: 180px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

.simple-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.simple-table th, .simple-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.simple-table th { font-size: 12.5px; color: var(--muted); font-weight: 650; background: var(--surface-2); }
.simple-table td.r, .simple-table th.r { text-align: right; }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell i { display: block; height: 7px; border-radius: 9px; background: var(--ink); min-width: 2px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
	.dash-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dash-grid, .edit-grid, .event-strip { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
	.sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
	.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
	.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); }
	.sidebar .sidebar-close { display: inline-grid; }
	.main { margin-left: 0; }
	.topbar .nav-toggle { display: inline-grid; margin-left: -6px; }
	.topbar { padding: 12px 16px; min-height: 64px; gap: 10px; }
	.topbar-title h1 { font-size: 19px; }
	.content { padding: 16px 16px 32px; }
	.foot { padding: 0 16px 24px; }
	.auth { grid-template-columns: minmax(0, 1fr); }
	.auth-side { padding: 28px 24px; min-height: 0; gap: 28px; }
	.auth-word { font-size: 54px; }
	.auth-note { display: none; }
}
@media (max-width: 720px) {
	.topbar-actions .btn span { display: none; }
	.topbar-actions .btn { padding: 0 10px; }
	.search select, .from-date { width: 100%; }
	.from-date input { flex: 1; width: auto; min-width: 0; }
	.search .btn { flex: 1; }
	.form-grid { grid-template-columns: minmax(0, 1fr); }
	.prog-list li { grid-template-columns: minmax(0, 1fr) 56px 60px; }
	.prog-list .d { display: none; }
	.detail-list { grid-template-columns: 104px minmax(0, 1fr); }
	.class-meter li { grid-template-columns: minmax(0, 1fr) auto; }
	.class-meter .cm-bar { grid-column: 1 / -1; order: 3; }
	.kv { grid-template-columns: 96px minmax(0, 1fr); }

	/* 표 → 카드 */
	.data-table thead { display: none; }
	.data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
	.data-table tbody tr { position: relative; padding: 12px 16px 10px 48px; border-bottom: 1px solid var(--line-soft); }
	.data-table.no-check tbody tr { padding-left: 16px; }
	.data-table td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
	.data-table td::before { content: attr(data-label); color: var(--faint); font-size: 13px; line-height: 1.4; padding-top: 1px; }
	.data-table td.col-main { grid-template-columns: minmax(0, 1fr); font-size: 16px; order: -1; padding-bottom: 4px; padding-right: 36px; max-width: none; min-width: 0; }
	.data-table td.col-main::before { display: none; }
	.data-table tr { display: flex; flex-direction: column; }
	.data-table td.col-check { position: absolute; left: 16px; top: 14px; width: auto; display: block; padding: 0; }
	.data-table td.col-check::before { display: none; }
	.data-table td.col-more { position: absolute; right: 8px; top: 6px; width: auto; display: block; padding: 0; }
	.data-table td.col-more::before { display: none; }
	.data-table td.center { text-align: left; }
	.data-table .wide { min-width: 0; max-width: none; }
	.data-table td:has(> .muted:only-child) { display: none; }
	.data-table tbody tr:hover td { background: transparent; }
	.data-table td > .badge, .data-table td > .pill, .data-table td > .btn { justify-self: start; }
	.inline-approve { flex-wrap: wrap; }
	.inline-approve select { max-width: 100%; }
	.topbar-title p { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
	.sidebar, .topbar-actions, .toolbar, .chips, .table-tools, .col-check, .col-more, .pager, .foot, .nav-toggle { display: none !important; }
	.main { margin: 0; }
	body { background: #fff; }
	.panel { border: 0; }
}
