:root{font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif;color:#172033;background:#f4f7fb}*{box-sizing:border-box}body{margin:0}header{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#fff;border-bottom:1px solid #e4e9f1}.brand{font-size:20px;font-weight:900}main{max-width:980px;margin:auto;padding:18px}.card{background:#fff;border:1px solid #e5eaf1;border-radius:18px;padding:20px;margin-bottom:16px;box-shadow:0 8px 30px rgba(30,50,80,.06)}.hero{text-align:center;padding:34px 20px}.hero h1{font-size:30px;margin:0 0 10px}h2{margin-top:0}.primary,.ghost{border:0;border-radius:12px;padding:12px 16px;font-weight:800;cursor:pointer}.primary{background:#1769e0;color:white}.big{font-size:18px;padding:16px 22px}.ghost{background:#eef3fb;color:#234}.danger{color:#a00000}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}select,input,textarea{width:100%;border:1px solid #ccd5e2;border-radius:10px;padding:12px;font:inherit}.hint{font-size:13px;color:#66758b;margin-top:8px}.hidden{display:none}.row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.official-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:16px}.official{border:1px solid #dde4ee;border-radius:14px;padding:16px}.badge{display:inline-block;background:#eef5ff;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800}.official h3{margin:10px 0 5px}.meta{color:#5e6d82;font-size:14px;line-height:1.7}.linkbtn{display:inline-block;margin-top:10px;text-decoration:none;background:#1769e0;color:white;padding:10px 12px;border-radius:10px;font-weight:800}footer{text-align:center;color:#708096;padding:10px 20px 30px;font-size:13px}.post{border-top:1px solid #edf0f5;padding:16px 0}.photos{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.preview{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.preview img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}@media(max-width:700px){.grid3,.admin-grid{grid-template-columns:1fr}.hero h1{font-size:25px}.row{display:block}.row button{margin-top:10px}.photos{grid-template-columns:1fr 1fr}}

.photo-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.photo-actions input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.file-action{display:inline-flex;align-items:center;justify-content:center}.photo-actions button:disabled{opacity:.45;cursor:not-allowed}.preview-item{position:relative}.preview-item img{display:block}.preview-number{position:absolute;left:6px;bottom:6px;background:rgba(0,0,0,.68);color:#fff;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:900}.preview-remove{position:absolute;right:5px;top:5px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(160,0,0,.88);color:#fff;font-size:20px;line-height:1;cursor:pointer}@media(max-width:700px){.photo-actions>*{flex:1 1 calc(50% - 4px);text-align:center}.preview{grid-template-columns:repeat(2,1fr)}}
.empty-note{padding:18px;border:1px dashed #c9ced6;border-radius:12px;background:#f8fafc;line-height:1.8;color:#4b5563}

.source-line{margin-top:10px;font-size:12px;color:#59697f;background:#f6f8fb;border-radius:8px;padding:7px 9px}.source-box{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f6f8fb;border:1px solid #e1e7ef;color:#536178;font-size:13px;line-height:1.7}.source-box a{color:#1769e0;font-weight:800}.data-note{border-left:5px solid #1769e0}
.candidate-alert{padding:12px 14px;border:1px solid #f0c36a;background:#fff8e8;border-radius:12px;font-weight:800;margin-bottom:12px}.status-chip{display:inline-block;padding:7px 12px;border-radius:999px;background:#eef4ff;font-weight:800;margin:6px 0 10px}.candidate-alert+h1{margin-bottom:4px}
/* V1.3.3 候選人 QR / NFC 推廣追蹤 */
.promo-create{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.promo-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}.promo-summary>div{background:#f5f8fd;border:1px solid #e2e8f2;border-radius:12px;padding:12px;text-align:center}.promo-summary b{display:block;font-size:24px}.promo-summary span{font-size:12px;color:#66758b}.promo-item{border:1px solid #dfe6f0;border-radius:16px;padding:16px;margin-top:12px}.promo-off{opacity:.62;background:#fafafa}.promo-head{display:flex;justify-content:space-between;gap:12px}.promo-head h3{margin:0 0 4px}.promo-body{display:grid;grid-template-columns:180px 1fr;gap:16px;margin-top:14px}.promo-qr{width:180px;height:180px;object-fit:contain;border:1px solid #e1e7ef;border-radius:12px;background:#fff}.promo-counts{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.promo-counts span{background:#eef4ff;border-radius:999px;padding:7px 10px}.copy-row{display:flex;gap:8px;margin:5px 0 10px}.copy-row input{min-width:0}.promo-actions{display:flex;gap:8px;flex-wrap:wrap}.promo-actions a{text-decoration:none;display:inline-block}@media(max-width:700px){.promo-create{grid-template-columns:1fr}.promo-summary{grid-template-columns:repeat(2,1fr)}.promo-body{grid-template-columns:1fr}.promo-qr{width:min(100%,260px);height:auto;margin:auto}.copy-row{align-items:stretch}.copy-row button{flex:0 0 auto}}

/* V1.3.4 QR／NFC 製作工單 */
.work-order{border:1px solid #d9e2ef;border-radius:18px;padding:18px;margin-top:16px;background:#fff}.work-order h3{margin:0 0 6px}.work-order .promo-info>label{display:block;margin-top:10px}.work-order .promo-info>input,.work-order .promo-info>select{width:100%;box-sizing:border-box}.promo-create{grid-template-columns:1.35fr 1.35fr .55fr .7fr auto}.promo-create input[type=number]{min-width:90px}@media(max-width:900px){.promo-create{grid-template-columns:1fr}.work-order .promo-body{grid-template-columns:1fr}.work-order .promo-qr{max-width:220px}}
/* V1.3.4.2 自動刷新、狀態顏色、需求變更 */
.work-status-red{color:#c5162e!important;font-weight:900}.work-status-green{color:#138a43!important;font-weight:900}.work-status-normal{font-weight:900}.requirement-change-note{margin-top:7px;padding:8px 10px;border-radius:9px;background:#fff1f1;color:#b4232f;font-size:13px;font-weight:800}.requirement-edit{margin-top:12px;padding:10px;border:1px dashed #cdd7e5;border-radius:12px;background:#fafcff}.requirement-edit label{display:block;font-size:13px;font-weight:800;margin-bottom:4px}

/* =========================================================
   V1.3.5｜純版面整理版
   僅視覺樣式：不修改資料庫／工單／同步／候選人邏輯
   ========================================================= */
:root{
  --ui-bg:#f2f6fb;
  --ui-surface:#ffffff;
  --ui-border:#dfe7f1;
  --ui-text:#172033;
  --ui-muted:#66758b;
  --ui-primary:#1769e0;
  --ui-primary-soft:#eef5ff;
  --ui-danger:#c5162e;
  --ui-danger-soft:#fff0f2;
  --ui-success:#138a43;
  --ui-success-soft:#ecf9f1;
  --ui-warning:#a96300;
  --ui-warning-soft:#fff7e8;
  --ui-shadow:0 10px 32px rgba(32,57,90,.075);
}
html{background:var(--ui-bg);scroll-behavior:smooth}
body{background:linear-gradient(180deg,#f8fbff 0,#f2f6fb 180px,#f2f6fb 100%);color:var(--ui-text);line-height:1.55}
header{padding:13px max(18px,calc((100vw - 1180px)/2));box-shadow:0 1px 0 rgba(20,45,75,.04);backdrop-filter:saturate(150%) blur(10px)}
.brand{letter-spacing:.02em;color:#12213b}
main{max-width:1180px;padding:24px 18px 42px}
.card{border-color:var(--ui-border);border-radius:22px;padding:24px;margin-bottom:20px;box-shadow:var(--ui-shadow)}
.card>h1,.card>h2{letter-spacing:.01em;color:#152139}
h1{line-height:1.22}h2{font-size:clamp(22px,3vw,30px);margin-bottom:16px}
.hero{padding:42px 24px}.hero h1{font-size:clamp(30px,5vw,44px);letter-spacing:.015em}
.hint,.meta{color:var(--ui-muted)}

/* 表單元件 */
select,input,textarea{min-height:48px;border:1px solid #cfd9e6;border-radius:13px;background:#fff;color:#18243b;transition:border-color .16s,box-shadow .16s,background .16s}
select:hover,input:hover,textarea:hover{border-color:#aebed2}
select:focus,input:focus,textarea:focus{outline:0;border-color:#5c97ec;box-shadow:0 0 0 4px rgba(23,105,224,.11)}
textarea{min-height:112px;resize:vertical}
label{color:#273750}

/* 按鈕 */
.primary,.ghost,.linkbtn,.file-action{min-height:44px;border-radius:12px;font-weight:850;letter-spacing:.01em;transition:transform .12s,box-shadow .12s,background .12s,opacity .12s}
.primary{background:linear-gradient(180deg,#2877e6,#1769e0);box-shadow:0 5px 14px rgba(23,105,224,.18)}
.primary:hover,.linkbtn:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(23,105,224,.24)}
.primary:active,.linkbtn:active,.ghost:active{transform:translateY(0)}
.ghost{background:#f0f4fa;color:#263852;border:1px solid #dfe7f1}
.ghost:hover{background:#e8eef7}
.ghost.danger,.danger{color:#b4232f}.ghost.danger{background:#fff2f3;border-color:#f2c8ce}
.linkbtn{text-align:center;background:linear-gradient(180deg,#2877e6,#1769e0);box-shadow:0 5px 14px rgba(23,105,224,.16)}

/* 公開民代卡片 */
.official-list{gap:14px}.official{border-color:#dce5f0;border-radius:17px;padding:18px;background:linear-gradient(180deg,#fff,#fcfdff);box-shadow:0 4px 15px rgba(30,55,90,.04);transition:transform .15s,box-shadow .15s}
.official:hover{transform:translateY(-2px);box-shadow:0 9px 25px rgba(30,55,90,.085)}
.badge,.status-chip{border-radius:999px;padding:6px 10px;background:var(--ui-primary-soft);color:#245184;font-weight:900}
.source-line,.source-box{background:#f7f9fc;border:1px solid #e6ebf2;border-radius:11px}

/* 候選人提醒 */
.candidate-alert{border:1px solid #f2d38e;background:linear-gradient(180deg,#fffaf0,#fff7e8);border-radius:15px;padding:14px 16px;color:#704900}

/* 上傳照片區 */
.photo-actions{padding:12px;border:1px dashed #cfd9e6;background:#f8fbff;border-radius:15px}
.preview{gap:10px;margin-top:12px}.preview-item{border-radius:13px;overflow:hidden;background:#eef2f7}.preview-item img{border-radius:13px}.preview-remove{box-shadow:0 2px 8px rgba(0,0,0,.2)}

/* QR/NFC 推廣建立區 */
.promo-create{padding:16px;background:#f7faff;border:1px solid #e0e8f3;border-radius:17px;gap:12px;margin-top:10px}
.promo-create>div,.promo-create>label{min-width:0}
.promo-summary{gap:12px;margin:18px 0}
.promo-summary>div{border:1px solid #e0e8f3;border-radius:16px;padding:16px 12px;background:linear-gradient(180deg,#f8fbff,#f3f7fd);min-height:94px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.promo-summary b{font-size:28px;line-height:1.1;color:#14233d}.promo-summary span{margin-top:8px;font-size:13px}

/* 推廣點卡片 */
.promo-item{border:1px solid #dce5f0;border-radius:20px;padding:20px;margin-top:14px;background:#fff;box-shadow:0 7px 22px rgba(30,55,90,.055)}
.promo-head{align-items:center;border-bottom:1px solid #edf1f6;padding-bottom:12px}.promo-head h3{font-size:21px;color:#152139}.promo-off{opacity:.68;background:#f8f9fb}
.promo-body{grid-template-columns:190px minmax(0,1fr);gap:20px;margin-top:18px}.promo-qr{width:190px;height:190px;padding:8px;border:1px solid #dce5ef;border-radius:16px;box-shadow:0 4px 15px rgba(30,55,90,.05)}
.promo-counts{gap:8px}.promo-counts span{background:#f0f5fc;border:1px solid #e0e8f2;color:#3d526e;font-size:13px;font-weight:750;padding:7px 11px}
.copy-row{gap:8px;align-items:center}.copy-row input{background:#f8fafc;color:#4b5d75}
.promo-actions{padding-top:8px;border-top:1px dashed #e2e8f0;margin-top:12px}

/* 製作工單：工作台風格 */
.work-order{border:1px solid #dce5ef;border-radius:20px;padding:20px;margin-top:16px;background:linear-gradient(180deg,#fff,#fcfdff);box-shadow:0 7px 22px rgba(30,55,90,.055)}
.work-order .promo-head{margin:-2px 0 4px}.work-order .promo-info{min-width:0}.work-order .promo-info>label{font-size:13px;font-weight:850;color:#41536d;margin:12px 0 5px}
.work-order .promo-info>input,.work-order .promo-info>select{background:#fff}

/* 工單狀態：由文字提示升級成標籤感，但不改 DOM/邏輯 */
.work-status-red,.work-status-green,.work-status-normal{display:inline-block;padding:5px 10px;border-radius:999px;line-height:1.25}
.work-status-red{color:var(--ui-danger)!important;background:var(--ui-danger-soft);border:1px solid #f4c9cf}
.work-status-green{color:var(--ui-success)!important;background:var(--ui-success-soft);border:1px solid #c7ead5}
.work-status-normal{color:#5a6678;background:#f0f3f7;border:1px solid #dde4ed}
.requirement-change-note{border:1px solid #f3c7cd;background:var(--ui-danger-soft);color:#a8212d;border-radius:12px;padding:10px 12px}
.requirement-edit{margin-top:14px;padding:14px;border:1px dashed #c7d4e4;border-radius:14px;background:#f8fbff}

/* 空資料提示 */
.empty-note{border:1px dashed #c7d4e3;background:#f8fbff;border-radius:15px;padding:20px;color:#53647b}

/* 桌機雙欄管理頁更有層次 */
.admin-grid{gap:20px}.admin-grid>.card{margin-bottom:0}

/* 桌面版控制密度 */
@media(min-width:901px){
  .promo-actions .primary,.promo-actions .ghost,.promo-actions a{min-width:112px}
  .work-order .promo-body{align-items:start}
}

/* 手機版：大按鈕、單欄、避免橫向擠壓 */
@media(max-width:700px){
  header{padding:11px 14px}.brand{font-size:18px}
  main{padding:14px 10px 30px}
  .card{padding:17px 14px;border-radius:18px;margin-bottom:14px}
  .hero{padding:28px 14px}.hero h1{font-size:28px}
  h2{font-size:23px}
  .primary,.ghost,.linkbtn,.file-action{min-height:48px}
  .promo-create{padding:12px;gap:10px}
  .promo-summary{grid-template-columns:repeat(2,1fr);gap:8px}.promo-summary>div{padding:12px 8px;min-height:82px}.promo-summary b{font-size:25px}
  .promo-item,.work-order{padding:15px 12px;border-radius:17px}
  .promo-head{display:block}.promo-head>*+*{margin-top:8px}
  .promo-body{grid-template-columns:1fr;gap:14px}.promo-qr{width:min(100%,230px);height:auto;margin:0 auto}
  .copy-row{display:grid;grid-template-columns:minmax(0,1fr) auto}.copy-row button{min-width:72px}
  .promo-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.promo-actions>*{width:100%;text-align:center;margin:0}
  .work-status-red,.work-status-green,.work-status-normal{margin-top:4px}
  .admin-grid{gap:14px}
}
@media(max-width:420px){
  .promo-actions{grid-template-columns:1fr}
  .promo-summary{grid-template-columns:1fr 1fr}
  .copy-row{grid-template-columns:1fr}.copy-row button{width:100%}
}

/* ================= V1.3.6 服務後台三分頁 ================= */
.service-admin-body{padding-bottom:92px}.service-admin-main{max-width:1180px}.service-shell{padding-bottom:20px}.service-tab{display:none}.service-tab.active{display:block}.hero-service-card{display:flex;align-items:center;justify-content:space-between;gap:18px}.hero-service-card h1{margin:4px 0 0}.eyebrow{font-weight:800;color:#2563eb;letter-spacing:.08em}.service-public-link{text-decoration:none;white-space:nowrap}.service-dashboard-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}.dashboard-stat{background:#fff;border:1px solid #dbe5f1;border-radius:18px;padding:22px 14px;text-align:center;box-shadow:0 8px 24px rgba(15,23,42,.04)}.dashboard-stat b{display:block;font-size:34px;line-height:1;color:#111827}.dashboard-stat span{display:block;margin-top:10px;color:#64748b;font-weight:700}.dashboard-stat.emphasis{background:#eff6ff;border-color:#bfdbfe}.dashboard-stat.emphasis b{color:#1d4ed8}.service-bottom-nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:50;width:min(100%,1180px);display:grid;grid-template-columns:repeat(3,1fr);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border:1px solid #dbe5f1;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -8px 30px rgba(15,23,42,.12);overflow:hidden}.service-nav-btn{border:0;background:transparent;padding:12px 8px 10px;color:#64748b;font-size:15px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}.service-nav-btn span{font-size:22px;line-height:1.2}.service-nav-btn b{font-size:15px}.service-nav-btn.active{background:#eff6ff;color:#1d4ed8}.service-nav-btn.active b{font-weight:900}.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:10px}.post-filter{display:grid;grid-template-columns:1fr 1fr auto auto;gap:10px;align-items:end;margin:14px 0 18px}.post-filter label{margin-top:0}.accordion-list{display:grid;gap:10px}.record-accordion{border:1px solid #dbe5f1;border-radius:16px;background:#fff;overflow:hidden}.record-accordion>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;cursor:pointer;background:#f8fafc}.record-accordion>summary::-webkit-details-marker{display:none}.record-accordion>summary>div{min-width:0}.record-accordion>summary b{display:block;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-accordion>summary span:not(.accordion-arrow){display:block;margin-top:5px;color:#64748b;font-size:14px}.accordion-arrow{font-size:25px;transition:transform .18s ease}.record-accordion[open] .accordion-arrow{transform:rotate(180deg)}.accordion-content{padding:18px;border-top:1px solid #e2e8f0}.accordion-content p{white-space:pre-wrap;line-height:1.75}.record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.promo-accordion .promo-body{display:grid;grid-template-columns:190px 1fr;gap:18px}.promo-accordion .promo-qr{width:100%;max-width:190px}.promo-accordion em{font-style:normal;font-weight:900}.photo-actions{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap}.photo-actions .ghost,.photo-actions .file-action{font-size:18px!important;line-height:1.2;min-height:50px;padding:13px 18px;display:inline-flex;align-items:center;justify-content:center}.photo-actions input[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.promo-create{align-items:end}.promo-create>.primary{min-height:50px}.requirement-edit{margin-top:14px;padding-top:12px;border-top:1px dashed #cbd5e1}
@media(max-width:820px){.service-admin-body{padding-bottom:84px}.hero-service-card{align-items:flex-start;flex-direction:column}.service-public-link{width:100%;text-align:center}.service-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-stat.emphasis{grid-column:1/-1}.dashboard-stat{padding:18px 10px}.dashboard-stat b{font-size:30px}.post-filter{grid-template-columns:1fr 1fr}.post-filter button{min-height:46px}.promo-accordion .promo-body{grid-template-columns:1fr}.promo-accordion .promo-qr{margin:auto;max-width:220px}.record-accordion>summary{padding:14px}.record-accordion>summary b{font-size:17px}.photo-actions{display:grid;grid-template-columns:1fr 1fr}.photo-actions .ghost,.photo-actions .file-action{width:100%;font-size:18px!important;min-height:52px}.service-bottom-nav{border-radius:16px 16px 0 0}.service-nav-btn{padding:10px 6px 8px}.service-nav-btn span{font-size:21px}.service-nav-btn b{font-size:14px}}

/* V1.3.6.1｜推廣追蹤 1 分鐘刷新＋雙按鈕同列版 */
.promo-accordion .promo-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important}
.promo-accordion .promo-actions>a,.promo-accordion .promo-actions>button{width:100%!important;min-width:0!important;min-height:48px!important;margin:0!important;padding:12px 14px!important;font-size:16px!important;line-height:1.25!important;font-weight:850!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
@media(max-width:700px){.promo-accordion .promo-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.promo-accordion .promo-actions>a,.promo-accordion .promo-actions>button{font-size:16px!important;min-height:48px!important;padding:11px 8px!important}}


/* V1.3.6.2｜真正生效：60 秒刷新＋QR/停用固定同列 */
.promo-main-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important;margin-top:12px!important;padding-top:10px!important;border-top:1px dashed #e2e8f0!important}
.promo-main-actions .promo-main-action{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:48px!important;margin:0!important;padding:12px 10px!important;font-size:16px!important;line-height:1.25!important;font-weight:850!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;text-decoration:none!important;white-space:nowrap!important}
@media(max-width:420px){.promo-main-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.promo-main-actions .promo-main-action{font-size:15px!important;padding:11px 6px!important}}


/* ================= V1.3.7 帳號登入＋首次改密碼＋助理帳號 ================= */
.login-card{max-width:520px;margin:34px auto}.login-card h1,#forcePasswordCard h1{text-align:center}.password-wrap{display:grid;grid-template-columns:minmax(0,1fr) 50px;align-items:stretch;gap:8px}.password-wrap input{margin:0}.password-eye{border:1px solid #cbd5e1;border-radius:12px;background:#fff;cursor:pointer;font-size:20px;min-height:48px;display:flex;align-items:center;justify-content:center}.password-eye:hover{background:#f8fafc}.assistant-create{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-top:12px}.assistant-list{display:grid;gap:9px;margin-top:12px}.assistant-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #dbe5f1;border-radius:14px;background:#f8fafc}.assistant-row>div:first-child{min-width:0}.assistant-row b{display:block}.assistant-row span{display:block;color:#64748b;font-size:14px;margin-top:3px}.assistant-actions{display:flex;gap:8px;flex-wrap:wrap}.account-admin-row{margin-top:10px}.account-admin-row .copy-row{margin-top:8px}
@media(max-width:700px){.login-card{margin-top:14px}.assistant-create{grid-template-columns:1fr}.assistant-create .primary{width:100%}.assistant-row{align-items:flex-start;flex-direction:column}.assistant-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.assistant-actions button{width:100%}.password-eye{min-height:52px}}

/* ================= V1.3.8 客戶管理分頁＋總後台五分頁 ================= */
.service-bottom-nav{grid-template-columns:repeat(4,1fr)}
.account-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 20px}.account-info-grid>div{padding:14px;border:1px solid #dbe5f1;border-radius:14px;background:#f8fafc}.account-info-grid span{display:block;color:#64748b;font-size:13px}.account-info-grid b{display:block;margin-top:4px;font-size:18px}.manage-password-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.manage-password-grid .primary{min-height:48px}.master-admin-body{padding-bottom:92px}.master-admin-main{max-width:1280px}.master-shell{padding-bottom:20px}.master-tab{display:none}.master-tab.active{display:block}.master-bottom-nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:60;width:min(100%,1280px);display:grid;grid-template-columns:repeat(5,1fr);background:rgba(255,255,255,.97);backdrop-filter:blur(12px);border:1px solid #dbe5f1;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -8px 30px rgba(15,23,42,.12);overflow:hidden}.master-nav-btn{border:0;background:transparent;padding:10px 6px 8px;color:#64748b;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}.master-nav-btn span{font-size:21px}.master-nav-btn b{font-size:14px}.master-nav-btn.active{background:#eff6ff;color:#1d4ed8}.master-nav-btn.active b{font-weight:900}.master-dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.header-actions{display:flex;gap:8px;align-items:center}.form-grid.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid .full{grid-column:1/-1}.candidate-created-result{margin-top:16px;padding:18px;border:1px solid #b9d8ff;background:#eff6ff;border-radius:16px}.candidate-created-result.hidden{display:none}.created-badge{display:inline-block;background:#dcfce7;color:#166534;border-radius:999px;padding:6px 10px;font-weight:900}.created-data-row{display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:10px;align-items:center;margin-top:10px}.created-data-row>a{overflow-wrap:anywhere}.created-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.account-action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.danger-soft{min-height:44px;border:1px solid #f2c8ce;border-radius:12px;background:#fff2f3;color:#b4232f;font-weight:850;padding:10px 14px;cursor:pointer}.danger-soft:disabled{opacity:.45;cursor:not-allowed}.audit-filter{display:grid;grid-template-columns:minmax(220px,1fr) 160px 160px auto auto;gap:8px;align-items:end;margin:12px 0}.audit-list{display:grid;gap:10px}.audit-ua{word-break:break-all;margin-top:8px}.audit-list .accordion-content>div{margin:6px 0}
@media(max-width:820px){.master-admin-body{padding-bottom:84px}.master-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.two-col{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.created-data-row{grid-template-columns:1fr}.created-data-row .ghost{width:100%}.manage-password-grid{grid-template-columns:1fr}.account-info-grid{grid-template-columns:1fr}.audit-filter{grid-template-columns:1fr 1fr}.audit-filter #auditKeyword{grid-column:1/-1}.master-bottom-nav{border-radius:16px 16px 0 0}.master-nav-btn{padding:9px 3px 7px}.master-nav-btn span{font-size:20px}.master-nav-btn b{font-size:13px}.header-actions .ghost{padding:8px 10px}}
@media(max-width:430px){.audit-filter{grid-template-columns:1fr}.audit-filter #auditKeyword{grid-column:auto}.master-dashboard-grid{grid-template-columns:1fr 1fr}.service-nav-btn b{font-size:13px}}

/* V1.3.8.1 手機總管理操作修正版 */
.dashboard-work-pair{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.account-search-row{display:flex;gap:10px;align-items:center;margin:10px 0 14px}.account-search-row input{flex:1;min-width:0}.master-password-grid{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:center}.work-order-accordion{margin-top:12px}.work-order-accordion>.accordion-content.work-order{margin-top:0;border:0;box-shadow:none;padding:14px 0 0;background:transparent}.audit-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.audit-action-row button{width:100%}.audit-filter>*{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:820px){.master-password-grid{grid-template-columns:1fr}.account-search-row{align-items:stretch;flex-direction:column}.audit-filter{grid-template-columns:1fr 1fr}.audit-filter #auditKeyword{grid-column:1/-1}.audit-action-row{grid-column:1/-1}.audit-filter input[type=date]{width:100%;min-width:0}.dashboard-work-pair{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.audit-filter{grid-template-columns:1fr 1fr}.audit-filter #auditKeyword{grid-column:1/-1}.audit-filter #auditDateFrom,.audit-filter #auditDateTo{grid-column:auto}.audit-action-row{grid-column:1/-1}.dashboard-work-pair{grid-template-columns:1fr 1fr}.dashboard-work-pair .dashboard-stat{min-width:0}}

/* V1.3.8.2 mobile master fixes */
.dashboard-work-pair{display:flex!important;gap:12px!important;width:100%!important;min-width:0!important}.dashboard-work-pair>.dashboard-stat{flex:1 1 0!important;min-width:0!important;width:auto!important}
.audit-filter{min-width:0;max-width:100%;overflow:hidden}.audit-filter input[type=date]{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;-webkit-appearance:none;appearance:none}
@media(max-width:430px){.audit-filter{display:grid!important;grid-template-columns:1fr!important;width:100%!important;max-width:100%!important;overflow:hidden!important}.audit-filter #auditKeyword,.audit-filter #auditDateFrom,.audit-filter #auditDateTo,.audit-action-row{grid-column:1/-1!important;width:100%!important;min-width:0!important;max-width:100%!important}.audit-filter input[type=date]{font-size:16px!important;padding-left:10px!important;padding-right:10px!important}.dashboard-work-pair{display:flex!important;flex-direction:row!important}.dashboard-work-pair>.dashboard-stat{flex:1 1 0!important}}

/* V1.3.9｜總管理營運監控＋客戶狀態管理 */
.master-dashboard-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr));}
.ops-alert-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.ops-alert{border:1px solid #dbe5f2;border-radius:16px;padding:14px;background:#f8fbff;display:flex;flex-direction:column;gap:4px;}
.ops-alert b{font-size:1.55rem;}.ops-alert span{font-size:.92rem;color:#52657d;}.ops-alert.bad{background:#fff1f1;border-color:#ffc8c8}.ops-alert.bad b{color:#c62828}.ops-alert.warn{background:#fff8e8;border-color:#f3d38a}.ops-alert.ok{background:#effbf4;border-color:#b9e8ca}.ops-alert.ok b{color:#1f8a4c}
.recent-activity-list{display:flex;flex-direction:column;gap:8px}.recent-activity-row{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e1e8f2;border-radius:14px;background:#fbfdff}.recent-activity-row div{min-width:0;display:flex;flex-direction:column;gap:3px}.recent-activity-row span{font-size:.9rem;color:#63758c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-activity-row time{font-size:.82rem;color:#7c8da3;white-space:nowrap}
.customer-status-chip{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;font-size:.82rem;font-weight:700}.status-active{background:#e8f8ef;color:#177545}.status-paused{background:#fff3db;color:#9a6400}.status-expired{background:#ffe9e9;color:#b52222}.status-disabled{background:#eceff3;color:#5d6672}
.account-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.account-meta-grid>div{padding:10px 12px;border-radius:12px;background:#f5f8fc;display:flex;flex-direction:column;gap:3px}.account-meta-grid span{font-size:.82rem;color:#687a91}.account-meta-grid b{font-size:.9rem;overflow-wrap:anywhere}
.dashboard-stat.status-ok{background:#effbf4}.dashboard-stat.status-ok b{color:#177545}.dashboard-stat.status-warn{background:#fff5eb}.dashboard-stat.status-warn b{color:#b45309}
@media(max-width:640px){.master-dashboard-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));}.ops-alert-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.recent-activity-row{flex-direction:column}.recent-activity-row time{white-space:normal}.account-meta-grid{grid-template-columns:1fr}.account-search-row{align-items:stretch}.account-search-row select{width:100%;max-width:none}}

/* V1.3.9.1 首頁最近活動預設收合 */
.home-recent-accordion{padding:0;overflow:hidden}.home-recent-accordion>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 24px;cursor:pointer;background:#fff}.home-recent-accordion>summary::-webkit-details-marker{display:none}.home-recent-accordion>summary h2{margin:0}.home-recent-accordion>summary .hint{display:block;margin-top:4px}.home-recent-accordion>.home-recent-content{padding:0 24px 24px;border-top:1px solid #e6edf5}.home-recent-accordion[open]>summary .accordion-arrow{transform:rotate(180deg)}@media(max-width:640px){.home-recent-accordion>summary{padding:18px}.home-recent-accordion>.home-recent-content{padding:0 18px 18px}}

/* V1.3.9.2 最近活動強制收合：不依賴 details */
.home-recent-card{padding:0;overflow:hidden}
.home-recent-toggle{width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 24px;cursor:pointer;text-align:left;color:inherit}
.home-recent-toggle h2{margin:0}.home-recent-toggle .hint{display:block;margin-top:4px}.home-recent-content{padding:0 24px 24px;border-top:1px solid #e6edf5}.home-recent-content.hidden{display:none!important}
@media(max-width:640px){.home-recent-toggle{padding:18px}.home-recent-content{padding:0 18px 18px}}

/* V1.3.9.4 最近活動原生 hidden 屬性強制隱藏 */
#recentActivityPanel[hidden]{display:none!important;}

/* V1.3.9.5｜稽核預設不顯示 */
.audit-empty-hint{
  padding:14px 12px;
  border:1px dashed rgba(100,116,139,.35);
  border-radius:12px;
  text-align:center;
  margin-top:10px;
}
.audit-results-hidden[hidden]{display:none!important}

/* V1.4｜會員方案＋到期管理 */
.membership-admin-box{margin:14px 0;padding:14px;border:1px solid rgba(15,118,110,.18);border-radius:16px;background:rgba(240,253,250,.72)}
.membership-admin-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.membership-admin-title span{font-size:13px;color:#64748b}
.membership-plan-grid{display:grid;grid-template-columns:1.3fr .8fr 1fr 1fr;gap:8px}.membership-plan-grid>*{min-width:0}
.membership-action-row{display:grid;grid-template-columns:auto 120px 1fr auto;gap:8px;align-items:center;margin-top:10px}.membership-action-row>*{min-width:0}
.membership-reminder-list{margin-top:10px;display:grid;gap:8px}.membership-reminder-row{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.membership-reminder-row>div{display:flex;flex-direction:column;gap:2px}.membership-reminder-row>div:last-child{text-align:right}.membership-reminder-row span{font-size:12px;color:#64748b}.membership-reminder-row.expired{border-color:#fecaca;background:#fff7f7}.membership-reminder-row.expired>div:last-child b,.membership-reminder-row.expired>div:last-child span{color:#b91c1c}
@media(max-width:700px){.membership-plan-grid{grid-template-columns:1fr 1fr}.membership-action-row{grid-template-columns:1fr 1fr}.membership-action-row input{grid-column:1/3}.membership-reminder-row{align-items:flex-start}.membership-reminder-row>div:last-child{min-width:92px}}

/* V1.4.1｜方案獨立底列 */
.master-bottom-nav-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  justify-content:flex-start;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.master-bottom-nav-scroll::-webkit-scrollbar{display:none}
.master-bottom-nav-scroll .master-nav-btn{
  flex:0 0 max(62px,16.6667%);
  min-width:62px;
}
.membership-customer-row summary{align-items:center}
.membership-due-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  background:#eef2f7;
}
.membership-due-chip.soon{font-weight:700}
.membership-due-chip.expired{font-weight:800}
@media(max-width:520px){
  .master-bottom-nav-scroll .master-nav-btn{flex-basis:68px}
  .membership-plan-grid{grid-template-columns:1fr!important}
  .membership-action-row{grid-template-columns:1fr 1fr!important}
  .membership-action-row input{grid-column:1/-1}
}

/* V1.4.2｜底列更多選單＋方案重新整理單行 */
.master-bottom-nav-fixed{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  overflow:visible!important;
}
.master-bottom-nav-fixed .master-nav-btn{
  min-width:0!important;
  width:100%!important;
  flex:none!important;
}
.master-more-menu{
  position:fixed;
  right:14px;
  bottom:88px;
  z-index:1200;
  min-width:150px;
  padding:8px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 12px 38px rgba(15,23,42,.18);
  border:1px solid rgba(148,163,184,.28);
}
.master-more-menu.hidden{display:none!important}
.master-more-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:0;
  background:transparent;
  border-radius:12px;
  font-size:16px;
  text-align:left;
}
.master-more-item:active{background:#eef4ff}
.master-more-item span{font-size:20px}
.no-wrap-btn{
  white-space:nowrap!important;
  word-break:keep-all!important;
  min-width:max-content!important;
}
@media(max-width:520px){
  .master-more-menu{
    right:10px;
    bottom:82px;
    min-width:138px;
  }
  .master-more-item{font-size:15px;padding:11px 12px}
  #reloadMembershipPlans{padding-left:14px!important;padding-right:14px!important}
}

/* V1.4.3｜方案儲存回饋＋手機日期欄位修正 */
.membership-save-feedback-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
  margin-bottom:10px;
}
.membership-save-btn{
  white-space:nowrap!important;
  flex:0 0 auto;
}
.membership-save-msg{
  min-height:20px;
  font-size:14px;
  line-height:1.35;
}
.membership-save-msg.is-working{font-weight:600}
.membership-save-msg.is-success{font-weight:800}
.membership-save-msg.is-error{font-weight:800}
#masterTabPlans .membership-plan-grid,
#masterTabPlans .membership-plan-grid > *{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
#masterTabPlans input[type="date"]{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  -webkit-appearance:none;
  appearance:none;
}
@media(max-width:640px){
  #masterTabPlans .membership-plan-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
  }
  #masterTabPlans .membership-plan-grid select,
  #masterTabPlans .membership-plan-grid input{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #masterTabPlans input[type="date"]{
    inline-size:100%!important;
    min-inline-size:0!important;
    max-inline-size:100%!important;
    overflow:hidden!important;
  }
  .membership-save-feedback-row{
    align-items:flex-start;
    flex-wrap:wrap;
  }
}

/* V1.4.4｜到期提醒與續費紀錄明細 */
.membership-logic-card{margin-bottom:12px}
.membership-reminder-row.soon{border-color:rgba(245,158,11,.38);background:rgba(255,251,235,.72)}
.membership-reminder-row.expired{border-color:rgba(239,68,68,.35);background:rgba(254,242,242,.8)}
.renewal-record{margin-top:8px}
.renewal-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.renewal-detail-grid>div{
  min-width:0;
  padding:9px 10px;
  border-radius:10px;
  background:rgba(248,250,252,.9);
}
.renewal-detail-grid span{display:block;font-size:12px;opacity:.72;margin-bottom:3px}
.renewal-detail-grid b{display:block;overflow-wrap:anywhere}
.renewal-detail-grid .full{grid-column:1/-1}
.ops-alert-item.danger{border-color:rgba(239,68,68,.4);background:rgba(254,242,242,.92)}
@media(max-width:560px){
  .renewal-detail-grid{grid-template-columns:1fr}
  .renewal-detail-grid .full{grid-column:auto}
}

/* V1.5｜正式收費管理強化版 */
.billing-summary-card{margin-bottom:12px}
.billing-block{margin-top:14px;padding:14px;border:1px solid rgba(148,163,184,.28);border-radius:14px;background:rgba(248,250,252,.72)}
.billing-block h3{margin:0 0 10px}
.billing-contact-grid,.billing-payment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.billing-contact-grid textarea,.billing-payment-grid textarea{grid-column:1/-1}
.billing-status-chip{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;padding:4px 8px;font-size:12px;background:#eef2f7}
.billing-waiting_payment{font-weight:800;background:rgba(255,247,ed,.95)}
.billing-paid{font-weight:800;background:rgba(240,253,244,.95)}
.billing-not_renewing{font-weight:700;background:rgba(254,242,242,.95)}
.billing-contacted{background:rgba(239,246,255,.95)}
.billing-contact-record{margin-top:8px}
@media(max-width:640px){
  .billing-contact-grid,.billing-payment-grid{grid-template-columns:1fr}
  .billing-contact-grid textarea,.billing-payment-grid textarea{grid-column:auto}
  #masterTabPlans .billing-contact-grid input[type="date"]{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
}

/* V1.6.1｜服務後台公告／公開頁資料 */
.service-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.service-bottom-nav .service-nav-btn{min-width:0}
.public-profile-photo-editor{display:flex;align-items:center;gap:14px;margin:10px 0 16px;flex-wrap:wrap}
.public-profile-photo-preview{width:112px;height:112px;border-radius:20px;border:1px solid #dbe3ed;background:#f5f7fa;display:grid;place-items:center;overflow:hidden;color:#7b8493}
.public-profile-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.public-profile-photo-actions{display:flex;gap:8px;flex-wrap:wrap}
.public-profile-photo-actions input[type=file]{display:none}
.public-profile-edit-grid textarea{width:100%;max-width:100%;resize:vertical}
.public-profile-save-row{display:flex;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap}
@media(max-width:560px){
  .service-bottom-nav .service-nav-btn b{font-size:11px}
  .service-bottom-nav .service-nav-btn span{font-size:18px}
  .public-profile-photo-editor{align-items:flex-start}
  .public-profile-photo-preview{width:96px;height:96px}
  .public-profile-edit-grid{grid-template-columns:1fr!important}
  .public-profile-edit-grid .full{grid-column:auto!important}
}

/* V1.7 服務分享 */
.post-share-box{margin-top:12px;padding:13px;border:1px solid #dce5ef;border-radius:14px;background:#f8fbff}
.existing-post-share{margin-top:12px;padding-top:10px;border-top:1px dashed #dbe3ed}
.post-share-box>b,.existing-post-share>b{display:block;margin-bottom:6px}
.service-share-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.service-share-actions button{border:1px solid #d8e1ec;background:#fff;border-radius:10px;padding:8px 10px;font-weight:800;font-size:12px}
@media(max-width:560px){.service-share-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.service-share-actions button{width:100%;min-width:0}}

/* V1.7.1 Facebook 手機分享修正 */
.service-share-actions button[data-share="facebook"]{font-weight:900}

/* V1.7.2｜里長優先分組 */
.official-group-title{margin:16px 0 9px;padding:9px 12px;border-radius:11px;background:#fff7d9;font-weight:900;color:#5f4a00}
.official-group-title.councilor-title{background:#eef5ff;color:#234d7f}
.empty-note.compact{margin-bottom:10px}

/* V1.7.3 */
.official-group-title.councilor-title{margin-top:18px}

/* V1.7.3.1 */
.official-group-title{scroll-margin-top:72px}

/* V1.7.4.8 全台完整性總檢查 */
.nationwide-card{margin-top:16px}
.section-title-row{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.section-title-row h2{margin:0 0 6px}
.nationwide-progress{margin:14px 0}
#nationwideBar{display:block;width:0;height:100%;background:linear-gradient(90deg,#2c7be5,#22a06b);transition:width .3s ease}
.nationwide-card details summary{cursor:pointer}
.nationwide-card table{width:100%;border-collapse:collapse;font-size:14px}
.nationwide-card th,.nationwide-card td{padding:7px 6px;border-bottom:1px solid #e4e8ee;text-align:left}
.nationwide-card h3{margin:16px 0 6px;font-size:15px}
.oktext{color:#18794e;font-weight:700}
@media(max-width:700px){
  .nationwide-card table{font-size:12px}
  .nationwide-card th,.nationwide-card td{padding:5px 3px}
}

/* V1.7.4.9 缺漏自動分類 */
.nationwide-diagnosis{margin-top:16px;padding-top:12px;border-top:1px dashed #cbd5e1}
.diag-row{padding:9px 0;border-bottom:1px solid #edf1f5;line-height:1.6}
.diag-row:last-child{border-bottom:0}

/* V1.7.4.10 地址反推交叉配對 */
.confidence-high{
  display:inline-block;
  margin-left:8px;
  padding:2px 7px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-size:12px;
  font-weight:700;
}

/* V1.7.4.11 安全修正預覽 */
.safe-fix-panel{margin-top:16px;padding-top:12px;border-top:1px solid #dbe3ec}
.safe-count{color:#166534}
.safe-row{border-left:4px solid #22a06b;padding-left:10px}
.blocked-row{border-left:4px solid #dc2626;padding-left:10px}

/* V1.7.4.12 真正缺漏清單 */
.remaining-missing-panel{margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec}
.remaining-count{color:#b45309}
.remaining-county{margin:8px 0;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px;background:#fff}
.remaining-county summary{cursor:pointer}
.remaining-district{padding:8px 4px;border-top:1px dashed #e2e8f0;line-height:1.8}
.village-chip{display:inline-block;margin:3px 4px 3px 0;padding:3px 8px;background:#f1f5f9;border-radius:999px}
.button-link{display:inline-block;text-decoration:none;padding:9px 13px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;font-weight:700}

/* V1.7.4.13 官方核對工作台 */
.official-verify-panel{margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec}
.verify-county{margin:18px 0 8px;padding:8px 10px;background:#eef6ff;border-radius:10px}
.verify-row{margin:7px 0;border:1px solid #dbe3ec;border-radius:10px;padding:8px 10px;background:#fff}
.verify-row summary{cursor:pointer;line-height:1.6}
.verify-priority{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:12px}
.verify-status{float:right;color:#475569;font-size:13px}
.verify-form{padding:12px 2px 4px}
.verify-form label{display:block;margin:8px 0;font-weight:700}
.verify-form input,.verify-form select,.verify-form textarea{width:100%;box-sizing:border-box;margin-top:5px;padding:9px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}
.verify-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.source-hint{padding:9px 10px;background:#f8fafc;border-radius:8px;line-height:1.6}
@media(max-width:700px){
  .verify-two{grid-template-columns:1fr}
  .verify-status{float:none;display:inline-block;margin-left:6px}
}

/* V1.7.4.14 官方補充安全寫入 */
.official-supplement-panel{margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec}

/* V1.7.4.14.1 source_found 批次升級 */
.source-found-upgrade-panel{margin-top:16px;padding-top:12px;border-top:1px solid #dbe3ec}

/* V1.7.4.15 最後收尾 */
.final-closing-panel{margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec}
.final-missing-row{margin:7px 0;padding:8px 10px;border-radius:8px;background:#f8fafc;line-height:1.5}
.final-status{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:999px;font-size:12px;font-weight:700;background:#e2e8f0;color:#334155}
.final-no-current{border-left:4px solid #64748b}
.final-adjusted{border-left:4px solid #f59e0b}
.final-verified{border-left:4px solid #22a06b}
.final-source-found{border-left:4px solid #3b82f6}
.final-manual{border-left:4px solid #8b5cf6}
.final-unverified{border-left:4px solid #ef4444}
.final-error{border-left:4px solid #be123c;background:#fff1f2}
.duplicate-closing-card{margin:12px 0;padding:12px;border:1px solid #f4b4b4;border-radius:10px;background:#fffafa}

/* V1.7.4.15.1 最後分流＋中央里重複封存 */
.duplicate-action-panel,.final-routing-panel{
  margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec
}
.routing-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px
}
.routing-grid>div{
  padding:12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;line-height:1.6
}
.routing-grid b{font-size:22px}
@media(max-width:760px){
  .routing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* V1.7.4.15.2 12筆整合流程 */
.final-routing-panel .actions{display:flex;gap:8px;flex-wrap:wrap}

/* V1.7.4.15.2.1 官方來源缺欄補齊 */
.source-field-fix-panel{
  margin:10px 0 14px;padding:12px;border:1px solid #dbeafe;border-radius:10px;background:#f8fbff
}

/* V1.7.4.16 最後40筆正式分流 */
#finalOperationalClassificationSummary{
  padding:12px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  line-height:1.8;
}

/* V1.7.4.17 最後29筆快速核對 */
.final-29-workspace{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #dbe3ec;
}
.final29-progress-summary{
  margin-top:12px;
  padding:12px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  line-height:1.8;
}
.final29-progress-track{
  height:12px;
  margin-top:10px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
}
.final29-progress-bar{
  height:100%;
  background:#2563eb;
  transition:width .25s ease;
}
.final29-filter{
  margin-top:12px;
  gap:7px;
  flex-wrap:wrap;
}
.county-filter-btn{
  border:1px solid #cbd5e1;
  background:#fff;
  border-radius:999px;
  padding:7px 11px;
  cursor:pointer;
  font-weight:700;
}
.county-filter-btn.active{
  background:#dbeafe;
  border-color:#60a5fa;
  color:#1d4ed8;
}
.final29-row{
  border-left:4px solid #f59e0b;
}
.final29-original-note{
  padding:8px 10px;
  background:#fff7ed;
  border-radius:8px;
}
.final29-complete-card{
  margin-top:12px;
  padding:18px;
  border:1px solid #86efac;
  border-radius:12px;
  background:#f0fdf4;
  color:#166534;
  font-size:18px;
  font-weight:800;
}

/* V1.7.4.17.1 核對完成總檢查 */
.final-verification-audit-panel{
  margin-top:18px;padding-top:14px;border-top:1px solid #dbe3ec
}
.audit-group{
  margin:12px 0;padding:12px;border:1px solid #f59e0b;border-radius:10px;background:#fffaf0
}
.audit-row{
  margin:9px 0;padding:10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;line-height:1.6
}
.audit-row .danger{margin-top:8px}

/* V1.7.4.18 最後已核對資料正式補入 */
.final-supplement-panel{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #dbe3ec;
}

/* V1.7.4.18.1 27筆正式補入按鈕固定顯示 */
.fixed-final-supplement-panel{
  margin-top:18px;
  padding:16px;
  border:2px solid #bfdbfe;
  border-radius:12px;
  background:#f8fbff;
}
.final-supplement-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
#applyFinalVerifiedSupplement{
  display:inline-block !important;
  font-weight:800;
  font-size:16px;
}
#applyFinalVerifiedSupplement:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* V1.7.4.18.2 最後14筆精準診斷 */
.final14-diagnostic-panel{
  margin-top:18px;
  padding:16px;
  border:2px solid #fde68a;
  border-radius:12px;
  background:#fffdf5;
}
.final14-true-issue{
  border-left:5px solid #dc2626 !important;
  background:#fff7f7 !important;
}

/* V1.7.4.18.3 最後1筆安全補入 */
.final-one-chief-panel{
  margin-top:18px;
  padding:16px;
  border:2px solid #86efac;
  border-radius:12px;
  background:#f0fdf4;
}
.final-one-chief-panel .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
#applyFinalOneChief:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* V1.7.4.18.5 那拔里正式名稱校正 */
.final-name-correction-panel{
  margin-top:18px;
  padding:16px;
  border:2px solid #93c5fd;
  border-radius:12px;
  background:#eff6ff;
}
.final-name-correction-panel .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
#applyFinalNameCorrection:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* V1.7.4.18.6 𦰡拔里 NLSC 正式名稱回正 */
.final-nlsc-correction-panel{
  margin-top:18px;
  padding:16px;
  border:2px solid #86efac;
  border-radius:12px;
  background:#f0fdf4;
}
.final-nlsc-correction-panel .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
#applyFinalNlscCorrection:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* V1.7.5 公職人員資料維護中心 */
.official-maintenance-entry{
  text-decoration:none;
  color:inherit;
}
.official-maintenance-body{padding-bottom:40px}
.official-maintenance-main{max-width:1180px;margin:0 auto;padding:18px}
.maintenance-search-grid,.maintenance-editor-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px
}
.maintenance-editor-grid .full{grid-column:1/-1}
.maintenance-results{display:grid;gap:9px;margin-top:14px}
.maintenance-result-card{
  width:100%;text-align:left;border:1px solid #dbe3ec;border-radius:12px;
  background:#fff;padding:12px;cursor:pointer;color:inherit
}
.maintenance-result-card:hover{border-color:#93c5fd;background:#f8fbff}
.maintenance-result-card>div:first-child{display:flex;gap:8px;align-items:center;font-size:18px}
.status-pill{font-size:12px;padding:2px 8px;border-radius:999px;margin-left:6px}
.status-pill.active{background:#dcfce7;color:#166534}
.status-pill.inactive{background:#e5e7eb;color:#475569}
.maintenance-protection{
  margin:10px 0 14px;padding:10px 12px;border-radius:10px;background:#fff7ed;border:1px solid #fed7aa
}
.source-key-box{
  margin-top:14px;padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#f8fafc
}
.source-key-box .mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all;margin-top:5px}
.maintenance-preview{margin-top:14px}
.maintenance-diff{
  display:grid;grid-template-columns:130px minmax(0,1fr) 30px minmax(0,1fr);
  gap:8px;align-items:start;padding:8px 0;border-bottom:1px solid #edf2f7
}
.maintenance-warning,.maintenance-blocked{
  margin-top:10px;padding:10px;border-radius:8px
}
.maintenance-warning{background:#fff7ed;border:1px solid #fed7aa}
.maintenance-blocked{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239}
@media(max-width:820px){
  .maintenance-search-grid,.maintenance-editor-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .official-maintenance-main{padding:10px}
  .maintenance-search-grid,.maintenance-editor-grid{grid-template-columns:1fr}
  .maintenance-editor-grid .full{grid-column:auto}
  .maintenance-diff{grid-template-columns:1fr}
}

/* V1.7.5.1 同人重複資料比對 / 合併 */
.duplicate-maintenance-panel{
  margin-top:20px;padding-top:16px;border-top:2px solid #e2e8f0
}
.duplicate-card{
  margin-top:10px;padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#fff
}
.duplicate-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.source-type-pill,.recommended-pill{
  display:inline-block;font-size:12px;border-radius:999px;padding:2px 8px;margin-left:5px
}
.source-type-pill{background:#e0f2fe;color:#075985}
.recommended-pill{background:#dcfce7;color:#166534}
.choose-current-master{margin:8px 8px 0 0}
.merge-direction{
  display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;
  padding:12px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff
}
.merge-arrow{font-weight:800;text-align:center}
.merge-preview-box{
  padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#f8fafc
}
@media(max-width:620px){
  .duplicate-card-head{display:block}
  .merge-direction{grid-template-columns:1fr}
  .merge-arrow{transform:rotate(90deg)}
}

/* V1.7.5.2 村里完整性例外管理 */
.exception-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#fff;margin-top:8px}.inactive-exception{opacity:.6;background:#f8fafc}.exception-type-pill{display:inline-block;font-size:12px;padding:2px 8px;border-radius:999px;background:#ede9fe;color:#5b21b6;margin-left:6px}@media(max-width:620px){.exception-row{display:block}.exception-row button{margin-top:8px}}

/* V1.7.5.2.1 全台完整性例外統計整合 */
.operational-integrity-summary{
  margin:14px 0;
  padding:14px 16px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#f8fbff;
}
.operational-integrity-head{
  font-size:18px;
  margin-bottom:8px;
}
.operational-integrity-head.healthy{color:#166534}
.operational-integrity-head.warning{color:#9a3412}
.operational-integrity-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  font-size:16px;
}
.operational-integrity-stats span{
  white-space:nowrap;
}

/* V1.7.5.2.1.1 同步頁精簡 */
.legacy-sync-tools{
  display:none !important;
}
.operational-integrity-fixed{
  display:block !important;
  margin-top:14px !important;
  border:2px solid #93c5fd;
  background:#f8fbff;
}
.operational-integrity-fixed .operational-integrity-head{
  font-size:20px;
}
.current-maintenance-actions{
  margin-top:12px;
}
.current-maintenance-link{
  display:inline-block;
  text-decoration:none;
  font-weight:800;
  padding:11px 15px;
  border-radius:12px;
  background:#eef4ff;
  color:#174f9f;
}
.current-maintenance-link:hover{
  background:#e0ecff;
}


/* V1.7.6.11｜公司總管理服務類別管理 */
.service-category-create{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 120px auto;
  gap:10px;
  margin:14px 0 8px;
  align-items:center;
}
.service-category-list{display:grid;gap:10px;margin-top:14px}
.service-category-row{
  border:1px solid #dbe5f1;
  border-radius:16px;
  padding:14px;
  background:#fff;
}
.service-category-disabled{background:#f8fafc;opacity:.75}
.service-category-main{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:12px;align-items:center}
.service-category-main input{font-weight:800}
.service-category-meta{font-size:13px;color:#64748b;white-space:nowrap}
.service-category-controls{
  display:grid;
  grid-template-columns:110px 100px auto auto;
  gap:8px;
  margin-top:10px;
  align-items:end;
}
.service-category-controls label{font-size:12px;color:#64748b}
.service-category-controls label input[type=number]{margin-top:4px}
.service-category-toggle{
  min-height:48px;
  display:flex!important;
  align-items:center;
  gap:7px;
  font-size:14px!important;
  color:#273750!important;
}
.service-category-toggle input{width:auto;min-height:0}
.service-category-protect{margin-top:8px;color:#9a6700}
@media(max-width:700px){
  .service-category-create{grid-template-columns:1fr 100px}
  .service-category-create .primary{grid-column:1/-1}
  .service-category-main{grid-template-columns:1fr}
  .service-category-meta{white-space:normal}
  .service-category-controls{grid-template-columns:1fr 1fr}
  .service-category-controls button{width:100%}
}


/* V1.7.6.12｜現任里長／議員開通服務帳號 */
.current-official-search{
  display:grid;
  grid-template-columns:170px minmax(240px,1fr) auto auto;
  gap:10px;
  align-items:center;
  margin:14px 0 8px;
}
.current-official-results{display:grid;gap:10px;margin-top:12px}
.official-open-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:76px;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.official-open-chip.opened{background:#e8f6ed;color:#176b38;border:1px solid #b8dfc6}
.official-open-chip.not-opened{background:#fff6df;color:#8a5a00;border:1px solid #efd18a}
.current-official-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.current-official-meta>div{
  border:1px solid #e5ebf3;
  border-radius:12px;
  padding:10px;
  display:grid;
  gap:4px;
}
.current-official-meta span{font-size:12px;color:#64748b}
.current-official-activate-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.current-official-activate-grid .full{grid-column:1/-1}
.current-official-activate-grid label{display:block;font-size:13px;font-weight:800;margin-bottom:5px}
.official-activate-btn{margin-top:12px}
.already-opened-box{
  background:#f1f8f4;
  border:1px solid #c8e4d2;
  border-radius:14px;
  padding:12px;
  display:grid;
  gap:6px;
}
.already-opened-box .ghost{justify-self:start;margin-top:4px}
@media(max-width:760px){
  .current-official-search{grid-template-columns:1fr 1fr}
  .current-official-search input{grid-column:1/-1}
  .current-official-search button{width:100%}
  .current-official-meta{grid-template-columns:1fr}
  .current-official-activate-grid{grid-template-columns:1fr}
  .current-official-activate-grid .full{grid-column:auto}
}


/* V1.7.6.13｜期間服務成果查詢 */
.service-results-entry-card{margin-top:14px}
.service-results-entry-card .section-title-row{align-items:center}
.service-results-head .ghost{margin-bottom:10px}
.service-result-presets{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0;
}
.service-result-preset{
  border:1px solid #cbd5e1;
  background:#fff;
  border-radius:999px;
  padding:9px 13px;
  font-weight:800;
  cursor:pointer;
}
.service-result-preset.active{
  background:#1d4ed8;
  color:#fff;
  border-color:#1d4ed8;
}
.service-result-extra{
  max-width:240px;
  margin:8px 0 12px;
}
.service-result-custom{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:8px 0 12px;
}
.service-result-filter-row{
  display:grid;
  grid-template-columns:minmax(200px,1fr) auto;
  gap:10px;
  align-items:end;
}
.service-result-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.service-result-bars{display:grid;gap:12px;margin-top:10px}
.service-result-bar-row{display:grid;gap:6px}
.service-result-bar-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.service-result-bar-title span{font-size:13px;color:#64748b;text-align:right}
.service-result-bar-track{
  width:100%;
  height:12px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
}
.service-result-bar-fill{
  height:100%;
  border-radius:999px;
  background:currentColor;
  color:#2563eb;
  opacity:.82;
}
.service-result-location-list{display:grid;gap:8px;margin-top:10px}
.service-result-location-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 12px;
}
.service-result-photo-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin:10px 0;
}
.service-result-photo-strip img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #e5e7eb;
}
@media(max-width:760px){
  .service-results-entry-card .section-title-row{align-items:stretch}
  .service-results-entry-card .primary{width:100%}
  .service-result-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-result-custom{grid-template-columns:1fr}
  .service-result-filter-row{grid-template-columns:1fr}
  .service-result-filter-row .primary{width:100%}
  .service-result-photo-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* V1.7.6.13.1｜公司總管理服務成果代查 */
.master-service-result-search{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto auto;
  gap:10px;
  margin:14px 0 8px;
}
.master-service-result-targets{display:grid;gap:8px;margin-top:12px}
.master-service-result-target{
  width:100%;
  border:1px solid #dbe4ef;
  border-radius:14px;
  background:#fff;
  padding:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}
.master-service-result-target>div{display:grid;gap:4px}
.master-service-result-target b{font-size:16px}
.master-service-result-target span{font-size:12px;color:#64748b}
.master-service-result-presets{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.master-service-result-preset{
  border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:9px 13px;font-weight:800;cursor:pointer
}
.master-service-result-preset.active{background:#1d4ed8;color:#fff;border-color:#1d4ed8}
.master-service-result-custom{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 12px
}
.master-service-result-filter{
  display:grid;grid-template-columns:minmax(200px,1fr) auto;gap:10px;align-items:end;margin-top:10px
}
.master-service-result-summary-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px
}
.master-service-result-bars{display:grid;gap:12px;margin-top:10px}
.master-service-result-bar-row{display:grid;gap:6px}
.master-service-result-bar-title{display:flex;justify-content:space-between;gap:12px}
.master-service-result-bar-title span{font-size:13px;color:#64748b}
.master-service-result-bar-track{width:100%;height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden}
.master-service-result-bar-fill{height:100%;background:#2563eb;border-radius:999px}
.master-service-result-location-row{
  display:flex;justify-content:space-between;gap:12px;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;margin-top:8px
}
.master-service-result-photo-strip{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0
}
.master-service-result-photo-strip img{
  width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px;border:1px solid #e5e7eb
}
@media(max-width:760px){
  .master-service-result-search{grid-template-columns:1fr 1fr}
  .master-service-result-search input{grid-column:1/-1}
  .master-service-result-search button{width:100%}
  .master-service-result-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .master-service-result-custom{grid-template-columns:1fr}
  .master-service-result-filter{grid-template-columns:1fr}
  .master-service-result-filter .primary{width:100%}
  .master-service-result-photo-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* V1.7.6.14｜服務成果成績單 */
.service-result-summary-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.scorecard-source-hidden{display:none!important}
.service-scorecard-shell{margin-top:14px}
.service-scorecard-toolbar{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.service-scorecard{
  width:min(100%,980px);
  margin:0 auto;
  background:#fff;
  border:1px solid #dbe4ef;
  border-radius:22px;
  padding:28px;
  box-shadow:0 12px 36px rgba(15,23,42,.08);
}
.service-scorecard-header{
  text-align:center;
  border-bottom:2px solid #1e3a8a;
  padding-bottom:18px;
  margin-bottom:20px;
}
.service-scorecard-kicker{
  font-size:14px;
  font-weight:900;
  letter-spacing:.08em;
  color:#475569;
}
.service-scorecard-header h1{
  margin:8px 0 6px;
  font-size:32px;
  line-height:1.25;
}
.service-scorecard-period{
  font-size:15px;
  color:#64748b;
  font-weight:700;
}
.service-scorecard-bigstats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0 24px;
}
.service-scorecard-bigstats>div{
  border:1px solid #dbe4ef;
  border-radius:16px;
  padding:16px 10px;
  text-align:center;
  background:#f8fafc;
}
.service-scorecard-bigstats b{
  display:block;
  font-size:30px;
  line-height:1;
  margin-bottom:7px;
  color:#0f172a;
}
.service-scorecard-bigstats span{
  font-size:13px;
  font-weight:800;
  color:#475569;
}
.service-scorecard-block{
  margin-top:22px;
  break-inside:avoid;
}
.service-scorecard-block h2{
  font-size:19px;
  margin:0 0 12px;
  padding-left:10px;
  border-left:5px solid #1d4ed8;
}
.service-scorecard-category-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.service-scorecard-category-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:12px;
}
.service-scorecard-category-item small{color:#64748b}
.service-scorecard-month-list{display:grid;gap:9px}
.service-scorecard-month-item>div:first-child{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:4px;
}
.service-scorecard-month-item span{color:#64748b;font-size:13px}
.service-scorecard-month-track{
  height:10px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
}
.service-scorecard-month-track i{
  display:block;
  height:100%;
  background:#2563eb;
  border-radius:999px;
}
.service-scorecard-location-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.service-scorecard-location-list>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:12px;
}
.service-scorecard-representative{display:grid;gap:10px}
.service-scorecard-representative article{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:12px;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
}
.service-scorecard-rep-no{
  width:42px;height:42px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#eff6ff;color:#1d4ed8;font-weight:900;
}
.service-scorecard-representative h3{margin:0 0 4px;font-size:16px}
.service-scorecard-rep-meta{font-size:12px;color:#64748b;margin-bottom:6px}
.service-scorecard-representative p{margin:0;line-height:1.55}
.service-scorecard-photo-wall{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.service-scorecard-photo-wall img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #e2e8f0;
}
.service-scorecard-footer{
  margin-top:24px;
  padding-top:12px;
  border-top:1px solid #cbd5e1;
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#64748b;
  font-size:11px;
}
@media(max-width:760px){
  .service-result-summary-actions{width:100%;justify-content:space-between}
  .service-scorecard-toolbar{display:grid;grid-template-columns:1fr 1fr}
  .service-scorecard-toolbar button{width:100%}
  .service-scorecard{padding:18px 14px;border-radius:16px}
  .service-scorecard-header h1{font-size:25px}
  .service-scorecard-bigstats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-scorecard-category-list{grid-template-columns:1fr}
  .service-scorecard-location-list{grid-template-columns:1fr}
  .service-scorecard-photo-wall{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media print{
  body *{visibility:hidden!important}
  .service-scorecard-shell,.service-scorecard-shell *{visibility:visible!important}
  .service-scorecard-shell{
    position:absolute;
    left:0;top:0;width:100%;
    margin:0!important;padding:0!important;
  }
  .service-scorecard-toolbar{display:none!important}
  .service-scorecard{
    width:100%!important;
    max-width:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    padding:8mm!important;
  }
  .service-scorecard-block,.service-scorecard-representative article,.service-scorecard-photo-wall{
    break-inside:avoid;
    page-break-inside:avoid;
  }
}


/* V1.7.6.15.2｜成果展示網址產生面板 */
.service-display-panel{border:1px solid #bfd5ff;background:#f8fbff}
.service-display-create-row{
  display:grid;
  grid-template-columns:minmax(180px,260px) auto;
  gap:10px;
  align-items:end;
  margin-top:12px;
}
.service-display-create-row label{font-size:13px;font-weight:800}
.service-display-create-row select{margin-top:5px}
.service-display-ready{
  margin-top:14px;
  padding:14px;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:14px;
}
.service-display-url-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.service-display-url-row input{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px;
}
.service-display-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
@media(max-width:700px){
  .service-display-create-row{grid-template-columns:1fr}
  .service-display-create-row button{width:100%}
  .service-display-url-row{grid-template-columns:1fr}
  .service-display-url-row button{width:100%}
  .service-display-actions{display:grid;grid-template-columns:1fr}
  .service-display-actions button{width:100%}
}


/* V1.7.6.15.1｜多樣式＋自訂背景音樂 */
.service-display-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.service-display-settings-grid label{
  display:block;
  font-size:13px;
  font-weight:800;
}
.service-display-settings-grid select,
.service-display-settings-grid input[type=file]{
  margin-top:5px;
}
.service-display-settings-grid input[type=range]{
  width:calc(100% - 48px);
  vertical-align:middle;
  margin-top:12px;
}
.service-display-settings-grid label>span{
  display:inline-block;
  width:42px;
  text-align:right;
  font-weight:900;
}
.service-display-music-field{grid-column:1/-1}
.service-display-create-submit{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}
@media(max-width:700px){
  .service-display-settings-grid{grid-template-columns:1fr}
  .service-display-music-field{grid-column:auto}
  .service-display-create-submit button{width:100%}
}


/* V1.7.6.15.2｜已建立展示網址管理 */
.service-display-management-entry{border:1px solid #d7e3f5}
.service-display-management-box{margin-top:12px}
.service-display-management-list{display:grid;gap:10px;margin-top:10px}
.service-display-manage-card{
  border:1px solid #dbe4ef;
  border-radius:16px;
  background:#fff;
  padding:14px;
}
.service-display-manage-card.is-disabled{
  background:#f8fafc;
  opacity:.78;
}
.service-display-manage-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.service-display-manage-head>div{display:grid;gap:4px}
.service-display-manage-head b{font-size:16px}
.service-display-manage-head span{font-size:12px;color:#64748b}
.service-display-manage-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px 14px;
  margin-top:10px;
  color:#475569;
  font-size:13px;
}
.service-display-manage-url{
  margin-top:10px;
  padding:9px 10px;
  border-radius:10px;
  background:#f1f5f9;
  color:#334155;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;
  overflow-wrap:anywhere;
}
.service-display-manage-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}
@media(max-width:700px){
  .service-display-manage-head{display:grid}
  .service-display-manage-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .service-display-manage-actions button{width:100%}
}


/* V1.7.6.17｜里長／議員線上申請加入 */
.join-apply-entry-card{
  max-width:680px;
  margin:12px auto 24px;
  border:1px solid #d7e3f5;
  background:#fbfdff;
}
.join-apply-entry-head{
  display:flex;justify-content:space-between;align-items:center;gap:12px
}
.join-apply-entry-head h2{margin:0 0 5px;font-size:18px}
.join-apply-entry-head p{margin:0;color:#64748b;font-size:13px;line-height:1.5}
.join-apply-form-box{margin-top:16px;padding-top:15px;border-top:1px solid #e2e8f0}
.join-apply-form-title{font-size:19px;font-weight:900;margin-bottom:5px}
.join-apply-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:13px 0
}
.join-apply-grid label,.join-apply-form-box>label{font-size:13px;font-weight:800}
.join-apply-grid label b,.join-apply-consent b{color:#dc2626}
.join-apply-grid input,.join-apply-grid select,.join-apply-form-box textarea{margin-top:5px}
.join-apply-consent{
  display:flex!important;gap:9px;align-items:flex-start;margin-top:12px;font-weight:700!important
}
.join-apply-consent input{width:auto!important;margin-top:2px}
.join-apply-actions{display:flex;gap:8px;margin-top:14px}
.join-honeypot{position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;opacity:0!important}
.join-apply-success{
  margin-top:10px;padding:12px;border-radius:12px;background:#ecfdf5;border:1px solid #a7f3d0;color:#166534;font-weight:900
}
.join-apply-success span{font-weight:600;font-size:13px}

.join-application-stats{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0
}
.join-application-stats>div{
  padding:12px;border:1px solid #dbe4ef;border-radius:13px;background:#f8fafc;text-align:center
}
.join-application-stats b{display:block;font-size:24px}
.join-application-stats span{font-size:12px;color:#64748b}
.join-application-filters{
  display:grid;grid-template-columns:180px minmax(220px,1fr) auto auto;gap:8px;margin:12px 0
}
.join-application-list{display:grid;gap:10px;margin-top:12px}
.join-application-card{border:1px solid #dbe4ef;border-radius:16px;padding:14px;background:#fff}
.join-application-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.join-application-head>div{display:grid;gap:4px}
.join-application-head>div>b{font-size:16px}
.join-application-head>div>span{font-size:12px;color:#64748b}
.join-application-details{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px;margin-top:12px
}
.join-application-details>div{display:grid;grid-template-columns:80px minmax(0,1fr);gap:6px;font-size:13px}
.join-application-details b{color:#475569}
.join-application-message{margin-top:12px;padding:10px;background:#f8fafc;border-radius:11px}
.join-application-message p{white-space:pre-wrap;margin:5px 0 0;line-height:1.55}
.join-application-edit{
  display:grid;grid-template-columns:180px minmax(220px,1fr) auto;gap:9px;align-items:end;margin-top:12px
}
.join-application-edit label{font-size:12px;font-weight:800}
.join-application-edit select,.join-application-edit textarea{margin-top:5px}
.join-telegram-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px
}
.join-telegram-grid label{font-size:13px;font-weight:800}
.join-telegram-grid input{margin-top:5px}
.join-telegram-actions{display:flex;gap:8px;margin-top:12px}
@media(max-width:760px){
  .join-apply-entry-head{display:grid}
  .join-apply-entry-head button{width:100%}
  .join-apply-grid{grid-template-columns:1fr}
  .join-apply-actions{display:grid;grid-template-columns:1fr}
  .join-apply-actions button{width:100%}
  .join-application-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .join-application-filters{grid-template-columns:1fr 1fr}
  .join-application-filters input{grid-column:1/-1}
  .join-application-filters button{width:100%}
  .join-application-details{grid-template-columns:1fr}
  .join-application-edit{grid-template-columns:1fr}
  .join-application-edit button{width:100%}
  .join-telegram-grid{grid-template-columns:1fr}
  .join-telegram-actions{display:grid;grid-template-columns:1fr}
  .join-telegram-actions button{width:100%}
}


/* V1.7.6.17.2｜新申請紅點提醒＋首頁待處理提示 */
.master-more-icon-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.join-pending-badge{
  position:absolute;
  top:-8px;
  right:-13px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  border:2px solid #fff;
  font-style:normal;
  font-size:10px;
  line-height:15px;
  font-weight:900;
  text-align:center;
  box-shadow:0 3px 9px rgba(220,38,38,.28);
}
.join-pending-badge.inline{
  position:static;
  min-width:22px;
  height:22px;
  line-height:18px;
  margin-left:auto;
  font-size:11px;
}
.join-applications-more-item{
  display:flex!important;
  align-items:center;
  width:100%;
}
.join-applications-more-item b{margin-right:8px}

.join-pending-home-alert{
  border:2px solid #fecaca;
  background:linear-gradient(135deg,#fff7f7,#fff);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.join-pending-home-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.join-pending-home-icon{
  width:52px;
  height:52px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:27px;
  background:#fee2e2;
}
.join-pending-home-eyebrow{
  color:#dc2626;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  margin-bottom:3px;
}
.join-pending-home-alert h2{
  margin:0;
  font-size:18px;
  line-height:1.4;
}
.join-pending-home-alert h2 b{
  color:#dc2626;
  font-size:24px;
}
.join-pending-home-alert p{
  margin:4px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.5;
}
@media(max-width:700px){
  .join-pending-home-alert{
    display:grid;
  }
  .join-pending-home-alert>button{
    width:100%;
  }
  .join-pending-home-main{
    align-items:flex-start;
  }
}


/* =========================================================
   V1.7.6.18｜首頁附近公共服務導航版
   ========================================================= */
.result-data-note{
  margin-top:18px;
  padding:12px 14px;
  border-radius:13px;
  border:1px solid #dbe5f1;
  background:#f8fafc;
  display:grid;
  gap:4px;
}
.result-data-note b{font-size:14px;color:#334155}
.result-data-note span{font-size:12px;color:#64748b;line-height:1.55}

.nearby-services-card{
  border:1px solid #d9e6f5;
  background:linear-gradient(180deg,#ffffff,#fbfdff);
}
.nearby-services-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:13px;
}
.nearby-services-head h2{margin:0 0 4px}
.nearby-services-head .hint{margin:0;line-height:1.55}
.nearby-location-btn{
  flex:0 0 auto;
  white-space:nowrap;
  min-height:44px;
}
.nearby-location-status{
  margin:0 0 13px;
  padding:10px 12px;
  border-radius:12px;
  background:#f1f5f9;
  border:1px solid #dbe4ef;
  color:#475569;
  font-size:13px;
  line-height:1.5;
}
.nearby-location-status.ok{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#166534;
}
.nearby-location-status.warn{
  background:#fffbeb;
  border-color:#fde68a;
  color:#92400e;
}
.nearby-service-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:11px;
}
.nearby-service-item{
  width:100%;
  min-width:0;
  min-height:92px;
  border:1px solid #dce6f1;
  border-radius:17px;
  background:#fff;
  padding:14px 13px;
  cursor:pointer;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 18px;
  gap:10px;
  align-items:center;
  text-align:left;
  color:#172033;
  box-shadow:0 5px 16px rgba(30,55,90,.05);
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.nearby-service-item:hover{
  transform:translateY(-2px);
  border-color:#a9c6eb;
  box-shadow:0 9px 24px rgba(30,55,90,.09);
}
.nearby-service-item:active{transform:translateY(0)}
.nearby-service-icon{
  width:48px;
  height:48px;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:27px;
  background:#eff6ff;
}
.nearby-service-item.police .nearby-service-icon{background:#eaf3ff}
.nearby-service-item.office .nearby-service-icon{background:#fff7df}
.nearby-service-item.fire .nearby-service-icon{background:#fff0f0}
.nearby-service-item.hospital .nearby-service-icon{background:#ecfdf5}
.nearby-service-item.household .nearby-service-icon{background:#f3e8ff}
.nearby-service-item.health .nearby-service-icon{background:#ecfeff}
.nearby-service-item.gas .nearby-service-icon{background:#fff7ed}
.nearby-service-item.convenience .nearby-service-icon{background:#f0fdf4}
.nearby-service-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.nearby-service-copy b{
  font-size:16px;
  line-height:1.3;
}
.nearby-service-copy small{
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.nearby-service-arrow{
  font-size:28px;
  color:#94a3b8;
  font-weight:400;
  text-align:right;
}
.nearby-service-note{
  margin-top:13px;
  padding-top:11px;
  border-top:1px dashed #dbe4ef;
  color:#64748b;
  font-size:12px;
  line-height:1.55;
}
@media(max-width:850px){
  .nearby-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .nearby-services-head{display:grid}
  .nearby-location-btn{width:100%}
  .nearby-service-grid{grid-template-columns:1fr}
  .nearby-service-item{
    min-height:80px;
    grid-template-columns:46px minmax(0,1fr) 16px;
    padding:12px;
  }
  .nearby-service-icon{
    width:46px;
    height:46px;
    font-size:25px;
  }
  .nearby-service-copy b{font-size:16px}
}


/* V1.7.6.18.3｜首頁提示精簡＋所屬議員預設收合 */
#areaStatus:empty{display:none!important}

.councilor-collapse{
  grid-column:1/-1;
  margin-top:4px;
}
.councilor-collapse>summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  user-select:none;
  -webkit-user-select:none;
}
.councilor-collapse>summary::-webkit-details-marker{display:none}
.councilor-collapse-arrow{
  font-size:22px;
  line-height:1;
  transition:transform .18s ease;
}
.councilor-collapse[open] .councilor-collapse-arrow{
  transform:rotate(180deg);
}
.councilor-collapse-body{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
  margin-top:10px;
}
.councilor-collapse .official-group-title.councilor-title{
  margin-top:18px;
  margin-bottom:0;
}
@media(max-width:700px){
  .councilor-collapse-body{
    grid-template-columns:1fr;
  }
  .councilor-collapse>summary{
    padding-right:10px;
  }
}

/* ============================================================
   V1.7.7.3.1｜服務後台公告頁手機欄位防橫向溢出
   ============================================================ */
.service-admin-body,
.service-admin-main,
.service-shell,
.service-tab,
#tabAnnouncement,
#tabAnnouncement > .card,
#publicProfileForm,
.public-profile-edit-grid{
  min-width:0;
  max-width:100%;
}
#tabAnnouncement > .card,
#publicProfileForm,
.public-profile-edit-grid,
.public-profile-edit-grid > div{
  box-sizing:border-box;
}
.public-profile-edit-grid{
  width:100%;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
.public-profile-edit-grid > div{
  min-width:0;
  max-width:100%;
}
.public-profile-edit-grid input,
.public-profile-edit-grid select,
.public-profile-edit-grid textarea{
  display:block;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
#publicProfileForm{
  overflow-x:hidden;
}
@media(max-width:820px){
  .public-profile-edit-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
  .public-profile-edit-grid .full{
    grid-column:auto !important;
  }
}

/* ============================================================
   V1.7.7.3.3｜手機「查看公開頁」全畫面預覽
   ============================================================ */
.public-page-preview-overlay{
  position:fixed;
  inset:0;
  z-index:100000;
  background:#fff;
  display:flex;
  flex-direction:column;
}
.public-page-preview-overlay.hidden{
  display:none !important;
}
.public-page-preview-toolbar{
  flex:0 0 auto;
  min-height:58px;
  padding:8px 10px;
  padding-top:max(8px,env(safe-area-inset-top));
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  background:#fff;
  border-bottom:1px solid #dbe3ec;
  box-shadow:0 1px 8px rgba(15,23,42,.08);
}
.public-page-preview-toolbar b{
  text-align:center;
  font-size:16px;
  white-space:nowrap;
}
.public-page-preview-back,
.public-page-preview-browser{
  min-height:42px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#0f172a;
  font-weight:800;
  padding:8px 10px;
}
.public-page-preview-back{
  background:#e8f5ee;
  border-color:#b7ddc8;
}
.public-page-preview-frame{
  flex:1 1 auto;
  width:100%;
  min-width:0;
  height:100%;
  border:0;
  background:#fff;
}
body.public-preview-open{
  overflow:hidden !important;
}
@media(max-width:420px){
  .public-page-preview-toolbar{
    grid-template-columns:auto 1fr auto;
    gap:5px;
    padding-left:6px;
    padding-right:6px;
  }
  .public-page-preview-toolbar b{
    font-size:14px;
  }
  .public-page-preview-back,
  .public-page-preview-browser{
    font-size:13px;
    padding:7px 8px;
  }
}



/* ============================================================
   V1.7.7.3.5｜跑馬燈速度即時預覽
   ============================================================ */
@keyframes marqueeAdminPreview{
  from{transform:translateX(100%)}
  to{transform:translateX(-110%)}
}
#publicMarqueePreview{
  overflow:hidden !important;
  position:relative;
}
#publicMarqueePreviewText{
  display:inline-block;
  white-space:nowrap;
  will-change:transform;
}


/* V1.7.7.4｜服務紀錄編輯 */
.service-post-edit-overlay{position:fixed;inset:0;z-index:120000;background:rgba(15,23,42,.55);padding:16px;overflow:auto}
.service-post-edit-overlay.hidden{display:none!important}
.service-post-edit-panel{width:min(760px,100%);margin:0 auto 90px;background:#fff;border-radius:18px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.28);box-sizing:border-box}
.service-post-edit-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.service-post-edit-head h2{margin:0 0 4px}
.service-post-edit-panel input,.service-post-edit-panel textarea,.service-post-edit-panel select{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.service-post-edit-photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0 12px}
.service-post-edit-photo{position:relative;min-width:0;border-radius:12px;overflow:hidden;border:2px solid transparent;background:#f1f5f9}
.service-post-edit-photo img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.service-post-edit-photo button{width:100%;border:0;border-top:1px solid #e2e8f0;padding:8px 4px;background:#fff;color:#b42318;font-weight:800}
.service-post-edit-photo.is-removed{opacity:.48;border-color:#ef4444}
.service-post-edit-photo.is-removed img{filter:grayscale(1)}
.service-post-edit-photo.is-removed button{color:#166534}
.service-post-edit-note{margin-top:14px;padding:10px 12px;border-radius:10px;background:#ecfdf5;color:#166534;font-weight:700}
.service-post-edit-actions{display:flex;gap:10px;margin-top:14px}
.service-post-edit-actions button{flex:1}
body.service-post-edit-open{overflow:hidden!important}
@media(max-width:640px){
  .service-post-edit-overlay{padding:0;background:#fff}
  .service-post-edit-panel{width:100%;min-height:100vh;margin:0;border-radius:0;padding:14px 14px 96px}
  .service-post-edit-head{position:sticky;top:0;z-index:3;background:#fff;padding:6px 0 10px}
  .service-post-edit-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* ============================================================
   V1.7.7.6.2｜首頁公司資訊＋隱私權／條款／資料來源 Footer
   ============================================================ */
.tls-public-footer{
  margin-top:34px;
  background:#172033;
  color:#e5edf8;
  border-top:4px solid #2563eb;
}
.tls-public-footer-inner{
  width:min(1100px,calc(100% - 28px));
  margin:0 auto;
  padding:28px 0 22px;
}
.tls-footer-main{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);
  gap:28px;
  align-items:start;
}
.tls-footer-brand strong{
  display:block;
  font-size:22px;
  margin-bottom:8px;
  color:#fff;
}
.tls-footer-brand p{
  margin:0;
  color:#cbd5e1;
  line-height:1.7;
}
.tls-footer-company{
  line-height:1.8;
  font-size:15px;
}
.tls-footer-company b{
  display:block;
  color:#fff;
  font-size:17px;
  margin-bottom:4px;
}
.tls-public-footer a{
  color:#dbeafe;
  text-decoration:none;
}
.tls-public-footer a:hover{
  text-decoration:underline;
}
.tls-footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.14);
  font-weight:700;
}
.tls-footer-links span{
  color:#64748b;
}
.tls-footer-disclaimer{
  margin-top:14px;
  padding:11px 13px;
  border-radius:10px;
  background:rgba(255,255,255,.07);
  color:#cbd5e1;
  line-height:1.65;
  font-size:14px;
}
.tls-footer-copy{
  margin-top:14px;
  color:#94a3b8;
  font-size:13px;
}
.tls-public-footer.compact{
  margin-top:24px;
}
.tls-public-footer.compact .tls-public-footer-inner{
  padding-top:18px;
}
.tls-public-footer.compact .tls-footer-links{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
.tls-info-page{
  background:#f7f9fc;
}
.tls-info-main{
  width:min(900px,calc(100% - 28px));
  margin:22px auto 40px;
}
.tls-info-card{
  padding:26px;
}
.tls-info-card h1{
  margin-top:0;
  font-size:30px;
}
.tls-info-lead{
  color:#475569;
  font-size:17px;
  line-height:1.7;
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}
.tls-info-card section{
  margin-top:24px;
}
.tls-info-card section h2{
  font-size:20px;
  margin-bottom:8px;
}
.tls-info-card section p{
  line-height:1.85;
  color:#334155;
}
.tls-info-updated{
  margin-top:28px;
  padding-top:14px;
  border-top:1px solid #e2e8f0;
  color:#64748b;
  font-size:13px;
}

@media(max-width:720px){
  .tls-public-footer-inner{
    width:min(100% - 24px,1100px);
    padding:22px 0 18px;
  }
  .tls-footer-main{
    grid-template-columns:1fr;
    gap:18px;
  }
  .tls-footer-links{
    font-size:15px;
    gap:5px;
  }
  .tls-footer-disclaimer{
    font-size:13px;
  }
  .tls-info-main{
    width:calc(100% - 20px);
    margin-top:12px;
  }
  .tls-info-card{
    padding:18px;
  }
  .tls-info-card h1{
    font-size:25px;
  }
}

/* V1.7.7.6.12｜公司副管理者帳號＋分級權限＋QR/NFC工作中心 */
.master-login-account{margin-bottom:10px}
.master-login-note{margin-top:8px;padding:9px 11px;border-radius:11px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12px;color:#64748b;line-height:1.55}
.master-identity-badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eef5ff;color:#1d4ed8;border:1px solid #cfe0ff;font-size:12px;font-weight:900}
.company-admin-create-grid{display:grid;grid-template-columns:1fr 1fr 1fr 160px;gap:10px;align-items:end}
.company-admin-permissions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.company-admin-permission{display:flex!important;align-items:flex-start;gap:8px;padding:10px;border:1px solid #dbe5f1;border-radius:12px;background:#f8fafc;font-size:13px!important;font-weight:800!important}
.company-admin-permission input{width:auto!important;min-height:0!important;margin-top:2px}
.company-admin-list{display:grid;gap:10px;margin-top:14px}
.company-admin-card{border:1px solid #dbe5f1;border-radius:16px;background:#fff;padding:14px}
.company-admin-card.is-disabled{opacity:.68;background:#f8fafc}
.company-admin-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.company-admin-card-head span{color:#64748b;font-size:13px}
.company-admin-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}
.company-admin-meta>div{padding:9px 10px;border-radius:10px;background:#f8fafc;border:1px solid #e5eaf1}
.company-admin-meta span{display:block;color:#64748b;font-size:11px}
.company-admin-meta b{display:block;margin-top:3px;overflow-wrap:anywhere}
.company-admin-edit-grid{display:grid;grid-template-columns:1fr 1fr 160px;gap:8px;margin-top:10px}
.company-admin-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.staff-force-password-card{max-width:560px;margin:24px auto}
.staff-force-password-grid{display:grid;gap:10px}
.permission-hidden{display:none!important}
@media(max-width:760px){.company-admin-create-grid,.company-admin-edit-grid{grid-template-columns:1fr}.company-admin-permissions{grid-template-columns:1fr 1fr}.company-admin-meta{grid-template-columns:1fr}}
@media(max-width:430px){.company-admin-permissions{grid-template-columns:1fr}}


/* V1.7.7.6.12.1｜最高管理者登入模式修正版 */
.master-login-mode{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:12px;
}
.master-login-mode button{
  border:1px solid #d5dfec;
  border-radius:12px;
  padding:11px 10px;
  background:#f8fafc;
  color:#475569;
  font-weight:900;
  cursor:pointer;
}
.master-login-mode button.active{
  background:#1769e0;
  color:#fff;
  border-color:#1769e0;
}
.master-login-account-wrap.hidden{display:none!important}


/* =========================================================
   V1.7.7.6.12.2｜公司成果展示製作中心完整版
   ========================================================= */
.display-center-shell{display:grid;gap:16px}
.display-center-search{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:9px;
  align-items:center;
}
.display-center-target-list{display:grid;gap:8px;margin-top:10px}
.display-center-target{
  width:100%;
  text-align:left;
  border:1px solid #dbe5f1;
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.display-center-target:hover{background:#f8fbff;border-color:#9fc4f5}
.display-center-target b{display:block;font-size:16px}
.display-center-target span{display:block;margin-top:3px;color:#64748b;font-size:12px}
.display-center-selected{
  padding:13px 14px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:14px;
}
.display-center-query-grid{
  display:grid;
  grid-template-columns:190px 190px 1fr auto;
  gap:9px;
  align-items:end;
}
.display-center-custom{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:9px;
}
.display-center-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.display-center-summary>div{
  text-align:center;
  padding:12px 8px;
  border:1px solid #dbe5f1;
  border-radius:13px;
  background:#f8fafc;
}
.display-center-summary b{display:block;font-size:25px}
.display-center-summary span{font-size:12px;color:#64748b}
.display-center-posts{display:grid;gap:9px;margin-top:10px}
.display-center-post{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  padding:12px;
  border:1px solid #dbe5f1;
  border-radius:14px;
  background:#fff;
}
.display-center-post input[type=checkbox]{width:22px;min-height:22px;margin-top:2px}
.display-center-post h3{font-size:16px;margin:0 0 4px}
.display-center-post-meta{font-size:12px;color:#64748b;margin-bottom:6px}
.display-center-photo-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}
.display-center-photo-strip img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}
.display-center-create-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.display-center-create-grid .full{grid-column:1/-1}
.display-center-create-grid label{display:block;font-size:13px;font-weight:800}
.display-center-create-grid label>input,
.display-center-create-grid label>select{margin-top:5px}
.display-center-volume-row{display:grid;grid-template-columns:minmax(0,1fr) 55px;gap:8px;align-items:center}
.display-center-volume-row input{width:100%}
.display-center-select-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.display-center-ready{
  padding:13px;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
  border-radius:13px;
  margin-top:12px;
}
.display-center-url-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;margin-top:8px}
.display-center-url-row input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.display-center-management{display:grid;gap:9px;margin-top:10px}
.display-center-manage-card{
  border:1px solid #dbe5f1;
  border-radius:15px;
  padding:13px;
  background:#fff;
}
.display-center-manage-card.off{opacity:.7;background:#f8fafc}
.display-center-manage-head{display:flex;justify-content:space-between;gap:10px}
.display-center-manage-meta{display:flex;gap:8px 14px;flex-wrap:wrap;color:#64748b;font-size:12px;margin-top:7px}
.display-center-manage-url{font-size:12px;word-break:break-all;background:#f1f5f9;padding:8px;border-radius:9px;margin-top:8px}
.display-center-manage-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.display-center-note{
  padding:10px 12px;border-radius:11px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:13px
}
@media(max-width:760px){
  .display-center-search,.display-center-query-grid{grid-template-columns:1fr}
  .display-center-custom{grid-template-columns:1fr}
  .display-center-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .display-center-create-grid{grid-template-columns:1fr}
  .display-center-create-grid .full{grid-column:auto}
  .display-center-url-row{grid-template-columns:1fr}
  .display-center-url-row button{width:100%}
  .display-center-photo-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .display-center-manage-actions{display:grid;grid-template-columns:1fr 1fr}
}


/* =========================================================
   V1.7.7.6.13｜總覽推廣點一鍵展開＋全推廣點 QR/NFC 成效比較
   ========================================================= */
.dashboard-stat-button{
  font:inherit;
  color:inherit;
  cursor:pointer;
  width:100%;
}
.dashboard-stat-button small{
  display:block;
  margin-top:6px;
  font-size:11px;
  color:#64748b;
  font-weight:700;
}
.dashboard-stat-button:hover,
.dashboard-stat-button.active{
  border-color:#93c5fd;
  background:#eff6ff;
}
.dashboard-stat-button.active b{color:#1d4ed8}
.home-promo-summary-card .section-title-row{align-items:center}
.home-promo-detail{margin-top:14px}
.home-promo-detail.hidden{display:none!important}
.home-promo-analysis-head{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:9px;
}
.home-promo-analysis-head>div{
  padding:11px 8px;
  text-align:center;
  border:1px solid #dbe5f1;
  border-radius:13px;
  background:#f8fafc;
}
.home-promo-analysis-head span{display:block;font-size:11px;color:#64748b}
.home-promo-analysis-head b{display:block;margin-top:3px;font-size:21px}
.home-promo-analysis-note{
  margin-bottom:10px;
  padding:9px 11px;
  border-radius:11px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#9a3412;
  font-size:12px;
  line-height:1.55;
}
.home-promo-analysis-list{display:grid;gap:9px}
.home-promo-analysis-item{
  border:1px solid #dbe5f1;
  border-radius:15px;
  padding:13px;
  background:#fff;
}
.home-promo-analysis-item.low{border-color:#fecaca;background:#fffafa}
.home-promo-analysis-item.high{border-color:#bbf7d0;background:#f7fff9}
.home-promo-analysis-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.home-promo-analysis-top>div{min-width:0}
.home-promo-analysis-top b{
  font-size:16px;
  overflow-wrap:anywhere;
}
.home-promo-rank{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  margin-right:6px;
  padding:2px 6px;
  border-radius:999px;
  background:#eef2f7;
  color:#475569;
  font-size:11px;
  font-weight:900;
}
.home-promo-off-chip{
  display:inline-block;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  background:#e5e7eb;
  color:#475569;
  font-size:10px;
  font-style:normal;
  font-weight:900;
}
.home-promo-performance{
  white-space:nowrap;
  font-size:12px;
  padding:5px 8px;
  border-radius:999px;
  background:#eef2f7;
}
.home-promo-performance.low{background:#fee2e2;color:#b91c1c}
.home-promo-performance.high{background:#dcfce7;color:#166534}
.home-promo-performance.below{background:#fef3c7;color:#92400e}
.home-promo-performance.above{background:#dcfce7;color:#166534}
.home-promo-location{
  margin-top:5px;
  color:#64748b;
  font-size:12px;
}
.home-promo-channel-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}
.home-promo-channel-grid>div{
  padding:9px 7px;
  text-align:center;
  border-radius:11px;
  background:#f8fafc;
  border:1px solid #e5eaf1;
}
.home-promo-channel-grid>div.total{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.home-promo-channel-grid span{display:block;font-size:10px;color:#64748b}
.home-promo-channel-grid b{display:block;margin-top:2px;font-size:18px}
.home-promo-analysis-foot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
  color:#64748b;
  font-size:11px;
}
@media(max-width:640px){
  .home-promo-summary-card .section-title-row{align-items:stretch}
  #toggleHomePromoDetail{width:100%}
  .home-promo-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-promo-analysis-top{align-items:flex-start}
  .home-promo-analysis-head{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:390px){
  .home-promo-analysis-head{grid-template-columns:1fr 1fr 1fr}
  .home-promo-analysis-head b{font-size:18px}
}

/* =========================================================
   V1.7.7.6.14.1｜候選人完整基本資料修改
   ========================================================= */
.candidate-profile-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.candidate-profile-summary-grid>div{min-width:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.candidate-profile-summary-grid span{display:block;font-size:12px;color:#64748b;margin-bottom:3px}.candidate-profile-summary-grid b{display:block;overflow-wrap:anywhere}.candidate-profile-editor{margin-top:14px;padding:15px;border:1px solid #cfdceb;border-radius:16px;background:#f8fbff}.candidate-profile-editor-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.candidate-profile-editor-title b{display:block;font-size:17px}.candidate-profile-editor-title span{display:block;margin-top:3px;font-size:13px;color:#64748b}.candidate-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.candidate-profile-grid label{display:block;min-width:0;font-size:13px;font-weight:800;color:#334155}.candidate-profile-grid input,.candidate-profile-grid select{margin-top:5px;width:100%;min-width:0}.candidate-profile-full{grid-column:1/-1}.candidate-profile-warning{margin-top:10px;padding:10px 12px;border:1px solid #f2d28a;border-radius:12px;background:#fff8e8;color:#7a5200;font-size:13px}.candidate-profile-actions{display:flex;justify-content:flex-end;margin-top:12px}.candidate-profile-actions .primary{min-width:190px}
@media(max-width:700px){.candidate-profile-summary-grid{grid-template-columns:1fr 1fr}.candidate-profile-grid{grid-template-columns:1fr}.candidate-profile-full{grid-column:auto}.candidate-profile-actions{display:block}.candidate-profile-actions .primary{width:100%;min-width:0}}
@media(max-width:430px){.candidate-profile-summary-grid{grid-template-columns:1fr}}


/* =========================================================
   V1.7.7.6.20｜現任民代服務暫停＋誤開通安全解除
   ========================================================= */
.official-open-chip.paused{background:#fff3db!important;color:#9a6400!important;border:1px solid #f0d39b!important}
.official-open-chip.expired{background:#ffe9e9!important;color:#b52222!important;border:1px solid #f2c1c1!important}
.official-open-chip.disabled{background:#eceff3!important;color:#5d6672!important;border:1px solid #d7dce3!important}
.opened-official-service-control{margin-top:14px;padding:14px;border:1px solid #dbe4ef;border-radius:14px;background:#fbfdff}
.opened-official-service-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:10px 12px;border-radius:12px;background:#f5f8fc;border:1px solid #e1e8f2}
.opened-official-service-status span{color:#64748b;font-size:13px;font-weight:700}.opened-official-service-status b{font-size:16px}
.opened-official-service-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.opened-official-service-actions button{min-width:150px}
@media(max-width:680px){.opened-official-service-actions{display:grid;grid-template-columns:1fr}.opened-official-service-actions button{width:100%;min-width:0}}
