:root {
  --navy-950: #08111f;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --green-800: #065f46;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --amber-900: #78350f;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --violet-800: #5b21b6;
  --violet-100: #ede9fe;
  --surface: #f4f7fb;
  --line: #dbe3ee;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.045);
  --radius-xl: 13px;
  --radius-lg: 11px;
  --radius-md: 8px;
  --topbar-height: 60px;
  --sidebar-width: 208px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--navy-800);
  /* 2026-08-19: 작은 글자가 흐릿하다는 지적에 따라 손봤다.
     ① 소수점 픽셀 크기(10.5px 등 56곳)를 전부 정수로 올렸다 — 글리프가 픽셀 격자에서
        어긋나던 것이 가장 큰 원인이었다.
     ② Pretendard는 이 프로젝트에 포함돼 있지 않고 CSP가 외부 글꼴을 막으므로, 윈도우에서는
        결국 맑은 고딕으로 떨어진다. 그 사실을 스택 순서에 그대로 드러낸다. */
  font-family:
    "Pretendard Variable", Pretendard, system-ui, -apple-system,
    "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
  font-size: 13px;
  line-height: 1.5;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body.auth-pending > :not(.auth-gate):not(script),
body.auth-locked > :not(.auth-gate):not(script) {
  display: none !important;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.12), transparent 34%),
    var(--surface);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-card h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.auth-description {
  margin: 0 0 22px;
  color: var(--slate-600);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.auth-status {
  min-height: 21px;
  margin: 14px 0 0;
  color: var(--slate-600);
}

.auth-status[data-tone="error"] {
  color: var(--red-700);
}

.auth-status[data-tone="success"] {
  color: var(--green-800);
}

.signed-in-user {
  min-width: 0;
  max-width: 180px;
  flex: 1 1 80px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.42);
}

button {
  color: inherit;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy-950);
  color: var(--white);
  font-weight: 550;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(300px, 580px) minmax(310px, 1fr);
  align-items: center;
  min-height: var(--topbar-height);
  padding: 7px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand-block,
.top-actions,
.global-search,
.page-title-row,
.section-heading,
.record-title-line,
.meta-row,
.chip-row,
.dialog-header,
.dialog-actions,
.pagination,
.health-summary,
.inline-actions {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 8px;
}

.brand-block > div:last-child {
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--blue-700), var(--blue-800));
  color: var(--white);
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.brand-name {
  overflow: hidden;
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-caption {
  color: var(--slate-600);
  font-size: 11px;
  white-space: nowrap;
}

.global-search {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--slate-50);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.global-search:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.global-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--navy-900);
}

.global-search input:focus {
  outline: 0;
}

.global-search input::placeholder {
  color: var(--slate-500);
}

.search-submit {
  align-self: stretch;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--slate-300);
  border-radius: 0 11px 11px 0;
  background: var(--white);
  color: var(--blue-700);
  font-weight: 500;
  cursor: pointer;
}

.top-actions {
  justify-content: flex-end;
  gap: 8px;
}

.top-actions > .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.mode-badge {
  padding: 4px 7px;
  border: 1px solid #b7e5d4;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.button,
.icon-button,
.text-button,
.nav-item,
.mobile-navigation button,
.task-card,
.pipeline-card,
.record-title-button,
.page-button,
.chip-button {
  cursor: pointer;
}

.button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 500;
}

.button.primary {
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: var(--white);
}

.button.primary:hover {
  background: var(--blue-800);
}

.button.secondary {
  border-color: var(--slate-300);
  background: var(--white);
  color: var(--navy-800);
}

.button.secondary:hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
}

.button.danger {
  border-color: #fecaca;
  background: var(--red-50);
  color: var(--red-800);
}

.button.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.filter-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 3px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font-size: 10px;
}

.refresh-short {
  display: none;
}

.mobile-settings-button {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height));
  padding: 12px 11px;
  overflow-y: auto;
  border-right: 1px solid #18243a;
  background: var(--navy-900);
  color: var(--white);
}

