/* 完了ボタン（オレンジ系/色弱配慮） */
.btn-warning {
  background-color: #ffb347 !important;
  border-color: #ff9800 !important;
  color: #fff !important;
}
.btn-warning:disabled, .btn-warning.disabled {
  background-color: #ffe0b2 !important;
  border-color: #ff9800 !important;
  color: #b36b00 !important;
  opacity: 1 !important;
}
/* テーブル全体 */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-fixed {
  width: 100%;
  background: #fbfbfd;
  margin: 1.2em 0;
  border-radius: 6px;
  box-shadow: 0 4px 16px 2px #ddd;
  overflow-x: auto;
}
/* テーブル縦線（色弱配慮: 高コントラスト点線） */
.table-fixed th,
.table-fixed td {
  border-right: 2px dotted #555A60;
  border-left: none;
  /* 右端のセルは線を消す */
}
.table-fixed th:last-child,
.table-fixed td:last-child {
  border-right: none;
}
/* 列幅指定 */
.table-fixed thead th.col-country,
.table-fixed tbody td.col-country,
.table-fixed thead th.col-commit,
.table-fixed tbody td.col-commit,
.table-fixed thead th.col-copy,
.table-fixed tbody td.col-copy,
.table-fixed thead th.col-source,
.table-fixed tbody td.col-source {
  width: 6em;
  min-width: 5em;
}
.table-fixed thead th.col-address,
.table-fixed tbody td.col-address {
  width: 40%;
  white-space: normal;
  word-break: break-word;
}
.admin-log-table td.col-alias,
.admin-log-table th.col-alias {
  width: 45em;
  word-break: break-all;
  white-space: normal;
}
/* 完了＝グレー、編集可＝白＋左枠線（縦線と重ならないようz-index） */
.table.table-fixed tr.complete > td,
.table.table-fixed tr.complete > th {
  background-color: #e9ecef !important;
  border-left: 6px solid #818d98 !important;
  position: relative;
  z-index: 1;
}
.table.table-fixed tr.editable > td,
.table.table-fixed tr.editable > th {
  background-color: #fff;
  border-left: 6px solid #0d6efd !important;
  position: relative;
  z-index: 1;
}
/* 選択状態の強調（色＋下線） */
.table.table-fixed tr.selected > td,
.table.table-fixed tr.selected > th {
  outline: 3px dashed #fd7e14 !important;
  outline-offset: -2px;
  text-decoration: underline wavy #fd7e14 2px;
}

/* コピーなどのボタン横並び調整 */
.table .btn {
  white-space: nowrap;
  min-width: 4em;
  border-width: 2px;
}
/* ボタンの下線装飾 */
.btn-outline-secondary {
  text-decoration: underline;
}
/* btn-outline-info: 高コントラスト青緑系 */
.btn-outline-info {
  color: #009688 !important;
  border-color: #009688 !important;
  background-color: #fff !important;
  text-decoration: underline;
}
.btn-outline-info:hover, .btn-outline-info:focus {
  color: #fff !important;
  background-color: #009688 !important;
  border-color: #009688 !important;
}
/* 入力欄の枠線強調 */
input[type="number"], input[type="text"] {
  border-width: 2px;
  border-style: solid;
}
/* チェックボックス大きく */
.form-check-input {
  width: 1.3em;
  height: 1.3em;
  border-width: 2px;
}
/* アクセシビリティ: フォーカス時の強調 */
button:focus, input:focus, .form-check-input:focus {
  outline: 3px solid #0dcaf0 !important;
  outline-offset: 2px;
}
/* メッセージアイコンの余白調整 */
.alert svg {
  vertical-align: middle;
  margin-right: 0.2em;
}

/* 申請人（青系） */
.db-section-applicant {
  background: #e3f2fd !important;
  border-left: 10px solid #0d6efd !important;
  transition: background 0.4s, border 0.4s;
}
/* 発明者（緑系） */
.db-section-inventor {
  background: #e0f7fa !important;
  border-left: 10px solid #009688 !important;
  transition: background 0.4s, border 0.4s;
}

