/* Influencer workspace: intentionally scoped to preserve the existing ERP shell. */
.influencer-crm{--crm-ink:#172b43;--crm-muted:#76859a;--crm-teal:#137c7e;--crm-line:#e3ebf2;color:var(--crm-ink);min-width:0}
.influencer-crm button,.influencer-crm input,.influencer-crm select{font:inherit}.influencer-crm button{cursor:pointer}.influencer-crm button:disabled{cursor:default;opacity:.4}.influencer-crm button:focus-visible,.influencer-crm a:focus-visible,.influencer-crm input:focus-visible,.influencer-crm select:focus-visible{outline:3px solid #8bd2d0;outline-offset:2px}.influencer-crm svg{width:19px;height:19px;flex:none}
.influencer-crm .surface{border:1px solid var(--crm-line);border-radius:11px;box-shadow:0 1px 3px #1c465208;background:#fff}.crm-breadcrumb{font-size:12px;color:var(--crm-muted);display:flex;gap:13px;margin-bottom:17px}.crm-page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.crm-page-head h1{font-size:28px;letter-spacing:-.7px;margin:0 0 6px}.crm-page-head p{margin:0;color:var(--crm-muted);font-size:14px}.crm-head-actions{display:flex;gap:12px;flex-shrink:0}.influencer-crm .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #c8dce0;border-radius:7px;background:#fff;color:var(--crm-teal);padding:10px 15px;line-height:1.4;font-size:13px;font-weight:700;text-decoration:none}.influencer-crm .btn.primary{background:linear-gradient(110deg,#148886,#126b70);color:#fff;border-color:transparent}.influencer-crm .btn.compact{font-size:11px;padding:7px 10px}.influencer-crm .crm-text-button{border:0;background:transparent;padding:6px;color:#607c86;box-shadow:none}
.crm-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.crm-stat{display:flex;align-items:center;text-align:start;gap:18px;min-height:100px;padding:19px 21px;background:#fff;border:1px solid var(--crm-line);border-radius:10px;color:var(--crm-ink);transition:background .15s}.crm-stat:hover,.crm-stat.is-active{background:linear-gradient(130deg,#fff,#eff9f8);border-color:#8fc9c6}.crm-stat>span:last-child>span{display:block;color:#64758b;font-size:13px;font-weight:600}.crm-stat strong{display:block;font-size:27px;margin-top:4px;line-height:1.2;font-variant-numeric:tabular-nums}.crm-stat-icon{width:50px;height:50px;background:#e5f5f3;color:var(--crm-teal);border-radius:50%;display:grid;place-items:center;flex:none}.crm-stat-icon svg{width:28px;height:28px}.crm-stat-icon.is-amber{background:#fff2df;color:#cf862c}.crm-content-basis{font-size:10px;color:var(--crm-muted);margin:8px 0 19px;text-align:end}
.crm-workspace{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(300px,1fr);gap:16px;align-items:start}.crm-list,.crm-detail{min-width:0;overflow:hidden}.crm-type-tabs{display:flex;border-bottom:1px solid var(--crm-line);padding:0 15px;gap:4px;overflow:auto}.influencer-crm .crm-type-tabs .btn{border:0;border-radius:0;background:transparent;color:#78899b;white-space:nowrap;padding:18px 15px;box-shadow:none;position:relative}.influencer-crm .crm-type-tabs .btn.active{color:var(--crm-teal)}.crm-type-tabs .active:after{content:'';height:3px;border-radius:3px;background:var(--crm-teal);position:absolute;bottom:0;left:0;right:0}.crm-type-tabs span{margin-left:3px;font-variant-numeric:tabular-nums}.crm-tools{padding:17px 16px 8px;display:grid;grid-template-columns:minmax(160px,2fr) repeat(4,minmax(95px,1fr)) auto;gap:9px;align-items:center}.crm-tools select,.crm-list-toolbar select,.crm-pagination select{border:1px solid var(--crm-line);border-radius:7px;background:#fff;color:#3e5269;min-height:38px;padding:8px 27px 8px 10px;max-width:100%;font-size:12px}.crm-tools .crm-text-button{white-space:nowrap;font-size:11px}.crm-search{position:relative;display:flex;align-items:center;min-width:0}.crm-search svg{position:absolute;left:12px;color:#889aac}.crm-search input{border:1px solid var(--crm-line);border-radius:7px;width:100%;min-width:0;padding:10px 9px 10px 37px;min-height:38px;font-size:12px;background:#fff}.crm-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 17px;color:#728198;font-size:12px}.crm-list-toolbar strong{color:var(--crm-teal);margin-left:10px}.crm-list-toolbar select{min-width:125px}.crm-table-scroll{overflow-x:auto;padding:0 10px}.crm-table{width:100%;min-width:780px;border-collapse:separate;border-spacing:0;table-layout:auto;font-size:12px}.crm-table th{background:#f7f9fc;text-align:start;color:#718198;font-weight:700;padding:12px 9px;white-space:nowrap}.crm-table td{border-bottom:1px solid #edf1f6;padding:12px 9px;vertical-align:middle;color:#536478}.crm-table th:first-child,.crm-table td:first-child{width:27px;padding-left:12px}.crm-table tr.is-selected td{background:linear-gradient(100deg,#eaf6f5,#edf7f7)}.crm-table tr.is-selected td:first-child{border-left:3px solid var(--crm-teal);padding-left:9px}.crm-table tbody tr:hover td{background:#f2f8f8}.crm-table input[type=checkbox]{accent-color:var(--crm-teal);width:16px;height:16px;vertical-align:middle;cursor:pointer}.crm-person{border:0;background:transparent;text-align:start;display:flex;align-items:center;gap:11px;width:100%;padding:0;color:var(--crm-ink);min-width:155px}.crm-person strong{display:block;font-size:13px}.crm-person small{display:block;color:#8594a7;font-size:11px;margin-top:4px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-avatar{height:37px;width:37px;border-radius:50%;display:inline-grid;place-items:center;flex:none;font-size:13px;font-weight:700;color:#247c80;background:#c7f0e8}.crm-color-1{background:#ffd5e4;color:#b95176}.crm-color-2{background:#c1e2ff;color:#397eb3}.crm-color-3{background:#ead8fc;color:#9460b0}.crm-color-4{background:#ffe1b3;color:#b6833b}.crm-color-5{background:#e2efba;color:#708e43}.crm-avatar-large{width:59px;height:59px;font-size:22px}.crm-country{display:inline-flex;gap:6px;align-items:center;white-space:nowrap;font-size:11px}.crm-country>span{font-size:16px}.crm-platform{font-size:11px;color:#8293a6}.crm-badges{display:flex;flex-wrap:wrap;gap:4px;min-width:65px}.crm-badge{display:inline-block;border-radius:20px;padding:4px 9px;font-size:10px;line-height:1.4;background:#f0f3f8;color:#637289;white-space:nowrap}.crm-groupBuy{background:#eaf0ff;color:#5c75c9}.crm-live{background:#f1e9fb;color:#966ec9}.crm-status.crm-active,.crm-status.crm-completed,.crm-status.crm-contracted{background:#e1f7f1;color:#258e83}.crm-status.crm-awaitingReply{background:#fff1df;color:#cd8c37}.crm-estimated{display:block;color:#91a0b1;font-size:9px;white-space:nowrap}.crm-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 17px;font-size:11px;color:#8190a2}.crm-pagination>div{display:flex;align-items:center;gap:5px}.influencer-crm .crm-pagination .btn{padding:5px;min-width:28px;border-color:#e6edf4;color:#8497aa;font-size:11px}.influencer-crm .crm-pagination .btn.active{background:#245d6a;color:#fff;border-color:#245d6a}.crm-pagination select{font-size:10px;min-height:30px;padding-top:4px;padding-bottom:4px}.crm-empty{text-align:center;padding:34px 20px;color:var(--crm-muted);font-size:13px}.crm-empty>svg{width:40px;height:40px;color:#9dc5c1;margin:auto}
.crm-detail{padding:17px}.crm-detail-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px;gap:10px}.crm-detail-heading h2{font-size:18px;margin:0}.crm-detail-heading .btn{font-size:11px}.crm-identity{display:flex;gap:11px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.crm-identity>div{flex:1;min-width:120px}.crm-identity h3{font-size:17px;margin:0 0 4px}.crm-identity p{font-size:12px;color:#7d8ba0;margin:0 0 6px}.crm-identity .crm-channel{margin-left:auto;font-size:10px;padding:7px}.crm-channel svg{width:13px;height:13px}.crm-detail-tabs{display:flex;border-bottom:1px solid var(--crm-line);margin-bottom:16px}.influencer-crm .crm-detail-tabs .btn{flex:1;border:0;box-shadow:none;border-radius:0;font-size:12px;color:#718299;padding:12px 4px;background:transparent;white-space:nowrap}.influencer-crm .crm-detail-tabs .btn.active{border-bottom:3px solid var(--crm-teal);color:var(--crm-teal)}.crm-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}.crm-metrics>div{border:1px solid var(--crm-line);border-radius:7px;padding:11px 14px;min-height:65px}.crm-metrics span{display:block;color:#8291a4;font-size:11px}.crm-metrics strong{display:block;font-size:22px;margin-top:4px}.crm-metrics small{display:block;color:#8d9bad;font-size:9px}.crm-detail-body h3{font-size:14px;margin:17px 0 10px}.crm-detail-body dl{display:grid;grid-template-columns:minmax(85px,.9fr) minmax(0,1.5fr);gap:10px 12px;margin:0;padding-bottom:16px;border-bottom:1px solid var(--crm-line);font-size:11px;line-height:1.55}.crm-detail-body dt{color:#7b8b9e}.crm-detail-body dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.crm-note-preview{background:#f5f8fa;border-radius:7px;padding:12px;margin-top:14px;font-size:11px;line-height:1.6}.crm-note-preview strong{font-size:12px}.crm-note-preview p{color:#728397;margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:140px;overflow:auto}.crm-detail-footer{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}.crm-detail-footer .btn{font-size:12px;padding:10px 7px}.crm-note,.crm-history article{padding:13px 0;border-bottom:1px solid var(--crm-line);font-size:12px;overflow-wrap:anywhere}.crm-note p,.crm-prewrap{white-space:pre-wrap}.crm-note small{color:#8b98a8;font-size:10px}.crm-history header{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#7c8ca0;margin-bottom:10px}.crm-history p{color:#79899d;line-height:1.6;margin:7px 0}.crm-history .btn{margin-top:6px}.crm-history a{color:var(--crm-teal)}.crm-loading{padding:24px;display:flex;justify-content:space-between;align-items:center}.crm-modal{padding:23px!important}.crm-modal form{width:100%}.crm-modal textarea{resize:vertical;min-height:90px}.crm-modal .schedule-form-title p{color:#7d8a9c;font-size:12px}.crm-modal .schedule-form-grid{gap:15px}.crm-modal input,.crm-modal textarea,.crm-modal select{max-width:100%;box-sizing:border-box}.crm-form-notice{background:#eef8f6;color:#598480;border-radius:7px;padding:12px;font-size:12px;line-height:1.6}.crm-form-error{color:#b64040;font-size:12px;white-space:pre-wrap}.crm-form-error:empty{display:none}
@media(min-width:1700px){.crm-table{min-width:900px}.crm-table td{padding-top:15px;padding-bottom:15px}.crm-detail{padding:20px}.crm-table th,.crm-table td{padding-left:12px;padding-right:12px}}
@media(max-width:1350px){.crm-workspace{grid-template-columns:minmax(0,1.8fr) minmax(285px,1fr)}.crm-tools{grid-template-columns:minmax(140px,2fr) repeat(2,minmax(95px,1fr))}.crm-tools .crm-text-button{justify-content:flex-end}.crm-head-actions .btn{padding:9px 10px;font-size:11px}.crm-stat{padding:17px 14px;gap:11px}.crm-stat-icon{width:40px;height:40px}.crm-stat strong{font-size:23px}.crm-stat>span:last-child>span{font-size:11px}.crm-pagination{flex-wrap:wrap}.crm-pagination select{max-width:110px}}
@media(max-width:1050px){.crm-workspace{grid-template-columns:minmax(0,1fr)}.crm-detail{position:static}.crm-detail-body{max-height:none}.crm-page-head{align-items:flex-start}.crm-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-content-basis{text-align:start}.crm-identity .crm-channel{margin-left:0}.crm-detail-tabs .btn{max-width:180px}.crm-tools{grid-template-columns:minmax(160px,2fr) repeat(3,minmax(100px,1fr))}.crm-tools .crm-text-button{grid-column:1/-1;justify-content:flex-end}}
@media(max-width:620px){.crm-page-head{flex-direction:column;gap:14px}.crm-page-head h1{font-size:24px}.crm-page-head p{font-size:12px}.crm-head-actions{width:100%;gap:8px}.crm-head-actions .btn{flex:1;font-size:11px}.crm-stat{min-height:86px;padding:13px 10px;gap:8px}.crm-stat-icon{width:31px;height:31px}.crm-stat-icon svg{width:20px;height:20px}.crm-stat strong{font-size:21px}.crm-stat>span:last-child>span{font-size:10px}.crm-tools{grid-template-columns:1fr 1fr;padding:14px 12px 6px}.crm-search{grid-column:1/-1}.crm-tools .crm-text-button{grid-column:auto;font-size:10px}.crm-type-tabs{padding:0 7px;gap:0}.influencer-crm .crm-type-tabs .btn{font-size:11px;padding:15px 10px}.crm-pagination{padding:15px 12px}.crm-pagination>span{flex-basis:100%}.crm-pagination select{max-width:105px}.crm-modal{padding:16px!important}.crm-modal .schedule-form-grid{grid-template-columns:1fr}.crm-modal .span-2{grid-column:auto}.crm-detail{padding:15px}.crm-detail-heading h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){.influencer-crm *{transition:none!important}}

/* Searchable country inputs also live in the schedule profile modal. */
.influencer-country-picker{position:relative;min-width:0}.influencer-country-input{position:relative;display:flex;align-items:center}.influencer-country-input input{width:100%;box-sizing:border-box;padding-right:38px!important}.influencer-country-input button{position:absolute;right:3px;top:3px;bottom:3px;width:32px;border:0;background:transparent;color:#5e7b8b;cursor:pointer;border-radius:5px;font-size:16px}.influencer-country-menu{position:absolute;top:100%;left:0;right:0;z-index:60;display:block;max-height:250px;overflow:auto;border:1px solid #cbdde5;border-radius:8px;background:#fff;box-shadow:0 10px 25px #17384b22;margin-top:4px;padding:5px;overscroll-behavior:contain}.influencer-country-menu[hidden]{display:none}.influencer-country-menu>button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 11px;border:0;border-radius:5px;background:#fff;text-align:start;color:#344b61;font:inherit;cursor:pointer}.influencer-country-menu>button:hover,.influencer-country-menu>button.is-active{background:#e9f5f3;color:#117b79}.influencer-country-menu>button[aria-selected=true]{font-weight:700}.influencer-country-menu small{font-size:10px;color:#8b9cae}.influencer-country-menu .crm-country{display:inline-flex;gap:8px;align-items:center;white-space:normal;font-size:12px}.influencer-country-menu .crm-country>span{font-size:18px;flex:none}.influencer-country-empty{display:block;padding:14px;font-size:12px;color:#7c8b9b}.influencer-crm .crm-country-pair,.influencer-reference-countries .crm-country-pair{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px 10px}.influencer-reference-countries{margin:8px 0 12px}.crm-country-role{display:inline-flex;max-width:100%}.influencer-crm .crm-country-pair .crm-country{white-space:normal}.influencer-country-input input:focus-visible,.influencer-country-input button:focus-visible{outline:2px solid #75c4bf;outline-offset:1px}

/* Import preview remains separate from financial and collaboration forms. */
.crm-head-actions{flex-wrap:wrap;justify-content:flex-end}
.bulk-backdrop{z-index:1250}
.bulk-modal{width:min(1200px,96vw);max-height:94vh;display:flex;flex-direction:column;overflow:hidden;background:#fff}
.bulk-header{display:flex;justify-content:space-between;gap:20px;padding:24px;border-bottom:1px solid #dce6ed}
.bulk-header h2{margin:0 0 8px}.bulk-header p{margin:0;color:#64748b;max-width:850px}
.bulk-body{padding:20px 24px;overflow:auto;min-height:0}
.bulk-safety{background:#effaf7;border:1px solid #b9e3d9;padding:12px;border-radius:8px;color:#17675f}
.bulk-upload{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}
.bulk-upload label{position:relative;cursor:pointer}.bulk-upload input{position:absolute;opacity:0;inset:0;width:100%;cursor:pointer}.bulk-upload .is-disabled{opacity:.5;pointer-events:none}
.bulk-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}
.bulk-counts>div{border:1px solid #dce6ed;border-radius:8px;padding:12px;display:flex;justify-content:space-between;gap:12px}
.bulk-counts strong{font-size:22px;color:#117d78}
.bulk-table-scroll{overflow:auto;max-height:42vh;border:1px solid #e0e8ef;border-radius:8px}
.bulk-table-scroll table{min-width:1100px;width:100%}.bulk-table-scroll thead{position:sticky;top:0;background:#f4f8fa;z-index:1}
.bulk-table-scroll td,.bulk-table-scroll th{padding:10px;text-align:left}
.bulk-row-update{background:#f0faf8}.bulk-changes{min-width:220px;max-width:360px}.bulk-change{display:grid;gap:4px;margin:0 0 8px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.bulk-change>strong{color:#126b65}.bulk-change del{color:#738296}.bulk-change ins{color:#08766a;text-decoration:none;font-weight:700}.bulk-row-error{background:#fff5f3}.bulk-row-duplicate{color:#788494;background:#f7f9fb}
.bulk-error{color:#b42318}.bulk-success{background:#e8faf1;padding:14px;color:#14643f}
.bulk-footer{display:flex;gap:12px;align-items:center;justify-content:flex-end;padding:18px 24px;border-top:1px solid #dce6ed;flex-wrap:wrap}
@media(max-width:720px){.bulk-header,.bulk-body,.bulk-footer{padding:14px}.bulk-counts{grid-template-columns:repeat(2,1fr)}.crm-head-actions{justify-content:flex-start}.bulk-header h2{font-size:20px}}

/* Explicit profile management actions, shared by list rows and the detail header. */
.crm-profile-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.influencer-crm .crm-profile-actions .btn{white-space:nowrap;padding:6px 9px;font-size:11px}
.influencer-crm .crm-profile-actions .btn.danger{color:#b42318;border-color:#f0c4be;background:#fff9f7}
.crm-detail-heading{gap:10px;flex-wrap:wrap}
.crm-table{min-width:900px}
@media(max-width:620px){.crm-tools .crm-text-button{grid-column:1/-1;justify-content:flex-end}.crm-detail-heading .crm-profile-actions{margin-left:auto}}

/* Private profile photo thumbnails and explicit main-account deletion approval. */
.crm-avatar{position:relative;overflow:hidden}
.crm-avatar img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit;background:#fff}
.crm-avatar img[hidden]{display:none}
.crm-photo-editor{display:flex;align-items:center;gap:16px;padding:15px;border:1px solid #dce7ef;border-radius:9px;background:#f7fbfc;min-width:0}
.crm-photo-preview{position:relative;display:grid;place-items:center;width:76px;height:76px;flex:0 0 76px;overflow:hidden;border-radius:50%;background:#dcefeb;color:#4f8f8d;font-size:28px}
.crm-photo-preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.crm-photo-preview img[hidden],.crm-photo-editor [hidden]{display:none}
.crm-photo-controls{display:grid;gap:8px;min-width:0}
.crm-photo-controls strong{color:#315269;font-size:13px}
.crm-photo-buttons{display:flex;gap:8px;flex-wrap:wrap}
.crm-photo-buttons .btn{font-size:12px;padding:7px 12px}
.crm-photo-controls small{color:#76889a;font-size:11px;line-height:1.6}
.crm-photo-controls [data-photo-status]{margin:0;color:#377e79;font-size:12px;line-height:1.5}
.crm-photo-controls [data-photo-status]:empty{display:none}
.crm-photo-controls [data-photo-status].has-error{color:#b42318}
.crm-delete-modal{width:min(560px,94vw)}
.crm-delete-modal .schedule-form-footer .danger{background:#bd352a;color:#fff;border-color:#bd352a}
@media(max-width:620px){.crm-photo-editor{align-items:flex-start;gap:12px;padding:12px}.crm-photo-preview{width:60px;height:60px;flex-basis:60px}.crm-photo-buttons .btn{font-size:11px;padding:7px 9px}}

/* SVG avoids locale-dependent Taiwan flag emoji rendering. */
.crm-country .crm-country-flag-image{display:inline-block;width:20px;height:14px;max-width:none;object-fit:cover;vertical-align:middle;border-radius:1px;box-shadow:0 0 0 1px #172f4a18}

.crm-channel-label{display:inline-flex;align-items:center;gap:5px;vertical-align:middle;white-space:nowrap}.crm-channel-icon{width:17px!important;height:17px!important;flex:0 0 17px}.crm-person small .crm-channel-label{margin-left:5px}.crm-mobile-cards{display:none}[data-crm-platform-preview]{display:inline-flex;align-items:center;min-height:26px;font-size:12px}
