/**
 * SecureGate Captcha Lite - Modern Admin Interface
 * Version: 1.0.0
 * Matches the provided design 100%
 */

/* ============================================================================
   CSS Variables & Theme Colors
   ========================================================================== */
:root {
    /* Primary Colors */
    --sg-primary: #6366f1;
    --sg-primary-hover: #4f46e5;
    --sg-primary-light: #eef2ff;

    /* Accent Colors */
    --sg-blue: #3b82f6;
    --sg-green: #10b981;
    --sg-purple: #8b5cf6;
    --sg-red: #ef4444;
    --sg-orange: #f59e0b;

    /* Status Colors */
    --sg-success: #10b981;
    --sg-warning: #f59e0b;
    --sg-error: #ef4444;
    --sg-info: #3b82f6;

    /* Neutral Colors */
    --sg-gray-50: #f9fafb;
    --sg-gray-100: #f3f4f6;
    --sg-gray-200: #e5e7eb;
    --sg-gray-300: #d1d5db;
    --sg-gray-400: #9ca3af;
    --sg-gray-500: #6b7280;
    --sg-gray-600: #4b5563;
    --sg-gray-700: #374151;
    --sg-gray-800: #1f2937;
    --sg-gray-900: #111827;

    /* Spacing */
    --sg-space-xs: 0.5rem;
    --sg-space-sm: 0.75rem;
    --sg-space-md: 1rem;
    --sg-space-lg: 1.5rem;
    --sg-space-xl: 2rem;
    --sg-space-2xl: 3rem;

    /* Border Radius */
    --sg-radius-sm: 0.375rem;
    --sg-radius-md: 0.5rem;
    --sg-radius-lg: 0.75rem;
    --sg-radius-xl: 1rem;
    --sg-radius-full: 9999px;

    /* Shadows */
    --sg-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --sg-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --sg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sg-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --sg-transition: all 0.2s ease-in-out;
}

/* ============================================================================
   Main Wrapper & Layout
   ========================================================================== */
.wrap.securegate-captcha-admin {
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wrap.securegate-captcha-admin > h1 {
    display: none; /* Hide default WordPress h1 */
}

/* ============================================================================
   Header Section
   ========================================================================== */
.sg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sg-space-xl) 0;
    margin-bottom: var(--sg-space-xl); /* Increased from lg */
}

.sg-header-left {
    display: flex;
    align-items: center;
    gap: var(--sg-space-md);
}

.sg-logo {
    width: 56px;
    height: 56px;
    background: var(--sg-primary);
    border-radius: var(--sg-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sg-shadow-md);
}

.sg-logo .dashicons {
    color: white;
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.sg-title-area h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--sg-gray-900);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
    letter-spacing: -0.5px;
}

.sg-title-large {
    font-size: 36px !important; /* Explicit override requested by user */
}

.sg-subtitle {
    font-size: 15px;
    color: var(--sg-gray-500);
    margin: 0;
    font-weight: 500;
}

.sg-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--sg-radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sg-badge-active {
    background: #dcfce7;
    color: #166534;
}

.sg-badge-high {
    background: #fef3c7;
    color: #92400e;
}

.sg-badge-recommended {
    background: #dbeafe;
    color: #1e40af;
}

.sg-badge-new {
    background: #fae8ff;
    color: #86198f;
}

.sg-badge-caution {
    background: #fee2e2;
    color: #991b1b;
}

.sg-badge-pro {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 800;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 8px;
    margin-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
    position: relative;
    top: -1px; /* Optical centering with 16px font */
}

/* ============================================================================
   Locked Feature Design (Pro Only)
   ========================================================================== */
.sg-pro-locked {
    position: relative;
    opacity: 0.9;
    pointer-events: none;
    transition: var(--sg-transition);
    border-radius: var(--sg-radius-lg);
    user-select: none;
}

.sg-pro-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(3px);
    z-index: 20;
    pointer-events: auto;
    border-radius: inherit;
    border: 1px dashed var(--sg-gray-200);
}

.sg-pro-lock-content {
    text-align: center;
    padding: 24px;
    max-width: 320px;
    background: white;
    border-radius: var(--sg-radius-xl);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--sg-gray-200);
    pointer-events: auto;
    transform: translateY(0);
    transition: var(--sg-transition);
}

.sg-pro-locked:hover .sg-pro-lock-content {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sg-pro-lock-content h3 {
    margin: 12px 0 8px;
    font-size: 16px;
    color: var(--sg-gray-900);
    font-weight: 700;
}

.sg-pro-lock-content p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--sg-gray-500);
    line-height: 1.5;
}

.sg-lock-icon {
    width: 48px;
    height: 48px;
    background: var(--sg-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--sg-primary);
    box-shadow: inset 0 2px 4px rgba(99, 102, 241, 0.1);
}

.sg-upgrade-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6366f1 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: var(--sg-radius-full) !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: var(--sg-transition);
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.sg-upgrade-button:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    color: white !important;
}

/* ============================================================================
   Navigation Tabs
   ========================================================================== */
.nav-tab-wrapper {
    border-bottom: 2px solid var(--sg-gray-200);
    margin: 0 0 var(--sg-space-xl) 0;
    display: flex;
    gap: var(--sg-space-sm);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--sg-gray-600);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--sg-transition);
    cursor: pointer;
}

.nav-tab:hover {
    color: var(--sg-primary);
    background: var(--sg-gray-50);
}

.nav-tab.nav-tab-active {
    color: var(--sg-primary);
    border-bottom-color: var(--sg-primary);
    background: transparent;
}

.nav-tab .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Statistics Cards (Top Row)
   ========================================================================== */
.sg-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sg-space-lg);
    margin-bottom: var(--sg-space-xl);
}

.sg-stat-card {
    background: white;
    border-radius: var(--sg-radius-xl);
    padding: var(--sg-space-xl);
    display: flex;
    align-items: center;
    gap: var(--sg-space-lg);
    box-shadow: var(--sg-shadow-md);
    transition: var(--sg-transition);
    position: relative;
    overflow: hidden;
}

