/* ===================================================================
   통합 결재 시스템 — 디자인 시스템
   포인트 컬러 : PANTONE 534 C = #1B365D   (회사 로고와 같은 계열)
   구조·타이포 : Apple Human Interface Guidelines / apple.com 레퍼런스
                 본문 17px / 줄간격 25px / 자간 -0.374px
                 카드 반경 18px · 버튼 높이 44px · pill 반경 980px
                 캔버스 #f5f5f7 · 중성색 #1d1d1f / #515154 / #6e6e73
   서체        : Pretendard (SF Pro 대체 · SIL OFL · 사내망 오프라인 내장)
   예외        : 표는 15px — 열이 많은 화면의 정보량을 지키기 위한 의도적 예외
   =================================================================== */

/* ---------- 웹폰트 (사내망 오프라인에서도 표시되도록 로컬 파일) ----------
   애플 SF Pro 는 애플 플랫폼 전용 라이선스라 웹앱에 실을 수 없어,
   SF Pro 의 한글 대응으로 만들어진 Pretendard 를 쓴다. (SIL OFL)
   한자·가나를 뺀 한글 11,172자 전체 + 라틴 서브셋이라 임직원 성명이 깨지지 않는다. */
@font-face {
  font-family: "Pretendard"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/fonts/Pretendard-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Pretendard"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/fonts/Pretendard-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Pretendard"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("/fonts/Pretendard-Bold.woff2") format("woff2");
}
/* 되돌릴 때를 위해 남겨둔 명조 (현재 화면에서는 쓰지 않는다)
   @font-face { font-family:"NanumMyeongjo"; src:url("/fonts/NanumMyeongjo-Regular.woff2") format("woff2"); } */

:root {
  color-scheme: light;

  /* ---- 포인트 컬러 (PANTONE 534 C) ---- */
  --brand:        #1B365D;   /* 흰 배경 대비 11.8:1 */
  --brand-hover:  #142943;
  --brand-soft:   #eef2f8;   /* 아주 연한 배경 틴트 */
  --brand-line:   #c5d1e2;   /* 연한 경계선 */
  --on-brand:     #ffffff;   /* 브랜드색 위 글씨 (대비 12.1:1) */

  /* ---- 면 (애플 레퍼런스: canvas #f5f5f7 / surface #ffffff) ---- */
  --surface-1: #ffffff;
  --page:      #f5f5f7;

  /* ---- 잉크 (애플 중성 3단계) ---- */
  --text-primary:   #1d1d1f;
  --text-secondary: #515154;
  --text-muted:     #6e6e73;

  /* ---- 선 ---- */
  --grid:     #f0f0f2;
  --baseline: #d2d2d7;
  --border:   rgba(0, 0, 0, 0.08);

  /* ---- 상태색 (판정 표시용 — 브랜드색으로 대체 불가) ---- */
  --good:    #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical:#d03b3b;
  --success-text: #006300;
  --warning-text: #7a5400;
  --serious-text: #9c3d1c;

  /* ---- 차트 보조 (단일 계열은 브랜드색 사용) ---- */
  --series-1: var(--brand);
  --series-2: #eb6834;
  --series-3: #1baf7a;

  /* ---- 형태 (애플 레퍼런스 실측값) ---- */
  --radius:      8px;    /* 입력칸·작은 요소 */
  --radius-card: 18px;   /* 카드 — HIG 문서 카드값 */
  --pill:        980px;  /* 버튼 — apple.com CTA */
  --shadow:      0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  --shadow-flat: 0 1px 3px rgba(0,0,0,.06);

  /* ---- 서체 ---- */
  --font-title: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", sans-serif;
  --font-body:  "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "맑은 고딕", sans-serif;

  /* ---- 표 전용 (의도적 예외 — 정보량 유지) ---- */
  --font-table: 15px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand:        #4A7FC1;   /* 어두운 배경 대비 4.2:1 — 같은 색조의 밝은 단계 */
  --brand-hover:  #5A8FD0;
  --brand-soft:   #1c2634;
  --brand-line:   #33465e;
  --on-brand:     #0d1520;

  --surface-1: #1d1d1f;
  --page:      #000000;

  --text-primary:   #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted:     #86868b;

  --grid:     #2c2c2e;
  --baseline: #48484a;
  --border:   rgba(255, 255, 255, 0.12);

  --critical: #e66767;
  --success-text: #0ca30c;
  --warning-text: #ffce5c;
  --serious-text: #f0a582;

  --series-2: #d95926;
  --series-3: #199e70;
  --shadow:      0 1px 3px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.4);
  --shadow-flat: 0 1px 3px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 25px;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }

/* ---------- 제목 (한 서체 · 굵기와 크기로만 위계를 만든다) ---------- */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-title);
  word-break: keep-all;
}
h1 { font-weight: 600; letter-spacing: -0.5px; }
h2 { font-weight: 600; letter-spacing: -0.5px; }
h3 { font-weight: 600; letter-spacing: -0.2px; }

