koy-layout-header {
	align-items: center;
	background-color: #7ebeab;
	color: #e0f2f1;
	display: flex;
	vertical-align: bottom;
}

koy-layout-header a {
	color: #fff;
}

koy-layout-header h1 {
	flex-grow: 1;
}

#menu {
	border-right: 1px solid #E8F5E9;
	font-size: 1.1rem;
	width: 13em;
}

#menu .material-icons {
	margin-right: 0.5em;
	padding-bottom: 0.1em;
}

#menu footer {
	font-size: 0.8em;
	margin-top: 2rem;
	text-align: center;
}

body > koy-layout > article {
	opacity: 0;
}

fieldset.work-detail fieldset {
	margin-top: 0.5em;
}

.show-admin, .show-manager, .operator-show {
	display: none !important;
}

.role-admin .show-admin {
	display: block !important;
}

.role-manager .show-manager {
	display: block !important;
}

.role-operator .operator-show {
	display: block !important;
}

/* 設定「現場エリア」が無効なときの現場エリアの選択欄（avoms.js の setUpSiteAreaSelect が有効なら外す）。
   選択欄は値を送るためにフォームに残し、見せないだけにする */
.site-area-off {
	display: none !important;
}

/* 設定が無効な機能のメニュー（avoms.js の updateConfigMenus）。ロールで出す指定（!important）より強くする */
.menu-config-off,
.role-admin .show-admin.menu-config-off,
.role-manager .show-manager.menu-config-off {
	display: none !important;
}

.role-manager .hide-manager {
	display: none !important;
}

.role-operator .operator-hide {
	display: none !important;
}

.cannot-delete .koy-manager-delete {
	display: none !important;
}

td.number {
	text-align: right;
}

.outside-link {
	color: #0288d1 !important;
	cursor: pointer;
	text-decoration: underline;
}

koy-dialog-content {
	width: auto !important;
	max-width: 95%;
	min-width: 480px;
}

@media ( max-width : 480px) {
	koy-dialog-content {
		width: auto !important;
		max-width: 100% !important;
		min-width: auto;
	}
}

.work-form, .invoice-form {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.work-form .koy-input, .work-form koy-group, .invoice-form .koy-input, .invoice-form koy-group {
	box-sizing: border-box;
	width: 50%;
}

.work-form td .koy-input, .invoice-form td .koy-input {
	width: auto;
}

.work-form .koy-input.form-short, .invoice-form .koy-input.form-short {
	box-sizing: border-box;
	width: 25%;
}

.work-form .koy-input.form-long, .invoice-form .koy-input.form-long {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 100%;
}

.work-form .koy-form-group, .invoice-form .koy-form-group {
	box-sizing: border-box;
	width: 100%;
	min-width: 100%;
	max-width: 100%;
}

.work-form .koy-form-group > div, .invoice-form .koy-form-group > div {
	display: flex;
	flex-wrap: wrap;
}

.work-form .koy-form-group koy-checkbox, .invoice-form .koy-form-group koy-checkbox {
	align-items: center;
	display: flex;
	width: 10rem;
}

.work-form .koy-input-label, .invoice-form .koy-input-label {
	width: 10em;
}

.work-form .koy-form-group .koy-input-label, .invoice-form .koy-form-group .koy-input-label {
	white-space: nowrap;
}

.work-buttons {
	text-align: right;
	width: 100%;
}

.work-form .input-hide, .invoice-form .input-hide {
	display: none !important;
}

.work-form input[name="customerName"] {
	padding-right: 2em;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><text x='0' y='15' font-size='14'>様</text></svg>");
	background-repeat: no-repeat;
	background-position: right 6px center;
}

#reservation-notification, #alcohol_check-notification, #gncs-notification,
#wna-notification, #system_config-notification {
	animation: notification 0.5s ease-in-out infinite alternate;
	font-size: 1.5em;
}

.customer-name-column::after {
	content: ' 様';
}

#number-images, #seat-images, #status-images, #work-images {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
}

/* 作業写真の包み要素。原本を削除した写真はリンクを張らず span になるため、
   タグではなくクラスで指定する（改修仕様書 4.7） */
.work-image-item {
	position: relative;
	margin-right: 1rem;
	margin-bottom: 1rem;
}

/* 作業フォームの預かり事業所の住所・電話番号（改修仕様書「預かり事業所の住所と電話番号」5.1）。
   二次搬送の現場住所の下に、表示だけで出す。.work-form は項目を横に並べるため、幅を決めないと縮んで次の項目
   （顧客名）が右横に並ぶ。1 行を占めさせる */
#work-store-office {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1rem;
}
#work-store-office > div {
	align-items: baseline;
	display: flex;
	flex-wrap: nowrap;
}
/* 行の間は見えている行どうしにだけ空ける（値の空の行は koy-hide で隠すため、隠れた行の後ろに隙間を付けない） */
#work-store-office > div:not(.koy-hide) ~ div:not(.koy-hide) {
	margin-top: 0.75rem;
}
/* 見出しは koyori の入力欄の見出し（.work-form .koy-input-label の 10em・右寄せ・太字）に揃える。koyori が
   幅を揃えるのは name を持つ入力欄だけのため、ここで同じ形にする */
