/* MOVIZ Service 디자인 시스템 (어두운 테마) — 관리자 목록 사이트 · 고객 기획 페이지 공용 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --canvas: #070e22; --canvas-soft: #0d1630; --surface: #111b38; --surface-raised: #172347;
  --hairline: #22305a; --hairline-input: #5a6ea6;
  --ink: #eef1fa; --ink-2: #c3cae0; --ink-mute: #8b95b5;
  --primary: #6650f5; --primary-press: #5541e0; --primary-soft: #241f5c; --primary-text: #b4a9ff; --on-primary: #ffffff;
  --focus: #b4a9ff;
  --danger: #ff8a7a; --danger-soft: #3a1a22; --success: #5fd6a0; --success-soft: #0f3330; --warning: #f2c35b; --warning-soft: #33290f;
  --scrim: rgba(4, 8, 20, 0.72);
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 18px; --r-pill: 999px;
  --shadow-focus-input: 0 0 0 3px #241f5c; --shadow-frame: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --topbar-h: 56px; --sidebar-w: 232px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, .code { font-variant-numeric: tabular-nums; }
.code { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; }
.mute { color: var(--ink-mute); }
.ink2 { color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.55; }
.caption { font-size: 13px; line-height: 1.45; font-weight: 500; }
.eyebrow { font-size: 12px; line-height: 1.2; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-text); }
.wordmark { font-size: 17px; font-weight: 800; letter-spacing: 0.06em; color: var(--ink); }
h1, h2, h3 { margin: 0; }
.display-md { font-size: 28px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.heading-lg { font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; }
.heading-md { font-size: 18px; line-height: 1.45; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 640px) { .display-md { font-size: 24px; } }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1px solid var(--hairline-input); background: transparent; color: var(--ink);
  font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
  text-decoration: none !important;
}
.btn:hover { background: var(--surface-raised); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-press); border-color: var(--primary-press); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-raised); color: var(--ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm svg { width: 16px; height: 16px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 입력 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.field .help { font-size: 13px; line-height: 1.45; color: var(--ink-mute); font-weight: 500; }
.field .error { font-size: 13px; color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline-input);
  background: var(--canvas); color: var(--ink); font: 400 15px/1.4 var(--sans); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b95b5' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-text); box-shadow: var(--shadow-focus-input); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .55; cursor: not-allowed; }
.input.sm, .select.sm { height: 32px; font-size: 14px; }
input[type="color"].swatch-input { width: 40px; height: 40px; padding: 0; border: 1px solid var(--hairline-input); border-radius: var(--r-sm); background: var(--canvas); cursor: pointer; }
input[type="color"].swatch-input::-webkit-color-swatch-wrapper { padding: 4px; }
input[type="color"].swatch-input::-webkit-color-swatch { border: none; border-radius: 3px; }

/* 고르기 칩 · 나뉜 버튼 */
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-input); background: transparent; color: var(--ink-2); font: 600 14px/1 var(--sans); cursor: pointer;
}
.chip:hover { background: var(--surface-raised); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--primary-soft); border-color: var(--primary-text); color: var(--primary-text); }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.chip:disabled { opacity: .4; cursor: not-allowed; }

/* 스위치 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--surface-raised); border: 1px solid var(--hairline-input); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-mute); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--on-primary); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- 패널 · 상자 ---------- */
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 20px; }
.panel + .panel { margin-top: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head p { margin: 4px 0 0; }
.note { background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.note.warn { background: var(--warning-soft); border-color: rgba(242, 195, 91, .35); color: var(--ink); }
.note.ok { background: var(--success-soft); border-color: rgba(95, 214, 160, .35); color: var(--ink); }
.note.bad { background: var(--danger-soft); border-color: rgba(255, 138, 122, .4); color: var(--ink); }
.note strong { font-weight: 600; }
.divider { height: 1px; background: var(--hairline); margin: 20px 0; border: 0; }

/* 태그 · 상태 알약 */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-raised); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--surface-raised); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.s-new { color: var(--ink-2); }
.pill.s-planning { color: var(--warning); background: var(--warning-soft); }
.pill.s-planned { color: var(--primary-text); background: var(--primary-soft); }
.pill.s-working, .pill.s-review, .pill.s-approved, .pill.s-rendering { color: var(--ink); background: var(--surface-raised); }
.pill.s-working::before, .pill.s-rendering::before { background: var(--primary-text); }
.pill.s-delivered, .pill.s-done { color: var(--success); background: var(--success-soft); }
.pill.s-canceled { color: var(--ink-mute); }
.pill.warn { color: var(--warning); background: var(--warning-soft); }
.flag { font-size: 13px; font-weight: 600; color: var(--warning); }

/* 색 견본 */
.swatches { display: inline-flex; gap: 4px; }
.swatches i { width: 20px; height: 20px; border-radius: 4px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.swatches.lg i { width: 28px; height: 28px; border-radius: 6px; }
.checker { background-color: #1b2547; background-image: linear-gradient(45deg, #26325c 25%, transparent 25%), linear-gradient(-45deg, #26325c 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #26325c 75%), linear-gradient(-45deg, transparent 75%, #26325c 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }

/* 알림 */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 520px; }
.toast { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--hairline-input); border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow-frame); pointer-events: auto; animation: rise .2s ease-out; }
.toast.bad { border-color: var(--danger); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 대화 상자 */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-frame); width: 100%; max-width: 440px; padding: 24px; }
.dialog p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
