/* Premium CSS Variables */
:root {
    --wpsh-primary: #6366f1; /* Modern Indigo */
    --wpsh-primary-dark: #4f46e5;
    --wpsh-secondary: #ec4899; /* Pink accent */
    --wpsh-success: #10b981;
    --wpsh-danger: #ef4444;
    --wpsh-warning: #f59e0b;
    --wpsh-info: #3b82f6;
    --wpsh-debug: #8b5cf6;
    --wpsh-bg: #f8fafc;
    --wpsh-card-bg: rgba(255, 255, 255, 0.9);
    --wpsh-text: #1e293b;
    --wpsh-text-light: #64748b;
    --wpsh-border: #e2e8f0;
    --wpsh-sidebar-bg: #ffffff;
    --wpsh-sidebar-width: 260px;
    --wpsh-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wpsh-glass: blur(10px);
}

#wp-admin-bar-wpsh-regenerate-node .ab-icon:before {
    content: "\f110"; /* dashicons-html */
    top: 2px;
}
#wp-admin-bar-wpsh-regenerate-node.wpsh-regen-excluded .ab-item {
    color: #ffb900 !important;
}

.wpsh-wrapper {
    display: flex;
    margin: 25px 20px 0 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--wpsh-text);
    gap: 25px;
    align-items: flex-start;
    background: var(--wpsh-bg);
}

/* Premium Sidebar */
.wpsh-sidebar {
    width: var(--wpsh-sidebar-width);
    background: var(--wpsh-sidebar-bg);
    border: 1px solid var(--wpsh-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--wpsh-shadow);
    overflow: hidden;
    position: sticky;
    top: 40px;
}

.wpsh-logo {
    padding: 25px;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--wpsh-primary), var(--wpsh-secondary));
    color: #fff;
    letter-spacing: -0.5px;
}

.wpsh-logo .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.wpsh-nav {
    padding: 15px 10px;
    flex-grow: 1;
}

.wpsh-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--wpsh-text-light);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.wpsh-nav-item:hover {
    background: #f1f5f9;
    color: var(--wpsh-primary);
    transform: translateX(4px);
}

.wpsh-nav-item.active {
    background: var(--wpsh-primary);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.wpsh-nav-item .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: inherit;
}

.wpsh-footer {
    padding: 15px;
    font-size: 11px;
    color: var(--wpsh-text-light);
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid var(--wpsh-border);
}

/* Content Area */
.wpsh-content {
    flex-grow: 1;
    min-width: 0;
}

.wpsh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: var(--wpsh-card-bg);
    backdrop-filter: var(--wpsh-glass);
    padding: 20px 30px;
    border: 1px solid var(--wpsh-border);
    box-shadow: var(--wpsh-shadow);
    border-radius: 16px;
}

