/* Site02.master / MAINMENU.aspx 風 */

/* 縦スクロールバーの出し入れで 100vw と実幅がずれ、中央寄せキャンバスが横に跳ねるのを抑える */
html {
    scrollbar-gutter: stable;
}

.site02-shell {
    --site02-canvas-max: 1600px;
    font-family: 'Noto Sans JP', sans-serif;
    min-height: 100vh;
    background-color: #e8edf3;
    box-sizing: border-box;
}

/* PC: ヘッダー〜本文を同一幅のカラムにまとめ、左右に余白（既存の「窓」レイアウトに近づける） */
.site02-canvas {
    max-width: var(--site02-canvas-max);
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 90vh;
    /* 本文の高さ変化でキャンバス外へはみ出してウィンドウスクロールが出ないようにする */
    overflow: hidden;
}

/* max-height 内で縮められるとヘッダー／ナビの高さが数 px 変わって見えるため縮小しない */
.site02-canvas > .site02-bar-dark,
.site02-canvas > .site02-bar-nav {
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .site02-canvas {
        box-shadow: 0 0 28px rgba(15, 35, 70, 0.07);
        border-left: 1px solid #d8dee8;
        border-right: 1px solid #d8dee8;
    }
}

.site02-main-body {
    position: relative;
    z-index: 0;
    flex: 1 1 auto;
    width: 100%;
    padding: 10px 16px 70px;
    box-sizing: border-box;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* スクロールはヘッダー外の本文だけに閉じ、ヘッダー帯の幅・位置が安定する */
    overflow-x: hidden;
    overflow-y: auto;
}

/* レポート画面: 縦スクロールはグリッド内に閉じ、下余白を抑える */
.site02-main-body:has(.rpt-h2-root) {
    padding-bottom: 8px;
    overflow-y: hidden;
}

/* ---- 第1段ヘッダー（3列：左タイトル / 中央画面名 / 右ユーザー＋ログアウト） ---- */
.site02-bar-dark {
    position: relative;
    z-index: 1150;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    height: 40px;
    width: 100%;
    padding: 0 14px;
    box-sizing: border-box;
    background-color: #2c5282;
    color: #fff;
    font-family: "Meiryo UI", Meiryo, "メイリオ", sans-serif;
}

.site02-header-left {
    justify-self: start;
    min-width: 0;
    font-size: 12pt;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.site02-header-center {
    justify-self: center;
    text-align: center;
    font-size: 12pt;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
    padding: 0 4px;
}

.site02-header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

/* メインメニュー非表示時も幅を確保し、ユーザー名〜ログアウトの相対位置を固定 */
.site02-header-mainmenu-slot {
    flex: 0 0 118px;
    width: 118px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.site02-header-user {
    font-size: 12pt;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    max-width: 300px;
}

.site02-mainmenu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 30px;
    min-width: 118px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.35);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site02-mainmenu-btn:hover {
    background: #fff;
    color: #2c5282;
}

.site02-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    height: 30px;
    min-width: 110px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.35);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site02-logout-btn:hover {
    background: #fff;
    color: #2c5282;
}

.site02-logout-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
}

/* ---- 第2段ナビ（項目幅＋右余白カラム。件数は AppTopNav に依存） ---- */
.site02-bar-nav {
    width: 100%;
    box-sizing: border-box;
    background-color: #3d6fb0;
}

.site02-bar-nav--primary {
    position: relative;
    z-index: 1150;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.38);
    border-bottom: 1px solid rgba(255, 255, 255, 0.38);
    overflow: visible;
}

.site02-nav-primary.site02-nav-primary--mega {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    min-height: 35px;
    font-size: 10pt;
    overflow: visible;
}

.site02-nav-mega-bar {
    position: relative;
    z-index: 4;
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow: visible;
}

.site02-navbar {
    margin: 0;
    padding: 0;
    position: relative;
    height: 100%;
    z-index: 1000;
}

.site02-navbar-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

.site02-nav-w-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    justify-content: stretch;
    align-items: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.38);
    overflow: visible;
}

.site02-navbar-inner > .site02-nav-w-drop:first-child {
    border-left: none;
}

