/* Modern Warm Export/Import Posts & Media Styles */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #06b6d4;
    --secondary-dark: #0891b2;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-dark: #d97706;

    --bg-primary: #fefdf9;
    --bg-secondary: #fff7ed;
    --bg-card: #ffffff;
    --bg-warm: #fef3e2;
    --bg-surface: #f9f5f0;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b7280;

    --border: #e5e7eb;
    --border-warm: #fed7aa;

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(249, 115, 22, 0.2);
    --glass-shadow: 0 8px 32px rgba(249, 115, 22, 0.1);

    --gradient-primary: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-warm: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);

    --shadow-sm: 0 1px 2px 0 rgba(249, 115, 22, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(249, 115, 22, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(249, 115, 22, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(249, 115, 22, 0.1);
    --shadow-warm: 0 20px 40px rgba(249, 115, 22, 0.15);
}

.peiwm-admin {
    background: linear-gradient(135deg, #fefdf9 0%, #fff7ed 50%, #fef3e2 100%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;

    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: radial-gradient(ellipse at top, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
}

span#footer-thankyou,
#footer-upgrade {
    display: none;
}

.peiwm-admin h1 {
    font-size: 30px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
    position: relative;
}

.peiwm-admin h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.peiwm-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.peiwm-section {
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-warm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.peiwm-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.peiwm-section:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-warm), 0 25px 50px rgba(249, 115, 22, 0.2);
    border-color: var(--primary);
}

.peiwm-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

button#peiwm-refresh-stats {
    margin-top: 16px;
}

.peiwm-section h2::before {
    content: '\1F3AF';
    font-size: 1.5rem;
}

.peiwm-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Export Section */
.peiwm-export-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(52, 211, 153, 0.08) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.peiwm-export-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-success);
    border-radius: 20px 20px 0 0;
}

.peiwm-export-section h3::before {
    content: '\1F4E4';
}

/* Import Section */
.peiwm-import-section {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.peiwm-import-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 20px 20px 0 0;
}

.peiwm-import-section h3::before {
    content: '\1F4E5';
}

/* Delete Section */
.peiwm-delete-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(248, 113, 113, 0.08) 100%);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.peiwm-delete-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-danger);
    border-radius: 20px 20px 0 0;
}

.peiwm-delete-section h3 {
    color: #dc2626;
}

.peiwm-delete-section h3::before {
    content: '\1F5D1';
}

.peiwm-delete-section p {
    color: #991b1b;
}

/* Stats Section */
.peiwm-stats-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 191, 36, 0.08) 100%);
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.peiwm-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-warning);
    border-radius: 20px 20px 0 0;
}

.peiwm-stats-section h3::before {
    content: '\1F4CA';
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 160px;
    margin: 0.25rem;
    box-shadow: var(--shadow-md);
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: -1;
}

.button:hover::before {
    left: 100%;
}

.button-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

.button-secondary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text-primary);
    border: 2px solid var(--border-warm);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.button-secondary:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.button-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.button-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.button:active {
    transform: scale(0.98);
}

