/* 고객용 A/S센터(/as), 마이페이지(/mypage) 공용 - 실제 쇼핑몰 헤더/푸터(shop.head.php, shop.tail.php)를
   그대로 쓰고, 그 안에 들어가는 본문 영역(cs.css 기반)에만 필요한 최소 레이아웃/보정을 담당한다. */

/* cs.css 곳곳이 width(%)+padding/border 조합인데 box-sizing 을 안 정한 곳이 많아서(예: .cs_button, .cs_item_div label),
   퍼센트 너비 형제 요소들이 한 줄에 맞아야 하는 레이아웃(버튼 3개 등)에서 살짝만 넘쳐도 줄바꿈이 돼버린다.
   기존 /cs 페이지는 실 사용 컨테이너가 넓어서 잘 안 드러났을 뿐 같은 버그가 있었음 - 여기서는 범위를 좁혀 확실히 막는다. */
.as-main, .as-main * {
	box-sizing: border-box;
}

.as-main {
	max-width: 1080px;
	margin: 0 auto 40px;
	padding: 0 20px;
	min-height: 40vh;
}

@media (max-width: 768px) {
	.as-main { padding: 0 16px; margin: 0 auto 20px; }
}
.title_div {
	margin-top: 50px !important;
}

/* 마이페이지 > 내 차량 등록 - 이미 mb_id 로 연결돼 있지만 아직 셀프등록 전인 차량 후보 목록 */
.mypage-bike-candidate-box {
	margin-bottom: 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}
.mypage-bike-candidate-list {
	margin-top: 10px;
}
.mypage-bike-candidate-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 12px 14px;
	margin-bottom: 8px;
}
.mypage-bike-candidate-model {
	font-weight: 700;
	font-size: 14px;
}
.mypage-bike-candidate-vin {
	font-size: 12px;
	color: #999;
	margin-top: 2px;
}

/* 마이페이지 > 내 차량 */
.mypage-bike-empty {
	text-align: center;
	padding: 50px 20px;
	border: 1px solid #eee;
	border-radius: 10px;
}
.mypage-bike-empty-img {
	width: 220px;
	height: 220px;
	object-fit: contain;
	opacity: .6;
	margin-bottom: 16px;
}
.mypage-bike-card {
	display: flex;
	gap: 16px;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 14px;
}
.mypage-bike-card-img {
	flex-shrink: 0;
	width: 80px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
.mypage-bike-card-img img {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: #f7f7f8;
	object-fit: cover;
}
.mypage-bike-detail-btn {
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	font-size: 11px;
	color: #999;
	text-decoration: underline;
	cursor: pointer;
	white-space: nowrap;
}
.mypage-bike-detail-btn:hover {
	color: #01cb5c;
}
.mypage-bike-card-body {
	flex: 1;
	min-width: 0;
}
.mypage-bike-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
/* .cs_form_title 는 사이트 전역에서 쓰는 폼 라벨 클래스라 여기서 직접 고치면 다른 화면에 다 영향이 가므로,
   이 카드 제목에 한해서만 모델명과 뱃지가 나란히 가운데 정렬되도록 별도로 덮어쓴다. */
.mypage-bike-title-row .cs_form_title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 0;
}
.mypage-bike-role-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	line-height: 1.5;
}
.mypage-bike-role-badge.is-owner {
	background: #e7f9ee;
	color: #11af58;
}
.mypage-bike-role-badge.is-shared {
	background: #f0f0f0;
	color: #888;
}
.mypage-bike-title-links {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 10px;
}
.mypage-bike-share-link {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 0;
	font-size: 12px;
	color: #999;
	text-decoration: underline;
	cursor: pointer;
	white-space: nowrap;
}
.mypage-bike-share-link:hover {
	color: #01cb5c;
}
.mypage-bike-info {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 16px;
	margin: 8px 0 14px;
}
.mypage-bike-info-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-size: 14px;
}
.mypage-bike-info-label {
	flex-shrink: 0;
	width: 60px;
	color: #999;
	font-size: 13px;
}
.mypage-bike-info-value {
	color: #333;
	font-weight: 600;
	word-break: break-all;
}
.mypage-bike-btn-row {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}
.mypage-bike-btn-row button {
	flex: 1;
	width: auto;
	height: 44px;
	padding: 0 10px;
}

@media (max-width: 480px) {
	.mypage-bike-card { padding: 14px; gap: 12px; }
	.mypage-bike-card-img { width: 64px; }
	.mypage-bike-card-img img { width: 64px; height: 64px; }
	.mypage-bike-info { grid-template-columns: 1fr; }
}

/* A/S 내역 목록 (as_list.php) - 예전 쇼핑몰 관리자용 표(.tbl_head03)를 빌려쓰던 대신,
   모바일/PC 구분 렌더링 없이 하나로 자연스럽게 반응하는 카드 목록으로 새로 구성. */
.as-list-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	background: #f7f7f8;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 16px;
	margin: 20px 0;
}
.as-list-filters,
.as-list-search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.as-list-toolbar select,
.as-list-toolbar input[type="text"] {
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
}
.as-list-toolbar select:focus,
.as-list-toolbar input[type="text"]:focus {
	border-color: #01cb5c;
	outline: none;
}
.as-list-toolbar button {
	height: 40px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 700;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid #ddd;
	background: #fff;
	color: #555;
}
.as-list-toolbar button.as-list-submit {
	background: #01cb5c;
	border-color: #01cb5c;
	color: #fff;
}

.as-list-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 30px;
}
.as-list-empty {
	text-align: center;
	color: #999;
	padding: 60px 0;
	border: 1px solid #eee;
	border-radius: 10px;
}
.as-list-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	border: 1px solid #eee;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.as-list-card:hover {
	border-color: #01cb5c;
	box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.as-list-card-main {
	min-width: 0;
	flex: 1;
}
.as-list-card-cate {
	font-size: 13px;
	color: #999;
	margin-bottom: 4px;
}
.as-list-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.as-list-card-meta {
	font-size: 13px;
	color: #999;
	margin-top: 6px;
}
.as-list-card-side {
	flex-shrink: 0;
	text-align: right;
	font-size: 13px;
	color: #999;
}
.as-list-card-status {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 4px;
}

@media (max-width: 640px) {
	.as-list-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.as-list-filters,
	.as-list-search {
		width: 100%;
	}
	.as-list-toolbar select,
	.as-list-toolbar input[type="text"] {
		flex: 1;
		min-width: 0;
	}
	.as-list-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.as-list-card-side {
		text-align: left;
	}
}