.side-navigation {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-label {
  margin: 12px 9px 4px;
  color: #9fb0c8;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-group-label:first-child {
  margin-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cfdaea;
  font-weight: 500;
  text-align: left;
}

.nav-item:hover {
  background: #17243a;
  color: var(--white);
}

.nav-item.is-active {
  border-color: rgba(147, 197, 253, 0.18);
  background: #1e3a5f;
  color: var(--white);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.nav-count {
  color: #bfdbfe;
  font-size: 11px;
}

.local-mode-card {
  margin-top: auto;
  padding: 10px;
  border: 1px solid #314159;
  border-radius: 10px;
  background: #111e31;
}

.local-mode-card strong {
  color: #d9fbe9;
  font-size: 12px;
}

.local-mode-card p {
  margin: 5px 0 7px;
  color: #b3c2d7;
  font-size: 11px;
  line-height: 1.45;
}

.text-button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workspace {
  min-width: 0;
}

.mobile-navigation {
  display: none;
}

main {
  width: min(100%, 1500px);
  min-width: 0;
  margin: 0 auto;
  padding: 20px 24px 42px;
}

.initial-loader {
  display: grid;
  min-height: 55vh;
  place-items: center;
  align-content: center;
  color: var(--slate-600);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--blue-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title-row {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.page-title-row h1,
.dialog-header h2 {
  margin: 0;
  color: var(--navy-900);
  line-height: 1.25;
}

.page-title-row h1 {
  /* clamp의 vw 계산은 23.04px 같은 소수점을 만든다 — 화면 폭에 따라 제목이 흐려졌다. */
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.page-description {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

.active-filter-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-chip,
.badge,
.pick-pill,
.qualification-pill,
.source-pill,
.deadline-pill,
.reason-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-chip {
  padding: 4px 8px;
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 11px;
}

.filter-chip button {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 650;
  cursor: pointer;
}

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 11px;
  padding: 9px 11px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 12px;
}

.notice-banner strong {
  display: block;
  margin-bottom: 2px;
}

.notice-banner.error {
  border-color: #fecaca;
  background: var(--red-50);
  color: var(--red-800);
}

.notice-banner.warning {
  border-color: #fde68a;
  background: var(--amber-50);
  color: var(--amber-900);
}

.notice-banner.info {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-800);
}

.health-panel,
.content-card,
.task-card,
.pipeline-card,
.record-card,
.empty-state,
.error-state {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.health-panel {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
}

.health-summary {
  justify-content: space-between;
  gap: 10px;
}

.health-summary strong {
  color: var(--navy-900);
}

.health-summary p {
  margin: 2px 0 0;
  color: var(--slate-600);
  font-size: 11px;
}

.health-sources {
  display: flex;
  gap: 5px;
  overflow: hidden;
  padding-top: 8px;
  border-top: 1px solid var(--slate-100);
  margin-top: 8px;
  scrollbar-width: thin;
}

.health-source {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  color: var(--slate-600);
  font-size: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--slate-400);
}

.status-dot.ok {
  background: #059669;
}

.status-dot.warning {
  background: #d97706;
}

.status-dot.error {
  background: #dc2626;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.task-card,
.pipeline-card {
  position: relative;
  min-width: 0;
  padding: 11px 13px;
  border-radius: var(--radius-lg);
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.task-card:hover,
.pipeline-card:hover {
  transform: translateY(-2px);
  border-color: #b6c5da;
  box-shadow: var(--shadow);
}

.task-card .task-label,
.pipeline-card .pipeline-label {
  display: block;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 500;
}

.task-card .task-value,
.pipeline-card .pipeline-value {
  display: block;
  margin-top: 2px;
  color: var(--navy-900);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.task-card .task-help,
.pipeline-card .pipeline-help {
  display: block;
  margin-top: 4px;
  color: var(--slate-600);
  font-size: 12px;
}

.task-card.urgent {
  border-color: #fed7aa;
  background: #fffaf5;
}

.task-card.check {
  border-color: #fde68a;
  background: #fffdf5;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin: 17px 0 7px;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--slate-600);
  font-size: 11px;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.pipeline-card {
  box-shadow: none;
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.content-card {
  min-width: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.content-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 9px;
  border-bottom: 1px solid var(--slate-100);
}

.content-card-header h2,
.content-card-header h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 550;
}

.content-card-header p {
  margin: 2px 0 0;
  color: var(--slate-600);
  font-size: 11px;
}

.card-link-button {
  min-height: 34px;
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.compact-list {
  display: grid;
}

.compact-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--slate-100);
}

.compact-record:first-child {
  border-top: 0;
}

.compact-grade {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--slate-100);
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 600;
}

.compact-grade.grade-s {
  background: #dbeafe;
  color: #1e3a8a;
}

.compact-grade.grade-a {
  background: #e0e7ff;
  color: #3730a3;
}

.compact-grade.grade-b {
  background: #fef3c7;
  color: #92400e;
}

.compact-grade.grade-pick,
.badge.grade-pick {
  background: #dcfce7;
  color: #166534;
}

.compact-title {
  overflow: hidden;
  color: var(--navy-900);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-meta {
  margin-top: 2px;
  color: var(--slate-600);
  font-size: 11px;
}

.compact-right {
  text-align: right;
}

.compact-right strong {
  display: block;
  color: var(--navy-900);
}

.deadline-text {
  color: var(--slate-600);
  font-size: 11px;
}

.deadline-text.urgent {
  color: var(--red-700);
  font-weight: 650;
}

.deadline-list {
  display: grid;
  padding: 5px 0;
}

.deadline-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 13px;
  border-top: 1px solid var(--slate-100);
}

.deadline-item:first-child {
  border-top: 0;
}

.deadline-pill {
  justify-content: center;
  align-self: start;
  padding: 4px 7px;
  background: var(--red-50);
  color: var(--red-800);
  font-size: 11px;
}

.deadline-content {
  min-width: 0;
}

.deadline-heading {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.deadline-stage {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}

.deadline-stage[data-stage="specs"] {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-800);
}

.deadline-stage[data-stage="bids"] {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-800);
}

.deadline-title {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 500;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.deadline-meta {
  margin-top: 3px;
  color: var(--slate-600);
  font-size: 11px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.8);
  scroll-margin-top: 76px;
}

.toolbar:focus { outline: none; }

.result-count {
  margin-right: auto;
  color: var(--slate-600);
  font-size: 12px;
}

.result-count strong {
  color: var(--navy-900);
  font-size: 14px;
}

.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-600);
  font-size: 11px;
}

.toolbar select {
  min-height: 32px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--white);
  color: var(--navy-800);
  padding: 5px 30px 5px 9px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.data-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-top: 1px solid var(--slate-100);
  vertical-align: top;
}

.data-table tbody tr:first-child td {
  border-top: 0;
}

.data-table tbody tr:hover td {
  background: #fbfdff;
}

.grade-cell {
  width: 92px;
}

.notice-column {
  width: 38%;
  min-width: 340px;
}

.organization-column {
  width: 13%;
  min-width: 130px;
}

.amount-column {
  width: 92px;
  white-space: nowrap;
}

.qualification-column {
  width: 230px;
  max-width: 260px;
}

.status-column {
  width: 210px;
}

.action-column {
  width: 118px;
  white-space: nowrap;
}

.action-column .pick-toggle {
  margin-right: 7px;
}

.qualification-lines {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.45;
}

.qualification-lines > div {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rule-match-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

/* 일치한 말은 글자색으로만 표시한다.
   2026-08-19 사용자 지적: 노란 음영이 너무 튀어 옆 글자가 안 읽혔다.
   음영·밑줄 대신 색과 굵기만 쓰고, 공고명 자체의 가독성을 우선한다. */
.match-highlight {
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.match-highlight.keyword {
  color: #a16207;
}

.match-highlight.competitor {
  color: #c2410c;
}

.match-highlight.organization {
  color: #15803d;
}

.badge {
  justify-content: center;
  min-width: 32px;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 10px;
}

.badge.grade-s {
  background: #dbeafe;
  color: #1e3a8a;
}

.badge.grade-a {
  background: #e0e7ff;
  color: #3730a3;
}

.badge.grade-b {
  background: var(--amber-100);
  color: var(--amber-900);
}

.badge.grade-none {
  background: var(--slate-100);
  color: var(--slate-600);
}

.badge.cancelled {
  margin-left: 5px;
  background: var(--red-100);
  color: var(--red-800);
}

.badge.changed {
  margin-left: 5px;
  background: var(--amber-100);
  color: var(--amber-900);
}

.record-title-button {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy-900);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.record-title-button:hover {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.record-subline {
  margin-top: 3px;
  color: var(--slate-600);
  font-size: 11px;
}

.reason-line {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-status {
  min-width: 210px;
}

.winner-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.winner-line > span {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 10px;
  font-weight: 550;
}

.winner-line strong {
  overflow: hidden;
  color: var(--green-800);
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-line.is-failed > span,
.mobile-winner.is-failed > span {
  background: var(--amber-50);
  color: var(--amber-800);
}

.winner-line.is-failed strong,
.mobile-winner.is-failed strong,
.failed-result-text,
.failure-reason-line,
.mobile-failure-reason {
  color: var(--amber-800);
}

.mobile-failure-reason {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
}

.result-summary-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--slate-600);
  font-size: 10px;
}

.participant-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}

.participant-preview {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.preview-label {
  flex: 0 0 auto;
  color: var(--slate-500);
  font-size: 10px;
}

.preview-company {
  display: inline-flex;
  min-width: 0;
  max-width: 100px;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-company b {
  color: var(--blue-700);
  font-size: 10px;
}

.amount {
  font-weight: 550;
  white-space: nowrap;
}

.amount.xl {
  color: var(--red-800);
}

.amount.lg {
  color: #c2410c;
}

.amount.md {
  color: var(--blue-700);
}

.amount.sm {
  color: var(--navy-700);
}

.qualification-pill,
.pick-pill,
.source-pill {
  padding: 3px 7px;
  font-size: 10px;
}

/* 검토 목록에 담긴 건은 상태 배지만으로 구분되지 않는다 — 담아도 대개 '미검토'다. */
.pick-pill {
  margin-right: 3px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
}

.qualification-pill.unknown {
  background: var(--slate-100);
  color: var(--slate-600);
}

.qualification-pill.warning {
  background: var(--amber-100);
  color: var(--amber-900);
}

.qualification-pill.danger {
  background: var(--red-100);
  color: var(--red-800);
}

.qualification-pill.neutral {
  background: var(--blue-50);
  color: var(--blue-800);
}


.source-pill {
  background: var(--blue-50);
  color: var(--blue-800);
}

.external-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.external-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mobile-records {
  display: none;
}

.record-card {
  min-width: 0;
  padding: 15px;
  border-radius: var(--radius-lg);
}

.record-card + .record-card {
  margin-top: 10px;
}

.record-title-line {
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chip-row {
  flex-wrap: wrap;
  gap: 5px;
}

.record-card h3 {
  margin: 10px 0 5px;
  color: var(--navy-900);
  font-size: 15px;
  line-height: 1.45;
}

.record-card .organization {
  margin: 0;
  color: var(--slate-600);
  font-size: 12px;
}

.record-card .mobile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--slate-50);
}

.mobile-meta span {
  color: var(--slate-600);
  font-size: 11px;
}

.mobile-meta strong {
  display: block;
  margin-top: 1px;
  color: var(--navy-900);
  font-size: 13px;
}

.qualification-block,
.reason-block {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.qualification-block {
  background: var(--amber-50);
  color: var(--amber-900);
}

.reason-block {
  background: var(--blue-50);
  color: var(--blue-800);
}

.mobile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-actions .button,
.mobile-actions .pick-toggle,
.mobile-actions .external-link {
  min-height: 44px;
  justify-content: center;
}

.pagination {
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.page-button {
  min-width: 42px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--white);
  font-weight: 500;
}

.page-button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.page-status {
  padding: 0 8px;
  color: var(--slate-600);
  font-size: 12px;
}

.empty-state,
.error-state {
  padding: 46px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 0 0 7px;
  color: var(--navy-900);
  font-size: 17px;
}

.empty-state p,
.error-state p {
  max-width: 580px;
  margin: 0 auto 15px;
  color: var(--slate-600);
}

.error-state {
  border-color: #fecaca;
  background: var(--red-50);
}

.sheet-dialog {
  width: min(94vw, 720px);
  max-height: min(90vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--navy-800);
  box-shadow: 0 30px 90px rgba(8, 17, 31, 0.35);
}

.sheet-dialog::backdrop {
  background: rgba(8, 17, 31, 0.62);
  backdrop-filter: blur(2px);
}

.sheet-dialog > form,
.detail-dialog > div,
.share-dialog > div {
  max-height: min(90vh, 900px);
  overflow-y: auto;
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.dialog-header h2 {
  font-size: 17px;
  font-weight: 550;
}

.icon-button {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--white);
  font-size: 12px;
  font-weight: 500;
}

.filter-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.check-field > span {
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 550;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--white);
  color: var(--navy-900);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field small,
.check-field small {
  display: block;
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 500;
}

.field.full {
  grid-column: 1 / -1;
}

.check-field {
  display: flex;
  grid-column: 1 / -1;
  gap: 9px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-50);
}

.check-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.dialog-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.detail-dialog {
  width: min(95vw, 820px);
}

/* ── 게시판 공유 ─────────────────────────────────────────
   미리보기는 게시판에 붙여넣었을 때와 같은 모양이어야 한다.
   그래서 미리보기 안쪽에는 이 스타일시트의 규칙을 걸지 않는다.
   (붙여넣은 쪽에는 styles.css가 따라가지 않으므로, 여기서 꾸미면
   화면에서만 예쁘고 실제 게시판에서는 다르게 보인다.) */
.share-dialog {
  width: min(96vw, 940px);
}

.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--blue-50);
}

.share-bar h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.share-bar p {
  margin: 0;
  font-size: 12px;
  color: var(--slate-600);
}

.share-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.share-dialog .field {
  padding: 0 20px;
  margin-top: 14px;
}

.share-toggles,
.share-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-toggles .chip-button,
.share-presets .chip-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 12px;
}

.share-toggles .chip-button.is-on,
.share-presets .chip-button.is-on {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
  font-weight: 600;
}

.share-toggles .chip-button:disabled { cursor: default; opacity: 0.75; }

.share-preview-wrap {
  margin: 16px 20px 0;
}

.share-preview-label {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--slate-600);
}

/* ── 브리핑 깔때기 ───────────────────────────────────────
   수집 → 관심 걸림 → 볼 것. 가운데 층을 일부러 보여 준다.
   그게 크면 선별이 거친 것이고, 줄어드는지가 개선 지표다. */
.brief-funnel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.brief-funnel > summary {
  list-style: none;
}

.brief-funnel > summary::-webkit-details-marker {
  display: none;
}

.brief-funnel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  cursor: pointer;
}

