/* ══════════════════════════════════════════════════════════════
   REMEDIATION MODULE — CSS
   Variables, module switcher, campaigns, items table, KPIs,
   severity bars, SLA, timeline, import zone, type cards
   ══════════════════════════════════════════════════════════════ */

:root {
    --remed: #0ea5e9;
    --remed-dark: #0284c7;
    --remed-light: #f0f9ff;
    --remed-border: #bae6fd;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --purple-border: #ddd6fe;
}

/* ── Module Switcher ── */
.module-switcher {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 5px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.module-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray, #94a3b8);
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}
.module-btn i { width: 18px; height: 18px; }
.module-btn:hover { color: #475569; background: #f8fafc; }
.module-btn.active-conf {
    border-color: var(--primary);
    background: #eff6ff;
    color: #2563eb;
}
.module-btn.active-remed {
    border-color: var(--remed);
    background: var(--remed-light);
    color: var(--remed-dark);
}
.module-count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
}
.module-btn.active-conf .module-count { background: var(--primary); color: white; }
.module-btn.active-remed .module-count { background: var(--remed); color: white; }

/* ── Remediation Nav Tabs ── */
.remed-nav-tabs {
    display: flex;
    gap: 5px;
    padding: 7px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow-x: auto;
    margin-bottom: 14px;
}
.remed-tab {
    padding: 7px 13px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.remed-tab i { width: 14px; height: 14px; }
.remed-tab:hover { border-color: #e2e8f0; color: #475569; }
.remed-tab.active {
    border-color: var(--remed);
    background: var(--remed-light);
    color: var(--remed-dark);
    font-weight: 600;
}
.remed-tab-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
}
.remed-tab.active .remed-tab-badge { background: var(--remed); color: white; }

/* ── Remediation Cards ── */
.remed-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
    overflow: hidden;
}
.remed-card-head {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}
.remed-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}
.remed-card-title i { width: 15px; height: 15px; color: var(--remed); }
.remed-card-body { padding: 14px 18px; }

/* ── Buttons ── */
.btn-remed {
    background: var(--remed-light);
    color: var(--remed-dark);
    border: 1px solid var(--remed-border);
}
.btn-remed:hover { background: var(--remed-border); }

