/* ══════════════════════════════════
   SHARED MODAL BASE
══════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeIn .2s ease;
}
.modal-overlay.show { display: flex; }

.modal-close-btn {
    background: rgba(255,255,255,.2); border: none; color: white;
    font-size: 20px; cursor: pointer;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; flex-shrink: 0;
}
.modal-close-btn:hover { background: rgba(255,255,255,.35); transform: rotate(90deg); }

.modal-grad-header {
    padding: 20px 26px;
    background: linear-gradient(135deg, #28A745 0%, #000 100%);
    color: white;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-grad-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.modal-grad-header p  { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.65); }

/* ══════════════════════════════════
   METRICS SELECTOR MODAL  (z-10000)
══════════════════════════════════ */
.mm-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 10000;
    align-items: center; justify-content: center;
}
.mm-overlay.show { display: flex; }

.mm-box {
    background: white; border-radius: 10px;
    width: 90%; max-width: 600px; max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    animation: modalSlideIn .3s ease-out;
}
.mm-hdr {
    padding: 20px 24px;
    background: linear-gradient(135deg, #28A745, #000);
    color: white; display: flex; justify-content: space-between; align-items: center;
    border-radius: 10px 10px 0 0;
}
.mm-hdr h3 { margin: 0; font-size: 18px; font-weight: 600; }
.mm-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.mm-footer { padding: 16px 24px; border-top: 1px solid #e9ecef; display: flex; justify-content: flex-end; gap: 12px; }

.mm-search {
    width: 100%; padding: 10px; border: 1px solid #ddd;
    border-radius: 6px; font-size: 14px; margin-bottom: 12px;
    outline: none; transition: border-color .2s;
}
.mm-search:focus { border-color: #28A745; box-shadow: 0 0 0 .2rem rgba(40,167,69,.2); }

.mm-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.btn-sel   { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; background: linear-gradient(135deg,#28A745,#1a1a1a); color: white; transition: all .2s; }
.btn-sel:hover { transform: translateY(-1px); }
.btn-desel { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; background: #6c757d; color: white; }
.btn-desel:hover { background: #545b62; }

.mm-list { max-height: 300px; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px; padding: 10px; background: #f9f9f9; }
.mm-item { display: flex; align-items: flex-start; padding: 10px; margin-bottom: 6px; background: white; border-radius: 4px; cursor: pointer; transition: background .15s; }
.mm-item:hover { background: #D4EDDA; }
.mm-item.disabled { opacity: .45; cursor: not-allowed; }
.mm-item.disabled:hover { background: white; }
.mm-item input[type=checkbox] { margin-right: 10px; margin-top: 3px; flex-shrink: 0; }
.mm-lbl  { font-size: 14px; font-weight: 600; color: #1F2937; }
.mm-desc { font-size: 12px; color: #6B7280; margin-top: 2px; }
.mm-count { margin-top: 12px; font-size: 13px; color: #666; font-weight: 600; }
.mm-count.red { color: #dc3545; }
.mm-warn { background: #fff3cd; color: #856404; padding: 10px; border-radius: 4px; margin-top: 10px; font-size: 13px; text-align: center; }

.btn-cancel { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; background: #6c757d; color: white; transition: all .2s; }
.btn-cancel:hover { background: #545b62; }
.btn-create { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; background: linear-gradient(135deg,#28A745,#000); color: white; transition: all .3s; }
.btn-create:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.25); }

/* ══════════════════════════════════
   REPORT MODAL  (z-3000)
══════════════════════════════════ */
.report-box {
    background: white; border-radius: 14px;
    width: 100%; max-width: 1100px; max-height: 92vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: modalSlideIn .3s ease-out;
}
.report-header { border-radius: 14px 14px 0 0; }
.report-filter-bar {
    padding: 14px 28px; border-bottom: 1px solid #F3F4F6;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.report-filter-bar label { font-size: 13px; font-weight: 600; color: #6B7280; }
.rfbtn {
    padding: 8px 16px; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.report-body   { overflow-y: auto; flex: 1; padding: 0 28px 20px; }
.report-footer { padding: 14px 28px; border-top: 1px solid #e9ecef; display: flex; justify-content: flex-end; }

/* Campaign dropdown (inside report modal) */
.camp-dd-wrap  { position: relative; margin-left: auto; }
.camp-input {
    padding: 8px 30px 8px 30px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 13px; background: #F9FAFB;
    outline: none; min-width: 210px; transition: border-color .2s;
}
.camp-input:focus { border-color: #28A745; }
.camp-dd-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: white; border: 1px solid #ddd; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 50;
    max-height: 200px; overflow-y: auto;
}
.camp-dd-item {
    padding: 10px 14px; cursor: pointer; font-size: 13px;
    border-bottom: 1px solid #F3F4F6; transition: background .15s;
}
.camp-dd-item:hover  { background: #D4EDDA; }
.camp-dd-item.active { background: #28A745; color: white; }

/* ══════════════════════════════════
   PERFORMANCE MODAL (good/bad)  (z-2000)
══════════════════════════════════ */
.perf-box {
    background: white; border-radius: 16px;
    width: 97vw; max-width: 1400px; max-height: 92vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: modalSlideIn .3s ease-out;
}
.perf-header { border-radius: 16px 16px 0 0; padding: 20px 26px; }
.perf-header.green { background: linear-gradient(135deg, #059669, #1a1a1a); }
.perf-header.red   { background: linear-gradient(135deg, #DC2626, #1a1a1a); }
.perf-header-inner { display: flex; justify-content: space-between; align-items: flex-start; }
.perf-header h3    { margin: 0; font-size: 18px; font-weight: 700; color: white; }
.perf-header p     { margin: 5px 0 0; font-size: 13px; color: rgba(255,255,255,.65); }
.perf-body { overflow-y: auto; flex: 1; padding: 20px 26px; }
.perf-footer { padding: 14px 26px; border-top: 1px solid #F3F4F6; display: flex; justify-content: flex-end; }

.perf-row {
    display: flex; align-items: center;
    padding: 14px 0; border-bottom: 1px solid #F3F4F6;
    gap: 16px; transition: background .15s;
}
.perf-row:last-child { border-bottom: none; }
.perf-row-indicator { width: 4px; border-radius: 2px; height: 44px; flex-shrink: 0; }
.perf-row-indicator.green { background: #10B981; }
.perf-row-indicator.red   { background: #EF4444; }
.perf-row-name  { flex: 1; font-weight: 600; font-size: 14px; color: #1F2937; }
.perf-row-sub   { font-size: 11px; color: #9CA3AF; margin-top: 2px; }
.perf-row-stats { display: flex; gap: 20px; flex-shrink: 0; }
.perf-stat      { text-align: right; }
.perf-stat-val  { font-size: 14px; font-weight: 700; color: #1F2937; }
.perf-stat-lbl  { font-size: 10px; color: #9CA3AF; margin-top: 1px; }

/* ══════════════════════════════════
   AON MODAL  (z-1000)
══════════════════════════════════ */
.aon-box {
    background: white; border-radius: 20px;
    width: 100%; max-width: 920px; max-height: 90vh;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,.2);
    animation: modalSlideIn .3s ease-out;
}