/* 全站以 16px 內文為基準；增加控制及聯絡表格行距，避免大字被舊高度截斷。 */
body{font-size:16px;line-height:1.6}
#app .topbar .kbtn{white-space:nowrap}
#app .btn,#app .kbtn{min-height:38px}
#app input.field,#app select.field,#main .crm .field,#main .crm .crm-detail-slot .field{min-height:40px}
#sb .navbtn{min-height:46px;line-height:1.5}
#sb .navbtn .txt{line-height:1.5}
#main .crm .crm-cell-content{line-height:22px;max-height:48px}
#main .crm .crm-record{line-height:22px}
#main .crm .crm-cell-content small{line-height:20px}
#main .crm .crm-table tbody tr[data-row-id]{height:56px}
#main .crm .crm-table thead th,#main .crm .crm-sort-header{min-height:38px;height:auto}
#main .crm .crm-table thead th{padding-top:7px;padding-bottom:7px}
#main .crm .crm-heading{flex-wrap:wrap}
#main .crm .crm-heading>div:first-child{flex-wrap:wrap;row-gap:4px}
@media(max-width:1100px){.topbar .tb-right .who{display:none}}
/* 平板改成兩行工具列，讓大字按鈕維持完整單行，內容起點跟 header 高度一致。 */
@media(max-width:900px){
 #app:has(.account-switch:not([hidden])){--tb-h:104px}
 .topbar:has(.account-switch:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:32px 44px;height:104px;min-height:0;gap:4px;padding:8px 12px;align-content:center}
 .topbar:has(.account-switch:not([hidden])) .tb-brand{height:32px;width:fit-content}
 .topbar:has(.account-switch:not([hidden])) .tb-brand b{display:inline!important}
 .topbar:has(.account-switch:not([hidden])) .tb-right{margin:0;min-width:0;justify-content:space-between;flex-wrap:nowrap;gap:4px}
}
@media(max-width:800px){.crm-detail-slot{top:var(--tb-h,60px)}}
@media(max-width:600px){#app .btn,#app .kbtn,#app input.field,#app select.field,#main .crm .field,#main .crm .crm-detail-slot .field{min-height:44px}#main .crm .crm-table thead th,#main .crm .crm-sort-header{min-height:44px}.dash-heading{flex-wrap:wrap}.crm .crm-heading h1{white-space:normal}}
