/* DINOBIZ 고객 포털·관리 콘솔.

   색은 맨 위 토큰에서만 정한다. 브랜드는 ㈜디노베이션 엠블럼의 먹색과
   디노 하늘색(#7DEDFF) — docs/superpowers/specs/2026-10-22-SaaS-리뉴얼-design.md §6.

   하늘색은 흰 바탕 위 **글자**로 쓰지 않는다. 대비가 1.3:1 이라 거의 안 보인다.
   그래서 주 버튼은 하늘색 바탕에 먹색 글자(대비 15:1), 흰 바탕의 링크는
   깊은 하늘색(#00788C, 대비 5:1)을 쓴다. */
:root {
  --ink: #0a1215;
  --ink-2: #16252b;          /* 어두운 바탕 위의 한 단계 밝은 면 */
  --brand: #7dedff;
  --brand-deep: #00788c;
  --brand-deep-hover: #005b6b;
  --brand-soft: #e0f7fb;     /* 선택된 것·안내 상자의 옅은 바탕 */
  --bg: #f4f8f9;
  --surface: #ffffff;
  --line: #dfe7ea;
  --line-soft: #eef3f4;
  --muted: #56676c;
  --ok: #1e7b4b;    --ok-bg: #e4f3ea;    --ok-line: #b9e0c8;
  --warn: #b45309;  --warn-bg: #fff6dc;  --warn-line: #f2d27a;
  --danger: #c2410c; --danger-bg: #fdece4; --danger-line: #f6c3ad;
  --font-body: "IBM Plex Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
  --font-head: "Gothic A1", "Malgun Gothic", sans-serif;
  /* 숫자 글꼴에 한글이 섞이면 고정폭 대체 글꼴로 떨어져 「근 거 와」 처럼 벌어진다.
     한글 글자는 본문 글꼴로 받도록 Plex Sans KR 을 바로 뒤에 둔다. */
  --font-num: "IBM Plex Mono", "IBM Plex Sans KR", "Malgun Gothic", monospace;
  --font-mark: "Varela Round", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
a { color: var(--brand-deep); }
a:hover { color: var(--brand-deep-hover); }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.01em; }