.wpsh-header h1 {
    font-size: 24px;
    font-weight: 800;
    line-height: 30px;
    color: var(--wpsh-text);
    margin: 0;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--wpsh-primary), var(--wpsh-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wpsh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.wpsh-card {
    background: var(--wpsh-card-bg);
    backdrop-filter: var(--wpsh-glass);
    border: 1px solid var(--wpsh-border);
    box-shadow: var(--wpsh-shadow);
    padding: 30px;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.wpsh-card:hover { border-color: var(--wpsh-primary); }

.wpsh-card h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpsh-section {
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--wpsh-border);
    box-shadow: var(--wpsh-shadow);
}

.wpsh-section h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: var(--wpsh-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpsh-purpose-info {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 20px 25px;
    border-left: 4px solid var(--wpsh-primary);
    margin-bottom: 30px;
}

.wpsh-purpose-info h4 { margin-top: 0; color: var(--wpsh-primary); font-size: 16px; }
.wpsh-purpose-info p { margin-bottom: 10px; font-size: 14px; line-height: 1.6; }
.wpsh-purpose-info ul { margin: 0; padding-left: 20px; font-size: 13.5px; }

/* Buttons Upgrade */
.wpsh-btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    text-decoration: none;
}

.wpsh-btn:active { transform: scale(0.98); }

.wpsh-btn-primary {
    background: linear-gradient(135deg, var(--wpsh-primary), var(--wpsh-secondary));
    color: #fff;
}

.wpsh-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.wpsh-btn-secondary {
    background: #eef2ff;
    color: var(--wpsh-primary);
}

.wpsh-btn-secondary:hover {
    background: var(--wpsh-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(99, 102, 241, 0.2);
}

.wpsh-btn-danger {
    background: #fef2f2;
    color: var(--wpsh-danger);
}

.wpsh-btn-danger:hover {
    background: var(--wpsh-danger);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(239, 68, 68, 0.3);
}

/* Card & Hero Fixes */
.wpsh-card {
    background: var(--wpsh-card-bg);
    backdrop-filter: var(--wpsh-glass);
    border: 1px solid var(--wpsh-border);
    box-shadow: var(--wpsh-shadow);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wpsh-card:hover { border-color: var(--wpsh-primary); transform: translateY(-2px); }

.wpsh-card-hero {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #ffffff, #f8faff);
}

.wpsh-hero-content { position: relative; z-index: 2; flex: 1; }
.wpsh-hero-icon { position: absolute; right: -20px; bottom: -30px; z-index: 1; opacity: 0.05; transition: all 0.5s ease; }
.wpsh-card-hero:hover .wpsh-hero-icon { transform: scale(1.1) rotate(-5deg); opacity: 0.1; }
.wpsh-hero-icon .dashicons { font-size: 180px; width: 180px; height: 180px; color: var(--wpsh-text); }

.wpsh-badge { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; display: inline-block; line-height: 1.4; border: 1px solid transparent; }
.wpsh-badge-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.wpsh-badge-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.wpsh-badge-none { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.wpsh-badge-301 { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.wpsh-badge-302, .wpsh-badge-307 { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Performance Badge */
.wpsh-status-badge {
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.wpsh-status-badge.wpsh-active { background: #dcfce7; color: #166534; }
.wpsh-status-badge.wpsh-inactive { background: #fef2f2; color: #991b1b; }
.wpsh-status-badge .dashicons { font-size: 18px; width: 18px; height: 18px; }
.wpsh-header-flex { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.wpsh-table-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wpsh-redir-table-container {
    overflow-x: auto;
}
/* Fluid Column Widths for better spacing */
.wpsh-table { width: 100%; border-collapse: collapse; margin-top: 0px; }
.wpsh-table th, .wpsh-table td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--wpsh-border); font-size: 13px; vertical-align: middle; }
.wpsh-table th { font-weight: 700; color: var(--wpsh-text-light); text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }

.wpsh-table th:nth-child(1), .wpsh-table td:nth-child(1) { width: 40px; } /* Checkbox */
.wpsh-table th:nth-child(2), .wpsh-table td:nth-child(2) { width: 60px; text-align: center; } /* Status */
.wpsh-table th:nth-child(3), .wpsh-table td:nth-child(3) { width: 35%; } /* Source */
.wpsh-table th:nth-child(4), .wpsh-table td:nth-child(4) { width: 40%; } /* Target */
.wpsh-table th:nth-child(5), .wpsh-table td:nth-child(5) { width: 70px; text-align: center; } /* Type */
.wpsh-table th:nth-child(6), .wpsh-table td:nth-child(6) { width: 120px; text-align: right; } /* Actions */

.wpsh-table td { overflow: hidden; }
.wpsh-source-cell { width: 100%; display: block; white-space: normal; overflow-wrap: break-word; word-break: break-all; line-height: 1.5; font-family: 'Fira Code', monospace; font-size: 12px; }
.wpsh-target-link { width: 100%; display: block; color: var(--wpsh-primary); text-decoration: none; white-space: normal; overflow-wrap: break-word; word-break: break-all; line-height: 1.5; }

.wpsh-btn-icon:hover { color: var(--wpsh-primary); background: #f1f5f9; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.wpsh-delete-redir:hover { color: var(--wpsh-danger); background: #fee2e2; }

.wpsh-form-group { margin-bottom: 20px; }
.wpsh-form-group label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; font-size: 13px; color: var(--wpsh-text); }
.wpsh-form-row { display: flex; gap: 20px; align-items: flex-end; }
.wpsh-form-row > .wpsh-form-group { flex: 1; margin-bottom: 0; }
.wpsh-input { width: 100%; padding: 12px 16px; border: 1px solid var(--wpsh-border); border-radius: 12px; font-size: 14px; transition: all 0.2s; background: #f8fafc; }
.wpsh-input:focus { border-color: var(--wpsh-primary); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }
select.wpsh-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }

/* Switch Toggles */
.wpsh-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.wpsh-switch input { opacity: 0; width: 0; height: 0; }
.wpsh-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 24px; }
.wpsh-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .wpsh-slider { background-color: var(--wpsh-primary); }
input:checked + .wpsh-slider:before { transform: translateX(22px); }

.wpsh-switch-small { position: relative; display: inline-block; width: 34px; height: 18px; }
.wpsh-switch-small input { opacity: 0; width: 0; height: 0; }
.wpsh-slider-small { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 18px; }
.wpsh-slider-small:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .wpsh-slider-small { background-color: var(--wpsh-success); }
input:checked + .wpsh-slider-small:before { transform: translateX(16px); }

.wpsh-btn-icon { background: none; border: none; cursor: pointer; color: var(--wpsh-text-light); padding: 6px; transition: all 0.2s; border-radius: 6px; }
.wpsh-btn-icon:hover { color: var(--wpsh-primary); background: #f1f5f9; }
.wpsh-btn-icon .dashicons { font-size: 18px; width: 18px; height: 18px; }
.wpsh-delete-redir:hover { color: var(--wpsh-danger); background: #fee2e2; }

.wpsh-hit-count { font-weight: 800; color: var(--wpsh-primary); background: #eef2ff; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.wpsh-master-toggle { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.wpsh-toggle-label { font-weight: 700; font-size: 13px; color: var(--wpsh-text); }

/* Pagination & Bulk Actions */
.wpsh-bulk-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.wpsh-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.wpsh-page-btn { padding: 6px 12px; border: 1px solid var(--wpsh-border); border-radius: 6px; background: #fff; cursor: pointer; transition: all 0.2s; }
.wpsh-page-btn.active { background: var(--wpsh-primary); color: #fff; border-color: var(--wpsh-primary); }
.wpsh-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal for Editing */
.wpsh-modal { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.wpsh-modal-content { background: #fff; margin: 10% auto; padding: 30px; border-radius: 16px; width: 500px; box-shadow: var(--wpsh-shadow); position: relative; }
.wpsh-modal-close { position: absolute; right: 20px; top: 15px; font-size: 24px; cursor: pointer; color: var(--wpsh-text-light); }


.wpsh-actions-group { display: flex; align-items: center; gap: 10px; }
.wpsh-import-export { display: flex; gap: 10px; }

/* Tab Content Display Logic */
.wpsh-tab-content { display: none; }
.wpsh-tab-content.active { display: block; animation: wpshFadeIn 0.3s ease; }
@keyframes wpshFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 960px) {
    .wpsh-grid { grid-template-columns: 1fr; }
    .wpsh-card-hero { flex-direction: column; text-align: center; }
    .wpsh-hero-icon { display: none; }
    .wpsh-header-flex { flex-direction: column; align-items: flex-start; gap: 15px; }
    .wpsh-actions-group { width: 100%; justify-content: space-between; }
    .wpsh-card { overflow-x: auto; } /* Allow table scroll on mobile */
}

/* Progress Area & Generation Log */
.wpsh-progress-box {
    background: var(--wpsh-card-bg);
    backdrop-filter: var(--wpsh-glass);
    border: 1px solid var(--wpsh-border);
    padding: 25px;
    box-shadow: var(--wpsh-shadow);
    border-radius: 16px;
    margin-top: 25px;
}

.wpsh-btn-large {
    padding: 10px 20px;
    font-size: 15px;
}

.wpsh-status-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--wpsh-text);
    font-weight: 600;
}

.wpsh-progress-container {
    height: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--wpsh-border);
}

.wpsh-progress-bar {
    height: 100%;
    background: var(--wpsh-primary);
    width: 0%;
    transition: width 0.3s ease;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
}

.wpsh-log-window {
    background: #0f172a; /* Slate 900 */
    color: #cbd5e1;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    padding: 20px;
    border-radius: 12px;
    height: 250px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.wpsh-log-item {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 6px 0;
    align-items: flex-start;
    animation: logFadeIn 0.2s ease forwards;
}

@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.wpsh-log-item .icon {
    color: #7ad03a; /* Green check */
    font-weight: bold;
}

.wpsh-log-item.error .icon {
    color: #d63638; /* Red X */
}

.wpsh-log-item.warning .icon {
    color: #ffb900; /* Amber Warning */
}

/* Logs Page Styles */
.wpsh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--wpsh-border);
}

.wpsh-card-actions {
    display: flex;
    gap: 10px;
}

.wpsh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.wpsh-stat-item {
    background: linear-gradient(135deg, var(--wpsh-card-bg) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 1px solid var(--wpsh-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: var(--wpsh-glass);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wpsh-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--wpsh-shadow);
}

.wpsh-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--wpsh-primary);
    margin-bottom: 5px;
}

.wpsh-stat-label {
    font-size: 12px;
    color: var(--wpsh-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wpsh-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid var(--wpsh-border);
}

.wpsh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.wpsh-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wpsh-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpsh-table-container {
    background: var(--wpsh-card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--wpsh-border);
    margin-bottom: 20px;
}

#wpsh-redir-list-card .wpsh-table-container{
    border: 0 !important;
}

.wpsh-table {
    width: 100%;
    border-collapse: collapse;
}

.wpsh-table th {
    background: linear-gradient(135deg, var(--wpsh-primary) 0%, var(--wpsh-primary-dark) 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpsh-table td {
    padding: 15px;
    border-bottom: 1px solid var(--wpsh-border);
    vertical-align: top;
}

.wpsh-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.wpsh-table tbody tr:last-child td {
    border-bottom: none;
}

#wpsh-redir-table,
#wpsh-redir-table.dataTable {
    width: 100% !important;
    margin-top: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

#wpsh-redir-table thead th,
#wpsh-redir-table.dataTable thead th,
#wpsh-redir-table.dataTable thead td {
    background: linear-gradient(135deg, var(--wpsh-primary) 0%, var(--wpsh-primary-dark) 100%) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

#wpsh-redir-table thead th:last-child,
#wpsh-redir-table.dataTable thead th:last-child {
    border-right: none;
}

#wpsh-redir-table thead th:first-child {
    border-top-left-radius: 12px;
}

#wpsh-redir-table thead th:last-child {
    border-top-right-radius: 12px;
}

#wpsh-redir-table tbody td,
#wpsh-redir-table.dataTable tbody td {
    padding: 16px !important;
    border-bottom: 1px solid var(--wpsh-border) !important;
    background: #ffffff;
    vertical-align: top;
}

#wpsh-redir-table tbody tr:hover td,
#wpsh-redir-table.dataTable tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

#wpsh-redir-table tbody tr:last-child td,
#wpsh-redir-table.dataTable tbody tr:last-child td {
    border-bottom: none !important;
}

#wpsh-redir-table.dataTable thead .sorting,
#wpsh-redir-table.dataTable thead .sorting_asc,
#wpsh-redir-table.dataTable thead .sorting_desc,
#wpsh-redir-table.dataTable thead .sorting_asc_disabled,
#wpsh-redir-table.dataTable thead .sorting_desc_disabled {
    background-position: right 10px center !important;
}

#wpsh-redir-table_wrapper .dataTables_length,
#wpsh-redir-table_wrapper .dataTables_filter {
    margin-bottom: 12px;
}

#wpsh-redir-table_wrapper .dataTables_info,
#wpsh-redir-table_wrapper .dataTables_paginate {
    margin-top: 12px;
}

#wpsh-redir-table_wrapper .dataTables_filter label,
#wpsh-redir-table_wrapper .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wpsh-text);
    font-weight: 500;
}

#wpsh-redir-table_wrapper .dataTables_filter input,
#wpsh-redir-table_wrapper .dataTables_length select {
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    border: 1px solid var(--wpsh-border);
    border-radius: 10px;
    padding: 6px 12px;
    background: #ffffff;
    color: var(--wpsh-text);
    margin-left: 0 !important;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#wpsh-redir-table_wrapper .dataTables_filter input {
    width: 240px;
}

