/* 以 Frest 主題為基礎的專案樣式 */

/* 基準字級：主題預設 16px，放大為 18px（以 rem 計算的文字與間距等比例放大） */
:root { --bs-root-font-size: 18px; }
body, .app-brand-text, h1, h2, h3, h4, h5, h6 {
    font-family: "IBM Plex Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 品牌標誌（LINE 綠） */
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: #06c755; color: #fff; font-size: 1.15rem;
}

.min-w-0 { min-width: 0; }
.text-heading { color: var(--bs-heading-color, #516377); }
.layout-navbar .badge-notifications { position: absolute; top: 2px; right: -6px; font-size: .65rem; }

/* 對話列表 */
.conv-item.has-unread .conv-name { color: var(--bs-primary); font-weight: 600; }

/* ---------- 對話頁（覆寫 Frest app-chat 固定高度，改為彈性版面以容納提示列） ---------- */
.cc-chat.app-chat { height: calc(100vh - 11rem); height: calc(100dvh - 11rem); min-height: 460px; }
.cc-chat .app-chat-contacts { height: 100%; }
.cc-chat .app-chat-contacts .sidebar-body { height: calc(100% - 4.6rem); overflow-y: auto; }
.cc-chat .app-chat-history { height: 100%; }
.cc-chat .chat-history-wrapper { display: flex; flex-direction: column; height: 100%; }
.cc-chat .app-chat-history .chat-history-body { flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; }
.cc-chat .app-chat-history .chat-history-footer { margin: 0 1rem 1rem; background: var(--bs-card-bg); }
.cc-chat .chat-contact-list-item a { text-decoration: none; }
.cc-chat .chat-contact-status .badge { font-size: .7rem; vertical-align: 1px; }
.cc-chat .chat-message > .d-flex { max-width: min(80%, 700px); }   /* 寬度上限放在整列（以訊息列寬計算），避免依泡泡寬度縮小 */
.cc-chat .chat-message-wrapper { max-width: none; min-width: 0; }
.cc-chat .chat-message-right .chat-message-wrapper { display: flex; flex-direction: column; align-items: flex-end; }
.cc-chat .chat-message-text { display: inline-block; max-width: 100%; }
.cc-chat .msg-text { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.app-chat.cc-chat .app-chat-history .chat-history .chat-message.chat-message-right .chat-message-text.failed {
    background-color: rgba(255, 91, 92, .16) !important; color: #ff8f90 !important; border: 1px solid rgba(255, 91, 92, .45);
}
.cc-chat .chat-message-wrapper > .text-muted { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }   /* 發送者・時間・狀態過長時換行，不被裁切 */
.cc-chat .msg-error { white-space: normal; }
.cc-chat #blockedBanner { flex: 0 0 auto; }
.cc-chat #msgText { resize: none; max-height: 8rem; }
@media (max-width: 991.98px) {
    .cc-chat .chat-message > .d-flex { max-width: 92%; }
}
/* 手機：對話頁不顯示頁尾、左右不留邊，對話框填滿導覽列以下的螢幕 */
@media (max-width: 767.98px) {
    .page-chat .content-footer { display: none; }
    .page-chat .content-wrapper > .container-xxl.container-p-y { padding: 8px 0 0 !important; }
    .page-chat .cc-chat.app-chat { height: calc(100vh - 70px); height: calc(100dvh - 70px); min-height: 0; border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 0; }
    .page-chat .content-wrapper > .container-xxl > .alert { margin: 0 .75rem .5rem; }
}
@media (max-width: 575.98px) {
    .cc-chat .chat-history-header .btn { padding: .25rem .5rem; font-size: .75rem; }
}

/* 圖片／影片訊息：不套用文字泡泡底色，寬度以固定上限計算（避免依原始尺寸撐開泡泡） */
.app-chat.cc-chat .app-chat-history .chat-history .chat-message .chat-message-text.chat-message-media {
    background-color: transparent !important; padding: 0 !important; box-shadow: none !important; line-height: 0;
}
.app-chat.cc-chat .app-chat-history .chat-history .chat-message .chat-message-text.chat-message-media.failed {
    border: 2px solid #ff5b5c; padding: 2px !important;
}
.cc-chat .chat-media-img, .cc-chat .chat-media-video {
    display: block; width: auto; height: auto; max-width: 320px; max-height: 320px;
    border-radius: .5rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.cc-chat .chat-media-img { cursor: zoom-in; }
.cc-chat .chat-media-video { width: 320px; background: #000; }
@media (max-width: 575.98px) {
    .cc-chat .chat-media-img, .cc-chat .chat-media-video { max-width: 220px; }
    .cc-chat .chat-media-video { width: 220px; }
}
#mediaModal .media-preview { min-height: 180px; max-height: 360px; overflow: hidden; }
#mediaModal .media-preview img, #mediaModal .media-preview video { max-width: 100%; max-height: 360px; display: block; }
.media-btn.disabled { pointer-events: none; opacity: .45; }
.media-btn { flex-shrink: 0; }

/* 用戶媒體下載狀態、貼圖 */
.app-chat.cc-chat .app-chat-history .chat-history .chat-message .chat-message-text.chat-message-status {
    background-color: var(--bs-card-bg) !important; padding: .6rem .9rem !important; line-height: 1.4;
}
.app-chat.cc-chat .app-chat-history .chat-history .chat-message .chat-message-text.chat-message-sticker { box-shadow: none !important; }
.cc-chat .chat-media-status { font-size: .875rem; color: var(--bs-secondary-color, #6c757d); white-space: normal; }
.cc-chat .chat-sticker { display: block; width: auto; height: auto; max-width: 150px; max-height: 150px; }
@media (max-width: 575.98px) { .cc-chat .chat-sticker { max-width: 120px; max-height: 120px; } }

/* 二次驗證 */
.otp-input { letter-spacing: .5em; font-size: 1.5rem; font-family: "IBM Plex Sans", monospace; }
.totp-qr { image-rendering: pixelated; max-width: 100%; height: auto; }

/* 帳號管理操作欄 */
/* 後台帳號列表：欄位精簡、內容上下排列，不出現橫向捲軸；窄螢幕改為卡片 */
.staff-table th, .staff-table td { padding-left: .75rem; padding-right: .75rem; }
.staff-table th { white-space: nowrap; }
.staff-table .staff-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.staff-table .staff-actions .btn { white-space: nowrap; }
.staff-table .btn-xs { padding: .1rem; }
@media (max-width: 991.98px) {
    .staff-table thead { display: none; }
    .staff-table, .staff-table tbody, .staff-table tr, .staff-table td { display: block; width: 100%; }
    .staff-table tr { position: relative; padding: .9rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
    .staff-table tbody tr:last-child { border-bottom: 0; }
    .staff-table td { padding: .2rem 0; border: 0; }
    .staff-table td.staff-who { padding-right: 5.5rem; margin-bottom: .35rem; }
    .staff-table td.staff-login { display: flex !important; }
    .staff-table td[data-label] { display: flex; align-items: flex-start; gap: .75rem; }
    .staff-table td[data-label]::before { content: attr(data-label); flex: 0 0 7.5rem; color: var(--bs-secondary-color); font-size: .8125rem; padding-top: .1rem; }
    .staff-table td[data-label] .staff-stack { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .staff-table td.staff-actions { position: absolute; top: .9rem; right: 1rem; width: auto; padding: 0; }
}

/* 首頁統計 */
.stats-chart { min-height: 280px; }
.stats-table th, .stats-table td { white-space: nowrap; }

/* 圖片放大檢視 */
.lightbox-content { background: rgba(20, 24, 33, .96); border: 0; }
.lightbox-body { min-height: 40vh; display: flex; align-items: center; justify-content: center; }
.lightbox-img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: .25rem; }
.lightbox-spinner { position: absolute; top: 50%; left: 50%; margin: -1rem 0 0 -1rem; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .15); color: #fff; width: 2.75rem; height: 2.75rem; }
.lightbox-nav:hover, .lightbox-nav:focus { background: rgba(255, 255, 255, .3); color: #fff; }
.lightbox-prev { left: .75rem; }
.lightbox-next { right: .75rem; }
.cc-chat .chat-image-link { cursor: zoom-in; display: inline-block; }

/* 深色主題：分頁上的計數徽章（選中與未選中都清楚） */
.nav-pills .nav-link .tab-count { background: rgba(255, 255, 255, .16); color: inherit; }

/* 平台 logo（官方帳號頭像） */
.brand-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.authentication-wrapper .brand-logo { width: 44px; height: 44px; }

/* 群發訊息 */
.bc-table td { vertical-align: middle; }
.bc-preview { max-width: 320px; }
.bc-thumb { max-width: 160px; max-height: 120px; border-radius: .375rem; object-fit: cover; background: #000; }
.bc-phone { background: #8cabd9; border-radius: 1rem; padding: 1rem .75rem; min-height: 200px; max-height: 560px; overflow-y: auto; }
.dark-style .bc-phone { background: #2c3a52; }
.bc-bubble-row { display: flex; justify-content: flex-start; margin-bottom: .6rem; position: relative; }
.bc-bubble { background: #fff; color: #1e1e1e; border-radius: 1rem; padding: .55rem .85rem; max-width: 85%; white-space: pre-wrap; word-break: break-word; font-size: .9rem; }
.bc-bubble.text-muted { color: #8a8a8a !important; }
.bc-media { max-width: 75%; max-height: 260px; border-radius: .75rem; display: block; }
.bc-bubble-row.is-video::after { content: "\25B6"; position: absolute; left: 1rem; top: .5rem; color: #fff; font-size: 1.4rem; text-shadow: 0 0 6px rgba(0,0,0,.6); }

/* ---------- 平台標籤 ---------- */
.platform-badge {
    --pf: #8a8a8a;
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .1rem .45rem; border-radius: 50rem;
    font-size: .7rem; font-weight: 600; line-height: 1.4; letter-spacing: .02em; white-space: nowrap;
    color: var(--pf); background: color-mix(in srgb, var(--pf) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--pf) 35%, transparent);
    vertical-align: middle;
}
.platform-badge .bx { font-size: .85rem; }
.platform-line { --pf: #06C755; }
.platform-facebook { --pf: #4C8DFF; }
.platform-instagram { --pf: #F0508A; }
.platform-threads { --pf: #b5b5b5; }
.chat-contact-list-item.active .platform-badge { color: #fff; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); }
.list-filters .input-group { width: 240px; }
@media (max-width: 575.98px) { .list-filters { width: 100%; } .list-filters .input-group { width: auto; flex: 1 1 auto; } }

/* ---------- 客戶資料面板 ---------- */
.profile-panel { --bs-offcanvas-width: min(460px, 100vw); }
.profile-panel .btn-xs { padding: .15rem .6rem; font-size: .75rem; }
.profile-panel .note-body { white-space: pre-wrap; word-break: break-word; }
.profile-panel .timeline .timeline-item { border-left-color: var(--bs-border-color); }
.hdr-realname:empty { display: none; }
@media (max-width: 575.98px) { .list-filters { flex-wrap: wrap; } }

/* ---------- 圖文選單 ---------- */
.rm-thumb { width: 96px; height: 64px; object-fit: cover; display: block; }
.rm-canvas { position: relative; width: 100%; background: var(--bs-body-bg); border-radius: .375rem; overflow: hidden; }
.rm-canvas img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.rm-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--bs-secondary-color); font-size: .85rem;
    background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(127,127,127,.08) 10px 20px); }
.rm-area { position: absolute; border: 2px solid rgba(90, 141, 238, .95); background: rgba(90, 141, 238, .18); cursor: default; }
.rm-area.active { border-color: #ffab00; background: rgba(255, 171, 0, .25); }
.rm-preview .rm-area[title] { cursor: pointer; }
.rm-area-no { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: .7rem; font-weight: 600;
    line-height: 20px; text-align: center; color: #fff; background: rgba(0,0,0,.6); }
.rm-editable .rm-area { cursor: move; touch-action: none; user-select: none; }
.rm-editable .rm-area.rm-dragging { background: rgba(255, 171, 0, .35); }
.rm-handle { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid #ffab00; border-radius: 3px; display: none; z-index: 2; }
.rm-editable .rm-area.active .rm-handle, .rm-editable .rm-area:hover .rm-handle { display: block; }
.rm-h-n, .rm-h-s { left: 50%; transform: translateX(-50%); cursor: ns-resize; } .rm-h-n { top: -1px; } .rm-h-s { bottom: -1px; }
.rm-h-e, .rm-h-w { top: 50%; transform: translateY(-50%); cursor: ew-resize; } .rm-h-e { right: -1px; } .rm-h-w { left: -1px; }
.rm-h-ne { top: -1px; right: -1px; cursor: nesw-resize; } .rm-h-sw { bottom: -1px; left: -1px; cursor: nesw-resize; }
.rm-h-nw { top: -1px; left: -1px; cursor: nwse-resize; } .rm-h-se { bottom: -1px; right: -1px; cursor: nwse-resize; }
.rm-area-size { position: absolute; right: 4px; bottom: 4px; padding: 0 5px; border-radius: 8px; font-size: .65rem; line-height: 16px; color: #fff; background: rgba(0, 0, 0, .6); display: none; pointer-events: none; }
.rm-editable .rm-area.active .rm-area-size, .rm-editable .rm-area.rm-dragging .rm-area-size { display: block; }
@media (pointer: coarse) { .rm-handle { width: 18px; height: 18px; } }
.rm-area-card.active { border-color: #ffab00 !important; box-shadow: 0 0 0 1px #ffab00; }
.rm-phone { max-width: 380px; border: 6px solid #3a3f55; border-radius: 22px; overflow: hidden; background: #8ca0b8; }
.rm-phone-chat { height: 90px; background: linear-gradient(#a6b6c9, #8ca0b8); }
.rm-phone .rm-canvas { border-radius: 0; }
.rm-chatbar { background: #fff; color: #333; text-align: center; font-size: .8rem; padding: .35rem; border-top: 1px solid #ddd; }
.rm-sticky { position: sticky; top: 90px; }
.rm-error { max-width: 260px; white-space: normal; }
.rm-binding .rm-mode { font-size: .95rem; }
.rm-alias { text-transform: none; }
.rm-lineid { display: block; font-size: .72rem; word-break: break-all; }
.rm-actions { flex-wrap: nowrap; }
.rm-actions .btn { white-space: nowrap; }
@media (max-width: 767.98px) { .rm-actions { flex-wrap: wrap; } }
.rm-lineid { max-width: 230px; }

/* 對話列表狀態分頁：保留小螢幕左右滑動，但不顯示捲軸 */
#statusTabs { scrollbar-width: none; -ms-overflow-style: none; overflow-y: hidden; }
#statusTabs::-webkit-scrollbar { display: none; }

/* 群發：標籤選擇與收件人名單 */
.btn-xs { padding: .15rem .6rem; font-size: .75rem; }
.bc-recipients { max-height: 320px; overflow-y: auto; }

/* ---------- 圖文選單點擊統計 ---------- */
.rc-daily { display: flex; align-items: flex-end; gap: 2px; height: 90px; border-bottom: 1px solid var(--bs-border-color); }
.rc-bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.rc-bar span { display: block; width: 100%; background: rgba(90, 141, 238, .85); border-radius: 2px 2px 0 0; min-height: 1px; }
.rc-bar span.rc-zero { background: transparent; }
.rc-bar:hover span { background: #ffab00; }
.rc-count { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 12px;
    font-size: .85rem; font-weight: 700; color: #fff; background: #1f9d57; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); white-space: nowrap; }
.rc-recent li:last-child { border-bottom: 0 !important; }
.rc-action { min-width: 180px; max-width: 360px; word-break: break-all; }
.rc-recent { max-height: 360px; overflow-y: auto; }
/* 歡迎訊息 */
.wm-toast { top: 80px; right: 24px; z-index: 2000; max-width: 360px; }
.wm-note { min-width: 160px; max-width: 420px; }
/* App 下載頁 */
.app-dl-qr { background: #fff; border-radius: .5rem; padding: 6px; max-width: 100%; height: auto; }
.wm-img-opts { border-top: 1px dashed var(--bs-border-color); padding-top: .75rem; }
.bc-media.wm-card { width: 80%; max-width: 80%; max-height: none; border-radius: 1rem; }
.wm-share { align-self: center; margin-left: .5rem; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
/* 關鍵字回覆 */
.kw-chip { font-weight: 500; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.kw-im-canvas { max-width: 520px; }
.kw-area-row.active { border-color: #ffab00 !important; box-shadow: 0 0 0 1px #ffab00; }
.kw-area-val { min-width: 180px; }
.kw-im-preview { width: 85%; max-width: 85%; max-height: none; }
@media (min-width: 992px) { .kw-sticky { position: sticky; top: 90px; z-index: 1; } }

/* ===== AI 串接精靈 ===== */
.ig-test-msg { max-width: 260px; }
@media (min-width: 1200px) { .ig-sticky { position: sticky; top: 90px; z-index: 1; } }
.ig-ep-name { max-width: 320px; }
.ig-ep-summary { background: rgba(var(--bs-primary-rgb), .06); border-radius: .5rem; padding: .6rem .8rem; }
.ig-sum-k { min-width: 5.5em; }
.ig-pending-note { color: #ffab00; }
.ig-param { background: rgba(var(--bs-body-color-rgb), .02); }
.ig-fields input:not([type=checkbox]), .ig-fields select { min-width: 110px; }
.ig-fields .ig-empty-input { min-width: 70px; width: 80px; }
.ig-cur { width: 70px; }
.ig-field-extra td { border-top: 0; padding-top: 0; }
.ig-raw { max-height: 320px; overflow: auto; background: rgba(0,0,0,.25); padding: .5rem; border-radius: .375rem; white-space: pre-wrap; word-break: break-all; }
.ig-preview { max-width: 460px; }
.ig-card dt, .ig-card dd { font-size: .875rem; }
.ig-table td, .ig-table th { font-size: .8125rem; white-space: nowrap; }
.ig-log-detail { min-width: 180px; max-width: 420px; }
.ig-side-ep .card-header { background: transparent; }
#profilePanel .nav-tabs .nav-link { padding-left: .5rem; padding-right: .5rem; white-space: nowrap; }
/* 客戶資料分頁列：串接一個一頁，可左右滑動，兩側淡出提示還有分頁 */
#profilePanel .pf-tabs-wrap { position: relative; }
#profilePanel .pf-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
#profilePanel .pf-tabs::-webkit-scrollbar { display: none; }
#profilePanel .pf-tabs .nav-item { flex: 0 0 auto; }
#profilePanel .pf-tabs .nav-link { padding-left: .75rem; padding-right: .75rem; display: inline-flex; align-items: center; gap: .3rem; }
#profilePanel .pf-tab-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
#profilePanel .pf-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bs-secondary); opacity: .7; flex-shrink: 0; }
#profilePanel .pf-tabs-wrap.fade-start .pf-tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }
#profilePanel .pf-tabs-wrap.fade-end .pf-tabs { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px); mask-image: linear-gradient(to left, transparent 0, #000 28px); }
#profilePanel .pf-tabs-wrap.fade-start.fade-end .pf-tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
@media (max-width: 480px) { #profilePanel .nav-tabs .nav-link { font-size: .8125rem; padding: .45rem .3rem; } }

/* 推廣統計：自動更新時數字變動的提示 */
[data-n] { display: inline-block; padding: 0 .3rem; margin: 0 -.3rem; border-radius: .25rem; font-variant-numeric: tabular-nums; }
.pm-up { animation: pm-flash-up 2.4s ease-out; }
.pm-down { animation: pm-flash-down 2.4s ease-out; }
@keyframes pm-flash-up { 0%, 30% { background: rgba(57, 218, 138, .28); color: #39da8a; transform: scale(1.12); } 60% { transform: scale(1); } 100% { background: transparent; } }
@keyframes pm-flash-down { 0%, 30% { background: rgba(255, 91, 92, .25); color: #ff5b5c; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .pm-up, .pm-down { animation-duration: 1.2s; transform: none; } }

/* 管理者首頁：即時卡片提醒、數字動畫、走勢線、圖表尺寸 */
.dash-num { display: inline-block; border-radius: .25rem; font-variant-numeric: tabular-nums; }
.dash-live { transition: box-shadow .3s, border-color .3s; border: 1px solid transparent; }
.dash-live:hover { transform: translateY(-1px); }
.dash-alert-warning { border-color: rgba(253, 172, 65, .55); box-shadow: 0 0 0 1px rgba(253, 172, 65, .15), 0 4px 18px rgba(253, 172, 65, .12); }
.dash-alert-danger { border-color: rgba(255, 91, 92, .55); box-shadow: 0 0 0 1px rgba(255, 91, 92, .15), 0 4px 18px rgba(255, 91, 92, .12); }
.dash-kpi { overflow: hidden; }
.dash-spark { margin-top: .5rem; min-height: 56px; }
.dash-delta { font-size: .8125rem; font-weight: 500; display: inline-flex; align-items: center; white-space: nowrap; }
.dash-delta.is-good { color: #39da8a; }
.dash-delta.is-bad { color: #ff5b5c; }
.dash-gauge { min-height: 200px; }
.dash-donut { min-height: 250px; }
.dash-heat-wrap { overflow-x: auto; }
.dash-heat-wrap > div { min-width: 640px; }
.min-w-0 { min-width: 0; }


/* AI 串接精靈：Token 設定的參數名稱維持原本大小寫 */
.ig-token .form-label, #igCredParams .form-label { text-transform: none; }

/* 推廣結果頁：管理者預覽列 */
.promo-preview-bar { position: sticky; top: 0; z-index: 1030; background: var(--bs-body-bg, #2b3446); border-bottom: 1px solid var(--bs-border-color); }
/* 對話標頭：統計推廣碼名稱過長時截斷 */
.hdr-stat-promo { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 儲值抽獎序號 */
.lot-code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    letter-spacing: .08em;
    padding: .1rem .45rem;
    border-radius: .3rem;
    background: rgba(var(--bs-primary-rgb), .14);
    color: var(--bs-primary);
    user-select: all;
}
.lot-entry { background: rgba(255, 255, 255, .02); }
.lot-tiers td, .lot-tiers th { padding-left: .25rem; padding-right: .25rem; }

/* 儲值抽獎序號總表（DataTables） */
#lotCodes_wrapper .dataTables_filter input { width: 20rem; max-width: 100%; margin-left: 0; }
@media (max-width: 575.98px) { #lotCodes_wrapper .dataTables_filter input { width: 100%; } }

/* 推廣結果頁（公開）：LINE 標準色系（白底、LINE 綠 #06C755） */
body.promo-line { --line-green: #06c755; --line-green-hover: #05b14c; --line-text: #111111; --line-sub: #555555; --line-muted: #949494; background: #f5f5f5; color: var(--line-text); }
body.promo-line .authentication-wrapper .authentication-inner::before,
body.promo-line .authentication-wrapper .authentication-inner::after { display: none; }
body.promo-line .card { background: #ffffff; border: 0; border-radius: 1rem; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
body.promo-line .card::before { content: ""; display: block; height: 6px; background: var(--line-green); border-radius: 1rem 1rem 0 0; }
body.promo-line .app-brand-text, body.promo-line .promo-result h4 { color: var(--line-text); }
body.promo-line .promo-result p { color: var(--line-sub); }
body.promo-line .promo-result .text-muted { color: var(--line-muted) !important; }
body.promo-line .promo-line-btn { background: var(--line-green); border-color: var(--line-green); color: #fff; font-weight: 700; border-radius: .625rem; padding: .75rem 1rem; box-shadow: none; }
body.promo-line .promo-line-btn:hover, body.promo-line .promo-line-btn:focus, body.promo-line .promo-line-btn:active { background: var(--line-green-hover) !important; border-color: var(--line-green-hover) !important; color: #fff !important; }
body.promo-line .promo-result .avatar-initial { background: #f0f0f0 !important; color: var(--line-muted) !important; }
body.promo-line .promo-result .bg-label-success { background: #e6f9ee !important; color: var(--line-green) !important; }
body.promo-line .promo-result .bg-label-warning { background: #fff4e0 !important; color: #f39800 !important; }
body.promo-line .promo-result .bg-label-danger { background: #ffebee !important; color: #ff334b !important; }
body.promo-line .promo-preview-bar { background: #ffffff; border-bottom-color: #e5e5e5; color: var(--line-text); }
body.promo-line .promo-preview-bar .form-select { background-color: #fff; color: var(--line-text); border-color: #d9d9d9; }
body.promo-line .promo-preview-bar .form-check-input { background-color: #fff; border-color: #b3b3b3; }
body.promo-line .promo-preview-bar .form-check-input:checked { background-color: var(--line-green); border-color: var(--line-green); }
body.promo-line .promo-preview-bar .btn-label-secondary { background: #f0f0f0; color: var(--line-sub); }