/* ---------- 로고 ---------- */
.logo-img { display: block; height: auto; }
/* 로고는 남색 단색이라 어두운 배경에서는 보이지 않는다 — 흰색으로 뒤집어 쓴다 */
:root[data-theme="dark"] .logo-img { filter: brightness(0) invert(1); opacity: .92; }

/* ---------- 로그인 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--surface-1); border: 0; border-radius: var(--radius-card);
  padding: 44px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow);
}
.login-card .login-logo { width: 176px; margin-bottom: 30px; }
.login-card h1 { font-size: 28px; line-height: 32px; letter-spacing: 0.196px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.login-card .sub { color: var(--text-muted); font-size: 15px; line-height: 20px; letter-spacing: -0.224px; margin-bottom: 30px; }

/* ---------- 앱 레이아웃 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--surface-1);
  border-right: 1px solid var(--border); padding: 24px 14px; display: flex; flex-direction: column;
}
.brand { padding: 0 10px 12px; }
.brand .brand-logo { width: 158px; margin-bottom: 14px; }
.brand .t {
  font-family: var(--font-body); font-weight: 600; font-size: 17px; line-height: 22px;
  color: var(--text-primary); letter-spacing: -0.4px;
}
.brand .s { font-size: 13px; line-height: 18px; color: var(--text-muted); margin-top: 2px; letter-spacing: -0.08px; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-group {
  /* 상위 메뉴 제목 — 작은 대문자 느낌의 라벨 (애플 문서 사이드바 방식) */
  font-size: 11px; color: var(--text-muted); padding: 24px 12px 7px;
  font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius); color: var(--text-primary);
  text-decoration: none; font-size: 15px; line-height: 20px; letter-spacing: -0.2px; cursor: pointer;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav a .pill {
  background: var(--critical); color: #fff; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: var(--pill); min-width: 21px; text-align: center;
  letter-spacing: 0;
}
.nav a.active .pill { background: var(--critical); color: #fff; }
.sidebar-foot { padding: 16px 12px 0; border-top: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--text-muted); }
.sidebar-foot .who { color: var(--text-primary); font-weight: 600; font-size: 15px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  padding: 44px 40px 10px; border-bottom: 0; background: var(--page);
}
/* 제목은 애플의 section 토큰(40px/44px/600). 화면이 좁으면 자연스럽게 줄어든다. */
.topbar h2 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; }
.topbar .desc { font-size: 17px; line-height: 25px; color: var(--text-muted); margin-top: 10px; }
.content { padding: 22px 40px 80px; max-width: 1560px; }

/* ---------- 카드 (선 대신 아주 옅은 그림자 · 반경 18px) ---------- */
.card {
  background: var(--surface-1); border: 0;
  border-radius: var(--radius-card); padding: 28px 30px; margin-bottom: 20px;
  box-shadow: var(--shadow-flat);
}
.card > h3 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 6px; }
.card > .hint { font-size: 17px; line-height: 25px; color: var(--text-muted); margin-bottom: 20px; }
.card.tight { padding: 20px 22px; }

/* ---------- 통계 타일 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat { background: var(--surface-1); border: 0; border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-flat); }
.stat .lbl { font-size: 15px; line-height: 20px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.stat .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat .val {
  font-family: var(--font-body); font-size: 44px; line-height: 48px; font-weight: 600;
  margin-top: 10px; color: var(--text-primary); letter-spacing: -1px;
}
.stat .sub { font-size: 14px; line-height: 18px; color: var(--text-muted); letter-spacing: -0.224px; }
.stat.clickable { cursor: pointer; transition: box-shadow .18s ease; }
.stat.clickable:hover { box-shadow: 0 2px 6px rgba(0,0,0,.10), 0 12px 32px rgba(0,0,0,.08); }

/* ---------- 차트 ---------- */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.bar-label { width: 176px; flex-shrink: 0; color: var(--text-secondary); text-align: right; }
.bar-track { flex: 1; background: var(--grid); border-radius: var(--pill); height: 16px; min-width: 40px; }
.bar-fill { height: 100%; border-radius: var(--pill); min-width: 2px; }
.bar-val { width: 58px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 폼 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 14px; line-height: 18px; letter-spacing: -0.224px; color: var(--text-secondary); font-weight: 600; }
.field .req { color: var(--critical); }
input, select, textarea {
  padding: 0 15px; height: 44px; border-radius: var(--radius); border: 1px solid var(--baseline);
  background: var(--surface-1); color: var(--text-primary);
  font-size: 17px; letter-spacing: -0.374px; font-family: var(--font-body); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent); outline-offset: 0;
  border-color: var(--brand);
}
textarea { resize: vertical; min-height: 88px; height: auto; padding: 12px 15px; line-height: 25px; }
input[type=file] { padding: 9px 12px; }
.help { font-size: 14px; line-height: 18px; letter-spacing: -0.224px; color: var(--text-muted); }