.site02-link-top {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 12px;
    min-height: 35px;
    box-sizing: border-box;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    font-family: "メイリオ", Meiryo, "Meiryo UI", Arial, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Yu Gothic", "Yu Gothic UI", Osaka, sans-serif;
}

button.site02-link-top {
    width: 100%;
    margin: 0;
    border: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.site02-nav-w-drop--open > .site02-link-top {
    color: #c00;
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.06);
}

/* 現在ルートに対応するトップ項目（初期表示・ページ遷移なしでも反映） */
.site02-nav-w-drop.site02-nav-w-drop--active > .site02-link-top {
    color: #c00;
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.06);
}

.site02-navbar-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
    min-height: 100px;
    padding: 20px 0;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: -5px 9px 8px rgba(0, 0, 0, 0.35);
    white-space: normal;
    color: #000;
    font-size: 15px;
    line-height: 1.428571429;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: calc(100vw - 12px);
    overflow-x: auto;
    overflow-y: visible;
}

.site02-nav-w-drop--open .site02-navbar-drop {
    display: flex;
    pointer-events: auto;
}

.site02-mega-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: transparent;
    cursor: default;
}

.site02-navbar-col {
    flex: 0 0 316px;
    width: 316px;
    max-width: 316px;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid transparent;
    align-self: flex-start;
}

.site02-navbar-col + .site02-navbar-col {
    border-left-color: #ddd;
}

.site02-col-inner {
    position: relative;
}

.site02-nav-group-title {
    margin: 0 0 3px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
    font-family: "メイリオ", Meiryo, "Meiryo UI", Arial, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Yu Gothic", "Yu Gothic UI", Osaka, sans-serif;
}

.site02-nav-group-title:first-child {
    margin-top: 0;
}

.site02-nav-group-title div {
    margin: 0;
    padding: 0;
}

.site02-nav-sub + .site02-nav-group-title {
    margin-top: 20px;
}

/* Bootstrap .nav は flex 横並びのため付けない。縦1リンク1行に固定 */
.site02-navbar-drop .site02-nav-sub {
    display: block;
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}

.site02-navbar-drop .site02-nav-sub > li {
    display: block;
    width: 100%;
    float: none;
    clear: both;
    line-height: 1.2;
    padding: 3px 0;
    box-sizing: border-box;
}

.site02-navbar-drop .site02-nav-sublink {
    display: inline;
    color: #000;
    text-decoration: underline;
}

.site02-navbar-drop .site02-nav-sublink.site02-nav-sublink--active {
    color: #c00;
    font-weight: 700;
    background-color: #d0e8f7;
    text-decoration: underline;
}

.site02-navbar-drop .site02-nav-sublink:hover {
    color: #c00;
    background-color: #d0e8f7;
}

