/* ==============================================
   마이페이지 스타일
   ============================================== */

/* --- 레이아웃 --- */
.page-container {
    position: relative;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* --- 섹션 공통 --- */
.section-block {
    flex-grow: 1;
    position: relative;
    margin-bottom: 1.5rem;
    background: #ffffff;
    border: 1.5px solid #dde1e7;
    border-radius: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.section-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
    padding: 0.875rem 1.25rem;
    border-bottom: 1.5px solid #e8eaed;
    background-color: #f9fafb;
    border-radius: 0.75rem 0.75rem 0 0;
    box-sizing: border-box;
}

.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.section-heading svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #64748b;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

.vehicle-total {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 0.25rem;
}

/* --- 섹션 헤더 액션 그룹 --- */
.section-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- 연장하기 버튼 --- */
.btn-extend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.875rem;
    background-color: #ffffff;
    color: #e7542e;
    border: 1.5px solid #e7542e;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.btn-extend:hover {
    background-color: #e7542e;
    color: #ffffff;
}

.btn-extend svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* --- 추가 버튼 --- */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.875rem;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-add:hover {
    background-color: #333;
}

.btn-add svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* --- 차량 테이블 --- */
.vehicle-table-wrap {
    background: #ffffff;
    overflow-x: auto;
    border-radius: 0 0 0.75rem 0.75rem;
}

.vehicle-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.vehicle-table thead {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e2e5e9;
}

.vehicle-table th {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.vehicle-table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.85rem;
    color: #374151;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.vehicle-table tbody tr:last-child td {
    border-bottom: none;
}

