h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ===== 一斉配送ツール 共通 ===== */
:root {
    --center-op: #3b82c4;
    --center-haisya: #d9534f;
    --center-cust: #3f9142;
    --center-rider: #7c5cbf;
    --center-menu: #46647e;
    --center-map: #2e8b8b;
    --center-danger-bg: #fbe3e3;
    --center-warning-bg: #fdf3c4;
    --center-cancel-bg: #d6d6d6;
    --center-success-bg: #e3f1dc;
    --center-info-bg: #dcecf6;
}

body {
    font-family: "Meiryo UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
    background: var(--rz-base-50, #f6f7f9);
}

/* ---- レイアウト ---- */
.center-layout { height: 100vh; }
.center-layout .rz-body { background: var(--rz-base-50, #f6f7f9); padding: 0; }
.center-page { padding: 16px 20px 32px; }

.center-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding-right: 8px;
    min-width: 0;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.header-env {
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--rz-base-100, #eef0f3);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.header-spacer { flex: 1; }
.header-user .rz-navigation-item-link { gap: 6px; }
.header-user-name { font-size: 0.85rem; }

.deploy-badge {
    background: #c9302c;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 研修環境はヘッダーの下に赤線を引いて、本番と見分けやすくする */
.center-layout.training .rz-header { border-bottom: 4px solid #c9302c; }

.sidebar-section {
    padding: 14px 16px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rz-text-tertiary-color, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .center-page { padding: 12px 10px 24px; }
    .header-user-name, .header-env { display: none; }
}

/* サイドメニューのない画面 */
.plain-layout { min-height: 100vh; background: var(--rz-base-50, #f6f7f9); }
.plain-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--rz-base-background-color, #fff);
    border-bottom: 1px solid var(--rz-base-200, #e2e4e8);
    font-weight: 700;
}
.plain-body { padding: 16px 12px 32px; }

/* ---- 画面の見出し ---- */
.page-head {
    --kind-color: var(--center-op);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: var(--rz-base-background-color, #fff);
    border-left: 6px solid var(--kind-color);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.page-head h1 {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--kind-color);
}

.page-head-sub { font-size: 0.8rem; color: var(--rz-text-secondary-color, #666); margin-top: 2px; }

.page-head-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.sync-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #666);
    font-variant-numeric: tabular-nums;
}
.sync-time .rzi { font-size: 1.1rem; }

.page-head.op { --kind-color: var(--center-op); }
.page-head.haisya { --kind-color: var(--center-haisya); }
.page-head.cust { --kind-color: var(--center-cust); }
.page-head.rider { --kind-color: var(--center-rider); }
.page-head.menu { --kind-color: var(--center-menu); }
.page-head.map { --kind-color: var(--center-map); }

/* ---- 抽出条件 ---- */
.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 12px;
    padding: 12px 14px 8px;
    background: var(--rz-base-background-color, #fff);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.filter-field { margin-bottom: 4px; }
.filter-field .rz-textbox, .filter-field .rz-dropdown, .filter-field .rz-numeric { width: 100%; }
.filter-divider { width: 1px; align-self: stretch; background: var(--rz-base-200, #e2e4e8); margin: 4px 2px 8px; }
.filter-spacer { flex: 1; }

.check-field { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.check-field .rz-label { margin: 0; cursor: pointer; white-space: nowrap; }

/* 旧画面との互換（ダイアログ内など） */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; margin-bottom: 12px; }
.filter-bar .field { display: flex; flex-direction: column; gap: 2px; }
.filter-bar .field label { font-size: 0.8rem; color: var(--rz-text-secondary-color, #555); }

.field-error { color: #c9302c; font-size: 0.8rem; }

@media (max-width: 768px) {
    .filter-divider, .filter-spacer { display: none; }
    .filter-field { flex: 1 1 8rem; }
}

/* ---- 一覧 ---- */
.grid-card {
    background: var(--rz-base-background-color, #fff);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    overflow: hidden;
}

.status-grid .rz-data-row { cursor: pointer; }
.status-grid td { vertical-align: top; }
.rz-data-grid .rz-grid-table thead th { white-space: nowrap; }

/* 一覧の状態色（旧 alert-danger / alert-warning / alert-cancel） */
tr.row-danger > td { background-color: var(--center-danger-bg) !important; }
tr.row-warning > td { background-color: var(--center-warning-bg) !important; }
tr.row-cancel > td { background-color: var(--center-cancel-bg) !important; color: #555; }
tr.row-success > td { background-color: var(--center-success-bg) !important; }
tr.row-info > td { background-color: var(--center-info-bg) !important; }
tr.row-danger > td:first-child { box-shadow: inset 4px 0 0 #d9534f; }
tr.row-warning > td:first-child { box-shadow: inset 4px 0 0 #e0a800; }
tr.row-cancel > td:first-child { box-shadow: inset 4px 0 0 #888; }

.row-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #555);
    border-top: 1px solid var(--rz-base-200, #e2e4e8);
}
.row-legend span { display: inline-flex; align-items: center; gap: 6px; }
.row-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .1); }
.row-legend .danger { background: var(--center-danger-bg); }
.row-legend .warning { background: var(--center-warning-bg); }
.row-legend .cancel { background: var(--center-cancel-bg); }

.cell-pre { white-space: pre-wrap; word-break: break-all; }
.sub-text { color: #666; font-size: 0.85em; }

/* ---- ダイアログ ---- */
.form-grid {
    display: grid;
    grid-template-columns: max-content 1fr max-content 1fr;
    gap: 10px 12px;
    align-items: center;
}

.form-grid > label {
    text-align: right;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #555);
    white-space: nowrap;
}

.form-grid .span-3 { grid-column: span 3; }

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; gap: 4px; }
    .form-grid > label { text-align: left; margin-top: 6px; }
    .form-grid .span-3 { grid-column: span 1; }
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--rz-base-200, #e2e4e8);
}

.cancel-badge {
    background: #d9534f;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.editor-head h3 { margin: 0; font-size: 1.2rem; }

/* 配車への通知（旧 toastr） */
.notice-stack {
    position: fixed;
    top: 64px;
    right: 12px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.notice {
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    cursor: pointer;
}

.notice.info { background: #2f7fb4; }
.notice.warning { background: #e68a00; }
.notice .title { font-weight: bold; margin-bottom: 4px; }
.notice .body { white-space: pre-wrap; }

/* ---- メニュー ---- */
.menu-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.menu-section { margin-bottom: 24px; }

.menu-section-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 1.15rem;
    margin: 0 0 10px;
    padding-left: 10px;
    border-left: 5px solid var(--sec-color, #888);
}
.menu-section-title.otodoke { --sec-color: #3f9142; }
.menu-section-title.kaisyu { --sec-color: #2f7fb4; }
.menu-section-title.data { --sec-color: #b7862a; }
.menu-meta { font-size: 0.8rem; font-weight: normal; color: var(--rz-text-secondary-color, #666); }

.menu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

a.menu-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--rz-base-background-color, #fff);
    border: 1px solid var(--rz-base-200, #e2e4e8);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.menu-card:hover { border-color: var(--rz-primary, #4340d2); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.menu-card-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-primary-lighter, #eceafd);
    color: var(--rz-primary, #4340d2);
}
.menu-card-body { min-width: 0; }
.menu-card h4 { margin: 0 0 4px; font-size: 1rem; }
.menu-card p { margin: 0; font-size: 0.78rem; color: var(--rz-text-secondary-color, #666); }
.menu-url {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #666;
    word-break: break-all;
}

.page-gate { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; font-size: 1.05rem; }

/* ---- 配送員向け入力画面（携帯表示） ---- */
.input-page { max-width: 640px; margin: 0 auto; }
.input-title { font-size: 1.2rem; font-weight: 700; margin: 4px 0 12px; }
.input-title small { display: block; font-size: 0.78rem; font-weight: normal; color: var(--rz-text-secondary-color, #666); }
.input-login { display: flex; flex-direction: column; gap: 12px; }
.input-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 0 -12px 12px;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rz-base-50, #f6f7f9);
    border-bottom: 1px solid var(--rz-base-200, #e2e4e8);
}
.input-card { margin-bottom: 12px; border-radius: 10px; }
.input-card.done { border-left: 6px solid #3f9142; }
.input-card.cancel { background: #e6e6e6; }
.input-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.input-card-head h4 { margin: 0 0 8px; font-size: 1.1rem; }
.input-card-body { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 8px; margin: 0 0 12px; font-size: 0.95rem; }
.input-card-body dt { text-align: right; font-weight: normal; color: #666; }
.input-card-body dd { margin: 0; }
.input-page .rz-button { min-height: 44px; }
.manual-link { background: #337ab7; color: #fff; padding: 2px 8px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
.tel-button { display: flex; width: 100%; justify-content: center; text-decoration: none; margin-top: 6px; }

/* ---- 確認表 ---- */
.memo-cell { cursor: pointer; min-height: 1.5em; }
.memo-form .memo-op { color: #3c763d; }
.memo-form .memo-cust { color: #a94442; }
.kakunin-check .rz-chkbox-box { width: 28px; height: 28px; }

/* ---- ログイン ---- */

.hint { font-size: 0.75rem; color: #777; }

/* 地図 */
.routemap {
    display: flex;
    gap: 12px;
    height: calc(100vh - 175px);
    min-height: 420px;
}

.routemap-side {
    width: 320px;
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.routemap-side:not(.open) { display: none; }

.routemap-tools {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.routemap-search { width: 100%; }
.routemap-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.routemap-edit { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.routemap-progress { font-size: 0.8rem; color: #555; }
.routemap-error { color: #c00; font-size: 0.85rem; }

.routemap-courses {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.routemap-courses > li {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.routemap-courses > li.hidden-course { opacity: 0.5; }
.routemap-courses > li.empty { color: #888; }

.routemap-courses .course-row {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding-right: 48px;
    font-weight: 600;
}

.routemap-courses .swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex: 0 0 14px;
}

.routemap-courses .course-fit {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    padding: 1px 8px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fafafa;
    cursor: pointer;
}

.routemap-courses .course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-left: 40px;
    font-size: 0.78rem;
    color: #555;
}

.routemap-courses .warn { color: #c25400; }

.routemap-courses .course-expand {
    margin-left: 40px;
    font-size: 0.75rem;
    border: none;
    background: none;
    color: #1a73e8;
    padding: 0;
    cursor: pointer;
}

.routemap-courses .course-stops {
    list-style: none;
    margin: 4px 0 2px 40px;
    padding: 0;
    font-size: 0.8rem;
}

.routemap-courses .course-stops li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
    padding: 2px 0;
}

.routemap-courses .course-stops li.done .stop-name { color: #888; }
.routemap-courses .course-stops li.cancel .stop-name { text-decoration: line-through; color: #888; }
.routemap-courses .course-stops .seq { min-width: 1.6em; text-align: right; color: #666; }
.routemap-courses .course-stops .stop-name { cursor: pointer; text-decoration: underline dotted; }
.routemap-courses .course-stops .stop-time { color: #666; }
.routemap-courses .course-stops .stop-place { font-size: 0.72rem; padding: 0 6px; cursor: pointer; }

.routemap-main {
    flex: 1;
    position: relative;
    min-width: 0;
}

/* maplibregl-map が position: relative を付けるため、絶対配置ではなく大きさで広げる */
.routemap-canvas {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #e8eef0;
}

.routemap-canvas.rm-placing,
.routemap-canvas.rm-placing .maplibregl-canvas { cursor: crosshair; }

.routemap-side-toggle {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.rm-banner {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.9rem;
}

/* マーカー（配送順の番号） */
.rm-pin {
    --pin-color: #3388ff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pin-color);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}

.rm-pin.depot { border-radius: 4px; background: #333; border-color: var(--pin-color); border-width: 3px; line-height: 20px; }
.rm-pin.done { opacity: 0.45; }
.rm-pin.cancel { background: #999; text-decoration: line-through; }
.rm-pin.editable { cursor: move; outline: 2px dashed #333; outline-offset: 1px; }

/* 吹き出し */
.rm-popup { font-size: 0.85rem; min-width: 200px; }
.rm-popup .rm-title { font-weight: 700; font-size: 0.95rem; border-left: 5px solid; padding-left: 6px; margin-bottom: 4px; }
.rm-popup .rm-addr { color: #444; margin-bottom: 4px; }
.rm-popup .rm-tag { margin-left: 6px; font-size: 0.7rem; padding: 0 4px; border-radius: 3px; background: #ffe7c2; color: #8a4b00; }
.rm-popup table { border-collapse: collapse; }
.rm-popup th { text-align: left; font-weight: 400; color: #666; padding: 1px 10px 1px 0; white-space: nowrap; vertical-align: top; }
.rm-popup td { padding: 1px 0; }
.rm-popup .rm-memo { margin-top: 4px; padding: 4px 6px; background: #fff8dc; white-space: pre-wrap; }
.rm-popup .rm-btn { margin-top: 6px; font-size: 0.8rem; cursor: pointer; }

@media (max-width: 768px) {
    .routemap { flex-direction: column; height: auto; }
    .routemap-side { width: auto; flex: none; max-height: 45vh; }
    .routemap-main { height: 70vh; flex: none; }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
.page-gate-icon { font-size: 48px !important; color: var(--rz-text-tertiary-color, #aaa); }
.title-tag {
    display: inline-block;
    margin-left: 10px;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    vertical-align: middle;
    color: #fff;
    background: var(--kind-color);
}
.dialog-footer .rz-button { min-width: 6rem; }
.rz-dialog-titlebar { border-bottom: 1px solid var(--rz-base-200, #e2e4e8); }

/* 社外ユーザーのパスワード発行 */
.pw-note { display: flex; align-items: center; gap: 8px; color: var(--rz-text-secondary-color); font-size: .875rem; }
.pw-issued { margin-top: 12px; }
.pw-issued-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.pw-issued-row code { font-size: 1.15rem; letter-spacing: .08em; padding: 4px 10px; background: var(--rz-base-background-color); border: 1px solid var(--rz-base-300); border-radius: 4px; user-select: all; }
.pw-issued-url, .pw-issued-note { font-size: .8125rem; }
.pw-issued-note { color: var(--rz-danger); }

/* ログイン画面 */
.login-page {
    box-sizing: border-box;
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: radial-gradient(circle at 15% 10%, #dbe7ff 0, transparent 45%), radial-gradient(circle at 90% 90%, #d7f2ee 0, transparent 40%), #f3f5f9;
}
.login-main { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-brand-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--rz-primary) 0%, #4f7cff 100%); box-shadow: 0 8px 20px rgba(28, 77, 230, .25);
}
.login-brand-icon .rzi { font-size: 30px; }
.login-brand-name { font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; color: #1f2937; }
.login-card {
    width: 100%; background: #fff; border-radius: 16px; padding: 28px 28px 24px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .08); display: flex; flex-direction: column;
}
.login-title { font-size: 1.2rem; font-weight: 700; margin: 0; color: #111827; }
.login-lead { margin: 6px 0 18px; font-size: .875rem; color: #6b7280; }
.login-form { display: flex; flex-direction: column; }
.login-form label { font-size: .8125rem; font-weight: 600; color: #374151; margin: 10px 0 6px; }
.login-input {
    display: flex; align-items: center; gap: 8px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 12px; height: 44px;
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.login-input:focus-within { border-color: var(--rz-primary); box-shadow: 0 0 0 3px rgba(28, 77, 230, .15); }
.login-input .rzi { color: #9ca3af; font-size: 20px; }
.login-input input { border: 0; outline: 0; flex: 1; font-size: 1rem; background: transparent; min-width: 0; }
.login-submit { margin-top: 22px; width: 100%; height: 46px; border-radius: 10px; font-size: 1rem; justify-content: center; }
.login-error {
    display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 4px; border-radius: 10px;
    background: #fef2f2; color: #b42318; font-size: .875rem; border: 1px solid #fecdca;
}
.login-error .rzi { font-size: 18px; }
.login-ms-button {
    display: flex; align-items: center; justify-content: center; gap: 12px; height: 46px; border-radius: 10px;
    border: 1px solid #c8ccd2; color: #1f2937; font-weight: 600; text-decoration: none; background: #fff; transition: background .15s;
}
.login-ms-button:hover { background: #f5f6f8; }
.login-ms-button svg { width: 20px; height: 20px; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: #9ca3af; font-size: .75rem; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }
.login-dev { display: flex; flex-direction: column; gap: 8px; }
.login-dev-button {
    display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 10px; border: 1px dashed #c8ccd2;
    color: #4b5563; font-size: .875rem; text-decoration: none; background: #fafafa;
}
.login-dev-button:hover { background: #f1f2f4; color: #111827; }
.login-help { margin: 14px 0 0; font-size: .8125rem; color: #6b7280; text-align: center; }
.login-switch { margin-top: 10px; text-align: center; font-size: .8125rem; color: var(--rz-primary); }

/* コースマスタ取り込み */
.import-layout { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .import-layout { grid-template-columns: 1fr; } }
.import-card { padding: 20px 24px; }
.import-step { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 18px 0 10px; }
.import-step:first-child { margin-top: 0; }
.import-step > span { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--rz-primary); color: #fff; font-size: .8rem; }
.import-step > span .rzi { font-size: 16px; }
.import-env { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: .875rem; }
.import-env dt { color: var(--rz-text-secondary-color); }
.import-env dd { margin: 0; font-weight: 600; }
.import-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.import-mode { margin-top: 10px; }
.import-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; border: 2px dashed var(--rz-base-300); border-radius: 10px; color: var(--rz-text-secondary-color); text-align: center; cursor: pointer; }
.import-drop:hover { border-color: var(--rz-primary); background: var(--rz-primary-lighter); }
.import-drop.disabled { opacity: .5; cursor: default; }
.import-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.import-drop .rzi { font-size: 32px; color: var(--rz-primary); }
.import-files { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.import-files li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: var(--rz-base-100); border-radius: 6px; font-size: .875rem; }
.import-files .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-files .size { color: var(--rz-text-secondary-color); font-size: .8rem; }
.import-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.import-error { white-space: pre-wrap; font-weight: 600; margin-bottom: 6px; }
.import-result { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .875rem; }
.import-result th, .import-result td { padding: 6px 10px; border-bottom: 1px solid var(--rz-base-200); text-align: left; }
.import-result td:last-child, .import-result th:last-child { text-align: right; }
.import-result small { margin-left: 8px; color: var(--rz-text-secondary-color); }
body:has(.login-page) { margin: 0; }

/* 配送員の Excel 取り込み */
.ri-format { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 8px; background: var(--rz-base-100); margin-bottom: 8px; }
.ri-format-actions { display: flex; align-items: center; gap: 8px; }
.ri-step { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 16px 0 8px; }
.ri-step > span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--rz-primary); color: #fff; font-size: .75rem; }
.ri-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ri-badge { padding: 2px 10px; border-radius: 999px; font-size: .8125rem; }
.ri-badge.new { background: var(--center-info-bg, #dcecf6); }
.ri-badge.exists { background: #fff3cd; }
.ri-badge.error { background: #f8d7da; }
.ri-alert { margin-top: 10px; }
.ri-grid small { color: var(--rz-text-secondary-color); }
.menu-card-admin { border-style: dashed; }
.kankyo-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; padding: 2px 6px; border-radius: 4px; background: #f1f3f5; }
.cell-wrap { white-space: normal; line-height: 1.35; overflow-wrap: anywhere; }

/* 配送員画面の確認 */
.preview-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.preview-phone {
    width: 390px; height: 760px; max-width: 100%; flex: none;
    border: 10px solid #222; border-radius: 28px; overflow: hidden; background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.preview-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-side { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 16px; }
.preview-side h4 { margin: 0 0 8px; }
.preview-side ol { margin: 0; padding-left: 1.2em; line-height: 1.7; }
.preview-banner {
    background: #fff4e5; border: 1px solid #f0b46a; color: #7a4a00;
    border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.85rem;
}
.preview-qr { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.preview-qr img { width: 132px; height: 132px; image-rendering: pixelated; border: 1px solid #eee; }
.menu-url > span:last-child { display: flex; flex: none; }

/* 終了済みの環境 */
.ended-banner {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px;
    border-radius: 6px; background: #eceff3; border: 1px solid #c5ccd6; color: #3a4553; font-size: 0.85rem;
}

/* 管理者向けマニュアル */
.manual { max-width: 900px; line-height: 1.8; }
.manual h1 { font-size: 1.3rem; margin: 0 0 4px; }
.manual h2 { font-size: 1.05rem; margin: 28px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #e3e6ea; }
.manual h2:first-of-type { margin-top: 16px; }
.manual h3 { font-size: 0.95rem; margin: 20px 0 6px; }
.manual p, .manual li { font-size: 0.88rem; }
.manual ul, .manual ol { padding-left: 1.4em; }
.manual li { margin: 2px 0; }
.manual table { border-collapse: collapse; margin: 8px 0 12px; }
.manual th, .manual td { border: 1px solid #dfe3e8; padding: 5px 10px; font-size: 0.85rem; vertical-align: top; text-align: left; }
.manual th { background: #f4f6f8; white-space: nowrap; }
.manual blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #c9d2dc; background: #f7f9fb; color: #44505f; font-size: 0.85rem; }
.manual code { background: #f1f3f5; padding: 1px 5px; border-radius: 3px; font-size: 0.82rem; }
.ended-banner.paused { background: #fff4e5; border-color: #f0b46a; color: #7a4a00; }

/* 通知の設定 */
.notify-layout { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.notify-card h3 { margin: 0 0 4px; font-size: 1rem; }
.notify-card .form-grid { margin-top: 12px; }
.notify-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.notify-list { margin: 8px 0 0; padding-left: 1.2em; line-height: 1.8; font-size: 0.85rem; }

/* 案内図（施設ごとの PDF） */
.annaizu-layout { display: flex; flex-direction: column; gap: 12px; }
.annaizu-info { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.annaizu-file { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.annaizu-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; margin-right: 4px; border: 1px solid var(--rz-primary); border-radius: 6px; color: var(--rz-primary); font-size: 0.8125rem; cursor: pointer; }
.annaizu-pick:hover { background: var(--rz-primary-lighter); }
.annaizu-pick.disabled { opacity: .5; cursor: default; }
.annaizu-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.annaizu-pick .rzi { font-size: 16px; }