.brief-funnel-summary strong {
  color: var(--navy-900);
  font-size: 14px;
}

.brief-funnel-summary p {
  margin: 2px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

.brief-funnel-summary > span {
  color: var(--slate-600);
  font-size: 12px;
  text-align: right;
}

.brief-funnel[open] .brief-funnel-summary {
  border-bottom: 1px solid var(--line);
}

.brief-funnel-body {
  padding: 14px 16px 16px;
}

.funnel-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.funnel-step {
  flex: 1 1 150px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.funnel-step.mid {
  border-color: var(--blue-100);
  background: var(--blue-50);
}

.funnel-step.top {
  border-color: var(--green-100);
  background: var(--green-50);
}

.funnel-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy-900);
}

.funnel-step.top .funnel-value { color: var(--green-800); }

.funnel-label {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
}

.funnel-help {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--slate-600);
}

.funnel-arrow {
  align-self: center;
  font-size: 20px;
  color: var(--slate-400);
}

.funnel-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
}

.funnel-table th,
.funnel-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  color: var(--slate-600);
}

.funnel-table th:first-child,
.funnel-table td:first-child {
  text-align: left;
  color: var(--navy-800);
}

.funnel-table th {
  font-weight: 700;
  color: var(--slate-500);
}

.funnel-table td strong { color: var(--green-800); }

@media (max-width: 720px) {
  .funnel-arrow { display: none; }
  .funnel-step { flex-basis: 100%; }
}

/* ── 작년 요맘때 ─────────────────────────────────────────
   이 화면의 값어치는 '올해 아직 안 나온 것'에 있다.
   그래서 배지 세 종류를 색으로 확실히 갈라 둔다. */
.lastyear-window {
  padding: 14px 16px;
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-lg);
  background: var(--amber-50);
}

.lastyear-window h2 {
  margin: 0 0 5px;
  font-size: 14px;
  color: var(--amber-900);
}

.lastyear-window p {
  margin: 0;
  font-size: 12px;
  color: var(--amber-700);
}

.lastyear-note {
  margin-top: 5px !important;
  color: var(--slate-600) !important;
}

.lastyear-more {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--slate-600);
}

