/**
 * ミライズレンタカー 事前サイン CSS
 */

.mirais-presign {
	max-width: 700px;
	margin: 0 auto;
}

.mirais-presign-header {
	background: #fff;
	border: 1px solid var(--mirais-border);
	border-radius: 10px;
	padding: 18px 22px;
	margin-bottom: 18px;
}

.mirais-presign-header h2 {
	font-size: 18px;
	margin: 0 0 4px;
}

.mirais-presign-header .info {
	font-size: 12px;
	color: var(--mirais-text-sub);
}

/* ステッパー */
.mirais-presign-stepper {
	display: flex;
	gap: 0;
	background: #fff;
	border: 1px solid var(--mirais-border);
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 18px;
	overflow-x: auto;
}

.mirais-presign-step {
	flex: 1;
	min-width: 120px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px;
	color: var(--mirais-text-sub);
}

.mirais-presign-step .step-num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #eee;
	color: var(--mirais-text-sub);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
}

.mirais-presign-step .step-label {
	font-size: 12px;
	font-weight: 500;
}

.mirais-presign-step.active {
	color: var(--mirais-primary);
}

.mirais-presign-step.active .step-num {
	background: var(--mirais-primary);
	color: #fff;
}

.mirais-presign-step.done {
	color: var(--mirais-success);
}

.mirais-presign-step.done .step-num {
	background: var(--mirais-success);
	color: #fff;
}

/* コンテンツ */
.mirais-presign-content {
	background: #fff;
	border: 1px solid var(--mirais-border);
	border-radius: 12px;
	padding: 26px;
}

.mirais-presign-content h3 {
	font-size: 18px;
	margin: 0 0 6px;
}

.mirais-presign-content .lead {
	font-size: 13px;
	color: var(--mirais-text-sub);
	margin-bottom: 20px;
}

/* 免許証アップロード */
.mirais-license-uploader {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin: 20px 0;
}

.mirais-license-slot {
	border: 2px dashed var(--mirais-border);
	border-radius: 10px;
	padding: 18px;
	text-align: center;
	background: var(--mirais-bg-alt);
	cursor: pointer;
	transition: all 0.2s;
	aspect-ratio: 4/3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.mirais-license-slot:hover {
	border-color: var(--mirais-primary);
	background: var(--mirais-primary-light);
}

.mirais-license-slot.has-image {
	border-style: solid;
	border-color: var(--mirais-success);
	padding: 0;
}

.mirais-license-slot.has-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.mirais-license-slot .label {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.mirais-license-slot .desc {
	font-size: 11px;
	color: var(--mirais-text-sub);
}

.mirais-license-slot .replace {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11px;
	display: none;
}

.mirais-license-slot.has-image .replace {
	display: block;
}

.mirais-license-slot input[type="file"] {
	position: absolute;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	top: 0;
	left: 0;
}

/* 規約スクロールボックス */
.mirais-terms-box {
	background: var(--mirais-bg-alt);
	border: 1px solid var(--mirais-border);
	border-radius: 8px;
	padding: 18px;
	max-height: 280px;
	overflow-y: auto;
	font-size: 13px;
	line-height: 1.8;
	margin-bottom: 14px;
}

.mirais-terms-box h4 {
	font-size: 13px;
	margin: 14px 0 6px;
	font-weight: 600;
}

.mirais-terms-box h4:first-child {
	margin-top: 0;
}

.mirais-terms-box p {
	margin: 0 0 8px;
}

/* 同意チェック */
.mirais-agree-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	background: var(--mirais-primary-light);
	border-radius: 8px;
	margin-bottom: 16px;
	cursor: pointer;
}

.mirais-agree-row input[type="checkbox"] {
	margin-top: 3px;
	width: auto;
	flex-shrink: 0;
}

.mirais-agree-row span {
	font-size: 13px;
	font-weight: 500;
}

/* 署名パッド */
.mirais-signature-pad-wrap {
	background: #fff;
	border: 1px solid var(--mirais-border);
	border-radius: 8px;
	padding: 14px;
	margin: 16px 0;
}

.mirais-signature-label {
	font-size: 12px;
	color: var(--mirais-text-sub);
	margin-bottom: 8px;
	font-weight: 500;
}

.mirais-signature-pad {
	width: 100%;
	height: 180px;
	background: #fff;
	border: 2px dashed var(--mirais-border);
	border-radius: 6px;
	cursor: crosshair;
	touch-action: none;
}

.mirais-signature-pad.signed {
	border-style: solid;
	border-color: var(--mirais-success);
}

.mirais-signature-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

/* 車両受領 - 傷チェック */
.mirais-damage-section {
	background: #fffbed;
	border-left: 4px solid var(--mirais-accent);
	padding: 14px 18px;
	border-radius: 0 6px 6px 0;
	margin-bottom: 16px;
}

.mirais-damage-section h4 {
	font-size: 14px;
	margin: 0 0 8px;
	color: #6b4505;
}

.mirais-damage-section textarea {
	width: 100%;
	min-height: 80px;
	font-family: inherit;
}

/* アクションボタン */
.mirais-presign-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--mirais-bg-alt);
}

