/* Client project navigation: make room for complete translated labels. */
html:not([lang^="zh"]) .el-aside:has(.left-menu-wrap){--el-aside-width:240px!important;width:240px!important;flex:0 0 240px}
.left-menu-wrap{display:flex;flex-direction:column;min-height:0;height:100%;overflow-y:auto}
.left-menu-wrap .el-menu-item{height:auto!important;min-height:46px;line-height:1.5!important;padding:0 12px!important;white-space:normal}
.left-menu-wrap .item-content{min-width:0;height:auto!important;min-height:44px;padding:10px 12px!important;line-height:1.5!important;align-items:flex-start!important;gap:6px}
.left-menu-wrap .item-content i{flex:none;padding:0!important;line-height:1.5}
.left-menu-wrap .item-content span{min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
html:not([lang^="zh"]) .left-menu-wrap .item-content span{font-size:13px}
.left-menu-wrap .create-form{width:calc(100% - 24px)!important;margin-inline:12px!important;max-width:none;min-height:40px;font-size:14px}
.left-menu-wrap .logout{position:static!important;margin:24px 18px 14px!important;min-height:35px;white-space:normal;line-height:1.5;font-size:13px}
/* Replace rigid 270/305px cards with a real grid. Scope to project/contact cards. */
.project-card-container{width:100%;margin:20px 0!important}
.project-card-container>div>.el-row{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:18px;margin:0!important}
.project-card-container>div>.el-row>.el-col{width:100%!important;max-width:100%!important;min-width:0;padding:0!important;margin:0!important}
.project-card-container .el-card{width:100%!important;height:auto!important;min-height:182px;border-radius:12px!important;overflow:visible!important}
.project-card-container .el-card .body{width:100%!important;height:auto!important;min-height:182px;justify-content:space-between!important;overflow:visible}
.project-card-container .body-form{display:grid!important;grid-template-columns:44px minmax(0,1fr) minmax(64px,92px);gap:10px;padding:18px 14px 15px;align-items:start!important;justify-content:initial!important}
.project-card-container .body-form-picture{width:44px!important;height:44px!important;border-radius:10px!important;display:grid!important;place-items:center}
.project-card-container .body-form .form-img{width:30px!important;height:30px!important}
.project-card-container .body-form-card{display:block!important;min-width:0;width:auto!important;margin:0!important}
.project-card-container .body-form-card>.el-col{padding:0!important;min-width:0;max-width:100%}
.project-card-container .form-card-title{font-size:14px!important;line-height:1.5!important;width:100%!important;max-width:100%!important;display:block!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-card-container .card-time-div{height:auto!important;margin-top:7px!important;line-height:1.5!important;min-width:0}
.project-card-container .card-time{font-size:11px!important;line-height:1.5!important;white-space:normal;overflow-wrap:anywhere;display:block}
.project-card-container .status{width:auto!important;min-width:0;max-width:92px;align-items:flex-end!important;justify-content:flex-start!important;align-self:start;gap:5px}
.project-card-container .status-name{width:auto!important;max-width:100%;height:auto!important;min-height:21px;margin:0!important;padding:3px 7px!important;font-size:11px!important;line-height:1.35!important;white-space:normal;overflow-wrap:anywhere;border-radius:7px!important}
.project-card-container .count-to-data{font-size:12px!important;line-height:1.4!important;white-space:normal;text-align:end}
.project-card-container .btns{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) 32px;gap:6px;padding:0 14px 14px;align-items:stretch;justify-content:initial!important;min-height:48px}
.project-card-container .btns>.el-button,.project-card-container .btns>.el-dropdown>.el-button{width:100%!important;max-width:100%!important;height:auto!important;min-height:34px;margin:0!important;padding:7px 4px!important;font-size:12px!important;line-height:1.35!important;white-space:normal!important;border-radius:7px!important}
.project-card-container .btns .el-button>span{min-width:0;white-space:normal!important;overflow-wrap:anywhere;hyphens:auto;line-height:1.35!important}
.project-card-container .btns>.el-dropdown{display:flex;min-width:0}
/* Project status filters and search must wrap as independent controls. */
.app-container>.filter-view .el-row,.app-container>div>.filter-view .el-row{gap:12px;align-items:flex-start;flex-wrap:wrap}
.app-container .filter-view .el-col-15{max-width:none!important;flex:1 1 440px!important;min-width:0}
.app-container .filter-view .el-col-9{max-width:none!important;flex:1 1 230px!important;min-width:0}
.app-container .filter-view .el-form-item{height:auto;align-items:flex-start;margin-bottom:8px}
.app-container .filter-view .el-form-item__label{height:auto;line-height:1.5;padding-top:7px;font-size:13px;white-space:normal;overflow-wrap:anywhere}
.app-container .filter-view .el-radio-group{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.app-container .filter-view .el-radio-button__inner{border:1px solid var(--el-border-color)!important;border-radius:6px!important;box-shadow:none!important;line-height:1.4;height:auto;padding:8px 12px;font-size:13px;white-space:normal}
.app-container .filter-view .container-head-search{width:100%!important;min-width:180px;max-width:360px}
/* Dashboard translated titles can be longer than a single Chinese line. */
.home-card-item .title{height:auto!important;line-height:1.5!important;font-size:13px;white-space:normal;overflow-wrap:anywhere}
.home-card-item.flex .flex-auto{min-width:0}
.home-card-item .font30{font-size:27px!important;line-height:1.4}
.home-card-item-icon{flex-shrink:0}
/* Excel import uses a native modal with keyboard focus containment. */
.contacts-import-entry{display:flex;justify-content:flex-end;margin:12px 0;min-width:0}
.contacts-import-button,.contacts-template-button,.contacts-import-dialog button{font:13px/1.5 Arial,"Microsoft YaHei",sans-serif;border:1px solid #dce1eb;border-radius:6px;background:#fff;color:#30394d;min-height:36px;padding:8px 14px;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.contacts-import-button,.contacts-import-primary{background:#6354d8!important;border-color:#6354d8!important;color:white!important}
.contacts-import-dialog{width:560px;max-width:calc(100vw - 28px);max-height:calc(100vh - 40px);padding:0;border:1px solid #e1e4ee;border-radius:12px;color:#273249;background:white;box-shadow:0 15px 65px #22243835;overflow:auto;text-align:start}
.contacts-import-dialog::backdrop{background:#17223e60}
.contacts-import-dialog header{padding:20px 24px;border-bottom:1px solid #e5e8ee}
.contacts-import-dialog h2{font-size:18px;line-height:1.5;margin:0}
.contacts-import-body{padding:20px 24px}
.contacts-import-body label{display:block;margin:10px 0 7px;font-size:13px;font-weight:600}
.contacts-import-body select{display:block;width:100%;border:1px solid #d9dfeb;border-radius:6px;background:white;padding:10px;font:13px/1.5 Arial,"Microsoft YaHei",sans-serif;color:#30394d}
.contacts-template-button{margin-top:12px}
.contacts-import-body input[type=file]{display:block;max-width:100%;font-size:13px;padding:9px 0}
.contacts-import-body p{font-size:12px;line-height:1.7;margin:10px 0;overflow-wrap:anywhere}
.contacts-import-columns{color:#596783}.contacts-import-warning,.contacts-import-local{color:#7c6129;background:#fff9ec;padding:9px;border-radius:5px}
.contacts-import-dialog footer{padding:15px 24px;border-top:1px solid #e5e8ee;display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.contacts-import-dialog button:disabled{opacity:.5;cursor:not-allowed}.contacts-import-dialog :focus-visible,.contacts-import-button:focus-visible{outline:3px solid #a9a1f2;outline-offset:2px}
.contacts-import-error{font-size:13px;color:#b42318;line-height:1.7}.contacts-import-result{font-size:13px;color:#237353;line-height:1.7}
@media(max-width:800px){html:not([lang^="zh"]) .el-aside:has(.left-menu-wrap){--el-aside-width:190px!important;width:190px!important;flex-basis:190px}.left-menu-wrap .item-content{padding:9px 7px!important}.project-card-container>div>.el-row{gap:12px}.project-card-container .body-form{grid-template-columns:38px minmax(0,1fr) minmax(54px,82px);gap:8px}.project-card-container .body-form-picture{width:38px!important;height:38px!important}}
@media(max-width:560px){html:not([lang^="zh"]) .el-aside:has(.left-menu-wrap){--el-aside-width:145px!important;width:145px!important;flex-basis:145px}.left-menu-wrap .el-menu-item{padding:0 5px!important}.left-menu-wrap .item-content span{font-size:12px!important}.left-menu-wrap .create-form{font-size:12px}.contacts-import-body{padding:16px}.contacts-import-dialog header,.contacts-import-dialog footer{padding:15px 16px}.app-container .filter-view .el-form-item{display:block}.app-container .filter-view .el-form-item__label{width:auto!important;display:block;text-align:start;margin-bottom:5px}.project-card-container .body-form{grid-template-columns:minmax(0,1fr) 75px}.project-card-container .body-form-picture{display:none!important}.project-card-container .btns{grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:10px}}

.contacts-preview-wrap{overflow:auto;max-height:240px;margin-top:12px;border:1px solid #e8e5f2;border-radius:6px}.contacts-preview-wrap>p{padding:0 10px;font-size:11px;color:#81778f}.contacts-preview-wrap table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}.contacts-preview-wrap th,.contacts-preview-wrap td{padding:8px 12px;text-align:left;border-bottom:1px solid #eeeaf6}.contacts-preview-wrap th{background:#f5f3fc;color:#67588e;position:sticky;top:0}

.contacts-import-dialog[open]{position:fixed;inset:0;margin:auto;display:flex;flex-direction:column;width:min(760px,calc(100vw - 32px));max-height:90vh;overflow:hidden}.contacts-import-dialog>header,.contacts-import-dialog>footer{flex:none}.contacts-import-dialog>.contacts-import-body{overflow:auto;min-height:0;overscroll-behavior:contain}.contacts-preview-wrap thead{display:table-header-group}.contacts-preview-wrap th{position:static}.contacts-import-dialog>footer{background:#fff;position:relative;border-top:1px solid #e8e5f0}@media(max-width:600px){.contacts-import-dialog[open]{width:calc(100vw - 16px);max-height:94vh}}

.contacts-field-mapping{border:1px solid #ddd;padding:16px;border-radius:8px;margin:16px 0}.contacts-mapping-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:16px}.contacts-mapping-grid label{display:block;margin:0 0 4px}.contacts-mapping-grid select{width:100%;min-width:0}
