/* ==========================================================
   Patient Auth (Login / Register)  —  itdm-online-clinic  v1.0.0
   スマホファースト / 白カード型
========================================================== */

.itdm-auth-wrap {
	max-width: 480px;
	margin: 0 auto;
	padding: 24px 16px calc(96px + env(safe-area-inset-bottom, 0px));
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #111827;
	box-sizing: border-box;
}

.itdm-auth-wrap *,
.itdm-auth-wrap *::before,
.itdm-auth-wrap *::after {
	box-sizing: border-box;
}

/* ---- タブ ---- */
.itdm-auth-tabs {
	display: flex;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 20px;
}

.itdm-auth-tab {
	flex: 1;
	display: block;
	padding: 12px 8px;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	color: #6b7280;
	text-decoration: none !important;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s, border-color 0.15s;
}

.itdm-auth-tab--active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.itdm-auth-tab:hover,
.itdm-auth-tab:focus {
	color: #2563eb;
}

/* ---- 通知・エラー ---- */
.itdm-auth-notice {
	padding: 14px 16px;
	border-radius: 12px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.7;
}

.itdm-auth-notice--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

.itdm-auth-notice--info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.itdm-auth-notice-title {
	margin: 0 0 6px;
	font-weight: 700;
	font-size: 14px;
}

.itdm-auth-error-list {
	margin: 0;
	padding-left: 20px;
	font-size: 14px;
}

.itdm-auth-error-list li {
	margin-bottom: 4px;
}

/* ---- カード ---- */
.itdm-auth-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 24px 20px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* ---- セクション見出し ---- */
.itdm-auth-section-title {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 20px 0 12px;
	padding: 0;
	border-top: 1px solid #f3f4f6;
	padding-top: 16px;
}

.itdm-auth-form .itdm-auth-section-title:first-child {
	margin-top: 0;
	border-top: none;
	padding-top: 0;
}

/* ---- フィールド ---- */
.itdm-auth-field {
	margin-bottom: 16px;
}

.itdm-auth-row {
	display: flex;
	gap: 12px;
}

.itdm-auth-row .itdm-auth-field {
	flex: 1;
	min-width: 0;
}

/* ---- ラベル ---- */
.itdm-auth-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #374151;
	margin-bottom: 6px;
}

.itdm-auth-required {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	background: #ef4444;
	color: #ffffff;
	padding: 1px 5px;
	border-radius: 4px;
	margin-left: 4px;
	vertical-align: middle;
	line-height: 1.6;
}

/* ---- 入力欄 ---- */
.itdm-auth-input,
.itdm-auth-select {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	font-size: 16px;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	border: 1.5px solid #d1d5db;
	border-radius: 10px;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

.itdm-auth-input:focus,
.itdm-auth-select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.itdm-auth-input--date {
	cursor: pointer;
}

/* ---- セレクト矢印 ---- */
.itdm-auth-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

/* ---- ヒント ---- */
.itdm-auth-field-hint {
	font-size: 12px;
	color: #6b7280;
	margin: 5px 0 0;
	line-height: 1.6;
}

/* ---- ボタンエリア ---- */
.itdm-auth-actions {
	margin-top: 24px;
}

/* ---- ボタン ---- */
.itdm-auth-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 14px 28px;
	border: none;
	border-radius: 999px;
	background: #2563eb;
	color: #ffffff !important;
	font-size: 16px;
	font-weight: 800;
	font-family: inherit;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s;
	touch-action: manipulation;
}

.itdm-auth-btn:hover,
.itdm-auth-btn:focus {
	background: #1d4ed8;
	color: #ffffff !important;
}

.itdm-auth-btn--block {
	display: flex;
	margin-top: 12px;
}

/* ---- パスワード忘れリンク ---- */
.itdm-auth-forgot {
	margin: 16px 0 0;
	text-align: center;
	font-size: 13px;
	color: #6b7280;
}

.itdm-auth-forgot a {
	color: #2563eb;
	text-decoration: underline;
}

/* ---- タブレット以上 ---- */
@media (min-width: 600px) {
	.itdm-auth-wrap {
		padding: 32px 24px calc(96px + env(safe-area-inset-bottom, 0px));
	}

	.itdm-auth-card {
		padding: 32px 28px;
	}

	.itdm-auth-section-title {
		font-size: 13px;
	}
}

/* =========================================================
   v2.0.0 コンパクト化（マイページ/プロフィールとデザイン統一）
   ========================================================= */
.itdm-auth-wrap { max-width: 560px; padding-top: 12px; padding-bottom: 28px; }
.itdm-auth-card { padding: 18px; border-radius: 16px; }
.itdm-auth-field { margin-bottom: 10px; }
.itdm-auth-row { gap: 10px; }
.itdm-auth-input, .itdm-auth-select { min-height: 40px; padding: 8px 12px; }
.itdm-auth-label { font-size: 13px; margin-bottom: 3px; }
.itdm-auth-section-title { margin: 12px 0 8px; padding-top: 10px; }
.itdm-auth-field-hint { font-size: 11.5px; margin-top: 3px; line-height: 1.5; }
.itdm-auth-btn { min-height: 44px; }
.itdm-auth-tabs { margin-bottom: 16px; }
