
.clear { clear:both; }

table {
	border: 1px solid #ccc;
	color:#333;
	background-color: #fff;
}

table th {
	background-color: #0071be;
	color: #fff;
	text-align: left;
	padding: 4px 4px;
	white-space: nowrap;
}

table th a { color: #fff; }

table th a:hover { color: #ccc; }

table tr td {
  vertical-align:center;
	text-align: center;
}
/* 縦罫線は旧版と同じく一覧テーブルだけに引く */
table.ichiran {
	border-right: none;
}
table.ichiran tr td {
	border-right: 1px solid #ddd;
}
table tr td:nth-of-type(9) {
	white-space: nowrap;
}

#ichiran_table td {
	vertical-align: middle;
}

form#sel_form td {
	border-bottom: 1px solid #ddd;
}

form.nav_form {
	margin: 0;
	padding: 0;
}

/* 選択中アイテムのハイライト（表形式の行・写真一覧のカード共通） */
form#sel_form .marked {
	background-color: #C8EBFF;
	color: #555;
	border: 1px solid #09F;
	border-radius: 8px;
}

.nav {
	width: auto;
	border: 1px solid #ccc;
	border-radius: 8px;
}

.nav td {
	border: 0px;
	padding: 4px;
	vertical-align: middle;
	white-space: nowrap;
}

.nav td span {
	display: inline-block;
	white-space: nowrap;
}

.nav td span a {
	display: inline-block;
	white-space: nowrap;
}

/*
 * 旧版のページング操作はネイティブの submit ボタン。新版は共有可能なGET
 * リンクへ変更しているため、ブラウザ既定のボタン（角丸2px・1px枠）と
 * 同じ寸法・見た目になるよう箱を作る。
 */
.nav a.nav_top,
.nav a.nav_before,
.nav a.nav_next,
.nav a.nav_last {
	display: inline-block;
	padding: 3px;
	color: #000;
	text-decoration: none;
	background-color: #efefef;
	border: 1px solid #767676;
	border-radius: 2px;
}

.nav a.nav_top:hover,
.nav a.nav_before:hover,
.nav a.nav_next:hover,
.nav a.nav_last:hover {
	background-color: #e5e5e5;
}

/* 無効時はブラウザ既定の disabled ボタンと同じ配色にする */
.nav span.nav_top.disabled,
.nav span.nav_before.disabled,
.nav span.nav_next.disabled,
.nav span.nav_last.disabled {
	display: inline-block;
	padding: 3px;
	color: rgba(16, 16, 16, 0.3);
	background-color: rgba(239, 239, 239, 0.3);
	border: 1px solid rgba(118, 118, 118, 0.3);
	border-radius: 2px;
}

/* 旧版の検索モード切替はネイティブの submit ボタン。新版はGETリンクなので同じ見た目にする。 */
.actions a.nav_search,
.actions a.nav_hide {
	display: inline-block;
	padding: 3px;
	color: #000;
	text-decoration: none;
	background-color: #efefef;
	border: 1px solid #767676;
	border-radius: 2px;
}

.orderinfo td {
	text-align: left;
}

.searchinfo td {
	border-bottom: 1px solid #ddd;
	border-left: 0.5px solid #ddd;
	text-align: left;
}

.search_box table,
table.status_box {
	border: 1px solid #ccc;
	border-radius: 8px;
}

/*
 * 検索ボックス（195px幅）へ収めるための幅指定。
 * edit/add フォームは同じ id を使うため、.search_box 配下に限定して
 * 入力欄が短くならないようにする。
 */
.search_box #ImageKeyword,
.search_box #ImageName,
.search_box #ImageSubcat1,
.search_box #ImageFilename {
	width: 7em;
}

#filefield {
	width: 180px;
	margin-bottom: 16px;
}

.searchfil td {
	border-left: 0.5px solid #ddd;
	border-bottom: 1px solid #ddd;
	padding:4px 4px;
	vertical-align:top;
	text-align: left;
}