.work-store-office-label {
	box-sizing: border-box;
	flex: 0 0 auto;
	font-weight: bold;
	padding-right: 0.5em;
	text-align: right;
	width: 10em;
}
/* 値は入力欄の文字の位置（枠 1px と余白 0.5em の内側）に揃え、長い住所は値の列の中で折り返す。隊員アプリでは
   押すと地図・電話を開くため、押せる範囲を文字の幅に留めて行の右端まで伸ばさない */
.work-store-office-value {
	flex: 0 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
	padding-left: calc(0.5em + 1px);
}
@media ( max-width : 800px) {
	/* 狭い画面では koyori の入力欄と同じく、見出しを上に左寄せで出し、値をその下に出す */
	#work-store-office > div {
		flex-wrap: wrap;
	}
	#work-store-office > div:not(.koy-hide) ~ div:not(.koy-hide) {
		margin-top: 1rem;
	}
	.work-store-office-label {
		margin-bottom: 0.25rem;
		text-align: left;
		width: 100%;
	}
}

/* 事業所管理と搬送先管理の一覧の電話番号（改修仕様書「預かり事業所の住所と電話番号」5.2・「搬送先マスタ」2.3）。
   ハイフンの位置で折り返さない（住所は koyori の既定のまま折り返す） */
#datagrid td.office-phone-data,
#datagrid td.destination-phone-data {
	white-space: nowrap;
}

/* 作業フォームの「同意・署名」欄（改修仕様書「作業同意チェックと電子署名」7 章） */
/* 「同意・署名」欄と「外観チェック」欄の下に余白を足す（人間の指示。2026-10-04）。2 つの欄は管理画面の
   5 画面だけに出る（_work_form.html の setUpWorkAgreementField） */
#work-agreement-field, #work-appearance-field {
	padding-bottom: 1rem;
}
.work-agreement-section + .work-agreement-section {
	margin-top: 1rem;
}
.work-agreement-title {
	font-weight: bold;
}
.work-agreement-record {
	margin: 0.25rem 0 0.5rem 1rem;
}
/* 同意の文章は改行を保って出す（文章は textContent で入れる） */
.work-agreement-items {
	list-style: none;
	margin: 0.25rem 0;
	padding: 0;
}
.work-agreement-items > li {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.work-agreement-items > li::before {
	content: '☑ ';
}
/* 選択グループで選ばれなかった項目（改修仕様書「同意項目の選択グループ」6 章） */
.work-agreement-items > li.work-agreement-item-unchecked {
	color: #757575;
}
.work-agreement-items > li.work-agreement-item-unchecked::before {
	content: '☐ ';
}
.work-agreement-signature-image img {
	max-width: 300px;
	max-height: 150px;
	border: 1px solid #ccc;
	background: #fff;
}
.work-agreement-none {
	margin-left: 1rem;
	color: #666;
}
.work-agreement-history {
	margin-left: 1rem;
}
/* 作業フォームの「外観チェック」欄（改修仕様書「外観チェック」7 章）。記録の出し方は「同意・署名」欄と同じ */
/* 最新の記録の下に「過去の記録」を置く。作業フォームの欄の直下の div は横に並べて折り返す指定
   （.work-form .koy-form-group > div）のため、画像の幅が広いと「過去の記録」が右横に並んでいた
   （2026-09-29 に実サーバで確認） */
#work-appearance-records {
	flex-direction: column;
	align-items: flex-start;
}
/* 向きの画像を 2 列に並べるため、記録の幅を欄いっぱいにする（flex-start のままでは中身の幅に縮む） */
#work-appearance-records > .work-agreement-record,
#work-appearance-records > .work-agreement-history {
	align-self: stretch;
}
/* 向きの画像は 2 列、幅が足りなければ 1 列（2026-10-07 の向き別の図。同 7 章）。1 列の最小の幅を
   280px とし、全体の幅を 3 列が入らない 816px までにして、3 列以上にしない */