.sg-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: var(--sg-transition);
}

.sg-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sg-shadow-xl);
}

.sg-stat-card:hover::before {
    opacity: 1;
}

.sg-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--sg-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.sg-stat-icon-blue {
    background: #dbeafe;
}

.sg-stat-icon-blue .dashicons {
    color: #1e40af;
    font-size: 28px;
}

.sg-stat-icon-green {
    background: #d1fae5;
}

.sg-stat-icon-green .dashicons {
    color: #065f46;
    font-size: 28px;
}

.sg-stat-icon-purple {
    background: #f3e8ff;
}

.sg-stat-icon-purple .dashicons {
    color: #6b21a8;
    font-size: 28px;
}

.sg-stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.sg-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--sg-gray-600);
    margin-bottom: 4px;
}

.sg-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--sg-gray-900);
    line-height: 1;
    margin-bottom: 8px;
}

.sg-stat-change {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sg-stat-change.sg-stat-positive {
    color: var(--sg-success);
}

.sg-stat-change.sg-stat-negative {
    color: var(--sg-error);
}

/* ============================================================================
   Main Content & Sidebar Layout
   ========================================================================== */
.sg-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--sg-space-xl);
    align-items: start;
}

.sg-main-content {
    min-width: 0; /* Prevent grid blowout */
}

/* ============================================================================
   Card Styles
   ========================================================================== */
.sg-card {
    background: white;
    border-radius: var(--sg-radius-lg);
    box-shadow: var(--sg-shadow-md);
    margin-bottom: var(--sg-space-lg);
    overflow: hidden;
}

.sg-card-header {
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
    padding: var(--sg-space-lg);
    border-bottom: 1px solid var(--sg-gray-200);
}

.sg-card-header .dashicons {
    color: var(--sg-primary);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.sg-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--sg-gray-900);
    margin: 0;
}

.sg-card-body {
    padding: var(--sg-space-xl);
}

.sg-card-description {
    font-size: 14px;
    color: var(--sg-gray-600);
    margin: 0 0 var(--sg-space-lg) 0;
}

/* ============================================================================
   Form Elements
   ========================================================================== */
.sg-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sg-space-lg) 0;
    border-bottom: 1px solid var(--sg-gray-100);
}

.sg-form-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sg-form-row:first-child {
    padding-top: 0;
}

.sg-form-label-group {
    flex: 1;
    max-width: 60%;
}

.sg-form-label-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--sg-gray-900);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
}

.sg-description {
    font-size: 13px;
    color: var(--sg-gray-500);
    margin: 4px 0 0 0;
    line-height: 1.5;
}

.sg-form-control {
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
}

/* ============================================================================
   Toggle Switch (iOS Style)
   ========================================================================== */
.sg-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.sg-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sg-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--sg-gray-300);
    transition: var(--sg-transition);
    border-radius: var(--sg-radius-full);
}

.sg-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--sg-transition);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sg-toggle input:checked + .sg-toggle-slider {
    background-color: var(--sg-primary);
}

.sg-toggle input:checked + .sg-toggle-slider:before {
    transform: translateX(20px);
}

.sg-toggle input:focus + .sg-toggle-slider {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Warning toggle variant */
.sg-toggle-warning input:checked + .sg-toggle-slider {
    background-color: var(--sg-error);
}

/* ============================================================================
   Status Indicator
   ========================================================================== */
.sg-status-indicator {
    font-size: 12px;
    font-weight: 600;
    color: var(--sg-success);
    margin-left: var(--sg-space-sm);
}

.sg-status-active {
    color: var(--sg-success);
}

/* ============================================================================
   Divider
   ========================================================================== */
.sg-divider {
    height: 1px;
    background: var(--sg-gray-100);
    margin: var(--sg-space-lg) 0;
}

/* ============================================================================
   Alert Messages
   ========================================================================== */
.sg-alert {
    display: flex;
    align-items: start;
    gap: var(--sg-space-sm);
    padding: var(--sg-space-md);
    border-radius: var(--sg-radius-md);
    margin: var(--sg-space-lg) 0;
    font-size: 14px;
    line-height: 1.5;
}

.sg-alert .dashicons {
    flex-shrink: 0;
    margin-top: 2px;
}

.sg-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.sg-alert-warning .dashicons {
    color: #f59e0b;
}

/* ============================================================================
   Sidebar
   ========================================================================== */
.sg-sidebar {
    position: sticky;
    top: 32px;
}

.sg-sidebar-card {
    background: white;
    border-radius: var(--sg-radius-lg);
    box-shadow: var(--sg-shadow-md);
    padding: var(--sg-space-lg);
    margin-bottom: var(--sg-space-lg);
}

.sg-sidebar-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sg-gray-900);
    margin: 0 0 var(--sg-space-xs) 0;
}

.sg-sidebar-card > p {
    font-size: 13px;
    color: var(--sg-gray-500);
    margin: 0 0 var(--sg-space-md) 0;
}

/* ============================================================================
   Quick Stats (Sidebar)
   ========================================================================== */
.sg-quick-stat {
    padding: var(--sg-space-md) 0;
    border-bottom: 1px solid var(--sg-gray-100);
}

.sg-quick-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sg-quick-stat:first-child {
    padding-top: 0;
}

.sg-quick-stat-label {
    display: flex;
    align-items: center;
    gap: var(--sg-space-xs);
    font-size: 13px;
    font-weight: 500;
    color: var(--sg-gray-600);
    margin-bottom: 4px;
}

.sg-quick-stat-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--sg-gray-400);
}

.sg-quick-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--sg-gray-900);
    margin-bottom: 2px;
}

.sg-quick-stat-desc {
    font-size: 12px;
    color: var(--sg-gray-500);
}

/* ============================================================================
   Resource Links (Sidebar)
   ========================================================================== */