.lastyear-record {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.repeat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.repeat-badge.soon {
  border: 1px solid var(--amber-100);
  background: var(--amber-50);
  color: var(--amber-900);
}

.repeat-badge.done {
  border: 1px solid var(--green-100);
  background: var(--green-50);
  color: var(--green-800);
}

.repeat-badge.unknown {
  border: 1px solid var(--line);
  background: var(--slate-50);
  color: var(--slate-600);
}

/* 클립보드 폴백용 임시 요소. 화면 밖에 두되 선택은 가능해야 하므로
   display:none이나 visibility:hidden은 쓸 수 없다(선택 영역이 안 잡힌다). */
.offscreen-copy {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 900px;
  white-space: normal;
}

.share-preview {
  display: block;
  width: 100%;
  height: 340px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.detail-summary {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.detail-summary h2 {
  margin: 7px 0 5px;
  color: var(--navy-900);
  font-size: 17px;
  font-weight: 550;
  line-height: 1.4;
}

.detail-summary p {
  margin: 0;
  color: var(--slate-600);
}

.detail-section {
  padding: 14px 17px;
  border-bottom: 1px solid var(--slate-100);
}

.detail-section h3 {
  margin: 0 0 8px;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 550;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-fact {
  padding: 8px;
  border-radius: 8px;
  background: var(--slate-50);
}

.detail-fact span {
  display: block;
  color: var(--slate-600);
  font-size: 11px;
}

.detail-fact strong {
  display: block;
  margin-top: 2px;
  color: var(--navy-900);
  font-size: 12px;
}

.curated-note {
  margin-bottom: 9px;
  padding: 9px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
}

.curated-note strong {
  font-size: 12px;
}

.curated-note p {
  margin: 3px 0 0;
  color: #166534;
  font-size: 11px;
}

.reason-list,
.qualification-detail-list {
  margin: 0;
  padding-left: 20px;
  color: var(--navy-700);
}

.reason-list li + li,
.qualification-detail-list li + li {
  margin-top: 5px;
}

.result-rank-note {
  margin: 0 0 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--amber-50);
  color: var(--amber-900);
  font-size: 12px;
}

.participant-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.participant-section-heading h3 {
  margin-bottom: 2px;
}

.participant-section-heading p {
  margin: 0;
  color: var(--slate-600);
  font-size: 11px;
}

.participant-stats {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 7px;
  margin-bottom: 9px;
}

.participant-stats > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: var(--slate-50);
}

.participant-stats span {
  display: block;
  color: var(--slate-500);
  font-size: 10px;
}

.participant-stats strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-table {
  min-width: 690px;
}

.participant-table th:first-child,
.participant-table td:first-child {
  width: 62px;
  text-align: center;
}

.participant-table th:nth-child(3),
.participant-table td:nth-child(3) {
  text-align: right;
}

.participant-table tr.is-winner td {
  background: var(--green-50);
}

.rank-number {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--slate-100);
  color: var(--navy-700);
  font-size: 10px;
  font-weight: 550;
}

.participant-table tr.is-winner .rank-number {
  background: var(--green-100);
  color: var(--green-800);
}

.participant-name {
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 500;
}

.participant-subline {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 10px;
}

.participant-amount {
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.rate-pill,
.winner-badge {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.rate-pill {
  background: var(--blue-50);
  color: var(--blue-800);
}

.winner-badge {
  background: var(--green-100);
  color: var(--green-800);
}

.muted {
  color: var(--slate-400);
}

.mobile-result-summary {
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  background: var(--slate-50);
}

.mobile-winner {
  display: grid;
  gap: 2px;
}

.mobile-winner span,
.mobile-result-summary > p {
  color: var(--slate-500);
  font-size: 10px;
}

.mobile-winner strong {
  color: var(--green-800);
  font-size: 12px;
  font-weight: 550;
}

.mobile-participant-count {
  margin-top: 6px;
  color: var(--blue-800);
  font-size: 11px;
  font-weight: 550;
}

.mobile-result-summary > p {
  margin: 6px 0 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(90vw, 420px);
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--navy-900);
  color: var(--white);
  box-shadow: var(--shadow);
  font-weight: 550;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(230px, 1fr) minmax(280px, 1.45fr) auto;
  }

  .mode-badge {
    display: none;
  }

  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  :root {
    --topbar-height: 106px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    padding: 7px 12px;
  }

  .brand-caption {
    display: none;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 38px;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-settings-button {
    display: inline-flex;
  }

  .mobile-settings-button.is-active {
    border-color: var(--blue-600);
    background: var(--blue-50);
    color: var(--blue-700);
  }

  .sidebar {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .mobile-navigation {
    position: sticky;
    top: var(--topbar-height);
    z-index: 30;
    display: flex;
    gap: 3px;
    padding: 7px 10px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    scrollbar-width: thin;
  }

  .mobile-navigation button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--slate-600);
    font-weight: 500;
  }

  .mobile-navigation button.is-active {
    background: var(--blue-50);
    color: var(--blue-700);
  }

  main {
    padding: 18px 18px 42px;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 102px;
  }

  body {
    font-size: 13px;
  }

  .topbar {
    gap: 7px;
    padding: 8px 10px;
  }

  .brand-mark {
    width: 34px;
    height: 32px;
    border-radius: 9px;
    font-size: 14px;
  }

  .brand-name {
    max-width: 37vw;
    font-size: 14px;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .button {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .filter-trigger {
    display: inline-flex;
    align-items: center;
  }

  .global-search {
    height: 37px;
  }

  .search-submit {
    padding: 0 12px;
  }

  .mobile-navigation {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px;
    overflow: visible;
  }

  .mobile-navigation button {
    min-width: 0;
    padding: 6px 3px;
    font-size: 12px;
    white-space: nowrap;
  }

  main {
    padding: 18px 12px 44px;
  }

  .page-title-row {
    display: block;
    margin-bottom: 14px;
  }

  .page-title-row h1 {
    font-size: 20px;
  }

  .page-description {
    font-size: 12px;
  }

  .active-filter-row {
    margin-top: 10px;
  }

  .health-panel {
    padding: 10px;
  }

  .health-sources {
    overflow-x: auto;
  }

  .health-summary {
    align-items: flex-start;
  }

  .health-summary .button {
    display: none;
  }

  .task-grid,
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .task-card,
  .pipeline-card {
    min-height: 88px;
    padding: 10px;
  }

  .task-card .task-value,
  .pipeline-card .pipeline-value {
    font-size: 21px;
  }

  .section-heading {
    margin-top: 16px;
  }

  .home-columns {
    gap: 12px;
  }

  .content-card {
    border-radius: 14px;
  }

  /* 칸 배치는 파일 끝의 900px 규칙이 맡는다. 여기서는 여백만 줄인다. */
  .compact-record {
    padding: 10px;
  }

  .compact-title {
    white-space: normal;
  }

  .toolbar {
    align-items: stretch;
  }

  .result-count {
    flex-basis: 100%;
  }

  .toolbar label {
    flex: 1 1 100%;
  }

  .toolbar select {
    width: 100%;
  }

  .toolbar > .button {
    width: 100%;
    flex: 1 1 100%;
  }

  .desktop-records {
    display: none;
  }

  .mobile-records {
    display: block;
  }

  .filter-dialog,
  .detail-dialog {
    width: 100vw;
    max-width: none;
    max-height: 94vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }

  .sheet-dialog > form,
  .detail-dialog > div {
    max-height: 94vh;
  }

  .filter-grid,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 16px;
  }

  .field.full,
  .check-field {
    grid-column: auto;
  }

  .dialog-header {
    padding: 15px 16px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
  }

  /* 좁은 화면에서는 안내 줄이 버튼 칸을 뺏지 않게 한 줄을 통째로 쓴다. */
  .dialog-actions .dialog-message {
    grid-column: 1 / -1;
  }

  .dialog-actions .button {
    min-height: 46px;
  }

  .detail-summary,
  .detail-section {
    padding: 16px;
  }

  .detail-summary h2 {
    font-size: 18px;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .participant-stats {
    grid-template-columns: 1fr;
  }

  .participant-section-heading {
    align-items: center;
  }

  .participant-table-wrap {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 390px) {
  .brand-name {
    max-width: 28vw;
    font-size: 13px;
  }

  .top-actions .button.primary {
    padding-right: 7px;
    padding-left: 7px;
  }

  .refresh-full {
    display: none;
  }

  .refresh-short {
    display: inline;
  }

  .task-grid,
  .pipeline-grid {
    grid-template-columns: 1fr 1fr;
  }

  .task-card .task-help,
  .pipeline-card .pipeline-help {
    font-size: 12px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 설정 화면 (검색 기준: 키워드·경쟁사·관심기관) ───────── */
.set-keybar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.set-keybar-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 260px;
}

.set-keybar-text strong { font-size: 13px; color: var(--navy-800); }
.set-keybar-text span { font-size: 12px; color: var(--slate-500); }

.set-keybar-state { display: flex; gap: 8px; align-items: center; }
.set-keybar-state input {
  width: 170px;
  padding: 7px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 13px;
}

.set-ok {
  font-size: 12px;
  font-weight: 550;
  color: var(--green-700, #047857);
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 999px;
  padding: 4px 11px;
}

.set-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-500);
  margin-left: 6px;
}

.set-table { display: grid; overflow-x: auto; }

.set-section {
  margin-top: 14px;
  overflow: hidden;
}

.set-section > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.set-section > summary::-webkit-details-marker { display: none; }
.set-section > summary:hover { background: var(--slate-50); }

.set-toggle::before {
  content: "펼치기";
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-600);
  font-size: 11px;
}

.set-section[open] .set-toggle::before { content: "접기"; }

.set-head,
.set-row {
  display: grid;
  grid-template-columns: var(--set-cols);
  gap: 8px;
  align-items: center;
  min-width: 860px;
  padding: 8px 14px;
}

/* 인라인 style의 열 정의는 배포 CSP가 차단하므로 외부 CSS에서 고정한다. */
.set-table-keyword .set-head,
.set-table-keyword .set-row {
  grid-template-columns: minmax(150px, 1.4fr) minmax(135px, 1.2fr) 92px 82px 110px 62px 112px;
}

.set-table-company .set-head,
.set-table-company .set-row {
  grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1fr) minmax(170px, 1.3fr) minmax(130px, 1fr) 62px 112px;
}

.set-table-org .set-head,
.set-table-org .set-row {
  grid-template-columns: minmax(155px, 1.4fr) 110px 96px minmax(135px, 1fr) 82px 62px 112px;
}

.set-table-qual .set-head,
.set-table-qual .set-row {
  grid-template-columns: 108px 105px minmax(190px, 1.5fr) minmax(180px, 1.2fr) 120px 62px 112px;
}

.set-head {
  position: sticky;
  top: 0;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--slate-500);
}

.set-row { border-bottom: 1px solid var(--slate-100); }
.set-row:last-child { border-bottom: 0; }
.set-row.is-new { background: var(--blue-50, #eff6ff); }

.set-row input[type="text"],
.set-row input[type="number"],
.set-row input[type="date"],
.set-row select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--slate-200);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--navy-800);
}

