/* アペックスフルーツ 仲卸業務システム */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: #f4f6f9; color: #2b3440; font-size: 15px; line-height: 1.6;
}
a { color: #1a6e3c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ヘッダー */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: #143d26; color: #fff; padding: 10px 20px;
}
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand span { font-weight: 400; font-size: 13px; opacity: .85; margin-left: 4px; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.mainnav a {
  color: #d9e8de; padding: 7px 12px; border-radius: 6px; font-size: 14px;
}
.mainnav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.mainnav a.on { background: #2e7d4f; color: #fff; font-weight: 600; }
.userbox { font-size: 13px; color: #d9e8de; }
.userbox .logout {
  margin-left: 10px; color: #fff; background: rgba(255,255,255,.15);
  padding: 5px 10px; border-radius: 6px; font-size: 12px;
}

.container { max-width: 1200px; margin: 24px auto; padding: 0 20px 60px; }
.footer { text-align: center; color: #9aa5b1; font-size: 12px; padding: 20px; }

h1.page-title { font-size: 21px; margin-bottom: 18px; color: #143d26; }
h2 { font-size: 16px; margin: 20px 0 10px; color: #143d26; }

/* カード */
.card {
  background: #fff; border: 1px solid #e2e8ee; border-radius: 10px;
  padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(20,40,60,.05);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid2, .grid4 { grid-template-columns: 1fr; } }

/* 統計カード */
.stat { text-align: center; padding: 18px 10px; }
.stat .num { font-size: 26px; font-weight: 700; color: #1a6e3c; }
.stat .label { font-size: 13px; color: #6b7683; }

/* テーブル */
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th {
  background: #eef3f0; color: #37503f; font-size: 13px; text-align: left;
  padding: 9px 10px; border-bottom: 2px solid #d5e0d9; white-space: nowrap;
}
table.list td { padding: 9px 10px; border-bottom: 1px solid #edf1f4; vertical-align: middle; }
table.list tr:hover td { background: #f8fbf9; }
.num-r { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* フォーム */
label.fl { display: block; font-size: 13px; font-weight: 600; color: #46525f; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=date],
select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c8d2db; border-radius: 6px;
  font-size: 15px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #7cc39a; border-color: #2e7d4f; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-form > div { min-width: 140px; }

.btn {
  display: inline-block; background: #2e7d4f; color: #fff; border: none;
  padding: 9px 18px; border-radius: 7px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #256a42; text-decoration: none; }
.btn-sub { background: #5b6b7c; }
.btn-sub:hover { background: #4a5866; }
.btn-danger { background: #b03a3a; }
.btn-danger:hover { background: #963030; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* フラッシュ */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.flash-ok { background: #e3f4e9; color: #1c5c36; border: 1px solid #b7dfc6; }
.flash-err { background: #fbe7e7; color: #8c2626; border: 1px solid #efc4c4; }

/* バッジ */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: #e3f4e9; color: #1c5c36; }
.badge-gray  { background: #eceff2; color: #5b6b7c; }
.badge-red   { background: #fbe7e7; color: #8c2626; }
.badge-amber { background: #fdf1dc; color: #8a5a12; }

/* ログイン画面 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #143d26; }
.login-box { background: #fff; border-radius: 14px; padding: 36px; width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-box h1 { font-size: 19px; color: #143d26; margin-bottom: 4px; text-align: center; }
.login-box p.sub { text-align: center; color: #7b8794; font-size: 13px; margin-bottom: 18px; }
.login-box .btn { width: 100%; margin-top: 16px; padding: 11px; }

/* OCR結果編集テーブル */
.ocr-table input { font-size: 14px; padding: 6px 8px; }
.hint { font-size: 12.5px; color: #6b7683; margin-top: 6px; }
.price-help { background: #eef7f1; border: 1px solid #cbe6d5; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 8px 0; }
.price-help strong { color: #1a6e3c; }
