/* 글꼴 (11-12, 다른 한우 앱과 같게): 본문·표·숫자 = Pretendard(굵기 400~700), 제목(h1~h3)·농장 이름·큰 제목 = 오빗 400(굵게 쓰지 않음).
   tailwind.css(생성 파일)의 --font-sans 는 @layer theme 안이라, 층 없는 이 규칙이 이긴다 — 다시 만들 때는 tools/tailwind.input.css 도 같은 값. */
:root { --font-sans: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
h1, h2, h3, .brand-title, .font-serif { font-family: "Orbit App", "Malgun Gothic", sans-serif; font-weight: 400; letter-spacing: 0; }
/* 공통 머리글의 앱 이름 — 포털·시세전망·출하분석과 같게 오빗 400, 16px (11-13) */
.hw-app { font-family: "Orbit App", "Malgun Gothic", sans-serif; font-size: 16px; font-weight: 400; letter-spacing: 0; }

/* Tailwind 로 표현하기 번거로운 것만 둔다. */

/* 앱 색 — 시험농장 파랑 (11-01, 포털 상자 색과 같게: 시험농장 파랑·스마트컨설팅 노랑·출하분석 빨강·시세전망 초록).
   머리글 윗줄·앱 글자 표시·다른 시스템 메뉴의 '지금 여기'·고른 탭 밑줄에만 쓴다. 단추·데이터 색은 그대로. */
:root { --app: #2A78D6; --app-on: #FFFFFF; --app-text: #1F5FAE; --app-tint: #EAF2FC; }
.app-bar { border-top: 3px solid var(--app); }
.app-mark { background: var(--app); color: var(--app-on); }
/* 머리글 '다른 시스템' 메뉴 — 시세전망(포털 hw-nav)과 같은 밑줄형 (11-12): 회색 글자, 지금 여기만 앱 색 글자 + 앱 색 밑줄.
   폰 폭에서는 간격을 줄여 한 줄에 들어가게. */
.sys-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.sys-nav a { color: #59605F; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.sys-nav a:hover { color: #161A19; }
.sys-nav a[aria-current="page"] { color: var(--app-text); font-weight: 600; border-bottom-color: var(--app); }
@media (max-width: 480px) { .sys-nav { gap: 8px; font-size: 13px; } .app-bar > div { padding-left: 12px; padding-right: 12px; } }   /* 11-17: 메뉴 5개가 375px 폭에 다 들어오게 */
/* 공통 머리글 통일 (11-17): 메뉴 5개가 폰 폭에서 넘치면 메뉴만 가로로 밀리고, 아주 좁으면 앱 이름은 숨긴다(앱 마크가 대신) */
.sys-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sys-nav::-webkit-scrollbar { display: none; }
@media (max-width: 639px) { .app-bar .hw-app { display: none; } }
.kpi-value { font-variant-numeric: tabular-nums; }
/* 왼쪽 위 '대구축협 시험농장' 제목 — 앱 글꼴(오빗, web/orbit.css) 굵게, 조금 크게 */
.brand-title { font-weight: 700; font-size: 18px; line-height: 1.2; }
/* 키보드로 옮겨 다닐 때 지금 칸이 보이게 — 장부 녹색 테두리 (11-02). 버튼·링크는 마우스로 누를 때는 브라우저가 켜지 않는다. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #1F6B5E; outline-offset: 2px; }
/* 입력칸 안내 글자 — 흰 바탕 4.75:1 (Tailwind 기본은 글자색 50% 라 3.3:1 로 흐렸다) */
input::placeholder, textarea::placeholder { color: #6F7473; }
/* 고른 메뉴: 강조색 대신 회색 바탕 + 진한 글자 (DESIGN.md 7절). 굵기를 바꾸지 않아 글자 폭이 흔들리지 않는다. */
.nav-item[aria-current="page"] { background: #EEF0F0; color: #161A19; font-weight: 600; }
.tab-btn[aria-selected="true"] { border-color: var(--farm, #1F6B5E); color: #161A19; font-weight: 600; }   /* 농장 화면은 농장 색 (app.js 가 --farm 을 정함) */
.chip[aria-pressed="true"] { background: #161A19; color: #fff; border-color: #161A19; }   /* 사양관리 일지의 누르기 단추 (소독·미생물·약품 묶음) */
/* 장부식 합계줄 — 위 가는 선, 아래 이중선 (DESIGN.md 6절 대표 장치) */
.ledger-total { border-top: 1px solid #161A19; border-bottom: 3px double #161A19; background: transparent; font-weight: 600; }
td.ledger-total, .ledger-total > td { border-top: 1px solid #161A19; border-bottom: 3px double #161A19; }

/* 모든 버튼 공통: 올리면 살짝 어두워지고(PC만), 누르면 1px 눌림. 잠긴 버튼(관전자 등)은 반응하지 않는다. */
button { transition: background-color .15s, filter .15s, transform .05s; }
button:not(:disabled) { cursor: pointer; }
button:active:not(:disabled) { transform: translateY(1px); }
@media (hover: hover) {
  button:hover:not(:disabled) { filter: brightness(.95); }
}

/* 단추 (11-05 사용자 선택 '폭 줄인 파랑', DESIGN.md 5절) — 화면 코드는 그대로 두고 여기서 한 번에 바꾼다.
   ① 주 단추(bg-brand)는 시험농장 앱 파랑. 앱 색 #2A78D6 은 흰 글자 대비 4.4:1 이라 한 단계 진한 #256FCC(5.0:1), 올리면 #1F5FAE.
   ② 상자 폭을 끝까지 채우던 단추(w-full)는 글자 길이만큼 줄여 오른쪽에 붙인다 — 상자마다 생기던 굵은 막대를 없앰.
      로그인 단추는 그대로. 현장 작업 화면(손가락용 큰 단추)은 w-full 을 쓰지 않아 해당 없음. */
:is(button, a).bg-brand { background-color: #256FCC; border-color: #256FCC; }
@media (hover: hover) {
  :is(button, a).bg-brand:hover:not(:disabled) { background-color: #1F5FAE; filter: none; }
}
button.bg-white.border { border-color: #D3D8D7; }
button.w-full:not(#login-form button) { display: block; width: auto; min-width: 10rem; margin-left: auto; padding-inline: 1.5rem; }

/* 우방 배치도 (기존 Streamlit 컴포넌트의 CSS 를 그대로 옮김, 강조색만 시험농장 갈색) */
.pb { font-family: inherit; color: #1E1F1C; font-size: 13px; user-select: none; -webkit-user-select: none; }
.pb .bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.pb .bar .info { font-weight: 700; margin-right: auto; }
.pb .bar .hint { color: #64748b; font-size: 12px; font-weight: 400; margin-left: 6px; }
.pb input.q { padding: 5px 9px; border: 1px solid #cbd5e1; border-radius: 8px; width: 140px; font-size: 13px; background: #fff; color: inherit; }
.pb button { padding: 6px 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: inherit; font-weight: 700; cursor: pointer; font-size: 13px; }
.pb button { border-color: #D3D8D7; }
.pb button.save { background: #256FCC; border-color: transparent; color: #fff; }
.pb button:disabled { opacity: .4; cursor: default; }
.pb .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; font-size: 12px; }
.pb .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.pb .tray { border: 2px dashed #94a3b8; border-radius: 10px; padding: 6px 8px; margin-bottom: 10px; min-height: 34px; }
.pb .tray .th { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: #475569; }
.pb .pbgrid { overflow-x: auto; padding-bottom: 4px; }
/* 우방 칸 폭을 화면 폭에 맞춰 나눈다 (모든 동이 같은 열 수 → 우방 번호가 위아래로 줄 맞춤). 너무 좁아지면 가로 스크롤. */
.pb .brow { display: grid; grid-template-columns: 46px repeat(var(--cols, 20), minmax(48px, 1fr)); gap: 3px; margin-bottom: 3px; min-width: calc(46px + var(--cols, 20) * 51px); }
.pb .bname { display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 800;
             background: #f1f5f9; border-radius: 8px; color: #0f172a; }
.pb .bname small { font-weight: 500; color: #64748b; font-size: 11px; }
.pb .pen { min-width: 0; min-height: 54px; border: 1px solid #e2e8f0; border-top: 4px solid var(--pg, #cbd5e1); border-radius: 8px;
           padding: 2px 3px 4px; background: color-mix(in srgb, var(--pg, #94a3b8) 7%, transparent); cursor: pointer; }
.pb .pen.sick { border: 2px solid #dc2626; border-top: 4px solid #dc2626; background: #fef2f2; }
.pb .pen.sick .pn { color: #dc2626; }
.pb .pen.over, .pb .tray.over { outline: 3px solid #1F6B5E; outline-offset: -1px; }
.pb .pn { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: #475569; margin-bottom: 2px; }
.pb .pn span { font-weight: 500; color: #94a3b8; }
.pb .chip { display: inline-block; margin: 1px; padding: 0 3px; border-radius: 5px; font-size: 11px; font-weight: 700; line-height: 16px;
            color: #fff; background: var(--gc, #94a3b8); cursor: grab; touch-action: none; white-space: pre; }
.pb .chip.moved { outline: 2px dashed #0f172a; outline-offset: 1px; }
.pb .chip.sel { box-shadow: 0 0 0 3px #facc15; }
.pb .chip.hit { box-shadow: 0 0 0 3px #f43f5e; }
.pb .chip.dim { opacity: .25; }
.pb .ghost { position: fixed; z-index: 9999; pointer-events: none; padding: 4px 10px; border-radius: 999px; background: #0f172a; color: #fff;
             font-weight: 800; font-size: 12px; transform: translate(-50%, -130%); }

/* 폰(768px 미만)·터치 화면(패드 등, 11-01 추가): 손가락으로 누를 수 있는 크기. 입력칸 글자를 16px 로 두면 iPhone·iPad 가 칸을 누를 때 화면을 확대하지 않는다.
   Tailwind 클래스(text-sm, py-0.5 등)보다 뒤에 와야 하는 규칙이라 여기에 둔다 (현장 작업 화면은 이미 이 크기라 그대로). 마우스 PC 는 해당 없음. */
@media (max-width: 767px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }
  table input:not([type="checkbox"]):not([type="radio"]), table select { min-height: 40px; }
  button { min-height: 40px; }
  .tab-btn, .nav-item, .step-chip { min-height: 44px; display: flex; align-items: center; }   /* step-chip = 월말 작업 칩(링크) — 전체 현황 카드·농장 화면 위쪽 */
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  summary { padding-block: 10px; }
}