/* 管理画面ログテーブル: 高コントラスト青系アクセント＋識別的な枠線/装飾 */
.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.96em;
  color: #222;
}
.admin-log-table th, .admin-log-table td {
  border: 2px dotted #3e495a;       /* 点線で列を明示（コントラスト配慮） */
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  background: #fff;
}
.admin-log-table th {
  background: #e3eafc;              /* 明るい青: 高コントラスト */
  color: #293352;
  border-bottom: 3px solid #1976d2; /* 下線でhead強調 */
  position: sticky; top: 0; z-index: 2;
}
.admin-log-table tr:nth-child(odd) {
  background-color: #f7fafd;        /* 薄い青 */
}
.admin-log-table tr:hover {
  background-color: #e0f2f1;        /* 明るいシアン: 青黄弱にも見分けやすい */
}

/* createdAtは右寄せ＋フォント変化＋太字で見やすく */
.admin-log-table td.col-created {
  text-align: right;
  font-family: "Consolas", "Menlo", monospace;
  color: #0d47a1;
  font-weight: bold;
}

/* StaffId, Operation等は背景色・文字色でなく太線や記号を追加して判別補助 */
.admin-log-table th.col-operation, .admin-log-table td.col-operation {
  font-weight: 600;
}

/* applicant-alias-address, detail等の長文折り返し */
.admin-log-table td.col-alias,
.admin-log-table td.col-detail {
  word-break: break-word;
  max-width: 22em;
}

.admin-log-table th.col-db,
.admin-log-table td.col-db {
  width: 3em;
  white-space: nowrap;
  text-align: center; /* DB列の場合中央寄せもおすすめ */
}

/* 完了＝グレー＋両側太枠・点線下線併用 */
.admin-log-table tr.complete > td,
.admin-log-table tr.complete > th {
  background-color: #eceff1 !important;
  border-left: 6px solid #616161 !important;
  border-right: 6px double #616161 !important;
  text-decoration: underline wavy #616161 2px;
}

.admin-log-search {
  margin-bottom: 1em;
}

/* 検索フォーム（ラベル: 黒-青） */
.admin-log-search label {
  font-weight: 500; color: #1976d2; margin-right: 0.6em;
  text-shadow: 0 1px 0 #fff;        /* 輪郭で強調 */
}

/* フォーム要素: 青＋グレー中心 */
.admin-log-search input, .admin-log-search select {
  font-size: 1em;
  padding: 0.28em 0.7em;
  border-radius: 3px;
  border: 2px solid #3e495a;
  background: #f7fafd;
  color: #222;
}

/* ボタン: オレンジではなく青紫系でコントラストUP＋太字＋下線 */
.admin-log-search button {
  background: #3f51b5;
  color: #fff;
  font-weight: bold;
  border: none;
  padding: 0.5em 2.5em;
  border-radius: 3px;
  box-shadow: 1px 1px 5px #9fa8da55;
  text-decoration: underline;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-log-search button:active { background: #283593; }

/* 高コントラスト：アクティブや選択時は太線・下線・アイコン併用 */
.admin-log-table tr.selected > td, .admin-log-table tr.selected > th {
  outline: 4px dashed #1976d2 !important;
  outline-offset: -2px;
  text-decoration: underline wavy #1976d2 2.5px;
  font-weight: bold;
}

/* フォーカス時（色だけに頼らず太線） */
button:focus, input:focus, select:focus { outline: 3px solid #1976d2 !important; outline-offset: 2px; }

@media (max-width: 900px) {
  .admin-log-table th, .admin-log-table td { font-size: 0.92em; }
  .admin-log-search { flex-direction: column; gap: 0.5em;}
}

.admin-title {
  font-size: 1.5em; font-weight: bold;
  color: #293352; letter-spacing: 0.015em;
  margin-top: 0.3em; margin-bottom: 1em;
  border-left: 10px solid #1976d2;
  padding-left: 0.5em;
  background: linear-gradient(90deg, #e3eafc 85%, #fff 100%);
}

#pagination { margin-top: 16px; }
#pagination .btn[disabled] { opacity: .65; }