.set-row input[type="number"] { font-variant-numeric: tabular-nums; }

.set-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--navy-800);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-state {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.set-state.on { background: var(--blue-50); color: var(--blue-800); }
.set-state.off { background: var(--slate-100); color: var(--slate-500); }
.set-row input:focus-visible,
.set-row select:focus-visible,
.set-keybar-state input:focus-visible {
  outline: 2px solid var(--blue-600, #2563eb);
  outline-offset: 1px;
}

.set-active {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
  color: var(--slate-500);
  white-space: nowrap;
}

.set-actions { display: flex; gap: 6px; justify-content: flex-end; }

.button.compact { padding: 6px 11px; font-size: 12px; }
.button.ghost {
  background: transparent;
  border: 1px solid var(--slate-200);
  color: var(--slate-500);
}
.button.ghost:hover { border-color: var(--red-100); color: var(--red-700); }


/* ============================================================
   팔레트 리스타일 — 블루 / 그레이 / 레드 / 옐로 (2026-07-31)

   색마다 역할을 하나씩만 준다. 색이 많아 보이지 않고 의미가 읽힌다.
     블루   조작할 수 있는 것 (버튼·링크·포커스·활성 메뉴·상위 등급)
     그레이 구조와 평상 (사이드바·테두리·본문·정상 상태)
     레드   급하거나 막힌 것 (마감 임박·자격 보완 필요·삭제)
     옐로   확인이 필요하거나 내가 표시한 것 (PICK·미검토·경고)

   '정상'은 일부러 조용하게 둔다. 아무 일 없을 때 초록 점이 잔뜩 켜져 있으면
   정작 빨강·노랑이 떴을 때 눈에 안 들어온다.

   토큰 이름(--navy-* / --slate-*)은 그대로 두고 값만 바꾼다.
   → 기존 1,500줄 규칙을 건드리지 않고 화면 전체 색이 갈린다.
   ============================================================ */
:root {
  /* 그레이 — 차갑지도 누렇지도 않은 중립. 글자 대비를 우선했다. */
  --navy-950: #0b1017;
  --navy-900: #141b24;
  --navy-800: #1e2733;
  --navy-700: #3b4757;
  --slate-600: #46525e;
  --slate-500: #5f6b77;
  --slate-400: #8a94a1;
  --slate-300: #c6ccd6;
  --slate-200: #e0e4ea;
  --slate-100: #eef0f4;
  --slate-50: #f7f8fa;

  /* 블루 — 선명하게. 회색 위에서 확실히 튀어야 조작 지점이 보인다. */
  --blue-800: #0b3ec4;
  --blue-700: #1554e8;
  --blue-600: #2f6bff;
  --blue-100: #d6e4ff;
  --blue-50: #eef4ff;

  /* 레드 — 급한 것. 아껴 쓰는 대신 쓸 때는 확실히. */
  --red-800: #8f1220;
  --red-700: #e0182d;
  --red-100: #ffdadd;
  --red-50: #fff4f5;

  /* 옐로 — 확인 필요·내 표시. 형광펜처럼 배경으로 쓰고 글자는 진하게. */
  --amber-900: #6b4400;
  --amber-700: #b57c00;
  --amber-100: #ffe89c;
  --amber-50: #fffaea;

  /* 그린 — 요청 팔레트에 없다. '정상'을 조용히 만드는 용도로만 낮춰 둔다. */
  --green-800: #3d5a4a;
  --green-100: #e3eae5;
  --green-50: #f6f8f7;

  --violet-800: #4c2889;
  --violet-100: #e9e2fb;

  --surface: #f5f6f9;
  --line: #dfe3ea;

  --shadow: 0 1px 2px rgba(17, 24, 33, 0.05), 0 10px 28px rgba(17, 24, 33, 0.08);
  --shadow-soft: 0 1px 2px rgba(17, 24, 33, 0.04), 0 3px 10px rgba(17, 24, 33, 0.05);

  --radius-xl: 16px;
  --radius-lg: 13px;
  --radius-md: 10px;
}

/* ── 버튼 ─────────────────────────────────────── */
.button {
  border-radius: var(--radius-md);
  letter-spacing: -0.01em;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.08s ease;
}

.button.primary { box-shadow: 0 1px 2px rgba(21, 84, 232, 0.3); }
.button.primary:hover {
  background: var(--blue-800);
  border-color: var(--blue-800);
  box-shadow: 0 2px 10px rgba(21, 84, 232, 0.34);
}

/* 삭제처럼 되돌릴 수 없는 동작만 레드 */
.button.ghost:hover,
.button.danger:hover {
  border-color: var(--red-700);
  background: var(--red-50);
  color: var(--red-800);
}

.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.nav-item:focus-visible,
.record-title-button:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* ── 입력 ─────────────────────────────────────── */
input[type="text"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-100);
  outline: none;
}

/* ── 사이드바 : 짙은 회색 바탕에 파란 활성 표시 ── */
.nav-item { border-radius: var(--radius-md); transition: background-color 0.15s ease, color 0.15s ease; }
.nav-item.is-active {
  border-color: rgba(47, 107, 255, 0.35);
  background: #24303f;
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--blue-600);
}
.nav-item.is-active::before { content: none; }

