/* =========================
   行ハイライト（既存）
========================= */
.transfer-schedule tbody tr:hover td.editable {
    background-color:#f0f9fa;
    z-index:5;
}

/* =========================
   縦列ハイライト
========================= */
.transfer-schedule td.col-hover,
.transfer-schedule th.col-hover {
    background-color:#eefcff;
    z-index:6;
}

/* =========================
   スクロール用ラッパー
========================= */
.transfer-schedule-wrapper {
    overflow-x:auto;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    display:block;
    width:100%;
    max-height:70vh;
    position:relative;
    border:1px solid #ccc;
    border-radius:6px;
    padding:10px;
    background:#fff;
}

/* =========================
   テーブル基本
========================= */
.transfer-schedule {
    width:max-content;
    min-width:100%;
    font-family:"Yu Gothic",sans-serif;
    font-size:13px;
    border-collapse:collapse;
    margin:0 auto;
}

.transfer-schedule th,
.transfer-schedule td {
    border:1px solid #ccc;
    padding:3px;
    text-align:center;
    width:28px;
    min-width:28px;
    white-space:nowrap;
    transition:background-color 0.15s;
}

/* =========================
   ヘッダー基本
========================= */
.transfer-schedule th.date-top {
    background:#f5f5f5;
    font-weight:bold;
    color:#363636;
}

.transfer-schedule th.weekday {
    font-size:11px;
    color:#666;
    background:#fafafa;
}

/* =========================
   thead 2行 sticky（縦）
========================= */
.transfer-schedule thead tr:first-child th {
    position:sticky;
    top:0;
    z-index:5;
    background:#fff;
}

.transfer-schedule thead tr:nth-child(2) th {
    position:sticky;
    top:28px;
    z-index:5;
    background:#fff;
}

/* =========================
   本日ハイライト
========================= */
.transfer-schedule th.date-top.today,
.transfer-schedule th.weekday.today {
    background-color:#fff1e0;
}

/* =========================
   左端固定（横）
========================= */
.transfer-schedule th.sticky-left,
.transfer-schedule td.name.sticky-left {
    position:sticky;
    left:0;
    z-index:7;
    text-align:left;
    padding:3px 6px;
    font-weight:bold;
    background:#f9f9f9;
    width:170px;
}

/* =========================
   マーク表示
========================= */
.transfer-schedule td.editable {
    cursor:pointer;
    font-weight:bold;
    font-size:14px;
}