/* How to Use Section */
.peiwm-how-to-use-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.08) 0%, rgba(160, 82, 45, 0.08) 100%);
    border: 2px solid rgba(139, 69, 19, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.peiwm-how-to-use-section h2::before {
    content: '\1F4DA';
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.peiwm-workflow-steps {
    margin: 2rem 0;
}

.peiwm-workflow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.peiwm-step-number {
    background: var(--primary-color);
    color: #a46565;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.peiwm-step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.peiwm-step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.peiwm-workflow-tips {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.peiwm-workflow-tips h4 {
    margin: 0 0 1rem 0;
    color: var(--success-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.peiwm-workflow-tips ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.peiwm-workflow-tips li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Import Options */
.peiwm-import-options {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.peiwm-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 0.75rem;
}

.peiwm-checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.peiwm-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.peiwm-checkbox-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Log Entry Types */
.peiwm-log-entry.peiwm-log-success {
    color: var(--success-color);
}

.peiwm-log-entry.peiwm-log-error {
    color: var(--error-color);
}

.peiwm-log-entry.peiwm-log-warning {
    color: #f59e0b;
}

.peiwm-log-entry.peiwm-log-info {
    color: var(--primary-color);
}

/* Settings Groups */
.peiwm-settings-groups {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.peiwm-settings-groups h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.peiwm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.peiwm-settings-preview {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.peiwm-settings-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Add icons to buttons */
.button-primary::before {
    content: '\2728';
    position: static;
    margin-right: 0.5rem;
    background: none;
}

/* Progress Bars */
.peiwm-progress {
    background: var(--bg-card);
    border: 2px solid var(--border-warm);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.peiwm-progress h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.peiwm-progress h4::before {
    content: '\26A1';
}

.peiwm-progress-bar {
    width: 100%;
    height: 12px;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    border: 1px solid var(--border);
}

.peiwm-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.peiwm-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.peiwm-progress-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Log Display */
.peiwm-log {
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    max-height: 220px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.peiwm-log::-webkit-scrollbar {
    width: 10px;
}

.peiwm-log::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

.peiwm-log::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

.peiwm-log-entry {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* Stats Grid */
.peiwm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.peiwm-stat-item {
    background: white;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.peiwm-stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.peiwm-stat-number {
    font-size: 25px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.peiwm-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notifications */
.peiwm-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.peiwm-notification.peiwm-show {
    transform: translateX(0);
}

.peiwm-notification.peiwm-success {
    background: var(--gradient-success);
}

.peiwm-notification.peiwm-error {
    background: var(--gradient-danger);
}

.peiwm-notification.peiwm-warning {
    background: var(--gradient-warning);
}

/* File Types */
.peiwm-file-types-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.peiwm-file-type-item {
    background: white;
    border: 2px solid var(--border-warm);
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.peiwm-file-type-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.peiwm-file-type-name {
    color: var(--text-primary);
    font-weight: 700;
}

.peiwm-file-type-count {
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 25px;
    text-align: center;
}


/* Modal Styles */
.peiwm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.peiwm-modal-overlay.peiwm-show {
    opacity: 1;
    visibility: visible;
}

.peiwm-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.peiwm-modal-overlay.peiwm-show .peiwm-modal {
    transform: scale(1);
}

.peiwm-modal-header {
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.peiwm-modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.peiwm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.peiwm-modal-close:hover {
    background: #e2e8f0;
    color: #4a5568;
}

.peiwm-modal-body {
    padding: 20px;
    text-align: center;
}

.peiwm-modal-body p {
    margin: 0;
    color: #4a5568;
    line-height: 1.6;
    font-size: 16px;
}

.peiwm-modal-footer {
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

button.peiwm-modal-close.button.button-primary,
button.peiwm-modal-close.button.button-secondary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
    padding: 0px 5px 5px 5px;
    width: 45px;
}

/* Success Modal */
.peiwm-success-modal .peiwm-modal-header {
    background: #f0fff4;
    border-bottom-color: #9ae6b4;
}

.peiwm-success-modal .peiwm-modal-header h3 {
    color: #22543d;
}

.peiwm-success-icon {
    font-size: 48px;
    color: #38a169;
    margin-bottom: 15px;
    font-weight: bold;
}

.peiwm-success-modal .peiwm-modal-footer {
    background: #f0fff4;
    border-top-color: #9ae6b4;
}

/* Error Modal */
.peiwm-error-modal .peiwm-modal-header {
    background: #fff5f5;
    border-bottom-color: #fed7d7;
}

.peiwm-error-modal .peiwm-modal-header h3 {
    color: #742a2a;
}

.peiwm-error-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 15px;
    font-weight: bold;
}

.peiwm-error-modal .peiwm-modal-footer {
    background: #fff5f5;
    border-top-color: #fed7d7;
}

/* Warning Modal */
.peiwm-warning-modal .peiwm-modal-header {
    background: #fffaf0;
    border-bottom-color: #fbd38d;
}

.peiwm-warning-modal .peiwm-modal-header h3 {
    color: #744210;
}

.peiwm-warning-icon {
    font-size: 48px;
    color: #d69e2e;
    margin-bottom: 15px;
    font-weight: bold;
}

.peiwm-warning-modal .peiwm-modal-footer {
    background: #fffaf0;
    border-top-color: #fbd38d;
}

/* Danger Modal */
.peiwm-danger-modal .peiwm-modal-header {
    background: #fff5f5;
    border-bottom-color: #fed7d7;
}

.peiwm-danger-modal .peiwm-modal-header h3 {
    color: #742a2a;
}

.peiwm-danger-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 15px;
    font-weight: bold;
}

.peiwm-danger-modal .peiwm-modal-footer {
    background: #fff5f5;
    border-top-color: #fed7d7;
}

/* Modal Content Variations */
.peiwm-modal-body.peiwm-text-left {
    text-align: left;
}

.peiwm-modal-body.peiwm-text-left p {
    text-align: left;
}

.peiwm-modal-body .peiwm-warning-text {
    background: #fffaf0;
    border: 1px solid #fbd38d;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    color: #744210;
    font-weight: 500;
}

.peiwm-modal-body .peiwm-danger-text {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    color: #742a2a;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .peiwm-modal {
        width: 95%;
        margin: 20px;
    }

    .peiwm-modal-header,
    .peiwm-modal-body,
    .peiwm-modal-footer {
        padding: 15px;
    }

    .peiwm-modal-footer {
        flex-direction: column;
    }

    .peiwm-modal-footer button {
        width: 100%;
    }
}

/* Test Results */
.peiwm-test-results {
    background: var(--bg-card);
    border: 2px solid var(--border-warm);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.peiwm-test-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.peiwm-test-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.peiwm-test-table td:first-child {
    font-weight: 700;
    color: var(--text-primary);
    width: 200px;
}

/* Loading Animation */
.peiwm-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.peiwm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #fed7aa;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Stats Loader */
.peiwm-stats-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.peiwm-stats-loader-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
}

.peiwm-stats-loader-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(249, 115, 22, 0.2);
    border-radius: 50%;
}

.peiwm-stats-loader-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.peiwm-stats-loader-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.peiwm-stats-loader-subtext {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Skeleton Loading for Stats Grid */
.peiwm-stats-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.peiwm-stats-skeleton-item {
    background: white;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.peiwm-stats-skeleton-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.peiwm-stats-skeleton-number {
    width: 60px;
    height: 32px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    border-radius: 8px;
    margin: 0 auto 12px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.peiwm-stats-skeleton-label {
    width: 80px;
    height: 16px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    border-radius: 4px;
    margin: 0 auto;
    animation: skeleton-pulse 1.5s ease-in-out infinite 0.2s;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Skeleton Pulse Animation */
@keyframes skeleton-pulse {

    0%,
    100% {
        background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    }

    50% {
        background: linear-gradient(90deg, #e5e7eb 25%, #d1d5db 50%, #e5e7eb 75%);
    }
}

/* Spin Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .peiwm-admin {
        padding: 1rem;
    }

    .peiwm-admin h1 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .peiwm-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .peiwm-section {
        padding: 2rem;
    }

    .peiwm-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .button {
        width: 100%;
        margin: 0.5rem 0;
    }

    .peiwm-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* Focus States */
.button:focus,
input:focus {
    outline: 3px solid rgba(249, 115, 22, 0.5);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Add some fun hover effects */
.peiwm-section:hover .peiwm-stat-item {
    transform: scale(1.02);
}

.peiwm-section:hover h2::before {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Themes & Plugins Specific Styles */
.peiwm-theme-options,
.peiwm-plugin-options {
    margin: 15px 0;
}

.peiwm-selection-grid {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

.peiwm-import-options {
    margin: 15px 0;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
}

.peiwm-active-label {
    color: #00a32a;
    font-weight: 600;
    font-size: 0.9em;
}

.peiwm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.peiwm-checkbox-label {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.peiwm-checkbox-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.peiwm-checkbox-label input[type="checkbox"],
.peiwm-checkbox-label input[type="radio"] {
    margin: 0 10px 0 0;
    flex-shrink: 0;
}

.peiwm-autor-mode {
    display: flex;
    flex-direction: column;
}

.peiwm-checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.peiwm-checkbox-description {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 4px;
}

/* Progress and Log Enhancements */
.peiwm-log-entry.peiwm-log-success {
    color: var(--success-color);
}

.peiwm-log-entry.peiwm-log-error {
    color: var(--error-color);
}

.peiwm-log-entry.peiwm-log-warning {
    color: #f59e0b;
}

.peiwm-log-entry.peiwm-log-info {
    color: #0073aa;
}

/* Button Container Improvements */
.button-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.button-container .button {
    margin: 0;
}

/* Section Spacing */
.peiwm-section+.peiwm-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e1e1;
}

/* Export/Import Section Styling */
.peiwm-export-section,
.peiwm-import-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.peiwm-export-section h3,
.peiwm-import-section h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .peiwm-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .button-container {
        flex-direction: column;
        align-items: stretch;
    }

    .button-container .button {
        width: 100%;
        text-align: center;
    }
}

/* Media Statistics Styles */
.peiwm-stats-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.peiwm-stats-section h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.peiwm-stats {
    min-height: 100px;
}

.peiwm-stats-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.peiwm-stats-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.peiwm-stats-loader-text {
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 5px;
}

.peiwm-stats-loader-subtext {
    font-size: 14px;
    color: #666;
}

.peiwm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.peiwm-stat-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.peiwm-stat-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.peiwm-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 8px;
    line-height: 1;
}

.peiwm-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.peiwm-stat-detail {
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

.peiwm-file-types {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.peiwm-file-types h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
}

.peiwm-file-types-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.peiwm-file-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
}

.peiwm-file-type-name {
    font-weight: 600;
    color: #23282d;
}

.peiwm-file-type-count {
    background: #0073aa;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.peiwm-stats-error {
    background: #fff2cd;
    border: 1px solid #f0ad4e;
    border-radius: 4px;
    padding: 15px;
    color: #8a6d3b;
    text-align: center;
    font-weight: 600;
}

#peiwm-refresh-stats {
    margin-top: 15px;
}

#peiwm-refresh-stats:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design for Stats */
@media (max-width: 768px) {
    .peiwm-stats-grid {
        grid-template-columns: 1fr;
    }

    .peiwm-file-types-list {
        grid-template-columns: 1fr;
    }

    .peiwm-stat-number {
        font-size: 24px;
    }
}

/* Settings Section Styles */
.peiwm-settings-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.peiwm-settings-section .form-table {
    margin-top: 0;
}

.peiwm-settings-section .form-table th {
    padding-left: 0;
    font-weight: 600;
}

.peiwm-settings-section .form-table td {
    padding-left: 0;
}

.peiwm-settings-section .description {
    margin-top: 8px;
    font-style: italic;
    color: #666;
}

/* Admin Download Buttons Styles (for themes.php and plugins.php) */
.peiwm-download-theme-btn {
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    margin-left: 5px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background-color 0.2s ease !important;
}

.peiwm-download-theme-btn:hover {
    background: #005177 !important;
    color: #fff !important;
}

.peiwm-download-theme-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

.peiwm-download-plugin {
    color: #666;
}

.peiwm-download-plugin-btn {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.peiwm-download-plugin-btn:hover {
    color: #005177;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .peiwm-download-theme-btn {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
}

/*
 Widgets & Menus Export Options */
.peiwm-export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.peiwm-export-options .button {
    margin: 0;
}

/* Responsive adjustments for export options */
@media (max-width: 768px) {
    .peiwm-export-options {
        flex-direction: column;
    }

    .peiwm-export-options .button {
        width: 100%;
        text-align: center;
    }
}


/* PRO Feature Styles */
.peiwm-pro-lock {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
    vertical-align: middle;
}

.peiwm-pro-badge-large {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    vertical-align: middle;
}

.peiwm-pro-feature-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.peiwm-pro-locked-feature {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 30px;
    position: relative;
}

.peiwm-pro-locked-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.peiwm-pro-locked-feature h2 {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}

.peiwm-pro-locked-feature>p {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 30px;
}

.peiwm-pro-features-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px;
    display: inline-block;
    text-align: left;
    max-width: 600px;
}

.peiwm-pro-features-list li {
    font-size: 16px;
    color: #2d3748;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    font-weight: 500;
}

.peiwm-pro-features-list li:last-child {
    border-bottom: none;
}

.peiwm-pro-locked-feature .button-hero {
    font-size: 18px;
    padding: 15px 40px;
    height: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.peiwm-pro-locked-feature .button-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.peiwm-pro-feature-active {
    background: #f0f9ff;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-top: 30px;
}

.peiwm-pro-feature-active p {
    font-size: 16px;
    color: #1e40af;
    margin: 0;
}

/* Locked Configuration Section with Blurry Glass Effect */
.peiwm-locked-section {
    position: relative;
    padding: 20px;
    margin: 10px;
}

.peiwm-locked-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9;
    border-radius: 8px;
}

.peiwm-locked-section:hover::after {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.7);
}

.peiwm-locked-section input,
.peiwm-locked-section select,
.peiwm-locked-section textarea {
    cursor: not-allowed !important;
}

.peiwm-locked-section-2 {
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Clickable PRO Badge Overlay */
.peiwm-pro-upgrade-overlay {
    position: absolute;
    top: -15px;
    right: -14px;
    z-index: 11;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 6px;
    text-decoration: none;
}

.peiwm-pro-upgrade-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.peiwm-pro-upgrade-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.7);
    color: #fff;
    text-decoration: none;
}

/* Scheduled Exports Page Styles */
.peiwm-pro-feature-wrap {
    background: linear-gradient(135deg, #fefdf9 0%, #fff7ed 50%, #fef3e2 100%);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-warm);
    max-width: 1200px;
    margin: 20px auto;
}

.peiwm-pro-feature-wrap h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.peiwm-pro-feature-wrap .description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.peiwm-pro-locked-feature {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 30px;
    position: relative;
    box-shadow: var(--shadow-warm);
}

.peiwm-pro-locked-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

.peiwm-pro-locked-feature h2 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}

.peiwm-pro-locked-feature>p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.peiwm-pro-features-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px;
    display: inline-block;
    text-align: left;
    max-width: 600px;
}

.peiwm-pro-features-list li {
    font-size: 16px;
    color: var(--text-primary);
    padding: 12px 0;
    border-bottom: 1px solid rgba(249, 115, 22, 0.2);
    font-weight: 500;
}

.peiwm-pro-features-list li:last-child {
    border-bottom: none;
}

.peiwm-pro-locked-feature .button-hero {
    font-size: 18px;
    padding: 15px 40px;
    height: auto;
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    border-radius: 16px;
}

.peiwm-pro-locked-feature .button-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6);
    color: white;
}

/* Batch Settings Page Styles */
.peiwm-settings-wrap {
    background: linear-gradient(135deg, #fefdf9 0%, #fff7ed 50%, #fef3e2 100%);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-warm);
    max-width: 1200px;
    margin: 20px auto;
}

.peiwm-settings-wrap h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.peiwm-settings-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-left: 4px solid var(--primary);
    margin: 20px 0;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
}

.peiwm-section-title {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-top: 30px;
    color: var(--text-primary);
    font-weight: 700;
}

.peiwm-settings-table {
    border-radius: 12px;
    padding: 20px;
}

.peiwm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.peiwm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.peiwm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.peiwm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.peiwm-toggle-slider {
    background: var(--gradient-primary);
}

input:checked+.peiwm-toggle-slider:before {
    transform: translateX(26px);
}

.peiwm-feature-badge {
    margin-top: 10px;
}

.peiwm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.peiwm-badge-free {
    background: var(--success);
    color: #fff;
}

.peiwm-badge-text {
    margin-left: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.peiwm-unit {
    margin-left: 5px;
    color: var(--text-secondary);
}

.peiwm-recommendations-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: var(--shadow-md);
}

.peiwm-recommendations-box h3 {
    margin-top: 0;
    color: var(--primary);
}

.peiwm-stat-row {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.peiwm-stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid var(--border-warm);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.peiwm-stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.peiwm-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.peiwm-stat-value {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 5px;
}

.peiwm-recommendation {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-left: 4px solid var(--primary);
    margin-top: 15px;
    border-radius: 8px;
}

.peiwm-recommendation strong {
    color: var(--primary);
}

/* Selective Import Panel */
.peiwm-selective-panel {
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.peiwm-selective-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(251, 146, 60, 0.05) 100%);
    border-bottom: 1px solid var(--border-warm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.peiwm-selective-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.peiwm-selective-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.peiwm-selective-search {
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--border-warm);
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 180px;
}

.peiwm-selective-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.peiwm-select-all-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.peiwm-selective-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem;
}

.peiwm-selective-list::-webkit-scrollbar {
    width: 6px;
}

.peiwm-selective-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.peiwm-selective-list::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.4);
    border-radius: 3px;
}

.peiwm-selective-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.peiwm-selective-item:hover {
    background: rgba(249, 115, 22, 0.06);
}

.peiwm-selective-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.peiwm-selective-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.peiwm-selective-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.peiwm-selective-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.peiwm-selective-status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.peiwm-status-publish {
    background: #d1fae5;
    color: #065f46;
}

.peiwm-status-draft {
    background: #fef3c7;
    color: #92400e;
}

.peiwm-status-private {
    background: #ede9fe;
    color: #4c1d95;
}

.peiwm-selective-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}

.peiwm-selective-footer {
    padding: 0.6rem 1.25rem;
    border-top: 1px solid var(--border-warm);
    background: rgba(249, 115, 22, 0.03);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.peiwm-selected-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

/* Selective list loading state */
.peiwm-selective-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.peiwm-selective-loading .peiwm-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(249, 115, 22, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.peiwm-selective-loading p {
    margin: 0;
}

/* Item settings gear button */
.peiwm-selective-status-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.peiwm-item-settings-btn {
    background: none;
    border: 1.5px solid var(--border-warm);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.peiwm-item-settings-btn:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(30deg);
}

/* Import settings modal - status options */
.peiwm-status-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.peiwm-status-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.peiwm-status-option:hover {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.04);
}

.peiwm-status-option input[type="radio"] {
    accent-color: var(--primary);
    flex-shrink: 0;
}

.peiwm-status-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.06);
}

/* ============================================
   PRO Overlay - Centered Badge
   ============================================ */
.peiwm-pro-upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 11;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.peiwm-pro-upgrade-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    pointer-events: none;
}

.peiwm-pro-upgrade-overlay:hover .peiwm-pro-upgrade-badge {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.7);
}

/* ============================================
   Premium Upgrade Modal
   ============================================ */
.peiwm-premium-modal {
    background: #fff;
    border-radius: 24px;
    max-width: 460px;
    width: 92%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: scale(0.88) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.peiwm-modal-overlay.peiwm-show .peiwm-premium-modal {
    transform: scale(1) translateY(0);
}

.peiwm-premium-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.peiwm-premium-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.peiwm-premium-modal-body {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(160deg, #fefdf9 0%, #fff7ed 60%, #fef3e2 100%);
}

.peiwm-premium-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35, #f7c59f);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    animation: peiwm-pulse-offer 2s ease-in-out infinite;
}

@keyframes peiwm-pulse-offer {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0);
    }
}

.peiwm-premium-fire {
    font-size: 14px;
}

.peiwm-premium-offer-tag {
    font-size: 10px;
}

.peiwm-premium-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    animation: peiwm-rocket 1.5s ease-in-out infinite alternate;
}

@keyframes peiwm-rocket {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}

.peiwm-premium-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f97316, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
    line-height: 50px;
}

