/* ══════════════════════════════════════════════════════════════════
   coin CRM — 공통 스타일
   어두운 사이드바 + 밝은 본문. 표가 많은 화면을 기준으로 잡았다.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --navy-900: #0d1b2a;
  --navy-800: #12263a;
  --navy-700: #1b344d;
  --line:     #dfe5ec;
  --bg:       #f4f6f9;
  --card:     #ffffff;
  --ink:      #1f2b3a;
  --ink-2:    #5b6b7f;
  --ink-3:    #8a99ab;
  --accent:   #2f7fe0;
  --ok:       #17916b;
  --ok-bg:    #e7f6f0;
  --warn:     #b8860b;
  --warn-bg:  #fdf5e0;
  --bad:      #c0392b;
  --bad-bg:   #fdecea;
  --radius:   10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
               "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.ic { flex: 0 0 auto; }

/* ── 뼈대 ──────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 216px;
  flex: 0 0 216px;
  background: var(--navy-900);
  color: #c9d6e4;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 20px 18px 16px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
}
.brand span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  color: #6f88a5;
  margin-left: 6px;
  vertical-align: 2px;
}

.nav { flex: 1; padding: 6px 10px; overflow-y: auto; }
.nav-i {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: #b3c4d6;
  font-size: 13.5px;
}
.nav-i:hover { background: var(--navy-800); color: #fff; text-decoration: none; }
.nav-i.on { background: var(--navy-700); color: #fff; font-weight: 600; }
.nav-empty { padding: 12px; color: #7e90a4; font-size: 12.5px; }

.side-foot { padding: 12px 14px 16px; border-top: 1px solid #1c2f45; }
.who { margin-bottom: 8px; line-height: 1.35; }
.who strong { display: block; color: #fff; font-size: 13.5px; }
.who span { font-size: 11.5px; color: #7e90a4; }
.logout {
  display: inline-flex; align-items: center; gap: 6px;
  color: #9fb2c6; font-size: 12.5px;
}
.logout:hover { color: #fff; text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top h1 { font-size: 16.5px; font-weight: 700; margin: 0; }
.top-r { color: var(--ink-3); font-size: 12.5px; }

.body { padding: 22px 26px 60px; }

/* ── 카드·표 ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.card > h2 {
  font-size: 14px;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.card > h2 .count {
  background: var(--bg); color: var(--ink-2);
  border-radius: 20px; padding: 1px 9px; font-size: 12px; font-weight: 600;
}
.card-b { padding: 16px 18px; }
.card-note { color: var(--ink-2); font-size: 12.5px; padding: 0 18px 14px; margin: 0; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
table.tbl th {
  background: #fafbfd;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12px;
}
table.tbl tbody tr:hover { background: #fafcfe; }
table.tbl td.wrap { white-space: normal; }
.empty { padding: 30px 18px; text-align: center; color: var(--ink-3); }

/* ── 배지 ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge.ok      { background: var(--ok-bg);   color: var(--ok);   }
.badge.warn    { background: var(--warn-bg); color: var(--warn); }
.badge.bad     { background: var(--bad-bg);  color: var(--bad);  }
.badge.mute    { background: var(--bg);      color: var(--ink-3); }

/* ── 알림 ──────────────────────────────────────────────────────── */
.alert {
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid transparent;
}
.alert.ok   { background: var(--ok-bg);   border-color: #bfe6d6; color: #0f6b4f; }
.alert.warn { background: var(--warn-bg); border-color: #eeddb0; color: #7a5c07; }
.alert.bad  { background: var(--bad-bg);  border-color: #f2c6c0; color: #96271b; }

/* ── 폼·버튼 ───────────────────────────────────────────────────── */
label.fld { display: block; margin-bottom: 14px; }
label.fld > span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
input[type=text], input[type=password], input[type=tel], input[type=email],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 127, 224, .12);
}
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #f7f9fc; text-decoration: none; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: #2569bd; }
.btn.ok  { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #137a59; }
.btn.bad { color: var(--bad); border-color: #eec6c1; }
.btn.bad:hover { background: var(--bad-bg); }
.btn.sm  { padding: 5px 11px; font-size: 12.5px; }
.btn.wide { width: 100%; justify-content: center; padding: 11px; }
.btn:disabled, .btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  background: var(--bg);
  color: var(--ink-3);
  border-color: var(--line);
}
.btn:disabled:hover { background: var(--bg); }

/* 입력칸 + 옆 버튼 */
.row-in { display: flex; gap: 8px; align-items: stretch; }
.row-in input { flex: 1; }
.row-in .btn { white-space: nowrap; }

.actions { display: flex; gap: 6px; }
form.inline { display: inline; }

/* ── 로그인·가입 화면 ──────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(160deg, #0d1b2a 0%, #16324b 100%);
}
.auth {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 30px 30px 26px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}
.auth.wide { max-width: 520px; }
.auth-brand {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.auth-sub {
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
  margin: 0 0 22px;
}
.auth-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
}

/* ── 안내(승인 대기) 화면 ──────────────────────────────────────── */
.notice-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
}
.notice {
  max-width: 470px; width: 100%;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 34px 32px; text-align: center;
}
.notice h1 { font-size: 19px; margin: 14px 0 8px; }
.notice p { color: var(--ink-2); margin: 0 0 6px; font-size: 13.5px; }
.notice .dl { margin: 20px 0 22px; text-align: left; font-size: 13px; }
.notice .dl div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.notice .dl span { color: var(--ink-3); }

/* ── 준비중 페이지 ─────────────────────────────────────────────── */
.soon {
  background: var(--card);
  border: 1px dashed #c8d4e2;
  border-radius: var(--radius);
  padding: 46px 24px;
  text-align: center;
  color: var(--ink-2);
}
.soon strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.soon ul { display: inline-block; text-align: left; margin: 16px 0 0; color: var(--ink-2); font-size: 13px; }

/* ── 통계 타일 ─────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px;
}
.tile .k { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.tile .v { font-size: 25px; font-weight: 700; line-height: 1.15; }
.tile .v.warn { color: var(--warn); }
.tile a { font-size: 12px; }

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; }
  .nav { display: flex; flex-wrap: wrap; }
  .body { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   인증 화면 2단 레이아웃 (.authx) — 좌: 브랜드 패널 / 우: 폼
   login.php 가 쓴다. 구형 1단 레이아웃(.auth-wrap)은 signup·pending 이
   아직 쓰고 있으므로 지우지 말 것.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --gold:      #e8c776;
  --gold-soft: #f0dba8;
  --ink-inv:   #eaf1ff;
}

.authx {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 1.06fr .94fr;
  background: var(--card);
}

/* ── 좌측 브랜드 패널 ──────────────────────────────────────────── */
.authx__brand {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 54px 56px 40px;
  color: var(--ink-inv);
  background:
    radial-gradient(115% 75% at 88% -5%, rgba(31, 92, 182, .48), transparent 62%),
    radial-gradient(85% 65% at -5% 105%, rgba(232, 199, 118, .16), transparent 60%),
    linear-gradient(158deg, #16324b, #0a1622);
}
/* 미세한 격자 — 원장(ledger)의 인상 */
.authx__brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(80% 70% at 30% 30%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 70% at 30% 30%, #000, transparent 78%);
}
.authx__brand::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: .5;
}

/* 노드 네트워크 캔버스 (assets/js/authbg.js).
   본문이 놓인 좌측·중앙은 마스크로 걷어내 가독성을 지키고,
   비어 있는 우측 여백에서 가장 진하게 보이도록 한다. */
.authx__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  mask-image: radial-gradient(96% 104% at 70% 46%, #000 0%, rgba(0,0,0,.6) 52%, transparent 93%);
  -webkit-mask-image: radial-gradient(96% 104% at 70% 46%, #000 0%, rgba(0,0,0,.6) 52%, transparent 93%);
}
/* 캔버스 위로 내용이 오도록 */
.authx__mark, .authx__body, .authx__foot { position: relative; z-index: 1; }

.authx__mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(232,199,118,.34);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  color: var(--gold-soft);
}
.authx__mark svg { width: 26px; height: 26px; }

/* 마크는 위, 보안 표시는 아래에 고정하고 본문은 남는 공간 가운데로 */
.authx__body { margin: auto 0; }
.authx__eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-soft); opacity: .92;
}
/* 라틴 대문자 워드마크 — 한글 제목과 달리 자간을 벌려야 균형이 맞는다 */
.authx__h {
  font-size: clamp(40px, 4.4vw, 58px); line-height: 1.05;
  letter-spacing: .045em; font-weight: 800; margin: 11px 0 0; color: #fff;
}
.authx__p {
  margin: 15px 0 0; max-width: 34ch;
  font-size: 14.5px; line-height: 1.75;
  color: rgba(234,241,255,.66); font-weight: 500;
}

