/* farmclub 관리자 페이지 공용 스타일(DEV-83). 토큰은 packages/ui/src/tokens.ts와 같은 색·글자 */
:root {
  --text: #111111; --muted: #6B6B6B; --surface: #F5F5F3; --border: #E8E8E6;
  --accent: #C94F0C; --error: #B42318; --ok: #1F7A3A; --bg: #FFFFFF;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px; line-height: 1.5; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand i { display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); margin-left: 2px; }
.tag { font-size: 13px; color: var(--muted); }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, textarea { font: inherit; font-size: 16px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; }
button { font: inherit; font-weight: 600; border-radius: 999px; min-height: 44px; padding: 0 18px; cursor: pointer; white-space: nowrap; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--error); border-color: #F1C9C5; }
button.danger.solid { background: var(--error); border-color: var(--error); color: #fff; }
button.text { border: 0; background: transparent; padding: 0 8px; color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }
.hint { font-size: 13px; color: var(--muted); }
.error { font-size: 14px; color: var(--error); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: 14px; max-width: calc(100% - 32px); }
.toast.err { background: var(--error); }

/* 신청 목록 화면 공용: 상태 탭, 카드 속 항목, 상태 배지, 이력, 반려 사유 칸(가입 신청·공급 물량) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.tabs button { min-height: 36px; padding: 0 14px; font-size: 14px; }
.tabs button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.app h2 { font-size: 18px; margin: 0; }
.meta { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; margin: 12px 0; font-size: 14px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.s-PENDING { background: #FFF3E8; color: var(--accent); }
.s-APPROVED { background: #E9F5EE; color: var(--ok); }
.s-WITHDRAWN { background: var(--surface); color: var(--muted); }
.s-REJECTED, .s-SUSPENDED { background: #FDECEA; color: var(--error); }
.history { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; }
.history li { margin-bottom: 6px; }
.reject-box { margin-top: 12px; display: grid; gap: 8px; }

/* 관리자 레이아웃: 왼쪽 사이드바 + 본문. 좁은 화면은 위쪽 메뉴 */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--bg); border-right: 1px solid var(--border); padding: 24px 12px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.side .head { padding: 0 8px; display: flex; align-items: baseline; gap: 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.side nav a:hover { background: var(--surface); }
.side nav a[aria-current="page"] { background: var(--surface); }
.side .foot { padding: 0 8px; display: grid; gap: 6px; }
.side .foot form { margin: 0; }
.side .foot button { min-height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.content { min-width: 0; }
.content .wrap { max-width: 880px; padding: 32px 24px 64px; }
.page-head { margin-bottom: 20px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side .head { padding: 0; }
  .side nav { flex-direction: row; order: 3; flex: 0 0 100%; overflow-x: auto; }
  .side .foot { margin-left: auto; padding: 0; }
  .side .foot .hint { display: none; }
  .content .wrap { padding: 20px 16px 64px; }
}

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px 24px; }
.login form { display: grid; gap: 12px; margin-top: 20px; }
.login label { font-weight: 600; font-size: 14px; }