/* 승인 거절 */
.row-rejected {background-color: #fef8f8;}

/* 운영 중단 */
.row-disable {background-color: #F1F3F5 !important;}
.row-disable td { color: #6B7280; }
.row-disable .cell-plate { font-weight: 700; color: #6B7280; font-size: 0.9rem; letter-spacing: 0.02em; }

/* 차량번호 셀 */
.cell-plate {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* 배지 공통 */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-approved {background-color: #e6f4ea;color: #1a7f37;}
.badge-pending {background-color: #fff3cd;color: #8a6d0b;}
.badge-rejected {background-color: #fde8e8;color: #c53030;}
.badge-hold {background-color: #f3f0ff;color: #6d28d9;}
.badge-payment-pending {background-color: #e0f2fe;color: #0369a1;}

/* 승인상태 + 사유 버튼 */
.status-with-reason {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-reason {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    vertical-align: middle;
}

.btn-reason:hover {
    color: #64748b;
    background-color: #f1f3f5;
}

.btn-reason svg {
    width: 0.8rem;
    height: 0.8rem;
}

/* 사유 팝오버 */
.reason-popover {
    position: absolute;
    z-index: 9999;
    width: 260px;
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 0.5rem;
    box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0.875rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: auto;
}

.reason-popover.active {
    opacity: 1;
    transform: translateY(0);
}

.reason-popover-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}

.reason-popover-text {
    font-size: 0.825rem;
    color: #374151;
    line-height: 1.55;
    word-break: keep-all;
}

.reason-popover.reason-rejected {
    border-color: #fecaca;
    border-left: 3px solid #ef4444;
}

.reason-popover.reason-rejected .reason-popover-label {
    color: #dc2626;
}

.reason-popover.reason-hold {
    border-color: #ddd6fe;
    border-left: 3px solid #7c3aed;
}

.reason-popover.reason-hold .reason-popover-label {
    color: #6d28d9;
}

.reason-popover.reason-pending {
    border-color: #fde68a;
    border-left: 3px solid #d97706;
}

.reason-popover.reason-pending .reason-popover-label {
    color: #b45309;
}

/* 정기권 정보 */
.ticket-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-dday {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ticket-date {
    font-size: 0.75rem;
    color: #64748b;
}

.ticket-expired {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background-color: #f1f3f5;
    color: #868e96;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.ticket-none {
    font-size: 0.8rem;
    color: #adb5bd;
}

.ticket-pre {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.2rem;
}

.ticket-pre-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #adb5bd;
    background-color: #f1f3f5;
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
    white-space: nowrap;
}

.ticket-pre-date {
    font-size: 0.7rem;
    color: #adb5bd;
}

.ticket-free {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.ticket-amt {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
}

.ticket-prev-date {
    display: block;
    font-size: 0.72rem;
    color: #adb5bd;
    margin-top: 0.2rem;
}

/* 셀 액션 버튼 */
.cell-actions {
    display: flex;
    gap: 0.375rem;
}

.btn-sm {
    padding: 0.3rem 0.625rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}

.btn-outline {
    background-color: #ffffff;
    color: #1a1a1a;
    border: 1px solid #d1d5db;
}

.btn-outline:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.btn-ghost {
    background-color: transparent;
    color: #64748b;
}

.btn-ghost:hover:not(:disabled) {
    background-color: #f1f3f5;
    color: #374151;
}

.btn-pay {
    background-color: #ffffff;
    color: #e7542e;
    border: 1.5px solid #e7542e;
}

.btn-pay:hover {
    background-color: #e7542e;
    color: #ffffff;
}

.btn-sm:disabled {
    color: #ced4da;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* PC에서 테이블 표시, 모바일 카드 숨김 */
.mobile-vehicle-section {
    display: none;
}

/* --- 모바일 차량 카드 --- */
.mobile-vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
    padding: 15px 10px;
}

.mobile-vehicle-list::-webkit-scrollbar {
    width: 4px;
}

.mobile-vehicle-list::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-vehicle-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.m-vehicle-card {
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 0.5rem;
    padding: 0.875rem;
}

.m-vehicle-card.m-active {
    border-left: 3px solid #1a1a1a;
    background-color: #f8faff;
}

.m-vehicle-card.m-rejected {
    border-left: 3px solid #e53e3e;
    background-color: #fef8f8;
}

.m-vehicle-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
}

.m-plate {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.m-vehicle-detail {
    font-size: 0.775rem;
    color: #64748b;
    margin-bottom: 0.625rem;
}

.m-sep {
    color: #d1d5db;
    margin: 0 0.25rem;
}

.m-vehicle-bottom {
    padding-top: 0.5rem;
    border-top: 1px solid #f1f3f5;
}

/* --- 내 정보 뷰 --- */
.info-view {
    padding: 0.25rem 1.25rem;
}

.info-view .line {
    background-color: #f1f3f5;
    width: 100%;
    height: 1px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    /*border-top: 1px solid #f1f3f5;*/
}

.info-row-label {
    width: 7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.info-row-value {
    font-size: 0.875rem;
    color: #1a1a1a;
    font-weight: 500;
}

/* --- 내 정보 수정 폼 (레거시) --- */
.info-form {
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 0.5rem;
    overflow: hidden;
}

.info-section {
    padding: 1.25rem;
}

.info-section + .info-section {
    border-top: 1px solid #f1f3f5;
    background-color: #fafbfc;
}

.info-section-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem 0;
}

.info-section-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: #94a3b8;
}

.info-form > .btn-save {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 0 1.25rem 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
}

.form-label-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.75rem;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    font-size: 0.875rem;
    color: #1a1a1a;
    transition: border-color 0.15s;
}

.form-input:focus {
    border-color: #1a1a1a;
}

.form-input-readonly {
    background-color: #f8f9fa;
    color: #64748b;
}

/* --- 휴대폰 인증 UI --- */
.phone-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.phone-field-wrap {
    flex: 1;
    position: relative;
}

.phone-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.9rem;
    height: 0.9rem;
    color: #94a3b8;
    pointer-events: none;
}

.phone-field {
    padding-left: 2.25rem !important;
}

.btn-phone-request {
    flex-shrink: 0;
    height: 2.35rem;
    padding: 0 0.875rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
    box-sizing: border-box;
}

.btn-phone-request:hover:not(:disabled) {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.btn-phone-request:disabled {
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.phone-msg {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.phone-msg.error { color: #ef4444; }
.phone-msg.success { color: #22c55e; }

.verify-section {
    margin-top: 0.5rem;
    animation: verifySlide 0.25s ease;
}

@keyframes verifySlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.verify-field-wrap .form-input {
    padding-right: 4.5rem !important;
}

.verify-timer {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

.verify-timer.timer-warning  { color: #ef4444; }
.verify-timer.timer-verified { color: #22c55e; }

.btn-verify-submit {
    flex-shrink: 0;
    height: 2.35rem;
    padding: 0 0.875rem;
    background: #1a1a1a;
    border: none;
    color: #ffffff;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s;
    box-sizing: border-box;
}

.btn-verify-submit:hover:not(:disabled) { background: #333; }

.btn-verify-submit:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* --- 보안 섹션 잠금 --- */
.security-section {
    position: relative;
    overflow: hidden;
}

.security-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 5;
    transition: opacity 0.3s;
}

.security-lock-overlay svg {
    width: 1.375rem;
    height: 1.375rem;
    color: #94a3b8;
}

.security-lock-overlay span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.divider {
    border: none;
    border-top: 1px solid #e2e5e9;
    margin: 1.25rem 0;
}

.btn-save {
    width: 100%;
    padding: 0.65rem;
    margin-top: 0.5rem;
    background-color: #1a1a1a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    box-sizing: border-box;
}

.btn-save:hover:not(:disabled) {
    background-color: #333;
}

.btn-save:disabled {
    background-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* --- 구매 내역 (주문 카드) --- */
/* --- 구매내역 필터 --- */
.history-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: #f8f9fb;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.history-date-input {
    width: 135px;
    padding: 0.45rem 0.65rem;
    font-size: 0.825rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    background: #fff;
    color: #374151;
    outline: none;
    transition: border-color 0.15s;
}
.history-date-input:focus { border-color: #e7542e; box-shadow: 0 0 0 2px rgba(231,84,46,0.1); }

.history-date-sep {
    color: #9ca3af;
    font-size: 0.825rem;
    font-weight: 500;
}

.btn-search-history {
    padding: 0.45rem 1.1rem;
    background-color: #e7542e;
    color: white;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    letter-spacing: 0.01em;
}
.btn-search-history:hover { background-color: #c94424; }

/* --- 구매내역 목록 --- */
.history-wrap {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    box-sizing: border-box;
}

#purchaseHistoryList {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    background: #f9fafb;
    border-radius: 0.6rem;
    border: 1px dashed #e5e7eb;
}

/* --- 주문 카드 --- */
.order-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    box-sizing: border-box;
    transition: box-shadow 0.15s;
}
.order-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: #fafbfc;
    border-bottom: 1px solid #f0f2f4;
}

.order-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.01em;
}

/* 카드 헤더 내 날짜 텍스트 */
.order-date-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 0.4rem;
}

.order-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-method {
    font-size: 0.7rem;
    color: #64748b;
    background-color: #eef0f3;
    padding: 0.18rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.order-total {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111827;
}

.order-details {
    padding: 0.375rem 1rem 0.5rem;
}

.order-detail-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.order-detail-item:last-child {
    border-bottom: none;
}

.detail-item-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.detail-car-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.18rem 0.55rem;
    border-radius: 0.3rem;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.detail-parking-chip {
    font-size: 0.68rem;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.18rem 0.4rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.detail-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.detail-lot-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-period {
    font-size: 0.71rem;
    color: #9ca3af;
    white-space: nowrap;
}

.detail-pre-period {
    font-size: 0.67rem;
    color: #c4c9d4;
    white-space: nowrap;
}

.detail-item-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e7542e;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 환불 행 */
.refund-row {
    background: #fdf2f2;
    border-radius: 0.375rem;
    margin: 0.2rem 0;
}

.refund-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- 구매내역 탭 (일자별 / 차량별) --- */
.history-tab-group {
    display: flex;
    gap: 0.25rem;
    background: #f1f3f5;
    border-radius: 0.5rem;
    padding: 0.2rem;
}

.history-tab {
    padding: 0.3rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.01em;
}

.history-tab:hover { color: #374151; }

.history-tab.active {
    background: #ffffff;
    color: #e7542e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- 차량별 뷰 카드 --- */
.vehicle-history-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s;
}
.vehicle-history-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.vehicle-history-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.65rem 1rem;
    background: #fafbfc;
    border-bottom: 1px solid #f0f2f4;
    flex-wrap: wrap;
}

.vehicle-history-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 500;
}

.vehicle-history-entries {
    padding: 0.25rem 1rem 0.375rem;
}

.vehicle-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.vehicle-history-row:last-child { border-bottom: none; }

.vehicle-history-period {
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

.vehicle-history-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.vehicle-history-amt {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e7542e;
    white-space: nowrap;
}

.vehicle-history-date {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* 페이지네이션 */
.history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.875rem;
    border-top: 1px solid #f1f3f5;
}

.page-btn {
    padding: 0.3rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.page-btn:disabled {
    color: #ced4da;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

/* 태그 */
.tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.tag-blue {
    background-color: #e8f0fe;
    color: #1a56db;
}

.tag-green {
    background-color: #e6f4ea;
    color: #1a7f37;
}

/* 상품명 */
.product-name {
    font-weight: 600;
    color: #1a1a1a;
}

.product-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

/* 상태 */
.status {
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.status-active {
    color: #1a56db;
}

.status-muted {
    color: #94a3b8;
}

/* --- 체크박스 라벨 --- */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #1a1a1a;
    cursor: pointer;
    margin: 0;
}

.checkbox-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

/* --- 모달 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    border-radius: 0.625rem;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    word-break: keep-all;
    transform: scale(0.97);
    transition: transform 0.2s;
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e5e9;
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.modal-close-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.modal-close-btn:hover {
    background-color: #f1f3f5;
}

.modal-close-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(90vh - 7rem);
}

.modal-body .form-group {
    margin-bottom: 0.75rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-group .checkbox-label {
    margin-top: -0.25rem;
}

.modal-body .form-input,
.modal-body .form-select {
    box-sizing: border-box;
}

.modal-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #e2e5e9;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.modal-notice .notice-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    color: #94a3b8;
}

/* 모달 내 섹션 타이틀 간격 조정 */
#editMyInfoModal .info-section-title {
    margin-bottom: 0.875rem;
}

.modal-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e2e5e9;
    background-color: #f8f9fa;
}

.modal-cancel-btn,
.modal-confirm-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-cancel-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.modal-cancel-btn:hover {
    background-color: #f8f9fa;
}

.modal-confirm-btn {
    background-color: #1a1a1a;
    border: none;
    color: #ffffff;
}

.modal-confirm-btn:hover:not(:disabled) {
    background-color: #333;
}

.modal-confirm-btn:disabled {
    background-color: #d1d5db;
    color: #ffffff;
    cursor: not-allowed;
}

/* --- 셀렉트 드롭다운 --- */
.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.select-wrapper .select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    pointer-events: none;
}

/* --- 주차장 검색 드롭다운 --- */
.parking-search-wrapper {
    position: relative;
}

.input-with-icon {
    position: relative;
}

.input-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.875rem;
    height: 0.875rem;
    color: #94a3b8;
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 2.25rem;
    padding-right: 2.25rem;
}

.form-input.parking-selected {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.input-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.375rem;
    height: 1.375rem;
    border: none;
    background-color: #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.input-clear-btn:hover {
    background-color: #d1d5db;
}

.input-clear-btn svg {
    width: 0.75rem;
    height: 0.75rem;
    color: #64748b;
}

.parking-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e5e9;
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.parking-dropdown-item {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.1s;
}

.parking-dropdown-item:last-child {
    border-bottom: none;
}

.parking-dropdown-item:hover {
    background-color: #f8f9fa;
}

.parking-dropdown-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.125rem;
}

.parking-dropdown-address {
    font-size: 0.75rem;
    color: #94a3b8;
}

.parking-dropdown-empty {
    padding: 0.875rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

.parking-dropdown::-webkit-scrollbar {
    width: 4px;
}

.parking-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.parking-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* pc */
@media (min-width: 1024px) {
    .mobile-vehicle-section {
        display: none;
    }
}

/* tablet */
@media (max-width: 1023px) {
    /* 테이블 숨기고 모바일 카드 표시 */
    .section-block:not(.mobile-vehicle-section):has(> .vehicle-table-wrap) {
        display: none;
    }

    .mobile-vehicle-section {
        display: block;
    }

    .content-grid {
        display: block;
    }
}

/* mobile */
@media (max-width: 480px) {
    .main-wrapper { padding: 1.25rem 1rem 2rem; }

    .section-header-actions { flex-direction: column; }

    .history-filter { padding: 10px; }
    .history-table th, .history-table td {padding: 0.625rem;font-size: 0.8rem;}
    .history-date-input { width: 120px; }

    .order-detail-item { flex-direction: column; gap: 10px; align-items: flex-start;}
}
