/* ===============================================
   Laravel版 追加スタイル（デモUIの補完）
   =============================================== */

/* サイドバー下部（ユーザー情報・ログアウト） */
.sidebar-footer {
    padding: 16px 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
    font-size: 0.9rem;
}

.sidebar-footer .user-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-name i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.sidebar-footer .footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer .footer-links form {
    margin: 0;
    padding: 0;
    width: 100%;
}

.sidebar-footer a,
.sidebar-footer button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #dfe6e9;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.3;
}

.sidebar-footer a:hover,
.sidebar-footer button:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* サイドバーのリンクを nav-item として使う */
.nav-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 25px;
    border-left: 4px solid transparent;
}

/* フォーム入力は種類を問わず横幅いっぱいに（time / email / password / file も含む） */
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 汎用カード */
.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.content-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* フラッシュメッセージ */
.flash-area {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* フォーム（モーダル外でも使えるように） */
.form-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 640px;
}

.form-card form {
    padding: 25px;
}

/* Reactボードのツールバー */
.board-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: var(--shadow);
}

.board-toolbar .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.shift-columns .shift-column {
    min-height: 320px;
}

/* 配置ボード：フィルターがスタッフカードに隠れないようにする */
.staff-pool {
    position: relative;
    z-index: 2;
    overflow: visible;
}

.staff-pool .filter-bar {
    flex-direction: column;
    position: relative;
    z-index: 30;
}

.staff-pool .filter-bar select {
    width: 100%;
    background: #fff;
    z-index: 31;
}

.staff-pool .staff-cards {
    z-index: 1;
    isolation: isolate;
}

.staff-pool .staff-card {
    /* hover transform が select の開閉表示と重なるのを防ぐ */
    position: relative;
    z-index: 1;
}

.staff-pool .staff-card:hover {
    z-index: 2;
    transform: none;
}

/* 配置ボード用グリッド */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.board-cell {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

.board-cell .cell-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-cell select {
    width: 100%;
}

.assigned-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assigned-chip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.assigned-chip.proposed {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.assigned-chip.approved,
.assigned-chip.sent {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* ステップガイド（ダッシュボード） */
.step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-color);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.step-list a:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.step-list .step-no {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* ログイン画面 */
body.guest-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--sidebar-bg);
}

.guest-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 35px;
}

.guest-card .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.guest-card .brand i {
    color: var(--primary-color);
    font-size: 1.6rem;
}

.guest-card .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
}

/* ページネーション（Laravel標準の見た目調整） */
nav[role="navigation"] {
    margin-top: 15px;
}

/* テーブル内ボタン等 */
.data-table form {
    padding: 0;
    display: inline;
}

/* マイシフトカード */
.myshift-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border-left: 5px solid var(--primary-color);
}

.myshift-card.morning { border-left-color: var(--morning-color); }
.myshift-card.afternoon { border-left-color: var(--afternoon-color); }
.myshift-card.night { border-left-color: var(--night-color); }