/* 完了画面 */
.mirais-presign-complete {
	text-align: center;
	padding: 40px 20px;
}

.mirais-presign-complete .check {
	width: 80px;
	height: 80px;
	background: var(--mirais-success);
	color: #fff;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	margin-bottom: 16px;
}

.mirais-presign-complete h2 {
	font-size: 22px;
	margin: 10px 0;
}

.mirais-presign-complete p {
	color: var(--mirais-text-sub);
	margin-bottom: 8px;
}

/* スマホ */
@media (max-width: 768px) {
	.mirais-presign-content { padding: 16px; }
	.mirais-license-uploader { grid-template-columns: 1fr; }
	.mirais-presign-stepper { padding: 10px; }
	.mirais-presign-step .step-label { display: none; }
	.mirais-presign-step { min-width: 50px; justify-content: center; padding: 0 4px; }
	.mirais-signature-pad { height: 150px; }
}

/* ==================== v1.31.24: 店頭車両チェック ==================== */
.svc-wrap {
	max-width: 880px;
	margin: 0 auto;
	font-size: 16px;
}
.svc-langbar {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.svc-lang-btn {
	padding: 8px 16px;
	border: 1px solid #C9C6BA;
	background: #fff;
	border-radius: 20px;
	font-size: 14px;
	cursor: pointer;
	color: #444;
}
.svc-lang-btn.active {
	background: #2055BC;
	color: #fff;
	border-color: #2055BC;
	font-weight: 600;
}
.svc-header { text-align: center; margin-bottom: 18px; }
.svc-header h2 { font-size: 24px; margin: 0 0 6px; color: #2055BC; }
.svc-sub { font-size: 14px; color: #666; margin: 0; }

.svc-info-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	background: #F5F8FB;
	border: 1px solid #D6E4F0;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 18px;
}
.svc-info-label { font-size: 11px; color: #888; margin-bottom: 2px; }
.svc-info-value { font-size: 15px; font-weight: 600; color: #1a1a1a; word-break: break-word; }

.svc-section {
	background: #fff;
	border: 1px solid #E0DED5;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 14px;
}
.svc-section h3 { font-size: 17px; margin: 0 0 10px; color: #2055BC; }
.svc-section-warn { background: #FFF8E1; border-color: #E5C36B; }
.svc-section-warn h3 { color: #5C4309; }
.svc-text { font-size: 15px; line-height: 1.8; color: #333; margin: 0; }
.svc-muted { color: #999; }
.svc-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #333; }
.svc-textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #C9C6BA;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	box-sizing: border-box;
}

.svc-damage-list { display: flex; flex-direction: column; gap: 10px; }
.svc-damage-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #FAFAF7;
	border: 1px solid #E8E6DD;
	border-radius: 8px;
	padding: 12px;
}
.svc-damage-no {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	background: #2055BC;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
}
.svc-damage-body { flex: 1; min-width: 0; }
/* v1.31.28: 傷の写真 (店頭チェック画面) */
.svc-damage-photo {
	flex-shrink: 0;
	width: 88px;
	height: 66px;
	border-radius: 6px;
	background: #fff center/cover no-repeat;
	border: 1px solid #E0DED5;
	display: block;
}
.svc-damage-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }

/* v1.31.28: お客様メールアドレス表示 + 送信チェックボックス */
.svc-email-section { }
.svc-email-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.svc-email-label {
	font-size: 12px;
	color: #5C5648;
	font-weight: 600;
}
.svc-email-value {
	font-size: 13px;
	color: #1A1A1A;
	font-family: monospace;
	word-break: break-all;
}
.svc-email-value.svc-muted { color: #999; font-family: inherit; }
.svc-sendmail-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #1A1A1A;
	cursor: pointer;
	padding: 10px 12px;
	background: #F5FAFE;
	border: 1px solid #CFE3F2;
	border-radius: 6px;
}
.svc-sendmail-label input { width: 18px; height: 18px; flex-shrink: 0; }
.svc-sendmail-label.svc-disabled {
	color: #999;
	cursor: not-allowed;
	background: #F5F4EE;
	border-color: #E0DED5;
}
.svc-tag {
	display: inline-block;
	padding: 3px 10px;
	background: #E8EEF4;
	color: #2055BC;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}
.svc-damage-note { font-size: 14px; color: #555; line-height: 1.6; }

.svc-sign-section { text-align: center; }
.svc-sign-lead { font-size: 14px; color: #555; margin: 0 0 10px; }
.svc-sign-wrap {
	border: 2px dashed #B0AEA3;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}
.svc-sign-canvas {
	width: 100%;
	height: 220px;
	display: block;
	touch-action: none;
	cursor: crosshair;
}
.svc-btn-clear { margin-top: 10px; }

.svc-actions { text-align: center; margin: 22px 0 40px; }
.svc-btn-submit {
	font-size: 18px;
	padding: 16px 48px;
	border-radius: 10px;
}

.svc-complete, .svc-already {
	text-align: center;
	background: #fff;
	border: 1px solid #E0DED5;
	border-radius: 12px;
	padding: 44px 24px;
}
.svc-check {
	width: 72px; height: 72px;
	margin: 0 auto 16px;
	background: #3B6D11;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
}
.svc-already-icon { font-size: 52px; margin-bottom: 10px; }
.svc-complete h2, .svc-already h2 { color: #2055BC; margin: 0 0 8px; }

/* タブレット */
@media (max-width: 900px) {
	.svc-info-grid { grid-template-columns: repeat(2, 1fr); }
}
/* スマホ */
@media (max-width: 600px) {
	.svc-wrap { font-size: 15px; }
	.svc-info-grid { grid-template-columns: 1fr; gap: 8px; }
	.svc-header h2 { font-size: 20px; }
	.svc-section { padding: 14px; }
	.svc-section h3 { font-size: 16px; }
	.svc-sign-canvas { height: 180px; }
	.svc-btn-submit { width: 100%; font-size: 16px; padding: 15px; }
	.svc-langbar { justify-content: center; }
}

/* ==================== 車両チェック確認書 (Phase 4 / v1.31.25) ==================== */
.vcr-toolbar {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
	padding: 12px 16px; background: #F5F4EE; border-radius: 8px;
}
.vcr-langsel { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #555; }
.vcr-lang-btn {
	padding: 5px 12px; border: 1px solid #C9C6BA; background: #fff;
	border-radius: 14px; font-size: 12px; cursor: pointer;
}
.vcr-lang-btn.active { background: #2055BC; color: #fff; border-color: #2055BC; }

.vcr-paper {
	background: #fff; border: 1px solid #E0DED5; border-radius: 8px;
	padding: 32px 36px; max-width: 720px; margin: 0 auto;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* v1.31.29: 確認書の電話番号下4桁 認証フォーム */
.vcr-auth {
	background: #fff; border: 1px solid #E0DED5; border-radius: 10px;
	padding: 36px 28px; max-width: 420px; margin: 20px auto;
	text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.vcr-auth-icon { font-size: 40px; margin-bottom: 8px; }
.vcr-auth-title { margin: 0 0 10px; font-size: 18px; color: #2055BC; }
.vcr-auth-lead { font-size: 13px; color: #5C5648; line-height: 1.7; margin: 0 0 18px; }
.vcr-auth-err {
	font-size: 12px; color: #A32D2D; background: #FDECEA;
	border-radius: 6px; padding: 8px 12px; margin: 0 0 14px;
}
.vcr-auth-row { display: flex; gap: 8px; justify-content: center; }
.vcr-auth-input {
	width: 140px; font-size: 20px; letter-spacing: 6px; text-align: center;
	padding: 10px 12px; border: 1px solid #CFC9BC; border-radius: 8px;
}
.vcr-auth-input:focus { outline: 2px solid #185FA5; border-color: #185FA5; }
.vcr-auth-btn {
	font-size: 14px; font-weight: 600; color: #fff; background: #185FA5;
	border: none; border-radius: 8px; padding: 10px 20px; cursor: pointer;
}
.vcr-auth-btn:disabled { opacity: 0.6; cursor: default; }
.vcr-head { text-align: center; border-bottom: 2px solid #2055BC; padding-bottom: 14px; margin-bottom: 20px; }
.vcr-sitename { font-size: 13px; color: #555; letter-spacing: 0.08em; }
.vcr-title { font-size: 22px; color: #2055BC; margin: 6px 0 0; }
.vcr-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.vcr-table th, .vcr-table td {
	border: 1px solid #E0DED5; padding: 9px 12px; font-size: 14px; text-align: left;
}
.vcr-table th { background: #F5F4EE; width: 32%; font-weight: 600; color: #333; }
.vcr-h2 {
	font-size: 15px; color: #2055BC; margin: 20px 0 8px;
	border-left: 4px solid #00A3B4; padding-left: 10px;
}
.vcr-damage-list { margin: 0; padding-left: 4px; list-style: none; }
.vcr-damage-list li {
	font-size: 14px; line-height: 1.7; padding: 6px 0;
	border-bottom: 1px dashed #E0DED5;
}
.vcr-muted { color: #888; font-size: 13px; }
.vcr-note {
	font-size: 14px; line-height: 1.7; background: #FAFAF7;
	border: 1px solid #E8E6DD; border-radius: 6px; padding: 10px 14px;
}
.vcr-sign-block { margin-top: 24px; }
.vcr-sign-label { font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 600; }
.vcr-sign-img {
	max-width: 280px; max-height: 120px; border: 1px solid #E0DED5;
	border-radius: 6px; background: #fff;
}
.vcr-footer {
	margin-top: 26px; font-size: 11px; color: #999; text-align: center;
	border-top: 1px solid #E0DED5; padding-top: 12px;
}

/* 印刷時: ツールバーを隠し、確認書だけをきれいに */
@media print {
	.no-print { display: none !important; }
	body { background: #fff !important; }
	.vcr-paper {
		box-shadow: none !important; border: none !important;
		max-width: 100% !important; padding: 0 !important; margin: 0 !important;
	}
	.mirais-theme .section, .mirais-theme .section-inner { padding: 0 !important; margin: 0 !important; }
	.vcr-table th { background: #F5F4EE !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.vcr-head { border-bottom: 2px solid #2055BC !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 600px) {
	.vcr-paper { padding: 20px 16px; }
	.vcr-toolbar { flex-direction: column; align-items: stretch; }
	.vcr-table th { width: 40%; }
}

/* v1.31.29: 返却傷レポート登録画面 */
.dmr-wrap { max-width: 560px; margin: 0 auto; }
.dmr-head { text-align: center; margin-bottom: 18px; }
.dmr-head h2 { font-size: 20px; color: #2055BC; margin: 0 0 6px; }
.dmr-sub { font-size: 12px; color: #666; line-height: 1.7; margin: 0; }
.dmr-info {
	background: #F5F4EE; border-radius: 8px; padding: 14px 16px; margin-bottom: 18px;
}
.dmr-info > div { display: flex; gap: 10px; padding: 3px 0; font-size: 13px; }
.dmr-info-l { color: #888; min-width: 72px; }
.dmr-info-v { color: #1A1A1A; font-weight: 600; }
.dmr-form {
	background: #fff; border: 1px solid #E0DED5; border-radius: 10px; padding: 20px;
}
.dmr-label {
	display: block; font-size: 13px; font-weight: 600; color: #5C5648;
	margin: 14px 0 5px;
}
.dmr-label:first-child { margin-top: 0; }
.dmr-req {
	font-size: 10px; background: #A32D2D; color: #fff;
	padding: 1px 6px; border-radius: 8px; margin-left: 4px; font-weight: normal;
}
.dmr-select, .dmr-textarea {
	width: 100%; box-sizing: border-box; font-size: 14px;
	padding: 10px 12px; border: 1px solid #CFC9BC; border-radius: 8px;
}
.dmr-select:focus, .dmr-textarea:focus { outline: 2px solid #185FA5; border-color: #185FA5; }
.dmr-textarea { resize: vertical; }
.dmr-photo-box { display: flex; flex-direction: column; gap: 10px; }
.dmr-photo-input { font-size: 13px; }
.dmr-photo-preview img {
	max-width: 100%; max-height: 240px; border-radius: 8px; border: 1px solid #E0DED5;
}
.dmr-msg { font-size: 13px; margin: 14px 0 0; }
.dmr-msg-err { color: #A32D2D; background: #FDECEA; border-radius: 6px; padding: 8px 12px; }
.dmr-submit {
	width: 100%; margin-top: 16px; font-size: 15px; font-weight: 600;
	color: #fff; background: #185FA5; border: none; border-radius: 8px;
	padding: 13px; cursor: pointer;
}
.dmr-submit:disabled { opacity: 0.6; cursor: default; }
.dmr-done { text-align: center; background: #fff; border: 1px solid #E0DED5; border-radius: 10px; padding: 36px 24px; }
.dmr-done-icon { font-size: 44px; margin-bottom: 10px; }
.dmr-done h2 { font-size: 18px; color: #3B6D11; margin: 0 0 8px; }
.dmr-done p { font-size: 13px; color: #666; line-height: 1.7; margin: 0 0 18px; }

/* v1.67.0: 店頭車両チェックの傷マーキング平面図 (Phase 2a: 既存マーカー表示) */
.svc-diagram { margin: 6px 0 14px; text-align: center; }
.svc-diagram-inner { position: relative; display: inline-block; width: 100%; max-width: 280px; border: 1px solid var(--border, #E2E8F0); border-radius: 12px; background: #fff; padding: 8px; box-sizing: border-box; }
.svc-diagram-inner .mvc-car-svg { display: block; width: 100%; height: auto; }
.svc-pin-layer { position: absolute; left: 8px; top: 8px; right: 8px; bottom: 8px; pointer-events: none; }
.svc-pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: #C0202E; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.svc-diagram-cap { font-size: 11px; color: var(--text-sub, #5C6B7F); margin-top: 6px; }

/* v1.68.0: 店頭チェックでのその場追加マーキング (Phase 2b) */
.svc-diagram-edit .mvc-car-svg { cursor: crosshair; }
.svc-diagram-hint { font-size: 11px; color: #185FA5; margin-top: 4px; text-align: center; }
.svc-pin.svc-pin-new { background: #E67817; }
.svc-newdmg-section { border: 1px dashed #E67817; background: #FFF8F0; }
.svc-newdmg-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed #F0D9BF; }
.svc-newdmg-row:first-of-type { border-top: none; }
.svc-newdmg-no { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #E67817; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.svc-newdmg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.svc-newdmg-selects { display: flex; gap: 6px; align-items: center; }
.svc-newdmg-selects select { flex: 1; min-width: 0; padding: 7px 6px; font-size: 14px; border: 1px solid var(--border, #E2E8F0); border-radius: 6px; background: #fff; }
.svc-nd-del { flex: 0 0 auto; width: 34px; height: 34px; border: none; border-radius: 6px; background: #A32D2D; color: #fff; font-size: 14px; cursor: pointer; }
.svc-nd-note { width: 100%; padding: 8px 10px; font-size: 14px; border: 1px solid var(--border, #E2E8F0); border-radius: 6px; box-sizing: border-box; }
