/* ==================================
   基本設定
================================== */

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    background-color: #F1F5F6;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* フォーカス表示 */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

/* プレースホルダー */

:focus::placeholder {
    color: transparent;
}

/* 数値入力のスピンボタンを非表示 */

.hide-spin::-webkit-inner-spin-button,
.hide-spin::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hide-spin {
    -moz-appearance: textfield;
}

/* ==================================
   アプリケーションレイアウト
================================== */

:root {
    --top-header-height: 72px;
    --sidebar-width: 260px;
}

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
}

/* ==================================
   上部ヘッダー
================================== */

.top-header {
    position: sticky;
    top: 0;
    z-index: 1060;
    width: 100%;
    height: var(--top-header-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    color: #fff;
    background-color: #0047b3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.top-header-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

    .top-header-brand:hover,
    .top-header-brand:focus {
        color: #fff;
        text-decoration: none;
    }

    .top-header-brand i {
        flex-shrink: 0;
        font-size: 1.7rem;
        line-height: 1;
    }

.top-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-header-user {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ==================================
   ヘッダー下のレイアウト
================================== */

.app-body {
    min-height: calc(100vh - var(--top-header-height));
    flex: 1;
    display: flex;
    align-items: stretch;
}

/* ==================================
   サイドバー
================================== */

.sidebar {
    position: sticky;
    top: var(--top-header-height);
    z-index: 1040;
    width: var(--sidebar-width);
    height: calc(100vh - var(--top-header-height));
    flex: 0 0 var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background-color: #3f3f3f;
}

.sidebar-menu {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-main-menu {
    padding-top: 14px;
}

/* 通常メニュー */

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 10px;
    padding: 12px 14px;
    color: #fff;
    background-color: transparent;
    border-radius: 5px;
    text-decoration: none;
}

    .sidebar .nav-link:hover {
        color: #fff;
        background-color: #535353;
    }

    .sidebar .nav-link.active-menu {
        color: #fff;
        background-color: #707070;
    }

    .sidebar .nav-link i,
    .sidebar-menu-label i,
    .logout-link i {
        width: 24px;
        min-width: 24px;
        font-size: 21px;
        line-height: 1;
        text-align: center;
    }

/* ==================================
   サイドバーアコーディオン
================================== */

.sidebar .accordion {
    margin-top: 2px;
}

.sidebar .accordion-item {
    background-color: #3f3f3f !important;
    border: none !important;
}

.sidebar .accordion-button,
.sidebar .accordion-button:not(.collapsed) {
    padding: 12px 24px !important;
    color: #fff !important;
    background-color: #3f3f3f !important;
    box-shadow: none !important;
}

    .sidebar .accordion-button:hover {
        background-color: #535353 !important;
    }

    .sidebar .accordion-button:focus {
        border-color: transparent;
        box-shadow: none !important;
    }

    .sidebar .accordion-button::after {
        filter: brightness(0) invert(1);
    }

.sidebar-menu-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .accordion-body {
    padding: 0 0 6px;
    background-color: #3f3f3f;
}

.menu-link {
    display: block;
    margin: 2px 10px;
    padding: 10px 14px 10px 54px;
    color: #fff;
    background-color: transparent;
    border-radius: 5px;
    text-decoration: none;
}

    .menu-link:hover {
        color: #fff;
        background-color: #535353;
    }

    .menu-link.active {
        color: #fff;
        background-color: #707070;
    }

/* ==================================
   サイドバーフッター
================================== */

.sidebar-footer {
    flex-shrink: 0;
    padding: 14px 10px;
    border-top: 1px solid #5a5a5a;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #fff;
    background-color: transparent;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
}

    .logout-link:hover {
        color: #fff;
        background-color: #535353;
    }

/* ==================================
   メインエリア
================================== */

.main-area {
    min-width: 0;
    min-height: calc(100vh - var(--top-header-height));
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.content {
    width: 100%;
    flex: 1;
    padding: 1.5rem;
    background-color: #f4f6f9;
}

.content-inner {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

/* ==================================
   ハンバーガーボタン
================================== */

.btn-menu {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

    .btn-menu:hover,
    .btn-menu:focus {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.12);
    }

/* ==================================
   サイドバーオーバーレイ
================================== */

.sidebar-overlay {
    display: none;
}

/* 通常メニュー */

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
}

    .sidebar .nav-link:hover {
        color: #fff;
        background-color: #535353;
        border-radius: 0;
    }

    /* サイドバーアイコン */

    .sidebar .nav-link i,
    .sidebar-menu-label i,
    .logout-link i {
        width: 24px;
        min-width: 24px;
        font-size: 22px;
        text-align: center;
    }

/* 選択中メニュー */

.active-menu {
    background-color: #707070;
    border-radius: 5px;
}

/* ==================================
   サイドバーアコーディオン
================================== */

.accordion-item {
    background-color: #3f3f3f !important;
    border: none !important;
}

.accordion-button,
.accordion-button:not(.collapsed) {
    padding: 12px 20px !important;
    color: #fff !important;
    background-color: #3f3f3f !important;
    box-shadow: none !important;
}

    .accordion-button:hover {
        background-color: #535353 !important;
    }

    .accordion-button::after {
        filter: brightness(0) invert(1);
    }

.sidebar-menu-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-body {
    padding: 0;
    background-color: #3f3f3f;
}

.menu-link {
    display: block;
    padding: 10px 20px 10px 56px;
    color: #fff;
    text-decoration: none;
}

    .menu-link:hover {
        color: #fff;
        background-color: #535353;
    }

    .menu-link.active {
        color: #fff;
        background-color: #707070;
    }

/* ==================================
   ログアウト
================================== */

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

    .logout-link:hover {
        color: #fff;
        background-color: #535353;
    }

/* ==================================
   ローディング
================================== */

#loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.45);
}

    /* HTMX通信中だけ表示 */
    #loading.htmx-request {
        display: flex;
    }

    /* jQueryなどからshowを付ける場合 */
    #loading.show {
        display: flex;
    }

    #loading .spinner-border {
        width: 3rem;
        height: 3rem;
    }

