.bcrm {
    direction: rtl;
    color: #172033;
}

.bcrm h1 {
    font-size: 28px;
    font-weight: 800;
}

.bcrm .bcrm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.bcrm .bcrm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.bcrm .bcrm-card strong {
    display: block;
    font-size: 26px;
    line-height: 1.2;
    color: #1d4ed8;
}

.bcrm .bcrm-card span {
    color: #64748b;
}

.bcrm .form-table {
    max-width: 920px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    overflow: hidden;
}

.bcrm .form-table th,
.bcrm .form-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
}

.bcrm .form-table tr:last-child th,
.bcrm .form-table tr:last-child td {
    border-bottom: 0;
}

.bcrm input.regular-text,
.bcrm input[type="file"],
.bcrm select,
.bcrm textarea {
    border-color: #cbd5e1;
    border-radius: 6px;
    min-height: 38px;
}

.bcrm .button.button-primary {
    min-height: 38px;
    border-radius: 6px;
    font-weight: 700;
}

.bcrm .widefat {
    border-color: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.bcrm .widefat th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
}

.bcrm .bcrm-details {
    max-width: 920px;
    margin: 12px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.bcrm .notice.inline {
    max-width: 920px;
    border-radius: 8px;
}

/* Import column mapping */
.bcrm .bcrm-import-upload-card {
    max-width: 1000px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin: 18px 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.bcrm .bcrm-import-file-label { display: flex; flex-direction: column; min-width: 120px; }
.bcrm .bcrm-import-file-label span { color: #64748b; font-size: 12px; margin-top: 3px; }
.bcrm .bcrm-import-status { color: #64748b; font-weight: 600; }
.bcrm .bcrm-import-status.is-success { color: #15803d; }
.bcrm .bcrm-import-status.is-error { color: #b91c1c; }
.bcrm .bcrm-import-status.is-loading { color: #1d4ed8; }
.bcrm .bcrm-mapping-panel {
    max-width: 1100px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin: 18px 0 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}
.bcrm .bcrm-mapping-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bcrm .bcrm-mapping-head h2 { margin: 0 0 5px; }
.bcrm .bcrm-mapping-head p { margin: 0; color: #64748b; }
.bcrm .bcrm-mapping-notice {
    margin: 14px 0;
    padding: 10px 12px;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
}
.bcrm .bcrm-mapping-table-wrap { overflow-x: auto; }
.bcrm .bcrm-mapping-table { min-width: 760px; }
.bcrm .bcrm-mapping-table td { vertical-align: middle; }
.bcrm .bcrm-mapping-table select { width: 100%; max-width: 300px; }
.bcrm .bcrm-source-header { font-size: 14px; }
.bcrm .bcrm-map-samples code {
    display: inline-block;
    direction: rtl;
    margin: 2px 0 2px 5px;
    padding: 3px 7px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    background: #f8fafc;
}
.bcrm .bcrm-mapping-table tr.has-map-error td { background: #fff1f2 !important; }
.bcrm .bcrm-mapping-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}
.bcrm .bcrm-map-error { color: #b91c1c; font-weight: 700; }
.bcrm .bcrm-map-ok { color: #15803d; font-weight: 700; }
@media (max-width: 782px) {
    .bcrm .bcrm-mapping-head, .bcrm .bcrm-mapping-actions { flex-direction: column; align-items: stretch; }
}

/* Streaming import */
.bcrm-batch-progress,.bcrm-batch-preview{margin-top:20px;padding:18px;border:1px solid #dcdcde;border-radius:10px;background:#fff}.bcrm-progress-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.bcrm-progress-track{height:12px;background:#eef0f2;border-radius:999px;overflow:hidden}.bcrm-progress-track>span{display:block;width:0;height:100%;background:#2271b1;transition:width .2s ease}.bcrm-batch-preview .bcrm-grid{margin-top:12px}

/* Assignment workspace */
.bcrm-assignment-page{max-width:1680px}.bcrm-assign-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.bcrm-assign-hero span{font-size:11px;color:#7b86a0}.bcrm-assign-hero h1{margin:4px 0 2px!important;font-size:24px!important;color:#172033!important}.bcrm-assign-hero p{margin:0;color:#66758c;font-size:12px}.bcrm-assign-hero-icon{width:52px;height:52px;border-radius:18px;background:linear-gradient(145deg,#5b4be8,#7c6dff);display:grid;place-items:center;color:#fff;font-size:24px;box-shadow:0 16px 34px rgba(91,75,232,.22)}
.bcrm-assign-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 18px}.bcrm-assign-kpis>div{background:#fff;border:1px solid #e6eaf3;border-radius:14px;padding:18px 20px;box-shadow:0 12px 34px rgba(17,24,39,.045);display:grid;gap:4px}.bcrm-assign-kpis span{font-size:12px;color:#53627a;font-weight:800}.bcrm-assign-kpis strong{font-size:22px;color:#162033}.bcrm-assign-kpis small{font-size:11px;color:#7b86a0}
.bcrm .bcrm-assign-card{margin:12px 0!important;padding:18px!important;border-radius:14px!important}.bcrm-assign-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.bcrm-assign-card-head h2{margin:0!important;color:#4f46e5!important;font-size:17px!important}.bcrm-assign-search,.bcrm-assign-rule,.bcrm-assign-filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.bcrm-assign-search label{min-width:320px;flex:1}.bcrm-assign-rule label{min-width:260px}.bcrm-assign-filters{padding:16px 18px;background:#fff;border:1px solid #e6eaf3;border-radius:14px;margin:12px 0}.bcrm-assign-filters label{min-width:190px;flex:1}.bcrm-assign-execute{display:grid!important;grid-template-columns:minmax(320px,.9fr) minmax(220px,.45fr) minmax(260px,.65fr) auto!important;gap:18px!important;align-items:end!important}.bcrm-assign-execute select{width:100%;min-height:150px}.bcrm-assign-switches{display:grid;gap:9px}.bcrm-assign-switches label{display:flex!important;align-items:center;gap:7px;font-weight:800;color:#334155}.bcrm-assign-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.bcrm-assignment-page .widefat{margin-top:14px!important}
@media(max-width:980px){.bcrm-assign-kpis{grid-template-columns:repeat(2,1fr)}.bcrm-assign-execute{grid-template-columns:1fr!important}.bcrm-assign-actions{justify-content:flex-start}}
@media(max-width:620px){.bcrm-assign-kpis{grid-template-columns:1fr}.bcrm-assign-search label,.bcrm-assign-rule label,.bcrm-assign-filters label{min-width:100%}}
