:root {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Yu Gothic', sans-serif;
  color: #243349;
  background: #f4f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  background: #16395d;
  color: white;
  padding: 16px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header b { font-size: 18px; }
nav a {
  color: #e2e8f0;
  text-decoration: none;
  margin-left: 18px;
  font-weight: 500;
}
nav a:hover { color: white; text-decoration: underline; }
main {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px;
}
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 3px 18px rgba(22, 57, 93, 0.08);
  padding: 24px;
  margin-bottom: 20px;
}
h1 { font-size: 22px; margin-top: 0; }
h2 { font-size: 18px; margin-top: 0; margin-bottom: 14px; }
h3 { font-size: 16px; margin-top: 0; }
input, select, button, textarea {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid #cbd6e3;
  border-radius: 7px;
  margin: 3px;
}
input, select, textarea {
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #1768aa;
  box-shadow: 0 0 0 3px rgba(23, 104, 170, 0.15);
}
button {
  cursor: pointer;
  background: #1768aa;
  color: white;
  border: 0;
  font-weight: 500;
  transition: background 0.15s ease;
}
button:hover { background: #13558c; }
button.secondary { background: #60758b; }
button.secondary:hover { background: #4a5c6e; }
button.danger { background: #c5221f; }
button.danger:hover { background: #a31916; }
button.success { background: #137333; }
button.success:hover { background: #0d5625; }

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hidden { display: none !important; }
.muted { color: #6b7a8c; }
.small { font-size: 12px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
td, th {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e6edf5;
  font-size: 14px;
}
th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}
tr:hover { background: #f8fafc; }
.click { cursor: pointer; color: #1768aa; }
.status {
  padding: 12px;
  color: #1768aa;
  font-weight: 500;
  white-space: pre-wrap;
  margin-top: 10px;
}

/* ナビゲーションタブ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #cbd6e3;
  margin-bottom: 18px;
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  color: #60758b;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
}
.tab-btn:hover {
  background: #eef5fc;
  color: #1768aa;
}
.tab-btn.active {
  color: #1768aa;
  border-bottom: 3px solid #1768aa;
  background: white;
}

/* バッジスタイル */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  background: #e8f0fe;
  color: #1768aa;
  font-weight: 600;
}
.badge-active { background: #e6f4ea; color: #137333; }
.badge-suspended { background: #fce8e6; color: #c5221f; }
.badge-pending { background: #fef7e0; color: #b06000; }

.badge-received { background: #e8f0fe; color: #1a73e8; }
.badge-confirmed { background: #e6f4ea; color: #137333; }
.badge-needs_review { background: #fef7e0; color: #b06000; }
.badge-cancelled { background: #fce8e6; color: #c5221f; }

.badge-published { background: #e6f4ea; color: #137333; }
.badge-draft { background: #f1f3f4; color: #5f6368; }
.badge-withdrawn { background: #fce8e6; color: #c5221f; }

/* ツールバー & パネル */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid #e6edf5;
  margin-bottom: 12px;
}
.panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

/* モーダル */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal-content {
  background: white;
  padding: 24px;
  border-radius: 10px;
  max-width: 600px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
