/* Peigo 果昔機管理中台 */
:root {
  --ph-teal: #2a9d8f;
  --ph-teal-dark: #1f7a6f;
  --ph-teal-soft: #e6f4f2;
  --ph-gold: #c4973b;
  --ph-purple: #8b6fc8;
  --ph-bg: #f2f5f7;
  --ph-side-w: 236px;
  --bs-primary: #2a9d8f;
  --bs-primary-rgb: 42, 157, 143;
  --bs-link-color: #1f7a6f;
  --bs-link-color-rgb: 31, 122, 111;
  --bs-link-hover-color: #165b53;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
body { background: var(--ph-bg); font-size: .925rem; }

.btn-primary { --bs-btn-bg: var(--ph-teal); --bs-btn-border-color: var(--ph-teal); --bs-btn-hover-bg: var(--ph-teal-dark); --bs-btn-hover-border-color: var(--ph-teal-dark); --bs-btn-active-bg: var(--ph-teal-dark); --bs-btn-disabled-bg: var(--ph-teal); --bs-btn-disabled-border-color: var(--ph-teal); }
.btn-outline-primary { --bs-btn-color: var(--ph-teal-dark); --bs-btn-border-color: var(--ph-teal); --bs-btn-hover-bg: var(--ph-teal); --bs-btn-hover-border-color: var(--ph-teal); --bs-btn-active-bg: var(--ph-teal-dark); --bs-btn-disabled-color: var(--ph-teal); --bs-btn-disabled-border-color: var(--ph-teal); }
.text-bg-primary { background-color: var(--ph-teal) !important; }
.page-link { color: var(--ph-teal-dark); }
.active > .page-link, .page-link.active { background: var(--ph-teal); border-color: var(--ph-teal); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #8fd0c7; box-shadow: 0 0 0 .2rem rgba(42,157,143,.18); }
.form-check-input:checked { background-color: var(--ph-teal); border-color: var(--ph-teal); }

/* 版面 */
.ph-shell { display: flex; min-height: 100vh; }
.ph-side { width: var(--ph-side-w); flex-shrink: 0; background: #fff; border-right: 1px solid #e3e8ec; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ph-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-brand { display: flex; align-items: center; gap: 10px; padding: 14px 18px 12px; text-decoration: none; border-bottom: 1px solid #eef1f3; }
.ph-logo { font-weight: 800; font-size: 1.45rem; color: var(--ph-gold); letter-spacing: .5px; line-height: 1; }
.ph-logo-lg { font-size: 2.4rem; }
.ph-brand-sub { display: block; color: #3c4a52; font-size: .86rem; font-weight: 700; letter-spacing: .04em; }
.ph-logo-img { width: 44px; height: 44px; flex: none; }
.ph-nav { padding: 8px 10px 24px; }
.ph-nav-top { font-size: .72rem; font-weight: 700; color: #8a96a0; text-transform: uppercase; letter-spacing: .08em; padding: 16px 10px 6px; display: flex; align-items: center; gap: 6px; }
.ph-nav-top::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ph-teal); }
.ph-top-platform::before { background: var(--ph-purple); }
.ph-nav-head { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; color: #2b3640; font-weight: 600; text-align: left; }
.ph-nav-head:hover { background: #f3f6f8; }
.ph-nav-head .bi:first-child { color: var(--ph-teal); font-size: 1.05rem; }
.ph-caret { margin-left: auto; font-size: .7rem; transition: transform .15s; color: #98a3ab; }
.ph-nav-group.open .ph-caret { transform: rotate(180deg); }
.ph-nav-items { display: none; padding: 2px 0 6px 30px; }
.ph-nav-group.open .ph-nav-items { display: block; }
.ph-nav-link { display: block; padding: 6px 10px; border-radius: 6px; color: #4a5660; text-decoration: none; font-size: .9rem; border-left: 3px solid transparent; }
.ph-nav-link:hover { background: #f3f6f8; color: #1d262d; }
.ph-nav-link.active { background: var(--ph-teal-soft); color: var(--ph-teal-dark); font-weight: 600; border-left-color: var(--ph-teal); }
.ph-nav-single { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #2b3640; border-left: 0; padding: 8px 10px; }
.ph-nav-single .bi { color: var(--ph-teal); font-size: 1.05rem; }
.ph-top-platform ~ .ph-nav-group .ph-nav-head .bi:first-child { color: var(--ph-purple); }

.ph-topbar { display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid #e3e8ec; padding: 10px 24px; position: sticky; top: 0; z-index: 10; }
.ph-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: #1d262d; }
.ph-content { padding: 20px 24px 40px; }

.ph-card { border: 1px solid #e3e8ec; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.ph-card > .card-header { background: #fff; border-bottom: 1px solid #eef1f3; border-radius: 12px 12px 0 0; padding: 10px 16px; }
.ph-card > .card-footer { background: #fff; border-top: 1px solid #eef1f3; border-radius: 0 0 12px 12px; }
.ph-note { color: #5b6770; font-size: .85rem; margin-bottom: 12px; }

.ph-filters .form-label { font-size: .75rem; color: #6c7a84; margin-bottom: 2px; }
.ph-f { min-width: 150px; }
.ph-f-range { min-width: 270px; }

.ph-table thead th { background: #f7f9fa; color: #5b6770; font-weight: 600; font-size: .8rem; white-space: nowrap; border-bottom-width: 1px; }
.ph-table td { font-size: .875rem; }
.ph-table tbody tr:last-child td { border-bottom: 0; }
.ph-src { display: inline-block; margin-left: 6px; font-size: .65rem; padding: 1px 5px; border-radius: 4px; background: #eef3ff; color: #3d5bb5; vertical-align: middle; }
.ph-src-local { background: #f1f1f1; color: #777; }

.ph-steps td { min-width: 90px; }
.ph-steps td.ph-seq { min-width: 40px; text-align: center; font-weight: 600; }
.ph-perms td, .ph-perms th { font-size: .85rem; }

/* 儀表板 */
.ph-kpi { padding: 16px 18px; }
.ph-kpi .lbl { font-size: .78rem; color: #6c7a84; }
.ph-kpi .val { font-size: 1.6rem; font-weight: 700; color: #1d262d; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-kpi .val.fs-4 { font-size: clamp(1rem, 1.6vw, 1.35rem) !important; }
.ph-kpi .sub { font-size: .75rem; color: #8a96a0; }
.ph-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.ph-chart { position: relative; height: 260px; }
.ph-rank li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #eef1f3; font-size: .875rem; }
.ph-rank li:last-child { border-bottom: 0; }
.ph-rank .n { color: #8a96a0; width: 22px; display: inline-block; }

/* 登入 */
.ph-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #e9f5f3 0%, #f2f5f7 60%); padding: 16px; }
.ph-login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 10px 30px rgba(16,24,40,.08); }

pre.ph-code { background: #1e2a32; color: #e6edf3; border-radius: 8px; padding: 12px 14px; font-size: .8rem; }

@media (max-width: 991.98px) {
  .ph-side { position: fixed; left: 0; top: 0; z-index: 1040; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  .ph-side.show { transform: none; }
  .ph-content { padding: 16px; }
  .ph-topbar { padding: 8px 12px; }
}
.ph-steps th:first-child, .ph-steps td:first-child { padding-left: 16px; }
.ph-steps select { min-width: 140px; }

.ph-qr-btn { border: 1px solid #e3e8ec; background: #fff; border-radius: 6px; padding: 3px; line-height: 0; cursor: zoom-in; }
.ph-qr-btn:hover { border-color: var(--ph-teal); }
.ph-qr-thumb { display: inline-block; width: 30px; height: 30px; }
.ph-qr-thumb svg { width: 100%; height: 100%; }

.ph-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid #e3e8ec; background: #fff; }
.ph-img-preview { width: 96px; height: 96px; flex-shrink: 0; border: 1px dashed #cfd8de; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fafbfc; }
.ph-img-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 果昔機商品卡片 */
.ph-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ph-product { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e8ec; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.03); transition: box-shadow .15s, border-color .15s; }
.ph-product:hover { border-color: #b9dcd7; box-shadow: 0 4px 14px rgba(16,24,40,.07); }
.ph-product-img { position: relative; aspect-ratio: 4 / 3; background: #f3f6f8; display: flex; align-items: center; justify-content: center; }
.ph-product-img img { width: 100%; height: 100%; object-fit: cover; }
.ph-product-img .bi { font-size: 2.4rem; color: #c3ccd3; }
.ph-product-status { position: absolute; top: 8px; right: 8px; font-weight: 500; }
.ph-product-check { position: absolute; top: 10px; left: 10px; z-index: 2; width: 1.15em; height: 1.15em; box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.ph-product-body { padding: 12px 14px 8px; flex: 1; }
.ph-product-name { font-weight: 600; color: #1d262d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-product-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 10px 10px 12px; border-top: 1px solid #f0f3f5; }
.ph-product-actions form { margin: 0; }
.ph-product-actions .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .45rem; --bs-btn-font-size: .8rem; }

.ph-seq { max-width: 360px; }
.ph-seq-row .btn { min-width: 36px; }

/* 單欄表單（同舊後台編輯視窗） */
.ph-stacked { max-width: 720px; margin-left: auto; margin-right: auto; overflow: hidden; }
.ph-stacked-head { background: var(--ph-teal); color: #fff; text-align: center; font-weight: 600; padding: 12px 16px; }
.ph-stacked .card-body { padding: 24px 24px 8px; }
.ph-stacked .col-form-label { color: #3b4650; }
.ph-stacked-foot { display: flex; justify-content: center; gap: 12px; padding: 14px 16px; background: #f2f5f7; border-top: 1px solid #e3e8ec; }
.ph-stacked .ph-seq { max-width: none; }
.ph-builder .ph-row-active td { background: #e6f4f2; }
.ph-builder .ph-table td, .ph-builder .ph-table th { white-space: nowrap; }

.ph-builder .ph-table td.ph-depth { white-space: normal; min-width: 120px; max-width: 200px; }
.ph-builder form.d-inline .btn, .ph-builder td .btn { --bs-btn-padding-x: .45rem; --bs-btn-padding-y: .15rem; --bs-btn-font-size: .8rem; }
.ph-builder .ph-table th, .ph-builder .ph-table td { padding-left: .45rem; padding-right: .45rem; }
.ph-builder .col-lg-4 .ph-table td:first-child { white-space: normal; }
.ph-builder .col-lg-4 .ph-table td:last-child { width: 1%; }

.ph-product-img img { position: absolute; inset: 0; }

/* 停用的果昔機商品：灰階、斜紋底、虛線框、遮罩，和啟用中的明顯區分 */
.ph-product.is-off { background: repeating-linear-gradient(135deg, #f1f3f5 0 10px, #e9ecef 10px 20px); border: 2px dashed #adb5bd; box-shadow: none; }
.ph-product.is-off .ph-product-img { background: #dee2e6; }
.ph-product.is-off .ph-product-img img { filter: grayscale(1) opacity(.45); }
.ph-product.is-off .ph-product-name, .ph-product.is-off .ph-product-body { color: #868e96 !important; }
.ph-product.is-off .ph-product-name { text-decoration: line-through; }
.ph-product.is-off .ph-product-actions { border-top-color: #ced4da; }
.ph-off-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(33,37,41,.35); }
.ph-off-overlay span { background: #343a40; color: #fff; font-weight: 700; letter-spacing: .1em; padding: 6px 16px; border-radius: 999px; font-size: .9rem; }
.ph-product:not(.is-off) { border-top: 3px solid var(--ph-teal); }
.ph-tpl-form label { display: block; margin-bottom: 2px; }

/* 果昔機高階參數設定 */
.adv-empty { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px dashed #cfd8de; border-radius: 12px; background: #f8fafb; }
.adv-empty > .bi { font-size: 1.8rem; color: #98a3ab; }
.adv-empty strong { display: block; }
.adv-empty span { font-size: .85rem; color: #5b6770; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 14px; }
.adv-item { padding: 8px 10px; border: 1px solid #e8edf0; border-radius: 10px; background: #fff; transition: background .15s, border-color .15s; }
.adv-item label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: .84rem; font-weight: 600; color: #2b3640; margin-bottom: 5px; }
.adv-item label code { font-size: .7rem; color: #8a96a0; font-weight: 400; }
.adv-item input { font-variant-numeric: tabular-nums; font-weight: 600; }
.adv-item .btn { min-width: 32px; }
.adv-item.is-changed { background: #fff8e6; border-color: #f0c869; }
.adv-item.is-pending { border-color: #9fd3c8; box-shadow: inset 3px 0 0 var(--ph-teal); }
.qr-big { width: 168px; height: 168px; padding: 8px; background: #fff; border: 1px solid #e3e8ec; border-radius: 10px; flex-shrink: 0; }
.qr-big svg { width: 100%; height: 100%; display: block; }
.qr-code-text { word-break: break-all; font-size: .78rem; }

/* 廣告素材上傳 */
.ad-media .ad-pane { display: none; }
.ad-media[data-ftype="image"] .ad-pane[data-pane="image"], .ad-media[data-ftype="video"] .ad-pane[data-pane="video"] { display: block; }
.ad-img-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-img { position: relative; width: 112px; height: 112px; border-radius: 10px; overflow: hidden; border: 1px solid #dfe5ea; background: #f6f8fa; cursor: grab; }
.ad-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-img-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; line-height: 1; font-size: 1rem; }
.ad-img-tag { position: absolute; left: 4px; top: 4px; font-size: .68rem; background: var(--ph-teal); color: #fff; border-radius: 4px; padding: 0 5px; }
.ad-img-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed #9fb3c0; color: #5b6770; cursor: pointer; background: #fff; font-size: .8rem; }
.ad-img-add .bi { font-size: 1.4rem; }
.ad-img-add:hover { border-color: var(--ph-teal); color: var(--ph-teal-dark); }
.ad-video-cur video { width: 240px; max-height: 160px; border-radius: 8px; background: #000; }
.ad-pick-table th { font-size: .78rem; color: #5b6770; white-space: nowrap; }
.ad-list { display: flex; flex-direction: column; gap: 6px; }
.ad-item { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid #e3e8ec; border-radius: 10px; background: #fff; }
.ad-item.is-new { border-color: #b9dcd7; background: #f6fbfa; }
.ad-drag { cursor: grab; color: #98a3ab; font-size: 1.1rem; }
.ad-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid #e3e8ec; }
.ad-thumb img, .ad-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5b6770; }
.ad-num { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; color: #5b6770; }
.ad-num input { width: 76px; text-align: center; }
@media (max-width: 575.98px) { .ad-item { flex-wrap: wrap; } .ad-item-name { flex-basis: calc(100% - 110px); } }

/* ───────── 手機版（自動依螢幕寬度切換；手機瀏覽器 body 另有 .ph-mobile） ───────── */
.ph-filter-toggle { display: none; }
.ph-side-backdrop { display: none; }
@media (max-width: 991.98px) {
  .ph-side { width: min(84vw, 300px); }
  .ph-side-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 30, .45); z-index: 1035; }
  body.ph-side-open { overflow: hidden; }
  .ph-nav-link, .ph-nav-head { padding-top: 10px; padding-bottom: 10px; }
}
@media (max-width: 767.98px) {
  body { font-size: .95rem; }
  .ph-topbar { gap: 6px; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); }
  .ph-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .ph-user-name { display: none; }
  .ph-content { padding: 12px 10px calc(84px + env(safe-area-inset-bottom)); }
  .ph-note { font-size: .8rem; }
  /* 觸控尺寸、避免 iOS 輸入時放大 */
  .form-control, .form-select, .input-group-text { font-size: 16px; }
  .form-control-sm, .form-select-sm { min-height: 38px; }
  .btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .65rem; }
  .btn-link.btn-sm { --bs-btn-padding-x: .45rem; }
  /* 篩選條件收合 */
  .ph-filter-toggle { display: flex; align-items: center; width: 100%; border: 0; background: none; padding: 11px 14px; font-weight: 600; color: #2b3640; }
  form.ph-filters:not(.open) > .card-body { display: none !important; }
  form.ph-filters > .card-body { padding-top: 0; }
  .ph-filters .ph-f { flex: 1 1 100%; }
  .ph-filters .ph-f .form-control, .ph-filters .ph-f .form-select { width: 100%; }
  .ph-f-range .input-group { flex-wrap: nowrap; }
  /* 列表卡片化 */
  .ph-card > .card-header { flex-wrap: wrap; }
  .ph-card > .card-header .ms-auto { margin-left: 0 !important; width: 100%; flex-wrap: wrap; }
  .table-responsive:has(> .ph-cards-sm) { overflow: visible; }
  table.ph-cards-sm, table.ph-cards-sm > tbody, table.ph-cards-sm > tbody > tr, table.ph-cards-sm > tbody > tr > td { display: block; width: 100%; }
  table.ph-cards-sm > thead { display: none; }
  table.ph-cards-sm { background: transparent; text-align: left !important; }
  table.ph-cards-sm > tbody > tr { display: flex !important; flex-direction: column; position: relative; margin: 10px; width: auto; padding: 10px 14px; border: 1px solid #e3e8ec; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
  table.ph-cards-sm > tbody > tr:hover > td { background: transparent; }
  table.ph-cards-sm > tbody > tr > td { display: block; padding: 5px 0; border: 0; text-align: right; white-space: normal !important; font-size: .9rem; min-height: 0; background: transparent !important; box-shadow: none !important; overflow: hidden; }
  table.ph-cards-sm > tbody > tr > td::before { content: attr(data-label); float: left; max-width: 44%; margin-right: 12px; text-align: left; color: #8a96a0; font-size: .78rem; padding-top: 2px; }
  table.ph-cards-sm > tbody > tr > td.ph-td-seq { display: none; }
  table.ph-cards-sm > tbody > tr > td[data-label=""]::before { display: none; }
  table.ph-cards-sm > tbody > tr > td:empty { display: none; }
  table.ph-cards-sm > tbody > tr > td.ph-td-title { display: block; text-align: left; font-size: 1rem; font-weight: 600; padding: 2px 34px 6px 0; border-bottom: 1px solid #f0f3f5; margin-bottom: 4px; }
  table.ph-cards-sm > tbody > tr > td.ph-td-title::before { display: block; float: none; max-width: none; font-weight: 400; margin-bottom: 1px; }
  table.ph-cards-sm > tbody > tr > td.ph-td-check { position: absolute; top: 10px; right: 12px; width: auto; padding: 0; z-index: 1; }
  table.ph-cards-sm > tbody > tr > td.ph-td-check::before { display: none; }
  table.ph-cards-sm > tbody > tr > td.ph-td-check .form-check-input { width: 1.35em; height: 1.35em; }
  table.ph-cards-sm > tbody > tr > td.ph-td-actions { order: 99; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; border-top: 1px solid #f0f3f5; margin-top: 6px; padding-top: 8px; }
  table.ph-cards-sm > tbody > tr > td.ph-td-actions::before { display: none; }
  table.ph-cards-sm > tbody > tr > td.ph-td-actions form { margin: 0; }
  table.ph-cards-sm > tbody > tr > td.ph-td-full { text-align: center; }
  table.ph-cards-sm > tbody > tr > td.ph-td-full::before { display: none; }
  table.ph-cards-sm > tbody > tr.table-danger { border-color: #f1aeb5; background: #fff6f6; }
  .ph-card > .card-footer { padding: 10px; }
  .pagination { flex-wrap: wrap; }
  /* 表單：儲存按鈕固定在畫面下方 */
  .ph-form-actions, .ph-stacked-foot { position: sticky; bottom: 0; z-index: 20; background: rgba(242,245,247,.96); backdrop-filter: blur(6px); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-top: 1px solid #e3e8ec; flex-wrap: wrap; }
  .ph-form-actions .btn { flex: 1 1 auto; }
  .ph-stacked .row > .col-sm-4 { text-align: left !important; }
  /* 果昔機商品卡片：兩欄 */
  .ph-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ph-product-body { padding: 10px; }
  .ph-product-actions { flex-wrap: wrap; padding: 8px; }
  .ph-tpl-form { flex-wrap: wrap; }
  /* 選擇果昔機視窗 */
  .ad-pick-list > tbody > tr { cursor: pointer; }
  .ad-pick-list > tbody > tr > td.ph-td-check { right: auto; left: 12px; }
  .ad-pick-list > tbody > tr > td.ph-td-title { padding-left: 32px; padding-right: 0; }
  .modal-fullscreen-md-down .modal-body { padding: 8px; }
  /* 高階參數、儀表板 */
  .adv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .adv-item label code { display: none; }
  .ph-stat .ph-stat-num, .ph-kpi-num { font-size: 1.5rem; }
}
@media (max-width: 380px) {
  .ph-product-grid { grid-template-columns: 1fr; }
}

/* 設備 log 分析 */
.dl-list .list-group-item { padding: 10px 14px; }
.dl-list .list-group-item.active .badge { border: 1px solid rgba(255,255,255,.6); }
.dl-list .list-group-item.active .text-body-tertiary, .dl-list .list-group-item.active .text-danger, .dl-list .list-group-item.active .text-success { color: #fff !important; }
.dl-msg { word-break: break-all; }
.dl-hour { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 8px; font-size: .78rem; padding: 2px 0; }
.dl-hour i { display: block; height: 10px; border-radius: 3px; background: #e05d5d; }
.dl-hour b { text-align: right; }
.dl-view { max-height: 560px; overflow: auto; background: #0f1720; color: #d6dee5; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border-radius: 0 0 12px 12px; }
.dl-line { display: flex; gap: 10px; padding: 0 10px; white-space: pre-wrap; word-break: break-all; }
.dl-line:hover { background: rgba(255,255,255,.05); }
.dl-no { color: #5f6f7c; min-width: 44px; text-align: right; user-select: none; flex-shrink: 0; }
.dl-E { background: rgba(224, 93, 93, .16); color: #ffb4b4; }
.dl-W { background: rgba(240, 190, 80, .12); color: #ffe2a0; }
@media (max-width: 767.98px) { .dl-view { max-height: 70vh; font-size: 11px; } .dl-no { min-width: 32px; } }


/* 登入驗證碼 */
.ph-captcha { flex: none; height: 48px; width: auto; border-radius: 6px; cursor: pointer; border: 1px solid var(--bs-border-color, #dee2e6); background: #f3f6f6; }
.ph-captcha:focus-visible { outline: 2px solid #2a9d8f; outline-offset: 2px; }
#captcha { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
