/* OneUp CMS 빌더 — 설치 마법사, 로그인, 관리자 콘솔 공통 스타일 */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --line: #e1e4ea;
  --line-strong: #c9ced8;
  --text: #1b1f27;
  --muted: #667085;
  --brand: #2f5bea;
  --brand-dark: #2247c4;
  --brand-soft: #eaf0ff;
  --ok: #12805c;
  --ok-soft: #e6f6ef;
  --warn: #a15c07;
  --warn-soft: #fff4e0;
  --fail: #c0362c;
  --fail-soft: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans JP", "Malgun Gothic", "Hiragino Sans", "Yu Gothic UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.3; letter-spacing: -.01em; }
h2 { font-size: 17px; line-height: 1.4; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .ou-mono { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }

/* 버튼 */
.ou-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.ou-btn:hover { background: #f8f9fb; text-decoration: none; }
.ou-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ou-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.ou-btn[disabled], .ou-btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.ou-btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.ou-btn--link { border: 0; background: none; padding: 0; min-height: 0; color: var(--muted); font-weight: 500; }
.ou-btn--link:hover { background: none; color: var(--text); text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(47, 91, 234, .35); outline-offset: 2px; }

/* 카드와 안내 상자 */
.ou-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.ou-card--narrow { max-width: 440px; margin: 0 auto; }
.ou-card > h1 + p, .ou-lead { color: var(--muted); margin-top: 8px; }
.ou-alert { border-radius: 8px; padding: 12px 16px; margin: 16px 0; border: 1px solid; }
.ou-alert--fail { background: var(--fail-soft); border-color: #f3c1bc; color: #8f2219; }
.ou-alert--warn { background: var(--warn-soft); border-color: #f1d49b; color: #7a4504; }
.ou-alert--ok { background: var(--ok-soft); border-color: #b4e2cf; color: #0c5f44; }
.ou-alert strong { display: block; }

/* 폼 */
.ou-field { margin-top: 20px; }
.ou-field label, .ou-label { display: block; font-weight: 600; margin-bottom: 6px; }
.ou-field input[type=text], .ou-field input[type=email], .ou-field input[type=password], .ou-field input[type=number], .ou-field select {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--text); font: inherit;
}
.ou-field input:focus, .ou-field select:focus { border-color: var(--brand); outline: 3px solid rgba(47, 91, 234, .2); outline-offset: 0; }
.ou-field.has-error input, .ou-field.has-error select { border-color: var(--fail); }
.ou-hint { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.ou-error { color: var(--fail); font-size: 13.5px; margin-top: 6px; font-weight: 500; }
.ou-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ou-row--wide-first { grid-template-columns: 2fr 1fr; }
.ou-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.ou-actions--end { justify-content: flex-end; }
.ou-section-title { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.ou-section-title:first-of-type { margin-top: 24px; }

/* 점검 목록 */
.ou-checks { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ou-checks caption { text-align: left; font-weight: 700; padding: 20px 0 6px; font-size: 14px; color: var(--muted); }
.ou-checks th, .ou-checks td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; font-weight: 400; }
.ou-checks th { width: 38%; font-family: var(--mono); font-size: 13.5px; }
.ou-checks td.ou-checks__value { color: var(--muted); }
.ou-checks td.ou-checks__state { width: 76px; text-align: right; white-space: nowrap; }
.ou-checks .ou-hint { margin-top: 2px; }
.ou-badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ou-badge--ok { background: var(--ok-soft); color: var(--ok); }
.ou-badge--warn { background: var(--warn-soft); color: var(--warn); }
.ou-badge--fail { background: var(--fail-soft); color: var(--fail); }

/* 단순 화면 (로그인, 오류, 안내) */
.ou-plain { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 16px; }
.ou-plain__brand { text-align: center; margin-bottom: 20px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.ou-plain__brand span { color: var(--brand); }
.ou-plain__foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: 13.5px; }
.ou-status { font-family: var(--mono); color: var(--muted); font-size: 14px; margin-bottom: 6px; }

/* 설치 마법사 */
.ou-install { max-width: 720px; margin: 0 auto; padding: 40px 16px 64px; }
.ou-install__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.ou-install__brand { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.ou-install__brand span { color: var(--brand); }
.ou-install__ver { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.ou-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 0 0 20px; counter-reset: step; }
.ou-steps li { counter-increment: step; border-top: 3px solid var(--line-strong); padding-top: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.ou-steps li::before { content: counter(step) ". "; }
.ou-steps li.is-done { border-color: var(--ok); color: var(--ok); }
.ou-steps li.is-current { border-color: var(--brand); color: var(--text); }
.ou-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 20px 0 0; }
.ou-summary dt { color: var(--muted); }
.ou-summary dd { margin: 0; font-weight: 600; }
.ou-next { margin: 20px 0 0; padding-left: 20px; }
.ou-next li { margin-top: 6px; }

/* 관리자 콘솔 */
.ou-admin { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.ou-side { background: #151a26; color: #c7cddb; padding: 20px 12px; display: flex; flex-direction: column; }
.ou-side__brand { color: #fff; font-weight: 800; font-size: 18px; padding: 4px 12px 20px; }
.ou-side__brand span { color: #8fa8ff; }
.ou-side nav a { display: block; padding: 9px 12px; border-radius: 8px; color: inherit; font-weight: 500; }
.ou-side nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.ou-side nav a.is-current { background: var(--brand); color: #fff; }
.ou-side__group { font-size: 12px; color: #7d869a; padding: 16px 12px 6px; font-weight: 700; }
.ou-side__soon { display: block; padding: 7px 12px; color: #6b7488; font-size: 14px; }
.ou-side__foot { margin-top: auto; padding: 16px 12px 0; font-size: 13px; color: #7d869a; }
.ou-main { padding: 28px 32px 56px; min-width: 0; }
.ou-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ou-top__user { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.ou-top__user form { margin: 0; }
.ou-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.ou-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.ou-stat__label { color: var(--muted); font-size: 13.5px; }
.ou-stat__value { font-size: 20px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.ou-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.ou-panel--form { max-width: 620px; }
.ou-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.ou-table th, .ou-table td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.ou-table th { color: var(--muted); font-weight: 600; font-size: 13.5px; width: 34%; }
.ou-table thead th { width: auto; border-top: 0; }
.ou-roadmap { margin: 12px 0 0; padding: 0; list-style: none; }
.ou-roadmap li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.ou-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ou-tags code { background: #f1f3f7; border-radius: 6px; padding: 2px 8px; }

@media (max-width: 760px) {
  .ou-card { padding: 22px 18px; }
  .ou-row, .ou-row--wide-first { grid-template-columns: 1fr; }
  .ou-steps li { font-size: 12px; }
  .ou-checks th { width: 40%; }
  .ou-checks td.ou-checks__state { width: 56px; }
  .ou-admin { grid-template-columns: 1fr; }
  .ou-side { padding: 12px; }
  .ou-side__group, .ou-side__soon, .ou-side__foot { display: none; }
  .ou-side nav { display: flex; gap: 4px; overflow-x: auto; }
  .ou-side nav a { white-space: nowrap; }
  .ou-side__brand { padding-bottom: 10px; }
  .ou-main { padding: 20px 16px 40px; }
}