/* App_Styles/MenuNav.css と同じ合計幅（列 316px × n に近い） */
.site02-nav-w-drop.site02-col-1 .site02-navbar-drop {
    width: min(318px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-2 .site02-navbar-drop {
    width: min(634px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-3 .site02-navbar-drop {
    width: min(950px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-4 .site02-navbar-drop {
    width: min(1266px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-5 .site02-navbar-drop {
    width: min(1582px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-6 .site02-navbar-drop {
    width: min(1898px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-7 .site02-navbar-drop {
    width: min(2214px, calc(100vw - 12px));
}

.site02-nav-w-drop.site02-col-8 .site02-navbar-drop {
    width: min(2530px, calc(100vw - 12px));
}

.site02-nav-spacer {
    flex: 1 1 auto;
    min-width: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    background-color: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.site02-nav-spacer:only-child {
    border-left: none;
    background-color: transparent;
}

.site02-nav-empty {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 6px 16px;
    min-height: 35px;
    font-size: 10pt;
    color: rgba(255, 255, 255, 0.92);
}

.site02-nav-error {
    flex: 1 1 auto;
    padding: 8px 12px;
    font-size: 10pt;
    color: #fecaca;
    text-align: left;
}

@media (min-width: 1024px) {
    .site02-nav-primary.site02-nav-primary--mega {
        min-height: 38px;
        font-size: 11pt;
    }

    .site02-link-top {
        padding: 8px 14px;
        min-height: 38px;
    }
}

@media (max-width: 720px) {
    .site02-bar-dark {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        height: auto;
        row-gap: 8px;
        padding: 10px 12px;
    }

    .site02-header-left,
    .site02-header-center,
    .site02-header-right {
        justify-self: stretch;
        max-width: none;
    }

    .site02-header-center {
        order: -1;
    }

    .site02-header-right {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .site02-nav-primary.site02-nav-primary--mega {
        flex-wrap: wrap;
    }

    .site02-nav-spacer {
        display: none;
    }

    .site02-nav-w-drop {
        flex: 1 1 calc(50% - 1px);
        min-width: 7rem;
        max-width: none;
    }

    .site02-link-top {
        white-space: normal;
    }

    .site02-navbar-drop {
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        overflow-x: hidden;
    }

    .site02-navbar-col {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        border-left-color: transparent !important;
    }

    /* 狭い画面ではカラムを画面幅いっぱいに */
    .site02-canvas {
        max-width: none;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .site02-shell {
        background-color: #fff;
    }
}

.mm-announcement-root {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

/* ---- MAINMENU お知らせ（最大800px・中央寄せ） ---- */
.mm-select-area {
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.mm-lbl-grid {
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    margin-top: 12px;
    padding: 0 0 2px 10px;
    box-sizing: border-box;
    font-size: 18px;
    line-height: 1.25;
    border-bottom: 1px solid #000;
}

.mm-info-search {
    cursor: pointer;
    text-decoration: underline;
    color: #0055ff;
}

.mm-grid-wrap {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    --mm-grid-cols: 48px minmax(0, 1fr) 52px 52px 52px 158px;
}

.mm-grid-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(58vh, 560px);
    border: 1px solid #999;
    font-size: 12px;
    background-color: #fff;
    box-sizing: border-box;
}

.mm-grid-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.mm-grid-head {
    flex-shrink: 0;
}

.mm-grid-head,
.mm-grid-row {
    display: grid;
    grid-template-columns: var(--mm-grid-cols);
    box-sizing: border-box;
}

.mm-grid-th {
    background-color: #555;
    color: #fff;
    font-size: 11px;
    font-weight: normal;
    min-height: 40px;
    line-height: 1.2;
    padding: 4px 8px;
    border: 1px solid #666;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.mm-grid-th-subject {
    text-align: center;
}

.mm-grid-cell {
    border: 1px solid #999;
    padding: 4px 8px;
    min-height: 40px;
    line-height: 1.25;
    background-color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.mm-grid-cell.mm-col-etc {
    justify-content: center;
}

.mm-grid-cell.mm-col-time {
    justify-content: flex-start;
}

.mm-grid-cell.mm-col-title {
    justify-content: flex-start;
}

.mm-grid-cell-subject {
    min-width: 0;
}

.mm-grid-cell-subject .mm-grid-cell-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-grid-row-empty {
    grid-template-columns: 1fr;
}

.mm-grid-row-empty .mm-empty-cell {
    grid-column: 1 / -1;
    text-align: center;
    padding: 14px 8px;
    min-height: auto;
    height: auto;
    white-space: normal;
    color: #333;
    justify-content: center;
}

.mm-kbn-important {
    color: #c00;
    text-align: center;
    font-weight: bold;
    justify-content: center;
}

.mm-kbn-normal {
    text-align: center;
    justify-content: center;
}

.mm-col-title {
    text-align: left;
}

.mm-col-title.mm-title-link {
    text-decoration: underline;
    cursor: pointer;
    color: #0055ff;
}

.mm-col-etc {
    text-align: center;
}

.mm-col-time {
    text-align: left;
}

.mm-row-selected .mm-grid-cell {
    background-color: #e8f1f7 !important;
}

.mm-modal-host .modal-dialog {
    max-width: 900px;
}

.mm-modal-body-html {
    max-height: 360px;
    overflow-y: auto;
    font-size: 10pt;
}

.mm-modal-body-text {
    max-height: 360px;
    overflow-y: auto;
    font-size: 10pt;
    white-space: pre-wrap;
}