/* 머리. 로고와 같은 검정 바탕 + 하늘색. 좁은 화면에서는 메뉴가 아래 줄로 내려간다. */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 12px 24px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--brand); text-decoration: none; }
.brand:hover { color: var(--brand); }
/* 엠블럼 44px → 글자 21.5px(×0.49), 간격 14px(×0.31) — 원본 로고 비율 */
.brand .emblem { width: 44px; height: 44px; display: block; }
.brand .wordmark { height: 21.5px; width: auto; display: block; }
/* body 에도 console 이 붙으므로 이 표시는 이름을 따로 쓴다(같은 이름이면 쪽 전체가 알약 모양이 됐다). */
.console-tag { font-size: 12.5px; font-weight: 600; color: var(--brand);
  padding: 2px 9px; border: 1px solid #3d5057; border-radius: 999px; letter-spacing: 0; }
.top nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
/* 메뉴 링크. 지금 보고 있는 화면은 밑줄로 표시한다 — 색만 바꾸면 색을 구분
   하기 어려운 사람에게는 아무 표시도 없는 것과 같다. */
.navlink { color: #c3d3d7; text-decoration: none; font-size: 14.5px;
  padding: 4px 0; border-bottom: 2px solid transparent; }
.navlink:hover { color: #fff; }
.navlink.here { color: #fff; font-weight: 600; border-bottom-color: var(--brand); }
.top button.quiet { background: transparent; color: #fff; border-color: #3d5057; }
.top button.quiet:hover { background: var(--ink-2); }
.top a:focus-visible, .top button:focus-visible { outline-color: var(--brand); }

/* 관리 콘솔: 넓은 화면에서는 왼쪽 어두운 메뉴 띠(시안 6~8번). 좁으면 위 띠로 돌아간다. */
@media (min-width: 900px) {
  body.console { padding-left: 236px; }
  body.console .top { position: fixed; top: 0; bottom: 0; left: 0; width: 236px;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 18px; padding: 22px 16px; overflow-y: auto; }
  body.console .brand { flex-wrap: wrap; gap: 10px 12px; padding: 0 6px; }
  body.console .brand .console-tag { margin-top: 2px; }
  /* 236px 띠 안에 엠블럼·글자를 한 줄로: 엠블럼 40 → 글자 19.6(×0.49), 간격 12 */
  body.console .brand .emblem { width: 40px; height: 40px; }
  body.console .brand .wordmark { height: 19.6px; }
  body.console .top nav { margin: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; flex: 1; }
  body.console .navlink { padding: 9px 12px; border-bottom: 0; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
  body.console .navlink.here { background: var(--ink-2); border-left: 3px solid var(--brand); padding-left: 9px; }
  body.console .top nav form { margin-top: auto !important; padding-top: 12px; }
  body.console .top nav form button { width: 100%; }
}

.wrap { max-width: 980px; margin: 28px auto; padding: 0 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 16px; }
.card h2 { margin: 0 0 14px; font-size: 18px; }
/* 넓은 표는 카드 안에서 옆으로 밀어 본다. 없으면 휴대폰에서 표가 화면 밖으로
   나가 쪽 전체가 옆으로 흔들렸다(관리 목록, 2026-10-22 캡처로 확인). */
.card { overflow-x: auto; }
.card table { min-width: 560px; }
.card table.kv { min-width: 0; }

.msg { padding: 12px 15px; border-radius: 10px; margin-bottom: 16px; }
.msg.err { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); }
.msg.ok  { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); }
/* 경고: 잘못된 것은 아니지만 그대로 두면 안 되는 상태(예: 클라우드 키 없음). */
.msg.warn{ background: var(--warn-bg); border: 1px solid var(--warn-line); color: #7a4300; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

label { display: block; margin-bottom: 14px; }
label span { display: block; margin-bottom: 5px; font-size: 13.5px; color: var(--muted); }
/* textarea 를 빼면 브라우저 기본이 그대로 나온다 — 글꼴이 모노스페이스가 되고
   폭이 cols 기준(약 절반)으로 줄어 다른 칸과 어긋난다. 실제로 가입 화면의
   '남기실 말' 칸만 그렇게 보였다. */
input, select, textarea { width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid #c4d0d4; border-radius: 9px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-deep); outline-offset: 1px; }

/* 주 버튼: 하늘색 바탕 + 먹색 글자. 흰 바탕에서도 테두리가 보이게 선을 둔다. */
button { padding: 10px 18px; font-size: 15px; font-family: inherit; font-weight: 700;
  border: 1px solid #5fd3e6; border-radius: 9px; background: var(--brand); color: var(--ink); cursor: pointer; }
button:hover { background: #a5f3ff; }
button.quiet { background: var(--surface); color: var(--ink); border-color: #c4d0d4; font-weight: 600; }
button.quiet:hover { background: var(--bg); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 폼이 아니라 이동(GET)인 동작 — 목록 위의 '고객사 등록'/'초대 코드' 같은 것 */
a.btn { display: inline-block; padding: 10px 18px; font-size: 15px; font-weight: 700;
  border: 1px solid #5fd3e6; border-radius: 9px; background: var(--brand); color: var(--ink); text-decoration: none; }
a.btn:hover { background: #a5f3ff; color: var(--ink); }
a.btn.quiet { background: var(--surface); color: var(--ink); border-color: #c4d0d4; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill.on  { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.pill.off { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.pill.wait { background: var(--warn-bg); color: #7a4300; border: 1px solid var(--warn-line); }

/* 라이선스 키·초대 코드처럼 사람이 옮겨 적어야 하는 값 */
.copy { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; font-family: var(--font-num); font-size: 14px;
  word-break: break-all; user-select: all; }
pre.copy { white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.hint { color: var(--muted); font-size: 13.5px; }

@media (max-width: 640px) {
  .top { padding: 10px 14px; }
  .top nav { margin-left: 0; width: 100%; }
  .wrap { padding: 0 14px; margin-top: 18px; }
  .card { padding: 18px 16px; }
  table { font-size: 13px; }
}

/* 세로로만 늘린다 — 가로로 늘리면 칸이 카드 밖으로 나간다. */
textarea { resize: vertical; min-height: 76px; }

/* 사용량 경고. 오류(빨강)와 구분한다 — 아직 막힌 것이 아니다. */
.msg.warn-box { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #7a4300; }
b.warn { color: var(--warn); }
b.over { color: var(--danger); }

/* 목록 위 도구줄 — 찾기·기간·정렬을 한 줄에 둔다. 좁은 화면에서는 접힌다. */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 14px; padding: 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.toolbar input[type="search"], .toolbar select {
  padding: 7px 10px; border: 1px solid #c4d0d4; border-radius: 7px;
  font-size: 14px; font-family: inherit; background: var(--surface); }
/* 도구줄 안의 라벨은 글자와 칸이 한 줄에 나란히 있어야 한다
   (기본 label 은 block 이라 줄이 바뀐다). */
.toolbar label.inline { display: flex; align-items: center; gap: 6px; white-space: nowrap;
  margin: 0; font-size: 13px; color: var(--muted); }
.toolbar label.inline span { display: inline; margin: 0; }

/* 표 맨 아래 합계 줄. 본문과 구분되게 위에 진한 선을 둔다. */
tfoot th, tfoot td { border-top: 2px solid var(--line); border-bottom: none;
  padding-top: 11px; color: var(--ink); font-size: 14px; }

/* 쪽 넘기기 */
.pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
/* 기록의 '내용' 은 길 수 있다. 띄어쓰기가 없는 긴 값도 칸 안에서 접는다
   — 안 그러면 표가 옆으로 늘어나 화면 밖으로 나간다. */
.wrap-any { overflow-wrap: anywhere; }

/* 폼 안의 작은 제목. 칸이 많아지면 묶어 줘야 어디까지가 한 덩어리인지 보인다. */
.formhead { margin: 22px 0 10px; padding-bottom: 6px; font-size: 13.5px; font-family: var(--font-body);
  color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.formhead:first-of-type { margin-top: 4px; }
.formhead .hint { font-weight: 400; }

/* 쪽 아래 — 회사 이름과 문의처 */
.foot { max-width: 980px; margin: 8px auto 32px; padding: 0 24px; color: var(--muted); font-size: 13px; }

/* ── 소개·요금·내 서비스 (리뉴얼 3단계) ─────────────────────────────── */
a.btn.small { padding: 7px 14px; font-size: 14px; }
a.btn.dark, button.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
a.btn.dark:hover, button.dark:hover { background: var(--ink-2); color: #fff; }
.wide { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* 어두운 띠: 소개 첫 화면. 하늘색은 여기서만 글자·선으로 쓴다(어두운 바탕). */
.band-dark { background: var(--ink); color: #fff; }
.band-dark .lead { color: #c3d3d7; }
.band-dark .eyebrow { color: var(--brand); }
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 72px 24px 80px; }
.hero > div { flex: 1 1 420px; min-width: 0; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.2; margin: 10px 0 16px; text-wrap: balance; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.lead { font-size: 18px; max-width: 34em; margin: 0 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn { padding: 14px 24px; font-size: 16px; }
a.btn.ghost-dark { background: transparent; color: #fff; border-color: #3d5057; }
a.btn.ghost-dark:hover { background: var(--ink-2); color: #fff; }

.chat { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.chat .q { align-self: flex-end; background: var(--brand-soft); border-radius: 12px 12px 2px 12px;
  padding: 10px 14px; max-width: 85%; }
.chat .a { background: var(--bg); border-radius: 12px 12px 12px 2px; padding: 12px 14px; }
.chat .src { display: inline-block; margin-top: 8px; font-size: 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }

.section { padding: 56px 24px 8px; }
.section h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 22px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.feature .tag { font-size: 13px; font-weight: 600; color: var(--brand-deep); }
.feature h3 { margin: 6px 0 8px; font-size: 19px; }
.feature p { margin: 0; color: #3c4b50; }

/* 요금 카드. 추천 요금제만 어둡게 — 한 화면에 강조는 하나. */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; }
.plan .name { font-weight: 700; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.plan .tag { color: var(--muted); font-size: 14px; }
.plan .price { font-family: var(--font-head); font-weight: 800; font-size: 30px; }
.plan .price small { font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--muted); }
.plan .tok { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.plan .tok b { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.plan ul { margin: 0; padding-left: 18px; color: #3c4b50; font-size: 14.5px; }
.plan .btn { margin-top: auto; text-align: center; }
.plan.rec { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan.rec .tag, .plan.rec .price small, .plan.rec ul { color: #c3d3d7; }
.plan.rec .tok { background: var(--ink-2); }
.badge { background: var(--brand); color: var(--ink); font-size: 12px; font-weight: 700;
  padding: 1px 9px; border-radius: 999px; }

/* 사용량 막대. 남은 양이 아니라 쓴 양을 채운다(주의·위험 색은 상태색). */
.usage-num { font-family: var(--font-head); font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; }
.bar { height: 12px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin: 10px 0 14px; }
.bar > span { display: block; height: 100%; background: var(--brand-deep); }
.bar.warn > span { background: var(--warn); }
.bar.over > span { background: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.stat b { display: block; font-weight: 700; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.row2 { display: flex; flex-wrap: wrap; gap: 16px; }
.row2 > .card { flex: 1 1 360px; min-width: 0; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.choice label { margin: 0; border: 1px solid #c4d0d4; border-radius: 12px; padding: 12px 14px; cursor: pointer;
  display: flex; gap: 10px; align-items: flex-start; }
.choice label:has(input:checked) { border: 2px solid var(--brand-deep); background: var(--brand-soft); padding: 11px 13px; }
.choice input { width: auto; margin-top: 4px; }
.choice small { display: block; color: var(--muted); }
.bank { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; background: var(--bg);
  border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.bank span { color: var(--muted); }
details.more { border-top: 1px solid var(--line-soft); padding-top: 12px; margin: 6px 0 16px; }
details.more summary { cursor: pointer; font-weight: 600; color: #3c4b50; margin-bottom: 10px; }
.pw { display: flex; gap: 8px; }
.pw input { flex: 1; }
.pw button { white-space: nowrap; }

/* 복사 칸(숫자 글꼴) 안의 한글 안내는 본문 글꼴로 — 고정폭으로 벌어지지 않게 */
.copy .hint { font-family: var(--font-body); }

/* 머리 띠를 위에 고정한다(스크롤해도 메뉴·신청 버튼이 보이게, 2026-10-22 요청).
   관리 콘솔의 넓은 화면 왼쪽 띠는 위 규칙(position: fixed)이 이긴다. */
.top { position: sticky; top: 0; z-index: 50; }