.peiwm-premium-subtitle {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.peiwm-premium-features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.peiwm-premium-feature {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    background: rgba(249, 115, 22, 0.07);
    border-radius: 8px;
    border-left: 3px solid #f97316;
}

.peiwm-premium-urgency {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #e53e3e;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.peiwm-urgency-dot {
    width: 8px;
    height: 8px;
    background: #e53e3e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: peiwm-blink 1s ease-in-out infinite;
}

@keyframes peiwm-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

.peiwm-premium-cta-btn {
    display: block;
    background: linear-gradient(135deg, #f97316 0%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none !important;
    padding: 0.9rem 2rem;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    margin-bottom: 0.75rem;
}

.peiwm-premium-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.55);
    color: #fff !important;
}

.peiwm-premium-note {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
}


/* ===============================
   PRESET CARD UI (FINAL)
=============================== */

.peiwm-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.peiwm-preset-card {
    border: 1.5px solid #dcdcde;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.peiwm-preset-card:hover {
    border-color: #2271b1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.peiwm-preset-card.is-active {
    border: 2px solid #2271b1;
    background: #f0f6fc;
}

/* Header */
.peiwm-preset-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* Dot */
.peiwm-preset-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

/* Title */
.peiwm-preset-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

p.description-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 11px 14px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 0 3px 3px 0;
}

.peiwm-preset-card.is-active .peiwm-preset-title {
    color: #135e96;
}

/* Tag */
.peiwm-preset-tag {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e6f0fa;
    color: #2271b1;
}

/* Description */
.peiwm-preset-desc {
    font-size: 12px;
    color: #646970;
    line-height: 1.35;
}

/* Actions */
.peiwm-preset-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#peiwm-preset-applied {
    display: none;
    font-size: 12px;
    color: #00a32a;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 900px) {
    .peiwm-preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .peiwm-preset-grid {
        grid-template-columns: 1fr;
    }
}


/* Message */
#peiwm-save-hint {
    display: none;

    display: flex;
    align-items: center;
    gap: 0px;
    margin-top: 14px;
    padding: 11px 14px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 0 3px 3px 0;
    font-size: 13px;
    font-weight: 500;
    color: #067751;
}

/* optional subtle icon */
#peiwm-save-hint::before {
    content: "ℹ️";
    margin-right: 6px;
    font-size: 14px;
}

/* =========================
   SAVE BUTTON DANCE 💃
========================= */
.peiwm-btn-dance {
    animation: peiwm-dance 0.4s ease-in-out infinite;
}

@keyframes peiwm-dance {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}