:root {
    /* 金色系調色盤 */
    --gold-light: #E8D394;
    --gold-main: #C5A059;
    --gold-dark: #8C6E26;

    /* 背景 */
    --bg-dark: #1E1E1E;
    --bg-black: #000000;

    /* 文字 */
    --text-white: #FFFFFF;
    --text-black: #000000;
    --text-gray: #666666;

    /* 版面配置 */
    --header-height: 160px;
}

/* 重置與基礎樣式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    font-family: 'Noto Sans TC', sans-serif;
}

body {
    background-color: #222;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
    color: var(--text-white);
    height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* 禁用 body 捲動 */
}

/* 應用程式容器 */
#app {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    /* 滿版視口高度 */
    background-color: #d3d3d3;
    color: #000;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

#app::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* ----------------------------------
   標題與漸層
---------------------------------- */
.gold-gradient-bg {
    background: linear-gradient(to right, #000000 0%, #000000 25%, #c4a15b 85%, #dabe81 100%);
    color: #fff;
}

.header-car-area {
    height: 120px;
    background-color: #000;
    background: linear-gradient(to right, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0.2)), url('/pic/banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 15px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.header-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    clip-path: inset(0 0 0 1px);
}

.logo-text {
    color: #fff;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.logo-sub {
    color: var(--gold-main);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: bold;
}

.page-title-bar {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid #5a4616;
    border-radius: 0;
    margin: 0;
    position: relative;
    /* 讓絕對定位的選單按鈕參考此容器 */
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-scroll {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    /* 將捲軸移動至此 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.content-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* ----------------------------------
   表單
---------------------------------- */
.form-row {
    display: flex;
    height: 38px;
    margin-bottom: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: visible;
    position: relative;
    z-index: 10;
}

/* 關鍵修復：當活躍時 (下拉選單開啟) 提高 Z-Index */
.form-row.z-active {
    z-index: 1000;
}

.form-label {
    width: 85px;
    background: linear-gradient(to right, #000000, #c4a15b);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* 靠右對齊 */
    padding-right: 10px;
    border-right: 1px solid #ccc;
    flex-shrink: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.form-value {
    flex: 1;
    background-color: #fff;
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
    width: 100%;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.form-value input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 14px;
    background: transparent;
}

.arrow-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-dark);
    font-size: 20px;
    /* 增加尺寸 */
}

.form-value.locked {
    background-color: #f9f9f9;
}

.text-price {
    font-weight: bold;
    color: #000;
}

/* 輸入框內的驗證按鈕 */
.btn-send-code {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-send-code:hover {
    background: #000;
}


.block-section {
    margin-top: 15px;
    border: 1px solid var(--gold-main);
    border-radius: 8px;
    overflow: hidden;
}

.block-header {
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
}

.block-content {
    background: #fff;
    padding: 10px;
}

textarea {
    width: 100%;
    border: none;
    resize: none;
    height: 60px;
    font-size: 14px;
    color: #333;
}

textarea::placeholder {
    color: #999;
    font-size: 12px;
}

.upload-btn {
    border: 2px solid #333;
    background: #fff;
    color: #333;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 5px;
}

.upload-container {
    text-align: center;
    padding: 15px 0;
}

.upload-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
}

.add-more-area {
    text-align: center;
    margin: 15px 0;
}

.btn-add {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    padding: 8px 15px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ----------------------------------
   地址專用
---------------------------------- */
.address-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0 8px 8px 0;
    /* 符合 form-value 邊緣 */
    overflow: hidden;
}

.address-col input {
    height: 50%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0 10px;
    font-size: 12px;
}

.address-col input:last-child {
    border-bottom: none;
}

/* ----------------------------------
   底部操作列與按鈕
---------------------------------- */
.bottom-bar {
    margin-top: auto;
    /* 透過 Flexbox 推至底部 */
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    z-index: 500;
}

.order-footer {
    background: #dcdcdc;
    border-top: 1px solid #bbb;
}

.btn-pill {
    border-radius: 50px;
    padding: 8px 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    min-width: 120px;
}

/* 修正黑色按鈕 - 統一金色漸層風格 */
.btn-green,
.btn-red,
.btn-submit-main {
    background: linear-gradient(to right, #000000, #c4a15b);
    color: #fff;
    border: 1px solid #fff;
}

.btn-green:hover,
.btn-red:hover,
.btn-submit-main:hover {
    background: linear-gradient(to right, #000000, #dabe81);
    opacity: 0.9;
}

.btn-submit-main {
    width: 100%;
    max-width: 200px;
}

/* ----------------------------------
   條款與隱私權內容
---------------------------------- */
.terms-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.terms-content h3 {
    color: #000;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p {
    margin-bottom: 10px;
}


/* ----------------------------------
   自定義下拉選單 (新)
---------------------------------- */
.custom-select-container {
    position: relative;
    width: 100%;
    cursor: pointer;
    height: 100%;
}

.custom-select-trigger {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    outline: none;
}

.custom-options-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-sizing: border-box;

    /* 金色背景 */
    background: var(--gold-main);
    color: #000;

    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    z-index: 999;
    /* 確保顯示在最上層 */
    
    /* === 新增/修改以下這三行 === */
    max-height: 250px;   /* 限制最大高度，可依需求調整數值 */
    overflow-y: auto;    /* 超出高度時顯示上下滾動條 */
    overflow-x: hidden;  /* 隱藏水平滾動條 */
    /* ========================= */
    
    margin-top: 2px;
}

.custom-options-box.show {
    display: block;
}

.custom-option {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 選項內的標記 */
.price-badge {
    background: #000;
    color: var(--gold-main);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.tags span {
    background: #eee;
    color: #333;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
    margin-left: 2px;
}

/* ----------------------------------
   日期 / 時間選擇元件 (新)
---------------------------------- */
.date-time-block {
    background: #fff;
    padding: 15px 10px;
}

/* 通用捲動區域樣式 */
.date-selector-wrapper,
.time-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.time-selector-wrapper {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
    margin-bottom: 0;
}

.scroll-btn {
    width: 24px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
}

/* 通用水平捲動容器 */
.date-scroll-container,
.time-scroll-container {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.date-scroll-container::-webkit-scrollbar,
.time-scroll-container::-webkit-scrollbar {
    display: none;
}

/* 日期卡片 */
.date-card {
    min-width: 60px; /* 從 48px 加寬，確保雙位數月份與日期(如 12/25)放得下 */
    height: 56px;
    background: #444;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ccc;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.date-card .day-num {
    font-size: 15px; /* 從 18px 微調縮小，讓版面更協調 */
    font-weight: bold;
    line-height: 1.2;
}

.date-card .day-week {
    font-size: 10px;
}

.date-card.active {
    background: #fff;
    border: 2px solid var(--gold-main);
    color: var(--gold-dark);
}

.date-card.active .day-num {
    color: #000;
}

.date-card.disabled {
    opacity: 0.3;
    pointer-events: none;
    background: #222;
}

/* 時間標籤 (水平) */
.time-chip {
    min-width: 80px;
    padding: 8px 0;
    text-align: center;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.time-chip:hover {
    background: #e0e0e0;
}

.time-chip.active {
    background: var(--gold-main);
    color: #000;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-chip.disabled {
    background: #eee;
    color: #888;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 50%, #ddd 50%, #ddd 75%, transparent 75%, transparent);
    background-size: 10px 10px;
    pointer-events: none;
}

/* ----------------------------------
   服務群組管理 (新)
---------------------------------- */
.service-group,
.vehicle-group,
.notes-group {
    position: relative;
    background: #89827d;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-group-header {
    display: flex;
    justify-content: center;
    /* 標題置中 */
    align-items: center;
    margin: -10px -10px 10px -10px;
    /* 負邊距以填滿寬度 */
    padding: 12px 20px;
    background: linear-gradient(to right, #000000, #c4a15b);
    border-radius: 12px 12px 0 0;
    /* 上方圓角與卡片吻合 */
    position: relative;
    /* 用於關閉按鈕的絕對定位 */
}

.service-group-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background: none;
    padding: 0;
    flex: none;
    /* 重置 flex */
}

.btn-remove-group {
    position: absolute;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    /* 較淺的背景以便在漸層上顯示 */
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-group:hover {
    background: #d9534f;
    color: #fff;
    transform: scale(1.1);
}

/* ----------------------------------
   歷史紀錄卡片樣式 (新)
---------------------------------- */
.history-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.history-header {
    padding: 10px 15px;
    background: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

.history-date {
    font-size: 14px;
    color: var(--gold-light);
    font-weight: bold;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.status-pending {
    background-color: #337ab7; 
    color: #fff;
}
.status-dispatched {
    background-color: #5bc0de;
    color: #fff;
}
.status-processing {
    background-color: #f0ad4e;
    color: #212529; 
}
.status-completed {
    background-color: #5cb85c;
    color: #fff;
}
.status-cancelled {
    background-color: #d9534f;
    color: #fff;
}
.status-dark {
    background-color: #343a40;
    color: #fff;
}
.status-orange {
    background-color: #fd7e14;
    color: #fff;
}
.status-purple {
    background-color: #9B59B6;
    color: #fff;
}

.history-memo {
    margin-top: 8px; 
    padding-top: 8px; 
    border-top: 1px dashed #eee;
     color: #666; 
     font-size: 0.85em;
}
.history-body {
    padding: 15px;
    color: #000;
}

.history-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
    color: #444;
}

.history-row i {
    width: 16px;
    text-align: center;
    color: var(--gold-dark);
    margin-top: 3px;
}

.history-items {
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.6;
}
.history-finance-box {
    margin-top: 12px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    font-size: 14px;
}

.finance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    color: #666;
}

.finance-row.discount-row {
    margin-bottom: 10px;
    color: #d9534f;
}

.finance-divider {
    border-bottom: 1px solid #ddd;
    margin: 10px 0;
}

.finance-row.total-row {
    margin-bottom: 0;
}

.total-row .finance-label {
    color: #333;
    font-weight: bold;
}

.total-row .finance-total-val {
    color: #d39e00;
    font-weight: bold;
    font-size: 18px;
}

.finance-memo {
    display: block;       /* 將 span 轉為區塊元素 */
    width: 100%;          /* 確保佔滿父容器的寬度 */
    text-align: left;     /* 強制文字靠左對齊 */
    color: #888;
    font-size: 13px;
    margin-top: 12px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
    line-height: 1.5;
}

.finance-memo i {
    margin-right: 4px;
}
/* 備註卡片的特定緊湊內距 */
.notes-group {
    padding: 6px;
}

.notes-group .service-group-header {
    margin: -6px -6px 10px -6px;
}

.history-price {
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

.history-actions {
    padding: 10px 15px;
    background: #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #666;
    color: #333;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-outline:hover {
    background: #e0e0e0;
}

.btn-outline.red {
    border-color: #d9534f;
    color: #d9534f;
}

.btn-outline.red:hover {
    background: #ffeeee;
}

/* ----------------------------------
   自定義模態框 (彈出視窗)
---------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* 半透明黑 */
    display: none;
    /* 預設隱藏 */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.modal-box {
    background: linear-gradient(to bottom, #dabe81, #c4a15b);
    width: 80%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: scaleIn 0.2s;
    text-align: center;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content {
    padding: 25px 20px;
    color: #000;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: #333;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.modal-btn:hover {
    background: #000;
}

/* ----------------------------------
   服務據點摺疊選單樣式
---------------------------------- */
.location-accordion {
    margin-bottom: 20px;
}

.accordion-header {
    background: linear-gradient(to right, #000000, #c4a15b);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    user-select: none;
}

.accordion-header:hover {
    opacity: 0.95;
}

.accordion-header .arrow-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
    position: static !important;
    display: flex;
    /* 若需要可使用 flex 置中內容，或 block */
    align-items: center;
    justify-content: center;
    height: 20px;
    /* 固定高度以符合圖示尺寸 */
    width: 20px;
    line-height: 1;
    transform-origin: center;
}

.accordion-header.active .arrow-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 5px;
}

/* 服務據點卡片 (從 HTML 移動而來) */
.location-card {
    background: #fff;
    margin: 15px 0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--gold-main);
}

.location-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.location-info {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.location-info i {
    width: 20px;
    color: #af8c52;
    text-align: center;
    margin-right: 5px;
}

/* ----------------------------------
   重構的工具類別
---------------------------------- */

/* 文字與對齊 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-mute {
    color: #666;
}

.text-desc {
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.w-100 {
    width: 100%;
}

/* 表單元件 */
.input-readonly {
    background-color: #f9f9f9;
    color: #666;
}

.input-center {
    text-align: center;
}

.textarea-card {
    width: 100%;
    border-radius: 8px;
    padding: 10px;
    border: none;
    height: 80px;
}

/* 頁面特定樣式 */
.page-description {
    color: #555;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-prompt {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
}

.welcome-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 15px;
}

.welcome-text {
    color: #ddd;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* 地址元件特定樣式 */
.addr-row-container {
    height: auto;
    overflow: visible;
    align-items: stretch;
}

.addr-label {
    height: auto;
    border-bottom-left-radius: 8px;
}

.addr-zip-box {
    width: 70px;
    flex: none;
    border-right: 1px solid #eee;
    background: #f9f9f9;
    padding: 0 5px;
    border-radius: 0;
}

.addr-input-center-bold {
    text-align: center;
    background: #f9f9f9;
    color: #666;
    font-size: 12px;
    font-weight: bold;
}

.addr-city-box {
    flex: 1;
    border-right: 1px solid #eee;
    border-radius: 0;
}

.addr-dist-box {
    flex: 1;
    border-radius: 0 8px 0 0;
}

.addr-detail-row {
    display: flex;
    height: 38px;
}

.addr-detail-box {
    flex: 1;
    border-radius: 0 0 8px 0;
}

/* 其他 */
.hidden {
    display: none;
}

.addr-inputs-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.addr-upper-row {
    display: flex;
    height: 38px;
    border-bottom: 1px solid #eee;
}

.footer-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.btn-half {
    flex: 1;
    max-width: 160px;
}

/* 註冊與分隔線 */
.required-mark {
    color: #d9534f;
    margin-left: 2px;
}

.optional-mark {
    font-size: 11px;
    color: #999;
    margin-left: 2px;
}

.input-short-btn {
    width: calc(100% - 80px);
}

.hr-dark {
    border: 0;
    border-top: 1px solid #444;
    margin: 20px 0;
}

.hr-light {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.welcome-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.welcome-card {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
}

.btn-welcome-action {
    margin: 0 auto 15px auto;
}

.page-link-mute {
    color: #ccc;
    font-size: 13px;
    text-decoration: underline;
}

/* 額外的重構輔助工具 */
.mt-30 {
    margin-top: 30px;
}

.p-5 {
    padding: 0 5px;
}

.p-10 {
    padding: 0 10px;
}

.arrow-icon-small {
    font-size: 14px;
}

.max-h-200 {
    max-height: 200px;
    overflow-y: auto;
}

.vehicle-group {
    margin-bottom: 20px;
}

.group-title-mute {
    color: #ccc;
    font-size: 13px;
}

.pointer-events-none {
    pointer-events: none;
}

.checkbox-wrapper {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 10px;
}

.checkbox-input {
    margin-top: 3px;
}

.checkbox-label {
    color: #555;
    font-size: 12px;
    line-height: 1.4;
}

.link-gold {
    color: var(--gold-main);
}

.file-name-display {
    margin-top: 10px;
    color: #fff;
    font-size: 13px;
}

.file-upload-hidden {
    display: none;
}

.textarea-small {
    height: 50px;
}

.footer-center {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.pl-20 {
    padding-left: 20px;
}

/* 漢堡選單樣式 */
.menu-toggle {
    position: absolute;
    right: 5px;
    /* 更靠右 */
    top: 0;
    width: 40px;
    /* 寬度稍微縮小 */
    height: 100%;
    /* 與 title bar 同高 (36px) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    /* 間距微調 */
    cursor: pointer;
    z-index: 2001;
    /* 比選單高 */
}

/* 漢堡條 */
.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

/* 漢堡變叉叉動畫 */
/* 漢堡變叉叉動畫 */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* 移出螢幕 */
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    /* 深色半透明背景 */
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    /* 避開標題欄 */
}

.side-menu.active {
    right: 0;
}

/* 遮罩 (全螢幕選單本身就是遮罩，可隱藏原先的overlay或沿用) */
.menu-overlay {
    /* 這裡可以設為 hidden，因為 side-menu 已經滿版 */
    display: none !important;
}

.menu-header {
    /* 隱藏選單內的 title bar，因為外部標題欄仍在 */
    display: none;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    text-align: center;
    padding-top: 20px;
}

.menu-items li {
    border-bottom: none;
    /*移除分隔線，改用間距 */
    margin-bottom: 20px;
}

.menu-items li a {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    /* 字體加大 */
    transition: color 0.2s;
}

.menu-items li a:hover {
    background: transparent;
    color: var(--gold-main);
}

/* ----------------------------------
   歡迎頁登入區塊
---------------------------------- */
.welcome-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 12px;
}

.welcome-divider::before,
.welcome-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.welcome-divider span {
    padding: 0 10px;
}

.login-section {
    width: 100%;
}

/* [修正] 加寬容器寬度以避免按鈕歪掉 */
.login-inputs-wrapper {
    width: 280px; /* 增加寬度 (原 200px) */
    margin: 0 auto;
}

.form-row-simple {
    margin-bottom: 10px;
}

.input-pill {
    width: 100%;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    color: #333;
    transition: border-color 0.3s;
}

.input-pill:focus {
    border-color: var(--gold-main);
}

/* [修正] 確保按鈕寬度佔滿容器 */
.btn-welcome-login {
    width: 100%;
    margin: 25px auto 0;
    justify-content: center;
}

.btn-gold-outline {
    background: transparent;
    border: 1px solid var(--gold-main);
    color: var(--gold-main);
}

.btn-gold-outline:hover {
    background: var(--gold-main);
    color: #fff;
}

.small-link {
    font-size: 13px;
    text-decoration: underline;
}

/* [修正] 確保 LINE 按鈕寬度佔滿容器 */
.btn-line-login {
    width: 100%;
    max-width: 200px; /* Limit width to match the button above */
    background-color: #06C755; /* LINE 官方綠 */
    color: white;
    border: none;
    margin: 15px auto; /* 與原本的手機登入區隔開 */
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-line-login:hover {
    background-color: #05b54d;
}

/* ----------------------------------
   照片上傳預覽區塊 (修正後)
---------------------------------- */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 固定3欄 */
    gap: 8px; /* 使用較小的間距以適應容器 */
    margin-top: 15px;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box; /* 確保 padding 不會撐大寬度 */
}

.preview-item {
    position: relative; /* 關鍵：作為絕對定位子元素的參考點 */
    width: 100%;
    aspect-ratio: 1 / 1; /* 強制正方形，確保電腦螢幕上不會變寬扁 */
    border-radius: 8px;
    overflow: hidden; /* 關鍵：確保圖片與按鈕不會超出圓角邊界 */
    background: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填滿且裁切 */
    display: block;
}

.btn-delete-photo {
    position: absolute; /* 絕對定位 */
    top: 5px; /* 固定在右上角 */
    right: 5px; /* 固定在右上角 */
    width: 20px;
    height: 20px;
    background: rgba(217, 83, 79, 0.9); /* 紅色半透明 */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    border: none;
    z-index: 10; /* 確保浮在最上層 */
    padding: 0;
}

.btn-delete-photo:hover {
    background: rgb(217, 83, 79);
    transform: scale(1.1);
}

/* ----------------------------------
   Noty 自定義樣式 (強制覆寫為 Modal 風格 - 無底色無邊框版)
---------------------------------- */

/* 1. 遮罩層 (.modal-overlay) 
   Noty 使用 .noty_modal 類別
*/
.noty_modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    animation: fadeIn 0.2s !important;
}

/* 2. 強制覆寫所有 Noty 類型的背景，去除底色、邊框與陰影 
   確保無論是 top, center, bottom 或 success, error 都是統一風格
*/
.noty_bar, 
.noty_bar.noty_type_alert, 
.noty_bar.noty_type_success, 
.noty_bar.noty_type_warning, 
.noty_bar.noty_type_error, 
.noty_bar.noty_type_information {
    background-color: transparent !important;
    background-image: none !important;
    background: transparent !important; 
    border: 0px !important; 
    border-color: transparent !important;
    box-shadow: none !important; 
    
    /* 彈窗結構樣式 - 這些寬度與置中會作用於容器內 */
    width: 320px !important;
    max-width: 90vw !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    animation: scaleIn 0.2s !important;
    text-align: center !important;
}

/* 3. 內容區域 (.noty_message) - 設定為「上方金底黑字」 */
.noty_message {
    padding: 25px 20px !important;
    /* 使用您的金色漸層 */
    background: linear-gradient(to bottom, #dabe81, #c4a15b) !important;
    color: #000 !important; /* 黑字 */
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    text-align: center !important;
    /* 確保上方有圓角 */
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

/* 4. 按鈕區塊 (.noty_buttons) - 設定為「下方黑底」 */
.noty_buttons {
    display: flex !important; /* 👉 新增這行：啟用 Flex 排版讓按鈕變成左右 */
    background-color: #333 !important; /* 深灰色底 */
    border-top: none !important;
    padding: 0 !important;
    text-align: center !important;
    /* 確保下方有圓角 */
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* 5. 按鈕樣式 (.noty_buttons .btn) */
.noty_buttons .btn {
    display: block !important;
    flex: 1 !important; /* 👉 修改這行：取代原本的 width: 100%，讓兩個按鈕各佔一半寬度 */
    /* width: 100% !important; (這行可以刪掉) */
    padding: 15px !important;
    background: transparent !important; /* 繼承父層 #333 */
    color: #fff !important; /* 白字 */
    font-weight: bold !important;
    text-transform: uppercase !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: background 0.2s !important;
    border-radius: 0 !important; 
    margin: 0 !important;
    box-shadow: none !important;
}

.noty_buttons .btn:hover {
    background: #000 !important; /* hover 變全黑 */
}

/* 如果是 my_confirm 的取消按鈕 (紅色) */
.noty_buttons .btn-danger {
    background: #d9534f !important;
    color: #fff !important;
}

/* 6. 強制清除所有 Layout 容器的預設背景與邊框 
   這會選取到 #noty_topCenter_layout_container, #noty_bottomRight_layout_container 等所有容器中的 li
*/
[id^="noty_"][id$="_layout_container"] li {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important; /* 讓內容決定寬度，或是被 .noty_bar 限制 */
}

/* 7. 修正 Top Center 等 Layout 的寬度問題，確保它們不會佔滿整行導致無法置中 
   (Noty 預設 layout js 會給固定寬度 310px，這裡做保險)
*/
[id^="noty_"][id$="_layout_container"] {
    list-style: none !important; 
}