/* NEWRECT Resale Hub - UIスタイル
   方針: 白基調 / カードUI / 大きめボタン / スマホ対応 / 広めの余白 / 状態は色とラベルで */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #1a2233;
  --ink-soft: #5b6783;
  --line: #e4e9f2;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf1ff;

  --green: #15803d; --green-bg: #e7f6ec;
  --blue: #1d4ed8;  --blue-bg: #e8effd;
  --amber: #b45309; --amber-bg: #fdf3e3;
  --red: #b91c1c;   --red-bg: #fdecec;
  --gray: #475569;  --gray-bg: #eef1f6;

  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,40,80,.06), 0 6px 20px rgba(20,40,80,.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== ヘッダー ===== */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
}
.logo { font-weight: 800; font-size: 19px; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--brand); }
.logo small { display:block; font-size: 11px; color: var(--ink-soft); font-weight: 600; letter-spacing:.06em; }
.topbar-spacer { flex: 1; }
.topbar-right { display:flex; align-items:center; gap:12px; font-size: 13px; color: var(--ink-soft); }

/* ハンバーガー（スマホ） */
.nav-toggle { display:none; background:none; border:1px solid var(--line); border-radius:10px;
  font-size:22px; line-height:1; padding:6px 12px; cursor:pointer; color:var(--ink); }

/* ===== ナビ ===== */
.nav {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 0 14px 10px;
}
.nav a {
  display: inline-flex; align-items:center; gap:6px;
  padding: 8px 14px; border-radius: 999px;
  color: var(--ink-soft); font-weight: 600; font-size: 14px;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration:none; }
.nav a.active { background: var(--brand); color:#fff; }

/* ===== レイアウト ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 24px; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--ink-soft); }

.section-title { font-size: 16px; margin: 28px 0 14px; color: var(--ink); }

/* ===== カード ===== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* 統計カード */
.stat {
  display:block; background: var(--surface); border:1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; color: inherit;
}
a.stat:hover { text-decoration:none; border-color: var(--brand); transform: translateY(-2px);
  transition: .15s; }
.stat .label { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.stat .value { font-size: 34px; font-weight: 800; margin-top: 4px; }
.stat .unit { font-size: 15px; color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
.stat.accent-blue .value { color: var(--blue); }
.stat.accent-green .value { color: var(--green); }
.stat.accent-amber .value { color: var(--amber); }
.stat.accent-red .value { color: var(--red); }

/* タイプ選択（大きいボタン） */
.type-grid { display:grid; gap:16px; grid-template-columns: repeat(2, 1fr); }
.type-card {
  display:block; padding: 24px; border:2px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: inherit;
}
.type-card:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration:none; }
.type-card .t { font-size: 19px; font-weight: 800; }
.type-card .d { color: var(--ink-soft); margin-top: 6px; font-size: 14px; }
.type-card .go { color: var(--brand); font-weight: 700; margin-top: 12px; display:inline-block; }

/* ===== ボタン ===== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; cursor: pointer; background: var(--gray-bg); color: var(--ink);
}
.btn:hover { text-decoration:none; filter: brightness(.98); }
.btn.primary { background: var(--brand); color:#fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background:#fff; border-color: var(--line); color: var(--ink); }
.btn.lg { padding: 16px 28px; font-size: 16px; width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn-row { display:flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ===== フォーム ===== */
.form-row { margin-bottom: 18px; }
.form-row label.field-label { display:block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.form-row .hint { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=number], input[type=password], input[type=url],
select, textarea {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background:#fff; color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { min-height: 88px; resize: vertical; }
input[type=file] { padding: 10px; }

/* チェックボックス群（付属品など） */
.checks { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:10px; }
.checks li { }
.checks li label { display:flex; align-items:center; gap:8px; padding: 10px 14px;
  border:1px solid var(--line); border-radius: 999px; cursor:pointer; font-size:15px; background:#fff; }
.checks li input { width:auto; }
.checks li input:checked + span { font-weight: 700; color: var(--brand-dark); }

/* ===== テーブル ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border:1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #fafbfe; color: var(--ink-soft); font-weight: 700; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbff; }

/* ===== バッジ ===== */
.badge { display:inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.blue  { background: var(--blue-bg);  color: var(--blue); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red   { background: var(--red-bg);   color: var(--red); }
.badge.gray  { background: var(--gray-bg);  color: var(--gray); }

/* ===== フラッシュ ===== */
.flashes { margin-bottom: 18px; display:grid; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.flash.success { background: var(--green-bg); color: var(--green); }
.flash.error   { background: var(--red-bg); color: var(--red); }
.flash.info    { background: var(--blue-bg); color: var(--blue); }

/* ===== 空状態 ===== */
.empty { text-align:center; padding: 48px 20px; color: var(--ink-soft); }
.empty .ico { font-size: 40px; }

/* ===== お知らせ／プレースホルダー ===== */
.notice { background: var(--brand-soft); border:1px solid #cfe0ff; border-radius: var(--radius);
  padding: 28px; text-align:center; }
.notice .ico { font-size: 44px; }
.notice h2 { margin: 10px 0 6px; }
.notice p { color: var(--ink-soft); margin: 0; }

/* サムネ */
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border:1px solid var(--line); background:#fafafa; }
.thumb-ph { width:46px; height:46px; border-radius:10px; border:1px dashed var(--line);
  display:flex; align-items:center; justify-content:center; color:var(--ink-soft); font-size:18px; }

/* ===== フッター ===== */
.foot { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; color: var(--ink-soft); font-size: 13px; }

/* ===== ログイン ===== */
.login-wrap { min-height: 80vh; display:flex; align-items:center; justify-content:center; }
.login-card { width: 100%; max-width: 380px; }
.login-card .logo { text-align:center; margin-bottom: 18px; font-size: 22px; }

/* ===== レスポンシブ ===== */
@media (max-width: 820px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { font-size: 16px; padding: 12px 14px; }
}