/* ---------- 버튼 (44px pill / 작은 버튼 36px pill) ---------- */
button {
  font-family: var(--font-body); font-size: 17px; letter-spacing: -0.374px; font-weight: 400;
  cursor: pointer; height: 44px; padding: 0 21px;
  border-radius: var(--pill); border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand);
  transition: background .16s ease, opacity .16s ease;
}
button:hover { background: var(--brand-hover); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
button.ghost:hover { background: var(--brand-soft); }
button.sub { background: transparent; color: var(--text-secondary); border-color: var(--baseline); }
button.sub:hover { background: var(--page); color: var(--text-primary); }
button.danger { background: var(--critical); color: #fff; }
button.danger:hover { filter: brightness(1.08); background: var(--critical); }
button.ok { background: var(--good); color: #fff; }
button.ok:hover { filter: brightness(1.08); background: var(--good); }
button.sm { height: 36px; padding: 0 15px; font-size: 14px; letter-spacing: -0.224px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.filters .field { min-width: 168px; }

/* ---------- 표 ----------
   본문은 17px 이지만 표만 15px 로 둔다. 열이 많은 화면(거래내역 리뷰·결재함)에서
   한 화면에 보이는 줄 수를 지키기 위한 의도적인 예외다. */
.table-wrap { overflow: auto; border: 0; border-radius: var(--radius-card); max-height: 660px; box-shadow: var(--shadow-flat); background: var(--surface-1); }
table { width: 100%; border-collapse: collapse; font-size: var(--font-table); font-family: var(--font-body); letter-spacing: -0.24px; }
th {
  text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--baseline);
  color: var(--text-muted); font-weight: 600; white-space: nowrap;
  position: sticky; top: 0; background: var(--surface-1); z-index: 1;
  font-size: 13px; letter-spacing: 0;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--grid); vertical-align: middle; line-height: 21px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--brand-soft); }
tr.row-violation td:first-child { box-shadow: inset 3px 0 0 var(--critical); }
.nowrap { white-space: nowrap; }
.empty { text-align: center; color: var(--text-muted); padding: 44px 12px; font-size: 17px; }

/* ---------- 배지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: var(--pill); font-size: 13px; font-weight: 600; white-space: nowrap;
  letter-spacing: 0; font-family: var(--font-body);
}
.badge.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--success-text); }
.badge.critical { background: color-mix(in srgb, var(--critical) 15%, transparent); color: var(--critical); }
.badge.warning { background: color-mix(in srgb, var(--warning) 26%, transparent); color: var(--warning-text); }
.badge.serious { background: color-mix(in srgb, var(--serious) 20%, transparent); color: var(--serious-text); }
.badge.neutral { background: color-mix(in srgb, var(--text-primary) 7%, transparent); color: var(--text-secondary); }
.badge.info { background: var(--brand-soft); color: var(--brand); }

/* ---------- 알림 (배경을 채우지 않고 왼쪽 색선만 — 글이 주인공) ---------- */
.alert {
  border-radius: var(--radius-card); padding: 22px 26px; font-size: 17px; line-height: 25px;
  margin-bottom: 20px; background: var(--surface-1); box-shadow: var(--shadow-flat);
  border: 0; border-left: 4px solid var(--baseline);
  display: flex; gap: 12px; align-items: flex-start; color: var(--text-primary);
}
.alert .ico { flex-shrink: 0; font-weight: 600; }
.alert.err   { border-left-color: var(--critical); }
.alert.warn  { border-left-color: #b26a00; }
.alert.info  { border-left-color: var(--brand); }
.alert.good  { border-left-color: var(--good); }
.alert b, .alert strong { font-weight: 600; }
.alert ul { margin: 10px 0 0; padding-left: 20px; }
.alert li { padding: 3px 0; }

#toast-host { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 900; }
.toast {
  background: var(--surface-1); border: 0; border-left: 4px solid var(--brand);
  border-radius: var(--radius-card); padding: 16px 20px; font-size: 15px; line-height: 21px;
  box-shadow: var(--shadow); max-width: 420px;
  animation: slideIn .18s ease-out;
}
.toast.err { border-left-color: var(--critical); }
.toast.good { border-left-color: var(--good); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- 모달 ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 800;
  backdrop-filter: saturate(180%) blur(12px);
}
.modal {
  background: var(--surface-1); border-radius: var(--radius-card); border: 0;
  padding: 32px 34px; width: 100%; max-width: 600px; max-height: 88vh; overflow: auto;
  box-shadow: 0 24px 68px rgba(0,0,0,.24);
}
.modal.wide { max-width: 960px; }
.modal h3 { font-size: 28px; line-height: 32px; letter-spacing: 0.196px; font-weight: 600; margin-bottom: 8px; }
.modal .hint { font-size: 17px; line-height: 25px; color: var(--text-muted); margin-bottom: 24px; }

/* ---------- 기타 ---------- */
.step-head { display: flex; align-items: center; gap: 11px; font-size: 24px; line-height: 30px; margin-bottom: 8px;
  font-family: var(--font-title); font-weight: 600; letter-spacing: -0.2px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--brand); color: var(--on-brand);
  font-size: 15px; font-weight: 600; flex-shrink: 0; font-family: var(--font-body); letter-spacing: 0;
}
.spinner {
  width: 17px; height: 17px; border: 2px solid var(--baseline); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: var(--text-muted); font-size: 17px; padding: 40px; text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; letter-spacing: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tabs button {
  background: transparent; color: var(--text-muted); border: none; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 0 16px; height: 46px; font-weight: 400; font-size: 17px;
}
.tabs button:hover { background: transparent; color: var(--text-primary); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.kv { display: grid; grid-template-columns: 168px 1fr; gap: 12px 18px; font-size: 17px; line-height: 25px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }
.inline-edit {
  border: 1px solid var(--grid); background: var(--surface-1); padding: 0 10px;
  height: 34px; font-size: 15px; border-radius: var(--radius); width: auto;
}
.inline-edit:hover { border-color: var(--baseline); }
.warn-cell { color: var(--serious-text); font-size: 13px; }
.count-pill { font-size: 14px; color: var(--text-muted); margin-left: 8px; letter-spacing: -0.224px; }

/* ---------- 결재 진행 트랙 ---------- */
.track-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.track {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 15px; height: 36px;
  border-radius: var(--pill); font-size: 14px; font-weight: 500; border: 0;
  letter-spacing: -0.224px;
  color: var(--brand); background: var(--brand-soft);
}
.track b { font-weight: 600; font-size: 12px; opacity: .8; }
.track.track-done { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--success-text); }
.track.track-now  { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning-text); }
.track.track-wait { color: var(--text-muted); background: var(--grid); }
.track-arrow { color: var(--text-muted); font-size: 15px; }

/* 결재 이력 타임라인 */
.timeline { display: flex; flex-direction: column; gap: 16px; margin: 10px 0 2px; }
.tl-item { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 21px; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff;
}
.tl-dot.ok { background: var(--good); }
.tl-dot.no { background: var(--critical); }
.tl-dot.wait { background: var(--baseline); color: var(--text-secondary); }
.tl-body { flex: 1; }
.tl-body .who { font-weight: 600; }
.tl-body .when { color: var(--text-muted); font-size: 14px; }
.tl-body .cmt { color: var(--text-secondary); margin-top: 3px; }

/* ---------- 공유용 접속 주소 (한 줄 띠 + 접히는 상세) ---------- */
.share-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface-1); border-radius: var(--radius-card);
  padding: 14px 20px; margin-bottom: 20px; box-shadow: var(--shadow-flat);
}
.share-bar .lb {
  font-size: 14px; color: var(--text-muted); font-weight: 600;
  letter-spacing: -0.224px; flex-shrink: 0;
}
.share-bar .share-url { height: 40px; font-size: 16px; }
.share-detail {
  background: var(--surface-1); border-radius: var(--radius-card);
  padding: 22px 26px; margin: -8px 0 20px; box-shadow: var(--shadow-flat);
}

