/* Минималистичный дизайн для Protect Plugin */

/* Основные переменные */
:root {
    --protect-primary: #4f46e5;
    --protect-primary-light: #6366f1;
    --protect-success: #10b981;
    --protect-warning: #f59e0b;
    --protect-danger: #ef4444;
    --protect-info: #3b82f6;
    --protect-gray-50: #f9fafb;
    --protect-gray-100: #f3f4f6;
    --protect-gray-200: #e5e7eb;
    --protect-gray-300: #d1d5db;
    --protect-gray-500: #6b7280;
    --protect-gray-600: #4b5563;
    --protect-gray-700: #374151;
    --protect-gray-800: #1f2937;
    --protect-gray-900: #111827;
}

/* Общий контейнер */
.wrap.protect-admin {
    background: var(--protect-gray-50);
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    padding: 0;
    padding-bottom: 3rem;
    margin: 0 0 0 -20px;
}

/* Заголовок - простой и чистый */
.protect-header {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border-bottom: 1px solid var(--protect-gray-200);
    padding: 2rem 0;
    margin: 0 0 2rem 0;
}

.protect-header h1 {
    color: var(--protect-gray-100);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.protect-header .protect-subtitle {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--protect-gray-100);
    font-size: 1rem;
    font-weight: 400;
}

/* Контейнер */
.protect-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow: visible !important;
    height: auto !important;
    min-height: unset !important;
}

/* Алерты - минималистично */
.protect-alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.protect-alert.success {
    background: #f0fdf4;
    border-color: var(--protect-success);
    color: #065f46;
}

.protect-alert.error {
    background: #fef2f2;
    border-color: var(--protect-danger);
    color: #991b1b;
}

.protect-alert strong {
    font-weight: 600;
}

/* Быстрая навигация - скрыта */
.protect-quick-nav {
    display: none;
}

/* Обзор разделов страницы */
.protect-sections-overview {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--protect-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--protect-gray-50);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.section-indicator:hover,
.section-indicator:focus {
    background: var(--protect-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    text-decoration: none;
    outline: none;
}

.section-indicator:hover .section-number,
.section-indicator:focus .section-number {
    background: white;
    color: var(--protect-primary);
}

.section-indicator:hover .section-name,
.section-indicator:focus .section-name {
    color: white;
}

.section-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--protect-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.section-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--protect-gray-700);
    text-align: center;
    white-space: nowrap;
}

.section-divider {
    font-size: 1.5rem;
    color: var(--protect-gray-300);
    font-weight: 300;
}

/* Визуальное разделение основных секций */
#connection,
#protection,
#behavior,
#advanced,
#performance {
    position: relative;
    scroll-margin-top: 2rem;
}

/* Добавляем разделительную линию перед каждой секцией (кроме первой) */
#protection::before,
#behavior::before,
#advanced::before,
#performance::before {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--protect-gray-200), transparent);
    position: absolute;
    top: -1.5rem;
    left: 0;
}

/* Карточки - чистые и простые */
.protect-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--protect-gray-200);
    overflow: visible !important;
    height: auto !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.protect-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.protect-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--protect-gray-200);
}

.protect-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.protect-card-icon.primary { background: var(--protect-primary); color: white; }
.protect-card-icon.success { background: var(--protect-success); color: white; }
.protect-card-icon.warning { background: var(--protect-warning); color: white; }
.protect-card-icon.danger { background: var(--protect-danger); color: white; }
.protect-card-icon.info { background: var(--protect-info); color: white; }

.protect-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--protect-gray-900);
    margin: 0;
    letter-spacing: -0.02em;
    position: relative;
}

/* Стиль для номеров секций */
.protect-card-title::first-line {
    color: var(--protect-primary);
}

.protect-card-subtitle {
    color: var(--protect-gray-600);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 400;
}

/* Формы - простые и удобные */
.protect-form-group {
    margin-bottom: 1.5rem;
}

.protect-form-label {
    display: block;
    font-weight: 500;
    color: var(--protect-gray-800);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.protect-form-input,
.protect-form-textarea,
.protect-form-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--protect-gray-300);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}

.protect-form-input:focus,
.protect-form-textarea:focus,
.protect-form-select:focus {
    outline: none;
    border-color: var(--protect-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.protect-form-help {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--protect-gray-500);
}

/* Тултипы - улучшенная версия */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    font-size: 0.9rem;
    color: var(--protect-primary);
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.tooltip:hover {
    color: var(--protect-primary-light);
}

.tooltip[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 0.75rem 1rem;
    background: var(--protect-gray-900);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.tooltip[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--protect-gray-900);
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Tooltip для карточек */
.has-tooltip {
    position: relative;
    cursor: help;
}

.has-tooltip .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(5px);
    padding: 0.75rem 1rem;
    background: var(--protect-gray-900);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.2s ease;
}

.has-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Стилизация стандартных title tooltip для кнопок */
.protect-btn[title],
.button[title],
.section-indicator[title] {
    position: relative;
}

/* Улучшение видимости иконок tooltip */
.tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--protect-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.tooltip:hover {
    background: var(--protect-primary-light);
    transform: scale(1.1);
}

/* Переключатели (чекбоксы) */
.protect-toggle-group {
    background: var(--protect-gray-50);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid var(--protect-gray-200);
}

.protect-toggle {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
}

.protect-toggle input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.protect-toggle label {
    font-size: 0.95rem;
    color: var(--protect-gray-700);
    cursor: pointer;
    font-weight: 400;
}

/* Группы защиты */
.protection-groups {
    margin-top: 1rem;
}

.protection-group {
    margin-bottom: 2rem;
}

.protection-group-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--protect-gray-200);
}

