/* 森麒客戶畫面簡化（第 1、2 批）：只改呈現。付款、同意、送出與藍新導轉仍由原控制器負責；這裡不隱藏任何付款節點（data-ip、data-ac-pay），
   只把重複的入口（另開補款、關閉保留資料、工具與 App、服務購物車大按鈕、更新已移除紀錄）從畫面拿掉。 */
body.qq-cart-customer-first{--qq-b12-navy:#18367c;--qq-b12-blue:#2158a4;--qq-b12-orange:#d97827;--qq-b12-cta:#b94700;--qq-b12-muted:#52627a;--qq-b12-line:#dce4ee}

/* 重複入口：不渲染（節點保留，原控制器查得到就不會出錯）。 */
body.qq-cart-customer-first #cartInlineTools,
body.qq-cart-customer-first #qq-auto-checkout-root .ac-launch,
body.qq-cart-customer-first #supplement-new,
body.qq-cart-customer-first #supplement-back,
body.qq-cart-customer-first .qq-inquiry-trash>button{display:none!important}
/* 服務購物車的大按鈕不渲染後，外框也收起來（視窗本身仍在原位置、照常開啟）。 */
body.qq-cart-customer-first #qq-auto-checkout-root{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;min-height:0!important}
body.qq-cart-customer-first #supplement-checkout-dialog .qq-supplement-actions:not(:has(#supplement-pay:not([hidden]))){display:none!important}

/* 頁首：Logo＋聯絡森麒＋帳號區（手機換到第二行）。 */
body.qq-cart-customer-first>header{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:10px 14px}
body.qq-cart-customer-first>header>.brand{margin-right:auto}
body.qq-cart-customer-first>header nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px}
body.qq-cart-customer-first>header .qq-contact-open{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border:2px solid #fff;border-radius:999px;background:transparent;color:#fff;font:inherit;font-weight:800;cursor:pointer}
body.qq-cart-customer-first>header .qq-contact-open:hover{background:#ffffff1f}
body.qq-cart-customer-first>header .qq-contact-open-phone{font-weight:600;opacity:.92}
.qq-account-chip{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 8px;border-radius:12px;background:#ffffff14;border:1px solid #ffffff59;color:#fff;line-height:1.35}
.qq-account-chip[hidden]{display:none!important}
.qq-account-chip .qq-account-badge{flex:0 0 auto;padding:3px 10px;border-radius:999px;background:#fff;color:#18367c;font-size:14px;font-weight:800}
.qq-account-chip .qq-account-badge-owner{background:#d97827;color:#1b1206}
.qq-account-chip .qq-account-text{display:flex;flex-direction:column;min-width:0}
.qq-account-chip .qq-account-text strong{font-size:15px}
.qq-account-chip .qq-account-text small{font-size:13px;color:#dbe6fb;overflow-wrap:anywhere}
.qq-account-chip .qq-account-text .qq-account-owner-note{color:#ffd9b3;font-weight:700}
.qq-account-chip .qq-account-text .qq-account-error{color:#ffe1c2}
.qq-account-chip .qq-account-logout{flex:0 0 auto;min-width:56px;min-height:44px;padding:6px 12px;border:1px solid #fff;border-radius:9px;background:#fff;color:#18367c;font:inherit;font-weight:800;cursor:pointer}
@media(max-width:640px){
 body.qq-cart-customer-first>header .qq-contact-open-phone{display:none}
 .qq-account-chip{flex:1 1 100%;box-sizing:border-box}
 .qq-account-chip .qq-account-text{flex:1 1 auto}
}

/* 上半部：只在其他頁面（報修、年費）顯示「回到我的報價與付款」。 */
body.qq-cart-customer-first .qq-b12-back-nav{margin:14px 0 0}
body.qq-cart-customer-first .qq-b12-back-nav a{display:inline-flex;align-items:center;min-height:44px;padding:8px 2px;color:#18367c;font-weight:800;text-decoration:underline;text-underline-offset:4px;background:none}
body.qq-cart-customer-first[data-qq-cart-view=orders] .qq-b12-back-nav,
body.qq-cart-customer-first:not([data-qq-cart-view]) .qq-b12-back-nav{display:none!important}

/* 我的報價與付款：不折疊。 */
body.qq-cart-guided-ui div#cartExistingOrders{display:block}
/* 標題列：「我的報價與付款」＋右邊「更新狀態」，結果「↻ HH:MM 已更新」就寫在下一行（第 3 輪：結果貼著按鈕，也讓第一張卡進到手機第一屏）。 */
body.qq-cart-customer-first #service-orders .qq-b12-title-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px 16px;margin:12px 0 4px}
body.qq-cart-customer-first #service-orders .qq-b12-title-row h2{margin:0}
body.qq-cart-customer-first #service-orders .qq-b12-updated{margin:0 0 10px;color:var(--qq-b12-muted);font-size:15px;min-height:1.5em}
body.qq-cart-customer-first #service-orders-login a{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:12px 24px;border-radius:9px;background:var(--qq-b12-cta);color:#fff;font-weight:800;text-decoration:none;box-shadow:0 3px 0 #7a2f00}
body.qq-cart-customer-first #service-orders-records{display:block!important}
body.qq-cart-customer-first #service-orders section.qq-b12-group{margin:18px 0 0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
body.qq-cart-customer-first .qq-b12-group-title{margin:0 0 10px;color:#18367c;font-size:18px}
body.qq-cart-customer-first .qq-b12-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:14px}
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card{display:flex;flex-direction:column;gap:6px;margin:0;padding:16px 18px;border:1px solid #cedbeb;border-left:5px solid #2158a4;border-radius:10px;background:#fff}
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card[data-qq-b12-tone=action]{border-left-color:#d97827}
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card[data-qq-b12-tone=done]{border-left-color:#1d6b45}
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card[data-qq-b12-tone=ended]{border-left-color:#8a96a8}
body.qq-cart-customer-first .qq-b12-badge{align-self:flex-start;margin:0;padding:2px 10px;border-radius:6px;font-size:14px;font-weight:800;background:#edf3fd;color:#2158a4}
body.qq-cart-customer-first .qq-b12-card[data-qq-b12-tone=action] .qq-b12-badge{background:#fff2e5;color:#9a4a0b}
body.qq-cart-customer-first .qq-b12-card[data-qq-b12-tone=done] .qq-b12-badge{background:#e7f4ec;color:#1d6b45}
body.qq-cart-customer-first .qq-b12-card[data-qq-b12-tone=ended] .qq-b12-badge{background:#eef1f5;color:#52627a}
body.qq-cart-customer-first .qq-b12-card h4{margin:2px 0 0;color:#18367c;font-size:18px;line-height:1.45;overflow-wrap:anywhere}
body.qq-cart-customer-first .qq-b12-card .qq-b12-meta{margin:0;color:var(--qq-b12-muted);font-size:14px}
body.qq-cart-customer-first .qq-b12-card .qq-b12-next{margin:2px 0 0;padding:0;background:none;color:#102755;font-size:15px;line-height:1.6}
body.qq-cart-customer-first .qq-b12-card .qq-b12-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:8px}
body.qq-cart-customer-first .qq-b12-card .qq-b12-amount{margin:0;color:#18367c;font-size:20px;font-weight:800}
body.qq-cart-customer-first .qq-b12-card .qq-b12-amount small{font-size:13px;font-weight:600;color:var(--qq-b12-muted)}
body.qq-cart-customer-first.qq-cart-guided-ui .qq-b12-card .qq-b12-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:112px;padding:10px 18px;border:2px solid #18367c;border-radius:9px;background:#fff;color:#18367c;font:inherit;font-weight:800;text-decoration:none;box-shadow:none;cursor:pointer}
body.qq-cart-customer-first.qq-cart-guided-ui .qq-b12-card .qq-b12-button:hover{background:#edf3fd}
body.qq-cart-customer-first.qq-cart-guided-ui .qq-b12-card .qq-b12-button.qq-b12-primary{border-color:var(--qq-b12-cta);background:var(--qq-b12-cta);color:#fff;box-shadow:0 3px 0 #7a2f00}
body.qq-cart-customer-first.qq-cart-guided-ui .qq-b12-card .qq-b12-button.qq-b12-primary:hover{background:#9c3c00}
body.qq-cart-customer-first #service-orders-refresh{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:8px 16px;border:2px solid #18367c;border-radius:9px;background:#fff;color:#18367c;font-weight:700}
body.qq-cart-customer-first #service-orders-refresh[aria-busy=true]{background:#e9edf3;border-color:#5d6a7d;color:#5d6a7d}
body.qq-cart-customer-first .qq-b12-list-links{display:flex;flex-wrap:wrap;gap:8px 22px;margin:20px 0 0;padding:14px 0 0;border-top:1px solid var(--qq-b12-line)}
body.qq-cart-customer-first .qq-b12-list-links .qq-b12-link{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:44px;padding:6px 2px;border:0;background:none;color:#18367c;font:inherit;font-weight:800;text-align:left;text-decoration:underline;text-underline-offset:4px;cursor:pointer;box-shadow:none}
body.qq-cart-customer-first .qq-b12-list-links .qq-b12-link small{font-size:13px;font-weight:500;color:var(--qq-b12-muted);text-decoration:none}
/* 客戶沒有任何報價時：空狀態卡（render 產生），「我要報修」是這一頁唯一的主要按鈕；清單下方同一個連結、更新狀態與重複的說明不顯示（第 3 輪）。 */
body.qq-cart-customer-first .qq-b12-empty{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:6px 0 0;padding:18px 20px;border:1px dashed #9fb3cc;border-radius:12px;background:#fff}
body.qq-cart-customer-first .qq-b12-empty p{margin:0;color:#102755;font-size:15px;line-height:1.7}
body.qq-cart-customer-first .qq-b12-empty .qq-b12-empty-title{color:#18367c;font-size:18px;font-weight:800}
body.qq-cart-customer-first.qq-cart-guided-ui .qq-b12-empty .qq-b12-button{display:inline-flex;align-items:center;justify-content:center;margin-top:6px;min-height:52px;min-width:140px;padding:12px 24px;border:2px solid var(--qq-b12-cta);border-radius:9px;background:var(--qq-b12-cta);color:#fff;font-weight:800;text-decoration:none;box-shadow:0 3px 0 #7a2f00}
body.qq-cart-customer-first #service-orders[data-qq-b12-empty=true]:has(.qq-b12-empty) .qq-b12-list-links .qq-b12-repair,
body.qq-cart-customer-first #service-orders[data-qq-b12-empty=true]:has(.qq-b12-empty) #service-orders-refresh,
body.qq-cart-customer-first #service-orders[data-qq-b12-empty=true]:has(.qq-b12-empty) #service-orders-message{display:none!important}
/* 未登入或只有管理帳號時（頁面中央已是登入按鈕）不放「追加補款」：補款要先登入客戶帳號（第 3 輪）。 */
body.qq-cart-customer-first #service-orders:has(#service-orders-login:not([hidden])) [data-qq-b12-supplement-new],
html[data-qq-account=guest] body.qq-cart-customer-first [data-qq-b12-supplement-new],
html[data-qq-account=owner] body.qq-cart-customer-first [data-qq-b12-supplement-new]{display:none!important}

/* 付款視窗內：說明旁的「聯絡森麒」與更新結果。 */
#qq-auto-checkout-root .qq-b12-contact{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:10px 0;border:0;border-radius:9px;background:#18367c;color:#fff;font:inherit;font-weight:800;cursor:pointer}
#qq-auto-checkout-root .qq-b12-contact[hidden]{display:none}
#qq-auto-checkout-root .qq-b12-refresh-note{margin:6px 0 0;color:#52627a;font-size:14px;min-height:1.4em;scroll-margin-block:12px}

/* 「聯絡森麒」視窗。 */
.qq-contact-dialog{width:min(560px,calc(100vw - 24px));max-height:92dvh;padding:0;border:0;border-top:5px solid #d97827;border-radius:14px;box-shadow:0 20px 50px #0b1d3f66;color:#102755;font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;overflow:auto}
.qq-contact-dialog::backdrop{background:#0b1d3f99}
.qq-contact-dialog .qq-contact-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 18px 10px 22px;background:#18367c;color:#fff}
.qq-contact-dialog .qq-contact-head h2{margin:0;font-size:22px}
.qq-contact-dialog .qq-contact-head p{margin:4px 0 0;color:#dce7fb;font-size:15px}
.qq-contact-dialog .qq-contact-close{flex:0 0 48px;width:48px;height:48px;border:1px solid #fff;border-radius:10px;background:#fff;color:#18367c;font-size:26px;line-height:1;cursor:pointer}
.qq-contact-dialog .qq-contact-body{display:flex;flex-direction:column;gap:12px;padding:18px 22px 22px}
.qq-contact-dialog .qq-contact-call{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;border-radius:10px;background:#b94700;color:#fff;font-size:18px;font-weight:800;text-decoration:none;box-shadow:0 3px 0 #7a2f00}
.qq-contact-dialog .qq-contact-line{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;border:2px solid #18367c;border-radius:10px;background:#fff;color:#18367c;font-weight:800;text-decoration:none}
.qq-contact-dialog .qq-contact-line-mark{flex:none;white-space:nowrap;padding:2px 7px;border-radius:6px;background:#06c755;color:#fff;font-size:13px;font-weight:800}
.qq-contact-dialog .qq-contact-guest{margin:4px 0 0;color:#52627a}
.qq-contact-dialog section.qq-contact-message{margin:0;padding:12px 0 0;border:0;border-top:1px solid #dce4ee;border-radius:0;background:none;box-shadow:none}
.qq-contact-dialog .qq-contact-message[hidden],.qq-contact-dialog .qq-contact-guest[hidden]{display:none}
.qq-contact-dialog h3{margin:0 0 8px;font-size:18px;color:#18367c}
.qq-contact-dialog h4{margin:16px 0 6px;font-size:16px;color:#18367c}
.qq-contact-dialog label{display:block;font-weight:700;margin-bottom:4px}
.qq-contact-dialog textarea{box-sizing:border-box;width:100%;min-height:110px;padding:10px 12px;border:1px solid #6b7d93;border-radius:8px;font:inherit;font-size:16px}
.qq-contact-dialog .qq-contact-hint{margin:6px 0 10px;color:#52627a;font-size:14px}
.qq-contact-dialog .qq-contact-send{min-height:48px;padding:10px 22px;border:0;border-radius:9px;background:#18367c;color:#fff;font:inherit;font-weight:800;cursor:pointer}
.qq-contact-dialog .qq-contact-send:disabled{background:#e9edf3;color:#5d6a7d;cursor:default}
.qq-contact-dialog .qq-contact-result{margin:10px 0 0;font-weight:700;color:#1d6b45;min-height:1.4em}
.qq-contact-dialog .qq-contact-result:focus{outline:2px solid #2158a4;outline-offset:3px}
.qq-contact-dialog .qq-contact-history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.qq-contact-dialog .qq-contact-history li{padding:10px 12px;border-radius:9px;background:#f3f6fb}
.qq-contact-dialog .qq-contact-history li.qq-contact-reply{background:#e7f4ec}
.qq-contact-dialog .qq-contact-history strong{display:block;font-size:14px;color:#52627a}
.qq-contact-dialog .qq-contact-history p{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.qq-contact-dialog .qq-contact-history-note{margin:0;color:#52627a;font-size:14px}
@media(max-width:640px){.qq-contact-dialog{width:100%;max-width:100%;margin:auto 0 0;border-radius:14px 14px 0 0}.qq-contact-dialog .qq-contact-body{padding:16px 16px max(18px,env(safe-area-inset-bottom))}}

/* 頁尾：6 個連結＋公司資料。 */
body.qq-cart-customer-first>footer{text-align:center}
body.qq-cart-customer-first>footer .qq-b12-footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px;margin:0 0 10px}
body.qq-cart-customer-first>footer .qq-b12-footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;color:#fff;text-decoration:underline;text-underline-offset:4px}
body.qq-cart-customer-first>footer p{margin:0;color:#dbe6fb;font-size:14px;line-height:1.8}
@media(max-width:760px){body.qq-cart-customer-first>header{flex-direction:row;align-items:center}}
/* 未登入或只有管理帳號時（頁面中央已是登入按鈕），不放「更新狀態」。 */
body.qq-cart-customer-first #service-orders:has(#service-orders-login:not([hidden])) #service-orders-refresh{display:none!important}
/* 清單畫出卡片時，筆數已寫在狀態行，不再重複一句；只在這一輪真的有卡片時才藏（讀取失敗、需要登入時訊息一定看得到，第 3 輪審查修正）。 */
body.qq-cart-customer-first #service-orders[data-qq-b12-empty=false]:has(#service-orders-records article) #service-orders-message{display:none}
body.qq-cart-customer-first>header>.brand{min-height:44px}

/* 已登入客戶的清單畫面：上方「森麒客戶服務／報價與付款／說明」和清單標題「我的報價與付款」重複，只留給螢幕報讀，讓第一張卡進到手機第一屏（第 3 輪）。 */
html[data-qq-account^=customer] body.qq-cart-customer-first:is([data-qq-cart-view=orders],:not([data-qq-cart-view])) .qq-guided-hero{margin:0!important;padding:0!important;min-height:0!important;border:0!important;background:none!important;box-shadow:none!important}
html[data-qq-account^=customer] body.qq-cart-customer-first:is([data-qq-cart-view=orders],:not([data-qq-cart-view])) .qq-guided-hero>*{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
/* 補款紀錄的「聯絡森麒」（supplement-entry 產生；深藍、滿版）。 */
#supplement-checkout-dialog .qq-b12-supp-contact{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:12px 0 0;border:0;border-radius:9px;background:#18367c;color:#fff;font:inherit;font-weight:800;cursor:pointer}
#supplement-checkout-dialog .qq-b12-supp-contact[hidden]{display:none!important}
/* 未登入或只有管理帳號時沒有可更新的清單，不保留空白的狀態行。 */
body.qq-cart-customer-first #service-orders:has(#service-orders-login:not([hidden])) .qq-b12-updated{display:none}
/* 卡片內距收緊：每一行只靠卡片的 gap 分開，不吃舊樣式的段落邊距（第 3 輪，第一張卡的按鈕進到手機第一屏）。 */
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card>p,
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card>h4{margin:0!important}
body.qq-cart-customer-first #service-orders #service-orders-records .qq-b12-card .qq-b12-foot{margin-top:4px;padding-top:4px}
