/**
 * TotalWeb Security Dashboard Styles
 *
 * @package TotalWeb
 * @since 1.0.0
 */
/* Dashboard Layout */
.twebsec-dashboard {
    margin: 20px 0;
}
.twebsec-dashboard-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.twebsec-dashboard-widgets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.widget-row {
    display: flex;
    gap: 20px;
    width: 100%;
}
.dashboard-widget {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 0;
}
.dashboard-widget.full-width {
    width: 100%;
}
/* Widget Header */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.widget-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
}
.widget-header h3 .dashicons {
    margin-right: 8px;
    color: #2271b1;
}
/* Widget Content */
.widget-content {
    padding: 20px;
}
/* Widget Footer */
.widget-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}
/* Status Indicators */
.status-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}
.status-indicator.active {
    background-color: #d1e7dd;
    color: #0f5132;
}
.status-indicator.inactive {
    background-color: #f8d7da;
    color: #842029;
}
.status-indicator.warning {
    background-color: #fff3cd;
    color: #664d03;
}
/* Security Score */
.twebsec-security-score {
    text-align: center;
    padding: 20px;
    border-radius: 5px;
    width: 200px;
}
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    border: 8px solid;
}
.score-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}
.score-label {
    font-size: 12px;
    margin-top: 5px;
}
.score-rating {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}
/* Score colors */
.twebsec-security-score.excellent .score-circle {
    border-color: #28a745;
}
.twebsec-security-score.excellent .score-value,
.twebsec-security-score.excellent .score-rating {
    color: #28a745;
}
.twebsec-security-score.good .score-circle {
    border-color: #5cb85c;
}
.twebsec-security-score.good .score-value,
.twebsec-security-score.good .score-rating {
    color: #5cb85c;
}
.twebsec-security-score.fair .score-circle {
    border-color: #f0ad4e;
}
.twebsec-security-score.fair .score-value,
.twebsec-security-score.fair .score-rating {
    color: #f0ad4e;
}
.twebsec-security-score.poor .score-circle {
    border-color: #d9534f;
}
.twebsec-security-score.poor .score-value,
.twebsec-security-score.poor .score-rating {
    color: #d9534f;
}
.twebsec-security-score.critical .score-circle {
    border-color: #dc3545;
}
.twebsec-security-score.critical .score-value,
.twebsec-security-score.critical .score-rating {
    color: #dc3545;
}
/* Quick Actions */
.twebsec-quick-actions {
    flex: 1;
    padding-left: 20px;
}
.twebsec-quick-actions h3 {
    margin-top: 0;
    margin-bottom: 15px;
}
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.action-buttons .button .dashicons {
    margin-right: 5px;
}
/* Stats */
.widget-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}
.stat-item {
    text-align: center;
    min-width: 80px;
}
.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    color: #2271b1;
}
.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}
.stat-note {
    display: block;
    font-size: 11px;
    color: #d9534f;
    margin-top: 5px;
}
.stat-warning .stat-value {
    color: #d9534f;
}
/* WordPress Status */
.wp-status-stats .stat-item {
    margin-right: 30px;
}
/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.feature-list li.enabled .dashicons-yes {
    color: #28a745;
}
.feature-list li.disabled .dashicons-no {
    color: #dc3545;
}
.feature-list .dashicons {
    margin-right: 8px;
}
/* Recent Events Table */
.recent-events-table {
    width: 100%;
    border-collapse: collapse;
}
.recent-events-table th,
.recent-events-table td {
    padding: 10px;
    text-align: left;
}
.recent-events-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}
.recent-events-table tr:nth-child(even) {
    background-color: #f8f9fa;
}
.recent-events-table tr.severity-critical td:nth-child(4) {
    color: #dc3545;
    font-weight: bold;
}
.recent-events-table tr.severity-high td:nth-child(4) {
    color: #fd7e14;
    font-weight: bold;
}
.recent-events-table tr.severity-medium td:nth-child(4) {
    color: #ffc107;
}
.recent-events-table tr.severity-low td:nth-child(4) {
    color: #6c757d;
}
/* Responsive Adjustments */
@media screen and (max-width: 1200px) {
    .twebsec-dashboard-header {
        flex-direction: column;
    }
    
    .twebsec-security-score {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .twebsec-quick-actions {
        padding-left: 0;
    }
}
@media screen and (max-width: 782px) {
    .widget-row {
        flex-direction: column;
    }
    
    .dashboard-widget {
        width: 100%;
    }
    
    .wp-status-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .wp-status-stats .stat-item {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* ============ Dashboard Container ============ */
.wrap.twebsec-dashboard {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}
.wrap.twebsec-dashboard h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1d2327;
}
/* ============ Header Section ============ */
.pp-dashboard-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}
/* Security Score Widget */
.pp-security-score-widget {
    display: flex;
    flex: 1;
    min-width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.pp-score-circle {
    width: 140px;
    height: 140px;
    margin-right: 20px;
    position: relative;
}
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}
.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}
.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke: #0073aa;
    animation: progress 1.5s ease-out forwards;
}
.percentage {
    fill: #333;
    font-size: 0.6em;
    text-anchor: middle;
    font-weight: bold;
}
@keyframes progress {
    from { stroke-dasharray: 0 100; }
}
/* Score details */
.pp-score-details h2 {
    margin: 0;
    font-size: 20px;
}
.pp-score-details p {
    margin: 8px 0 15px;
    color: #555;
}
/* Quick Actions */
.pp-quick-actions {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.pp-quick-actions h3 {
    margin-bottom: 15px;
    font-size: 18px;
}
.pp-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.pp-action-button {
    flex: 1;
    min-width: 130px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #1d2327;
    font-weight: 500;
}
.pp-action-button:hover {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}
/* ============ Dashboard Widgets ============ */
.pp-dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}
/* Widget Box */
.pp-dashboard-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.pp-dashboard-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d2327;
}
.pp-dashboard-widget .dashicons {
    font-size: 18px;
    color: #0073aa;
}
/* No data state */
.pp-no-data {
    color: #777;
    font-style: italic;
    margin: 10px 0;
}
/* ============ Login Attempts Table ============ */
.pp-login-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.pp-login-table th, .pp-login-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}
.pp-login-table th {
    background: #f8f9fa;
    font-weight: 600;
}
.pp-status-indicator {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}
.pp-status-indicator.pp-success {
    background: #d4edda;
    color: #155724;
}
.pp-status-indicator.pp-failed {
    background: #f8d7da;
    color: #721c24;
}
.pp-view-all {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
}
/* ============ Malware Status ============ */
.pp-status-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pp-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pp-status-icon {
    font-size: 24px;
}
.pp-status-icon.pp-status-ok {
    color: #28a745;
}
.pp-status-icon.pp-status-warning {
    color: #dc3545;
}
.pp-action-needed {
    margin-top: 10px;
}
/* ============ File Changes ============ */
.pp-file-changes-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.pp-file-stat {
    text-align: center;
    flex: 1;
}
.pp-stat-number {
    display: block;
    font-size: 20px;
    font-weight: bold;
}
.pp-stat-label {
    font-size: 13px;
    color: #555;
}
/* ============ Security Recommendations ============ */
.pp-recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pp-recommendations-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}
.pp-recommendation-content p {
    margin: 0 0 5px;
    font-size: 14px;
    color: #333;
}
.pp-recommendations-list .button-small {
    padding: 2px 8px;
    font-size: 12px;
}