#wpsh-redir-table_wrapper .dataTables_filter input:focus,
#wpsh-redir-table_wrapper .dataTables_length select:focus {
    border-color: var(--wpsh-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

.wpsh-loading {
    text-align: center;
    padding: 40px;
    color: var(--wpsh-text-light);
    font-style: italic;
}

.wpsh-log-level {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpsh-log-level .dashicons {
    font-size: 12px;
}

.wpsh-log-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--wpsh-success);
}

.wpsh-log-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--wpsh-danger);
}

.wpsh-log-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--wpsh-warning);
}

.wpsh-log-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--wpsh-info);
}

.wpsh-log-debug {
    background: rgba(139, 92, 246, 0.1);
    color: var(--wpsh-debug);
}

.wpsh-log-deleted {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.wpsh-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid var(--wpsh-border);
}

.wpsh-pagination-info {
    color: var(--wpsh-text-light);
    font-size: 14px;
}

.wpsh-pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wpsh-page-numbers {
    color: var(--wpsh-text-light);
    font-size: 14px;
}

.wpsh-page-numbers span {
    font-weight: 600;
    color: var(--wpsh-primary);
}

@media (max-width: 768px) {
    .wpsh-filters {
        flex-direction: column;
    }
    
    .wpsh-filter-group {
        width: 100%;
    }
    
    .wpsh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wpsh-pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .wpsh-table-container {
        overflow-x: auto;
    }
}
