:root {
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f4f7fb;
	--card: #ffffff;
	--side: #0b1220;
	--side-text: #e2e8f0;
	--accent: #2563eb;
	--btn: #111827;
	--btn-text: #ffffff;
	--focus: rgba(37, 99, 235, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Noto Sans CJK KR", "Malgun Gothic", sans-serif; }
html.is-modal-open, html.is-modal-open body { overflow: hidden; overscroll-behavior: none; }
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }
.side { width: 236px; background: var(--side); color: var(--side-text); position: fixed; inset: 0 auto 0 0; padding: 18px 12px 24px; overflow: auto; }
.brand { margin: 2px 8px 18px; }
.brand img, .mbar__brand img { display: block; width: 188px; height: auto; }
.mbar, .nav-dim { display: none; }
.brand-logo { margin: 0 0 8px; }
.brand-logo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.upload-dropzone__title { margin: 0; font-weight: 700; }
.upload-dropzone__hint { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.upload-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.btn.upload-cam, .pick-mo { display: none; }
.media-preview { max-width: 280px; width: 100%; }
.side a { display: flex; align-items: center; gap: 10px; color: var(--side-text); text-decoration: none; padding: 9px 10px; border-radius: 10px; font-weight: 500; }
.side a:hover { background: #172033; text-decoration: none; }
.side a.is-on { background: #1e293b; color: #fff; }
.side .ico { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main { margin-left: 236px; padding: 22px 24px 48px; }
h1 { font-size: 22px; margin: 0 0 14px; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 22px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.kpis div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--muted); font-size: 13px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.kpis b { display: block; margin-top: 6px; color: var(--ink); font-size: 22px; letter-spacing: -.03em; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list th { background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px; }
table.list td.left, table.list th.left { text-align: left; white-space: normal; }
table.list td.num, table.list th.num { text-align: right; }
label { display: block; margin: 14px 0 6px; color: #334155; font-size: 13px; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]),
select, textarea {
	width: 100%;
	height: 42px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 0 12px;
	font: inherit;
	color: var(--ink);
	background: #fff;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input[type=checkbox] { width: 16px; height: 16px; margin-right: 6px; accent-color: var(--btn); vertical-align: -2px; }
button, .btn, input[type=submit] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 10px;
	background: var(--btn);
	color: var(--btn-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}
button:hover, .btn:hover, input[type=submit]:hover { background: #1f2937; text-decoration: none; }
.btn.ghost, button.ghost, a.btn.ghost {
	background: #fff;
	color: var(--ink);
	border: 1px solid #cbd5e1;
}
.btn.ghost:hover, button.ghost:hover, a.btn.ghost:hover { background: #f8fafc; }
.site-modal__x { width: auto; height: auto; padding: 0 4px; background: transparent; color: #fff; border: 0; font-weight: 600; }
.site-modal__x:hover { background: transparent; color: #e2e8f0; }
a.btn { color: #fff; }
.row, form.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
form.row input, form.row select, table.list input, table.list select { width: auto; min-width: 140px; flex: 1; }
form.row .btn, form.row button, table.list .btn, table.list button { width: auto; flex: 0 0 auto; height: 42px; }
table.list form { display: flex; gap: 6px; align-items: center; justify-content: center; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.page-head .note { margin: 0; flex: 1; }
.page-head .btn { flex: 0 0 auto; }
.card > h2 { margin: 18px 0 0; }
.card > h2:first-of-type { margin-top: 0; }
.fields { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-top: 12px; }
.field { flex: 0 1 168px; min-width: 140px; }
.field.short { flex-basis: 120px; min-width: 108px; }
.field.w2 { flex-basis: 220px; }
.field.w3 { flex-basis: 280px; min-width: 200px; }
.field.grow { flex: 1 1 280px; min-width: 220px; }
.field label { margin: 0 0 6px; }
.card form { margin-top: 10px; }
form.card { margin-top: 0; }
form.card .btn, .login .btn { margin-top: 16px; }
form.card .fields .btn { margin-top: 0; align-self: flex-end; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
form.card .form-actions .btn { margin-top: 0; width: auto; flex: 0 0 auto; }
.ai-notice { background: #fff; border: 1px solid #111827; border-radius: 16px; padding: 14px 16px; margin: 0 0 14px; }
.ai-notice b { display: block; margin-bottom: 6px; }
.ai-notice p { margin: 0 0 10px; }
.ai-notice__actions { display: flex; gap: 8px; align-items: center; }
.ai-notice__actions form { margin: 0; }
.ai-notice__actions .btn { height: 36px; margin: 0; }
.ai-none { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.ai-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #f8fafc; }
.ai-card.is-on, .ai-card:has(input[type="radio"]:checked) { border-color: #111827; background: #fff; box-shadow: 0 0 0 1px #111827; }
.ai-card__pick { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.ai-card__pick span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.ai-card .note { margin: 8px 0 0; }
.ai-card .fields { margin-top: 8px; }
.ai-card .field { flex: 1 1 160px; }
.ai-model__btn { width: 100%; justify-content: flex-start; background: #fff; color: var(--ink); border: 1px solid #cbd5e1; font-weight: 500; }
.ai-model__btn:hover { background: #fff; border-color: var(--accent); }
.ai-model__pop { position: fixed; z-index: 75; width: 260px; display: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); padding: 8px; }
.ai-model__pop.is-open { display: block; }
.ai-model__list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; }
.ai-model__opt { width: 100%; height: auto; min-height: 36px; justify-content: flex-start; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 600; }
.ai-model__opt:hover { background: #f1f5f9; }
.ai-model__opt.is-on, .ai-model__opt.is-on:hover { background: #111827; color: #fff; }
.ai-model__pop .btn { width: 100%; height: 36px; margin-top: 8px; }
.ai-tip { position: fixed; z-index: 80; width: 280px; background: #111827; color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.45; box-shadow: 0 12px 28px rgba(15, 23, 42, .28); }
.ai-tip p { margin: 0 0 6px; }
.ai-tip p:last-child { margin: 0; }
.ai-tip b { margin-right: 4px; }
.ai-tip::before { content: ""; position: absolute; left: -7px; top: 14px; border-width: 7px 7px 7px 0; border-style: solid; border-color: transparent #111827 transparent transparent; }
.ai-tip.is-left::before { left: auto; right: -7px; border-width: 7px 0 7px 7px; border-color: transparent transparent transparent #111827; }
.ai-tip.is-below::before { left: 16px; right: auto; top: -7px; border-width: 0 7px 7px 7px; border-color: transparent transparent #111827 transparent; }
.ai-clear { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 500; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.checks label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; font-weight: 500; }
table.list td.url { text-align: left; word-break: break-all; }
.flash { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; padding: 10px 12px; border-radius: 10px; margin: 0 0 12px; }
.note { color: var(--muted); font-size: 13px; word-break: keep-all; }
.site-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .48); display: none; align-items: center; justify-content: center; z-index: 40; }
.site-modal.is-open { display: flex; }
.site-modal__box { width: min(420px, 92vw); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(15, 23, 42, .18); }
.site-modal__head { display: flex; background: var(--side); color: #fff; padding: 12px 14px; align-items: center; }
.site-modal__head h2 { margin: 0; flex: 1; font-size: 16px; }
.site-modal__body { padding: 16px; white-space: pre-wrap; }
.site-modal__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.upload-dropzone { border: 1px dashed #94a3b8; border-radius: 14px; padding: 16px; background: #f8fafc; margin-top: 14px; }
.upload-dropzone.is-over { background: #eff6ff; border-color: var(--accent); }
.login-body { min-height: 100vh; background: radial-gradient(1200px 500px at 50% -10%, #dbeafe, transparent 55%), var(--bg); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login { width: min(420px, 100%); margin: 0; }
.brand-mark { margin: 0; color: var(--muted); letter-spacing: .18em; font-size: 12px; font-weight: 700; }
.login h1 { margin-top: 4px; }
.login-actions { display: flex; gap: 8px; }
.login-actions .btn, .login-actions a.btn { flex: 1; margin-top: 16px; }
.login-actions + .login-actions .btn, .login-actions + .login-actions a.btn { margin-top: 0; }
.otp-code { letter-spacing: .28em; font-size: 20px; font-weight: 700; text-align: center; }
.adgod-date { position: fixed; z-index: 70; width: 292px; display: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); padding: 12px; }
.adgod-date.is-open { display: block; }
.adgod-date__head { display: flex; gap: 8px; }
.adgod-date__head select { width: auto; min-width: 0; flex: 1; height: 36px; }
.adgod-date__week, .adgod-date__days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.adgod-date__week { margin-top: 8px; }
.adgod-date__week span { font-size: 12px; color: var(--muted); padding: 4px 0; }
.adgod-date__day { height: 34px; width: 100%; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 500; }
.adgod-date__day:hover { background: #f1f5f9; }
.adgod-date__day.is-today { box-shadow: inset 0 0 0 1px #111827; }
.adgod-date__day.is-on, .adgod-date__day.is-on:hover { background: #111827; color: #fff; }
.adgod-date__days .is-empty { height: 34px; }
.adgod-date__actions { display: flex; gap: 8px; margin-top: 10px; }
.adgod-date__actions .btn { flex: 1; height: 36px; margin: 0; }
@media (max-width: 900px) {
	.mbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		position: sticky;
		top: 0;
		z-index: 230;
		min-height: 64px;
		padding: 8px 8px 8px 12px;
		background: var(--side);
	}
	.mbar__brand { display: flex; align-items: center; min-width: 0; }
	.mbar__brand img { width: auto; height: 44px; }
	.mbar__btn {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 5px;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: transparent;
		flex: 0 0 auto;
	}
	.mbar__btn:hover { background: rgba(255, 255, 255, .08); }
	.mbar__btn span { display: block; width: 18px; height: 2px; border-radius: 1px; background: #fff; }
	.nav-dim { display: block; position: fixed; inset: 0; z-index: 210; background: rgba(11, 18, 32, .45); }
	.nav-dim[hidden] { display: none !important; }
	.side {
		position: fixed;
		top: 64px;
		right: 0;
		bottom: 0;
		left: auto;
		z-index: 220;
		width: min(280px, 86vw);
		height: auto;
		display: block;
		padding: 12px;
		box-shadow: -8px 0 24px rgba(0, 0, 0, .28);
		transform: translateX(105%);
		transition: transform .2s ease;
	}
	.side .brand { display: none; }
	html.adgod-nav-open .side { transform: none; }
	html.adgod-nav-open, html.adgod-nav-open body { overflow: hidden; overscroll-behavior: none; }
	.main { margin-left: 0; padding: 16px; }
	.side a span { white-space: nowrap; }
	.field, .field.short, .field.w2, .field.w3, .field.grow { flex: 1 1 100%; min-width: 0; }
	.kpis, .ai-grid { grid-template-columns: 1fr; }
	table.list { display: block; overflow-x: auto; }
	.btn.upload-cam { display: inline-flex; }
	.pick-pc { display: none; }
	.pick-mo { display: inline; }
	h1 { font-size: 20px; }
}
