:root{--phone-safe-bottom:env(safe-area-inset-bottom,0px)}
body{background:#f2f6fa}
.shell .sidebar{display:none}
.shell,.content,.panel,.table-wrap{min-width:0}
.shell .content{padding:0 16px calc(88px + var(--phone-safe-bottom))}
.top{min-height:0;align-items:flex-start;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #dfe8f2;row-gap:6px}
.phone-brand{display:inline-flex;align-items:center;gap:7px;color:#123b60;font-weight:750;font-size:14px}
.phone-brand img{object-fit:contain;border-radius:7px}
.top>div{justify-content:flex-end;flex:1 1 135px;gap:5px}
.top .identity{text-align:right;font-size:12px;font-weight:600;flex:1 1 100%;overflow-wrap:anywhere}
.top button{font-size:12px;padding:5px 8px;min-height:32px}
.title{margin:16px 0 12px;gap:8px;align-items:center}
.title h1{font-size:24px;line-height:1.25;overflow-wrap:anywhere;min-width:0}
.title:has([data-op=back]) h1{flex-basis:100%}
.title:has([data-op=back]) .actions{order:-1;width:100%;justify-content:space-between}
.title [data-op=back]::before{content:'‹';margin-right:5px}
.panel{padding:14px;margin-bottom:12px;border-radius:14px}
.panel h2{font-size:17px}
.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.metric{min-width:0;min-height:66px;padding:9px 10px}
.metric strong{font-size:clamp(17px,5.3vw,23px);overflow-wrap:anywhere}
.metric span{font-size:13px}
.work-shortcuts{margin:0 0 14px}
.work-shortcuts>button{min-height:60px;background:#eaf4fd;border-color:#c8e0f4;color:#134c7c;font-weight:650}
.filters{gap:8px}
.filters label{max-width:100%}
input,select,textarea{font-size:16px;min-height:42px;max-width:100%}
input[type=checkbox]{width:20px;height:20px;min-height:0;accent-color:#0876c4;flex:none}
.actions button,.actions a,.pager button{min-height:42px}
.actions a,.call-link{display:inline-flex;align-items:center;min-height:40px;color:#0a5f9e;text-decoration:none}
.phone-tabs{position:fixed;z-index:8;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:5px 10px calc(5px + var(--phone-safe-bottom));background:#fff;border-top:1px solid #dce7f0;box-shadow:0 -6px 26px #1735540a}
.phone-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 2px;min-height:48px;border:0;border-radius:9px;background:#fff;color:#496178;font-size:12px}
.phone-tabs button[aria-current=page]{background:#eaf4fd;color:#065e9f;font-weight:750}
.module-grid,.phone-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.module-grid{margin-top:10px}
.module-grid button{min-height:44px;background:#f3f7fc;border-color:#e1ebf4;font-size:14px}
.section-tabs{display:flex;overflow-x:auto;overscroll-behavior-inline:contain;gap:6px;padding:0 0 7px;margin-bottom:7px}
.section-tabs button{flex:none;min-height:40px;padding:6px 10px;font-size:13px}
.section-tabs .active{background:#e6f2fc;border-color:#b4d4ef;color:#095f9f;font-weight:750}
.record-list{background:transparent;border:0;box-shadow:none;padding:0}
.phone-search{display:grid;grid-template-columns:minmax(0,1fr) auto auto}
.phone-search input{width:100%}
.phone-search button{padding-inline:8px;font-size:13px}
.phone-controls{margin:0 0 8px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#264961}
.phone-controls summary{cursor:pointer;min-height:42px;padding:10px 12px;font-weight:650}
.phone-controls[open] summary{border-bottom:1px solid #e7edf3}
.phone-controls form,.phone-controls .export-bar{padding:10px;margin:0}
.phone-filter-grid label{display:grid;gap:3px;min-width:0;font-size:13px}
.phone-filter-grid+.actions{margin-top:10px;justify-content:flex-end}
.phone-controls .export-bar span{flex-basis:100%}
.record-list:has(#phone-export:not([open])) td[data-label="勾选导出"]{display:none}
.table-wrap{overflow:visible}
.record-list table,.record-list tbody,.media-report table,.media-report tbody{display:block}
.record-list thead,.media-report thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.record-list tbody,.media-report tbody{display:grid;gap:9px}
.record-list tr,.media-report tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px;row-gap:8px;align-items:start;background:#fff;border:1px solid #dfe8f1;border-radius:13px;padding:12px}
.media-report tr{background:#f8fbfe}
.record-list td,.media-report td:not(:first-child),.media-report td{display:block;padding:0;border:0;min-width:0;text-align:left;white-space:normal;line-height:1.4;overflow-wrap:anywhere;font-size:14px}
.record-list td::before,.media-report td::before{content:attr(data-label);display:block;color:#577088;font-size:11px;line-height:1.35;margin-bottom:2px}
.record-list td:empty,.media-report td:empty{display:none}
.record-list .record-title,.media-report .record-title{grid-column:1/-1;grid-row:1;font-size:16px;font-weight:750;color:#123b60}
td.record-title::before,td[data-label="操作"]::before{display:none}
td[data-label="操作"],td[data-label="内容"],td[data-label="结果备注"],td[data-label="链接"]{grid-column:1/-1}
.record-list td[data-label="操作"],.media-report td[data-label="操作"]{border-top:1px solid #e7eef6;padding-top:8px}
td[data-label="操作"]>.actions:empty{display:none}
.record-list td[data-label="勾选导出"],.record-list td[data-label="勾选分配"]{grid-column:1/-1;display:flex;align-items:center;gap:7px}
.record-list td[data-label="勾选分配"]:empty{display:none}
.pager{justify-content:space-between;font-size:13px}
.empty-list{padding:20px 12px;text-align:center;background:white;border-radius:10px}
.customer-contact{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:14px}
.customer-contact>strong{background:#e8f3fc;color:#135a8a;border-radius:6px;padding:5px 7px}
.customer-overview p{margin:6px 0 12px;color:#496178}
.customer-information{padding:0}
.customer-information dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:12px}
.customer-information dt{font-size:12px;color:#526d86}
.customer-information dd{margin:2px 0 0;overflow-wrap:anywhere}
.timeline-heading{font-size:17px;margin:16px 0 8px}
.timeline-heading span{font-size:13px;font-weight:500;color:#526d86}
#dialog{width:100%;max-width:none;height:100%;max-height:100dvh;inset:0;margin:0;padding:0;border:0;border-radius:0}
#editor{height:100%;display:flex;flex-direction:column;overflow:hidden}
#editor header,#editor footer{flex:none;background:#fcfdff;padding:10px 16px}
#editor header{border-bottom:1px solid var(--line)}
#editor footer{padding-bottom:calc(10px + var(--phone-safe-bottom));border-top:1px solid var(--line)}
#editor header button,#save{min-height:44px}
.editor-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 16px;flex:1}
#save{width:100%}
#fields{grid-template-columns:minmax(0,1fr)}
#fields label:has(> input[type=checkbox]){display:flex;align-items:center;gap:8px}
#toast:not(:empty){bottom:calc(66px + var(--phone-safe-bottom));max-width:calc(100% - 32px)}
.login-layout{margin:16px auto}
.login-cover{padding:20px}
.cover-brand{margin-bottom:13px}
.login-cover h1{font-size:25px}
.login-layout .login{padding:20px}
.call-link{min-height:32px;text-decoration:underline}

/* Center the standalone preview at phone width on a desktop. */
.preview-mode{max-width:440px;min-height:100vh;margin:0 auto;background:#f2f6fa}
.preview-mode .shell{display:block}
.preview-mode .phone-tabs{width:min(440px,100%);margin-inline:auto}
.preview-mode #dialog{width:min(440px,100%);margin-inline:auto}
.preview-mode .login-layout{grid-template-columns:1fr;width:calc(100% - 26px);min-height:0;border-radius:16px}
