/* 2026-10-15 확정 디자인. 기존 구조/업무 스타일 뒤에서 읽는다.
   ALPACO 승인 로고·Pretendard 원본은 유지한다. 공통 자산은 값/원칙만 참고하고
   공개 재배포 조건이 없는 테마 파일을 포함하지 않는다. */
:root {
  --alpaco-color-primary: #295caa;
  --alpaco-color-primary-hover: #244f91;
  --alpaco-color-primary-soft: #edf2f9;
  --alpaco-control-height: 40px;
  --blue-800: #244f91;
  --blue-700: #295caa;
  --blue-600: #295caa;
  --blue-100: #e4ecf7;
  --blue-50: #edf2f9;
  --navy-950: #20252b;
  --navy-900: #20252b;
  --navy-800: #303944;
  --navy-700: #414b57;
  --slate-600: #5f6976;
  --slate-500: #65707d;
  --slate-400: #7b8798;
  --surface: #fff;
  --line: #e5e8ec;
  --shadow: 0 4px 18px rgb(32 37 43 / 10%);
  --shadow-soft: none;
  --radius-xl: 6px;
  --radius-lg: 6px;
  --radius-md: 6px;
  --design-control-border: #7b8798;
  --design-text: #39424c;
  --design-muted: #5f6976;
}
html, body, .app-shell, .main-content { background: #fff; }
body { font-family: Pretendard, "Malgun Gothic", "Segoe UI", sans-serif; font-size: 14px; line-height: 1.6; color: var(--design-text); }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:is(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #295caa; outline-offset: 3px; }
[hidden] { display: none !important; }
::placeholder { color: #65707d; opacity: 1; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-height: 40px; min-width: 0; max-width: 100%; border: 1px solid var(--design-control-border);
  border-radius: 6px; background: #f6f7f9; color: var(--design-text); font-size: 14px; line-height: 1.5; padding: 8px 10px;
}
input[type="checkbox"], input[type="radio"] { accent-color: #295caa; flex-shrink: 0; }
input:disabled, select:disabled { background: #f1f3f5; color: #65707d; opacity: 1; }
.button, .button.small, .button.compact, .search-submit, .icon-button, .page-button, .chip-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap;
  padding: 8px 14px; box-shadow: none; transform: none; letter-spacing: 0;
}
.button.primary { color: #fff; background: #295caa; border-color: #295caa; box-shadow: none; }
.button.primary:hover { background: #244f91; border-color: #244f91; box-shadow: none; }
.button.secondary, .button.ghost, .page-button, .chip-button {
  color: var(--design-text); background: #fff; border: 1px solid var(--design-control-border); box-shadow: none;
}
.button.secondary:hover, .button.ghost:hover, .chip-button:hover, .page-button:hover { background: #f6f7f9; border-color: #65707d; color: #20252b; }
.button:active { transform: none; }
.button:disabled { opacity: .55; }
.text-button, .external-link { display: inline-flex; min-height: 40px; align-items: center; color: #295caa; font-size: 13px; }
.topbar { background: #fff; backdrop-filter: none; font-size: 13px; }
.topbar .button, .search-submit { font-size: 13px; }
.global-search input { height: 40px; }
.global-search { border-color: var(--design-control-border); background: #f6f7f9; }
.global-search input { border: 0; background: transparent; }
.search-submit { background: #fff; color: #295caa; border: 0; border-left: 1px solid var(--design-control-border); }
.brand-name { color: #20252b; font-weight: 600; }
.brand-caption, .signed-in-user { color: var(--design-muted); }
.sidebar, .side-navigation, .mobile-navigation { background: #fff; box-shadow: none; }
.nav-item, .mobile-navigation button { min-height: 44px; color: #414b57; font-size: 14px; font-weight: 400; border-radius: 0; }
.nav-item.is-active, .mobile-navigation button.is-active { color: #295caa; background: #fff; font-weight: 600; border-bottom: 3px solid #295caa; }
.nav-item:hover, .mobile-navigation button:hover { background: #f6f7f9; }
#main { max-width: 1720px; margin-inline: auto; padding: 24px; }
#main h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.4; font-weight: 600; color: #20252b; }
#main h2, .dialog-header h2 { font-size: 18px; line-height: 1.5; font-weight: 600; color: #20252b; }
#main h3 { font-size: 16px; font-weight: 500; }
.page-description, .section-heading p { font-size: 13px; font-weight: 400; color: var(--design-muted); }
.page-title-row { margin-bottom: 16px; }
.eyebrow { color: var(--design-muted); font-size: 12px; font-weight: 400; }
.record-title-button, #main .record-title-button, .search-result .record-title-button, .compact-title {
  color: var(--design-text); font-size: 14px; font-weight: 400; line-height: 1.65;
  white-space: normal; overflow-wrap: anywhere; word-break: normal; text-align: left; max-width: 100%;
}
.record-title-button:hover, .record-title-button:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.record-title-button strong, .record-title-button b { font-weight: 500; }
.record-subline, .compact-meta, .pick-meta-line, .review-organization, .review-cell-note { color: var(--design-muted); font-size: 13px; font-weight: 400; }
.content-card, .task-card, .pipeline-card, .record-card, .search-result, .update-source-card, .table-wrap {
  border-radius: 0; box-shadow: none; border-color: var(--line); background: #fff;
}
.task-card, .pipeline-card { border-width: 0 0 1px; }
.task-card:hover, .pipeline-card:hover { transform: none; box-shadow: none; }
.task-card.urgent, .task-card.check, .task-card.competitor, .task-card.health { background: #fff; }
.task-card .task-value { font-size: 22px; font-weight: 600; }
.task-card .task-label, .task-card .task-help { color: var(--design-muted); }
.search-result { border-width: 0 0 1px; padding-inline: 0; }
.table-wrap { border-width: 0 0 1px; }
.data-table { color: var(--design-text); }
.data-table th { background: #fff; color: var(--design-muted); font-size: 13px; font-weight: 500; }
.data-table td { font-size: 14px; font-weight: 400; }
.data-table .amount-cell, .amount-cell strong, .compact-right > strong, .review-cell-value { font-weight: 500; }
.source-pill, .agency-board-pill, .rule-match-pill, .badge, .pick-pill, .mode-badge, .reason-chip {
  color: #414b57; background: #f1f3f5; border-color: #dfe3e8; border-radius: 4px; font-weight: 400;
}
.source-pill.search-source-plans, .source-pill.search-source-specs, .source-pill.search-source-bids,
.source-pill.search-source-results, .source-pill.search-source-agency { color: #414b57; background: #f1f3f5; }
.qualification-pill { border-radius: 4px; font-weight: 400; }
.qualification-pill.unknown, .qualification-pill.neutral { color: #526078; background: #f1f3f5; }
.qualification-pill.warning { color: #805400; background: #fff8e8; }
.qualification-pill.danger { color: #a3261d; background: #fff2f0; }
.filter-count { background: #295caa; color: #fff; }
.set-row .button, .user-table .button, .users-table .button, .user-row .button { flex-shrink: 0; white-space: nowrap; min-width: max-content; }
.set-row input { font-size: 13px; }
.user-management .table-wrap, .users-panel .table-wrap { overflow-x: auto; }

/* 공통 조건: 날짜는 하나의 그룹, 선택은 텍스트+작은 체크 표시로 읽힌다. */
.review-panel { border: 0; border-radius: 0; padding: 0 0 16px; margin-bottom: 16px; background: #fff; }
.review-views { border-bottom: 1px solid var(--line); gap: 20px; margin-bottom: 20px; padding: 0; }
.review-views .review-view { border: 0; border-bottom: 2px solid transparent; border-radius: 0; min-width: 72px; padding: 8px 10px; background: #fff; font-weight: 400; }
.review-views .review-view[aria-selected="true"] { color: #295caa; border-bottom-color: #295caa; font-weight: 500; }
.review-filters { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(290px, 1.7fr) minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(135px, .8fr) auto; align-items: end; gap: 14px; }
.review-filters > label, .review-share-fields > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--design-muted); font-size: 13px; font-weight: 400; }
.review-filters input, .review-filters select { width: 100%; }
.review-date-range { margin: 0; padding: 0; min-width: 0; border: 0; }
.review-date-range legend { float: none; width: auto; margin: 0 0 6px; padding: 0; color: var(--design-muted); font-size: 13px; line-height: 1.6; }
.review-date-inputs { display: grid; grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr); gap: 6px; align-items: center; }
.review-date-inputs input { min-width: 0; width: 100%; font-size: 13px; padding-inline: 8px; }
.review-filter-action { display: flex; align-items: end; }
.review-filter-action .button { white-space: nowrap; }
.review-sections { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 4px !important; padding: 0; }
.review-sections .bulletin-choice { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; gap: 8px; border: 0; border-radius: 0; background: #fff; font-size: 14px; font-weight: 400; }
.review-sections .bulletin-choice:has(input:checked) { background: #fff; border-color: transparent; }
.review-sections input { width: 16px; height: 16px; margin: 0; }
.review-section-count { color: var(--design-muted); font-size: 13px; font-weight: 400; white-space: nowrap; margin-left: 6px; }
.review-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; background: #fff; border-radius: 0; padding: 12px 0 0; font-size: 13px; line-height: 1.6; }
.review-summary .review-count { font-size: 16px; font-weight: 500; color: #20252b; }
.review-count-detail { font-size: 13px; font-weight: 400; color: var(--design-muted); }
.review-summary #reviewScopeHint { font-size: 13px; color: var(--design-muted); }
.review-display-help { padding-top: 8px; color: var(--design-muted); font-size: 13px; }
.review-display-help > summary { display: list-item; width: fit-content; min-height: 40px; padding-block: 8px; color: var(--design-muted); cursor: pointer; }
.review-display-help p { max-width: 96ch; margin: 4px 0 8px; }
.review-share-panel { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; border-block: 1px solid var(--line); padding-block: 16px; }
.review-share-panel .review-share-fields { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 0; }
.review-share-fields label:first-child { min-width: 220px; }
.review-share-fields label:nth-child(2) { min-width: 130px; }
.review-share-panel .review-share-actions { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.review-share-actions .secondary { border-color: var(--design-control-border); color: var(--design-text); }
.review-alert { border-radius: 4px; background: #fff9ed; color: #805400; border-color: #976200; }
.review-alert label { min-height: 40px; }
.bulletin-grid { display: block; }
.bulletin-section { border: 0; padding: 0; margin-bottom: 24px; }
.review-stage > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; min-height: 48px; cursor: pointer; border-bottom: 1px solid var(--line); }
.review-stage > summary::-webkit-details-marker { display: none; }
.review-stage > summary::after { content: ""; width: 8px; height: 8px; margin-right: 8px; border-right: 1.5px solid #5f6976; border-bottom: 1.5px solid #5f6976; transform: rotate(45deg); flex-shrink: 0; }
.review-stage[open] > summary::after { transform: rotate(225deg); }
.review-stage > summary h2 { margin: 0; font-size: 18px; font-weight: 600; }
.review-stage-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; }
.review-stage-table { width: 100%; min-width: 930px; border-collapse: collapse; table-layout: fixed; }
.review-stage-table col.review-title-col { width: 37%; }
.review-stage-table col.review-money-col { width: 18%; }
.review-stage-table col.review-status-col { width: 13%; }
.review-stage-table col.review-link-col { width: 60px; }
.review-stage-table th, .review-stage-table td { padding: 12px 10px; border: 0; border-bottom: 1px solid #e5e8ec; background: #fff; vertical-align: middle; text-align: left; }
.review-stage-table thead th { font-size: 13px; font-weight: 500; color: var(--design-muted); white-space: normal; }
.review-stage-table th[scope="row"] { font-weight: 400; }
.review-stage-table .record-title-button { display: inline; font-size: 14px; font-weight: 400; line-height: 1.65; }
.review-stage-table .review-organization { display: block; font-size: 13px; font-weight: 400; color: var(--design-muted); overflow-wrap: anywhere; }
.review-stage-table .review-cell-value { display: block; font-size: 14px; font-weight: 400; }
.review-stage-table .review-cell-note { display: block; font-size: 13px; font-weight: 400; color: var(--design-muted); }
.review-stage-table .is-money { text-align: right; }
.review-stage-table td.is-money .review-cell-value { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-date-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-row-status { font-size: 13px; font-weight: 400; color: var(--design-muted); }
.review-row-status.warning { color: #805400; }
.review-original-link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; color: #414b57; font-size: 20px; text-decoration: none; }
.review-original-link:hover { background: #f1f3f5; }
.review-more { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.review-more p, .review-empty { font-size: 13px; color: var(--design-muted); }
.review-field-status { margin-left: 0; font-size: 13px; color: var(--design-muted); }
.review-lastyear summary { min-height: 40px; padding-block: 8px; cursor: pointer; }
.bulletin-year-row { min-height: 40px; }
.share-bar { border-width: 0 0 1px; background: #fff; box-shadow: none; border-radius: 0; }
.dialog-content, .detail-content { color: var(--design-text); background: #fff; }
.dialog-header { border-bottom-color: var(--line); }
.dialog-header h2 { font-size: 18px; font-weight: 600; }
.dialog-actions { flex-wrap: wrap; }
@media (max-width: 1350px) { .review-filters { grid-template-columns: minmax(130px, .7fr) minmax(290px, 1.4fr) minmax(180px, 1fr); } }
@media (max-width: 1024px) {
  #main { padding: 20px; }
  .review-filters { grid-template-columns: minmax(140px, 1fr) minmax(290px, 1.5fr); }
  .review-filters > label:nth-of-type(2) { grid-column: 1 / -1; }
  .review-share-actions { width: 100%; }
}
@media (max-width: 600px) {
  #main { padding: 20px 16px; }
  .review-panel, .bulletin-section { padding-inline: 0; }
  .review-filters { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .review-filters > *, .review-filters > label:nth-of-type(2) { grid-column: auto; }
  .review-date-inputs { grid-template-columns: minmax(0, 1fr); }
  .review-date-inputs > span { display: none; }
  .review-date-inputs input { min-height: 40px; font-size: 14px; }
  .review-filter-action, .review-filter-action .button { width: 100%; }
  .review-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .review-sections .bulletin-choice { min-width: 0; }
  .review-summary { display: block; }
  .review-summary p + p { margin-top: 6px; }
  .review-share-fields { width: 100%; }
  .review-share-fields > label, .review-share-fields label:first-child, .review-share-fields label:nth-child(2) { flex: 1 1 100%; min-width: 0; }
  .review-share-fields input, .review-share-fields select { width: 100%; }
  .review-share-panel .review-share-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .review-share-actions .button { width: 100%; min-height: 44px; white-space: normal; }
  .review-share-actions [data-feature="bulletin-copy"] { grid-row: 1; }
  .review-stage-table { min-width: 930px; }
  .review-stage-table th, .review-stage-table td { padding-block: 14px; }
  .review-alert-actions { align-items: stretch; }
  .review-alert-actions .button { width: 100%; }
  .share-bar-actions { flex-wrap: wrap; }
  .share-bar-actions .button { min-width: 0; max-width: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Browser-measured control geometry and legacy specificity corrections. */
.subtab-hint, .set-locked, .muted { color: #5f6976; }
#localSearchInput { border: 1px solid #7b8798; }
.organization-column { font-size: 13px; font-weight: 400; }
.amount.sm, .amount.md, .amount.lg { font-size: 14px; font-weight: 500; }
input[type="date"], #ruleModeSelect, #sortSelect, #pageSizeSelect, #newUserRole {
  box-sizing: border-box; height: 40px; min-height: 40px; padding-block: 6px;
}

.data-table td.organization-column { font-size: 13px; font-weight: 400; }
/* Keep absolute screen-reader labels within their own scroll region. */
.review-stage-table-wrap, .review-original-link { position: relative; }
.review-stage-table-wrap { scrollbar-gutter: auto; }

/* 2026-10-15 사용자 지적: 40px 입력칸에 14px 글자는 위아래가 비어 보인다. 버튼 40px 기준은 유지하고
   필터 줄의 입력·선택칸 글자를 15px로 키운다. 날짜 기준 선택칸은 44px → 40px로 맞춘다. */
.quick-range input:not([type="checkbox"]), .quick-range select,
.toolbar input:not([type="checkbox"]), .toolbar select,
.feature-toolbar input:not([type="checkbox"]), .feature-toolbar select { font-size: 15px; padding-block: 7px; }
.result-date-control select { min-height: 40px; }
/* 상단 통합검색: 틀(40px·테두리 1px) 안의 입력칸·버튼이 40px라 2px 넘쳐 아래 테두리를 덮었다.
   조작 요소 40px 기준은 유지하고, 틀 선을 공간을 차지하지 않는 안쪽 outline으로 그려 내용 위에 보이게 한다. */
.global-search { border-width: 0; outline: 1px solid var(--design-control-border); outline-offset: -1px; }
.global-search:focus-within { outline-color: var(--blue-600); }
/* 2026-10-15 사용자 지적(홈): '최근 변화' 배지가 34px 고정 상자(.compact-grade) 밖으로 글자가 넘쳤고,
   '필요할 때 전체 조회' 버튼 줄이 카드 안쪽 여백 없이 테두리에 붙었다. 배지는 같은 폭(96px)으로 정렬하고,
   버튼 줄은 카드 머리글과 같은 좌우 14px·아래 14px 여백을 준다. */
.today-work-change { grid-template-columns: 96px minmax(0, 1fr); }
.today-work-change .compact-grade { width: 96px; height: auto; min-height: 26px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-work-links { padding: 2px 14px 14px; }
/* 2026-10-16 사용자 지적: 목록 '내 조건' 칸에서 조건 배지(rule-match-pill, 예: 키워드)와 상태 배지(badge, 예: 재공고)가
   틈 없이 붙었다. 간격 규칙이 .badge + .badge에만 걸려 있었다. 종류와 관계없이 세로로 쌓고 6px 띄운다. */
.grade-cell > .rule-match-pill, .grade-cell > .badge { display: flex; width: fit-content; }
.grade-cell > * + * { margin-top: 6px; }
/* 2026-10-16 사용자 지적: 검토 목록 게시판 미리보기 창이 바깥 여백 없이 창 가장자리에 붙었다. 본문에 좌우 24px를 주고 미리보기를 키운다. */
.review-share-body { display: grid; gap: 14px; padding: 18px 24px 6px; }
.review-share-body > .feature-toolbar, .review-share-body > p { margin: 0; }
.review-share-body > p { color: var(--design-muted); font-size: 13px; }
/* 창 최대 높이(min(90vh, 900px))에서 머리글·도구줄·버튼줄(약 330px)을 뺀 만큼만 써서 창과 미리보기가 이중으로 스크롤되지 않게 한다. */
.review-share-preview { height: max(260px, calc(min(90vh, 900px) - 340px)); }