.work-appearance-views {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 0.5rem 1rem;
	max-width: 816px;
	margin: 0.25rem 0;
}
.work-appearance-view-marks {
	margin-left: 0.5rem;
}
.work-appearance-image {
	display: inline-block;
	max-width: 100%;
}
.work-appearance-image img {
	display: block;
	max-width: 100%;
	max-height: 200px;
	border: 1px solid #ccc;
	background: #fff;
}
.work-appearance-summary > span + span {
	margin-left: 1rem;
}
.work-appearance-memo {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* 作業の写真の欄（_work_form.html）。koyori の koy-input-file を、見出しの横の「＋」の丸いボタンに見せる。
   写真は選んだらすぐ送るため、koy-input-file のドロップ欄とサムネイルは使わない（buildImageArea） */
/* 作業のフォームの入力欄の幅（.work-form .koy-input。狭い画面では min-width: 100%）は当てない */
legend > koy-input-file.work-image-input.koy-input.koy-inline {
	margin: 0 0 0 0.5rem;
	max-width: none;
	min-width: 0;
	vertical-align: middle;
	width: auto;
}

koy-input-file.work-image-input > label {
	display: inline-block;
}

koy-input-file.work-image-input .koy-input-message {
	display: none;
}

koy-input-file.work-image-input.koy-input .koy-input-file-droparea {
	background-color: #0288d1;
	border: 0;
	border-radius: 50%;
	box-sizing: border-box;
	display: block;
	height: 2rem;
	min-height: 0;
	padding: 0;
	width: 2rem;
}

koy-input-file.work-image-input.koy-input:not([disabled]) .koy-input-file-droparea::after {
	border: 0;
	color: #fff;
	content: '＋';
	line-height: 2rem;
	margin: 0;
	text-align: center;
}

koy-input-file.work-image-input.koy-input .koy-input-file-droparea.koy-input-file-drag {
	background-color: #01579b;
}

button.image-delete-button {
	background-color: #999999;
	border-radius: 50%;
	border-width: 0;
	color: #fff;
	line-height: 2rem;
	position: absolute;
	top: 0;
	right: 0;
	text-align: center;
	width: 2.1rem;
}

.contact-target-all {
	margin: 0 0.5rem 0.5rem 0.5rem;
}

.contact-target-all >label {
	font-weight: bold;
}

.contact-target {
	display: flex;
	flex-wrap: wrap;
}

.contact-target > div {
	margin: 0 0.5rem 0.5rem 0.5rem;
}

.contact-target > div > label {
	margin-left: 0.1rem;
}

.read-workers > p {
	display:inline-block;
}

.koy-button>.koy-button-inner>.material-icons {
    padding: 0;
}

/* タスク管理の実行状態。常態の「待機中」は既定の文字色のままとし、注意して見る状態だけに色を付ける */
.task-status-running {
	color: #0288d1;
	font-weight: bold;
}

.task-status-error {
	color: #D32F2F;
	font-weight: bold;
}

/* パスワードなどの秘匿値の入力欄。type="password" を使わずに伏せ字で表示し、ブラウザに保存させない（avoms.js の setMaskedInput が付ける） */
.masked-input .koy-input-element {
	-webkit-text-security: disc;
}

/*
 * 説明の（？）アイコン（avoms.js の説明の吹き出しを参照）。
 * 画面の説明文は常に出さず、（？）アイコンをクリックした場合のみ吹き出しで表示する。
 */
.help-button {
	margin-left: 0.2em;
	padding: 0;
	border: none;
	background: none;
	color: #1976d2;
	line-height: 1;
	vertical-align: middle;
	cursor: pointer;
}

.help-button .material-icons {
	font-size: 18px;
}

/* 説明文の元の要素（（？）アイコンの data-help-target が指す）。吹き出しへ写して表示するため、常に隠す */
.help-content {
	display: none !important;
}

/*
 * 説明の吹き出し。一覧やダイアログのスクロール領域の内側に置くと切れるため、avoms.js が body の直下に
 * 置き、固定配置にする（位置はスクリプトで設定）。ダイアログ（koy-dialog の z-index: 100000000）の
 * 中の（？）アイコンでも手前に出す。ダイアログが開くときと閉じるときは avoms.js が吹き出しを閉じる。
 */
#help-popup {
	position: fixed;
	z-index: 100000001;
	width: 28em;
	max-width: calc(100vw - 16px);
	box-sizing: border-box;
	padding: 0.6em 0.8em;
	border-radius: 4px;
	background-color: #333;
	color: #fff;
	font-size: 0.85rem;
	font-weight: normal;
	line-height: 1.6;
	text-align: left;
	user-select: text;
}

/* 文字列で渡した説明文（システム設定の説明など）は、段落の区切り（改行）を保って表示する */
#help-popup.help-popup-text {
	white-space: pre-line;
}

@media ( max-width : 1200px) {
	.work-form .koy-input.form-short {
		width: 50%;
	}
}

@media ( max-width : 800px) {
	h1 {
		padding-left: 0.5rem;
	}
	.work-form .koy-input, .work-form koy-group {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 100%;
	}
	.work-form .koy-input.form-short {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 100%;
	}
}

@keyframes notification { 
	0% {
		color: #D32F2F;
	}
	100% {
		color: #FBC02D;
	}
}

/* 見出し（または一文）の直後に（？）アイコンを並べる。アイコンは見出しの外に置く（見出しの読み上げに混ぜない）。
   見出しは下に線と余白を持つため、上下の中央ではなく文字の基準線でそろえる */
.help-heading {
	display: flex;
	align-items: baseline;
}
/* 説明の要素（.help-content）から写した段落の間隔 */
#help-popup p {
	margin: 0 0 0.4em;
}
#help-popup p:last-child {
	margin-bottom: 0;
}