.myshift-card .date {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.myshift-card .meta {
    color: var(--text-secondary);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.pref-table-wrap {
    overflow-x: auto;
}

.pref-table select {
    min-width: 6.5rem;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}

.pref-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.pref-shift {
    color: var(--text-secondary);
    font-size: 0.8rem;
    min-width: 4.5rem;
}

.pref-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pref-badge.preferred { background: #e8f8ef; color: #1e8449; }
.pref-badge.available { background: #eaf4fc; color: #1a5276; }
.pref-badge.unavailable { background: #fdecea; color: #c0392b; }
.pref-badge.none { color: var(--text-light); font-weight: 400; }

/* プロフィールなど Breeze 画面の下地 */
.plain-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

/* タブレット：サイドバー下部もアイコンのみ */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-footer {
        padding: 10px 8px;
    }

    .sidebar-footer .user-name span,
    .sidebar-footer a span,
    .sidebar-footer button span {
        display: none;
    }

    .sidebar-footer a,
    .sidebar-footer button {
        justify-content: center;
        padding: 10px;
    }
}

/* スマホ */
@media (max-width: 768px) {
    .content-card h3 {
        font-size: 0.95rem;
    }

    .myshift-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .myshift-card .date {
        font-size: 1.05rem;
    }

    .myshift-card .meta {
        gap: 10px;
        font-size: 0.9rem;
    }

    .step-list a {
        padding: 12px 14px;
        font-size: 0.95rem;
        align-items: flex-start;
        line-height: 1.4;
    }

    .plain-section {
        padding: 18px;
    }

    .form-card {
        max-width: none;
    }

    .board-grid {
        grid-template-columns: 1fr;
    }

    body.guest-body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 10vh;
    }

    .guest-card {
        padding: 24px 20px;
    }

    /* シフト希望（スタッフ）：日付ごとに縦積み */
    .pref-table--stack thead {
        display: none;
    }

    .pref-table--stack,
    .pref-table--stack tbody,
    .pref-table--stack tr,
    .pref-table--stack td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .pref-table--stack tr {
        background: var(--bg-color);
        border-radius: 10px;
        padding: 6px 12px 10px;
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
    }

    .pref-table--stack td {
        border-bottom: none;
        padding: 8px 0;
        white-space: normal;
    }

    .pref-table--stack td.pref-date {
        font-size: 1.05rem;
        padding-bottom: 4px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 4px;
    }

    .pref-table--stack td.pref-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .pref-table--stack td.pref-cell::before {
        content: attr(data-label);
        color: var(--text-secondary);
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .pref-table--stack td.pref-cell select {
        min-width: 0;
        width: 55%;
    }
}

/* 一覧上部の操作列（検索・取り込み・期間指定・条件保存）：狭い幅では折り返す */
.tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.tool-row form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
}

.tool-row .btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

.tool-row input[type="text"],
.tool-row input[type="date"],
.tool-row input[type="month"],
.tool-row input[type="file"] {
    flex: 1 1 180px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.tool-row .tool-note {
    flex: 1 1 100%;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 状態バッジは途中で折り返さない */
.status-badge,
.skill-badge {
    display: inline-block;
    white-space: nowrap;
}

/* 一覧の操作ボタンは縦書きにならないようにする */
.action-btns .btn {
    white-space: nowrap;
}

.action-btns form {
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
}

/* 項目名と値の2列表（取り込み情報など）：長い値は折り返す */
.data-table--info th {
    white-space: nowrap;
}

.data-table--info td {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* タブレット幅までは、一覧の文字を1文字ずつ折り返さず表の中で横スクロールさせる */
@media (max-width: 1024px) {
    .data-table th,
    .data-table td {
        white-space: nowrap;
    }

    .data-table td[colspan] {
        white-space: normal;
    }
}

.tool-row .date-range {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 320px;
    min-width: 0;
}

.tool-row .date-range input {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 768px) {
    .tool-row > form,
    .tool-row > a.btn {
        width: 100%;
    }

    /* 横スクロールする表の中では、操作ボタンを折り返さず横に並べる */
    .data-table .action-btns {
        flex-wrap: nowrap;
    }

    .tool-row > form > .btn,
    .tool-row > a.btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .data-table--info th {
        width: auto !important;
        padding-right: 8px;
    }

    .data-table--info td {
        white-space: normal;
    }
}

/* シフト希望一覧（管理者）：スタッフ名列を固定して横スクロール */
.pref-table--wide th,
.pref-table--wide td {
    white-space: nowrap;
}

.pref-table--wide th:first-child,
.pref-table--wide td:first-child {
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 2;
    box-shadow: 1px 0 0 var(--border-color);
}

.pref-table--wide thead th:first-child {
    background: var(--bg-color);
    z-index: 3;
}

/* 絞り込み用のセレクト（グループなど） */
.tool-row select {
    flex: 0 1 220px;
    min-width: 0;
    max-width: 100%;
}

/* 月間出勤表：セルはリンク風のボタン、クリックで編集欄を開く */
.attendance-month th,
.attendance-month td {
    white-space: nowrap;
    text-align: center;
}
.attendance-month .is-sunday { color: #d9534f; }
.attendance-month .is-saturday { color: #337ab7; }
.attendance-link {
    border: 0;
    background: transparent;
    padding: 2px 4px;
    color: var(--primary-color, #2563eb);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}
.attendance-dialog {
    /* 全体リセットの margin:0 でブラウザ標準の中央寄せが消えるため、明示的に画面中央へ置く */
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 0;
    border-radius: 12px;
    padding: 24px;
    width: min(420px, calc(100vw - 32px));
    box-sizing: border-box;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.attendance-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

/* 月間出勤表：出勤種別の追加・変更 */
.type-settings {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 720px;
    margin-bottom: 20px;
}
.type-settings > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.type-settings > summary::-webkit-details-marker { display: none; }
.type-settings > summary::after {
    content: '\25BC';
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}
.type-settings[open] > summary::after { transform: rotate(180deg); }
.type-settings[open] > summary { border-bottom: 1px solid var(--border-color); }
.type-settings__count {
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.type-settings__body { padding: 16px 20px 18px; }
.type-settings form { padding: 0; margin: 0; }
.type-settings__add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px dashed var(--border-color);
}
.type-settings__add input[type="text"] { flex: 1 1 200px; min-width: 0; }
.type-settings__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.9rem;
    cursor: pointer;
}
.type-list { list-style: none; margin: 0; padding: 0; }
.type-list__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.type-list__row:last-child { border-bottom: 0; }
.type-list__row input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; }
.type-list__row input[readonly] {
    background: var(--bg-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}
.type-list__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    min-width: 120px;
}
.type-list__badge {
    display: inline-block;
    min-width: 52px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
}
.type-settings__note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
@media (max-width: 600px) {
    .type-list__row { grid-template-columns: minmax(0, 1fr) auto; }
    .type-list__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ===== サイドメニューの階層表示 =====
   大項目（番号付き）＝業務の流れ、サブメニュー＝その下の画面 */
.nav-menu {
    overflow-y: auto;
}
.nav-group > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-group + .nav-group {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 大項目 */
.nav-step a {
    font-weight: 700;
    font-size: 1rem;
    padding-top: 13px;
    padding-bottom: 13px;
}
.nav-step-no {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}
.nav-step.active .nav-step-no {
    background: #fff;
    color: var(--primary-color);
}

/* サブメニュー：字下げ＋左の縦線でつながりを示す */
.nav-sub {
    position: relative;
}
.nav-sub a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.72);
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 58px;
    gap: 10px;
}
.nav-sub::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.nav-sub:last-child::before {
    bottom: 50%;
}
.nav-sub::after {
    content: '';
    position: absolute;
    left: 40px;
    top: 50%;
    width: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.nav-sub i {
    font-size: 0.85rem;
    width: 16px;
}
.nav-sub:hover a,
.nav-sub.active a {
    color: #fff;
}

/* 番号のない「管理・その他」のまとまり */
.nav-section-label {
    padding: 10px 25px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}
.nav-group--others .nav-sub::before,
.nav-group--others .nav-sub::after {
    display: none;
}
.nav-group--others .nav-sub a {
    padding-left: 40px;
}

/* タブレット（アイコンのみ表示）：字下げと線を外し、番号は残す */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-sub a,
    .nav-group--others .nav-sub a {
        padding: 10px 15px;
        justify-content: center;
    }
    .nav-sub::before,
    .nav-sub::after {
        display: none;
    }
    .nav-sub i {
        font-size: 0.8rem;
        opacity: 0.8;
    }
    .nav-section-label {
        padding: 8px 0 2px;
        text-align: center;
    }
    .nav-section-label span {
        display: none;
    }
    .nav-section-label::before {
        content: '…';
    }
}

/* ===== 発注書から取込 ===== */
.order-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    background: var(--bg-color);
    color: var(--text-secondary);
}
.order-status--ready { background: rgba(243, 156, 18, 0.15); color: #b9770e; }
.order-status--imported { background: rgba(39, 174, 96, 0.15); color: #1e8449; }
.order-status--failed { background: rgba(231, 76, 60, 0.15); color: #c0392b; }

.order-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 20px;
}
.order-card__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.order-card__head h2 { font-size: 1.2rem; margin: 0 0 2px; }
.order-card__head small { font-size: 0.8rem; font-weight: normal; color: var(--text-secondary); }
.order-card__venue { font-weight: 600; align-self: center; }

.order-facts,
.order-item__attrs dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 16px;
    margin: 0 0 12px;
}
.order-facts dt,
.order-item__attrs dt { font-size: 0.75rem; color: var(--text-secondary); }
.order-facts dd,
.order-item__attrs dd { margin: 0; font-size: 0.9rem; }

.order-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px 14px;
    margin: 0 0 12px;
    min-width: 0;
}
.order-item[disabled] { opacity: 0.85; }
.order-item legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
    font-weight: 700;
}
.order-item legend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.order-item__code { font-weight: normal; font-size: 0.8rem; color: var(--text-secondary); }
.order-item__badge {
    font-weight: normal;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(52, 152, 219, 0.15);
    color: var(--primary-dark);
}
.order-item__badge--update { background: rgba(243, 156, 18, 0.18); color: #b9770e; }
.order-item__warning { font-size: 0.85rem; color: #c0392b; margin-bottom: 6px; }
.order-item__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px 14px;
}
.order-item__grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 0;
}
.order-item__grid input,
.order-item__grid select,
.order-item__grid textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
    color: var(--text-primary, #2c3e50);
}
.order-item__wide { grid-column: 1 / -1; }
.order-item__basis { font-size: 0.8rem; margin-top: 6px; }
.order-item__attrs { margin-top: 10px; }
.order-item__attrs summary { cursor: pointer; font-size: 0.85rem; color: var(--primary-dark); margin-bottom: 8px; }

/* 業務編集画面：発注書から補完した情報 */
.order-details { margin-top: 20px; }
.order-details h3 { font-size: 1rem; margin-bottom: 10px; }

/* 発注書の読み取り中表示 */
.order-reading {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.order-reading strong { font-size: 1.05rem; }
.order-reading p { margin: 6px 0 0; font-size: 0.85rem; }
.order-reading__spinner {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(52, 152, 219, 0.2);
    border-top-color: var(--primary-color);
    animation: order-spin 0.9s linear infinite;
}
@keyframes order-spin { to { transform: rotate(360deg); } }
.order-status--reading { background: rgba(52, 152, 219, 0.15); color: var(--primary-dark); }

/* スタッフ登録：パスワードの渡し方 */
.issue-mode__option {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: normal !important;
}
.issue-mode__option:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.06);
}
.issue-mode__option input { margin-top: 4px; width: auto !important; }
.issue-mode__option strong { display: block; }
.issue-mode__option small { display: block; color: var(--text-secondary); font-size: 0.8rem; margin-top: 2px; }
.tool-row .tool-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; white-space: nowrap; }
.status-badge.pending-password { background: rgba(243, 156, 18, 0.15); color: #b9770e; }
.bulk-issue { padding: 10px 12px; background: var(--bg-color); border-radius: 8px; }

/* 発行したログイン情報（1人1枚のカード。印刷して切り分けて渡せる） */
.credential-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.credential-card {
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 16px 18px;
    break-inside: avoid;
}
.credential-card__title { font-size: 0.75rem; color: var(--text-secondary); }
.credential-card__name { font-size: 1.1rem; font-weight: 700; margin: 4px 0 10px; }
.credential-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.credential-card dt { font-size: 0.8rem; color: var(--text-secondary); }
.credential-card dd { margin: 0; word-break: break-all; }
.credential-card__value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.06em; }
.credential-card__note { margin-top: 10px; font-size: 0.75rem; color: var(--text-secondary); }

@media print {
    .sidebar, .mobile-topbar, .sidebar-overlay, .no-print, .alert-item { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    .credential-sheet { grid-template-columns: 1fr 1fr; }
    .credential-card { border-color: #999; }
}

/* 業務メッセージ：宛先の選択と添付 */
.recipient-count { font-weight: normal; color: var(--primary-dark); margin-left: 8px; }
.recipient-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.recipient-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    cursor: pointer;
    font-weight: normal !important;
    white-space: nowrap;
}
.recipient-chip:has(input:checked) { border-color: var(--primary-color); background: rgba(52, 152, 219, 0.08); }
.recipient-chip:has(input:disabled) { opacity: 0.5; }
.recipient-chip input { width: auto !important; }
.recipient-chip small { color: var(--text-secondary); }
.recipient-chip--all { font-weight: 600 !important; }
.recipient-people { border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; }
.recipient-people summary { cursor: pointer; color: var(--primary-dark); font-size: 0.9rem; }
.recipient-search { margin: 10px 0; width: 100%; max-width: 280px; }
.recipient-group { margin-top: 8px; }
.recipient-group__title { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.recipient-group__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.recipient-person { display: flex !important; align-items: center; gap: 6px; font-weight: normal !important; cursor: pointer; }
.recipient-person input { width: auto !important; }
.recipient-person__noemail { font-size: 0.7rem; color: #c0392b; }
.attachment-list { list-style: none; margin: 8px 0 0; padding: 0; }
.attachment-list li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; padding: 3px 0; }
.attachment-list button { border: 0; background: transparent; color: #c0392b; cursor: pointer; font-size: 1rem; line-height: 1; }

/* 配置メールの確認：一人ずつ選んで送る */
.notify-select { padding: 10px 12px; background: var(--bg-color); border-radius: 8px; }
.notify-person {
    display: flex !important;
    gap: 12px;
    align-items: flex-start;
    max-width: 900px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: normal !important;
}
.notify-person:has(input:checked) { border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color) inset; }
.notify-person--disabled { opacity: 0.6; cursor: not-allowed; }
.notify-person > input { margin-top: 4px; width: auto !important; }
.notify-person__body { flex: 1; min-width: 0; }
.notify-person__head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 4px; }
.notify-person ul { margin: 6px 0 0 18px; font-size: 0.9rem; }
.notify-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; background: var(--bg-color); color: var(--text-secondary); }
.notify-badge--sent { background: rgba(39, 174, 96, 0.15); color: #1e8449; }
.notify-badge--failed { background: rgba(231, 76, 60, 0.15); color: #c0392b; }
.notify-actions { justify-content: flex-start; align-items: center; gap: 12px; max-width: 900px; }