.protection-group-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--protect-gray-800);
    margin: 0;
}

.protection-item {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--protect-gray-100);
}

.protection-item:last-child {
    border-bottom: none;
}

.protection-info {
    display: flex;
    align-items: center;
}

.protection-info-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.protection-info-text h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--protect-gray-800);
    margin: 0 0 0.25rem 0;
}

.protection-info-text p {
    font-size: 0.85rem;
    color: var(--protect-gray-600);
    margin: 0;
}

.protection-action {
    display: flex;
    align-items: center;
}

.protection-action select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--protect-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.protection-action select:focus {
    outline: none;
    border-color: var(--protect-primary);
}

/* Кнопки - все цветные как зеленая */
.button, 
input[type="submit"],
.wp-core-ui .button,
.wp-core-ui .button-secondary,
.wp-core-ui .button-primary {
    border-radius: 8px !important;
    padding: 0.7rem 1.3rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    color: white !important;
}

/* Зеленая кнопка (Сохранить) */
.button-primary,
input[type="submit"].button-primary,
.wp-core-ui .button-primary {
    background: var(--protect-success) !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}

.button-primary:hover,
input[type="submit"].button-primary:hover,
.wp-core-ui .button-primary:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4) !important;
}

/* Синие кнопки (обычные) */
.button-secondary,
.wp-core-ui .button-secondary,
.wp-core-ui .button {
    background: var(--protect-info) !important;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3) !important;
}

.button-secondary:hover,
.wp-core-ui .button-secondary:hover,
.wp-core-ui .button:hover {
    background: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Большие кнопки */
.button-large {
    padding: 0.9rem 1.8rem !important;
    font-size: 1rem !important;
}

/* Контейнер кнопок - упорядочить */
.protect-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Группа кнопок в верхней части страницы */
.wrap.protect-admin > p {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 0 0 1.5rem 0;
    border: 1px solid var(--protect-gray-200);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Убираем лишние отступы у кнопок в WordPress */
.wp-core-ui .button + .button,
.wp-core-ui .button + input[type="submit"] {
    margin-left: 0 !important;
}

/* Кнопки protect-btn - все цветные */
.protect-btn {
    border-radius: 8px !important;
    padding: 0.7rem 1.3rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    color: white !important;
}

/* Зеленая кнопка (Primary) */
.protect-btn-primary {
    background: var(--protect-success) !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}

.protect-btn-primary:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4) !important;
}

/* Синяя кнопка (Info) */
.protect-btn-info {
    background: var(--protect-info) !important;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3) !important;
}

.protect-btn-info:hover {
    background: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Серая кнопка (Secondary) */
.protect-btn-secondary {
    background: #6b7280 !important;
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.3) !important;
}

.protect-btn-secondary:hover {
    background: #4b5563 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(107, 114, 128, 0.4) !important;
}

/* Желтая/оранжевая кнопка (Warning) */
.protect-btn-warning {
    background: #f59e0b !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3) !important;
}

.protect-btn-warning:hover {
    background: #d97706 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4) !important;
}

/* Красная кнопка (Danger) */
.protect-btn-danger {
    background: #ef4444 !important;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3) !important;
}

.protect-btn-danger:hover {
    background: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4) !important;
}

/* Зеленая кнопка успеха (Success) */
.protect-btn-success {
    background: var(--protect-success) !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}

.protect-btn-success:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4) !important;
}

/* Статистика */
.protect-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.protect-stat-card {
    background: white;
    border: 1px solid var(--protect-gray-200);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.protect-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--protect-primary);
}

