/* ===== Reset / Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,"Noto Sans JP",sans-serif;
  color: #1a1a1a;
  background: #f7f8fa;
  line-height: 1.6;
}

/* ===== Layout ===== */
.header {
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header h1 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}
.header .nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.header .nav a {
  display: inline-block;
  padding: 8px 12px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 8px;
}
.header .nav a:hover { background: #1f2937; color: #fff; }

.container {
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(17,24,39,0.04);
  padding: 18px;
  margin-bottom: 18px;
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 12px 0;
}
.card .muted { color: #6b7280; font-size: 0.92rem; }

/* ===== Form ===== */
.form-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; margin-bottom: 12px; align-items: center; }
.form-row label { color: #374151; font-weight: 600; }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
}
.textarea { min-height: 120px; resize: vertical; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1e40af; }

.btn-ghost { background: #fff; border-color: #d1d5db; color: #111827; }
.btn-ghost:hover { background: #f3f4f6; }

.btn-danger { background: #dc2626; color:#fff; }
.btn-danger:hover { background: #991b1b; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}
.table tr:hover td { background: #f9fafb; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid;
}
.alert-info { background: #eff6ff; border-color:#bfdbfe; color:#1e3a8a; }
.alert-success { background: #ecfdf5; border-color:#a7f3d0; color:#065f46; }
.alert-danger { background: #fef2f2; border-color:#fecaca; color:#7f1d1d; }

/* ===== Helpers ===== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color:#6b7280; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: .85rem; border:1px solid #e5e7eb; background:#f9fafb;
}

/* ===== Login ===== */
.login-wrap {
  max-width: 420px;
  margin: 80px auto;
}
.login-title { text-align:center; margin-bottom: 16px; }
