/* ====================================
   DNNSentinelInsight - Unified module.css
   Giữ nguyên giao diện gốc - Chỉ tách và gom sạch
   ==================================== */
.soc-nav,
.soc-nav * {
    font-size: 13px;
}
.soc-metric {
    padding: 8px 10px;
    border-radius: 8px;
    min-width: 120px;
}
    .soc-metric label {
        font-size: 12px;
    }

.sys-status {
    font-size: 13px;
}

.sys-label {
    font-size: 12px;
}

.sys-value {
    font-size: 13px;
}

/* ===== SCANRESULTS.ASCX - LIGHT THEME ===== */
.ws-wrap {
    background: #f5f7fb;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e3e7ef;
    font-family: Segoe UI, Roboto, system-ui;
}

.ws-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}

    .ws-header h3 {
        margin: 0;
        font-weight: 600;
        color: #0f172a;
    }

.ws-cards {
    display: flex;
    gap: 16px;
    margin: 10px 0 18px 0;
    flex-wrap: wrap;
}

.ws-card {
    background: white;
    border: 1px solid #e5e7ef;
    border-radius: 12px;
    padding: 12px 14px;
    min-width: 160px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

    .ws-card small {
        color: #6b7280;
        font-size: 11px;
    }

.ws-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .ws-tools .left {
        display: flex;
        gap: 10px;
    }

/* Table chính */
.soc-table {
    width: 100% !important;
    table-layout: fixed;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #e5e7ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

    .soc-table th {
        background: #f1f5fb;
        color: #111827;
        font-weight: 600;
        padding: 10px;
        border-bottom: 1px solid #e5e7ef;
        white-space: nowrap;
    }

    .soc-table td {
        padding: 10px;
        border-top: 1px solid #eef1f6 !important;
        color: #1f2937;
        word-break: break-word;
    }

    .soc-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .soc-table tr.table-danger td {
        background: #fff5f5 !important;
        border-left: 3px solid #dc2626;
    }

    .soc-table tr.table-danger:hover td {
        background: #ffecec !important;
    }

.soc-icon {
    font-size: 18px;
}

/* ===== SAFE, CONSISTENT SCAN / QUARANTINE PRESENTATION ===== */
.dnnd-result-card,
.dnnd-quarantine-card {
    min-width: 0;
    color: #172033;
}

.dnnd-result-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dnnd-result-path {
    min-width: 0;
    flex: 1 1 auto;
}

.dnnd-result-path code {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #172033;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dnnd-archive-path {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}

.dnnd-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.dnnd-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .035em;
    white-space: nowrap;
}

.dnnd-status-malicious,
.dnnd-status-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.dnnd-status-safe,
.dnnd-status-baseline {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

.dnnd-status-rule,
.dnnd-status-untrusted {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.dnnd-status-ai {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.dnnd-status-quarantined {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.dnnd-score,
.dnnd-quarantine-time {
    color: #526075;
    font-size: 12px;
}

.dnnd-confidence-track {
    width: min(180px, 100%);
    height: 4px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.dnnd-confidence-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.dnnd-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.dnnd-result-action,
.dnnd-copy-path {
    min-height: 30px;
}

.dnnd-result-icon {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}

.dnnd-evidence-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
}

.dnnd-evidence-fact {
    min-width: 0;
}

.dnnd-evidence-label {
    display: block;
    margin-bottom: 2px;
    color: #667085;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dnnd-evidence-value {
    display: block;
    color: #172033;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.dnnd-evidence-details {
    margin-top: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
}

.dnnd-evidence-details > summary {
    width: fit-content;
    color: #1261a0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.dnnd-evidence-note {
    margin: 8px 0 5px;
    color: #667085;
    font-size: 11px;
}

.dnnd-evidence-pre {
    max-height: 360px;
    margin: 7px 0 0;
    padding: 12px;
    overflow: auto;
    border: 1px solid #dbe4f0;
    border-radius: 7px;
    background: #0f172a;
    color: #e5edf7;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dnnd-result-recommendation {
    margin-top: 10px;
    padding: 9px 11px;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    background: #fffbeb;
    color: #78350f;
    font-size: 12px;
}

@media (max-width: 700px) {
    .dnnd-result-heading {
        flex-direction: column;
    }

    .dnnd-evidence-summary {
        grid-template-columns: 1fr;
    }
}

/* Modal preview (giữ inline vì đặc thù, nhưng có thể override sau) */
/* Không bắt buộc đưa vào đây vì nó dùng inline */

/* ===== VIEW.ASCX - DASHBOARD ===== */
.dash-wrap {
    font-family: Segoe UI, Roboto, Arial;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.card {
    padding: 14px;
    border-radius: 10px;
    color: #fff;
    flex: 1;
    min-width: 180px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

    .card .title {
        font-size: 12px;
        opacity: .8;
        text-transform: uppercase;
    }

    .card .value {
        font-size: 28px;
        font-weight: bold;
        margin-top: 4px;
    }

.critical {
    background: #b71c1c;
}

.high {
    background: #ef6c00;
}

.safe {
    background: #2e7d32;
}

.total {
    background: #1565c0;
}

.info {
    background: #455a64;
}

.table-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.table-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.table-wrap th {
    text-align: left;
    background: #fafafa;
}

.soc-nav {
    margin: 14px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    border: 1px solid #8a8a8a;
    background: #f7f7f7;
    color: #1f2937;
    text-decoration: none !important;
    max-width: 100%;
    box-sizing: border-box;
}

.nav-btn:hover,
.nav-btn:focus {
    background: #e9eef5;
    color: #111827;
    text-decoration: none !important;
}

.nav-active {
    background: #1565c0 !important;
    color: white !important;
    font-weight: bold;
}

.sys-status {
    margin: 10px 0;
    padding: 10px;
    background: #0f172a;
    border-radius: 6px;
    color: #fff;
}

.sys-label {
    color: #aaa;
    font-weight: bold;
    margin-right: 6px;
}

.sys-value {
    font-weight: bold;
}

.ok {
    color: #19c37d;
}

.bad {
    color: #ff4c4c;
}

.tag {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== SETTINGS.ASCX ===== */
.ws-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 18px 20px;
    margin: 16px 0;
    background: #fafafa;
}

.ws-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}

.ws-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.ws-mono {
    font-family: Consolas, monospace;
    color: #444;
    font-size: 12px;
}

.ws-section {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
}

/* ===== AUDITVIEWER.ASCX ===== */
.page-title {
    font-size: 20px;
    font-weight: 700;
 
}

.section-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.audit-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    transition: all 0.2s ease;
    font-family: Segoe UI, Arial;
    font-size: 13px;
}

    .audit-item:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,.1);
        background: #f8f9fa;
    }

.audit-label {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
}

.audit-file {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
    display: inline-block;
    vertical-align: middle;
}

.audit-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.audit-filter-field,
.audit-filter-control {
    min-width: 0;
}

.audit-filter-control {
    display: flex;
    flex-direction: column;
}

.audit-filter-control select,
.audit-filter-control input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

.audit-summary,
.audit-detail {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.audit-detail {
    margin-top: 4px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 6px 8px;
    line-height: 18px;
}

.badge-act {
    font-size: 11px;
    padding: 6px 10px;
    color: white;
    border-radius: 6px;
    font-weight: 500;
}

.badge-critical {
    background: #dc2626;
}

.badge-high {
    background: #b45309;
}

.badge-info {
    background: #1d4ed8;
}

@media (max-width: 768px) {
    .audit-file {
        max-width: 100%;
        white-space: normal;
        word-break: break-all;
    }
}
/* ===== REALTIMEMONITOR.ASCX ===== */

/* Action buttons */
.soc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

    .soc-actions .btn {
        font-size: 14px;
        padding: 10px 16px;
        border-radius: 8px;
        font-weight: 600;
        min-width: 190px;
        border: 1px solid rgba(0,0,0,.08);
        box-shadow: 0 1px 3px rgba(0,0,0,.08);
        transition: .15s ease;
    }

        .soc-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(0,0,0,.12);
        }

/* Button variants */
.btn-scan {
    background: #1f2937;
    color: #fff;
}

.btn-live {
    background: #374151;
    color: #fff;
}

.btn-stop {
    background: #9ca3af;
    color: #111827;
}

.btn-export {
    background: #e5e7eb;
    color: #111827;
}

.btn-maintenance {
    background: #4b5563;
    color: #fff;
}

.btn-clear {
    background: #b91c1c;
    color: #fff;
}

/* Main wrapper */
.ws-soc-wrap {
    background: #f5f7fb;
    color: #111827;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e3e7ef;
    font-family: Segoe UI, Roboto, system-ui;
}

/* Header */
.soc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}

    .soc-header h2 {
        margin: 0;
        font-weight: 600;
        color: #0f172a;
    }

/* Status badge */
.soc-status span {
    background: #2563eb;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: white;
}

/* Metrics */
.soc-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 14px 0;
}

.soc-metric {
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

    .soc-metric label {
        font-size: 11px;
        color: #6b7280;
    }

/* Table (giống ScanResults nhưng border-radius nhẹ hơn) */
.soc-table {
    width: 100% !important;
    table-layout: fixed;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

    .soc-table th {
        background: #f1f5fb;
        color: #111827;
        font-weight: 600;
        padding: 10px;
        border-bottom: 1px solid #e5e7ef;
        white-space: nowrap;
    }

    .soc-table td {
        padding: 10px;
        vertical-align: top;
        border-top: 1px solid #eef1f6 !important;
        word-break: break-word;
        color: #1f2937;
    }

    .soc-table tbody tr:hover td {
        background: #f8fafc !important;
    }

    .soc-table .col-check {
        width: 32px !important;
        max-width: 32px !important;
        text-align: center;
    }

        .soc-table .col-check input {
            display: block;
            margin: 0 auto;
        }

    .soc-table tr.table-danger td {
        background: #fff5f5 !important;
        border-left: 3px solid #dc2626;
    }

    .soc-table tr.table-danger:hover td {
        background: #ffecec !important;
    }

/* Log panel */
.soc-log {
    background: #ffffff;
    border: 1px solid #e5e7ef;
    height: 260px;
    overflow: auto;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

/* Panel */
.soc-panel {
    margin-top: 20px;
}

.soc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .soc-panel-header h4 {
        margin: 0;
        color: #111827;
    }

/* Log container (dark theme) */
.log-container {
    background: #0e0e0e;
    color: #ddd;
    padding: 10px;
    font-family: Consolas, monospace;
    font-size: 13px;
    height: 350px;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid #333;
}

.log-info {
    color: #9cdcfe;
}

.log-good {
    color: #44ff44;
}

.log-warn {
    color: #ffcc00;
}

.log-bad {
    color: #ff6666;
    font-weight: bold;
}

.log-muted {
    color: #777;
}
.soc-header h2,
.page-title,
.module-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.35;
 
}

.module-heading {
    margin-bottom: 0px;
}

    .module-heading .title {
        font-size: 20px;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        line-height: 1.3;
    }

    .module-heading .subtitle {
        font-size: 13px;
        color: #6b7280;
        margin-top: 2px; /* 👈 khoảng cách nhỏ, tinh tế */
    }

/* ===== RESPONSIVE MODULE LAYOUT ===== */
.ws-wrap,
.ws-soc-wrap,
.section-card,
.soc-panel,
.table-wrap,
.audit-body,
.audit-viewer {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.table-wrap,
.audit-body,
.audit-viewer,
.soc-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.si-waf-table {
    min-width: 760px;
}

.detection-path {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 900px) {
    .ws-wrap,
    .ws-soc-wrap {
        padding: 14px;
    }

    .soc-metrics .card {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .audit-filters {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .soc-nav {
        align-items: stretch;
        gap: 6px;
    }

    .soc-nav .nav-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        padding: 8px 6px !important;
        white-space: normal;
        line-height: 1.2;
    }

    .page-title,
    .soc-header h2,
    .module-title {
        font-size: 18px !important;
        overflow-wrap: anywhere;
    }

    .ws-wrap .row,
    .ws-soc-wrap .row {
        margin-left: 0;
        margin-right: 0;
    }

    .ws-wrap .row > .card,
    .ws-soc-wrap .row > .card {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .soc-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .soc-metrics .card {
        min-width: 0;
        width: auto;
    }

    .soc-metrics .card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .soc-metrics .card .value,
    .card .value {
        font-size: 22px;
        overflow-wrap: anywhere;
    }

    .soc-actions .btn,
    .soc-actions .nav-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .recent-detections-table,
    .recent-detections-table tbody,
    .recent-detections-table tr,
    .recent-detections-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .recent-detections-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .recent-detections-table tr {
        margin-bottom: 12px;
        padding: 8px 10px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
    }

    .recent-detections-table td {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 8px;
        padding: 5px 0;
        border: 0;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .recent-detections-table td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .audit-item {
        padding: 12px;
        overflow: hidden;
    }

    .section-card {
        padding: 12px;
    }

    .soc-panel-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .ws-wrap,
    .ws-soc-wrap {
        padding: 10px;
        border-radius: 10px;
    }

    .soc-nav .nav-btn,
    .soc-actions .btn,
    .soc-actions .nav-btn,
    .ws-wrap .row > .card,
    .ws-soc-wrap .row > .card {
        flex-basis: 100%;
    }

    .soc-metrics {
        grid-template-columns: 1fr;
    }

    .soc-metrics .card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .recent-detections-table td {
        grid-template-columns: 72px minmax(0, 1fr);
    }
}