/* ── Tags ── */
.tag { padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; display: inline-block; }
.tag-critical { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tag-high { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tag-medium { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.tag-low { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.tag-done { background: #f0fdf4; color: #16a34a; }
.tag-inprog { background: var(--remed-light); color: var(--remed-dark); }
.tag-open { background: #fef2f2; color: #dc2626; }
.tag-accepted { background: var(--purple-light); color: var(--purple); }
.tag-retest { background: #fdf4ff; color: #a21caf; border: 1px solid #f0abfc; }
.tag-pentest { background: var(--remed-light); color: var(--remed-dark); border: 1px solid var(--remed-border); font-size: 9px; }
.tag-audit { background: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-border); font-size: 9px; }
.tag-ebios { background: #f5f3ff; color: #7c3aed; border: 1px solid #c4b5fd; font-size: 9px; }

/* ── KPIs ── */
.remed-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.remed-kpi {
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    background: white;
    border: 1px solid #e2e8f0;
}
.remed-kpi-val { font-size: 26px; font-weight: 800; }
.remed-kpi-lbl { font-size: 10px; font-weight: 600; opacity: .85; margin-top: 2px; text-transform: uppercase; letter-spacing: .3px; }
.remed-kpi.accent { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: white; border: none; }

/* ── Campaign Cards ── */
.campaign-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
}
.campaign-card:hover { border-color: var(--remed); box-shadow: 0 2px 12px rgba(14,165,233,.12); }
.campaign-card.active { border-color: var(--remed); background: var(--remed-light); }
.campaign-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.campaign-title { font-weight: 700; color: #1e293b; font-size: 14px; }
.campaign-meta { font-size: 11px; color: #94a3b8; margin-bottom: 10px; }
.campaign-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.campaign-bar { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.campaign-bar-fill { height: 100%; border-radius: 3px; background: var(--remed); transition: width .3s; }

/* ── Remediation Table ── */
.remed-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.remed-table th {
    text-align: left; padding: 8px 12px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; color: #94a3b8; border-bottom: 2px solid #f1f5f9; letter-spacing: .3px;
}
.remed-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.remed-table tr:hover { background: #f8fafc; }
.remed-table tr:last-child td { border-bottom: none; }
.remed-table tr.sla-overdue { background: #fef2f2; }
.item-id { font-family: monospace; font-weight: 700; font-size: 11px; color: #64748b; }
.item-title { font-weight: 600; color: #334155; }
.item-ref { font-family: monospace; font-size: 10px; color: #94a3b8; background: #f8fafc; padding: 2px 6px; border-radius: 3px; }
.assignee { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #64748b; }
.assignee-dot { width: 6px; height: 6px; border-radius: 50%; }
.progress-mini { width: 60px; height: 4px; background: #f1f5f9; border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 6px; }
.progress-mini-fill { height: 100%; border-radius: 2px; }

/* ── Severity Bars ── */
.sev-bars { display: flex; gap: 10px; }
.sev-bar { flex: 1; }
.sev-bar-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.sev-bar-track { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.sev-bar-fill { height: 100%; border-radius: 4px; }

/* ── SLA ── */
.sla-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f8fafc; font-size: 12px; }
.sla-row:last-child { border-bottom: none; }
.sla-label { width: 80px; font-weight: 600; color: #475569; }
.sla-track { flex: 1; height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.sla-fill { height: 100%; border-radius: 3px; }
.sla-val { width: 40px; text-align: right; font-weight: 700; font-size: 11px; }

/* ── Timeline ── */
.remed-timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.remed-timeline-item:last-child { border-bottom: none; }
.remed-timeline-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.remed-timeline-content { font-size: 12px; color: #475569; line-height: 1.5; }
.remed-timeline-date { font-size: 10px; color: #94a3b8; }

/* ── Import ── */
.import-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all .2s;
}
.import-zone:hover { border-color: var(--remed); background: var(--remed-light); }
.import-formats { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.format-tag { padding: 4px 12px; border-radius: 6px; background: white; border: 1px solid #e2e8f0; font-size: 11px; font-weight: 600; color: #64748b; }

/* ── Type Cards ── */
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.type-card {
    padding: 20px; border: 2px solid #e2e8f0; border-radius: 12px;
    cursor: pointer; text-align: center; transition: all .2s;
}
.type-card:hover { border-color: var(--remed); }
.type-card.selected { border-color: var(--remed); background: var(--remed-light); }
.type-card-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.type-card-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.type-card-desc { font-size: 12px; color: #64748b; line-height: 1.5; }

/* ── Campaign Switcher ── */
.campaign-switcher {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; background: var(--remed-light);
    border: 1px solid var(--remed-border); border-radius: 8px; margin-bottom: 14px;
}
.campaign-switcher select {
    border: 1px solid var(--remed-border); border-radius: 6px;
    padding: 5px 10px; font-size: 12px; font-weight: 600;
    color: var(--remed-dark); background: white; outline: none; font-family: inherit; flex: 1;
}

/* ── Filter Pills ── */
.remed-filters { display: flex; gap: 6px; padding: 10px 18px; background: #f8fafc; border-bottom: 1px solid #f1f5f9; align-items: center; flex-wrap: wrap; }
.remed-filter-pill {
    padding: 4px 10px; border-radius: 20px; border: 1px solid #e2e8f0;
    background: white; font-size: 11px; color: #64748b; cursor: pointer; font-weight: 500;
    font-family: inherit; transition: all .15s;
}
.remed-filter-pill:hover { border-color: var(--remed); color: var(--remed-dark); }
.remed-filter-pill.active { border-color: var(--remed); background: var(--remed-light); color: var(--remed-dark); font-weight: 600; }
.remed-filter-pill.danger { border-color: #fecaca; background: #fef2f2; color: #dc2626; font-weight: 600; }

/* ── Bulk Actions ── */
.remed-bulk-actions {
    padding: 10px 18px; background: #f8fafc; border-top: 1px solid #f1f5f9;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

/* ── Grids ── */
.remed-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Campaign Comparison Bars ── */
.camp-compare-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.camp-compare-name { width: 200px; font-size: 12px; font-weight: 600; color: #334155; }
.camp-compare-bar { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.camp-compare-bar-inner { display: flex; height: 100%; }
.camp-compare-pct { font-size: 12px; font-weight: 700; color: #475569; width: 40px; text-align: right; }

/* ── Remediation views ── */
.remed-view { display: none; }
.remed-view.active { display: block; }

/* ── Form ── */
.remed-form-label { display: block; font-size: 10px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.remed-form-input { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12px; outline: none; box-sizing: border-box; font-family: inherit; color: #334155; }
.remed-form-input:focus { border-color: var(--remed); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .remed-kpi-row { grid-template-columns: repeat(3, 1fr); }
    .remed-grid-2 { grid-template-columns: 1fr; }
    .type-cards { grid-template-columns: 1fr; }
    .sev-bars { flex-direction: column; }
}
@media (max-width: 768px) {
    .remed-kpi-row { grid-template-columns: 1fr 1fr; }
    .module-switcher { flex-direction: column; }
}