/* ==================================
   Sticky要素
================================== */

.sticky-header {
    position: sticky;
    top: 58px;
    z-index: 999;
    background-color: #fff;
}

.fixthead {
    position: sticky;
    top: 107px;
    z-index: 999;
    background-color: #fff;
    box-shadow: 2px 2px 2px #ccc;
}

#shainTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #0075c2;
}

/* ==================================
   既存テーブル
================================== */

.table {
    background-color: #fff;
}

td a {
    font-weight: 700;
    text-decoration: none;
}


/* ========================================
   テーブル内リンク
======================================== */
.table a {
    gap: 5px;
    padding: 4px 7px;
    border-radius: 5px;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

    /* マウスを重ねた状態 */

    .table a:hover {
        background-color: rgba(8, 104, 201, 0.10);
        box-shadow: 0 0 0 1px rgba(8, 104, 201, 0.16);
        text-decoration-color: rgba(7, 89, 170, 0.55);
        text-underline-offset: 3px;
    }

    /* クリック中の状態 */

    .table a:active {
        color: #064b91;
        background-color: rgba(8, 104, 201, 0.16);
    }

    /* キーボード操作時 */

    .table a:focus-visible {
        color: #0759aa;
        background-color: rgba(8, 104, 201, 0.10);
        outline: 2px solid rgba(8, 104, 201, 0.30);
        outline-offset: 2px;
        text-underline-offset: 3px;
    }

/* ==================================
   既存カード
================================== */

.saigaiDetail .card {
    margin: 0 0 20px;
    padding: 30px;
    background-color: #fcfcfc;
    border-radius: 10px;
}

.card:has(p.question) {
    border-left: 10px solid #5558d2;
}

.card:has(p.mark_passed) {
    border-left: 10px solid #41be41;
}

.card:has(p.mark_failed) {
    border-left: 10px solid #be4141;
}

/* ==================================
   既存見出し
================================== */

.headline-basic {
    display: inline-block;
    padding-bottom: 0.2rem;
    border-bottom: 3px solid #0075c2;
    font-size: 1.9rem;
    font-weight: 700;
}


/* ==================================
   共通ページ見出し
================================== */

.page-title-area {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
}

    /* ページ見出し右側の抽出ボタン */

    .page-title-area .filter-button {
        flex-shrink: 0;
        margin-left: auto;
    }

.page-title {
    margin: 0;
    color: #111;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.page-description {
    margin-top: 8px;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ==================================
   共通アクションボタン
================================== */

.common-action-button {
    min-width: 82px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    color: #0047b3;
    background-color: #fff;
    border: 1px solid #d6dde8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

    .common-action-button i {
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        line-height: 1;
    }

    .common-action-button span {
        line-height: 1;
    }

    .common-action-button:hover {
        color: #0047b3;
        background-color: #f4f8ff;
        border-color: #b8c7df;
        box-shadow: 0 2px 5px rgba(0, 71, 179, 0.12);
    }

/* ==================================
   マスタ一覧 共通検索パネル
================================== */

.master-search-panel {
    margin-bottom: 16px;
    padding: 18px 20px 22px;
    background-color: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.master-search-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #0047b3;
    font-size: 1.05rem;
    font-weight: 700;
}

    .master-search-title i {
        font-size: 1.15rem;
        line-height: 1;
    }

.master-search-control {
    min-height: 40px;
    color: #222;
    border-color: #d9dfe8;
    border-radius: 6px;
    font-size: 0.95rem;
}

    .master-search-control:focus {
        border-color: #6193d6;
        box-shadow: 0 0 0 0.2rem rgba(0, 71, 179, 0.12);
    }

/* キーワード検索入力 */

.master-keyword-input {
    position: relative;
}

    .master-keyword-input > i {
        position: absolute;
        top: 50%;
        left: 13px;
        z-index: 2;
        color: #66758a;
        font-size: 1rem;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .master-keyword-input .form-control {
        padding-left: 40px;
    }

/* 検索ボタン */

.master-search-button {
    min-width: 86px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    color: #fff;
    background-color: #0047b3;
    border: 1px solid #0047b3;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

    .master-search-button:hover {
        color: #fff;
        background-color: #00398f;
        border-color: #00398f;
    }

/* ==================================
   マスタ一覧 共通パネル
================================== */

.master-list-panel {
    padding: 14px 12px 16px;
    background-color: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.master-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.master-list-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* ==================================
   マスタ一覧 共通操作ボタン
================================== */

.master-action-button {
    min-width: 94px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
}

    .master-action-button i {
        font-size: 1rem;
        line-height: 1;
    }

.master-action-primary {
    color: #fff;
    background-color: #0047b3;
    border: 1px solid #0047b3;
}

    .master-action-primary:hover {
        color: #fff;
        background-color: #00398f;
        border-color: #00398f;
    }

.master-action-outline {
    color: #0047b3;
    background-color: #fff;
    border: 1px solid #b8c7df;
}

    .master-action-outline:hover {
        color: #0047b3;
        background-color: #f4f8ff;
        border-color: #0047b3;
    }

/* ==================================
   マスタ共通テーブル
================================== */

.master-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #fff;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    min-height: 180px;
}
    .master-table-wrapper .dropdown-menu {
        min-width: 140px;
        z-index: 1080;
    }

.master-table {
    width: 100%;
    margin-bottom: 0;
    color: #222;
    background-color: #fff;
    border-collapse: separate;
    border-spacing: 0;
    --bs-table-border-color: #dfe4ec;
}

    .master-table thead th {
        padding: 12px 11px;
        color: #202531;
        background-color: #f7f9fc;
        border-bottom: 1px solid #dfe4ec;
        font-size: 1.1rem;
        font-weight: 700;
        vertical-align: middle;
    }

    .master-table tbody td {
        padding: 11px;
        color: #222;
        border-bottom: 1px solid #e6e9ee;
        font-size: 1rem;
        vertical-align: middle;
    }

    .master-table tbody tr:last-child td {
        border-bottom: none;
    }

    /* 奇数行 */

    .master-table.table-striped > tbody > tr:nth-of-type(odd) > * {
        color: #222;
        background-color: #fff;
        --bs-table-accent-bg: #fff;
        --bs-table-bg-type: #fff;
    }

    /* 偶数行 */

    .master-table.table-striped > tbody > tr:nth-of-type(even) > * {
        color: #222;
        background-color: #f7f9fc;
        --bs-table-accent-bg: #f7f9fc;
        --bs-table-bg-type: #f7f9fc;
    }

    /* テーブル行のホバー色を変更しない */

    .master-table.table-striped > tbody > tr:nth-of-type(odd):hover > * {
        color: #222;
        background-color: #fff;
        --bs-table-accent-bg: #fff;
        --bs-table-bg-type: #fff;
    }

    .master-table.table-striped > tbody > tr:nth-of-type(even):hover > * {
        color: #222;
        background-color: #f7f9fc;
        --bs-table-accent-bg: #f7f9fc;
        --bs-table-bg-type: #f7f9fc;
    }

/* ==================================
   マスタ共通 件数とページ情報
================================== */

.master-result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 0 4px;
}

.master-result-count {
    margin-top: 16px;
    padding: 0 4px;
    color: #222;
    font-size: 1rem;
    font-weight: 600;
}

.master-result-footer .master-result-count {
    margin-top: 0;
    padding: 0;
}

.master-page-status {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================================
   マスタ共通ページング
================================== */

.master-pagination-container,
.master-pagination-area {
    min-width: 0;
    overflow-x: auto;
}

.master-pagination-area {
    margin-top: 18px;
    padding-bottom: 2px;
}

.master-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

    .master-pagination .page-item {
        margin: 0;
    }

    .master-pagination .page-link {
        min-width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
        color: #0047b3;
        background-color: #fff;
        border: 1px solid #d6dde8;
        border-radius: 6px;
        font-family: inherit;
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1;
        box-shadow: none;
    }

    .master-pagination button.page-link {
        cursor: pointer;
    }

    .master-pagination .page-link:hover {
        color: #0047b3;
        background-color: #f4f8ff;
        border-color: #b5c6e0;
    }

    .master-pagination .page-item.active .page-link {
        color: #fff;
        background-color: #0047b3;
        border-color: #0047b3;
    }

    .master-pagination .page-item.disabled .page-link,
    .master-pagination .page-link:disabled {
        color: #aaa;
        background-color: #f5f5f5;
        border-color: #e0e0e0;
        pointer-events: none;
    }

    .master-pagination .pagination-ellipsis {
        background-color: transparent;
        border-color: transparent;
    }

/* ==================================
   マスタ共通 検索結果なし
================================== */

.master-empty-result {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #555;
    background-color: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    text-align: center;
}

    .master-empty-result > i {
        margin-bottom: 12px;
        color: #8592a6;
        font-size: 2.4rem;
    }

.master-empty-result-title {
    color: #222;
    font-size: 1.15rem;
    font-weight: 700;
}

.master-empty-result-description {
    margin-top: 6px;
    color: #666;
    font-size: 0.9rem;
}

/* ==================================
   マスタ追加・編集画面 パンくず
================================== */

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #687386;
    font-size: 0.9rem;
    font-weight: 500;
}

    .page-breadcrumb a {
        color: #687386;
        text-decoration: none;
    }

        .page-breadcrumb a:hover {
            color: #0047b3;
            text-decoration: underline;
        }

    .page-breadcrumb i {
        color: #9aa3b2;
        font-size: 0.75rem;
    }

/* ==================================
   マスタ追加・編集 フォーム外枠
================================== */

.master-edit-panel {
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.master-edit-body {
    padding: 20px 24px;
}

.master-validation-summary {
    margin: 16px 24px 0;
}

/* ==================================
   マスタ追加・編集 フォーム1行
================================== */

.master-form-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    padding: 7px 0;
}

.master-form-label {
    min-height: 40px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #222;
    font-size: 0.95rem;
    font-weight: 700;
}

    .master-form-label label {
        margin: 0;
    }

/* 必須ラベル */

.master-required,
.master-optional,
.master-required-placeholder {
    width: 28px;
    min-width: 28px;
    height: 20px;
}

.master-required,
.master-optional {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

/* 必須 */
.master-required {
    color: #fff;
    background-color: #dc3545;
}

/* 任意 */
.master-optional {
    color: #fff;
    background-color: #6c757d;
}

/* 入力欄 */

.master-form-control {
    width: 100%;
    max-width: 680px;
}

    .master-form-control .form-control,
    .master-form-control .form-select {
        min-height: 40px;
        color: #222;
        background-color: #fff;
        border: 1px solid #d6dde8;
        border-radius: 5px;
        font-size: 0.95rem;
        font-weight: 500;
    }

        .master-form-control .form-control:focus,
        .master-form-control .form-select:focus {
            border-color: #6193d6;
            box-shadow: 0 0 0 0.2rem rgba(0, 71, 179, 0.12);
        }

    .master-form-control .text-danger {
        display: block;
        margin-top: 4px;
        font-size: 0.85rem;
        font-weight: 500;
    }

.master-form-help {
    margin-top: 5px;
    color: #677284;
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ==================================
   マスタフォーム ラジオボタン
================================== */

.master-radio-group {
    min-height: 40px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 34px;
}

    .master-radio-group .form-check {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding-left: 0;
    }

    .master-radio-group .form-check-input {
        width: 18px;
        height: 18px;
        margin: 0;
        float: none;
        cursor: pointer;
    }

        .master-radio-group .form-check-input:checked {
            background-color: #0047b3;
            border-color: #0047b3;
        }

    .master-radio-group .form-check-label {
        margin: 0;
        color: #333;
        font-size: 0.95rem;
        font-weight: 500;
        cursor: pointer;
    }

/* ==================================
   パスワード入力
================================== */

.master-password-control {
    position: relative;
}

    .master-password-control .form-control {
        padding-right: 46px;
    }

.master-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #61718a;
    background-color: transparent;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

    .master-password-toggle:hover {
        color: #0047b3;
    }

/* ==================================
   マスタフォーム下部ボタン
================================== */

.master-edit-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background-color: #fff;
    border-top: 1px solid #e2e6ec;
}

.master-form-button {
    min-width: 112px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
}

.master-form-button-cancel {
    color: #0047b3;
    background-color: #fff;
    border: 1px solid #cbd5e2;
}

    .master-form-button-cancel:hover {
        color: #0047b3;
        background-color: #f4f8ff;
        border-color: #aabbd3;
    }

.master-form-button-primary {
    color: #fff;
    background-color: #0047b3;
    border: 1px solid #0047b3;
}

    .master-form-button-primary:hover {
        color: #fff;
        background-color: #00398f;
        border-color: #00398f;
    }

    .master-form-button-primary:disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }

/* ==================================
   タブレット・スマートフォン
================================== */

@media (max-width: 991.98px) {
    :root {
        --top-header-height: 64px;
        --sidebar-width: 260px;
    }

    /* 上部ヘッダー */

    .top-header {
        position: sticky;
        top: 0;
        z-index: 1060;
        width: 100%;
        height: var(--top-header-height);
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 16px;
    }

    .top-header-brand {
        min-width: 0;
        font-size: 1.1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .top-header-brand i {
            flex-shrink: 0;
            font-size: 1.4rem;
        }

    .top-header-user {
        display: none;
    }

    /* ハンバーガーボタン */

    .btn-menu {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: #fff;
        background-color: transparent;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-radius: 6px;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

        .btn-menu:hover,
        .btn-menu:focus {
            color: #fff;
            background-color: rgba(255, 255, 255, 0.12);
        }

    /* ヘッダー下部 */

    .app-body {
        display: block;
    }

    /* スマホ用サイドバー */

    .sidebar {
        position: fixed;
        top: var(--top-header-height);
        left: -260px;
        z-index: 1050;
        width: var(--sidebar-width);
        height: calc(100vh - var(--top-header-height));
        display: flex;
        flex-direction: column;
        visibility: visible;
        opacity: 1;
        overflow: hidden;
        color: #fff;
        background-color: #3f3f3f;
        transform: none;
        transition: left 0.25s ease;
    }

        .sidebar.show {
            left: 0;
        }

    .sidebar-menu {
        min-height: 0;
        flex: 1;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* サイドバー背景オーバーレイ */

    .sidebar-overlay {
        display: none;
    }

        .sidebar-overlay.show {
            position: fixed;
            top: var(--top-header-height);
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 1045;
            display: block;
            background-color: rgba(0, 0, 0, 0.5);
        }

    body.sidebar-open {
        overflow: hidden;
    }

    /* メインエリア */

    .main-area {
        width: 100%;
        min-width: 0;
        min-height: calc(100vh - var(--top-header-height));
        margin: 0;
    }

    .content {
        padding: 1.25rem;
    }

    /* マスタ検索パネル */

    .master-search-panel {
        padding: 16px;
    }

    .master-search-button {
        width: 100%;
    }

    /* マスタ編集フォーム */

    .master-edit-body {
        padding: 20px;
    }

    .master-form-row {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 16px;
    }

    .master-form-control {
        max-width: none;
    }
}

/* ==================================
   スマートフォン
================================== */

@media (max-width: 575.98px) {
    /* 上部ヘッダー */

    .top-header {
        padding: 0 12px;
    }

    .top-header-brand {
        gap: 8px;
        font-size: 1rem;
    }

        .top-header-brand i {
            font-size: 1.25rem;
        }

    .btn-menu {
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
    }

    /* メインコンテンツ */

    .content {
        padding: 1rem;
    }

    /* ページ見出し */

    .page-title-area {
        gap: 10px;
        padding-bottom: 8px;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .page-description {
        margin-top: 6px;
        font-size: 0.85rem;
    }

    /* 一覧検索 */

    .master-search-panel {
        padding: 14px;
    }

    .master-search-title {
        margin-bottom: 12px;
        font-size: 1rem;
    }

    .master-search-control {
        min-height: 42px;
        font-size: 1rem;
    }

    .master-search-button {
        height: 42px;
        font-size: 1rem;
    }

    /* 一覧パネル */

    .master-list-panel {
        padding: 12px 10px 14px;
    }

    .master-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .master-list-actions {
        width: 100%;
        margin-left: 0;
    }

    .master-action-button {
        min-width: 0;
        flex: 1;
        padding: 0 10px;
    }

    /* 件数・ページ状態 */

    .master-result-footer {
        align-items: flex-start;
        gap: 8px;
    }

    .master-result-count {
        font-size: 0.9rem;
    }

    .master-page-status {
        font-size: 0.82rem;
    }

    /* ページング */

    .master-pagination-container,
    .master-pagination-area {
        width: 100%;
        overflow-x: auto;
    }

    .master-pagination {
        flex-wrap: nowrap;
        justify-content: flex-start !important;
        gap: 4px;
    }

        .master-pagination .page-link {
            min-width: 34px;
            height: 34px;
            padding: 0 8px;
            font-size: 0.85rem;
        }

    /* パンくず */

    .page-breadcrumb {
        flex-wrap: wrap;
        font-size: 1.2rem;
    }

    /* 追加・編集フォーム */

    .master-edit-body {
        padding: 16px;
    }

    .master-form-row {
        display: block;
        padding: 10px 0;
    }

    .master-form-label {
        min-height: auto;
        margin-bottom: 7px;
        grid-template-columns: 28px minmax(0, 1fr);
        font-size: 0.9rem;
    }

    .master-form-control .form-control,
    .master-form-control .form-select {
        min-height: 42px;
        font-size: 1rem;
    }

    .master-radio-group {
        min-height: 42px;
        gap: 26px;
    }

    .master-edit-footer {
        padding: 14px 16px;
    }

    .master-form-button {
        min-width: 0;
        height: 42px;
        flex: 1;
        padding: 0 12px;
    }
}

/* ==================================
   安否カラー
================================== */

.anpi-green {
    background: #00A63F;
    color: #FFFFFF;
}

.anpi-yellow {
    background: #D49A00;
    color: #FFFFFF;
}

.anpi-red {
    background: #E52222;
    color: #FFFFFF;
}

.anpi-gray {
    background: #9AA0A6;
    color: #FFFFFF;
}

/* ==================================
   安否状況マスタ連携カラー
================================== */

.anpi-primary-status.anpi-green,
.anpi-status-badge.anpi-green {
    color: #fff;
    background-color: #00a63f;
}

.anpi-primary-status.anpi-yellow,
.anpi-status-badge.anpi-yellow {
    color: #fff;
    background-color: #d49a00;
}

.anpi-primary-status.anpi-red,
.anpi-status-badge.anpi-red {
    color: #fff;
    background-color: #e52222;
}

.anpi-primary-status.anpi-gray,
.anpi-status-badge.anpi-gray {
    color: #fff;
    background-color: #9aa0a6;
}

/* ==================================
   認証画面
================================== */

.auth-main {
    min-height: 100vh;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background-color: #a1a5a6;
}

    body.auth-page .content {
        padding: 0;
        background-color: transparent;
    }

body.auth-page .content-inner {
    max-width: none;
}

.auth-system-title {
    top: 48px !important;
    margin: 0;
    color: #4a4f55;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-shadow: none;
}

/* ========================================
   全選択チェックボックス
======================================== */

.notification-select-all .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

    /* チェックされた状態 */

    .notification-select-all .form-check-input:checked {
        background-color: #0047b3;
        border-color: #0047b3;
    }

    /* 一部だけ選択されている状態 */

    .notification-select-all .form-check-input:indeterminate {
        background-color: #0047b3;
        border-color: #0047b3;
    }

    /* キーボード操作時 */

    .notification-select-all .form-check-input:focus {
        border-color: #0047b3;
        box-shadow: 0 0 0 0.2rem rgba(8, 104, 201, 0.18);
    }

/* 全選択ラベル */

.notification-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #344454;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

    .notification-select-all span {
        line-height: 1.4;
    }

/* 文字の縁取り */
.text-stroke-black {
    -webkit-text-stroke: 2px #000;
    text-stroke: 2px #000;
    paint-order: stroke fill;
    color: #fff; /* 中の文字色 */
}

/* =========================================
   安否確認 抽出条件
========================================= */

.dashboard-filter-card {
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #8b8b8b;
    border-radius: 10px;
}


/* =========================================
   ヘッダー
========================================= */

.dashboard-filter-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #222;
    background: #fff;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.dashboard-filter-header-main {
    min-width: 0;
    flex: 1;
}


/* =========================================
   タイトル
========================================= */

.dashboard-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #222;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
}

    .dashboard-filter-title i {
        flex-shrink: 0;
        font-size: 1.1rem;
    }


/* =========================================
   現在の抽出条件
========================================= */

.dashboard-filter-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 6px;
    padding-left: 27px;
    color: #222;
    font-size: 1rem;
    line-height: 1.5;
}

    .dashboard-filter-summary span + span::before {
        content: "|";
        margin: 0 8px;
        color: #999;
    }


/* =========================================
   開閉アイコン
========================================= */

.dashboard-filter-chevron {
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.dashboard-filter-header[aria-expanded="true"]
.dashboard-filter-chevron {
    transform: rotate(180deg);
}


/* =========================================
   抽出条件本体
========================================= */

.dashboard-filter-body {
    padding: 8px 14px 14px;
}


/* =========================================
   入力グループ
========================================= */

.dashboard-filter-group {
    margin-bottom: 12px;
}

.dashboard-filter-label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}


/* セレクトボックス */

.dashboard-filter-group .form-select {
    width: 100%;
    min-height: 48px;
    color: #333;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    font-size: 1.05rem;
    box-shadow: none;
}

    .dashboard-filter-group .form-select:focus {
        border-color: #6193d6;
        box-shadow: 0 0 0 0.2rem rgba(0, 71, 179, 0.10);
    }


/* =========================================
   チェックボックス
========================================= */

.dashboard-filter-option {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0 12px;
    color: #333;
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

    .dashboard-filter-option .form-check-input {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        margin: 0;
        cursor: pointer;
    }

        .dashboard-filter-option .form-check-input:checked {
            background-color: #0d6efd;
            border-color: #0d6efd;
        }


/* =========================================
   スマートフォン
========================================= */

@media (max-width: 575.98px) {

    .dashboard-filter-header {
        padding: 12px;
    }

    .dashboard-filter-title {
        font-size: 1.15rem;
    }

        .dashboard-filter-title i {
            font-size: 1.1rem;
        }

    .dashboard-filter-summary {
        margin-top: 6px;
        padding-left: 27px;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .dashboard-filter-chevron {
        font-size: 1.1rem;
    }

    .dashboard-filter-body {
        padding: 8px 12px 12px;
    }

    .dashboard-filter-label {
        font-size: 1rem;
    }

    .dashboard-filter-group .form-select {
        min-height: 48px;
        font-size: 1.05rem;
    }

    .dashboard-filter-option {
        min-height: 48px;
        font-size: 1rem;
    }
}