/* ── 등급 : 상위는 블루, 하위는 그레이, PICK은 옐로 ── */
.compact-grade.grade-s,
.badge.grade-s {
  background: var(--blue-700);
  color: #ffffff;
}

.compact-grade.grade-a,
.badge.grade-a {
  background: var(--blue-100);
  color: var(--blue-800);
}

.compact-grade.grade-b,
.badge.grade-b,
.badge.grade-none {
  background: var(--slate-100);
  color: var(--slate-600);
}

/* 내가 골라 둔 것 — 형광펜처럼 */
.compact-grade.grade-pick,
.badge.grade-pick {
  background: var(--amber-100);
  color: var(--amber-900);
  box-shadow: inset 0 0 0 1px rgba(181, 124, 0, 0.35);
}

/* ── 상태 점 : 정상은 조용히, 문제는 크게 ── */
.status-dot.ok { background: var(--slate-400); }
.status-dot.warning { background: var(--amber-700); }
.status-dot.error { background: var(--red-700); }

/* ── 마감 : 임박은 레드 ── */
.deadline-pill {
  background: var(--red-100);
  color: var(--red-800);
  font-weight: 600;
}

/* ── 카드 ─────────────────────────────────────── */
.content-card,
.task-card,
.pipeline-card {
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.task-card:hover,
.pipeline-card:hover {
  border-color: var(--blue-600);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

/* 개찰 목록에서 '경쟁사가 몇 위로 참여했나'를 한 줄로 보여 준다. */
.competitor-hits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.competitor-hit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--amber-100);
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-900);
  font-size: 10px;
  white-space: nowrap;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.rank-pill.is-winner {
  background: var(--green-800);
}

.competitor-line .rank-pill {
  margin-right: 3px;
}

/* 상세 참여업체 표에서 경쟁사 줄 */
.participant-table tr.is-rival td {
  background: var(--amber-50);
}

.rival-badge {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-900);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* 개찰 원본에 연결한 계약·공동수급 업체. 경쟁사 조건 여부와 무관하게 같은 줄을 쓴다. */
.contract-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}

.contract-company {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid var(--blue-100);
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--blue-900);
  font-size: 10px;
}

.contract-company small { color: var(--blue-700); }
.contract-company.is-rival { border-color: var(--amber-100); background: var(--amber-50); }
.contract-more { color: var(--slate-500); font-size: 10px; }

.contract-detail-list { display: grid; gap: 12px; margin-top: 12px; }
.contract-detail-card {
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-50);
}
.contract-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.contract-detail-head > div { flex: 1 1 320px; }
.contract-detail-head p { margin: 3px 0 0; color: var(--slate-600); font-size: 12px; }
.contract-company-table tr.is-rival td { background: var(--amber-50); }

/* 작년 요맘때 — 판정별 타일이 곧 필터다. */
.lastyear-tile {
  width: 100%;
  font: inherit;
  appearance: none;
  cursor: pointer;
}

