/* 最后修改：2026-09-23 15:14:22（北京时间）— 文字按钮、电脑轻提示与手机规则底部面板。 */
/* 最后修改：2026-09-22 11:02:08（北京时间）— 保护提示方案三。 */
/* 最后修改：2026-09-22 10:51:28（北京时间）— 保护状态改为分层标签，强化临期和到期提醒。 */
/* 最后修改：2026-09-22 10:02:10（北京时间）— 两个客户板块共用克制的保护标签。 */
.customer-protection-status,#fo-mobile .customer-protection-status{display:block;width:fit-content;max-width:100%;min-height:0;border:0;background:transparent;padding:0;margin:3px 0 0;cursor:pointer;font:400 12px/1.7 var(--font);color:#81858d;text-align:left;white-space:normal;overflow-wrap:break-word;box-shadow:none;}
.customer-protection-status:empty,.customer-protection-status.private,#fo-mobile .customer-protection-status.private,
.customer-protection-status.permanent:not([data-protection-view="detail"]),#fo-mobile .customer-protection-status.permanent:not([data-protection-view="detail"]){display:none;}
.customer-protection-status.expiring,#fo-mobile .customer-protection-status.expiring{color:#9b794b;}
.customer-protection-status.expired,#fo-mobile .customer-protection-status.expired{color:#8d6865;}
#customer-protection-notices{margin:4px 12px 8px;max-width:calc(100% - 24px);font:600 13px var(--font);padding:8px 12px;border:1px solid #ddd6fe;border-radius:8px;background:#f5f3ff;color:#6d28d9;cursor:pointer;}
#customer-protection-notices[hidden]{display:none!important;}
#customer-protection-notices:hover{background:#ede9fe;}
.customer-protection-notice-list{max-height:48vh;overflow:auto;text-align:left;font:400 13px/1.7 var(--font);}
.customer-protection-notice-list>div{padding:10px 0;border-bottom:1px solid #e5e7eb;}
.customer-protection-notice-list p{margin:5px 0 0;}
.theme-dark .customer-protection-status,.theme-dark #fo-mobile .customer-protection-status{color:#aab0bb;}
.theme-dark .customer-protection-status.expiring,.theme-dark #fo-mobile .customer-protection-status.expiring{color:#c7ad83;}
.theme-dark .customer-protection-status.expired,.theme-dark #fo-mobile .customer-protection-status.expired{color:#c69b96;}
@media(max-width:760px){#customer-protection-notices{font-size:12px;padding:8px;}.customer-protection-status{font-size:12px;}}


/* 客户名需同时容纳期限，避免固定列挤压成逐字换行；窄屏沿用表格横向滚动。 */
@media(min-width:761px){#fo-table{min-width:1360px;}#fo-table .customer-protection-status{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;}}

.protection-rules-entry{flex:none;border:1px solid var(--border,#cdd3dc);border-radius:6px;background:transparent;color:var(--text,#17202d);font:500 12px/1.5 var(--font);padding:5px 9px;white-space:nowrap;cursor:pointer;box-shadow:none}
.protection-rules-entry:hover{background:rgba(0,0,0,.13)}
@media(min-width:761px){#page-followup>.fo-header{overflow-x:auto;overflow-y:hidden}#page-followup>.fo-header>div{flex-shrink:0}#page-followup>.fo-header .fo-title,#page-followup>.fo-header button,#page-followup>.fo-header span{white-space:nowrap}}
html:not([data-current-page="mine"]) #mine-protection-rules{display:none!important}
.customer-protection-status:focus-visible,.protection-rules-entry:focus-visible{outline:2px solid #64748b;outline-offset:3px}
#protection-rules-tip{position:fixed;z-index:100100;max-width:min(310px,calc(100vw - 16px));padding:10px 12px;background:var(--white,#fff);border:1px solid var(--border,#cdd3dc);border-radius:7px;color:var(--text,#17202d);font:12px/1.8 var(--font);pointer-events:none}
#protection-rules-tip[hidden]{display:none!important}
#customer-protection-rules{position:fixed;inset:0;margin:auto!important;width:min(680px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--border,#d7dce2);border-radius:12px;background:var(--white,#fff);color:var(--text,#17202d);overflow:hidden;font:13px/1.7 var(--font)}
#customer-protection-rules[open]{display:flex;flex-direction:column}
#customer-protection-rules,#protection-rules-tip{background:#fff}
.theme-dark #customer-protection-rules,.theme-dark #protection-rules-tip{background:#222630}
#customer-protection-rules::backdrop{background:#11182770}
#customer-protection-rules header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--border,#d7dce2);flex:none}
#customer-protection-rules h2{margin:0;font-size:19px}
#customer-protection-rules header p{font-size:12px;color:var(--text2,#687384);margin:3px 0 0}
#customer-protection-rules header button{border:0;background:transparent;color:inherit;cursor:pointer;font:24px/1 var(--font);padding:7px}
.protection-rules-body{overflow:auto;padding:18px 22px;min-height:0}
.protection-rules-reason{margin:0 0 14px;color:var(--text2,#687384)}
#customer-protection-rules dl{margin:0;border:1px solid var(--border,#d7dce2);border-radius:7px;overflow:hidden}
#customer-protection-rules dl>div{display:grid;grid-template-columns:115px 1fr;gap:14px;padding:11px 14px;border-bottom:1px solid var(--border,#e5e7eb)}
#customer-protection-rules dl>div:last-child{border:0}
#customer-protection-rules dt{font-weight:600}
#customer-protection-rules dd{margin:0}
#customer-protection-rules small{display:block;font-size:12px;color:var(--text2,#687384)}
.protection-rules-limit{margin:12px 0 0;font-weight:600}
.protection-rules-note{font-size:12px;color:var(--text2,#687384);margin:8px 0 0}
#customer-protection-rules footer{display:flex;justify-content:flex-end;padding:12px 22px;border-top:1px solid var(--border,#d7dce2);flex:none}
#customer-protection-rules footer button{background:#354154;color:#fff;border:1px solid #354154;border-radius:6px;padding:8px 20px;font:600 13px var(--font);cursor:pointer}
@media(max-width:760px){
 #customer-protection-rules{inset:auto 0 0;margin:0!important;width:100%;max-height:88dvh;border-radius:14px 14px 0 0}
 #customer-protection-rules header{padding:14px 16px}.protection-rules-body{padding:14px 16px}
 #customer-protection-rules dl>div{grid-template-columns:1fr;gap:3px;padding:10px 12px}
 #customer-protection-rules footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
 #customer-protection-rules header button{min-width:44px;min-height:44px}
 .protection-rules-entry{min-height:32px;padding:5px 8px}
 #fo-mobile .fm-view{gap:5px}#fo-mobile .fm-view [data-mode]{padding:0 8px}
 #fo-mobile .fm-view .protection-rules-entry{padding:0 7px;border:1px solid var(--border,#cdd3dc);font-size:12px}
}
