:root {
    --mediexcl-primary: #6366f1;
    --mediexcl-primary-hover: #4f46e5;
    --mediexcl-secondary: #f8fafc;
    --mediexcl-accent: #f59e0b;
    --mediexcl-success: #10b981;
    --mediexcl-error: #ef4444;
    --mediexcl-text: #0f172a;
    --mediexcl-text-muted: #64748b;
    --mediexcl-text-light: #94a3b8;
    --mediexcl-border: #e2e8f0;
    --mediexcl-card-bg: rgba(255, 255, 255, 0.95);
    --mediexcl-glass-bg: rgba(255, 255, 255, 0.7);
    --mediexcl-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --mediexcl-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Wrap */
.mediexcl-wrap {
    margin: 20px 20px 0 0;
    max-width: 1400px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Typography Perfection */
.mediexcl-wrap h1,
.mediexcl-wrap h2,
.mediexcl-wrap h3 {
    color: var(--mediexcl-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Global Cards (Glassmorphism) */
.mediexcl-wrap .mediexcl-card {
    background: var(--mediexcl-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: var(--mediexcl-shadow);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mediexcl-wrap .mediexcl-card:hover {
    box-shadow: var(--mediexcl-shadow-lg);
    transform: translateY(-2px);
}

/* Global Layout Grid */
.mediexcl-wrap .mediexcl-grid,
.mediexcl-dashboard-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Header Perfection */
.mediexcl-header {
    background: var(--mediexcl-card-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--mediexcl-shadow);
    margin-bottom: 30px;
}

.mediexcl-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mediexcl-logo h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.mediexcl-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mediexcl-badge.pro {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.mediexcl-badge.free {
    background: #e2e8f0;
    color: #64748b;
}

.mediexcl-header .mediexcl-actions {
    display: flex;
    gap: 15px;
}

.mediexcl-btn-link {
    text-decoration: none;
    color: var(--mediexcl-text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.mediexcl-btn-link:hover {
    color: var(--mediexcl-primary);
}

/* Divider Override */
.mediexcl-divider {
    display: none;
    /* Removed in favor of gap spacing */
}

/* Universal Buttons Overrides */
.mediexcl-wrap .button,
.mediexcl-wrap .button-primary,
.mediexcl-wrap .button-secondary,
.mediexcl-btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 8px 20px !important;
    height: auto !important;
    line-height: 1.5 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    display: inline-flex;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.mediexcl-wrap .button-primary,
.mediexcl-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
}

.mediexcl-wrap .button-primary:hover,
.mediexcl-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3) !important;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
}

.mediexcl-wrap .button-secondary,
.mediexcl-btn-secondary {
    background: #ffffff !important;
    border: 1px solid var(--mediexcl-border) !important;
    color: var(--mediexcl-text) !important;
}

.mediexcl-wrap .button-secondary:hover {
    background: #f8fafc !important;
    border-color: var(--mediexcl-primary) !important;
    color: var(--mediexcl-primary) !important;
}

/* Stats (Dashboard + Image Optimize) */
.mediexcl-wrap .stats-card {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.mediexcl-wrap .stats-icon {
    background: rgba(99, 102, 241, 0.08);
    color: var(--mediexcl-primary);
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
}

.mediexcl-wrap .stats-info h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1;
}

.mediexcl-wrap .stats-info p {
    margin: 5px 0 0;
    color: var(--mediexcl-text-muted);
    font-size: 13px;
    font-weight: 600;
}

/* Dashboard Upsell specific */
.mediexcl-wrap .mediexcl-upsell {
    background: linear-gradient(135deg, #fffcf0 0%, #ffffff 100%) !important;
    border-color: #fde68a !important;
}

.mediexcl-wrap .mediexcl-pro-cta {
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed var(--mediexcl-primary);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

/* Activity List Item */
.mediexcl-wrap .mediexcl-activity-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--mediexcl-border);
    display: flex;
    gap: 12px;
}

.mediexcl-wrap .mediexcl-activity-item:last-child {
    border-bottom: none;
}

/* Table Perfection */
.mediexcl-table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.mediexcl-table-modern th {
    padding: 10px 20px;
    color: var(--mediexcl-text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.mediexcl-table-modern td {
    background: #fff;
    padding: 15px 20px;
    border-top: 1px solid var(--mediexcl-border);
    border-bottom: 1px solid var(--mediexcl-border);
}

.mediexcl-table-modern td:first-child {
    border-left: 1px solid var(--mediexcl-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.mediexcl-table-modern td:last-child {
    border-right: 1px solid var(--mediexcl-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Custom Switches */
.mediexcl-wrap .mediexcl-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 44px;
}

.mediexcl-wrap .mediexcl-switch input {
    display: none;
}

.mediexcl-wrap .mediexcl-slider {
    background-color: #cbd5e1;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 24px;
}

.mediexcl-wrap .mediexcl-slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

.mediexcl-wrap input:checked+.mediexcl-slider {
    background-color: var(--mediexcl-primary);
}

.mediexcl-wrap input:checked+.mediexcl-slider:before {
    transform: translateX(20px);
}

/* Animations */
@keyframes mediexclFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mediexcl-main-content {
    animation: mediexclFadeSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mediexcl-spin {
    animation: mediexcl-spin 2s linear infinite;
}

@keyframes mediexcl-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* PRO CTA Section */
.mediexcl-pro-cta {
    background: rgba(159, 18, 57, 0.03);
    border: 1px dashed rgba(159, 18, 57, 0.2);
    padding: 20px;
    border-radius: 16px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.mediexcl-pro-cta .mediexcl-btn-primary {
    width: 85% !important;
    margin: 5px auto 0 !important;
    justify-content: center;
    text-decoration: none;
}

/* Footer Alignment */
.mediexcl-footer {
    text-align: center !important;
    padding: 25px 0 10px;
    margin-top: 40px;
    border-top: 1px solid var(--mediexcl-border);
    color: var(--mediexcl-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.mediexcl-footer a {
    color: var(--mediexcl-primary);
    text-decoration: none;
    font-weight: 700;
}

.mediexcl-footer a:hover {
    text-decoration: underline;
}