.lastyear-tile.is-on {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.lastyear-tile.is-on .task-value,
.lastyear-tile.is-on .task-label {
  color: var(--blue-800);
}

/* 작년 날짜 아래 붙는 '올해 예상' 줄. */
.lastyear-expected {
  display: block;
  margin-top: 2px;
  color: var(--slate-600);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

/* 조건을 바꾸면 '검색'이 눌리기를 기다린다는 표시. */
.button.is-dirty {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

/* 모달 안에서 결과를 말하는 줄. 토스트는 모달 뒤에 깔려 보이지 않는다. */
.dialog-message {
  flex: 1 1 auto;
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
}

.dialog-message.error {
  border: 1px solid var(--red-100);
  background: var(--red-50);
  color: var(--red-700);
}

.dialog-message.info {
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-800);
}

.field-hint {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.5;
}

/* 처리 우선순위 카드 — 급한 것 빨강, 확인할 것 노랑 */
.task-card.urgent { border-color: var(--red-100); background: var(--red-50); }
.task-card.urgent .task-value { color: var(--red-700); }
.task-card.check { border-color: var(--amber-100); background: var(--amber-50); }
.task-card.check .task-value { color: var(--amber-900); }

/* ── 배지·알약 통일 ── */
.badge, .pill, .set-ok, .mode-badge, .deadline-pill, .winner-badge {
  border-radius: 999px;
  letter-spacing: -0.01em;
}

/* ── 설정 표 ─────────────────────────────────── */
.set-row input[type="text"],
.set-row input[type="number"],
.set-row input[type="date"],
.set-row select,
.set-keybar-state input {
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.set-row:hover { background: var(--slate-50); }
.set-row.is-new,
.set-row.is-new:hover { background: var(--blue-50); }

.set-ok {
  color: var(--blue-800);
  background: var(--blue-100);
  border-color: var(--blue-100);
}

/* ── 등급 배지 줄바꿈 방지 ──────────────────────
   "키워드"·"사전규격"처럼 긴 라벨이 32px 고정 칸에서 두 글자씩 끊기던 문제.
   긴 라벨은 알약형으로 늘어나게 한다. */
.compact-grade {
  width: auto;
  min-width: 32px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

.compact-record {
  grid-template-columns: minmax(32px, max-content) minmax(0, 1fr) auto;
}

@media (prefers-reduced-motion: reduce) {
  .button, .content-card, .task-card, .pipeline-card, .nav-item,
  .set-row input, .set-row select { transition: none; }
  .button:active, .task-card:hover, .pipeline-card:hover { transform: none; }
}

/* 설정 잠금 상태 — 보기 전용임을 눈으로 알 수 있게 */
.set-locked {
  font-size: 12px;
  font-weight: 550;
  color: var(--slate-500);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}

.set-row.is-locked input,
.set-row.is-locked select {
  background: var(--slate-50);
  color: var(--slate-600);
  border-color: var(--slate-200);
  cursor: default;
}

.set-row.is-locked:hover { background: transparent; }

/* ── 가독성 조정 (2026-07-31) ─────────────────────────────
   볼드가 너무 많아 무엇이 중요한지 구분이 안 되고, 한글은 굵을수록
   획이 뭉쳐 오히려 흐려 보인다. 기본을 얇게 두고 강조는 색으로 준다. */
body { font-weight: 400; }

/* 표 본문·목록 본문은 기본 굵기 */
td, .record-card, .compact-record, .set-row, .detail-fact span { font-weight: 400; }

/* 제목은 과하지 않게 */
h1 { font-weight: 600; letter-spacing: -0.015em; }
h2 { font-weight: 600; }
h3 { font-weight: 550; }

/* 강조는 굵기 대신 색으로 */
strong, b { font-weight: 550; }

/* 숫자는 자리를 맞춰 읽기 쉽게 */
.task-value, .tier-n, .set-count, td.n, .compact-right strong {
  font-variant-numeric: tabular-nums;
}

/* 작은 라벨이 흐려 보이지 않도록 최소 대비 확보 */
.compact-meta, .record-subline, .task-help, .pipeline-help,
.set-keybar-text span, .side-card li { color: var(--slate-600); }

/* ── 필터: 기간·금액 프리셋 ───────────────────────────── */
.field.span-2 { grid-column: 1 / -1; }

.range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.range-presets .chip-button {
  padding: 5px 11px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 500;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.range-presets .chip-button:hover { border-color: var(--blue-600); color: var(--blue-700); }

.range-presets .chip-button.is-on {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
}

.amount-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.amount-row input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.amount-sep { color: var(--slate-500); font-size: 13px; }

/* ── 관심정보 안의 나라장터 단계·기관/시장 모니터링 ───── */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin: 14px 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
}

.subtab-group {
  display: grid;
  gap: 5px;
}

.subtab-group-label {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.subtab-group-items {
  display: flex;
  gap: 6px;
}

.subtab {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}

.subtab:hover { border-color: var(--blue-600); }

.subtab.is-on {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.subtab-label { font-size: 13px; font-weight: 550; color: var(--navy-800); }
.subtab.is-on .subtab-label { color: var(--blue-800); }
.subtab-hint { font-size: 11px; color: var(--slate-500); }

.subtab:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }

@media (max-width: 720px) {
  .subtabs {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .subtab-group {
    flex: 0 0 auto;
  }

  .subtab {
    padding: 7px 11px;
  }
}

/* ── 수집 상태: 정상이면 접힌 한 줄 ─────────────────────── */
.health-panel {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  margin-bottom: 16px;
}

.health-panel > summary.health-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.health-panel > summary::-webkit-details-marker { display: none; }
.health-panel > summary strong { font-size: 13px; }
.health-panel > summary p { margin: 2px 0 0; font-size: 12px; color: var(--slate-500); }
.health-panel[open] > summary { border-bottom: 1px solid var(--slate-100); }

.health-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

/* ── 같은 사업의 단계 이어보기 ─────────────────────────── */
.stage-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
}

.stage-dot {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
  font-size: 11px;
  color: var(--slate-600);
  white-space: nowrap;
}

.stage-dot i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--slate-500);
}

.stage-dot.is-now {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
  font-weight: 550;
}

.stage-dot.is-now i { color: var(--blue-700); }
.stage-arrow { color: var(--slate-400); font-size: 11px; }

.stage-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stage-timeline li {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-left: 3px solid var(--slate-200);
  background: var(--slate-50);
  font-size: 13px;
}

.stage-timeline li.is-done { border-left-color: var(--slate-400); }
.stage-timeline li.is-now {
  border-left-color: var(--blue-600);
  background: var(--blue-50);
}
.stage-timeline li.is-missing { opacity: 0.55; }

.stage-name { font-weight: 550; color: var(--navy-800); }
.stage-when { color: var(--slate-600); font-variant-numeric: tabular-nums; }
.stage-here {
  font-size: 11px;
  font-weight: 550;
  color: var(--blue-800);
  background: var(--blue-100);
  border-radius: 999px;
  padding: 2px 8px;
}

.muted-line { font-size: 13px; color: var(--slate-500); margin: 0; }

/* ── 화면 위 기간 버튼 ──────────────────────────────────── */
.quick-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 4px;
}

.quick-range-label {
  font-size: 12px;
  font-weight: 550;
  color: var(--slate-600);
  margin-right: 2px;
}

.quick-range .chip-button {
  padding: 5px 11px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.quick-range .chip-button:hover { border-color: var(--blue-600); color: var(--blue-700); }
.quick-range .chip-button.is-on {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
  font-weight: 550;
}

.quick-range-now {
  font-size: 12px;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

/* 자동으로 이어져 담긴 픽 표시 */
.pick-inherited {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-800);
  border: 1px solid var(--blue-100);
  font-size: 11px;
  white-space: nowrap;
}

/* ── 이번 개편 (08-03 오후) ─────────────────────────────── */

/* 게시일·마감일 칸 — 숫자가 세로로 줄맞춤돼야 훑어보기 쉽다 */
.date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.posted-date { color: var(--navy-800); }
.muted-dash { color: var(--slate-400); }

/* 단계 시계열 — 이제 눌러서 이동하는 버튼이다 */
.stage-dot.is-link {
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}
.stage-dot.is-link:hover {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
}
.stage-dot.is-link:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 1px;
}
.stage-timeline li { grid-template-columns: 84px 1fr auto auto; }
.stage-go { padding: 3px 10px; font-size: 12px; }

/* 기간 직접 입력 — 브라우저 기본 달력을 쓴다 */
.range-input {
  padding: 4px 8px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 12px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.range-input:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 1px;
  border-color: var(--blue-600);
}
.range-tilde { color: var(--slate-500); font-size: 12px; }

/* 개찰 '관심 건만' 토글 */
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--navy-800);
  cursor: pointer;
  white-space: nowrap;
}
.check-inline input { accent-color: var(--blue-700); }
.muted-count { color: var(--slate-500); font-size: 12px; }