.sg-resource-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sg-space-sm) var(--sg-space-md);
    margin: var(--sg-space-xs) 0;
    border-radius: var(--sg-radius-md);
    text-decoration: none;
    color: var(--sg-gray-700);
    font-size: 14px;
    font-weight: 500;
    transition: var(--sg-transition);
}

.sg-resource-link:hover {
    background: var(--sg-gray-50);
    color: var(--sg-primary);
}

.sg-resource-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.sg-resource-link .dashicons-external {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* ============================================================================
   Love Card (Sidebar)
   ========================================================================== */
.sg-love-card {
    text-align: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 100%);
}

.sg-love-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sg-space-md) auto;
    box-shadow: var(--sg-shadow-md);
}

.sg-love-icon .dashicons {
    color: #ef4444;
    font-size: 24px;
}

.sg-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: var(--sg-space-md) 0;
}

.sg-stars .dashicons {
    color: #fbbf24;
    font-size: 20px;
}

.sg-review-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sg-space-xs);
    padding: var(--sg-space-sm) var(--sg-space-lg);
    background: white;
    color: var(--sg-primary);
    text-decoration: none;
    border-radius: var(--sg-radius-full);
    font-size: 14px;
    font-weight: 600;
    transition: var(--sg-transition);
    box-shadow: var(--sg-shadow-sm);
}

.sg-review-link:hover {
    background: var(--sg-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--sg-shadow-md);
}

/* ============================================================================
   Form Inputs
   ========================================================================== */
.sg-input,
.sg-select,
.sg-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--sg-gray-300);
    border-radius: var(--sg-radius-md);
    font-size: 14px;
    color: var(--sg-gray-900);
    background: white;
    transition: var(--sg-transition);
}

.sg-input:focus,
.sg-select:focus,
.sg-textarea:focus {
    outline: none;
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sg-input-number {
    width: 120px;
}

.sg-select-modern {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--sg-gray-300);
    border-radius: var(--sg-radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--sg-gray-700);
    line-height: inherit;
    transition: var(--sg-transition);
    cursor: pointer;
    min-width: 160px;
}

.sg-select-modern:hover {
    border-color: var(--sg-gray-400);
}

.sg-select-modern:focus {
    outline: none;
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================================================
   Radio Button Groups
   ========================================================================== */
.sg-radio-group {
    display: flex;
    gap: var(--sg-space-md);
}

.sg-radio-option {
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
    cursor: pointer;
}

.sg-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.sg-radio-label {
    display: flex;
    align-items: center;
    gap: var(--sg-space-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--sg-gray-700);
}

/* ============================================================================
   Form Actions (Save Button)
   ========================================================================== */
.sg-form-actions {
    margin-top: var(--sg-space-xl);
    padding-top: var(--sg-space-xl);
    border-top: 1px solid var(--sg-gray-200);
}

.sg-button {
    display: inline-flex;
    align-items: center;
    gap: var(--sg-space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--sg-radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sg-transition);
    text-decoration: none;
}

.sg-button-primary {
    background: var(--sg-primary);
    color: white;
    box-shadow: var(--sg-shadow-md);
}

.sg-button-primary:hover {
    background: var(--sg-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--sg-shadow-lg);
}

.sg-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Success Notice
   ========================================================================== */
.notice.notice-success.is-dismissible {
    background: #ecfdf5;
    border-left-color: #10b981;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: var(--sg-space-sm);
}

.notice.notice-success.is-dismissible p {
    margin: 0;
    color: #065f46;
}

.notice.notice-success.is-dismissible strong {
    color: #047857;
}

/* ============================================================================
   WordPress Core Overrides
   ========================================================================== */
.wrap.securegate-captcha-admin .form-table {
    display: none; /* Hide default WordPress form table */
}

#submit {
    display: none !important; /* Hide default submit button */
}

/* ============================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 1200px) {
    .sg-content-wrapper {
        grid-template-columns: 1fr;
    }

    .sg-sidebar {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .sg-stats-grid {
        grid-template-columns: 1fr;
    }

    .sg-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sg-space-sm);
    }

    .sg-form-label-group {
        max-width: 100%;
    }

    .sg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sg-space-md);
    }
}

@media screen and (max-width: 480px) {
    .sg-logo {
        width: 48px;
        height: 48px;
    }

    .sg-title-area h1 {
        font-size: 24px;
    }

    .nav-tab-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================================
   Review Notice
   ========================================================================== */
.securegate-review-notice {
    padding: 20px !important;
    border-left: 4px solid #3b82f6 !important; /* Blue Accent */
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    border-radius: 4px;
    margin-top: 20px;
}

.securegate-review-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.securegate-review-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #eff6ff; /* Light blue */
    border-radius: 8px; /* Rounded square */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.securegate-review-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.securegate-review-text h3 {
    margin: 0 0 6px 0 !important;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.securegate-review-text p {
    margin: 0 0 16px 0 !important;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
    max-width: 800px;
}

.securegate-review-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.securegate-review-actions .button {
    height: 36px;
    line-height: 34px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 500;
}

.sg-rate-now-btn {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.sg-rate-now-btn:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.securegate-maybe-later-btn,
.securegate-already-did-btn {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
}

.securegate-maybe-later-btn:hover,
.securegate-already-did-btn:hover {
    border-color: #9ca3af !important;
    color: #1f2937 !important;
    background: #f9fafb !important;
}

.securegate-review-notice .notice-dismiss {
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    text-decoration: none;
    opacity: 0.5;
}

.securegate-review-notice .notice-dismiss:hover {
    opacity: 1;
}

/* Hide default notice styles ensure flex layout handles content */
.securegate-review-notice p:empty {
    display: none;
}

.securegate-review-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.securegate-review-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--sg-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sg-primary);
}

.securegate-review-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.securegate-review-text h3 {
    margin: 0 0 8px 0 !important;
    font-size: 16px;
    font-weight: 600;
    color: var(--sg-gray-900);
}

.securegate-review-text p {
    margin: 0 0 15px 0 !important;
    font-size: 14px;
    color: var(--sg-gray-600);
    max-width: 600px;
}

