/* ==========================================
   WALKTAXI 3.0 核心 UI 樣式庫 
   (大堂、發單、投標、開標、私聊)
========================================== */

/* ==========================================
   PART 1: 全域佈局與頂底導覽列
========================================== */
.lobby-view { display: flex; flex-direction: column; height: 100vh; background-color: #E8D5A3; color: #4a4a4a; }
.lobby-header { background-color: #FFFFFF; border-bottom: 1px solid #E5E7EB; display: flex; flex-direction: column; z-index: 10; }
.lobby-header-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 15px 20px 12px 20px; border-bottom: 1px solid #F0F0F0; }
.header-left { display: flex; justify-content: flex-start; }
.header-right { display: flex; justify-content: flex-end; gap: 18px; }
.lobby-title { font-size: 1.3rem; font-weight: 900; color: #4a4a4a; margin: 0; letter-spacing: 0.5px; text-align: center; }
.nav-icon { font-size: 1.4rem; color: #4a4a4a; cursor: pointer; transition: color 0.2s, transform 0.1s; }
.nav-icon:active, .nav-icon.active { color: #FFCC33; }
.nav-icon:active { transform: scale(0.9); }
.lobby-header-bottom { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px 15px 20px; }
.channel-info-wrapper { display: flex; align-items: center; gap: 12px; }
.channel-avatar { width: 44px; height: 44px; border-radius: 50%; background-color: #F5F6F8; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: #888; }
.channel-texts { display: flex; flex-direction: column; }
.channel-name { font-size: 1.1rem; font-weight: 800; color: #4a4a4a; line-height: 1.2; }
.channel-users { font-size: 0.85rem; font-weight: 600; color: #888888; }
.form-switch .form-check-input { width: 3em; height: 1.5em; cursor: pointer; }
.custom-switch:checked { background-color: #FFCC33 !important; border-color: #FFCC33 !important; }

/* 底部導覽列 */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background-color: #FFFFFF; border-top: 1px solid #E5E7EB; border-radius: 24px 24px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0; z-index: 20; }
.nav-item-wrapper { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; }
.nav-item-wrapper.center-mic { position: relative; }
.nav-item { color: #BBBBBB; font-size: 1.6rem; cursor: pointer; transition: all 0.2s; }
.nav-item.active { color: #FFCC33; transform: scale(1.1); }
.nav-item:active { transform: scale(0.9); }
.ptt-wrapper { position: absolute; top: -45px; left: 50%; transform: translateX(-50%); background-color: #E8D5A3; width: 112px; height: 112px; border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.ptt-btn { width: 88px; height: 88px; border-radius: 50%; background-color: #FFCC33; border: none; color: #000; font-size: 2.7rem; display: flex; justify-content: center; align-items: center; user-select: none; touch-action: none; transition: all 0.1s; }
.ptt-btn.recording { background-color: #b8860b; color: #FFF; transform: scale(0.95); box-shadow: 0 0 0 8px rgba(229, 57, 53, 0.3); animation: pttPulse 1s infinite alternate; }

/* ==========================================
   PART 2: 大堂吹水與瀑布流訂單 (Lobby Cards)
========================================== */
.order-list-wrapper { display: flex; flex-direction: column; height: 100%; padding-bottom: 90px; }
.chatter-tray-wrapper { position: sticky; top: 0; z-index: 10; background-color: #E8D5A3; /* padding-bottom: 10px;  margin-bottom: 5px; */box-shadow: 0 5px 15px rgba(232, 213, 163, 0.9); }
.chatter-tray { display: flex; gap: 12px; overflow-x: auto; padding: 10px 15px; scrollbar-width: none; }
.chatter-tray::-webkit-scrollbar { display: none; }
.chatter-pill { flex: 0 0 auto; background-color: #fff; border: 2px solid transparent; border-radius: 24px; padding: 6px 15px 6px 6px; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: all 0.2s; }
.chatter-pill.self { background-color: #FFFDE7; border-color: #FFCC33; }
.chatter-pill.playing { border-color: #b8860b; background-color: #fff9e6; animation: pulseChatter 1.5s infinite; }
@keyframes pulseChatter { 0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); } }
.cp-avatar { width: 38px; height: 38px; border-radius: 50%; background-color: #3f2d00; color: #FFCC33; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 1.1rem; }
.cp-content { display: flex; flex-direction: column; }
.cp-name { font-size: 0.9rem; font-weight: 800; color: #111; margin-bottom: 2px; }
.chatter-pill.self .cp-name { color: #B8860B; }
.btn-chatter-play { background: transparent; border: none; padding: 0; font-size: 0.8rem; font-weight: 800; color: #4a4a4a; display: flex; align-items: center; gap: 4px; }
.btn-chatter-play i { color: #FFCC33; font-size: 1.1rem; }

.real-order-list { flex: 1; overflow-y: auto; padding: 0 15px 120px 15px; display: flex; flex-direction: column; gap: 15px; }

/* 🌟 卡片本體 (全包一體色，拔除分層框線) */
/* ==========================================
   全新極簡排版 (高度壓縮版)
========================================== */
.order-card { 
    background-color: #FDFCF7; 
    border-radius: 16px; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); 
    overflow: hidden; 
    transition: transform 0.2s; 
    border: 1px solid rgba(0,0,0,0.03); 
    margin-top: 8px; 
    position: relative; 
    flex-shrink: 0; 
}
.order-card.is-new { animation: flashNew 2s ease-out; }
@keyframes flashNew { 0% { border-color: #FFCC33; box-shadow: 0 0 15px rgba(255, 204, 51, 0.5); } 100% { border-color: transparent; } }

.badge-jump { display: inline-block; align-self: flex-start; background-color: #FFF3CD; color: #2d1900; font-size: 0.75rem; font-weight: 800; padding: 2px 8px; border-radius: 8px; position: absolute; top: 16px; right: 138px; z-index: 2; }




/* 🌟 Toggle 錄音中：按鈕稍微變成紅色 + 呼吸燈 */
.btn-giant-mic.toggle-recording {
    background: #ff4757;      /* 依你主題色調整 */
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6); }
    70%  { box-shadow: 0 0 0 16px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* 🌟 方形停止符號（不依賴 Bootstrap Icon，尺寸穩定） */
.stop-square {
    display: inline-block;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 6px;
    vertical-align: middle;
}






/* 🌟 左右分欄排版 */
.compact-card-inner { display: flex; padding: 14px; gap: 12px; align-items: stretch; }

/* 📌 左半部 (資訊區) */
.card-info-col { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; overflow: hidden; }

.sender-row { display: flex; align-items: center; gap: 8px; }
.sender-avatar-sm { width: 26px; height: 26px; border-radius: 50%; background-color: #111; color: #FFCC33; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 0.9rem; }
.sender-name-sm { font-size: 1.1rem; font-weight: 900; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-text-sm { font-size: 0.85rem; font-weight: 700; color: #888; margin-left: auto; }

/* 壓縮版起訖點 */
.compact-route-box { display: flex; align-items: center; font-size: 1.25rem; font-weight: 900; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; margin-bottom: 2px; }
.route-arrow { color: #888; font-size: 1.5rem; margin: 0 4px; }












/* 🌟 壓縮版語音按鈕 (整條可點擊) */
.compact-voice-btn { 
    display: flex; 
    align-items: center; 
    width: 100%; 
	height:50px;
    background: #F5F6F8; 
    border-radius: 12px; 
    padding: 6px 12px; 
    gap: 8px; 
    border: 1px solid #E5E7EB; 
    margin-top: 2px; 
    margin-bottom: 2px; 
    cursor: pointer; 
    transition: all 0.2s; 
    text-align: left;
}
.compact-voice-btn:active { background: #fff9e6; transform: scale(0.98); }

/* 播放中變色 */
.compact-voice-btn.playing { background-color: #fff9e6; border-color: #b8860b; }

/* 🌟 無背板的深灰大三角形 */
.play-icon-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #4a4a4a; /* 指定的深灰色 */
    font-size: 2.2rem; /* 放大三角形 */
    line-height: 1;
    margin-left: -5px; /* 微調讓視覺更緊湊 */
}
.compact-voice-btn.playing .play-icon-wrapper { color: #b8860b; }

/* 文字樣式 */
.voice-text { 
    font-size: 1.05rem; 
    font-weight: 800; 
    color: #555; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    flex: 1; 
}
.compact-voice-btn.playing .voice-text { color: #b8860b; }










/* ==========================================
   🌟 標籤升級區 (加大、加粗、分層)
========================================== */
.card-tags-sm { display: flex; flex-wrap: wrap; gap: 8px; }

/* 一般標籤 (仿圖片灰底樣式) */
.img-style-tag { 
    background: linear-gradient(135deg, #F8F9FA 0%, #D7DDE8 150%, #BFC6D0 100%);
    border: none !important; 
    color: #2C3E50; /* 深藍灰色字體，在銀底上極具科技感 */
    padding: 5px 13px; 
    border-radius: 8px; 
    font-size: 1.05rem; 
    font-weight: 900; 
    box-shadow: 0 4px 10px rgba(191, 198, 208, 0.4);
    
    /* 動畫必需屬性 */
    position: relative;
    overflow: hidden;
    display: inline-flex; 
    align-items: center;
}

/* 🌟 銀色金屬反光掃過動畫 (與金卡錯開秒數，視覺更生動) */
.img-style-tag::before {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-30deg);
    animation: silverShineTag 4s infinite; /* 秒數設定4秒，跟金卡的3.5秒錯開 */
    pointer-events: none;
}

@keyframes silverShineTag {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}



/* 🌟 金錢標籤 (尊爵金卡閃爍反光版) */
.money-style-tag {
    /* 替換原本的淺黃底色與虛線邊框 */
    background: linear-gradient(135deg, #FFDF00 0%, #D4AF37 150%, #B8860B 100%);
    border: none !important; 
    color: #3E2723; /* 深棕色字體，在金底上更顯質感與對比 */
    
    /* 保留原有的排版大小 */
    padding: 5px 13px; 
    border-radius: 8px; 
    font-size: 1.05rem; 
    font-weight: 900; 
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    
    /* 動畫必需屬性 */
    position: relative;
    overflow: hidden;
    display: inline-flex; /* 確保標籤內文字居中且偽元素覆蓋正確 */
    align-items: center;
}

/* 🌟 金屬反光掃過動畫 (套用 Wallet 設計) */
.money-style-tag::before {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-30deg);
    animation: goldShineTag 3.5s infinite;
    pointer-events: none;
}

/* 獨立命名 Keyframes，避免與原本的產生衝突 */
@keyframes goldShineTag {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* ==========================================
   📌 右半部 (純圓形搶單按鈕，完美置中)
========================================== */
.card-action-col { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 65px; border-left: 1px dashed #E5E7EB; padding-left: 12px; }

.action-btn-wrapper { position: relative; }
.btn-claim-circle { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background-color: #FFCC33; 
    border: none; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    color: #111; 
    box-shadow: 0 4px 10px rgba(255, 204, 51, 0.4); 
    transition: transform 0.1s; 
    flex-shrink: 0; 
    padding: 0; 
    line-height: 1.1; 
}
.btn-claim-circle:active { transform: scale(0.92); background-color: #E6B800; }
.btn-claim-circle.disabled { background-color: #E5E7EB; color: #888; box-shadow: none; pointer-events: none; }
.btn-claim-circle.processing { background-color: #E5E7EB; color: #888; box-shadow: none; pointer-events: none; }
.btn-claim-circle.processing .bi { display: none; }

/* 扣點數字 (吸附在按鈕右下角) */
.deduct-pts { 
    position: absolute; 
    bottom: -5px; 
    right: -8px; 
    background: #E53935; 
    color: #FFF; 
    font-size: 0.8rem; 
    font-weight: 900; 
    padding: 2px 6px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
    pointer-events: none; 
}









/* ==========================================
   PART 3: 全域統一語音按鈕組 (Unified Audio Group)
========================================== */
.unified-audio-group { display: flex; gap: 10px; width: 100%; height: 56px; margin-bottom: 15px; }
.btn-u-action { flex: 1; border-radius: 14px; font-size: 1.15rem; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 8px; transition: all 0.2s; border: 2px solid transparent; cursor: pointer; user-select: none; touch-action: none; box-sizing: border-box; }
.btn-u-action i { font-size: 1.3rem; }
.btn-u-record { background-color: #F5F6F8; color: #4a4a4a; border-style: dashed; border-color: #CCC; }
.btn-u-record:active { background-color: #E5E7EB; transform: scale(0.98); }
.btn-u-record.recording { background-color: #FFE5E5; color: #E53935; border-style: solid; border-color: #E53935; animation: uPulseRecord 1.5s infinite; }
.btn-u-replay { background-color: #FFF9E6; color: #B8860B; border-color: #FFCC33; display: none; }
.btn-u-replay.active { display: flex; }
.btn-u-replay:active { transform: scale(0.98); }
.btn-u-replay.playing { background-color: #FFE5E5; color: #E53935; border-color: #E53935; }
@keyframes uPulseRecord { 0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); } }



/* ==========================================
   PART 4: 投標與 ETA 面板 (Bidding Modal)
========================================== */
.bidding-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 10600; display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.bidding-overlay.active { opacity: 1; pointer-events: auto; }
.bidding-panel { background-color: #FFF; width: 100%; border-radius: 24px 24px 0 0; padding: 25px 25px 40px 25px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); }
.bidding-overlay.active .bidding-panel { transform: translateY(0); }
.bidding-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.bidding-title { font-size: 1.4rem; font-weight: 900; color: #111; }
.btn-close-bidding { background: #F5F6F8; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; color: #111; display: flex; justify-content: center; align-items: center; }
.eta-title { font-size: 1.1rem; height: 2rem; font-weight: 800; color: #4a4a4a; margin-bottom: 12px; }
.eta-grid, .extra-points-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.btn-eta, .btn-extra { background-color: #F5F6F8; border: 2px solid transparent; color: #4a4a4a; font-weight: 800; font-size: 1.05rem; padding: 12px 0; border-radius: 12px; transition: all 0.1s; }
.btn-text { font-weight: 800; font-size: 1.05rem;  }
.btn-eta.active, .btn-extra.active { background-color: #FFFDE7; border-color: #FFCC33; color: #111; transform: scale(1.05); }
.btn-submit-bid { width: 100%; background-color: #111; color: #FFCC33; border: none; height: 60px; border-radius: 16px; font-size: 1.3rem; font-weight: 900; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.1s; }
.btn-submit-bid:active { transform: scale(0.98); background-color: #333; }
.btn-submit-bid:disabled { background-color: #CCC; color: #888; box-shadow: none; transform: none; }

/* 🌟 錢包扣款徽章 */
.wallet-badge { background-color: #FFF9E6; color: #4a4a4a; border: 1px solid #FFCC33; padding: 4px 10px; border-radius: 8px; font-size: 0.95rem; font-weight: 900; display: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.wallet-badge.active { display: inline-block; animation: fadeInTitle 0.2s ease-out; }

/* ==========================================
   PART 5: 台主開標面板 (Dispatch Dashboard)
========================================== */
.dispatch-dashboard-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(3px); z-index: 10700; display: flex; align-items: flex-start; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.dispatch-dashboard-overlay.active { opacity: 1; pointer-events: auto; }
.dashboard-panel { background-color: #F5F6F8; width: 100%; max-height: 85vh; border-radius: 0 0 24px 24px; padding: 20px; transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); display: flex; flex-direction: column; }
.dispatch-dashboard-overlay.active .dashboard-panel { transform: translateY(0); }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.dashboard-title { font-size: 1.3rem; font-weight: 900; color: #111; }
.btn-close-dashboard { background: #E5E7EB; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; }
.dashboard-content { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.dashboard-order-card { background: #FFF; padding: 15px; border-radius: 16px; margin-bottom: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.bid-item { border: 1px solid #EEE; padding: 10px; margin-bottom: 8px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.heartbeat { animation: heartbeat 1s infinite; }
@keyframes heartbeat { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* ==========================================
   PART 6: 台主發單面板 (Dispatch UI Modal)
========================================== */
.dispatch-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; align-items: flex-end; z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
.dispatch-modal-overlay.active { opacity: 1; pointer-events: auto; }
.dispatch-panel { background-color: #FFFFFF; width: 100%; height: 88vh; max-height: 870px; border-radius: 30px 30px 0 0; padding: 25px 25px 40px 25px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.dispatch-modal-overlay.active .dispatch-panel { transform: translateY(0); }
.dispatch-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mode-switch { display: flex; background-color: #F5F6F8; border-radius: 20px; padding: 4px; }
.mode-btn { border: none; background: transparent; padding: 8px 16px; border-radius: 16px; font-size: 1rem; font-weight: 800; color: #888; transition: all 0.2s; }
.mode-btn.active { background-color: #FFFFFF; color: #4a4a4a; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.btn-close-modal, .btn-close-dispatch { background: #F5F6F8; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; color: #4a4a4a; }
.step-indicator { display: flex; gap: 10px; margin-bottom: 25px; }
.step-dot { flex: 1; height: 6px; background-color: #E5E7EB; border-radius: 3px; transition: 0.3s; }
.step-dot.active { background-color: #FFCC33; }
.step-dot.completed { background-color: #4a4a4a; }
.step-content { display: none; flex-direction: column; flex: 1; height: 100%; animation: fadeInStep 0.3s ease-out; overflow-y: auto; padding-bottom: 20px; }
.step-content.active { display: flex; }
#static-title { font-size: 1.6rem; font-weight: 900; color: #111; line-height: 44px; display: inline-block; animation: fadeInTitle 0.2s ease-out; }

/* 發單巨型麥克風 */
.voice-record-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.btn-giant-mic { width: 140px; height: 140px; border-radius: 50%; background-color: #FFCC33; border: none; font-size: 4.5rem; color: #4a4a4a; display: flex; justify-content: center; align-items: center; box-shadow: 0 10px 30px rgba(255, 204, 51, 0.4); transition: all 0.1s; user-select: none; touch-action: none; }
.btn-giant-mic.recording { background-color: #E53935; color: #FFF; transform: scale(0.9); box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4); }
.voice-hint { font-size: 1.1rem; font-weight: 700; color: #888; }
.mode-area { display: none; flex-direction: column; flex: 1; }
.mode-area.active { display: flex; animation: fadeInTab 0.2s ease-out; }

/* 發單文字與地點輸入 */
.text-stt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 8px 5px; }
.stt-hint { font-size: 0.95rem; font-weight: 700; color: #888; }
.btn-icon-mic { background-color: #ffcc33; color: #000; border: none; width: 44px; height: 44px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.4rem; transition: all 0.2s; }
.btn-icon-mic:active { background-color: #E5E7EB; transform: scale(0.9); }
.btn-icon-mic.recording-text { background-color: #FFE5E5; color: #E53935; animation: pulseMic 1.5s infinite; }
.btn-mini-mic.recording-text { background-color: #FFE5E5; border-color: #E53935; color: #E53935; animation: pulseMic 1.5s infinite; }
.btn-mini-mic { background-color: #FFF9E6; color: #E6B800; border: 1px solid #FFCC33; border-radius: 12px; padding: 6px 12px; font-weight: 800; }
.dispatch-inputs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.route-arrow-down { text-align: center; color: #BBBBBB; font-size: 1.5rem; margin: -5px 0; }
.input-with-btn { display: flex; align-items: center; background-color: #F5F6F8; border-radius: 16px; border: 2px solid transparent; transition: all 0.2s; overflow: hidden; }
.input-with-btn:focus-within { border-color: #FFCC33; background-color: #FFF; box-shadow: 0 0 0 4px rgba(255, 204, 51, 0.2); }
.input-with-btn .dispatch-input { 
    flex: 1; 
    min-width: 0; /* 🌟 關鍵修復 1：防止 input 預設寬度撐破容器 */
    border: none; 
    background: transparent; 
    box-shadow: none; 
    height: 55px; 
    padding: 0 20px; 
    font-size: 1.2rem; 
    color: #4a4a4a; 
    font-weight: 800; 
    outline: none; 
}

.btn-master-pick { 
    width: 50px; 
    height: 55px; 
    background: transparent; 
    color: #000; 
    border: none; 
    font-size: 1.4rem; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    transition: color 0.1s; 
    flex-shrink: 0; /* 🌟 關鍵修復 2：絕對禁止被 Flex 壓縮 */
}.btn-master-pick:active { color: #4a4a4a; }

/* 發單其他元件 */
.section-title { font-size: 1.1rem; font-weight: 800; color: #666; margin-bottom: 10px; }
.route-summary-box { background-color: #F5F6F8; border: 2px dashed #E5E7EB; border-radius: 16px; padding: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 900; color: #111; }
.route-point { background-color: #FFFFFF; padding: 5px 12px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.quick-tags-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-quick-tag { background-color: #F5F6F8; color: #666; border: 2px solid transparent; border-radius: 12px; padding: 10px 16px; font-size: 1.1rem; font-weight: 800; transition: all 0.2s; }




/* 🌟 新增：計費模式專屬標籤 (單選框視覺) */
.btn-price-tag { 
    background-color: #FFF9E6; 
    color: #B8860B; 
    border: 2px dashed #FFCC33; 
    border-radius: 12px; 
    padding: 10px 16px; 
    font-size: 1.1rem; 
    font-weight: 800; 
    transition: all 0.2s; 
}
.btn-price-tag.active { 
    background-color: #FFCC33; 
    color: #111; 
    border: 2px solid #FFCC33; 
    box-shadow: 0 4px 10px rgba(255, 204, 51, 0.4); 
}


.btn-quick-tag.active { background-color: #FFCC33; color: #4a4a4a; border-color: #E6B800; box-shadow: 0 4px 10px rgba(255, 204, 51, 0.3); }
.fee-buttons-group { display: flex; gap: 10px; }
.fee-box { flex: 1; background-color: #F5F6F8; border: 2px solid transparent; border-radius: 16px; padding: 12px 10px; text-align: center; transition: all 0.2s; cursor: pointer; }
.fee-box.active { background-color: #FFF; border-color: #FFCC33; box-shadow: 0 4px 15px rgba(255, 204, 51, 0.2); }
.fee-label { font-size: 1rem; font-weight: 800; color: #888; margin-bottom: 5px; pointer-events: none; }
.fee-box.active .fee-label { color: #4a4a4a; }
.fee-input { width: 100%; background: transparent; border: none; text-align: center; font-size: 1.3rem; font-weight: 900; color: #4a4a4a; outline: none; pointer-events: none; }
.channel-grid { display: flex; flex-direction: column; gap: 12px; }
.channel-option { background-color: #FFFFFF; border-radius: 20px; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; border: 2px solid #E5E7EB; transition: all 0.1s; }
.channel-option.selected { border-color: #E5E7EB; background-color: #ffcc33; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.channel-name { font-size: 1.2rem; font-weight: 800; color: #4a4a4a; }
.delay-pill { display: flex; align-items: center; background-color: #F5F6F8; border-radius: 20px; padding: 4px; gap: 5px; }
.btn-delay { width: 32px; height: 32px; border-radius: 50%; border: none; background-color: #FFFFFF; color: #4a4a4a; font-size: 1.4rem; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.delay-text { font-size: 1rem; font-weight: 900; color: #4a4a4a; min-width: 38px; text-align: center; }
.save-default-row { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; }
.save-default-row input { width: 24px; height: 24px; accent-color: #FFCC33; }

/* 鍵盤與導航 */
.step-actions { display: flex; gap: 15px; width: 100%; margin-top: 15px; }
.btn-step { flex: 1; height: 55px; border-radius: 16px; font-size: 1.2rem; font-weight: 900; border: none; display: flex; justify-content: center; align-items: center; }
.btn-step:active { transform: scale(0.98); }
.btn-prev { background-color: #F5F6F8; color: #4a4a4a; flex: 0.5; }
.btn-next { background-color: #FFCC33; color: #4a4a4a; }
.btn-submit { background-color: #4a4a4a; color: #FFCC33; }
.mt-auto { margin-top: auto; }
.custom-numpad { position: absolute; bottom: -15px; left: 0; width: 100%; background-color: #E5E7EB; padding: 15px 15px 75px 15px; border-radius: 24px 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); z-index: 100; }
.custom-numpad.active { transform: translateY(0); }
.numpad-key { background-color: #FFFFFF; border-radius: 12px; height: 55px; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; font-weight: 800; color: #4a4a4a; box-shadow: 0 2px 5px rgba(0,0,0,0.1); cursor: pointer; user-select: none; touch-action: none; }
.numpad-key:active { background-color: #D1D5DB; transform: scale(0.95); }
.numpad-key.del { background-color: #fff; color: #4a4a4a; }
.numpad-key.done { background-color: #FFCC33; color: #4a4a4a; }

/* 地點選擇器 (Location Picker) */
.location-picker-popup { position: absolute; bottom: -25px; left: 0; width: 100%; background-color: #F5F6F8; padding: 20px 15px 85px 15px; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); z-index: 105; box-shadow: 0 -10px 20px rgba(0,0,0,0.1); }
.location-picker-popup.active { transform: translateY(0); }
.lp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.lp-title { font-size: 1.3rem; font-weight: 900; color: #111; }
.lp-back, .lp-close { width: 40px; height: 40px; border-radius: 50%; background-color: #E5E7EB; border: none; font-size: 1.2rem; color: #111; display: flex; justify-content: center; align-items: center; }
.lp-back:active, .lp-close:active { transform: scale(0.9); }
.lp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-height: 300px; overflow-y: auto; }
.lp-item { background-color: #FFFFFF; border: 2px solid #E5E7EB; border-radius: 12px; padding: 15px; text-align: center; font-size: 1.2rem; font-weight: 800; color: #111; cursor: pointer; transition: all 0.1s; user-select: none; }
.lp-item:active { background-color: #FFCC33; border-color: #E6B800; transform: scale(0.95); }
.region-item { background-color: #111; color: #FFCC33; border-color: #111; }
.subloc-item { background-color: #F8F9FA; color: #333; border-color: #E5E7EB; }
.btn-smart-price { background-color: #FFF9E6; color: #B8860B; border: 1px solid #FFCC33; border-radius: 12px; padding: 6px 12px; font-size: 0.95rem; font-weight: 800; transition: all 0.2s; }
.btn-smart-price:active { background-color: #FFCC33; color: #111; }
.btn-smart-price.pulse { animation: smartPulse 1.5s ease-out; }
@keyframes smartPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 204, 51, 0.7); } 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 204, 51, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 204, 51, 0); } }

/* ==========================================
   PART 7: 其他雜項 (Active Trip, User Popup)
========================================== */
.active-trip-container { padding: 15px 15px 0 15px; display: none; flex-shrink: 0; }
.active-trip-container.active { display: block; }
.active-trip-card { background-color: #4a4a4a; border-radius: 24px; padding: 20px; color: #FFFFFF; box-shadow: 0 10px 25px rgba(0,0,0,0.25); display: flex; flex-direction: column; gap: 15px; }
.trip-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding-bottom: 12px; }
.trip-status { font-size: 1.1rem; font-weight: 800; color: #FFFFFF; display: flex; align-items: center; gap: 10px; }
.pulse-dot { width: 12px; height: 12px; background-color: #ffcc33; border-radius: 50%; animation: pulseYellow 1.5s infinite; }
@keyframes pulseYellow { 0% { box-shadow: 0 0 0 0 rgba(255, 204, 51, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(255, 204, 51, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 204, 51, 0); } }
.trip-eta { font-size: 1rem; font-weight: 800; }
.btn-trip-replay { background: rgba(255, 204, 51, 0.2); color: #FFCC33; border: none; border-radius: 8px; padding: 2px 8px; font-size: 0.85rem; font-weight: 800; margin-left: 10px; transition: transform 0.1s; }
.trip-route-section { display: flex; justify-content: space-between; align-items: center; }
.trip-route-texts { display: flex; flex-direction: column; gap: 2px; }
.trip-point { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.origin-point { color: #FFFFFF; } 
.dest-point { color: #FFCC33; }   
.trip-arrow { color: #888888; font-size: 1.6rem; margin-left: 2px; margin-top: -2px; margin-bottom: -2px; -webkit-text-stroke: 2px #888888; }
.trip-route-actions { display: flex; gap: 10px; }
.btn-trip-nav { background-color: #FFFFFF; color: #4a4a4a; border: none; border-radius: 16px; width: 75px; height: 75px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 800; font-size: 0.95rem; transition: transform 0.1s; }
.btn-trip-nav:active { transform: scale(0.95); background-color: #E5E7EB; }
.btn-square-finish { background-color: #000; color: #FFFFFF; border: 2px solid #fff; border-radius: 16px; width: 75px; height: 75px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 800; font-size: 0.95rem; transition: transform 0.1s; }
.btn-square-finish:active { transform: scale(0.95); background-color: #157347; }
.trip-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-contact { background-color: #222222; color: #FFFFFF; border: 1px solid #333; border-radius: 12px; height: 44px; font-size: 0.95rem; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-contact:active { background-color: #333; transform: scale(0.98); }
.trip-bottom-actions { display: flex; align-items: center; gap: 10px; }
.trip-latest-msg { flex: 1; background-color: #222; color: #E5E7EB; font-size: 0.95rem; font-weight: 600; padding: 0 15px; height: 54px; display: flex; align-items: center; border-radius: 27px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-circle-ptt { width: 54px; height: 54px; border-radius: 50%; background-color: #FFCC33; color: #4a4a4a; border: none; font-size: 1.6rem; display: flex; justify-content: center; align-items: center; transition: transform 0.1s; flex-shrink: 0; }
.btn-circle-ptt.recording { background-color: #E53935; color: #FFF; transform: scale(0.9); }

.user-action-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 10500; display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.user-action-overlay.active { opacity: 1; pointer-events: auto; }
.user-action-panel { background-color: #FFF; width: 100%; border-radius: 24px 24px 0 0; padding: 25px 25px 40px 25px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); }
.user-action-overlay.active .user-action-panel { transform: translateY(0); }
.user-action-header { font-size: 1.4rem; font-weight: 900; margin-bottom: 20px; border-bottom: 1px solid #F0F0F0; padding-bottom: 15px; }
.user-action-list { display: flex; flex-direction: column; gap: 10px; }
.btn-user-action { background-color: #F5F6F8; border: none; border-radius: 16px; padding: 15px; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 12px; color: #4a4a4a; transition: transform 0.1s; }
.btn-user-action:active { transform: scale(0.98); background-color: #E5E7EB; }
.btn-user-action.punish { color: #DC3545; background-color: #FFF5F5; width:100%; margin-bottom:10px; }
.admin-divider-title { margin-top: 15px; margin-bottom: 5px; font-size: 0.9rem; color: #888; font-weight: 800; text-transform: uppercase; }


/* ==========================================
   🌟 補回：發單面板 (Dispatch UI) 專用的重聽按鈕
========================================== */
.btn-replay-voice { 
    width: 100%; 
    background-color: #FFF9E6; 
    border: 2px dashed #FFCC33; 
    color: #B8860B; 
    border-radius: 16px; 
    height: 50px; 
    font-size: 1.1rem; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    transition: all 0.2s; 
    margin-bottom: 15px; 
}
.btn-replay-voice.playing { 
    background-color: #FFE5E5; 
    border-color: #E53935; 
    color: #E53935; 
    animation: replayPulse 1.5s infinite; 
}

/* ==========================================
   PART 8: 頻道切換面板 (Channel Picker)
========================================== */
.channel-picker-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 12000; display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.channel-picker-overlay.active { opacity: 1; pointer-events: auto; }
.channel-picker-panel { background-color: #FFF; width: 100%; border-radius: 24px 24px 0 0; padding: 25px; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1); }
.channel-picker-overlay.active .channel-picker-panel { transform: translateY(0); }
.cp-title { font-size: 1.4rem; font-weight: 900; margin: 0; }
.cp-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-cp-channel { background-color: #F5F6F8; border: 2px solid transparent; border-radius: 16px; padding: 18px 20px; font-size: 1.2rem; font-weight: 900; color: #4a4a4a; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.btn-cp-channel:active { transform: scale(0.98); background-color: #E5E7EB; }
.btn-cp-channel.active { background-color: #FFF9E6; border-color: #FFCC33; color: #B8860B; }
.btn-cp-channel .bi { display: none; }
.btn-cp-channel.active .bi { display: inline-block; color: #FFCC33; font-size: 1.4rem; }



/* ==========================================
   🌟 新增：錄音聲波動畫與取消按鈕
========================================== */
/* 聲波動畫容器 */
.wave-animation-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    height: 40px; 
    margin-bottom: 10px; 
}

/* 聲波柱體 */
.wave-bar { 
    width: 6px; 
    height: 10px; 
    background-color: #E53935; 
    border-radius: 3px; 
    animation: soundWave 1.2s ease-in-out infinite; 
}

/* 各個柱體設定不同延遲，形成波浪效果 */
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.2s; }
.wave-bar:nth-child(5) { animation-delay: 0.1s; }

@keyframes soundWave { 
    0%, 100% { height: 10px; } 
    50% { height: 35px; } 
}

/* 取消按鈕 */
.btn-cancel-record { 
    background-color: #FFF5F5; 
    color: #E53935; 
    border: 1px solid #E53935; 
    border-radius: 20px; 
    padding: 8px 24px; 
    font-size: 1.05rem; 
    font-weight: 800; 
    cursor: pointer; 
    margin-top: -5px; 
    transition: all 0.2s; 
}

.btn-cancel-record:active { 
    background-color: #FFE5E5; 
    transform: scale(0.95); 
}