.authx__list { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.authx__list li {
  display: flex; align-items: center; gap: 13px; padding: 12px 0;
  font-size: 14.5px; font-weight: 600; color: rgba(234,241,255,.9);
  border-top: 1px solid rgba(255,255,255,.08);
}
.authx__list li:last-child { border-bottom: 1px solid rgba(255,255,255,.08); }
.authx__list i {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.07); color: var(--gold-soft);
}
.authx__list i svg { width: 17px; height: 17px; }

.authx__foot { padding-top: 32px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.authx__footLab {
  font-size: 11.5px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(234,241,255,.42);
}
.authx__chips { display: flex; gap: 7px; flex-wrap: wrap; }
.authx__chips span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--gold-soft);
  background: rgba(255,255,255,.06); border: 1px solid rgba(232,199,118,.22);
}
.authx__chips svg { width: 13px; height: 13px; }

/* ── 우측 폼 패널 ──────────────────────────────────────────────── */
.authx__panel { display: flex; align-items: center; justify-content: center; padding: 48px 40px; }
.authx__form { width: 100%; max-width: 392px; }
.authx__title { font-size: 27px; font-weight: 800; letter-spacing: -.028em; color: var(--ink); }
.authx__sub { margin-top: 7px; font-size: 14px; color: var(--ink-3); font-weight: 500; line-height: 1.6; }
.authx__sep {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 22px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3);
}
.authx__sep::before, .authx__sep::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.authx__end {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); text-align: center;
}
.authx__end a { font-weight: 700; }

@media (max-width: 900px) {
  .authx { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .authx__brand { padding: 32px 26px 28px; }
  .authx__h { font-size: 38px; }
  .authx__p { max-width: none; }
  .authx__list { display: none; }
  .authx__body { margin: 20px 0 0; }
  .authx__foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
  .authx__panel { padding: 36px 24px 52px; }
}