.securegate-review-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.securegate-review-notice .notice-dismiss {
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    text-decoration: none;
    opacity: 0.5;
}

.securegate-review-notice .notice-dismiss:hover {
    opacity: 1;
}

/* Hide default notice styles we don't want */
.securegate-review-notice p:empty {
    display: none;
}

/* ============================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sg-card,
.sg-stat-card {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================================
   Print Styles
   ========================================================================== */

/* ============================================================================
   Redesign UI Styles (Migrated from PHP)
   ========================================================================== */
#wpcontent{
    padding-left: 0 !important;
}

#wpbody-content { 
    background: #f9fafb !important;

}
#wpfooter { display: none !important; }
.securegate-captcha-admin { background: #f9fafb; min-height: calc(100vh - 32px); padding: 24px 40px !important; }
.sg-version-pill { background: #ecfdf5; color: #065f46; padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d1fae5; }
.sg-version-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }

/* Enhanced Tabs */
.sg-nav-tab {
    display: flex; align-items: center; gap: 10px; padding: 18px 28px; 
    font-size: 15px; font-weight: 500; text-decoration: none; 
    border-bottom: 2px solid transparent; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
}
.sg-nav-tab:hover {
    color: #6366f1;
    border-bottom-color: #e0e7ff;
    background: rgba(99, 102, 241, 0.02);
}
.sg-nav-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}
.sg-nav-tab:focus {
    outline: none;
    box-shadow: none;
}
.sg-nav-tab svg {
    transition: transform 0.3s ease, color 0.3s;
    color: inherit;
}
.sg-nav-tab:hover svg, .sg-nav-tab.active svg {
    transform: scale(1.1);
}

/* Card Styling */
.sg-sidebar-card {
    background: white; border-radius: 20px; padding: 32px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px; border: 1px solid #f1f5f9;
}

.sg-save-button {
    background: #6366f1 !important; 
    border-color: #6366f1 !important; 
    padding: 14px 44px !important; 
    font-size: 16px !important; 
    font-weight: 700 !important; 
    border-radius: 12px !important; 
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: white !important;
    cursor: pointer;
    border: 1px solid transparent;
}
.sg-save-button:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.3) !important;
}
.sg-save-button:active { transform: translateY(0); }

.sg-provider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sg-provider-card .sg-provider-icon {
    width: 32px;
    height: 32px;
}
.sg-accordion-header .sg-provider-icon {
    width: 44px;
    height: 44px;
}
.sg-provider-icon svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

/* Providers Selection Grid */
.sg-providers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.sg-provider-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.sg-provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.sg-provider-card.active {
    border-color: #6366f1;
    background: #fdfeff;
    box-shadow: 0 0 0 1px #6366f1, 0 10px 15px -10px rgba(99, 102, 241, 0.2);
}
.sg-provider-card.sg-pro-locked-card {
    cursor: default;
    pointer-events: none;
    opacity: 1; /* Keep full visibility but keep grayscale on icon */
    background: white !important;
}