/* 경쟁사 동향 — 한 사업 안에 업체별 역할을 모아 보여 준다 */
.competitor-cell { display: flex; flex-direction: column; gap: 4px; }
.competitor-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}
.role-pill {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.role-won { background: var(--blue-50);  color: var(--blue-800);  border-color: var(--blue-100); }
.role-win { background: var(--amber-100); color: #7c4a03;         border-color: #f5d98b; }
.role-bid { background: var(--slate-50); color: var(--slate-600); border-color: var(--slate-200); }

/* ── 정렬 다듬기 (08-03 밤) ─────────────────────────────── */

/* 날짜가 맨 앞 칸이다. 폭을 고정해야 행마다 제목 시작점이 같아진다. */
.data-table th.date-col { width: 88px; }
.date-cell { width: 88px; }

/* 추천 배지가 둘 이상이면(A + 재공고) 가로로 흘러 줄이 틀어졌다.
   세로로 쌓고 margin 대신 gap으로 띄운다. */
.grade-cell {
  width: 92px;
  padding-right: 4px;
}
.grade-cell > .badge {
  display: flex;
  width: fit-content;
}
.grade-cell > .badge + .badge { margin-top: 4px; }
/* 세로로 쌓이므로 예전 좌측 여백은 오히려 어긋남을 만든다 */
.grade-cell .badge.cancelled,
.grade-cell .badge.changed { margin-left: 0; }

/* 내 픽 카드 — 날짜 범위·등급·본문·처리정보를 한 행에 여유 있게 배치한다. */
.pick-compact-record {
  grid-template-columns: 144px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-block: 8px;
}

.compact-dates {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.compact-dates strong {
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 500;
}
.compact-dates span {
  color: var(--slate-500);
  font-size: 11px;
}

.compact-grade {
  width: 34px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
}

.compact-body { min-width: 0; }

.pick-compact-record .compact-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.pick-compact-record .compact-right .compact-meta { margin-top: 0; }
.pick-compact-record .compact-right .text-button { min-height: auto; }
.compact-right strong { font-variant-numeric: tabular-nums; }

.pick-audit {
  color: var(--slate-500);
  font-size: 11px;
}

.pick-meta-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-actions.read-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cancelled-pick-record {
  background: #fffafa;
}

.cancelled-pick-record .compact-title {
  color: var(--slate-700);
}

.pick-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--blue-100);
  border-radius: 9px;
  background: var(--white);
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.pick-toggle:hover:not(:disabled) {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.pick-toggle.is-picked {
  border-color: #f4cf76;
  background: #fff9e8;
  color: #835500;
}

.pick-toggle.compact {
  min-height: 32px;
  padding: 5px 8px;
}

.pick-toggle:disabled {
  border-color: var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-500);
  cursor: not-allowed;
}

/* 홈의 '오늘 볼 공고'는 날짜가 없는 3칸 카드다.
   내 픽의 4칸 규칙을 그대로 받으면 제목이 34px 칸에 들어가 한 글자씩 줄바꿈된다. */
.home-compact-record {
  grid-template-columns: minmax(34px, max-content) minmax(0, 1fr) 132px;
  align-items: start;
}

.home-compact-record .compact-grade {
  width: auto;
  min-width: 34px;
  padding: 0 7px;
  margin-top: 1px;
  white-space: nowrap;
}

.home-compact-record .compact-right {
  align-self: start;
}

.home-compact-record .pick-toggle {
  margin-top: 6px;
  margin-left: auto;
}

.inline-empty {
  padding: 22px 18px;
  color: var(--slate-600);
  font-size: 12px;
}

/* 브리핑의 카드 간격은 CSP가 차단하는 인라인 style 대신 전용 클래스로 보장한다. */
.brief-section {
  margin-top: 16px;
}

.stack-section {
  margin-top: 16px;
}

.task-grid-spaced {
  margin-top: 12px;
}

.lastyear-org-input {
  min-width: 150px;
}

.detail-primary-actions {
  gap: 8px;
  margin-top: 12px;
}

.brief-actions {
  margin-bottom: 16px;
}

.task-card.competitor {
  border-color: #bfdbfe;
  background: #f5f9ff;
}

.task-card.health {
  border-color: #fecaca;
  background: var(--red-50);
}

.task-card.health .task-value {
  color: var(--red-700);
}

/* 홈의 행동 카드는 여섯 장이다. 데스크톱 3열, 태블릿 2열, 모바일 1열로 읽는다. */
.task-grid.brief-task-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .task-grid.brief-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pick-compact-record {
    grid-template-columns: 34px minmax(0, 1fr);
    row-gap: 6px;
  }
  .pick-compact-record .compact-dates {
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: baseline;
    gap: 6px;
  }
  .pick-compact-record .compact-grade { grid-column: 1; grid-row: 2; }
  .pick-compact-record .compact-body  { grid-column: 2; grid-row: 2; }
  .pick-compact-record .compact-right {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  .home-compact-record {
    grid-template-columns: minmax(34px, max-content) minmax(0, 1fr);
    align-items: start;
  }
  .home-compact-record .compact-grade { grid-column: 1; grid-row: 1; }
  .home-compact-record .compact-body  { grid-column: 2; grid-row: 1; }
  .home-compact-record .compact-right {
    grid-column: 2;
    grid-row: 2;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .task-grid.brief-task-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 데이터 업데이트 현황 ──────────────────────────────────
   조회 전용 운영 개요다. 기술 로그를 길게 늘어놓지 않고 출처별 핵심 사실을
   두 열 카드로 묶어 데스크톱과 모바일에서 같은 순서로 읽히게 한다. */
.status-dot.running { background: var(--blue-600); }
.status-dot.inactive { background: var(--slate-500); }
.status-dot.untracked { background: var(--violet-800); }
.status-dot.reference { background: var(--slate-300); }

.health-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 11px;
}

.health-count strong {
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.update-readonly-notice { margin-bottom: 14px; }
.update-overview > .section-heading { margin-top: 0; }

.update-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.update-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.update-summary-card > span,
.update-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.update-summary-card > span {
  color: var(--slate-600);
  font-size: 12px;
}

.update-summary-card > strong {
  color: var(--navy-900);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.update-summary-card.normal { border-color: #a7f3d0; background: var(--green-50); }
.update-summary-card.running { border-color: #bfdbfe; background: var(--blue-50); }
.update-summary-card.attention { border-color: #fde68a; background: var(--amber-50); }
.update-summary-card.inactive { background: var(--slate-50); }
.update-summary-card.untracked { border-color: #ddd6fe; background: #f8f7ff; }
.update-summary-card.reference { border-color: var(--slate-200); background: var(--slate-50); }

.update-groups {
  display: grid;
  gap: 18px;
}

.update-group > .section-heading { margin-bottom: 8px; }

.update-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.update-source-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--slate-300);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.update-source-card.normal { border-top-color: #059669; }
.update-source-card.running { border-top-color: var(--blue-600); }
.update-source-card.attention { border-top-color: var(--amber-700); }
.update-source-card.inactive { border-top-color: var(--slate-500); }
.update-source-card.untracked { border-top-color: var(--violet-800); }
.update-source-card.reference { border-top-color: var(--slate-300); }

.update-source-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.update-source-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 9px;
  border-bottom: 1px solid var(--slate-100);
}

.update-source-header h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 650;
}

.update-source-header p {
  margin: 2px 0 0;
  color: var(--slate-500);
  font-size: 11px;
}

.update-status {
  flex: 0 0 auto;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.update-status.normal { border-color: #a7f3d0; background: var(--green-50); color: var(--green-800); }
.update-status.running { border-color: #bfdbfe; background: var(--blue-50); color: var(--blue-800); }
.update-status.attention { border-color: #fde68a; background: var(--amber-50); color: var(--amber-900); }
.update-status.untracked { border-color: #ddd6fe; background: #f5f3ff; color: var(--violet-800); }

.update-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 10px 12px;
}

.update-facts > div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  background: var(--slate-50);
}

.update-facts > div.wide { grid-column: 1 / -1; }

.update-facts dt {
  margin-bottom: 2px;
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 600;
}

.update-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy-800);
  font-size: 12px;
}

.update-facts dd span { display: block; }
.update-facts dd span + span { margin-top: 2px; color: var(--slate-600); }
.update-facts time { font-variant-numeric: tabular-nums; }

.update-source-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 10px;
}

.update-source-footer .text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 1080px) {
  .update-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .update-source-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .health-body { align-items: flex-start; }
  .health-counts { width: 100%; }
  .update-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .update-source-header { padding: 10px; }
  .update-facts { padding: 9px 10px; }
  .update-source-footer { padding: 0 10px 9px; }
}

@media (max-width: 430px) {
  .update-summary-grid { grid-template-columns: 1fr; }
  .update-facts { grid-template-columns: 1fr; }
  .update-facts > div.wide { grid-column: auto; }
}


/* 오늘의 업무는 서버 요약 1회 결과만 표시한다. */
.today-work-snapshot-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--blue-100);
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.5;
}

.today-work-change {
  grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
}

.today-work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* owner 전용 사용자 계정 관리 */
.user-create-card {
  margin-bottom: 16px;
}

.user-create-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(200px, 1fr) minmax(150px, .7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.owner-password-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.user-create-actions,
.user-row-actions,
.user-password-reset,
.user-login-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-password-reset input,
.user-login-edit input {
  width: 170px;
}

.user-table-wrap {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.user-table th,
.user-table td {
  padding: 12px;
  border-top: 1px solid var(--slate-200);
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  color: var(--slate-500);
  font-size: 12px;
  background: var(--slate-50);
}

.owner-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 11px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.is-active {
  color: #047857;
  background: #ecfdf5;
}

.status-pill.is-inactive {
  color: var(--slate-600);
  background: var(--slate-100);
}

.empty-row {
  padding: 28px !important;
  color: var(--slate-500);
  text-align: center !important;
}

@media (max-width: 980px) {
  .user-create-grid {
    grid-template-columns: 1fr 1fr;
  }

  .owner-password-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .user-create-grid {
    grid-template-columns: 1fr;
  }
}