.row-0 { background-color: #def3f7; }

.row-0:hover { background-color: #ecfbd4; }

.row-1 { background-color: #f7fbff; }

.row-1:hover { background-color: #ecfbd4; }

td.thumb { background-color: #ffffff; }

legend {
	color: gray;
	font-size: 16px;
	font-weight: bold;
	padding: 0 4px;
}

div.info_box { padding: 20px 20px; }

/*
 * 旧版は XHTML 1.0 Transitional のため Almost Standards Mode で描画され、
 * 画像やテキストエリアだけの行にベースライン下の余白（約3px）が付かない。
 * 新版は HTML5 の Standards Mode なので、同じ高さになるよう余白を打ち消す。
 */
div.info_box img,
div.info_box textarea,
.tdo-photo-item img,
#ichiran_table img {
	vertical-align: bottom;
}

/* Download cart: keep styles scoped to the cart and its confirmation page. */
div#downlist_box {
	box-sizing: border-box;
	border: 1px solid #ccdce8;
	border-top: 3px solid #0071be;
	border-radius: 8px;
	padding: 12px 10px 8px;
	margin-top: 24px;
	background: #f7fafc;
	line-height: 1.6;
}
div#downlist_box h3 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	color: #23465e;
	font-size: 12px;
	margin: 0 0 12px;
	padding: 0;
}
.download-cart-count {
	flex-shrink: 0;
	padding: 1px 7px;
	border-radius: 12px;
	background: #e4eff7;
	color: #075c98;
	font-variant-numeric: tabular-nums;
}
.download-cart-count, .download-cart-count span { font-size: 11px; }
div#downlist_box.is-drag-over {
	border-color: #0071be;
	background: #e9f6ff;
	box-shadow: 0 0 0 2px #b8dff9;
}
.download-cart-drop-message {
	margin: 0 0 10px;
	padding: 12px 2px;
	border: 1px dashed #93b5cf;
	border-radius: 5px;
	background: #fff;
	color: #416781;
	text-align: center;
	font-size: 11px;
}
.download-cart-drop-message span { margin-right: 4px; }
.download-cart-items {
	max-height: 300px;
	overflow-y: auto;
}
.download-cart-item {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding: 10px 0;
	border-bottom: 1px solid #dce6ed;
	overflow-wrap: anywhere;
}
.download-cart-item img {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	object-fit: contain;
	border: 1px solid #e0e7ed;
	border-radius: 4px;
	background: #fff;
}
.download-cart-item span { flex: 1; min-width: 0; color: #607484; font-size: 10px; }
.download-cart-item strong { color: #283f50; font-size: 11px; font-weight: 600; }
.download-cart-item em { color: #a23535; font-size: 10px; font-style: normal; }
.download-cart-empty { margin: 12px 0 16px; color: #607484; font-size: 11px; }
.download-cart-error {
	margin: 10px 0;
	padding: 10px;
	border: 1px solid #efc7c7;
	border-radius: 5px;
	background: #fff2f2;
	color: #a23535;
	font-size: 12px;
}
.download-cart-ready-form { margin: 12px 0 0; }
#downlist_box button, .download-cart-ready button, .download-cart-back, #download-cart-add-checked {
	box-sizing: border-box;
	border: 1px solid #b8ccd9;
	border-radius: 5px;
	padding: 7px 10px;
	background: #fff;
	color: #285c7e;
	font: inherit;
	line-height: 1.5;
	cursor: pointer;
}
#downlist_box .download-cart-remove {
	flex: 0 0 24px;
	padding: 0;
	width: 24px;
	height: 26px;
	border-color: transparent;
	background: transparent;
	color: #637988;
	font-size: 18px;
	line-height: 24px;
}
#downlist_box .download-cart-ready-form button, .download-cart-ready button {
	border-color: #0065a9;
	background: #0071be;
	color: #fff;
	font-weight: bold;
}
#downlist_box .download-cart-ready-form button { width: 100%; white-space: nowrap; }
.download-cart-note { margin: 5px 0 8px; color: #607484; text-align: center; font-size: 10px; }
#downlist_box .download-cart-clear {
	width: 100%;
	padding: 5px;
	border-color: transparent;
	background: transparent;
	color: #607484;
	font-size: 11px;
}
#downlist_box button:hover:not(:disabled), .download-cart-back:hover, #download-cart-add-checked:hover { background: #e7f1f8; }
#downlist_box .download-cart-ready-form button:hover:not(:disabled), .download-cart-ready button:hover { background: #005f9f; }
#downlist_box .download-cart-remove:hover, #downlist_box .download-cart-clear:hover:not(:disabled) { background: #fcecec; color: #a23535; }
#downlist_box button:disabled {
	border-color: #dce4ea;
	background: #e9eef2;
	color: #788792;
	cursor: default;
}
#downlist_box .download-cart-clear:disabled { border-color: transparent; background: transparent; color: #87949d; }
#downlist_box button:focus-visible, .download-cart-ready button:focus-visible, .download-cart-back:focus-visible, #download-cart-add-checked:focus-visible {
	outline: 2px solid #0071be;
	outline-offset: 3px;
}
.download-cart-drag { cursor: grab; }
.download-cart-drag:active { cursor: grabbing; }
.download-cart-handle { width: auto; padding: 0 4px; }
.is-in-download-cart { outline: 2px solid #78b82a; outline-offset: -2px; }
.download-cart-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 6px; }
#download-selection-count { color: #285c7e; font-weight: bold; }
.download-selection-help { margin: 0 0 12px; color: #607484; font-size: 11px; line-height: 1.6; }
.tdo-photo-item[data-image-id], #ichiran_table tr[data-image-id] {
	user-select: none;
	-webkit-user-select: none;
	cursor: grab;
}
.tdo-photo-item.is-selected, .tdo-photo-item.is-selected:hover,
#ichiran_table tr.is-selected, #ichiran_table tr.is-selected:hover {
	outline: 2px solid #0071be;
	outline-offset: -2px;
	background: #dceeff;
}
#ichiran_table tr.is-selected td.thumb { background: #dceeff; }
.tdo-photo-item[data-image-id]:focus-visible, #ichiran_table tr[data-image-id]:focus-visible {
	outline: 2px dashed #0071be;
	outline-offset: 1px;
}
.tdo-photo-item.is-dragging, #ichiran_table tr.is-dragging { opacity: 0.6; }
.download-cart-ready {
	box-sizing: border-box;
	max-width: 1040px;
	margin: 28px auto 48px;
	padding: 0 24px 0 13px;
	line-height: 1.7;
}
.download-cart-ready h2 { padding: 0; color: #23465e; font-size: 22px; }
.download-cart-intro { margin: 8px 0 24px; color: #607484; font-size: 13px; }
.download-cart-summary { display: flex; float: none; width: auto; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; line-height: inherit; }
.download-cart-summary > div {
	flex: 1 1 180px;
	padding: 16px 20px;
	border: 1px solid #dce6ed;
	border-radius: 8px;
	background: #f7fafc;
}
.download-cart-summary dt { color: #607484; }
.download-cart-summary dd { margin: 6px 0 0; }
.download-cart-summary strong { color: #23465e; font-size: 24px; font-variant-numeric: tabular-nums; }
.download-cart-summary small { display: block; color: #607484; font-size: 11px; }
.download-cart-ready .download-cart-warning { margin: 12px 0; color: #9a5720; }
.download-cart-table-wrap { overflow-x: auto; border: 1px solid #dce6ed; border-radius: 8px; }
.download-cart-ready table { width: 100%; margin: 0; border: 0; border-collapse: collapse; }
.download-cart-ready th {
	padding: 12px 16px;
	border: 0;
	background: #edf3f7;
	color: #416079;
	font-weight: 600;
}
.download-cart-ready td { padding: 14px 16px; border: 0; border-top: 1px solid #e2eaf0; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.download-cart-ready .download-cart-size { text-align: right; white-space: nowrap; }
.download-cart-status { display: inline-block; padding: 3px 8px; border-radius: 4px; background: #eaf4ed; color: #326644; white-space: nowrap; font-size: 11px; }
.download-cart-status.is-missing { background: #fff1e4; color: #9a5720; white-space: normal; }
.download-cart-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; }
.download-cart-back { display: inline-block; text-decoration: none; padding: 10px 16px; }
.download-cart-ready button { padding: 11px 24px; font-size: 13px; }
@media (max-width: 600px) {
	.download-cart-ready { margin-top: 20px; padding: 0 16px 0 5px; }
	.download-cart-ready h2 { font-size: 18px; }
	.download-cart-summary { gap: 8px; }
	.download-cart-summary > div { flex-basis: 110px; padding: 12px; }
	.download-cart-ready th, .download-cart-ready td { padding: 10px; }
	.download-cart-actions { align-items: stretch; flex-direction: column-reverse; }
	.download-cart-actions form, .download-cart-actions button { width: 100%; }
	.download-cart-back { text-align: center; }
}

/* CakePHP 1.1版の写真一覧互換 */
.tdo-photo-item {
	height: 200px;
	margin: 0 3px 4px 0;
	border: 1px solid #fff;
	padding: 4px;
}
.tdo-photo-item:hover { background-color: #ecfbd4; }
.tdo-photo-item .itemMiniTxt {
	font-size: 10px;
	color: #a2a2a2;
	font-family: Osaka-mono, "MS Gothic", monospace;
	line-height: 1;
}
.tdo-photo-item .itemNameTxt {
	font-family: Verdana, "游ゴシック", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	line-height: 1;
	margin-top: 4px;
}
.tdo-photo-item p.action {
	padding: 2px;
	background-color: #eee;
}
.tdo-photo-item p.action a {
	font-size: 10px;
	text-decoration: none;
	padding: 2px;
}
.tdo-photo-item p.action a:hover {
	color: #FFF;
	background-color: #000;
}

div.info_box table {
	width: 340px;
	border: 1px solid #ccc;
	color:#333;
	background-color: #fff;
}

div.info_box table td {
	border: 1px solid #ddd;
	padding:4px 4px;
	vertical-align:center;
	text-align: left;
}
#haiban_edit_form {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
#haiban_edit_form .btn_selectall {
	margin-right: 16px;
}
#haiban_edit_form input[type="submit"] {
	padding: 6px 24px;
}
.btn-log {
	margin-bottom: 16px;
}
.btn-log a {
	display: inline-block;
	text-decoration: none;
}
.btn-log .btn-log-link {
	padding: 6px 24px;
	color: #000;
	background-color: #efefef;
	border: 1px solid #a6a6a6;
	border-radius: 4px;
}
.btn-log .btn-log-link:hover {
	background-color: #e5e5e5;
}

/* DBインポート機能 共通 */
.import-fieldset { padding: 12px 16px 16px; margin: 16px 0; }
.import-fieldset legend { padding: 0 6px; font-weight: bold; }

/* インポート: ジョブ状態バナー */
.import-status-banner {
	padding: 14px 18px;
	margin: 12px 0;
	font-size: 16px;
	font-weight: bold;
	border-radius: 4px;
	border: 2px solid #ccc;
	background: #f5f5f5;
	color: #333;
}
.import-status-banner.is-completed { border-color: #2e7d32; background: #e8f5e9; color: #1b5e20; }
.import-status-banner.is-failed    { border-color: #c62828; background: #ffebee; color: #b71c1c; }
.import-status-banner.is-cancelled { border-color: #ef6c00; background: #fff3e0; color: #e65100; }
.import-status-banner.is-running   { border-color: #1976d2; background: #e3f2fd; color: #0d47a1; }

/* インポート: 検証結果ブロック（Step4 / Step6） */
.import-validation-block {
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid #ddd;
	background: #f8f8f8;
	border-radius: 3px;
}
.import-validation-block.is-ok    { border-color: #2e7d32; background: #f1f8f1; }
.import-validation-block.is-error { border-color: #c62828; background: #fff5f5; }
.import-validation-block strong   { font-size: 14px; }

/* インポート: ステータス・件数バッジ */
.import-badge {
	display: inline-block;
	padding: 1px 8px;
	margin-left: 6px;
	font-size: 12px;
	font-weight: bold;
	border-radius: 3px;
}
.import-badge.is-ok    { background: #2e7d32; color: #fff; }
.import-badge.is-error { background: #c62828; color: #fff; }

/* インポート: 不整合カウントの強調 */
.import-issue-count {
	color: #c62828;
	font-weight: bold;
}
.import-issue-count strong { color: #c62828; }

/* インポート: 不整合ファイル一覧 (折りたたみ) */
.import-issue-block {
	margin: 8px 0;
	padding: 8px 12px;
	border-radius: 3px;
	border: 1px solid;
}
.import-issue-block.is-warn  { background: #fff8e1; border-color: #f9a825; }
.import-issue-block.is-error { background: #ffebee; border-color: #c62828; }
.import-issue-block summary {
	cursor: pointer;
	padding: 2px 0;
}
.import-issue-block summary strong { font-size: 13px; }
.import-issue-block-count {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	font-size: 12px;
	font-weight: bold;
	background: #c62828;
	color: #fff;
	border-radius: 10px;
}
.import-issue-block.is-warn .import-issue-block-count { background: #f9a825; color: #000; }
.import-issue-list {
	margin: 6px 0 0;
	padding: 6px 0 0 24px;
	max-height: 240px;
	overflow-y: auto;
	font-family: Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
}
.import-issue-list li { margin: 2px 0; }

/* インポート: サンプル行の見やすい一覧 */
.import-sample-list {
	margin: 6px 0;
	padding: 0 0 0 20px;
	font-size: 12px;
}

/* インポート: 次ステップ案内ブロック */
.import-next-step {
	margin-top: 12px;
	padding: 10px 12px;
	border: 2px solid #1976d2;
	background: #e3f2fd;
	border-radius: 3px;
}

/* インポート: ダウンロードリンク */
.import-download-link {
	color: #1565c0;
	font-weight: bold;
	text-decoration: underline;
}
.import-download-link:hover { color: #0d47a1; }

/* インポート: セッション一覧 (merge + image_sync をまとめて表示) */
.import-session-block {
	margin: 12px 0;
	border: 1px solid #cfd8dc;
	border-radius: 4px;
	background: #fafbfc;
	overflow: hidden;
}
.import-session-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 12px;
	background: #eceff1;
	font-size: 13px;
	border-bottom: 1px solid #cfd8dc;
}
.import-session-label { font-weight: bold; color: #37474f; }
.import-session-protect {
	display: inline-block;
	padding: 1px 8px;
	font-size: 12px;
	font-weight: bold;
	border-radius: 3px;
}
.import-session-protect.is-prod   { background: #c62828; color: #fff; }
.import-session-protect.is-dryrun { background: #757575; color: #fff; }
.import-session-time { color: #607d8b; font-size: 12px; margin-left: auto; }

.import-session-jobs {
	list-style: none;
	margin: 0;
	padding: 0;
}
.import-session-job {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-top: 1px dashed #e0e0e0;
	font-size: 13px;
}
.import-session-job:first-child { border-top: none; }
.import-session-job.is-pending-next { background: #fff8e1; }
.import-session-job-step {
	font-weight: bold;
	color: #263238;
	min-width: 180px;
}
.import-session-job-meta { color: #546e7a; font-size: 12px; }
.import-session-job-link {
	margin-left: auto;
	color: #1565c0;
	text-decoration: underline;
	font-size: 12px;
}

/* インポート: ステータス pill */
.import-status-pill {
	display: inline-block;
	padding: 1px 10px;
	font-size: 12px;
	font-weight: bold;
	border-radius: 12px;
	border: 1px solid;
}
.import-status-pill.is-ok      { background: #e8f5e9; color: #1b5e20; border-color: #2e7d32; }
.import-status-pill.is-error   { background: #ffebee; color: #b71c1c; border-color: #c62828; }
.import-status-pill.is-info    { background: #e3f2fd; color: #0d47a1; border-color: #1976d2; }
.import-status-pill.is-pending { background: #fff8e1; color: #ef6c00; border-color: #fb8c00; }

/* インポート: 関連ジョブ表示 (running 画面) */
.import-related-jobs {
	margin: 8px 0;
	padding: 6px 10px;
	background: #f5f5f5;
	border: 1px dashed #bdbdbd;
	border-radius: 3px;
	font-size: 13px;
}
.import-related-jobs a { color: #1565c0; text-decoration: underline; }