/* ---------- 공유용 접속 주소 카드 (설정 화면 등에서 계속 사용) ---------- */
.share-card {
  background: var(--surface-1); border: 0;
  border-radius: var(--radius-card); padding: 28px 30px; margin-bottom: 20px;
  box-shadow: var(--shadow-flat);
}
.share-card h3 { font-size: 28px; line-height: 32px; letter-spacing: 0.196px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.share-card .hint { font-size: 17px; line-height: 25px; color: var(--text-muted); margin-bottom: 20px; }
.share-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.share-row .lb { font-size: 14px; color: var(--text-muted); width: 150px; flex-shrink: 0; font-weight: 600; line-height: 18px; letter-spacing: -0.224px; }
.share-url {
  flex: 1; min-width: 240px; background: var(--surface-1); border: 1px solid var(--baseline);
  border-radius: var(--radius); padding: 0 15px; height: 44px; display: flex; align-items: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 17px; font-weight: 600; color: var(--brand); word-break: break-all; letter-spacing: 0;
}
.share-row button { flex-shrink: 0; }

@media (max-width: 980px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { display: none; }
  .content { padding: 18px 18px 60px; }
  .topbar { padding: 24px 18px 8px; }
  .bar-label { width: 116px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 12px; }
  .card, .stat, .alert, .share-card { padding: 20px 18px; }
}