.transfer-schedule td.afterschool { color:#01acb2; } /* ● */
.transfer-schedule td.development { color:#ff8800; } /* ★ */
.transfer-schedule td.absent { color:#d00; }
.transfer-schedule td.trial { color:#ff8800; }
.transfer-schedule td.cancel { color:#9933cc; }
.transfer-schedule td.observe { color:#3366cc; }
.transfer-schedule td.contract { color:#009933; }

/* =========================
   サマリー行
========================= */
.summary-row td {
    background:#fafafa;
    font-weight:bold;
}

.summary-row td.sum-label {
    background:#f0f0f0;
}

.summary-row td.sum-cell {
    font-weight:bold;
    font-size:13px;
}

.sum-col {
    background:#fafafa;
    font-weight:bold;
}

/* =========================
   UI部品
========================= */
.transfer-schedule-nav {
    text-align:center;
    margin:10px 0;
    font-size:16px;
}

.oh-message.success {
    background:#e6f8ed;
    color:#0a6b3f;
    padding:8px;
    margin:8px 0;
    border-radius:6px;
    text-align:center;
}

.btn-save {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin:10px 0 0;
    padding:10px 18px;

    border:1px solid #A5C842;
    border-radius:0;
    background:#A5C842;
    color:#fff !important;

    cursor:pointer;
    font-size:14px;
    font-weight:800;
    line-height:1;

    transition: opacity .15s, transform .05s;
}

.btn-save:hover {
    opacity:.75;
}

.btn-save:active {
    transform: translateY(1px);
}

/* =========================================
   上部3カラム情報バー（事業所 / 定員 / 稼働率）
========================================= */
.ts-nav-row2 {
    width:100%;
}

.ts-info-bar {
    width:100%;
    display:flex;
    align-items:stretch;
    justify-content:space-between;
    border:1px solid #ccc;
    border-radius:6px;
    background:#fff;
    overflow:hidden;
    box-sizing:border-box;
}

.ts-info-col {
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:12px 16px;
    box-sizing:border-box;
    white-space:nowrap;
}

.ts-info-col:not(:last-child) {
    border-right:1px solid #ccc;
}

.ts-info-col .ts-nav-label {
    font-weight:700;
}

.ts-info-col-rate .ts-rate-box {
    font-size:18px;
    font-weight:800;
}

/* =========================================
   ナビ1段目：前月 / 今月 / 月 / 翌月、PDFは右端
========================================= */
.ts-nav-row1 {
    width:100%;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    column-gap:14px;
    margin-bottom:10px;
}

.ts-nav-left {
    justify-self:start;
}

.ts-nav-center {
    justify-self:center;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}

.ts-nav-right {
    justify-self:end;
    display:flex;
    align-items:center;
    gap:10px;
}

/* ボタン共通 */
.ts-nav-row1 .ts-nav-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 18px;
    border:1px solid #A5C842;
    border-radius:0;
    background:#A5C842;
    color:#fff !important;
    text-decoration:none;
    font-weight:800;
    font-size:14px;
    line-height:1;
    white-space:nowrap;
    transition:opacity .15s, transform .05s;
}

.ts-nav-row1 .ts-nav-link:hover {
    opacity:.75;
}

.ts-nav-row1 .ts-nav-link:active {
    transform:translateY(1px);
}

/* 念のため残す */
.ts-nav-row1 .ts-nav-link[aria-disabled="true"] {
    opacity:.25;
    pointer-events:none;
}

/* 今月ボタン */
.ts-nav-row1 .ts-nav-link-current {
    background:#8FB133;
    border-color:#8FB133;
}

/* PDFボタン */
.ts-nav-row1 .ts-nav-link-pdf {
    min-width:72px;
}

/* 月表示 */
.ts-nav-month {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 8px;
    font-size:22px;
    font-weight:900;
    letter-spacing:.02em;
    white-space:nowrap;
    color:#333;
}

/* =========================================
   レスポンシブ
========================================= */
@media (max-width: 768px) {

    .ts-info-bar {
        flex-direction:column;
    }

    .ts-info-col {
        justify-content:flex-start;
        width:100%;
        border-right:none;
    }

    .ts-info-col:not(:last-child) {
        border-right:none;
        border-bottom:1px solid #ccc;
    }

    .ts-info-col-rate {
        justify-content:flex-start;
    }

    .ts-nav-row1 {
        grid-template-columns:1fr;
        row-gap:10px;
    }

    .ts-nav-left {
        display:none;
    }

    .ts-nav-center {
        justify-self:center;
    }

    .ts-nav-right {
        justify-self:center;
    }

    .ts-nav-month {
        font-size:18px;
        min-height:auto;
    }

    .ts-nav-row1 .ts-nav-link {
        padding:9px 14px;
        font-size:13px;
    }
}

/* =========================
   印刷（PDF）用設定
========================= */
@page {
  size: A4 portrait;
  margin: 10mm;
}

/* 画面ではタイトル非表示 */
.ts-print-title {
    display:none;
}

@media print {

  /* ナビと保存など非表示 */
  .ts-nav-row1,
  .btn-save,
  .oh-message.success,
  .oh-message.error {
    display:none !important;
  }

  /* タイトル表示（中央・太く） */
  .ts-print-title {
    display:block !important;
    text-align:center;
    font-weight:900;
    font-size:18pt;
    margin:0 0 6mm 0;
  }

  /* 2段目の情報バーは「紙っぽく」中央に寄せる */
  .ts-info-bar {
    border:0 !important;
    border-radius:0 !important;
  }

  .ts-info-col {
    padding:6px 8px !important;
  }

  /* スクロール枠解除（全行出す） */
  .transfer-schedule-wrapper {
    overflow:visible !important;
    max-height:none !important;
    border:none !important;
    padding:0 !important;
  }

  /* sticky解除 */
  .transfer-schedule thead tr:first-child th,
  .transfer-schedule thead tr:nth-child(2) th,
  .transfer-schedule th.sticky-left,
  .transfer-schedule td.name.sticky-left {
    position:static !important;
    top:auto !important;
    left:auto !important;
    z-index:auto !important;
  }

  /* A4縦に収める（横幅優先で自動縮小） */
  .transfer-schedule {
    width:100% !important;
    min-width:0 !important;
    table-layout:auto;
    font-size:13pt;
    zoom:0.85;
    margin:0 auto !important;
  }

  .transfer-schedule th,
  .transfer-schedule td {
    padding:2px !important;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}