*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans JP", "Meiryo", "Hiragino Kaku Gothic ProN", "MS PGothic", sans-serif;
  background: #dfeaf2;
  min-height: 100vh;
  min-width: 1220px;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #333;
}

/* ===== ヘッダー ===== */
.header {
  background: linear-gradient(to right, #123559, #2a80b9);
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 21px;
  flex-shrink: 0;
}
.header__title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.41);
  white-space: nowrap;
}
.header__manuals {
  display: flex;
  gap: 10px;
}
.btn-manual {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #123559;
  border: 1px solid #123559;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 14px;
  height: 40px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn-manual:hover { background: #1a4a78; }
.btn-manual .icon { font-size: 16px; }

/* ===== サブヘッダー ===== */
.sub-header {
  background: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.25);
  padding: 15px 15px 15px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 12px 0 12px;
}
.sub-header__left {
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.sub-header__title {
  font-size: 28px;
  font-weight: 700;
  color: #123559;
}
.sub-header__subtitle {
  font-size: 24px;
  font-weight: 700;
  color: #123559;
}
.sub-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0079c9;
  border: 1px solid #0079c9;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 16px;
  height: 40px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-download:hover { background: #005fa3; }
.info-table {
  border-collapse: collapse;
}
.info-table th, .info-table td {
  border: 1px solid #9c9c9c;
  padding: 4px 10px;
  font-size: 14px;
  text-align: center;
}
.info-table th {
  background: #c8e9ff;
  font-weight: 400;
  white-space: nowrap;
}
.info-table td { background: #fff; }

/* ===== メインレイアウト ===== */
.main-layout {
  display: flex;
  flex: 1;
  margin: 12px;
  gap: 0;
}

/* ===== サイドバー ===== */
.sidebar {
    width: 230px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.25);
    flex-shrink: 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.sidebar__header {
  background: #123559;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  padding: 16px 16px;
  height: 63px;
      text-align: center;
}
.sidebar__back-bar {
  background: #fff;
  display: flex;
  justify-content: flex-end;
  padding: 5px 10px;
  border-bottom: 1px solid #dde6ed;
}
.sidebar__back-btn {
  background: none;
  border: 1px solid #0079c9;
  border-radius: 6px;
  color: #0079c9;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.sidebar__back-btn:hover {
  background: #e8f4fc;
}

.sidebar__section-label {
  background: #c8e9ff;
  color: #1d477d;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  padding: 6px 10px;
  border-top: 1px solid #c4e0e3;
}
.sidebar__items {
    overflow-y: auto;
    
    flex: 1;
  
}
.sidebar__item-box {
    position: absolute;
    top: 193px;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow-y: auto;
}
/* 連合会エリア非表示時（Syokoモード）用 */
.sidebar__item-box--compact {
    top: 100px;
}
.sidebar__item {
  display: flex;
  align-items: center;
  margin: 10px 13px;
  padding: 0 10px;
  height: 40px;
  border: 2px solid #0079c9;
  border-radius: 10px;
  color: #0079c9;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__item:hover { background: #e8f4fc; }
.sidebar__item.active {
  background: #0079c9;
  color: #fff;
}

/* ===== コンテンツエリア ===== */
.content-area {
  flex: 1;
  background: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.25);
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.content-header {
  padding: 16px 15px 0;
}
.content-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
     margin-bottom: 15px;
  border-bottom: 2px #123559 solid;
  padding-bottom: 10px;
}
.content-title-accent {
  width: 7px;
  height: 29px;
  background: #123559;
  border-radius: 1px;
  flex-shrink: 0;
}
.content-title {
  font-size: 25px;
  font-weight: 700;
  color: #123559;
}

/* ===== タブ ===== */
.tab-nav {
  display: flex;
  gap: 10px;
  padding: 0 15px 15px;
}
.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border: 2px solid #0079c9;
  border-radius: 10px;
  background: #fff;
  color: #0079c9;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover { background: #e8f4fc; }
.tab-btn.active {
  background: #0079c9;
  color: #fff;
}

/* ===== タブコンテンツ ===== */
.tab-content { display: none; flex: 1; flex-direction: column; }
.tab-content.active { display: flex; padding: 0px 15px 0;}

/* ===== セクションバー ===== */
.section-bar {
  background: #123559;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 45px;
  margin: 0 0 0;
}
.section-bar__title {
  font-size: 20px;
  font-weight: 700;
}
.section-bar__meta {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== アクションバー ===== */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: right;
  padding: 15px 0px 15px 16px;
  background: #fff;
}
.action-bar__warning {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dd5c00;
  font-size: 14px;
  font-weight: 700;
}
.action-bar__warning .warn-icon { font-size: 18px; }
.btn-save {
    background: #f58f00;
    border: 1px solid #f58f00;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 0 77px;
    height: 45px;
    /* cursor: default; */
    transition: background 0.15s, border-color 0.15s;
}
.btn-save.has-changes {
  background: #f58f00;
  border-color: #f58f00;
  cursor: pointer;
}
.btn-save.has-changes:hover { background: #d97c00; border-color: #d97c00; }

.btn-save:disabled,
.btn-save[disabled] {
    background: #b0b8c1;
    border-color: #b0b8c1;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== テーブルラッパー ===== */
.table-wrapper {
  overflow-x: auto;
}
.table-wrapper--scroll {
    max-height: 500px;
    overflow-x: auto;
    overflow-y: auto;
}
.table-wrapper--scroll2 {
    max-height: 500px;
    overflow-x: auto;
    overflow-y: auto;
}

.table-wrapper--scroll .data-table thead th,
.table-wrapper--scroll2 .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    /* border-collapse:collapse で sticky 時に上枠が消えるバグの回避 */
    /*box-shadow: inset 0 1px 0 #9c9c9c, inset 0 -1px 0 #9c9c9c;*/
}

/* 2行ヘッダの2行目を1行目の下に固定 */
.table-wrapper--scroll .data-table thead tr:nth-child(2) th,
.table-wrapper--scroll2 .data-table thead tr:nth-child(2) th {
    top: var(--thead-row1-height, 46px);
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    white-space: nowrap;
    table-layout: fixed;
}
.data-table th {
  background: #c8e9ff;
  border: 1px solid #9c9c9c;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  height: 54px;
}
.data-table td {
  border: 1px solid #9c9c9c;
  padding: 1px;
  height: 37px;
  vertical-align: middle;
}
.cell-input {
  height: 33px;
  border: 1px solid #d5deea;
  border-radius: 3px;
  padding: 0 8px;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
  background: #fff;
  outline: none;
  width: 100%;
}
.cell-input:focus { border-color: #0079c9; }
.cell-input.modified { background: #fafad2; }
.cell-select.modified { background: #fafad2; }

/* ===== テーブル下部ボタン ===== */
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 0px 10px 16px;
}
.btn-row-add, .btn-row-del {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  color: #fff;
  background: #7a8795;
}
.btn-row-add:hover, .btn-row-del:hover { background: #5a6775; }
.btn-row-add:disabled,
.btn-row-add[disabled] {
  background: #b0b8c1;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== タブ3 職名別集計 ===== */
.summary-section {
  margin-top: 20px;
  padding-bottom: 15px;
}
.summary-section__title {
  font-size: 15px;
  font-weight: 700;
  color: #123559;
  margin-bottom: 10px;
}
.summary-table {
  border-collapse: collapse;
  font-size: 14px;
}
.summary-table th,
.summary-table td {
  border: 1px solid #ccc;
  padding: 4px 20px 4px 12px;
  background: #E9F6FF;
}
.summary-table th {
  background: #c8e9ff;
  text-align: center;
  font-weight: 700;
}
.summary-table .sum-count {
  text-align: right;
  min-width: 60px;
  background: #fff;
}
.summary-total-row td {
  background: #c8e9ff;
  font-weight: 700;
}

/* ===== フッター ===== */
.footer {
  background: #123559;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer p { font-size: 14px; color: #fff; }

/* ===== ビューパネル ===== */
.view-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 954px;
  overflow: hidden;
}

/* ===== チェックボックス列（削除モード時） ===== */
.checkbox-cell { text-align: center; width: 36px; }
.checkbox-cell input[type="checkbox"] {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #D5DEEA;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}
.checkbox-cell input[type="checkbox"]:checked {
  background-color: #fff;
  border-color: #DD5C00;
}
.checkbox-cell input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 6px;
  height: 9px;
  border: solid #DD5C00;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ===== タブ4：テーブル内セレクト ===== */
.select-cell {
  position: relative;
}
.cell-select {
  height: 33px;
  border: none;
  padding: 0 28px 0 8px;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  border: 1px solid #d5deea;
  border-radius: 3px;
  width: 100%;
}
.select-cell::after {
  color: #555;
  pointer-events: none;
  content: '';
  position: absolute;
  top: 50%;
  right: 15px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #7A8795;
  border-right: 2px solid #7A8795;
  transform: translateY(-50%) rotate(135deg);
  border-radius: 1px;
}

/* ===== タブ4：フィルター行（セレクト＋注意書き） ===== */
.tab4-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.tab4-notice {
  font-size: 13px;
  color: #c05000;
  line-height: 1.7;
  border-left: 3px solid #f58f00;
  padding: 4px 10px;
  background: #fff8f0;
  align-self: center;
  white-space: nowrap;
}

/* ===== タブ4：商工会コード絞り込みエリア ===== */
.tab4-filter {
  gap: 0;
  padding: 0px 16px 0px 0px;
  display: flex;
  align-items: stretch;
  border: 1px solid #9c9c9c;
  max-width: 660px;
  margin-bottom: 0;
}
.tab4-filter__label {
  background-color: #c8e9ff;
  padding: 0px 19px;
  border-right: 1px solid #9c9c9c;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}
.tab4-filter .select-wrapper {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff;
  gap: 15px;
}
.tab4-filter .select-wrapper::after {
  color: #555;
  pointer-events: none;
  content: '';
  position: absolute;
  top: 50%;
  right: 30px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #7A8795;
  border-right: 2px solid #7A8795;
  transform: translateY(-50%) rotate(135deg);
  border-radius: 1px;
}
.tab4-filter__select {
  color: #333;
  background: #fff;
  cursor: pointer;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background-color: #fff;
  -webkit-appearance: none;
  font-size: 14px;
  outline: none;
}
.tab4-filter__select:focus { border-color: #0079c9; }
.btn-select {
    align-self: center;
    height: 36px;
    margin-left: 10px;
    padding: 0 34px;
    background: #0079c9;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    white-space: nowrap
}
.btn-select:hover { background: #005fa3; }
.btn-select:disabled,
.btn-select[disabled] {
  background: #b0b8c1;
  border-color: #b0b8c1;
  color: #fff;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== kenren_select ===== */
.btn-logout {
  background: #7a8795;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  height: 42px;
  cursor: pointer;
  width: 157px;
}
.btn-logout:hover { background: #5a6775; }

.btn-back-menu {
  background: #5a7fa0;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  height: 42px;
  cursor: pointer;
  width: 157px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;    
}

.btn-back-menu:hover {
    background: #3d6080;
}


.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 1220px;
    margin: 0 auto;
}
.content-card {
  background: #fff;
  max-width: 1220px;
  margin: 0 auto;
  padding: 32px 40px 40px;
}

.select-table {
  border-collapse: collapse;
  width: 925px;
  margin: 0 auto;
  font-size: 14px;
}
.select-table thead tr {
  background: #c8e9ff;
}
.select-table th {
  border: 1px solid #9c9c9c;
  padding: 14px 16px;
  text-align: center;
  white-space: nowrap;
  color: #333;
  font-size: 16px;
  font-weight: normal;
}
.select-table tbody tr:nth-child(odd) {
  background: #fff;
}
.select-table tbody tr:nth-child(even) {
  background: #e9f6ff;
}
.select-table td {
  border: 1px solid #9c9c9c;
  padding: 11px 16px;
  vertical-align: middle;
  text-align: center;
  font-size: 16px;
}
.td-code {
  text-align: center;
  width: 194px;
  font-weight: 500;
}
.td-name {
  width: 480px;
}
.td-action {
  width: 252px;
  text-align: center;
}
.select-table .btn-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0079c9;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  padding: 0 20px;
  height: 38px;
  width: 158px;
  cursor: pointer;
  white-space: nowrap;
}
.select-table .btn-select:hover { background: #005ea3; }

/* ===== login ===== */
.card-wrapper {
  display: flex;
  width: 1220px;
  background-color: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-panel {
  width: 610px;
  background: linear-gradient(to bottom, rgba(12, 110, 174, 0.75), rgba(115, 180, 223, 0.75));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-form-box {
  background: #fff;
  border-radius: 5px;
  padding: 40px 48px 48px;
  width: 100%;
  max-width: 495px;
}

.login-form-box__title {
  font-size: 23px;
  font-weight: 700;
  color: #123559;
  text-align: center;
  margin-bottom: 28px;
}

.login-form-msg {
    margin-bottom: 6px;
    font-size: 15px;
    color: #FF0000;
    text-align: center;
}


.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  height: 44px;
  border: 2px solid #7a8795;
  border-radius: 5px;
  padding: 0 12px;
  font-size: 15px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #0079c9;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  color: #555;
  pointer-events: none;
  content: '';
  position: absolute;
  top: 44%;
  right: 15px;
  width: 17px;
  height: 17px;
  border-top: 4px solid #7A8795;
  border-right: 4px solid #7A8795;
  transform: translateY(-50%) rotate(135deg);
  border-radius: 2px;
}

.btn-login {
  display: block;
  width: 100%;
  height: 55px;
  margin-top: 28px;
  background-color: #0079c9;
  color: #fff;
  font-size: 18px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn-login:hover { background-color: #005fa3; }
.btn-login:active { opacity: 0.85; }

.info-panel {
  width: 610px;
  background-color: #fff;
  padding: 30px 30px 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.info-card {
  background: #fff;
  padding: 24px 32px 28px;
}

.info-card__title {
  font-size: 23px;
  font-weight: 700;
  color: #123559;
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 15px;
  position: relative;
}

.info-card__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(to right, transparent 0%, #3e8abf 50%, transparent 100%);
}

.info-card__body {
  font-size: 15px;
  color: #333;
  line-height: 1.75;
}

.contact-list {
  font-size: 15px;
  color: #333;
  line-height: 1.75;
  width: 360px;
  margin: 0 auto;
}

.contact-list .org-name { margin-bottom: 6px; }

.contact-list .contact-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.contact-list .contact-item .icon {
  font-size: 13px;
  flex-shrink: 0;
}

.contact-list .note {
  margin-top: 8px;
  font-size: 14px;
}

.contact-list .support-hours { font-size: 14px; }

.contact-item a {
    color: #333333;
    text-decoration: none;
}