.sg-provider-card.sg-pro-locked-card .sg-provider-icon {
    filter: opacity(0.8); /* Removed grayscale, just slight transparency for locked state */
}
.sg-type-grid {
    display: flex;
    gap: var(--sg-space-md);
    flex-wrap: wrap;
    margin-top: var(--sg-space-sm);
}
.sg-type-card {
    background: white;
    border: 1px solid var(--sg-gray-300);
    border-radius: var(--sg-radius-lg);
    padding: var(--sg-space-md) var(--sg-space-lg);
    cursor: pointer;
    transition: var(--sg-transition);
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.sg-type-card:hover {
    border-color: var(--sg-gray-400);
    background: var(--sg-gray-50);
}
.sg-type-card.active {
    border-color: var(--sg-primary);
    background: var(--sg-primary-light);
    box-shadow: 0 0 0 1px var(--sg-primary), var(--sg-shadow-sm);
}
.sg-type-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    background: var(--sg-primary);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sg-type-card.active::after {
    transform: translateY(-50%) scale(1);
}
.sg-type-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sg-gray-600);
}
.sg-type-card.active .sg-type-card-title {
    color: var(--sg-primary);
    font-weight: 700;
}
.sg-provider-status {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-ready { background: #f1f5f9; color: #64748b; }
.status-active { background: #0f172a; color: white; }
.status-inactive { background: #fee2e2; color: #991b1b; }
.status-pro { 
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); 
    color: white; 
    padding: 5px 16px; 
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4); 
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.3); 
    font-weight: 600;
    letter-spacing: 0.5px;
}
.status-active circle { fill: #fff; }
.status-ready circle { fill: #94a3b8; }
.status-inactive circle { fill: #ef4444; }
.status-pro circle { fill: #fff; }

/* Accordion Styling */
.sg-accordion {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.sg-accordion-header {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}
.sg-accordion-header:hover {
    background: #fbfcfe;
}
.sg-accordion-content {
    display: none;
    padding: 0 32px 32px 32px;
    border-top: 1px solid #f8fafc;
}
.sg-accordion.expanded .sg-accordion-content {
    display: block;
}
.sg-accordion.expanded .sg-accordion-header {
    background: #fdfeff;
}
.sg-info-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 28px;
}
.sg-info-box.success {
    background: #f0fdf4;
    border-color: #dcfce7;
}
.sg-info-box-title { color: #1e40af; font-weight: 700; font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sg-info-box.success .sg-info-box-title { color: #166534; }
.sg-info-box-text { color: #1e40af; font-size: 13px; line-height: 1.6; opacity: 0.8; }
.sg-info-box.success .sg-info-box-text { color: #166534; }
.sg-dashboard-link { display: inline-flex; align-items: center; gap: 6px; color: #2563eb; font-weight: 600; font-size: 13px; margin-top: 10px; text-decoration: none; }

.sg-field-group { margin-bottom: 24px; }
.sg-field-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 10px; }
.sg-field-sublabel { font-size: 14px; font-weight: 700; color: #1e293b; margin: 32px 0 16px 0; border-top: 1px solid #f1f5f9; padding-top: 32px; }

.sg-input-modern, .sg-select-modern { 
    width: 100%; background: #f8fafc !important; border: 1px solid #e2e8f0 !important; 
    padding: 14px 20px !important; border-radius: 10px !important; font-size: 14px !important; 
    color: #1e293b !important;
}
.sg-select-modern {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%2394a3b8%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e') !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 18px !important;
    cursor: pointer;
}
.sg-input-modern:focus, .sg-select-modern:focus { background: #fff !important; border-color: #6366f1 !important; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08) !important; outline: none !important; }

.sg-test-config { padding-top: 24px; display: flex; justify-content: center; width: 100%; }
.sg-test-button { 
    width: 100%; background: white; border: 1px solid #e2e8f0; padding: 14px; border-radius: 10px; 
    font-size: 14px; font-weight: 600; color: #475569; display: flex; align-items: center; 
    justify-content: center; gap: 10px; cursor: pointer; transition: all 0.2s;
}
.sg-test-button:hover { background: #f8fafc; border-color: #cbd5e1; }

.sg-badge-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Protected Forms Redesign */
.sg-protected-section {
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.sg-protected-header {
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 16px 16px 0 0;
}
.sg-protected-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}
.sg-protected-header-title {
    flex: 1;
}
.sg-protected-header-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.sg-protected-header-title p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #64748b;
}
.sg-status-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.sg-protected-body {
    padding: 12px 24px 24px 24px;
}
.sg-protected-item {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sg-protected-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
}
.sg-protected-item-icon {
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sg-protected-item:hover .sg-protected-item-icon {
    background: #f1f5f9;
    color: #0f172a;
}
.sg-protected-item-content {
    flex: 1;
}
.sg-protected-item-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
}
.sg-protected-item-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}
.sg-info-icon-small {
    color: #cbd5e1;
    cursor: help;
    transition: color 0.2s;
}
.sg-info-icon-small:hover { color: #94a3b8; }

/* Modern Toggle Styling */
.sg-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.sg-toggle input { opacity: 0; width: 0; height: 0; }
.sg-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}
.sg-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
input:checked + .sg-toggle-slider { background-color: #0f172a; }
input:focus + .sg-toggle-slider { box-shadow: 0 0 1px #0f172a; }
input:checked + .sg-toggle-slider:before { transform: translateX(18px); }

.sg-smart-detection {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    gap: 24px;
    margin-top: 12px;
}
.sg-smart-detection-icon {
    width: 48px;
    height: 48px;
    background: #3b82f6;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.3);
}
.sg-smart-detection-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.01em;
}
.sg-smart-detection-content p {
    margin: 0;
    font-size: 14px;
    color: #3b82f6;
    line-height: 1.7;
    font-weight: 500;
}
.sg-smart-detection-content .note {
    margin-top: 12px;
    display: block;
    font-size: 13px;
    opacity: 0.85;
}

/* Security Rules Redesign */
.sg-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.sg-kpi-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.sg-kpi-content h4 {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
}
.sg-kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}
.sg-kpi-subvalue {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.sg-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sg-slider-container {
    padding: 24px 0;
}
.sg-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.sg-slider-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sg-slider-value-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}
.sg-range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    outline: none;
    margin: 10px 0;
}
.sg-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #0f172a;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.sg-slider-steps {
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin-top: 12px;
}
.sg-slider-step {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sg-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
.sg-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sg-text-input {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sg-text-input:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.sg-text-input:focus {
    background: white;
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0,0,0,0.08);
}

.sg-add-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.sg-add-button {
    background: #0f172a !important;
    color: white !important;
    border: none !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    height: 46px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}
.sg-add-button:hover {
    background: #1e293b !important;
    transform: translateY(-1px);
}

.sg-chip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.sg-chip {
    background: white;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
    transition: all 0.2s;
}
.sg-chip:hover { border-color: #fecaca; background: #fffafb; }
.sg-chip-remove {
    color: #f87171;
    cursor: pointer;
    transition: color 0.2s;
}
.sg-chip-remove:hover { color: #ef4444; }

.sg-alert {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.sg-alert-icon { color: #3b82f6; flex-shrink: 0; }
.sg-alert-content h5 { margin: 0 0 4px 0; font-size: 14px; font-weight: 700; color: #1e40af; }
.sg-alert-content p { margin: 0; font-size: 13px; color: #3b82f6; font-weight: 500; }

.sg-geo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.sg-geo-chip {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.sg-geo-chip:hover { border-color: #cbd5e1; }
.sg-geo-chip.blocked { border-color: #fee2e2; color: #ef4444; background: #fffcfc; }
.sg-geo-icon { color: #ef4444; }

.sg-notice-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    gap: 24px;
    margin-top: 40px;
}
.sg-notice-icon {
    width: 48px;
    height: 48px;
    background: #f59e0b;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sg-notice-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
}
.sg-notice-content ul {
    margin: 0;
    padding: 0 0 0 20px;
    color: #b45309;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.sg-badge-ai {
    background: #0f172a;
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sg-badge-premium {
    background: #f1f5f9;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e2e8f0;
}

/* Analytics Redesign */
.sg-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.sg-time-range-select {
    background: white;
    border: 1px solid #f1f5f9;
    padding: 10px 24px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    min-width: 260px;
    cursor: pointer;
    transition: all 0.2s;
}

.sg-time-range-select:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.sg-trend-badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sg-trend-up { background: #dcfce7; color: #10b981; }
.sg-trend-down { background: #fee2e2; color: #ef4444; }

.sg-chart-container {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
}
.sg-chart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
}
.sg-chart-body { padding: 32px; }

.sg-viz-placeholder {
    width: 100%;
    height: 240px;
    background: #fcfdfe;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 14px;
    position: relative;
}

.sg-ip-list { display: flex; flex-direction: column; gap: 12px; }
.sg-ip-row {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.sg-ip-row:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.sg-ip-info { display: flex; align-items: center; gap: 20px; }
.sg-ip-rank {
    width: 32px;
    height: 32px;
    background: #fff1f2;
    color: #ef4444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}
.sg-ip-addr { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.sg-ip-geo { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 4px; }
.sg-ip-stats { text-align: right; }
.sg-ip-count { font-size: 18px; font-weight: 800; color: #0f172a; }
.sg-ip-label { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; }

.sg-export-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}
.sg-button-group { display: flex; gap: 12px; }
.sg-btn-outline {
    background: white;
    border: 1px solid #dbeafe;
    color: #3b82f6;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.sg-btn-outline:hover { background: #f8faff; border-color: #3b82f6; }

/* Resource Links Hover */
.sg-resource-link {
    display: flex !important; align-items: center !important; gap: 16px !important; 
    text-decoration: none !important; padding: 12px; margin: 0 -12px; 
    border-radius: 12px; transition: all 0.2s ease-in-out;
}
.sg-resource-link:hover {
    background: #f8fafc;
    transform: translateX(4px);
}
.sg-resource-link svg.sg-arrow {
    transition: transform 0.2s ease, color 0.2s;
}
.sg-resource-link:hover svg.sg-arrow {
    transform: translateX(3px);
    color: #6366f1 !important;
}

/* Toast Notification */
.securegate-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #10b981;
    color: white;
    padding: 14px 28px;
    border-radius: 99px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
.securegate-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.securegate-toast.hidden {
    display: none;
}
.securegate-toast-icon { display: flex; align-items: center; }
.securegate-toast-content { font-weight: 600; font-size: 14px; margin-right: 12px; }
.securegate-toast-dismiss {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.2s;
}
.securegate-toast-dismiss:hover { opacity: 1; background: rgba(255,255,255,0.2); }

/* ============================================================================
   Analytics Dashboard Redesign (Premium)
   ========================================================================== */
.sg-select-modern {
    background: white;
    padding: 8px 36px 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    transition: all 0.2s;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sg-select-modern:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.sg-select-modern:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sg-live-sync {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
}

.sg-live-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: sg-pulse 2s infinite;
}

@keyframes sg-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* KPI Grid */
.sg-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.sg-kpi-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(241, 245, 249, 0.8);
    transition: all 0.3s ease;
}

.sg-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

.sg-kpi-content h4 {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.sg-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0px;
    letter-spacing: -0.5px;
}

.sg-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Charts */
.sg-chart-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(241, 245, 249, 1);
}

.sg-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}

.sg-chart-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.sg-chart-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

.sg-chart-legend {
    display: flex;
    gap: 16px;
}

.sg-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.sg-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* IP Table */
.sg-ip-table-wrapper {
    overflow-x: auto;
}

.sg-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.sg-data-table th {
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sg-data-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f8fafc;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.sg-data-table tr:hover td {
    background: #fcfdfe;
}

.sg-rank-pill {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
}

.sg-ip-col code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.sg-badge-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.status-critical { background: #fee2e2; color: #991b1b; }
.status-high { background: #fef3c7; color: #92400e; }

.sg-btn-small {
    background: #0f172a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sg-btn-small:hover {
    background: #334155;
}

/* Export Footer */
.sg-export-footer {
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    padding: 40px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-top: 40px;
    box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.4);
}

.sg-export-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.sg-export-footer h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.sg-export-footer p {
    margin: 8px 0 0 0;
    font-size: 15px;
    opacity: 0.9;
}

.sg-export-btn {
    background: white;
    color: #6366f1;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.sg-export-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Misc Badges */
.sg-badge-outline {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.sg-trend-up { background: #dcfce7; color: #166534; }
.sg-trend-down { background: #fee2e2; color: #991b1b; }

/* ============================================================================
   Page Footer
   ========================================================================== */
.sg-admin-footer {
    text-align: center;
    padding: 32px 0;
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.sg-admin-footer span {
    color: #64748b;
    font-weight: 600;
}

/* ============================================================================
   Tooltip
   ========================================================================== */
.sg-info-icon-small {
    position: relative;
    cursor: help;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    transition: color 0.2s;
}

.sg-info-icon-small:hover {
    color: #6366f1;
}

.sg-info-icon-small[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 14px;
    background: #0f172a;
    color: white;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.sg-info-icon-small[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    pointer-events: none;
}

.sg-info-icon-small[data-tooltip]:hover:before,
.sg-info-icon-small[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   Refactored Inline Styles
   ========================================================================== */
.sg-accordion-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sg-provider-header-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sg-provider-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sg-badge-pill-light {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 99px;
}

.sg-provider-desc {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

.sg-info-box-spaced {
    margin-top: 24px;
}

.sg-sub-settings-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0 24px 24px 24px;
    border: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.sg-sub-settings-label {
    border: none;
    padding-top: 24px;
    margin-bottom: 24px;
}

.sg-mb-0 {
    margin-bottom: 0 !important;
}

.sg-text-blue-900 {
    color: #1e40af;
}

.sg-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.sg-bg-orange {
    background: #f97316;
}

.sg-header-red-tint {
    background: #fffcfc;
}

.sg-bg-red {
    background: #ef4444;
}

.sg-textarea-dynamic {
    flex: 1;
    min-height: 100px;
}

.sg-section-subtitle {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.sg-section-subtitle.mt-5 {
    margin-top: 20px;
}

.sg-empty-state {
    font-size: 14px;
    color: #94a3b8;
    padding: 12px 0;
}

.sg-header-blue-tint {
    background: #fcfdfe;
}

.sg-bg-blue {
    background: #3b82f6;
}

.sg-textarea-full {
    width: 100%;
    min-height: 100px;
}

.sg-notice-warning-text {
    margin-bottom: 12px;
    font-weight: 600;
    color: #92400e;
}

.sg-kpi-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sg-kpi-icon-blue { background: #eff6ff; color: #3b82f6; }
.sg-kpi-icon-green { background: #dcfce7; color: #10b981; }
.sg-kpi-icon-red { background: #fff1f2; color: #ef4444; }
.sg-kpi-icon-purple { background: #fdf4ff; color: #a855f7; }
.sg-kpi-icon-orange { background: #fff7ed; color: #f97316; }

.sg-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.sg-no-data {
    padding: 40px 20px;
    color: #94a3b8;
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    font-size: 14px;
    margin-top: 10px;
}

.sg-icon-header-small {
    background: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.sg-header-title-small {
    font-size: 16px;
    font-weight: 700;
}

.sg-header-desc-small {
    font-size: 13px;
}

.sg-protected-body-flush {
    padding: 0;
}

.sg-table-empty {
    padding: 32px;
    text-align: center;
    color: #94a3b8;
}

.sg-flex-center-gap-6 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sg-text-bold-dark {
    font-weight: 700;
    color: #0f172a;
}

.sg-export-section {
    margin-top: 32px;
    background: #fdf4ff;
    border-left: 4px solid #a855f7;
    transition: all 0.2s;
}

.sg-icon-purple-faded {
    background: #f3e8ff;
    color: #9333ea;
}

.sg-export-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.sg-export-desc {
    font-size: 13px;
    color: #64748b;
}

.sg-btn-primary-purple {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background-color: #7e22ce;
    border-color: #6b21a8;
}

.sg-export-body {
    background: #fff;
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
}

.sg-tip-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sg-tip-icon {
    flex-shrink: 0;
    padding-top: 2px;
}

.sg-tip-content {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* Analytics Section */
.sg-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.sg-range-selector {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sg-stat-row {
    margin-bottom: 20px;
}

.sg-stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.sg-stat-header span:last-child {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 500;
    color: #64748b;
    font-size: 13px;
}

.sg-stat-bar-bg {
    width: 100%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.sg-stat-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sg-stat-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
}

.sg-stat-bar-fill-purple {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.sg-stat-bar-fill-green {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}


/* Structural Classes for Admin Wrapper */
.sg-admin-wrapper {
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 20px;
}

.sg-admin-container {
    max-width: 1600px;
    margin: 0;
}

.sg-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: white;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sg-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-page-title {
    margin: 0;
    font-size: 36px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -1.5px;
}

.sg-page-subtitle {
    margin: 2px 0 0 0;
    font-size: 22px;
    color: #64748b;
    font-weight: 400;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.sg-nav-container {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    position: sticky;
    top: 32px;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sg-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
    padding: 20px 8px;
    margin: 0;
}

.sg-section-header {
    margin-bottom: 20px;
}

.sg-section-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.sg-section-desc {
    margin: 6px 0 0 0;
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
}

.sg-save-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-start;
}

.sg-sidebar-sticky {
    position: sticky;
    top: 110px;
}

.sg-sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.sg-sidebar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.sg-license-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.sg-license-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.sg-license-row:last-child {
    margin-bottom: 0;
}

.sg-license-label {
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
}

.sg-license-val-pro {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.sg-license-val-ver {
    font-size: 12px;
    font-weight: 500;
    color: #10b981;
    background: #dcfce7;
    padding: 4px 12px;
    border-radius: 99px;
}

.sg-license-val-update {
    font-size: 14px;
    font-weight: 500;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-update-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.sg-btn-manage {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.sg-resource-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-resource-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.sg-resource-icon-doc {
    width: 48px;
    height: 48px;
    background: #eef2ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-resource-icon-support {
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-resource-text {
    flex: 1;
}

.sg-resource-title {
    font-size: 16px;
    font-weight: 400;
    color: #1e293b;
}

/* Background Color Utilities */
.sg-bg-red {
    background-color: #ef4444 !important;
}

.sg-bg-blue {
    background-color: #3b82f6 !important;
}

.sg-bg-green {
    background-color: #10b981 !important;
}

.sg-bg-orange {
    background-color: #f59e0b !important;
}

.sg-bg-purple {
    background-color: #8b5cf6 !important;
}



/* Support Center Card - 100% Match Design */
.sg-support-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.03);
}

.sg-support-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.sg-support-header-icon {
    width: 36px;
    height: 36px;
    background: #6365f11a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;

}

.sg-support-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.sg-support-desc {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 28px;
    padding-right: 10px;
}

.sg-support-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-support-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    outline: none !important;
    border: 1px solid transparent;
}

.sg-support-item:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

.sg-support-item:hover .sg-support-icon-box {
    transform: scale(1.05);
}

.sg-support-item:hover .sg-support-arrow {
    transform: translateX(3px);
    color: #6366f1;
}

.sg-support-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out;
}

.sg-support-icon-blue { background: #eff6ff !important; color: #3b82f6 !important; }
.sg-support-icon-green { background: #ecfdf5 !important; color: #10b981 !important; }
.sg-support-icon-purple { background: #fdf4ff !important; color: #a855f7 !important; }

.sg-support-info {
    flex: 1;
}

.sg-support-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
    transition: color 0.3s ease;
}

.sg-support-subtitle {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

.sg-support-arrow {
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.sg-rate-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.sg-rate-pill {
    background: #ffffff;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.sg-rate-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

.sg-rate-pill:hover .sg-star-icon {
    transform: rotate(15deg) scale(1.1);
}

.sg-star-icon {
    color: #fbbf24;
    font-size: 16px;
    transition: transform 0.2s ease-in-out;
}

/* Removed pulse and gradient morph for minimal look */

/* ============================================================================
   Sidebar Cards (Pro Features & Support)
   ========================================================================== */
.sg-pro-card {
    background: #0f172a;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--sg-space-xl);
    padding: var(--sg-space-lg);
    border-radius: var(--sg-radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.sg-pro-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sg-pro-header {
    display: flex;
    align-items: center;
    gap: var(--sg-space-md);
    margin-bottom: var(--sg-space-lg);
    position: relative;
    z-index: 1;
}

.sg-pro-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08); /* Increased contrast slightly */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--sg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.sg-pro-icon svg {
    stroke: #ffffff;
}

.sg-pro-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.sg-pro-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduced from var(--sg-space-sm) */
    margin-bottom: var(--sg-space-lg);
    position: relative;
    z-index: 1;
}

.sg-pro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    padding: 3px 0;
}

.sg-pro-checkmark {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sg-pro-checkmark svg {
    stroke: white;
    stroke-width: 3;
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.sg-pro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 10;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    margin-top: auto;
}

.sg-pro-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}



.sg-support-card {
    background: #ffffff;
    border-radius: var(--sg-radius-lg);
    padding: var(--sg-space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sg-support-header {
    display: flex;
    align-items: center;
    gap: var(--sg-space-md);
    margin-bottom: var(--sg-space-md);
}

.sg-support-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.06); /* Very low opacity primary */
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--sg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--sg-primary);
}

.sg-support-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--sg-gray-900);
}

.sg-support-desc {
    color: var(--sg-gray-500);
    font-size: 0.875rem;
    margin-bottom: var(--sg-space-md);
}

.sg-support-list {
    display: flex;
    flex-direction: column;
    gap: var(--sg-space-sm);
}

.sg-support-item {
    display: flex;
    align-items: center;
    gap: var(--sg-space-md);
    padding: var(--sg-space-sm);
    border-radius: var(--sg-radius-md);
    text-decoration: none;
    transition: var(--sg-transition);
}

.sg-support-item:hover {
    background: var(--sg-gray-50);
}

.sg-support-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--sg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-support-icon-blue { background: #eff6ff; color: #3b82f6; }
.sg-support-icon-green { background: #ecfdf5; color: #10b981; }
.sg-support-icon-purple { background: #f5f3ff; color: #8b5cf6; }

.sg-support-info {
    flex-grow: 1;
}

.sg-support-title {
    font-weight: 600;
    color: var(--sg-gray-900);
    font-size: 0.875rem;
}

.sg-support-subtitle {
    font-size: 0.75rem;
    color: var(--sg-gray-500);
}

.sg-support-arrow {
    color: var(--sg-gray-400);
}

/* ============================================================================
   Pro Upgrade CTA Box
   ========================================================================== */
.sg-pro-cta-box {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.sg-pro-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(129, 140, 248, 0.15), transparent 60%);
    pointer-events: none;
}

.sg-pro-cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.sg-pro-cta-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.sg-pro-cta-title {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.sg-pro-cta-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5e1;
    max-width: 600px;
}

.sg-pro-cta-desc strong {
    color: white;
    font-weight: 600;
}

.sg-pro-cta-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #6366f1;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sg-pro-cta-button:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: white;
}

.sg-pro-crown {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
}

/* --- Our Plugins Page (100% Lite Parity) --- */
.botshield-our-plugins-wrap {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.botshield-our-plugins-wrap .botshield-header {
    margin-bottom: 20px;
}

.botshield-our-plugins-wrap .botshield-logo-section {
    display: flex;
    align-items: center;
    gap: 0;
}

.botshield-our-plugins-wrap .botshield-title-group h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #101010;
    letter-spacing: -0.025em;
}

.botshield-our-plugins-wrap .botshield-title-group .botshield-subtitle {
    font-size: 18px;
    color: #475569;
    max-width: 700px;
}

.botshield-plugins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.botshield-plugin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.botshield-plugin-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6; /* Changed var(--aips-primary) to actual color to prevent missing var issue */
    box-shadow: none;
}

.botshield-plugin-pro {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.botshield-plugin-badge-top {
    position: absolute;
    top: 15px;
    right: -35px;
    background: #101010;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 40px;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.botshield-plugin-badge-top.botshield-badge-discount {
    background: #ef4444;
}

.botshield-plugin-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botshield-plugin-icon img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.botshield-plugin-info h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #101010;
}

.botshield-plugin-info p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #646970; /* Replaced var(--aips-text-secondary) */
    min-height: 72px;
}

.botshield-plugin-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.botshield-plugin-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.botshield-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.botshield-tag-free { background: #dcfce7; color: #166534; }
.botshield-tag-pro { background: #fef9c3; color: #854d0e; }
.botshield-tag-woo { background: #f3e8ff; color: #6b21a8; }
.botshield-tag-hot { background: #fee2e2; color: #991b1b; }
.botshield-tag-security { background: #dbeafe; color: #1e40af; }
.botshield-tag-form { background: #ecfdf5; color: #065f46; }
.botshield-tag-geo { background: #fff7ed; color: #9a3412; }
.botshield-tag-fraud { background: #fff1f2; color: #9f1239; }
.botshield-tag-price { background: #f0fdf4; color: #166534; }
.botshield-tag-ai { background: #eff6ff; color: #1e40af; }

.botshield-plugin-footer .button {
    border-radius: 10px;
    font-weight: 700;
    padding: 8px 20px !important;
    transition: all 0.2s ease;
    border: none !important;
    text-transform: none;
    font-size: 14px !important;
    height: auto;
    line-height: 1.4;
}

.botshield-plugin-footer .button-primary,
.botshield-plugin-footer .button-secondary {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2) !important;
    text-decoration: none !important;
}

.botshield-plugin-footer .button-primary:hover,
.botshield-plugin-footer .button-secondary:hover {
    background: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3) !important;
    color: #ffffff !important;
}

.botshield-btn-installing {
    opacity: 0.7 !important;
    pointer-events: none !important;
    cursor: wait !important;
}

.botshield-btn-activated {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
    cursor: default;
    font-size: 13px !important;
    pointer-events: none;
    box-shadow: none !important;
    border-radius: 10px !important;
    padding: 8px 20px !important;
}

/* Bold Amber Menu Item */
#toplevel_page_securegate-captcha-lite ul.wp-submenu li a[href*="securegate-our-plugins"] {
    color: #f59e0b !important;
    font-weight: 700 !important;
}

.botshield-copyright-footer {
    text-align: center;
    padding: 30px 0 10px;
    font-size: 13px;
    color: #646970;
}

/* Toast Notification */
.botshield-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.botshield-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 782px) {
    .botshield-plugins-grid {
        grid-template-columns: 1fr;
    }
}