.protect-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--protect-gray-900);
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.protect-stat-label {
    font-size: 0.95rem;
    color: var(--protect-gray-600);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.protect-stat-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.protect-stat-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.protect-stat-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* Старые стили для совместимости */
.protect-stat {
    background: white;
    border: 1px solid var(--protect-gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.protect-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--protect-gray-900);
    margin: 0;
}

/* Сетки */
.protect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Карточки атак */
.protect-attack-card {
    background: white;
    border: 2px solid var(--protect-gray-200);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.protect-attack-card:hover {
    border-color: var(--protect-primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.protect-attack-card.critical {
    border-left: 4px solid #dc2626;
}

.protect-attack-card.high {
    border-left: 4px solid #f59e0b;
}

.protect-attack-card.medium {
    border-left: 4px solid #3b82f6;
}

.protect-attack-card.low {
    border-left: 4px solid #6b7280;
}

.attack-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.attack-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.attack-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--protect-gray-900);
    margin: 0 0 0.25rem 0;
}

.attack-header p {
    font-size: 0.85rem;
    color: var(--protect-gray-600);
    margin: 0;
    line-height: 1.4;
}

.attack-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--protect-gray-100);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--protect-gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--protect-success);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.protect-form-select-small {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--protect-gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.protect-form-select-small:focus {
    outline: none;
    border-color: var(--protect-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Фикс для полной видимости контента в админке WordPress */
.wrap.protect-admin form {
    overflow: visible !important;
    height: auto !important;
}

.protection-groups,
.protection-group,
.protect-form-group {
    overflow: visible !important;
    height: auto !important;
}

/* Убедиться, что WordPress admin не обрезает контент */
#wpwrap,
#wpcontent,
#wpbody,
#wpbody-content {
    overflow: visible !important;
    height: auto !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .protect-container {
        padding: 0 1rem;
    }
    
    .protection-item {
        grid-template-columns: 1fr;
    }
    
    .protect-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .protect-card-title {
        font-size: 1.25rem;
    }
    
    .protect-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    /* Навигация по секциям на мобильных */
    .protect-sections-overview {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .section-indicator {
        padding: 0.5rem 0.75rem;
        flex: 1;
        min-width: 70px;
    }
    
    .section-number {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    
    .section-name {
        font-size: 0.7rem;
    }
    
    .section-divider {
        display: none;
    }
    
    /* Адаптация карточек атак */
    .protect-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .protect-attack-card {
        padding: 1rem;
    }
    
    .attack-icon {
        font-size: 1.25rem;
    }
    
    .attack-header h4 {
        font-size: 0.9rem;
    }
    
    .attack-header p {
        font-size: 0.8rem;
    }
    
    .attack-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .toggle-switch {
        align-self: flex-start;
    }
    
    /* Адаптация статистики */
    .protect-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .protect-stat-card {
        padding: 1.25rem;
    }
    
    .protect-stat-number {
        font-size: 2rem;
    }
    
    /* Адаптация таблиц */
    .protect-table {
        font-size: 0.85rem;
    }
    
    .protect-table th,
    .protect-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .protect-table th:first-child,
    .protect-table td:first-child {
        padding-left: 1rem;
    }
    
    .protect-table th:last-child,
    .protect-table td:last-child {
        padding-right: 1rem;
    }
}

/* Таблицы */
.protect-table {
    width: 100%;
    margin-top: 1rem;
    overflow-x: auto;
}

.protect-table table {
    width: 100%;
    border-collapse: collapse;
}

.protect-table thead {
    background: var(--protect-gray-50);
}

.protect-table th {
    text-align: left;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid var(--protect-gray-200);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--protect-gray-700);
    white-space: nowrap;
}

.protect-table th:first-child {
    padding-left: 1.5rem;
}

.protect-table th:last-child {
    padding-right: 1.5rem;
}

.protect-table tbody tr {
    transition: background-color 0.15s ease;
}

.protect-table tbody tr:hover {
    background: var(--protect-gray-50);
}

.protect-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--protect-gray-100);
    font-size: 0.9rem;
    color: var(--protect-gray-800);
}

.protect-table td:first-child {
    padding-left: 1.5rem;
}

.protect-table td:last-child {
    padding-right: 1.5rem;
}

.protect-table td code {
    background: var(--protect-gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* Значки статуса */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: var(--protect-gray-200);
    color: var(--protect-gray-700);
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

/* Значки для статистики */
.protect-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
}

.protect-badge.critical {
    background: #fee2e2;
    color: #991b1b;
}

.protect-badge.high {
    background: #fef3c7;
    color: #92400e;
}

.protect-badge.medium {
    background: #dbeafe;
    color: #1e40af;
}

.protect-badge.low {
    background: #f3f4f6;
    color: #4b5563;
}

/* Убираем стандартные уведомления WordPress */
.notice, div.updated, div.error {
    display: none !important;
}

/* Кнопка "Наверх" */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--protect-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
    display: none;
}

#scroll-to-top:hover {
    background: var(--protect-primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

#scroll-to-top.visible {
    display: block;
}

/* Дополнительный отступ для кнопок действий */
.protect-actions-card {
    margin-bottom: 3rem !important;
}

/* Стили для подразделов внутри секций */
.protect-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--protect-gray-800);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--protect-gray-100);
}

.behavior-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--protect-gray-700);
    margin: 2rem 0 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--protect-gray-50);
    border-left: 4px solid var(--protect-primary);
    border-radius: 4px;
}

/* Улучшение визуального разделения внутри больших секций */
.behavior-section {
    position: relative;
    padding: 1rem 0;
}

.behavior-section:not(:first-of-type) {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--protect-gray-200);
}
