/*
 * Main Admin Dashboard Styles
 */
.ai-flash-tune-admin-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f3f4f6;
    min-height: 100vh;
    font-size: 16px;
    box-sizing: border-box;
}
.ai-flash-tune-admin-wrapper * {
    box-sizing: border-box;
}
.ai-flash-tune-admin-wrapper p {
    font-size: 16px;
}
a:hover {
    color: #4f46e5;
}
a.ai-flash-tune-refresh-button:hover {
    color: #FFF;
}
a.ai-flash-tune-upgrade-button:hover {
    color: #FFF;
}
.ai-flash-tune-pro-feature-overlay a:hover {
    color: #FFF;
}
.ai-flash-tune-pagination-nav a:hover {
    color: #FFF;
}
.ai-flash-tune-pagination-nav a:hover {
    color: #4f46e5;
}
#wpbody-content {padding-bottom: 0}
/* --- Responsive Sidebar Styles --- */

/* Sidebar Toggle Button (Mobile Only) */
.ai-flash-tune-sidebar-toggle {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    top: 48px;
    left: 15px;
    z-index: 10001; /* Must be on top of everything */
    background-color: #4f46e5; /* indigo-600 */
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.25rem;
}
.ai-flash-tune-sidebar-toggle:hover {
    background-color: #4338ca; /* A slightly darker indigo */
}

/* Overlay for when the menu is open on mobile */
.ai-flash-tune-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
}
/* Details/Summary Toggle for AI Suggestions */
.aift-details-toggle {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem;
    background-color: #f9fafb; /* gray-50 */
}
.aift-details-toggle summary {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #4b5563; /* gray-600 */
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s;
}
.aift-details-toggle summary:hover {
    background-color: #f3f4f6; /* gray-100 */
}
.aift-details-content {
    padding: 1rem 1rem 1rem 2.5rem; /* Indent content */
    border-top: 1px solid #e5e7eb;
    color: #374151; /* gray-700 */
}
.aift-details-content ul {
    margin: 0;
    padding-left: 0;
    list-style-position: outside;
}
/* Add alongside .ai-flash-tune-notice-error */
.ai-flash-tune-notice-bar.ai-flash-tune-notice-info {
    background-color: #EFF6FF; /* blue-50 */
    color: #1E40AF; /* blue-800 */
    border: 1px solid #BFDBFE; /* blue-200 */
}

.ai-flash-tune-notice-info .ai-flash-tune-notice-content .fas {
    color: #3B82F6; /* blue-500 */
}
/* --- Add these new styles to the end of your ai-flash-tune-styles.css file --- */

.ai-flash-tune-funnel-arrow-vertical {
    height: 20px;
    width: 2px;
    background-color: #d1d5db; /* gray-300 */
    margin: 0 auto;
    position: relative;
}
.ai-flash-tune-funnel-arrow-vertical::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #d1d5db;
}

/* --- Add these new styles to the end of your ai-flash-tune-styles.css file --- */

/* Base style for all status badges */
.ai-flash-tune-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem; /* Space between icon and text */
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* Creates the pill shape */
    font-size: 0.75rem; /* text-xs */
    line-height: 1.25;
}

/* Modifier for "Sent" or success status */
.ai-flash-tune-status-sent {
    background-color: #D1FAE5; /* green-100 */
    color: #065F46; /* green-800 */
}

/* Modifier for "Failed" or error status */
.ai-flash-tune-status-failed {
    background-color: #FEE2E2; /* red-100 */
    color: #991B1B; /* red-800 */
}
/* Container for the inline diagnosis report */
.aiftpd-diagnosis-content {
    background-color: #f9fafb; /* gray-50 */
    padding: 20px;
}
.aiftpd-diagnosis-content {
    padding: 1.5rem;
}
.aiftpd-diagnosis-content h3 {
    display: flex;
    align-items: center;
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    color: #1f2937; /* gray-800 */
    margin-top: 0;
    margin-bottom: 0.75rem;
}
.aiftpd-diagnosis-content h3 i {
    font-size: 1rem;
    margin-right: 0.75rem;
    color: #4f46e5; /* indigo-600 */
    width: 24px;
    text-align: center;
}
.aiftpd-diagnosis-content p,
.aiftpd-diagnosis-content ul,
.aiftpd-diagnosis-content ol {
    font-size: 0.9rem;
    color: #4b5563; /* gray-600 */
    margin-left: 0;
    padding-left: 0;
}
.aiftpd-diagnosis-content ul,
.aiftpd-diagnosis-content ol {
    padding-left: 1.25rem; /* Indent lists */
    margin-top: 0.5rem;
}
.aiftpd-diagnosis-content li {
    margin-bottom: 0.5rem;
}
.aiftpd-diagnosis-content strong {
    color: #111827; /* gray-900 */
}





/*
 * Generic Button Styles
 */
.ai-flash-tune-btn-green {
    background-color: #22c55e; /* bg-green-500 */
    color: #ffffff;
}
.ai-flash-tune-btn-green:hover {
    background-color: #16a34a; /* bg-green-600 */
}

.ai-flash-tune-btn-gray {
    background-color: #6b7280; /* bg-gray-500 */
    color: #ffffff;
}
.ai-flash-tune-btn-gray:hover {
    background-color: #4b5563; /* bg-gray-600 */
}
.ai-flash-tune-btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    white-space: nowrap;
    line-height: 1.5; /* Ensure consistent height with input fields */
}

.ai-flash-tune-btn:hover {
    transform: translateY(-2px);
    color: #FFF;
}

/* Color Modifiers */
.ai-flash-tune-btn-blue {
    background-color: #3b82f6; /* bg-blue-500 */
    color: #ffffff;
}
.ai-flash-tune-btn-blue:hover {
    background-color: #2563eb; /* bg-blue-600 */
}

.ai-flash-tune-btn-red {
    background-color: #dc2626; /* bg-red-600 */
    color: #ffffff;
}
.ai-flash-tune-btn-red:hover {
    background-color: #b91c1c; /* bg-red-700 */
}

/* Fix for privacy tools form alignment */
.ai-flash-tune-privacy-form .ai-flash-tune-input {
    margin-top: 0;
}
.ai-flash-tune-items-center {
    align-items: center;
}
.ai-flash-tune-ml-4 {
    margin-left: 1rem; /* Adds space to the left of the element */
}

/* RTL support for spacing */
html[dir="rtl"] .ai-flash-tune-ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}
/*
 * Button Hover Effects
 */
.ai-flash-tune-date-range-toggle {
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    border: 1px solid #3b82f6;
}

.ai-flash-tune-date-range-toggle:hover,
.ai-flash-tune-date-range-toggle:active,
.ai-flash-tune-date-range-toggle:focus {
    color: #ffffff; 
    background-color: #2563eb; /* This is the darker blue from your theme */
    transform: translateY(-2px);
}
/*
 * Pagination and Table Cell Improvements
 */
.ai-flash-tune-space-x-2 > * + * {
    margin-left: 0.4rem;
}

.ai-flash-tune-carts-table tbody tr td:nth-child(2) {
    cursor: pointer;
}

/* RTL equivalent for spacing */
html[dir="rtl"] .ai-flash-tune-space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.4rem;
}
.ai-flash-tune-btn-white:hover {
    color: #3c434a;
}

/* Style for the new divider */
.aiftss-suggestion-content a {
    color: #4f46e5;
    text-decoration: none;
}
hr.aift-divider {
    border: none;
    height: 1px;
    background-color: #e5e7eb; /* tailwind gray-200 */
    display: inline-block;
    width: 100%;
}

/* Spinner animation for loading states */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.ai-flash-tune-animate-spin {
  animation: spin 1s linear infinite;
}
.aiftss-history-container {
    max-height: 458px;
    overflow-y: auto;
}
/*
 * Consistent Filter Pop-up Styles
 */
.ai-flash-tune-product-date-range-form input[type="date"],
.ai-flash-tune-product-date-range-form select,
.ai-flash-tune-date-range-form input[type="text"],
.ai-flash-tune-date-range-form select {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #374151;
    min-width: 150px; /* Ensure fields have a minimum width */
}

/* Specific adjustments for the select element to add a custom arrow */
.ai-flash-tune-date-range-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    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.7rem top 50%;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
}
/*
 * Main Plugin Wrapper
 */
.ai-flash-tune-admin-wrapper {
    display: flex;
    margin-top: 5px;
    min-height: 100vh;
    position: relative;
    align-items: flex-start;
}

/*
 * Sidebar Menu Styles
 */
.aiftss-history-item {
    cursor: pointer;
}
.ai-flash-tune-sidebar {
    min-width: 275px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 40px;
    left: 0;
    min-height: calc(100vh - 50px);
}
.ai-flash-tune-sidebar-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.ai-flash-tune-sidebar-logo-img-wrp {
    display: inline-block;
}
.ai-flash-tune-sidebar-logo img {
    max-width: 175px;
    height: auto;
}
.ai-flash-tune-sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease-in-out;
    color: #ffffff;
    text-decoration: none;
}
.ai-flash-tune-sidebar-nav a:hover {
    background-color: #374151;
}
.ai-flash-tune-sidebar-nav a.active {
    background-color: #4f46e5;
    font-weight: 600;
}
.ai-flash-tune-sidebar-nav a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}
.ai-flash-tune-upgrade-wrp {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #4b5563;
}
.ai-flash-tune-upgrade-btn {
    display: block;
    text-align: center;
    background-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}
.ai-flash-tune-upgrade-btn:hover {
    background-color: #374151;
    color: #FFF;
}
.ai-flash-tune-upgrade-btn i {
    margin-right: 0.5rem;
}

/*
 * Layout Containers
 */
.ai-flash-tune-main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}
.ai-flash-tune-main-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 2.40rem;
}
.ai-flash-tune-grid {
    display: grid;
}
.ai-flash-tune-gap-4 {
    gap: 1rem;
}
.ai-flash-tune-gap-6 {
    gap: 1.5rem;
}
.ai-flash-tune-grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

/*
 * Card and UI Elements
 */
.ai-flash-tune-addon-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}
.ai-flash-tune-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    flex: 1 1 100%;
}
.ai-flash-tune-flex {
    display: flex;
}
.ai-flash-tune-flex-wrap {
    flex-wrap: wrap;
}
.ai-flash-tune-flex-col {
    flex-direction: column;
}
.ai-flash-tune-flex-center {
    align-items: center;
    justify-content: center;
}
.ai-flash-tune-justify-between {
    justify-content: space-between;
}
.ai-flash-tune-justify-end {
    justify-content: flex-end;
}
.ai-flash-tune-space-x-4 > * + * {
    margin-left: 1rem;
}
.ai-flash-tune-rounded-lg {
    border-radius: 0.5rem;
}
.ai-flash-tune-rounded-full {
    border-radius: 9999px;
}
.ai-flash-tune-shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.ai-flash-tune-text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.ai-flash-tune-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}
.ai-flash-tune-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}
.ai-flash-tune-text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}
.ai-flash-tune-text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}
.ai-flash-tune-text-4xl {
    font-size: 2.25rem;
    line-height: 2.25rem;
}
.ai-flash-tune-text-5xl {
    font-size: 3rem;
    line-height: 1rem;
}
.ai-flash-tune-font-bold {
    font-weight: 700;
}
.ai-flash-tune-font-semibold {
    font-weight: 600;
}
.ai-flash-tune-font-medium {
    font-weight: 500;
}
.ai-flash-tune-text-center {
    text-align: center;
}
.ai-flash-tune-text-left {
    text-align: left;
}
.ai-flash-tune-text-right {
    text-align: right;
}
.ai-flash-tune-text-gray-500 {
    color: #6b7280;
}
.ai-flash-tune-text-gray-600 {
    color: #4b5563;
}
.ai-flash-tune-text-gray-700 {
    color: #374151;
}
.ai-flash-tune-text-gray-800 {
    color: #1f2937;
}
.ai-flash-tune-text-gray-900 {
    color: #111827;
}
.ai-flash-tune-text-white {
    color: #ffffff;
}
.ai-flash-tune-text-green-500 {
    color: #22c55e;
}
.ai-flash-tune-text-green-600 {
    color: #059669;
}
.ai-flash-tune-text-green-800 {
    color: #166534;
}
.ai-flash-tune-text-blue-500 {
    color: #3b82f6;
}
.ai-flash-tune-text-blue-700 {
    color: #1d4ed8;
}
.ai-flash-tune-text-red-500 {
    color: #ef4444;
}
.ai-flash-tune-text-red-600 {
    color: #dc2626;
}
.ai-flash-tune-text-red-800 {
    color: #991b1b;
}
.ai-flash-tune-text-yellow-500 {
    color: #eab308;
}
.ai-flash-tune-text-orange-500 {
    color: #f97316;
}
.ai-flash-tune-text-indigo-500 {
    color: #6366f1;
}
.ai-flash-tune-text-indigo-600 {
    color: #4f46e5;
}
.ai-flash-tune-text-purple-500 {
    color: #a855f7;
}
.ai-flash-tune-bg-red-100 {
    background-color: #fee2e2;
}
.ai-flash-tune-bg-yellow-100 {
    background-color: #fef3c7;
}
.ai-flash-tune-bg-purple-100 {
    background-color: #f3e8ff;
}
.ai-flash-tune-bg-green-100 {
    background-color: #dcfce7;
}
.ai-flash-tune-bg-gray-100 {
    background-color: #f4f5f7;
}
.ai-flash-tune-bg-gray-200 {
    background-color: #e5e7eb;
}
.ai-flash-tune-bg-gray-300:hover {
    background-color: #d1d5db;
}
.ai-flash-tune-bg-white {
    background-color: #ffffff;
}
.ai-flash-tune-bg-blue-500 {
    background-color: #3b82f6;
}
.ai-flash-tune-bg-blue-600:hover {
    background-color: #2563eb;
}
.ai-flash-tune-bg-red-600 {
    background-color: #dc2626;
}
.ai-flash-tune-bg-red-700:hover {
    background-color: #b91c1c;
}
.ai-flash-tune-bg-indigo-500 {
    background-color: #6366f1;
}
.ai-flash-tune-bg-indigo-600:hover {
    background-color: #4f46e5;
}
.ai-flash-tune-px-2_5 {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
}
.ai-flash-tune-px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.ai-flash-tune-py-0_5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}
.ai-flash-tune-px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.ai-flash-tune-py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.ai-flash-tune-p-3 {
    padding: 0.75rem;
}
.ai-flash-tune-p-4 {
    padding: 1rem;
}
.ai-flash-tune-p-6 {
    padding: 1.5rem;
}
.ai-flash-tune-mr-2 {
    margin-right: 0.5rem;
}
.ai-flash-tune-mb-2 {
    margin-bottom: 0.5rem;
}
.ai-flash-tune-mb-3 {
    margin-bottom: 0.75rem;
}
.ai-flash-tune-mb-4 {
    margin-bottom: 1rem;
}
.ai-flash-tune-mb-6 {
    margin-bottom: 1.5rem;
}
.ai-flash-tune-mb-8 {
    margin-bottom: 2rem;
}
.ai-flash-tune-mt-2 {
    margin-top: 0.5rem;
}
.ai-flash-tune-mt-4 {
    margin-top: 1rem;
}
.ai-flash-tune-mt-6 {
    margin-top: 1.5rem;
}
.ai-flash-tune-list-disc {
    list-style-type: disc;
}
.ai-flash-tune-list-inside {
    list-style-position: inside;
}
.ai-flash-tune-absolute {
    position: absolute;
}
.ai-flash-tune-relative {
    position: relative;
}
.ai-flash-tune-pro-feature-card {
    position: relative;
    overflow: hidden;
}
.ai-flash-tune-pro-feature-card:hover .ai-flash-tune-pro-feature-overlay {
    opacity: 1;
}
.ai-flash-tune-progress-bar {
    height: 8px;
    border-radius: 9999px;
    background-color: #e5e7eb;
    overflow: hidden;
    width: 100px;
}
.ai-flash-tune-progress-bar-fill {
    height: 100%;
    background-color: #4f46e5;
    transition: width 0.5s ease-in-out;
}
.ai-flash-tune-filter-form {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}
.ai-flash-tune-traffic-item,
.ai-flash-tune-device-item,
.ai-flash-tune-location-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}
.ai-flash-tune-traffic-item:last-child,
.ai-flash-tune-device-item:last-child,
.ai-flash-tune-location-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.ai-flash-tune-pro-feature-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    cursor: pointer;
    backdrop-filter: blur(3px);
}
/* */

.ai-flash-tune-funnel-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background-color: #e0f2fe;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 120px;
    transition: transform 0.2s ease-in-out;
}
.ai-flash-tune-funnel-arrow {
    width: 30px;
    height: 2px;
    background-color: #9ca3af;
    position: relative;
    margin: 0 0.5rem;
}
.ai-flash-tune-funnel-arrow::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #9ca3af;
}
.ai-flash-tune-insight-label {
    display: block;
}
.ai-flash-tune-behavior-item i {
    display: block;
    line-height: 2rem;
}
.ai-flash-tune-refresh-button {
    line-height: 1.5rem;
    font-size: 0.975rem;
}
.ai-flash-tune-cta-button {
    display: flex;
    width: fit-content;
    text-decoration: unset;
    line-height: 1.5rem;
    font-size: 0.975rem;
    align-items: center;
}
.ai-flash-tune-cta-button:hover {
    color: #FFF;
}
.ai-flash-tune-card-title {
    display: flex;
    align-items: center;
}
.ai-flash-tune-step-label {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #3c434a;
}
.ai-flash-tune-step-value {
    margin: 0;
}
.ai-flash-tune-add-on-description{
    margin-top: 0;
}

/*
 * Date Range Picker Styles
 */
.ai-flash-tune-header-actions-wrapper {
    position: relative;
}
.ai-flash-tune-date-range-form {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    padding: 1rem;
    z-index: 10;
}
.ai-flash-tune-date-range-form.hidden {
    display: none;
}
.ai-flash-tune-date-range-form form {
    gap: 1rem;
}
.ai-flash-tune-date-range-field {
    display: flex;
    flex-direction: column;
}
.ai-flash-tune-date-range-field label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.ai-flash-tune-date-range-field input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}
.ai-flash-tune-date-range-form form input[type="submit"] {
    align-self: flex-end;
    margin-bottom: 2px;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
}

.ai-flash-tune-date-range-form form input[type="submit"]:hover {
    transform: translateY(-1px);
}

/* Funnel Analysis Page Specific Styles */
.ai-flash-tune-funnel-step-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    background-color: #e0f2fe;
    border-radius: 0.5rem;
    text-align: center;
    flex: 1 1 20%;
    min-width: 150px;
    transition: transform 0.2s ease-in-out;
    position: relative;
    margin: 0.5rem;
}
.ai-flash-tune-funnel-step-detail:hover {
    transform: translateY(-3px);
}
.ai-flash-tune-funnel-step-detail p{
    margin: 0;
}
#ai-flash-tune-ask-ai-button{
    width: fit-content;
    background-color: #4f46e5;
    margin-top: 5px;
}
#ai-flash-tune-ask-ai-button:hover{
    background-color: #3e34e0;
    color: #fff;
}
#ai-flash-tune-ask-ai-button:focus{
    box-shadow: unset;
    color: #fff;
}
.ai-flash-tune-segmentation-card p{
    margin:0;
}
.ai-flash-tune-tracker-card p{
    margin: 0;
}
.ai-flash-tune-drop-off-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}
.ai-flash-tune-funnel-arrow-detail {
    width: 40px;
    height: 3px;
    background-color: #9ca3af;
    position: relative;
    margin: 0 1rem;
}
.ai-flash-tune-funnel-arrow-detail::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -6px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #9ca3af;
}
.ai-flash-tune-inline-flex {
    display: inline-flex;
}
.ai-flash-tune-border {
    border-width: 1px;
    border-style: solid;
}
.ai-flash-tune-border-gray-200 {
    border-color: #e5e7eb;
}
.ai-flash-tune-border-t {
    border-top-width: 1px;
}
.ai-flash-tune-border-b {
    border-bottom-width: 1px;
}
.ai-flash-tune-rounded-l-lg {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}
.ai-flash-tune-rounded-r-lg {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}
.ai-flash-tune-divide-y > * + * {
    border-top-width: 1px;
    border-color: #e5e7eb;
}
/* Table Styles */
.ai-flash-tune-table-wrp {
    overflow-x: auto;
}
.ai-flash-tune-table-wrp th,
.ai-flash-tune-table-wrp td {
    border-bottom: 1px solid #e5e7eb;
}
.ai-flash-tune-min-w-full {
    min-width: 100%;
}
.ai-flash-tune-px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.ai-flash-tune-py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.ai-flash-tune-text-xs {
    font-size: 0.75rem;
}
.ai-flash-tune-uppercase {
    text-transform: uppercase;
}
.ai-flash-tune-tracking-wider {
    letter-spacing: 0.05em;
}
.ai-flash-tune-whitespace-nowrap {
    white-space: nowrap;
}
.ai-flash-tune-bg-gray-50{
    background-color: #f9fafb;
}
.ai-flash-tune-py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.ai-flash-tune-pro-feature-overlay p {
    margin-top: 0;
}
.ai-flash-tune-action-link {
    text-decoration: unset;
}
.ai-flash-tune-insight-label,
.ai-flash-tune-data-value {
    margin: 0;
}
.ai-flash-tune-save-button {
    background-color: #4f46e5;
    border-color: #4f46e5;
    width: fit-content;
}
.ai-flash-tune-form-field .ai-flash-tune-label {
/*    color: #374151;*/
}
.ai-flash-tune-form-field .ai-flash-tune-input {
    background-color: #fff;
    color: #374151;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: unset;
    font-size: 1rem;
    line-height: 1.5rem;
    border: 1px solid #d1d5db;
    width: 100%;
    max-width: 100%;
}
.ai-flash-tune-funnel-toggles a.active {
    background-color: #ebecec;
}
.ai-flash-tune-funnel-toggles a {
    color: #2b2b2b;
    text-decoration: unset;
    font-weight: 600;
}
.ai-flash-tune-funnel-toggles a:hover {
    text-decoration: underline;
}
.ai-flash-tune-funnel-toggles a:focus {
    box-shadow:unset;
}
.ai-flash-tune-funnel-section.ai-flash-tune-funnel-analysis {
    min-height: 212px;
}
.ai-flash-tune-card.ai-flash-tune-metric-card p {
    margin: 0;
}
.ai-flash-tune-card.ai-flash-tune-metric-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}
.ai-flash-tune-card.ai-flash-tune-funnel-card {
    border: 1px solid #e5e7eb;
}
.ai-flash-tune-alert-message p{
    margin: 0;
}
/*
 * Empty State Styles
 */
/*
 * Modal Styles for Suggestions
 */
.ai-flash-tune-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(3px);
}

.ai-flash-tune-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
}

.ai-flash-tune-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.ai-flash-tune-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.ai-flash-tune-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.ai-flash-tune-modal-close:hover {
    color: #1f2937;
}

.ai-flash-tune-modal-content p {
    margin-top: 0;
    line-height: 1.6;
    color: #374151;
}
.ai-flash-tune-empty-state-message {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    margin-top: 1rem;
}
.ai-flash-tune-empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}
.ai-flash-tune-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}
.ai-flash-tune-empty-state-text {
    font-size: 0.875rem;
    margin: 0;
}
/*
 * Informational Tooltip Styles
 */
.ai-flash-tune-tooltip-icon {
    position: relative;
    cursor: help;
    color: #9ca3af;
    font-size: 0.9em;
    margin-left: 4px;
}

.ai-flash-tune-tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px; /* Space between icon and tooltip */
    background-color: #1f2937; /* Dark background */
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
}

.ai-flash-tune-tooltip-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px; /* Position the arrow correctly */
    border: 5px solid transparent;
    border-top-color: #1f2937; /* Arrow color */
    z-index: 11;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
}
.ai-flash-tune-tooltip-icon:hover::after,
.ai-flash-tune-tooltip-icon:hover::before {
    opacity: 1;
    visibility: visible;
}
.ai-flash-tune-save-button {
    display: inline-block;
    background-color: #4f46e5;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.ai-flash-tune-save-button:hover {
    background-color: #4338ca; /* A slightly darker indigo for hover */
    transform: translateY(-2px); /* Gives a subtle "lift" effect */
    color: #ffffff;
}
/*new*/
.ai-flash-tune-header-actions{
    flex-wrap: wrap;
    gap: 1rem;
    justify-content:end;
}
.ai-flash-tune-header-actions a{
    margin-left:auto;
}
.ai-flash-tune-header-actions-wrapper{
    display: flex;
    flex-wrap: wrap;
}
.ai-flash-tune-header-actions-wrapper a{
    margin-left: auto;
}
.ai-flash-tune-header-actions form.ai-flash-tune-flex{
    flex-wrap: wrap;gap: 1rem;
}
.ai-flash-tune-header-actions form.ai-flash-tune-flex input{
    margin: 0;flex: 1 1 auto;
}
.ai-flash-tune-header-actions form.ai-flash-tune-flex select{
    margin: 0;flex: 1 1 auto;
}
.ai-flash-tune-header-actions form.ai-flash-tune-flex input[type="submit"]{
    flex: unset;
}
button#aiftco-generate-report-btn{margin-bottom: 1.5rem;}
@media (min-width: 640px) {
    .ai-flash-tune-grid-cols-sm-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    .ai-flash-tune-grid-cols-md-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ai-flash-tune-grid-cols-md-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ai-flash-tune-sidebar {
        border-radius: 0 0.75rem 0.75rem 0;
    }
    .ai-flash-tune-admin-wrapper {
        flex-direction: row;
    }

}
@media (min-width: 1024px) {
    .ai-flash-tune-grid-cols-lg-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ai-flash-tune-grid-cols-lg-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ai-flash-tune-grid-cols-lg-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .ai-flash-tune-lg-col-span-2 {
        grid-column: span 2 / span 2;
    }
    .ai-flash-tune-funnel-flow-detail {
        flex-direction: row;
        flex-wrap: nowrap;
/*        align-items: stretch;*/
        justify-content: space-between;
    }
    .ai-flash-tune-funnel-step-detail {
        flex: 1;
        margin: 0;
    }
}
/* Responsive Styles */
/* Mobile Screen Adjustments (max-width: 767px) */
@media (max-width: 767px) {
    .ai-flash-tune-sidebar-toggle {
        display: inline-block; /* Show the button on mobile */
    }

    .ai-flash-tune-main-content {
        padding: 2rem 1rem; /* Reduce padding on mobile */
    }
    
    .ai-flash-tune-sidebar {
        position: fixed;
        top: 32px; /* Adjust for WordPress admin bar */
        left: 0;
        height: 100vh;
        z-index: 10000;
        min-height: unset;
        transition: transform 0.3s ease-in-out;
        margin-left: 0;
    }

    .ai-flash-tune-sidebar.ai-flash-tune-sidebar-hidden {
        margin-left: -275px;
        display: none;
    }
    
    .ai-flash-tune-page-header {
        flex-direction: column; /* Stacks the title and actions block vertically */
        align-items: flex-start; /* Aligns both to the left */
        gap: 1rem; /* Adds a nice space between the title and the actions below it */
    }
    .ai-flash-tune-page-header.ai-flash-tune-flex-center{
        align-items: flex-start;
        padding-top: 1rem;
    }
    .ai-flash-tune-flex-center.ai-flash-tune-header-actions{
        width: 100%;
        justify-content:space-between;
    }
    div.ai-flash-tune-header-actions-wrapper{
        width: 100%;
    }
    div.ai-flash-tune-header-actions-wrapper div.ai-flash-tune-flex{
        width: 100%;
        justify-content:space-between;
    }
    .ai-flash-tune-drop-off-analysis div.ai-flash-tune-flex{
        flex-wrap: wrap;
        gap: 1rem;
    }
    .ai-flash-tune-drop-off-analysis span.ai-flash-tune-text-lg{
        margin: 0;
    }
    .ai-flash-tune-sidebar {
        position: absolute;
        top: 0;
    }
    .ai-flash-tune-sidebar-toggle{
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 0;
    }
    #ai-flash-tune-date-range-form-wrapper{
        max-width: 350px;
    }
    .ai-flash-tune-main-content .ai-flash-tune-flex {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .ai-flash-tune-main-content .ai-flash-tune-funnel-toggles{
        margin-left: auto;
    }
    .ai-flash-tune-header-actions form.ai-flash-tune-flex{
        margin-left: auto;
    }
    #aiftaa-generate-report-btn{
        margin-left: auto;
    }
    .ai-flash-tune-notice-content{
        flex-wrap: wrap;
        gap: 1rem;
    }
    #ai-flash-tune-date-range-form-wrapper .ai-flash-tune-flex-center{
    flex-wrap: wrap;justify-content: flex-start;
    }
    #ai-flash-tune-date-range-form-wrapper .ai-flash-tune-flex-center .ai-flash-tune-date-range-field{
        flex: 1 1 auto;
    }
    #ai-flash-tune-date-range-form-wrapper .ai-flash-tune-flex-center input{
        flex: 1 1 auto;
    }
    form.ai-flash-tune-filter-form{
        margin-left: auto;
    }
    form.ai-flash-tune-filter-form input{
        flex:1 1 auto;
    }
    form.ai-flash-tune-filter-form select{
        flex:1 1 auto;
    }
    form.ai-flash-tune-filter-form input[type="submit"]{
        flex: none;
    }
    button.ai-flash-tune-ml-4{
        margin-left: 0;
    }
    #ai-flash-tune-date-range-form-wrapper .ai-flash-tune-flex .ai-flash-tune-date-range-field{
        flex: 1 1 auto;
    }
}
/* On very small screens, make sure the sidebar width isn't too large */
@media (max-width: 480px) {
    .ai-flash-tune-sidebar {
        min-width:calc(100% - 10px);
    }
    .ai-flash-tune-page-header .ai-flash-tune-main-title {
        font-size: 1.5rem; /* Reduce title size */
    }
    .ai-flash-tune-funnel-step {
        width: 100%;
    }
    .ai-flash-tune-funnel-arrow {
        height: 20px;
        width: 2px;
        margin: 0 auto;
    }
    .ai-flash-tune-funnel-arrow::after {
        right: auto;
        top: auto;
        border-bottom: 0;
        bottom: -3px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 8px solid #d1d5db;
    }
    .ai-flash-tune-funnel-arrow-detail {
        height: 20px;
        width: 2px;
        margin: 0 auto;
    }
    .ai-flash-tune-funnel-arrow-detail::after {
        right: auto;
        top: auto;
        border-bottom: 0;
        bottom: -3px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 8px solid #d1d5db;
    }
    .ai-flash-tune-funnel-analysis .ai-flash-tune-flex-center{
        flex-wrap: wrap;gap: 1rem;
    }
    a{
        max-width: 100%;
        text-wrap: wrap !important;
        text-align: center;
    }
    .ai-flash-tune-funnel-analysis #ai-flash-tune-funnel-flow a{
        min-width: calc(100% - 1rem);
    }
    .ai-flash-tune-funnel-flow-detail .ai-flash-tune-funnel-step-detail{
        min-width: calc(100% - 1rem);
    }
}

/* RTL Styles */
html[dir="rtl"] body {
    direction: rtl;
}
html[dir="rtl"] .ai-flash-tune-sidebar-nav a i {
    margin-left: 0.75rem;
    margin-right: 0;
}
html[dir="rtl"] .ai-flash-tune-funnel-arrow {
    transform: rotate(180deg);
}
/* html[dir="rtl"] .ai-flash-tune-funnel-arrow::after {
    right: auto;
    left: -5px;
    border-left: none;
    border-right: 8px solid #9ca3af;
} */
html[dir="rtl"] .ai-flash-tune-funnel-arrow-detail {
    transform: rotate(180deg);
}
html[dir="rtl"] .ai-flash-tune-funnel-arrow-detail::after {
    right:-17px;
}
html[dir="rtl"] #ai-flash-tune-funnel-flow .ai-flash-tune-funnel-arrow-detail::after {
    right:-9px;
}
/* html[dir="rtl"] .ai-flash-tune-flex {
    flex-direction: row-reverse;
} */
html[dir="rtl"] .ai-flash-tune-space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}
html[dir="rtl"] .ai-flash-tune-rounded-l-lg{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
html[dir="rtl"] .ai-flash-tune-rounded-r-lg{
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
html[dir="rtl"] .ai-flash-tune-checkbox-control input{
    margin-right: 0;
    margin-left: 0.75rem;
}
html[dir="rtl"] .ai-flash-tune-checkbox-label input{
    margin-right: 0;
    margin-left: 0.5rem;
}
html[dir="rtl"] .ai-flash-tune-mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}
html[dir="rtl"] .ai-flash-tune-text-left {
    text-align: right;
}
html[dir="rtl"] .ai-flash-tune-text-right {
    text-align: left;
}
.ai-flash-tune-w-full {
    width: 100%;
}

/*
 * Settings Page Specific Styles
 */
/* ... existing styles ... */

/* Improved Tab Styles for Settings Page */
.ai-flash-tune-nav-tab-wrapper {
    border-bottom: 1px solid #d1d5db; /* A single, clean line */
    margin-bottom: 0;
    margin-right: 10px;
}
html[dir="rtl"] .ai-flash-tune-nav-tab-wrapper {
    margin-right: 0;
    margin-left: 10px;
}

.ai-flash-tune-nav-tab {
    position: relative;
    display: inline-block;
    padding: 0.75rem 1.5rem; /* More horizontal padding */
    margin-bottom: -1px; /* Overlap the bottom border */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500; /* Medium weight for inactive tabs */
    color: #4b5563; /* Gray text for inactive tabs */
    border: 1px solid transparent;
/*    border-radius: 0.5rem 0.5rem 0 0;*/
    transition: all 0.2s ease-in-out;
}

.ai-flash-tune-nav-tab:hover {
    color: #1f2937;
    background-color: #f3f4f6; /* Light gray on hover */
}

.ai-flash-tune-nav-tab-active {
    color: #1f2937; /* Darker text for active tab */
    font-weight: 600; /* Bolder text for active tab */
    background-color: #ffffff; /* White to match the card below */
    border-color: #d1d5db #d1d5db #ffffff; /* Border on 3 sides, but white on bottom */
}

/* Adds the top accent line to the active tab */
.ai-flash-tune-nav-tab-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #4f46e5; /* Primary indigo color */
    border-radius: 0.5rem 0.5rem 0 0;
}
.ai-flash-tune-card.ai-flash-tune-settings-card {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/**/
/**/
/**/
/**/
.ai-flash-tune-form-label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.8rem;
}

/* This is a generic container for checkboxes, it should not have a background or padding itself. */
.ai-flash-tune-input-area {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

/* Unified style for all text inputs, textareas, and selects */
.ai-flash-tune-input {
    display: block;
    width: 100%;
    box-sizing: border-box; /* Ensures padding doesn't affect the width */
    margin-top: 0.5rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db; /* Use a visible border for consistency */
    color: #374151;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Focus styles for all input types */
.ai-flash-tune-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
    outline: none;
}

/* Checkbox group container */
.ai-flash-tune-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    background-color: #ffffff; /* Apply background to the group */
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

/* Individual checkbox label in a group */
.ai-flash-tune-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    font-size: 0.875rem;
    cursor: pointer;
}
.ai-flash-tune-checkbox-label input {
    margin-right: 0.5rem;
}

/* Single checkbox control (like "User Privacy") */
.ai-flash-tune-checkbox-control {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem; /* Give it padding to align with other fields */
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100%;
}

.ai-flash-tune-checkbox-control span {
    font-size: 1rem; /* Match input font size */
    font-weight: normal;
    color: #374151;
}

.ai-flash-tune-checkbox-control input {
    margin-right: 0.75rem;
}

.ai-flash-tune-input-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}


/* Save Button Styles */
.ai-flash-tune-save-button {
    display: inline-block;
    background-color: #4f46e5;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-flash-tune-save-button:hover {
    background-color: #4338ca; /* A slightly darker indigo for hover */
    transform: translateY(-2px); /* Gives a subtle "lift" effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: #ffffff;
}
.ai-flash-tune-notice-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #dc2626; /* Red-600 border */
    width: 100%;
}

.ai-flash-tune-notice-error {
    background-color: #fee2e2; /* Red-100 */
    color: #991b1b; /* Red-800 */
}
.ai-flash-tune-notice-bar.ai-flash-tune-notice-error a {
    color: #1E40AF;
    text-decoration: none;
}
.ai-flash-tune-notice-bar.ai-flash-tune-notice-error a:hover {
    text-decoration: underline;
}

.ai-flash-tune-notice-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.ai-flash-tune-notice-content .fas {
    font-size: 1.5rem;
    color: #ef4444; /* Red-500 */
}

.ai-flash-tune-notice-button {
    background-color: #ef4444; /* Red-500 */
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease-in-out;
}

.ai-flash-tune-notice-button:hover {
    background-color: #dc2626; /* Red-600 */
    color: #ffffff;
}
/* ADD these new styles at the end of the file */

/* Styles for pages when WooCommerce is inactive */
.ai-flash-tune-is-disabled1 {
    position: relative;
    pointer-events: none;
}

.ai-flash-tune-is-disabled1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(243, 244, 246, 0.8);
    z-index: 10;
    backdrop-filter: blur(2px);
    border-radius: 0.75rem;
}

/* Reusable notice for required plugins */
.ai-flash-tune-wc-required-notice {
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.ai-flash-tune-wc-required-notice .ai-flash-tune-notice-icon {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 1.5rem;
}

.ai-flash-tune-wc-required-notice .ai-flash-tune-notice-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.ai-flash-tune-wc-required-notice .ai-flash-tune-notice-text {
    font-size: 1rem;
    color: #4b5563;
    margin: 0 0 1.5rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ai-flash-tune-wc-required-notice .ai-flash-tune-notice-button {
    display: inline-block;
    background-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.ai-flash-tune-wc-required-notice .ai-flash-tune-notice-button:hover {
    background-color: #4338ca;
    color: #ffffff;
}
html[dir="rtl"] .ai-flash-tune-date-range-form{right: auto;left: 0;}
@media (max-width: 767px) {
    html[dir="rtl"] .ai-flash-tune-sidebar-toggle{left:auto;right:0;}
    html[dir="rtl"] .ai-flash-tune-sidebar{left:auto;right:0;}
    html[dir="rtl"] .ai-flash-tune-main-content .ai-flash-tune-funnel-toggles{margin-left: unset;margin-right: auto;}
    html[dir="rtl"] .ai-flash-tune-funnel-arrow {transform: rotate(360deg);}
    html[dir="rtl"] .ai-flash-tune-funnel-arrow-detail{transform: rotate(360deg);}
    html[dir="rtl"] .ai-flash-tune-space-x-4 > * + *{margin-right: 0;}
    html[dir="rtl"] #aiftaa-generate-report-btn{margin-left: unset;margin-right: auto;}
    html[dir="rtl"] .ai-flash-tune-header-actions form.ai-flash-tune-flex{margin-left: unset;margin-right: auto;}
    html[dir="rtl"] .ai-flash-tune-header-actions-wrapper a{margin-left: unset;margin-right: auto;}
    html[dir="rtl"] button.ai-flash-tune-btn{margin-right: 0rem;}
    html[dir="rtl"] form.ai-flash-tune-filter-form{margin-left: 0;margin-right: auto;}
}
@media (max-width: 480px) {
    html[dir="rtl"] .ai-flash-tune-funnel-arrow-detail::after {
        right:-9px;
    }

}

/* Free-version value layer: health score, local priorities, tracking diagnostics */
.ai-flash-tune-free-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ai-flash-tune-free-badge,
.ai-flash-tune-free-subtle-label,
.ai-flash-tune-free-subtle-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    text-decoration: none;
}
.ai-flash-tune-free-subtle-label,
.ai-flash-tune-free-subtle-link {
    background: #f3f4f6;
    color: #4b5563;
}
.ai-flash-tune-free-subtle-link:hover {
    color: #312e81;
    background: #e0e7ff;
}
.ai-flash-tune-free-badge-good { background: #dcfce7; color: #166534; }
.ai-flash-tune-free-badge-warning { background: #fef3c7; color: #92400e; }
.ai-flash-tune-free-badge-critical { background: #fee2e2; color: #991b1b; }
.ai-flash-tune-free-badge-notice { background: #dbeafe; color: #1e40af; }
.ai-flash-tune-health-score-card {
    position: relative;
    overflow: hidden;
}
.ai-flash-tune-health-score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #6366f1;
}
.ai-flash-tune-health-good::before { background: #22c55e; }
.ai-flash-tune-health-warning::before { background: #f59e0b; }
.ai-flash-tune-health-critical::before { background: #ef4444; }
.ai-flash-tune-health-score-number {
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.04em;
}
.ai-flash-tune-health-score-number span {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.15rem;
    letter-spacing: 0;
}
.ai-flash-tune-health-score-bar {
    height: 0.6rem;
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1rem;
}
.ai-flash-tune-health-score-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    border-radius: inherit;
}
.ai-flash-tune-health-factor-list,
.ai-flash-tune-priority-list,
.ai-flash-tune-top-abandoned-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.ai-flash-tune-health-factor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.6rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}
.ai-flash-tune-health-factor span {
    color: #374151;
    font-weight: 600;
}
.ai-flash-tune-health-factor strong {
    font-size: 0.75rem;
    color: #6b7280;
}
.ai-flash-tune-factor-good { border-color: #bbf7d0; background: #f0fdf4; }
.ai-flash-tune-factor-warning { border-color: #fde68a; background: #fffbeb; }
.ai-flash-tune-factor-critical { border-color: #fecaca; background: #fef2f2; }
.ai-flash-tune-factor-notice { border-color: #bfdbfe; background: #eff6ff; }
.ai-flash-tune-priority-item {
    display: grid;
    grid-template-columns: 2rem 2.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}
.ai-flash-tune-priority-rank {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 800;
}
.ai-flash-tune-priority-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #4f46e5;
}
.ai-flash-tune-priority-body strong {
    color: #111827;
    display: block;
    margin-bottom: 0.15rem;
}
.ai-flash-tune-priority-body p {
    margin: 0;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.45;
}
.ai-flash-tune-priority-action {
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.ai-flash-tune-priority-action:hover { color: #312e81; }
.ai-flash-tune-priority-critical { border-left: 4px solid #ef4444; }
.ai-flash-tune-priority-warning { border-left: 4px solid #f59e0b; }
.ai-flash-tune-priority-good { border-left: 4px solid #22c55e; }
.ai-flash-tune-priority-notice { border-left: 4px solid #3b82f6; }
.ai-flash-tune-tracking-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.ai-flash-tune-tracking-health-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
}
.ai-flash-tune-tracking-health-item i {
    margin-top: 0.1rem;
}
.ai-flash-tune-tracking-health-item strong,
.ai-flash-tune-tracking-health-item span {
    display: block;
}
.ai-flash-tune-tracking-health-item strong {
    color: #111827;
    font-size: 0.85rem;
}
.ai-flash-tune-tracking-health-item span {
    color: #6b7280;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}
.ai-flash-tune-tracking-good i { color: #22c55e; }
.ai-flash-tune-tracking-warning i,
.ai-flash-tune-tracking-notice i { color: #f59e0b; }
.ai-flash-tune-tracking-critical i { color: #ef4444; }
.ai-flash-tune-local-insight-box {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #312e81;
    font-weight: 600;
    line-height: 1.6;
}
.ai-flash-tune-top-abandoned-products-card {
    height: auto;
}
.ai-flash-tune-top-abandoned-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.ai-flash-tune-top-abandoned-item strong,
.ai-flash-tune-top-abandoned-item span {
    display: block;
}
.ai-flash-tune-top-abandoned-item strong {
    color: #111827;
}
.ai-flash-tune-top-abandoned-item span {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}
.ai-flash-tune-top-abandoned-value {
    font-weight: 800;
    color: #dc2626;
    white-space: nowrap;
}
@media (max-width: 960px) {
    .ai-flash-tune-priority-item {
        grid-template-columns: 2rem 2.25rem minmax(0, 1fr);
    }
    .ai-flash-tune-priority-action {
        grid-column: 3;
    }
    .ai-flash-tune-tracking-health-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .ai-flash-tune-free-card-header,
    .ai-flash-tune-top-abandoned-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Free-version usefulness improvements */
.ai-flash-tune-health-waiting-number {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 800;
    color: #374151;
    letter-spacing: -0.03em;
}
.ai-flash-tune-data-confidence-bar {
    height: 0.6rem;
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1rem;
}
.ai-flash-tune-data-confidence-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #93c5fd, #6366f1);
    border-radius: inherit;
}
.ai-flash-tune-data-confidence-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.ai-flash-tune-data-confidence-note strong,
.ai-flash-tune-data-confidence-note span {
    display: block;
}
.ai-flash-tune-data-confidence-note strong {
    color: #111827;
    margin-bottom: 0.25rem;
}
.ai-flash-tune-data-confidence-note span {
    color: #4b5563;
    line-height: 1.5;
}
.ai-flash-tune-confidence-good { border-color: #bbf7d0; background: #f0fdf4; }
.ai-flash-tune-confidence-warning { border-color: #fde68a; background: #fffbeb; }
.ai-flash-tune-confidence-critical { border-color: #fecaca; background: #fef2f2; }
.ai-flash-tune-confidence-notice { border-color: #bfdbfe; background: #eff6ff; }
.ai-flash-tune-weekly-snapshot-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}
.ai-flash-tune-weekly-snapshot-box strong,
.ai-flash-tune-weekly-snapshot-box span {
    display: block;
}
.ai-flash-tune-weekly-snapshot-box strong {
    color: #111827;
    margin-bottom: 0.35rem;
}
.ai-flash-tune-weekly-snapshot-box span {
    color: #4b5563;
    line-height: 1.5;
}
.ai-flash-tune-snapshot-good { border-color: #bbf7d0; background: #f0fdf4; }
.ai-flash-tune-snapshot-warning { border-color: #fde68a; background: #fffbeb; }
.ai-flash-tune-snapshot-notice { border-color: #bfdbfe; background: #eff6ff; }
.ai-flash-tune-tracking-test-box {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
}
.ai-flash-tune-tracking-test-box summary {
    cursor: pointer;
    font-weight: 700;
    color: #4f46e5;
}
.ai-flash-tune-tracking-test-box ol {
    margin: 0.75rem 0 0 1.25rem;
    color: #4b5563;
    line-height: 1.7;
}
.ai-flash-tune-tracking-test-box li {
    margin-bottom: 0.25rem;
}
.ai-flash-tune-local-insight-card .ai-flash-tune-local-insight-box + .ai-flash-tune-weekly-snapshot-box {
    margin-top: 1rem;
}

/* =========================================================
   Modern compact sidebar refresh
   ========================================================= */
.ai-flash-tune-admin-wrapper {
    gap: 18px;
}

.ai-flash-tune-sidebar {
    width: 248px;
    min-width: 248px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, #182235 0%, #10192c 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    min-height: calc(100vh - 58px);
    max-height: calc(100vh - 58px);
    overflow: hidden;
}

.ai-flash-tune-main-content {
    min-width: 0;
}

.ai-flash-tune-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.ai-flash-tune-sidebar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.ai-flash-tune-sidebar-brand:hover {
    color: #ffffff;
}

.ai-flash-tune-sidebar-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.24), rgba(59, 130, 246, 0.24));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    flex-shrink: 0;
}

.ai-flash-tune-sidebar-brand-logo img {
    width: 100%;
    max-width: 44px;
    height: auto;
    display: block;
}

.ai-flash-tune-sidebar-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ai-flash-tune-sidebar-brand-title {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-flash-tune-sidebar-plan-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.22);
}

.ai-flash-tune-sidebar-desktop-toggle {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-flash-tune-sidebar-desktop-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.ai-flash-tune-sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.ai-flash-tune-sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.ai-flash-tune-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.ai-flash-tune-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-flash-tune-nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-flash-tune-nav-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
    padding: 4px 10px 6px;
}

.ai-flash-tune-sidebar-nav a,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ai-flash-tune-sidebar-nav a:hover,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(2px);
}

.ai-flash-tune-sidebar-nav a.active,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.ai-flash-tune-sidebar-nav a i,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link i {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-align: center;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.ai-flash-tune-sidebar-nav a.active i,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link.active i {
    background: rgba(255, 255, 255, 0.18);
}

.ai-flash-tune-nav-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-flash-tune-upgrade-wrp {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-flash-tune-upgrade-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.25);
}

.ai-flash-tune-upgrade-btn:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.3);
}

.ai-flash-tune-btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.ai-flash-tune-btn-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-flash-tune-btn-text {
    font-size: 14px;
    font-weight: 700;
}

.ai-flash-tune-btn-subtext {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
}

.ai-flash-tune-sidebar.is-collapsed {
    width: 92px;
    min-width: 92px;
    padding: 12px 10px;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-header {
    justify-content: center;
    gap: 0;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand {
    justify-content: center;
    width: 44px;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-copy,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-text,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-btn-copy {
    display: none;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-desktop-toggle {
    position: absolute;
    right: 10px;
    top: 12px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link {
    justify-content: center;
    gap: 0;
    padding: 10px;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a:hover,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link:hover {
    transform: translateX(0);
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a i,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link i {
    margin: 0;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-upgrade-btn {
    justify-content: center;
    padding: 12px 10px;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-btn-icon {
    width: 34px;
    height: 34px;
}

@media (max-width: 767px) {
    .ai-flash-tune-admin-wrapper {
        gap: 0;
    }

    .ai-flash-tune-sidebar {
        width: 264px;
        min-width: 264px;
        max-height: 100vh;
        height: calc(100vh - 32px);
        border-radius: 0 18px 18px 0;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
        z-index: 10000;
    }

    .ai-flash-tune-sidebar.is-collapsed {
        width: 264px;
        min-width: 264px;
        padding: 14px;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-copy,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-text,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-btn-copy {
        display: flex;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label {
        display: block;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-header {
        justify-content: space-between;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand {
        width: auto;
        justify-content: flex-start;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link {
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-upgrade-btn {
        justify-content: flex-start;
        padding: 12px 14px;
    }

    .ai-flash-tune-sidebar.ai-flash-tune-sidebar-hidden {
        transform: translateX(-110%);
        visibility: hidden;
        opacity: 0;
        display: flex;
        margin-left: 0;
    }

    .ai-flash-tune-sidebar-toggle {
        z-index: 10001;
        border-radius: 12px;
        left: 12px;
        top: 10px;
    }

    .ai-flash-tune-sidebar-desktop-toggle {
        display: none;
    }
}

@media (min-width: 768px) {
    .ai-flash-tune-sidebar {
        position: sticky;
        top: 44px;
        margin-left: 0;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ai-flash-tune-sidebar-toggle,
    .ai-flash-tune-sidebar-overlay {
        display: none !important;
    }
}

html[dir="rtl"] .ai-flash-tune-sidebar-nav a:hover,
html[dir="rtl"] .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link:hover {
    transform: translateX(-2px);
}

html[dir="rtl"] .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-desktop-toggle {
    right: auto;
    left: 10px;
}


/* =========================================================
   Page cleanup / modern free-version guidance cards
   ========================================================= */
.ai-flash-tune-growth-cta-card,
.ai-flash-tune-product-optimizer-cta,
.ai-flash-tune-cart-intelligence-card,
.ai-flash-tune-empty-guidance-card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ai-flash-tune-growth-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ai-flash-tune-growth-module {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.ai-flash-tune-growth-module i {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: #eef2ff;
}

.ai-flash-tune-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 0.65rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.ai-flash-tune-btn-secondary:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #94a3b8;
}

.ai-flash-tune-free-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.ai-flash-tune-card .ai-flash-tune-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.ai-flash-tune-empty-guidance-card .ai-flash-tune-section-description,
.ai-flash-tune-product-optimizer-cta .ai-flash-tune-section-description,
.ai-flash-tune-cart-intelligence-card .ai-flash-tune-section-description,
.ai-flash-tune-growth-cta-card .ai-flash-tune-section-description {
    max-width: 980px;
}

@media (max-width: 1200px) {
    .ai-flash-tune-growth-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ai-flash-tune-growth-module-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Page cleanup polish: no-data guidance and dashboard lower layout
   ========================================================= */
.ai-flash-tune-dashboard-lower-grid {
    align-items: stretch;
}

.ai-flash-tune-dashboard-lower-grid > .ai-flash-tune-card,
.ai-flash-tune-growth-cta-card,
.ai-flash-tune-data-readiness-card {
    min-width: 0;
}

.ai-flash-tune-dashboard-lower-grid .ai-flash-tune-card-title,
.ai-flash-tune-growth-cta-card .ai-flash-tune-card-title,
.ai-flash-tune-data-readiness-card .ai-flash-tune-card-title {
    line-height: 1.25;
}

.ai-flash-tune-data-readiness-card {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ai-flash-tune-data-readiness-card .ai-flash-tune-section-description {
    max-width: 980px;
    margin-bottom: 0;
}

.ai-flash-tune-empty-guidance-card,
.ai-flash-tune-cart-intelligence-card,
.ai-flash-tune-product-optimizer-cta,
.ai-flash-tune-growth-cta-card {
    overflow: hidden;
}

.ai-flash-tune-growth-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ai-flash-tune-growth-module {
    min-width: 0;
}

.ai-flash-tune-growth-module span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ai-flash-tune-funnel-section {
    clear: both;
}

@media (min-width: 1024px) {
    .ai-flash-tune-dashboard-lower-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .ai-flash-tune-growth-cta-card {
        width: 100%;
    }
}

@media (max-width: 1199px) {
    .ai-flash-tune-dashboard-lower-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .ai-flash-tune-growth-module-grid {
        grid-template-columns: 1fr;
    }
}
.ai-flash-tune-status-waiting {
    background: #dbeafe;
    color: #1d4ed8;
}

/* =========================================================
   Addon/workspace page polish: clean outputs, modern tables, alerts
   ========================================================= */
.aift-page-subtitle {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 15px;
    max-width: 900px;
}

.aift-module-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    overflow: hidden;
}

.aift-module-hero-content {
    min-width: 0;
    flex: 1;
}

.aift-module-hero-content h2 {
    margin: 8px 0 10px;
    font-size: 24px;
    line-height: 1.25;
    color: #0f172a;
}

.aift-module-hero-content p {
    margin: 0;
    max-width: 980px;
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
}

.aift-module-hero-action,
.aift-module-form {
    flex: 0 0 auto;
    min-width: 260px;
}

.aift-module-form .ai-flash-tune-input {
    width: 100%;
    max-width: 420px;
}

.aift-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.aift-feature-chip-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.aift-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 13px;
}

.aift-feature-chip i {
    color: #4f46e5;
}

.aift-card-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.aift-card-heading-row h3 {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.25;
    color: #0f172a;
}

.aift-card-heading-row p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.aift-clean-ai-output {
    color: #0f172a;
    line-height: 1.7;
    font-size: 15px;
}

.aift-clean-ai-output h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #111827;
}

.aift-clean-ai-output p {
    margin: 0 0 12px;
}

.aift-clean-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.aift-clean-list li {
    position: relative;
    padding: 12px 14px 12px 38px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.aift-clean-list li:before {
    content: "";
    position: absolute;
    left: 14px;
    top: 19px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #4f46e5;
}

.aift-empty-state-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #334155;
}

.aift-empty-state-inline i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aift-empty-state-inline strong {
    display: block;
    color: #0f172a;
    margin-bottom: 3px;
}

.aift-empty-state-inline span {
    display: block;
    color: #64748b;
}

.aift-empty-state-wide {
    align-items: flex-start;
}

.aift-mini-metric {
    padding: 18px 20px;
}

.aift-mini-metric span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.aift-mini-metric strong {
    display: block;
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
}

.aift-modern-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.aift-modern-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.aift-modern-table th,
.aift-modern-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.aift-modern-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.aift-modern-table tr:last-child td {
    border-bottom: 0;
}

.aift-report-summary {
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    line-height: 1.7;
    font-size: 15px;
}

.aift-alert-list {
    display: grid;
    gap: 14px;
}

.aift-alert-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.aift-alert-critical {
    border-left: 4px solid #ef4444;
}

.aift-alert-warning {
    border-left: 4px solid #f59e0b;
}

.aift-alert-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    flex-shrink: 0;
}

.aift-alert-warning .aift-alert-icon {
    background: #fef3c7;
    color: #d97706;
}

.aift-alert-content {
    min-width: 0;
    flex: 1;
}

.aift-alert-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.aift-alert-title-row strong {
    color: #0f172a;
    font-size: 16px;
}

.aift-alert-card p {
    margin: 0 0 10px;
    color: #334155;
    line-height: 1.6;
}

.aift-alert-badge,
.aift-status-critical {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
}

.aift-alert-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 700;
}

.aift-alert-action i {
    color: #4f46e5;
}

@media (max-width: 900px) {
    .aift-module-hero,
    .aift-card-heading-row,
    .aift-alert-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .aift-module-hero-action,
    .aift-module-form,
    .aift-module-form .ai-flash-tune-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .aift-empty-state-inline {
        align-items: flex-start;
    }
}

/* AI Flash Tune QA pass: clearer local/external AI setting states. */
.ai-flash-tune-local-mode-notice {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 0.75rem;
    font-weight: 600;
}
.ai-flash-tune-nested-ai-privacy-option {
    margin-left: 1.25rem;
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
}
.ai-flash-tune-muted-setting {
    opacity: 0.58;
}
.ai-flash-tune-muted-setting label,
.ai-flash-tune-muted-setting span {
    cursor: not-allowed;
}
.ai-flash-tune-health-good .ai-flash-tune-health-score-bar span {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.ai-flash-tune-health-warning .ai-flash-tune-health-score-bar span {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}
.ai-flash-tune-health-critical .ai-flash-tune-health-score-bar span {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
.ai-flash-tune-health-notice .ai-flash-tune-health-score-bar span {
    background: linear-gradient(90deg, #60a5fa, #6366f1);
}

/* World-class hardening phase: Help & QA, AI diagnostics, readiness UI */
.aift-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.aift-readiness-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}
.aift-check-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.75;
}
.aift-check-list li {
    margin-bottom: 4px;
}
.aift-qa-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.aift-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.aift-ai-test-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
#aiflt-ai-test-result {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 13px;
    font-weight: 600;
}
#aiflt-ai-test-result.aift-test-ok {
    color: #047857;
}
#aiflt-ai-test-result.aift-test-error {
    color: #b91c1c;
}
.ai-flash-tune-status-good {
    color: #047857;
    background: #dcfce7;
}
.ai-flash-tune-status-warning {
    color: #92400e;
    background: #fef3c7;
}

/* =========================================================
   World-class growth toolkit / setup wizard layer
   ========================================================= */
.ai-flash-tune-page-subtitle {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
    max-width: 820px;
}
.aiflt-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #ecfeff 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}
.aiflt-hero-card h2 {
    margin: 6px 0 8px;
    font-size: 26px;
    line-height: 1.2;
    color: #111827;
}
.aiflt-hero-card p {
    margin: 0;
    color: #4b5563;
    max-width: 680px;
}
.aiflt-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.aiflt-progress-ring {
    width: 94px;
    height: 94px;
    border-radius: 999px;
    background: conic-gradient(#2563eb var(--aiflt-progress, 70%), #dbeafe 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.aiflt-progress-ring:before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: inherit;
    background: #fff;
}
.aiflt-progress-ring span {
    position: relative;
    font-weight: 800;
    color: #1d4ed8;
}
.aiflt-world-grid {
    display: grid;
    gap: 18px;
}
.aiflt-world-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.aiflt-world-card h3,
.aiflt-check-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    color: #111827;
}
.aiflt-world-card p,
.aiflt-check-card p {
    color: #6b7280;
    margin-top: 0;
}
.aiflt-check-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-left: 4px solid #e5e7eb;
}
.aiflt-check-card.is-complete {
    border-left-color: #10b981;
}
.aiflt-check-card.needs-action {
    border-left-color: #f59e0b;
}
.aiflt-check-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
    flex-shrink: 0;
}
.aiflt-check-card.is-complete .aiflt-check-icon {
    background: #ecfdf5;
    color: #059669;
}
.aiflt-check-card.needs-action .aiflt-check-icon {
    background: #fffbeb;
    color: #d97706;
}
.aiflt-check-body {
    min-width: 0;
    flex: 1;
}
.aiflt-dev-checklist {
    margin: 0;
    padding-left: 22px;
}
.aiflt-dev-checklist li {
    margin: 8px 0;
    color: #374151;
}
.aiflt-inline-fields,
.aiflt-inline-form,
.aiflt-button-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.aiflt-inline-fields > div {
    flex: 1 1 160px;
}
.aiflt-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}
.aiflt-chip-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.aiflt-chip-check span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 600;
    font-size: 12px;
}
.aiflt-chip-check input:checked + span {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.aiflt-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}
.aiflt-table-wrap table {
    min-width: 620px;
}
.ai-flash-tune-mt-8 {
    margin-top: 2rem;
}
@media (max-width: 1100px) {
    .aiflt-world-grid-2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 700px) {
    .aiflt-hero-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   AI Flash Tune UX refresh v1.0.1
   ========================================================= */
.ai-flash-tune-sidebar {
    width: 264px;
    min-width: 264px;
    padding: 16px;
    background: radial-gradient(circle at 25% 0%, rgba(79,70,229,.24), transparent 30%), linear-gradient(180deg,#151d33 0%,#0b1324 100%);
}
.ai-flash-tune-sidebar-header { padding: 2px 0 14px; }
.ai-flash-tune-sidebar-brand-logo-wide { width: 162px; height: 42px; border-radius: 0; background: transparent; box-shadow: none; justify-content: flex-start; overflow: visible; }
.ai-flash-tune-sidebar-brand-logo-wide img { width: 162px; max-width: 162px; height: auto; object-fit: contain; }
.ai-flash-tune-sidebar-status { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:14px; background:rgba(15,23,42,.72); color:#dbeafe; border:1px solid rgba(148,163,184,.18); margin: 0 0 16px; font-size:12px; font-weight:700; }
.ai-flash-tune-sidebar-status-dot { width:8px; height:8px; border-radius:999px; background:#38bdf8; box-shadow:0 0 0 4px rgba(56,189,248,.13); }
.ai-flash-tune-nav-section { gap:6px; }
.ai-flash-tune-nav-section-label { color:#9fb1d1; font-size:10.5px; letter-spacing:.18em; padding:12px 10px 7px; }
.ai-flash-tune-nav-link { min-height:44px; }
.ai-flash-tune-nav-icon { width:32px; height:32px; min-width:32px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; color:#dbeafe; background:rgba(148,163,184,.13); border:1px solid rgba(255,255,255,.06); font-size:14px; font-weight:900; line-height:1; }
.ai-flash-tune-sidebar-nav a i.ai-flash-tune-nav-icon { display:none; }
.ai-flash-tune-nav-link.active .ai-flash-tune-nav-icon { background:rgba(255,255,255,.18); color:#fff; }
.aiflt-sidebar-workspace-card .ai-flash-tune-upgrade-btn { background:linear-gradient(135deg, rgba(30,41,59,.95), rgba(49,46,129,.95)); border:1px solid rgba(129,140,248,.25); box-shadow:none; }
.ai-flash-tune-sidebar.is-collapsed { width:92px; min-width:92px; }
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-status,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-logo-wide { display:none; }
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-icon { margin:0; }

.aiflt-addon-summary-grid, .aiflt-settings-overview-grid, .aiflt-growth-hero-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:16px; }
.aiflt-addon-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aiflt-growth-hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aiflt-addon-summary-card, .aiflt-settings-overview-card, .aiflt-growth-hero-card { background:#fff; border:1px solid #e5e7eb; border-radius:18px; padding:18px; box-shadow:0 10px 24px rgba(15,23,42,.05); }
.aiflt-addon-summary-card span, .aiflt-settings-overview-card span, .aiflt-growth-hero-card span { display:block; color:#64748b; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; }
.aiflt-addon-summary-card strong, .aiflt-settings-overview-card strong, .aiflt-growth-hero-card strong { display:block; font-size:24px; line-height:1.1; color:#0f172a; }
.aiflt-settings-overview-card p, .aiflt-growth-hero-card p { color:#64748b; margin:8px 0 0; font-size:13px; line-height:1.45; }
.aiflt-growth-hero-card span { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; background:#eef2ff; color:#4f46e5; margin-bottom:12px; }
.aiflt-growth-hero-card strong { font-size:16px; }
.aiflt-addon-manager-card { padding:24px; }
.aiflt-addon-manager-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:22px; }
.aiflt-focus-pill { display:inline-flex; align-items:center; padding:7px 10px; border-radius:999px; font-size:12px; font-weight:800; color:#4338ca; background:#eef2ff; border:1px solid #c7d2fe; white-space:nowrap; }
.aiflt-addon-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:18px; }
.aiflt-addon-card { border:1px solid #e5e7eb; border-radius:20px; padding:20px; background:linear-gradient(180deg,#ffffff,#f8fafc); box-shadow:0 12px 28px rgba(15,23,42,.05); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.aiflt-addon-card:hover { transform:translateY(-2px); box-shadow:0 18px 36px rgba(15,23,42,.08); border-color:#c7d2fe; }
.aiflt-addon-card.is-highlighted { border-color:#4f46e5; box-shadow:0 0 0 4px rgba(79,70,229,.12), 0 18px 36px rgba(15,23,42,.08); }
.aiflt-addon-card-top { display:flex; align-items:flex-start; gap:12px; }
.aiflt-addon-symbol { width:42px; height:42px; border-radius:15px; display:inline-flex; align-items:center; justify-content:center; background:#eef2ff; color:#4f46e5; font-size:20px; font-weight:900; flex-shrink:0; }
.aiflt-addon-title-wrap { flex:1; min-width:0; }
.aiflt-addon-category { display:block; color:#6366f1; font-size:11px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; margin-bottom:4px; }
.aiflt-addon-card h3 { margin:0; font-size:17px; line-height:1.25; color:#0f172a; }
.aiflt-addon-description { color:#475569; line-height:1.55; margin:14px 0; min-height:66px; }
.aiflt-addon-status-badge { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:900; white-space:nowrap; }
.aiflt-addon-status-badge.is-active { color:#166534; background:#dcfce7; }
.aiflt-addon-status-badge.is-installed { color:#92400e; background:#fef3c7; }
.aiflt-addon-status-badge.is-available { color:#475569; background:#e2e8f0; }
.aiflt-addon-meta-row { display:flex; flex-wrap:wrap; gap:10px; color:#64748b; font-size:12px; padding:12px 0; border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb; }
.aiflt-addon-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:14px; }
.ai-flash-tune-btn-light { background:#f8fafc; border:1px solid #cbd5e1; color:#334155; }
.ai-flash-tune-btn-light:hover { background:#eef2ff; color:#3730a3; }
.aiflt-mini-spinner { width:16px; height:16px; border-radius:999px; border:2px solid #c7d2fe; border-top-color:#4f46e5; display:inline-block; animation:aiflt-spin .8s linear infinite; }
@keyframes aiflt-spin { to { transform:rotate(360deg); } }
.aiflt-notice-symbol { width:24px; height:24px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; font-weight:900; background:#dbeafe; color:#1d4ed8; margin-right:8px; }
.ai-flash-tune-notice-info { background:#eff6ff; border:1px solid #bfdbfe; color:#1e3a8a; }
.ai-flash-tune-notice-warning { background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; }
.ai-flash-tune-notice-success { background:#ecfdf5; border:1px solid #bbf7d0; color:#166534; }
.ai-flash-tune-notice-success .aiflt-notice-symbol { background:#dcfce7; color:#15803d; }

.ai-flash-tune-funnel-section { padding:26px !important; }
.ai-flash-tune-funnel-flow { gap:14px; }
.ai-flash-tune-funnel-step { min-width:150px; border-radius:20px !important; background:linear-gradient(180deg,#e0f2fe,#eef6ff) !important; border:1px solid #bfdbfe; box-shadow:0 10px 24px rgba(59,130,246,.08); }
.ai-flash-tune-funnel-step .ai-flash-tune-step-label { font-size:15px; font-weight:800; color:#0f172a; }
.ai-flash-tune-funnel-arrow { width:38px; opacity:.7; }

.ai-flash-tune-settings-card { border-radius:18px; }
.ai-flash-tune-settings-card .ai-flash-tune-form-field { padding:14px 0; border-bottom:1px solid #eef2f7; }
.ai-flash-tune-settings-card .ai-flash-tune-form-field:last-child { border-bottom:0; }
.ai-flash-tune-input, .ai-flash-tune-settings-card select, .ai-flash-tune-settings-card textarea { border-radius:10px !important; border-color:#cbd5e1 !important; }
.ai-flash-tune-nav-tab-wrapper { border-bottom:1px solid #dbe3ef; }
.ai-flash-tune-nav-tab { border-radius:12px 12px 0 0; padding:12px 18px; }

@media (max-width: 1200px) {
    .aiflt-addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aiflt-growth-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
    .aiflt-addon-grid, .aiflt-addon-summary-grid, .aiflt-settings-overview-grid, .aiflt-growth-hero-grid { grid-template-columns: 1fr; }
}


/* === AI Flash Tune v1.0.7 shared funnel and sidebar polish === */
.ai-flash-tune-funnel-flow,
.ai-flash-tune-funnel-flow-detail {
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 10px 10px;
}

.ai-flash-tune-card:has(#ai-flash-tune-funnel-flow-dashboard),
.ai-flash-tune-card:has(#ai-flash-tune-funnel-flow),
.ai-flash-tune-card:has(.ai-flash-tune-product-mini-funnel) {
    border: 1px solid #e6ebf5;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.ai-flash-tune-funnel-step-item,
.ai-flash-tune-funnel-step-detail {
    width: 138px;
    min-height: 128px;
    padding: 18px 14px;
    border-radius: 18px;
    border: 1px solid #bfdbfe;
    background:
        radial-gradient(circle at top left, rgba(99,102,241,0.10), transparent 34%),
        linear-gradient(180deg, #eff8ff 0%, #e0f2fe 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.ai-flash-tune-funnel-step-detail {
    width: 160px;
    min-height: 144px;
}

.ai-flash-tune-product-mini-funnel .ai-flash-tune-funnel-step-detail {
    width: 148px;
    min-height: 126px;
}

.ai-flash-tune-funnel-step-item:hover,
.ai-flash-tune-funnel-step-detail:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
}

.ai-flash-tune-funnel-step-item i,
.ai-flash-tune-funnel-step-detail i,
.ai-flash-tune-funnel-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(79, 70, 229, 0.10);
    color: #4f46e5 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px !important;
    margin-bottom: 2px !important;
}

.ai-flash-tune-funnel-step-item .fa-check-circle,
.ai-flash-tune-funnel-step-detail .fa-check-circle {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.10);
}

.ai-flash-tune-step-label {
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin: 2px 0 0 !important;
}

.ai-flash-tune-funnel-step-detail .ai-flash-tune-step-label {
    font-size: 15px !important;
}

.ai-flash-tune-step-value {
    color: #475569 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.ai-flash-tune-funnel-status,
.ai-flash-tune-step-conversion,
.ai-flash-tune-drop-off-indicator {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    margin: 5px auto 0 !important;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ai-flash-tune-step-conversion {
    color: #047857 !important;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.ai-flash-tune-drop-off-indicator,
.ai-flash-tune-funnel-status-danger {
    color: #b91c1c !important;
    background: #fef2f2;
    border-color: #fecaca;
}

.ai-flash-tune-funnel-status-warning {
    color: #92400e !important;
    background: #fffbeb;
    border-color: #fde68a;
}

.ai-flash-tune-funnel-status-success {
    color: #047857 !important;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.ai-flash-tune-funnel-status-start,
.ai-flash-tune-funnel-status-neutral {
    color: #334155 !important;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.ai-flash-tune-funnel-arrow,
.ai-flash-tune-funnel-arrow-detail,
.ai-flash-tune-modern-funnel-arrow {
    width: 40px !important;
    height: 2px !important;
    min-width: 28px;
    background: #cbd5e1 !important;
    border-radius: 999px;
    position: relative;
    margin: 0 !important;
    transform: none !important;
}

.ai-flash-tune-funnel-arrow::after,
.ai-flash-tune-funnel-arrow-detail::after,
.ai-flash-tune-modern-funnel-arrow::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: translateY(-50%) rotate(45deg);
}

.ai-flash-tune-funnel-arrow span,
.ai-flash-tune-modern-funnel-arrow span {
    display: none;
}

.ai-flash-tune-funnel-loading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 130px;
    color: #4f46e5;
    font-weight: 700;
}

.ai-flash-tune-funnel-loading i {
    color: #4f46e5;
    font-size: 20px;
}

.ai-flash-tune-action-link,
.ai-flash-tune-funnel-node-link {
    text-decoration: none !important;
}

.ai-flash-tune-action-link:hover .ai-flash-tune-step-label,
.ai-flash-tune-funnel-node-link:hover .ai-flash-tune-step-label {
    color: #3730a3 !important;
}

.ai-flash-tune-funnel-toggles .ai-flash-tune-funnel-toggle-button {
    border-radius: 12px !important;
    padding: 10px 16px !important;
    border: 1px solid #dbe3f0 !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.ai-flash-tune-funnel-toggles .ai-flash-tune-funnel-toggle-button.active {
    color: #0f172a !important;
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}

/* Sidebar refinement while preserving the latest uploaded sidebar structure */
.ai-flash-tune-sidebar {
    background:
        radial-gradient(circle at 20% 0%, rgba(79,70,229,.22), transparent 32%),
        linear-gradient(180deg, #172142 0%, #0f172a 58%, #0b1224 100%) !important;
    box-shadow: 16px 0 45px rgba(15, 23, 42, .14);
}

.ai-flash-tune-sidebar-header {
    padding-bottom: 18px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
}

.ai-flash-tune-sidebar-status,
.ai-flash-tune-sidebar-mode {
    border: 1px solid rgba(148, 163, 184, .24) !important;
    background: rgba(15, 23, 42, .42) !important;
    border-radius: 999px !important;
    color: #e5efff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.ai-flash-tune-sidebar-section-label,
.ai-flash-tune-nav-section-label {
    color: #93a4c7 !important;
    letter-spacing: .14em !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    margin: 22px 18px 10px !important;
}

.ai-flash-tune-nav-link {
    border-radius: 17px !important;
    margin: 5px 12px !important;
    min-height: 48px;
    color: #dbeafe !important;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.ai-flash-tune-nav-link:hover {
    background: rgba(99, 102, 241, .13) !important;
    transform: translateX(2px);
}

.ai-flash-tune-nav-link.active,
.ai-flash-tune-nav-link.current {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%) !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .30) !important;
    color: #fff !important;
}

.ai-flash-tune-nav-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    color: #dbeafe !important;
}

.ai-flash-tune-nav-link.active .ai-flash-tune-nav-icon,
.ai-flash-tune-nav-link.current .ai-flash-tune-nav-icon {
    background: rgba(255,255,255,.16) !important;
    color: #fff !important;
}

.ai-flash-tune-sidebar-footer-card,
.ai-flash-tune-sidebar-bottom-card {
    margin: 16px 14px !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(79,70,229,.23), rgba(37,99,235,.16)) !important;
    border: 1px solid rgba(165, 180, 252, .24) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px rgba(0,0,0,.20) !important;
}

@media (max-width: 1100px) {
    .ai-flash-tune-funnel-flow,
    .ai-flash-tune-funnel-flow-detail {
        gap: 12px;
    }
    .ai-flash-tune-funnel-step-item,
    .ai-flash-tune-funnel-step-detail {
        width: 132px;
    }
    .ai-flash-tune-funnel-arrow,
    .ai-flash-tune-funnel-arrow-detail {
        width: 24px !important;
    }
}

@media (max-width: 760px) {
    .ai-flash-tune-funnel-arrow,
    .ai-flash-tune-funnel-arrow-detail {
        transform: rotate(90deg) !important;
        margin: 4px 0 !important;
    }
}

/* === AI Flash Tune v1.0.8 preset Ask AI funnel diagnosis === */
.ai-flash-tune-preset-ai-section {
    border: 1px solid #e6ebf5;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.ai-flash-tune-preset-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.ai-flash-tune-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ai-flash-tune-provider-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ai-flash-tune-preset-ai-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 16px;
}

.ai-flash-tune-ai-preset-card {
    appearance: none;
    border: 1px solid #dbe5f4;
    background:
        radial-gradient(circle at top left, rgba(99,102,241,.08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 16px;
    min-height: 140px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.ai-flash-tune-ai-preset-card:hover,
.ai-flash-tune-ai-preset-card.active {
    transform: translateY(-2px);
    border-color: #a5b4fc;
    box-shadow: 0 18px 38px rgba(79, 70, 229, .14);
    background:
        radial-gradient(circle at top left, rgba(99,102,241,.14), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
}

.ai-flash-tune-ai-preset-card.is-loading {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.ai-flash-tune-ai-preset-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-flash-tune-ai-preset-title {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.ai-flash-tune-ai-preset-desc {
    display: block;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.45;
}

.ai-flash-tune-preset-ai-options {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.ai-flash-tune-preset-ai-options .ai-flash-tune-form-field {
    margin: 0;
}

.ai-flash-tune-custom-question-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 42px;
    white-space: nowrap;
}

.ai-flash-tune-custom-question-toggle.active {
    border-color: #c7d2fe !important;
    background: #eef2ff !important;
    color: #3730a3 !important;
}

.ai-flash-tune-custom-question-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ai-flash-tune-custom-question-panel textarea {
    min-height: 108px;
    background: #fff;
    resize: vertical;
}

.ai-flash-tune-custom-question-panel .ai-flash-tune-cta-button {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 12px;
}

@media (max-width: 1200px) {
    .ai-flash-tune-preset-ai-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ai-flash-tune-preset-ai-header,
    .ai-flash-tune-preset-ai-options {
        flex-direction: column;
        align-items: stretch;
    }
    .ai-flash-tune-preset-ai-grid {
        grid-template-columns: 1fr;
    }
    .ai-flash-tune-provider-note,
    .ai-flash-tune-custom-question-toggle {
        width: fit-content;
    }
}


/* === AI Flash Tune v1.0.9 AI answer, Growth Toolkit, and sidebar treatment === */
.ai-flash-tune-ai-answer-card {
    border: 1px solid #dbe7ff;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}
.ai-flash-tune-ai-answer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.ai-flash-tune-ai-answer-header h3 {
    margin: 8px 0 0;
    font-size: 22px;
    line-height: 1.2;
    color: #0f172a;
}
.ai-flash-tune-ai-answer-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.ai-flash-tune-ai-answer-content {
    background: transparent !important;
    color: #334155;
    padding: 0 !important;
}
.ai-flash-tune-ai-answer-rendered {
    display: grid;
    gap: 12px;
}
.ai-flash-tune-ai-answer-section {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.ai-flash-tune-ai-answer-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ai-flash-tune-ai-answer-section-title span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 900;
}
.ai-flash-tune-ai-answer-section-title strong {
    color: #0f172a;
    font-size: 15px;
}
.ai-flash-tune-ai-answer-section p {
    margin: 0 0 10px;
    line-height: 1.65;
    color: #334155;
}
.ai-flash-tune-ai-answer-section ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.ai-flash-tune-ai-answer-section li {
    list-style: none;
    position: relative;
    padding: 10px 12px 10px 36px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    line-height: 1.55;
}
.ai-flash-tune-ai-answer-section li:before {
    content: "";
    position: absolute;
    left: 16px;
    top: 18px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #4f46e5;
}
.ai-flash-tune-ai-loading-answer,
.ai-flash-tune-ai-empty-answer {
    min-height: 120px;
    border-radius: 16px;
    border: 1px dashed #c7d2fe;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #475569;
    text-align: center;
}
.ai-flash-tune-ai-loading-spinner {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid #dbeafe;
    border-top-color: #4f46e5;
    animation: aiFlashTuneSpin 0.8s linear infinite;
}
@keyframes aiFlashTuneSpin { to { transform: rotate(360deg); } }

/* Growth Toolkit polish */
.aiflt-growth-page-header {
    align-items: flex-end;
    border-bottom: 1px solid #e5edf7;
    padding-bottom: 16px;
}
.aiflt-growth-flow {
    position: relative;
}
.aiflt-growth-hero-card {
    min-height: 116px;
    border-radius: 22px !important;
    border-color: #e2e8f0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.aiflt-growth-hero-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
}
.aiflt-growth-hero-card span {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.aiflt-growth-settings-form {
    position: relative;
}
.aiflt-world-card {
    border-radius: 22px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06) !important;
    padding: 24px !important;
}
.aiflt-world-card .aiflt-kicker {
    margin-bottom: 8px;
}
.aiflt-world-card h3 {
    font-size: 20px !important;
    margin: 0 0 14px !important;
}
.aiflt-world-card .ai-flash-tune-checkbox-control {
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    background: #fbfdff;
    padding: 11px 12px;
    margin: 8px 0;
}
.aiflt-world-card .ai-flash-tune-input {
    min-height: 40px;
    border-radius: 12px !important;
    border-color: #cbd5e1 !important;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .03);
}
.aiflt-world-card .ai-flash-tune-form-label {
    margin-top: 12px;
    margin-bottom: 6px;
    color: #334155;
    font-weight: 800;
}
.aiflt-chip-check span {
    background: #f8fafc;
    border-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}
.aiflt-table-wrap table {
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0;
}
.aiflt-table-wrap table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #e2e8f0 !important;
}
.aiflt-table-wrap table tbody td {
    color: #475569;
    padding: 12px 14px !important;
}
.aiflt-growth-save-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}
.aiflt-growth-save-row span {
    color: #64748b;
    font-size: 13px;
}
.aiflt-growth-save-button {
    border-radius: 12px !important;
    padding: 11px 18px !important;
    box-shadow: 0 10px 22px rgba(37,99,235,.22) !important;
}

/* Sidebar final polish */
.ai-flash-tune-sidebar {
    border-right: 1px solid rgba(148, 163, 184, .16);
}
.ai-flash-tune-nav-section-label {
    color: #9fb3d9 !important;
    font-size: 11px !important;
    letter-spacing: .15em !important;
    font-weight: 900 !important;
}
.ai-flash-tune-nav-link {
    gap: 12px !important;
    font-weight: 800 !important;
}
.ai-flash-tune-nav-icon {
    font-size: 13px !important;
}
.ai-flash-tune-sidebar .ai-flash-tune-upgrade-btn {
    text-decoration: none !important;
}
.ai-flash-tune-btn-subtext {
    line-height: 1.35;
}

@media (max-width: 900px) {
    .ai-flash-tune-ai-answer-header,
    .aiflt-growth-save-row {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* === AI Flash Tune v1.0.10 world-class Settings page polish === */
.aift-settings-page {
    --aift-card-border: #e4eaf4;
    --aift-card-shadow: 0 18px 44px rgba(15, 23, 42, .07);
    --aift-soft-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    max-width: 1560px;
}

.aift-settings-page .ai-flash-tune-main-title {
    letter-spacing: -0.03em;
}

.aift-settings-page .ai-flash-tune-page-subtitle {
    max-width: 760px;
    color: #64748b;
    font-size: 14px;
}

.aift-settings-command-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.aift-status-card {
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    border-radius: 22px !important;
    border: 1px solid var(--aift-card-border) !important;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, .08), transparent 34%),
        #fff !important;
    box-shadow: var(--aift-soft-shadow) !important;
    min-height: 98px;
    padding: 20px !important;
    position: relative;
    overflow: hidden;
}

.aift-status-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #4f46e5, #38bdf8);
    opacity: .75;
}

.aift-status-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    flex: 0 0 auto;
}

.aift-status-icon-green {
    color: #059669;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.aift-status-icon-amber {
    color: #d97706;
    background: #fffbeb;
    border-color: #fde68a;
}

.aift-status-card span:not(.aift-status-icon) {
    font-size: 11px !important;
    letter-spacing: .11em !important;
    color: #64748b !important;
    margin-bottom: 7px !important;
}

.aift-status-card strong {
    font-size: 20px !important;
    letter-spacing: -0.02em;
    color: #0f172a !important;
}

.aift-status-card p {
    font-size: 13px !important;
    color: #64748b !important;
    margin-top: 7px !important;
}

.aift-privacy-notice-card {
    border-radius: 22px !important;
    border: 1px solid #dbeafe !important;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .88), rgba(255, 255, 255, .96)),
        #fff !important;
    box-shadow: var(--aift-card-shadow) !important;
    padding: 24px !important;
}

.aift-privacy-notice-card .ai-flash-tune-card-title {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a !important;
    font-size: 14px !important;
    margin-bottom: 14px !important;
}

.aift-privacy-notice-card .ai-flash-tune-card-title i {
    margin-right: 0 !important;
}

.aift-privacy-grid > div {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .72);
}

.aift-privacy-grid h4 {
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #334155 !important;
}

.aift-privacy-grid li {
    margin-bottom: 7px;
    color: #475569;
}

.aift-settings-tabs {
    border: 0 !important;
    margin: 0 0 18px !important;
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
    background: #e9eef7;
}

.aift-settings-tabs .ai-flash-tune-nav-tab {
    border: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    color: #475569 !important;
    font-weight: 800 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.aift-settings-tabs .ai-flash-tune-nav-tab::before {
    display: none !important;
}

.aift-settings-tabs .ai-flash-tune-nav-tab-active {
    background: #fff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08) !important;
}

.aift-settings-form-shell {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.aift-settings-panel,
.ai-flash-tune-card.ai-flash-tune-settings-card.aift-settings-panel {
    border: 1px solid var(--aift-card-border) !important;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, .045), transparent 30%),
        #fff !important;
    border-radius: 24px !important;
    box-shadow: var(--aift-card-shadow) !important;
    padding: 26px !important;
    position: relative;
    overflow: hidden;
}

.aift-settings-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #3b82f6, #22c55e);
    opacity: .85;
}

.aift-settings-panel-license::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.aift-settings-panel-tracking::before {
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.aift-system-info-panel::before {
    background: linear-gradient(90deg, #64748b, #0f172a);
}

.aift-settings-panel .ai-flash-tune-card-title {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 20px !important;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px !important;
    color: #0f172a !important;
}

.aift-settings-panel .ai-flash-tune-card-title i {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    margin-right: 0 !important;
}

.aift-settings-panel-license .ai-flash-tune-card-title i {
    background: #fffbeb;
}

.aift-settings-panel-tracking .ai-flash-tune-card-title i {
    background: #ecfeff;
}

.aift-settings-panel .ai-flash-tune-input-description {
    color: #64748b !important;
    line-height: 1.55 !important;
    font-size: 13px !important;
}

.aift-settings-panel .ai-flash-tune-flex-col {
    gap: 18px !important;
}

.aift-settings-panel .ai-flash-tune-form-field {
    padding: 18px;
    border: 1px solid #e6ebf3;
    border-radius: 18px;
    background: #f8fafc;
}

.aift-settings-panel .ai-flash-tune-form-field + .ai-flash-tune-form-field {
    margin-top: 0;
}

.aift-settings-panel-ai .ai-flash-tune-form-field:first-of-type {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-color: #dbe3ff;
}

.aift-settings-panel .ai-flash-tune-form-label {
    color: #0f172a !important;
    font-weight: 900 !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.01em;
}

.aift-settings-panel .ai-flash-tune-input,
.aift-settings-panel select.ai-flash-tune-input,
.aift-settings-panel textarea.ai-flash-tune-input {
    border-radius: 14px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.aift-settings-panel textarea.ai-flash-tune-input {
    min-height: 118px;
}

.aift-settings-panel .ai-flash-tune-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12) !important;
    transform: translateY(-1px);
}

.aift-settings-panel .ai-flash-tune-input-area {
    margin-top: 8px;
}

.aift-settings-panel .ai-flash-tune-checkbox-control,
.aift-settings-panel .ai-flash-tune-checkbox-label {
    min-height: 42px;
    border-radius: 14px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-weight: 650;
}

.aift-settings-panel .ai-flash-tune-checkbox-group {
    border: 1px solid #dbe3ef !important;
    border-radius: 18px !important;
    background: #fff !important;
    padding: 12px !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

.aift-settings-panel input[type="checkbox"] {
    width: 17px;
    height: 17px;
    border-radius: 5px;
}

.aift-settings-panel .ai-flash-tune-local-mode-notice {
    border: 1px solid #bfdbfe !important;
    background: linear-gradient(135deg, #eff6ff, #eef2ff) !important;
    color: #1e40af !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    font-weight: 800;
}

.aift-settings-panel .ai-flash-tune-nested-ai-privacy-option {
    margin-left: 18px;
    padding-left: 16px;
    border-left: 3px solid #dbeafe;
}

html[dir="rtl"] .aift-settings-panel .ai-flash-tune-nested-ai-privacy-option {
    margin-left: 0;
    margin-right: 18px;
    padding-left: 0;
    padding-right: 16px;
    border-left: 0;
    border-right: 3px solid #dbeafe;
}

.aift-ai-test-box {
    display: flex !important;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px !important;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    background: #fff;
}

.aift-settings-save-bar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(199, 210, 254, .86);
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.aift-settings-save-bar strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 3px;
}

.aift-settings-save-bar span {
    color: #64748b;
    font-size: 13px;
}

.aift-settings-save-bar .ai-flash-tune-btn-blue {
    border-radius: 14px !important;
    padding: 12px 18px !important;
    font-weight: 900 !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .25) !important;
}

.aift-settings-panel .form-table {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.aift-settings-panel .form-table th {
    color: #334155;
    font-weight: 900;
    padding: 14px 18px 14px 0;
}

.aift-settings-panel .form-table td {
    padding: 14px 18px;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .aift-settings-command-grid {
        grid-template-columns: 1fr !important;
    }
    .aift-settings-save-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 782px) {
    .aift-settings-panel,
    .ai-flash-tune-card.ai-flash-tune-settings-card.aift-settings-panel,
    .aift-privacy-notice-card {
        padding: 18px !important;
        border-radius: 20px !important;
    }
    .aift-settings-panel .ai-flash-tune-form-field {
        padding: 14px;
    }
    .aift-settings-tabs {
        width: 100%;
        overflow-x: auto;
    }
}


/* === AI Flash Tune v1.0.11 dashboard suggestion and alert polish === */
.aift-performance-alerts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.aift-performance-alerts-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}
.aift-basic-suggestion-modal {
    max-width: 680px !important;
    border-radius: 22px !important;
    overflow: hidden;
}
.aift-basic-suggestion-modal .ai-flash-tune-modal-header {
    align-items: flex-start;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.aift-modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}
.aift-basic-suggestion-content {
    display: grid;
    gap: 16px;
}
.aift-suggestion-summary {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff, #fff);
}
.aift-suggestion-summary i {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    flex: 0 0 auto;
}
.aift-suggestion-summary p {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.65;
}
.aift-suggestion-actions {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.aift-suggestion-actions strong {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
}
.aift-suggestion-actions ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}
.aift-suggestion-actions li {
    margin: 7px 0;
}
html[dir="rtl"] .aift-suggestion-actions ul {
    padding-left: 0;
    padding-right: 20px;
}

/* === AI Flash Tune final admin layout polish ===
   Fixes report-page overlap, collapsed sidebar icon size, and stable content flow. */
.ai-flash-tune-admin-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.ai-flash-tune-main-content,
.ai-flash-tune-admin-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.ai-flash-tune-page-content-wrapper {
    max-width: 100%;
}
.aiflt-admin-page-ai-usage-reports .aiflt-table-wrap,
.aiflt-table-wrap,
.aift-table-wrap,
.aift-modern-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .ai-flash-tune-sidebar {
        flex: 0 0 248px;
    }
    .ai-flash-tune-sidebar.is-collapsed {
        flex-basis: 96px;
        width: 96px !important;
        min-width: 96px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section {
        gap: 12px !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link {
        width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
        padding: 0 !important;
        margin: 7px auto !important;
        border-radius: 18px !important;
        justify-content: center !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-icon,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav a i,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link i {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        border-radius: 16px !important;
        font-size: 18px !important;
        line-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-desktop-toggle {
        width: 34px !important;
        height: 34px !important;
        border-radius: 13px !important;
        right: 10px !important;
        top: 12px !important;
        font-size: 16px !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-upgrade-btn {
        width: 58px !important;
        height: 58px !important;
        min-height: 58px !important;
        padding: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 20px !important;
        justify-content: center !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-btn-icon {
        width: 46px !important;
        height: 46px !important;
        border-radius: 16px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 767px) {
    .ai-flash-tune-admin-wrapper {
        display: block;
        overflow-x: hidden;
    }
    .ai-flash-tune-main-content,
    .ai-flash-tune-admin-main {
        width: 100%;
    }
}


/* =========================================================
   AI Flash Tune World-Class Admin Experience v1.0.7
   A visual/UX upgrade layer only: no counting, tracking, or AI logic changes.
   ========================================================= */

:root {
    --aiflt-ink: #0f172a;
    --aiflt-muted: #64748b;
    --aiflt-soft: #f8fafc;
    --aiflt-line: rgba(148, 163, 184, .28);
    --aiflt-primary: #4f46e5;
    --aiflt-primary-2: #2563eb;
    --aiflt-accent: #06b6d4;
    --aiflt-good: #10b981;
    --aiflt-warn: #f59e0b;
    --aiflt-danger: #ef4444;
    --aiflt-card-shadow: 0 18px 44px rgba(15, 23, 42, .08);
    --aiflt-card-shadow-hover: 0 24px 60px rgba(15, 23, 42, .13);
    --aiflt-radius-xl: 24px;
    --aiflt-radius-lg: 18px;
}

body.toplevel_page_ai_flash_tune #wpcontent,
body[class*="ai-flash-tune"] #wpcontent {
    padding-left: 0 !important;
}

.ai-flash-tune-admin-wrapper {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 0%, rgba(79, 70, 229, .10), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(6, 182, 212, .11), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
    color: var(--aiflt-ink);
}

.ai-flash-tune-admin-wrapper::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .66;
    background-image:
        linear-gradient(rgba(148, 163, 184, .075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .075) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 74%);
}

.ai-flash-tune-main-content,
.ai-flash-tune-admin-main {
    padding: 30px 34px 46px !important;
}

.ai-flash-tune-page-content-wrapper {
    width: min(100%, 1580px);
    margin: 0 auto;
}

/* Premium sidebar command center */
.ai-flash-tune-sidebar {
    position: sticky !important;
    top: 32px;
    min-height: calc(100vh - 42px) !important;
    height: calc(100vh - 42px);
    margin: 18px 0 18px 18px !important;
    border-radius: 28px !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 2%, rgba(99, 102, 241, .36), transparent 31%),
        radial-gradient(circle at 84% 38%, rgba(6, 182, 212, .16), transparent 30%),
        linear-gradient(180deg, #101a33 0%, #0b1224 58%, #070d1b 100%) !important;
    box-shadow: 22px 24px 70px rgba(2, 6, 23, .22) !important;
}

.ai-flash-tune-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,.12), transparent 18%),
        linear-gradient(180deg, transparent, rgba(15, 23, 42, .42));
    opacity: .72;
}

.ai-flash-tune-sidebar > * {
    position: relative;
    z-index: 1;
}

.ai-flash-tune-sidebar-header {
    border-bottom: 1px solid rgba(226, 232, 240, .12) !important;
    margin-bottom: 12px;
}

.ai-flash-tune-sidebar-brand-logo-wide,
.ai-flash-tune-sidebar-brand-logo-wide img {
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28));
}

.ai-flash-tune-sidebar-status {
    min-height: 38px;
    padding: 9px 12px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.07) !important;
    border-color: rgba(226,232,240,.14) !important;
    color: #dbeafe !important;
}

.ai-flash-tune-sidebar-status-dot {
    background: #22c55e !important;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .14), 0 0 24px rgba(34, 197, 94, .36) !important;
}

.aiflt-sidebar-command-card {
    margin: 10px 0 16px;
    padding: 16px;
    border-radius: 22px;
    color: #e5efff;
    background:
        linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.035)),
        linear-gradient(135deg, rgba(79, 70, 229, .28), rgba(6, 182, 212, .12));
    border: 1px solid rgba(199, 210, 254, .22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 42px rgba(0,0,0,.22);
}

.aiflt-sidebar-command-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, .22);
    border: 1px solid rgba(147, 197, 253, .18);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.aiflt-sidebar-command-card strong {
    display: block;
    margin-top: 12px;
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
}

.aiflt-sidebar-command-card p {
    margin: 7px 0 12px;
    color: #b6c4de;
    font-size: 12px;
    line-height: 1.5;
}

.aiflt-sidebar-mini-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.aiflt-sidebar-mini-metrics span {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .44);
    border: 1px solid rgba(226, 232, 240, .10);
    color: #9fb1d1;
    font-size: 10px;
    font-weight: 800;
}

.aiflt-sidebar-mini-metrics b {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 2px;
}

.aiflt-sidebar-quick-links {
    display: grid;
    gap: 8px;
}

.aiflt-sidebar-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 13px;
    color: #e0f2fe !important;
    text-decoration: none !important;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    font-size: 12px;
    font-weight: 850;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.aiflt-sidebar-quick-links a:hover {
    transform: translateX(2px);
    background: rgba(79, 70, 229, .34);
    border-color: rgba(165, 180, 252, .32);
}

.ai-flash-tune-nav-section-label {
    margin: 19px 12px 8px !important;
    padding: 0 !important;
    color: #8da2c7 !important;
}

.ai-flash-tune-nav-link {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 11px;
    min-height: 48px !important;
    margin: 5px 0 !important;
    padding: 7px 9px !important;
    border: 1px solid transparent !important;
    color: #dbeafe !important;
    border-radius: 17px !important;
    text-decoration: none !important;
}

.ai-flash-tune-nav-link::after {
    content: "";
    position: absolute;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #60a5fa;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .18s ease, transform .18s ease;
}

.ai-flash-tune-nav-link:hover {
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(226, 232, 240, .10) !important;
    transform: translateX(2px) !important;
}

.ai-flash-tune-nav-link.active {
    background: linear-gradient(135deg, #635bff 0%, #2563eb 58%, #0891b2 120%) !important;
    border-color: rgba(255,255,255,.15) !important;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .34) !important;
}

.ai-flash-tune-nav-link.active::after {
    opacity: 1;
    transform: scale(1);
    background: #ecfeff;
}

.ai-flash-tune-nav-icon {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.08) !important;
    color: #dbeafe !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.ai-flash-tune-nav-icon i {
    font-size: 14px;
    line-height: 1;
}

.ai-flash-tune-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Page header as executive dashboard header */
.ai-flash-tune-page-header {
    position: relative;
    overflow: hidden;
    min-height: 88px;
    padding: 22px 24px !important;
    border-radius: 26px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.78)),
        radial-gradient(circle at 92% 12%, rgba(79, 70, 229, .16), transparent 28%) !important;
    border: 1px solid rgba(226, 232, 240, .86) !important;
    box-shadow: var(--aiflt-card-shadow) !important;
    backdrop-filter: blur(18px);
}

.ai-flash-tune-page-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #4f46e5, #06b6d4);
}

.ai-flash-tune-main-title {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    color: var(--aiflt-ink) !important;
    font-size: clamp(24px, 2.2vw, 34px) !important;
    line-height: 1.1 !important;
    letter-spacing: -.045em;
    font-weight: 950 !important;
}

.ai-flash-tune-main-title::before {
    content: "";
    width: 44px;
    height: 44px;
    border-radius: 16px;
    flex: 0 0 auto;
    background:
        radial-gradient(circle at 32% 24%, rgba(255,255,255,.88), transparent 20%),
        linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, .24);
}

.ai-flash-tune-last-updated,
.ai-flash-tune-header-actions > span {
    display: inline-flex !important;
    align-items: center;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
    font-weight: 800;
}

/* Command hero */
.aiflt-command-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
    gap: 18px;
    overflow: hidden;
    padding: 26px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 6%, rgba(34, 211, 238, .28), transparent 30%),
        radial-gradient(circle at 88% 10%, rgba(167, 139, 250, .38), transparent 34%),
        linear-gradient(135deg, #111827 0%, #172554 48%, #312e81 100%);
    border: 1px solid rgba(191, 219, 254, .20);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .26);
}

.aiflt-command-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 42% 4%, #000, transparent 72%);
}

.aiflt-command-hero-bg {
    position: absolute;
    width: 320px;
    height: 320px;
    right: -110px;
    bottom: -130px;
    border-radius: 999px;
    background: rgba(34, 211, 238, .16);
    filter: blur(8px);
}

.aiflt-command-hero-main,
.aiflt-command-next-card {
    position: relative;
    z-index: 1;
}

.aiflt-command-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.aiflt-command-hero h1 {
    max-width: 860px;
    margin: 18px 0 10px;
    color: #fff;
    font-size: clamp(30px, 4vw, 58px);
    line-height: .95;
    letter-spacing: -.065em;
    font-weight: 980;
}

.aiflt-command-hero p {
    max-width: 820px;
    margin: 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.68;
}

.aiflt-command-chips,
.aiflt-command-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.aiflt-command-chips span,
.aiflt-command-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.13);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none !important;
}

.aiflt-command-chips strong {
    color: #fff;
}

.aiflt-command-action-row {
    margin-top: 14px;
}

.aiflt-command-action-pill {
    color: #fff !important;
    background: rgba(255,255,255,.12);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.aiflt-command-action-pill:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.20);
    border-color: rgba(255,255,255,.24);
}

.aiflt-command-next-card {
    align-self: stretch;
    min-height: 100%;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    backdrop-filter: blur(20px);
}

.aiflt-command-next-label {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, .16);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.aiflt-command-next-icon {
    width: 48px;
    height: 48px;
    margin: 18px 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 16px 34px rgba(8, 145, 178, .28);
}

.aiflt-command-next-card strong {
    display: block;
    color: #fff;
    font-size: 20px;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.aiflt-command-next-card p {
    margin-top: 10px;
    color: #dbeafe;
    font-size: 13px;
}

.aiflt-command-next-card a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 14px;
    color: #0f172a !important;
    background: #fff;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 950;
    box-shadow: 0 14px 30px rgba(2, 6, 23, .18);
}

.aiflt-command-next-card a:hover {
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* Cards, metrics, and useful admin surfaces */
.ai-flash-tune-card,
.aiflt-addon-card,
.aift-panel,
.aift-modern-card,
.aift-settings-panel,
.aiflt-addon-summary-card,
.aiflt-settings-overview-card,
.aiflt-growth-hero-card {
    border: 1px solid rgba(226, 232, 240, .92) !important;
    border-radius: var(--aiflt-radius-xl) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95)) !important;
    box-shadow: var(--aiflt-card-shadow) !important;
}

.ai-flash-tune-card,
.aiflt-addon-card,
.aift-modern-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ai-flash-tune-card:hover,
.aiflt-addon-card:hover,
.aift-modern-card:hover {
    transform: translateY(-2px);
    border-color: rgba(165, 180, 252, .82) !important;
    box-shadow: var(--aiflt-card-shadow-hover) !important;
}

.ai-flash-tune-insight-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    padding: 22px !important;
}

.ai-flash-tune-insight-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #22c55e);
}

.ai-flash-tune-insight-card::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 116px;
    height: 116px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .075);
}

.ai-flash-tune-insight-label {
    display: block !important;
    margin-bottom: 10px;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    letter-spacing: .09em !important;
    text-transform: uppercase;
}

.ai-flash-tune-data-value {
    display: block;
    color: #0f172a !important;
    font-size: clamp(30px, 3vw, 42px) !important;
    line-height: .95 !important;
    letter-spacing: -.055em;
}

.ai-flash-tune-insight-icon,
.ai-flash-tune-card-title i {
    filter: drop-shadow(0 10px 18px rgba(37, 99, 235, .15));
}

/* Better action hierarchy */
.ai-flash-tune-btn,
.ai-flash-tune-refresh-button,
.ai-flash-tune-upgrade-button,
.ai-flash-tune-notice-button,
button.ai-flash-tune-btn,
input[type="submit"].ai-flash-tune-btn {
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    font-weight: 950 !important;
    letter-spacing: -.01em;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .18) !important;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}

.ai-flash-tune-bg-blue-500,
.ai-flash-tune-btn-blue,
.ai-flash-tune-refresh-button,
.ai-flash-tune-upgrade-button {
    background: linear-gradient(135deg, #4f46e5, #2563eb) !important;
}

.ai-flash-tune-btn:hover,
.ai-flash-tune-refresh-button:hover,
.ai-flash-tune-upgrade-button:hover,
.ai-flash-tune-notice-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.1);
    box-shadow: 0 20px 40px rgba(37, 99, 235, .24) !important;
}

/* Tables feel like a modern WooCommerce cockpit */
.ai-flash-tune-table,
.aift-modern-table,
.aiflt-table,
.wp-list-table.ai-flash-tune-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--aiflt-card-shadow);
}

.ai-flash-tune-table th,
.aift-modern-table th,
.aiflt-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 16px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-flash-tune-table td,
.aift-modern-table td,
.aiflt-table td {
    padding: 15px 16px !important;
    color: #334155;
    border-bottom: 1px solid #edf2f7 !important;
}

.ai-flash-tune-table tr:hover td,
.aift-modern-table tr:hover td,
.aiflt-table tr:hover td {
    background: #f8fafc !important;
}

/* Forms, settings and filters */
.ai-flash-tune-admin-wrapper input[type="text"],
.ai-flash-tune-admin-wrapper input[type="email"],
.ai-flash-tune-admin-wrapper input[type="url"],
.ai-flash-tune-admin-wrapper input[type="password"],
.ai-flash-tune-admin-wrapper input[type="number"],
.ai-flash-tune-admin-wrapper select,
.ai-flash-tune-admin-wrapper textarea {
    min-height: 42px;
    border-radius: 13px !important;
    border: 1px solid #dbe3ef !important;
    background: #fff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 0 rgba(15,23,42,.02) !important;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.ai-flash-tune-admin-wrapper textarea {
    min-height: 118px;
}

.ai-flash-tune-admin-wrapper input:focus,
.ai-flash-tune-admin-wrapper select:focus,
.ai-flash-tune-admin-wrapper textarea:focus {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .14) !important;
    outline: none !important;
}

.ai-flash-tune-notice-bar {
    border-radius: 20px !important;
    border: 1px solid rgba(191, 219, 254, .84) !important;
    background: linear-gradient(135deg, #eff6ff, #fff) !important;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .08) !important;
}

.ai-flash-tune-notice-error,
.ai-flash-tune-notice-bar.ai-flash-tune-notice-error {
    border-color: rgba(254, 202, 202, .90) !important;
    background: linear-gradient(135deg, #fef2f2, #fff) !important;
}

/* Priority list as an admin action queue */
.ai-flash-tune-priority-card {
    overflow: hidden;
}

.ai-flash-tune-priority-item {
    position: relative;
    align-items: center;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, .9) !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.ai-flash-tune-priority-rank {
    width: 34px !important;
    height: 34px !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
    color: #fff !important;
    font-weight: 950 !important;
}

.ai-flash-tune-priority-action {
    border-radius: 12px !important;
    background: #eef2ff !important;
    color: #4338ca !important;
    font-weight: 950 !important;
    text-decoration: none !important;
}

.ai-flash-tune-priority-action:hover {
    background: #4f46e5 !important;
    color: #fff !important;
}

/* Health and progress widgets */
.ai-flash-tune-health-score-number {
    letter-spacing: -.065em;
}

.ai-flash-tune-health-score-bar,
.ai-flash-tune-data-confidence-bar {
    overflow: hidden;
    border-radius: 999px !important;
    background: #e2e8f0 !important;
}

.ai-flash-tune-health-score-bar span,
.ai-flash-tune-data-confidence-bar span {
    background: linear-gradient(90deg, #22c55e, #06b6d4, #4f46e5) !important;
    box-shadow: 0 0 22px rgba(79, 70, 229, .28);
}

/* Modal polish */
.ai-flash-tune-modal,
.ai-flash-tune-modal-content,
.aift-basic-suggestion-modal {
    border-radius: 26px !important;
    border: 1px solid rgba(226, 232, 240, .9) !important;
    box-shadow: 0 36px 100px rgba(2, 6, 23, .30) !important;
}

.ai-flash-tune-modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(79, 70, 229, .14), transparent 28%),
        linear-gradient(180deg, #fff, #f8fafc) !important;
}

/* Collapsed sidebar should stay elegant */
@media (min-width: 768px) {
    .ai-flash-tune-sidebar.is-collapsed {
        width: 94px !important;
        min-width: 94px !important;
        flex-basis: 94px !important;
        padding: 14px 12px !important;
    }

    .ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-command-card,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-status,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-upgrade-wrp {
        display: none !important;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-link {
        justify-content: center !important;
        width: 54px !important;
        height: 54px !important;
        margin: 8px auto !important;
        padding: 0 !important;
    }

    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-link::after {
        right: 2px;
        top: 8px;
    }
}

/* Mobile: still admin-friendly, not cramped */
@media (max-width: 1180px) {
    .aiflt-command-hero {
        grid-template-columns: 1fr;
    }
    .aiflt-command-next-card {
        max-width: 100%;
    }
}

@media (max-width: 782px) {
    body.toplevel_page_ai_flash_tune #wpcontent,
    body[class*="ai-flash-tune"] #wpcontent {
        padding-left: 0 !important;
    }

    .ai-flash-tune-main-content,
    .ai-flash-tune-admin-main {
        padding: 84px 14px 30px !important;
    }

    .ai-flash-tune-sidebar {
        top: 0 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 26px 26px 0 !important;
    }

    .ai-flash-tune-sidebar-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        top: 46px !important;
        left: 12px !important;
        width: 46px !important;
        height: 46px !important;
        border-radius: 16px !important;
        background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
        box-shadow: 0 16px 34px rgba(37, 99, 235, .28) !important;
    }

    .ai-flash-tune-page-header {
        align-items: flex-start !important;
        flex-direction: column !important;
        min-height: unset;
        padding: 20px !important;
    }

    .ai-flash-tune-main-title {
        font-size: 25px !important;
    }

    .ai-flash-tune-main-title::before {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .ai-flash-tune-header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px !important;
        margin-top: 12px;
    }

    .aiflt-command-hero {
        padding: 20px;
        border-radius: 24px;
    }

    .aiflt-command-hero h1 {
        font-size: 34px;
    }

    .aiflt-command-chips span,
    .aiflt-command-action-pill {
        width: 100%;
        justify-content: center;
    }

    .ai-flash-tune-card,
    .aiflt-addon-card,
    .aift-modern-card {
        border-radius: 20px !important;
    }
}

html[dir="rtl"] .ai-flash-tune-sidebar {
    margin: 18px 18px 18px 0 !important;
}
html[dir="rtl"] .ai-flash-tune-page-header::before {
    left: auto;
    right: 0;
}
html[dir="rtl"] .ai-flash-tune-nav-link:hover,
html[dir="rtl"] .aiflt-sidebar-quick-links a:hover {
    transform: translateX(-2px) !important;
}
html[dir="rtl"] .ai-flash-tune-nav-link::after {
    right: auto;
    left: 9px;
}

/* =========================================================
   AI Flash Tune admin redesign v1.0.9
   - compact future-proof sidebar
   - cleaner dashboard overview
   ========================================================= */
.ai-flash-tune-admin-wrapper {
    --aift-bg: #f4f7fb;
    --aift-surface: rgba(255, 255, 255, 0.92);
    --aift-border: #e5edf8;
    --aift-text: #0f172a;
    --aift-muted: #64748b;
    --aift-blue: #2563eb;
    --aift-indigo: #4f46e5;
    --aift-purple: #7c3aed;
    --aift-green: #10b981;
    --aift-red: #ef4444;
    --aift-amber: #f59e0b;
    --aift-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    display: flex !important;
    gap: 22px !important;
    align-items: flex-start !important;
    min-height: calc(100vh - 32px) !important;
    padding: 14px 18px 18px 0 !important;
    background:
        radial-gradient(circle at 16% 0%, rgba(79, 70, 229, 0.10), transparent 34%),
        radial-gradient(circle at 92% 4%, rgba(20, 184, 166, 0.12), transparent 36%),
        linear-gradient(180deg, #f8fbff 0%, var(--aift-bg) 100%) !important;
}

.ai-flash-tune-sidebar {
    width: 272px !important;
    min-width: 272px !important;
    height: calc(100vh - 36px) !important;
    min-height: calc(100vh - 36px) !important;
    max-height: calc(100vh - 36px) !important;
    margin: 0 !important;
    padding: 16px 14px !important;
    border-radius: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background:
        radial-gradient(circle at 25% 0%, rgba(59, 130, 246, .22), transparent 34%),
        linear-gradient(180deg, #111c3b 0%, #0b1224 54%, #071022 100%) !important;
    border: 1px solid rgba(148, 163, 184, .18) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24) !important;
}

.ai-flash-tune-sidebar-header {
    padding: 0 0 14px !important;
    margin: 0 0 12px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
}

.ai-flash-tune-sidebar-brand-logo-wide {
    width: 174px !important;
    height: 44px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.ai-flash-tune-sidebar-brand-logo-wide img {
    width: 174px !important;
    max-width: 174px !important;
    height: auto !important;
    object-fit: contain !important;
}

.ai-flash-tune-sidebar-desktop-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    color: #dbeafe !important;
}

.ai-flash-tune-sidebar-desktop-toggle:hover {
    color: #ffffff !important;
    background: rgba(37, 99, 235, .32) !important;
    transform: translateY(-1px) !important;
}

.ai-flash-tune-sidebar-status {
    margin: 0 0 12px !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    background: rgba(15, 23, 42, .55) !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    color: #dbeafe !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: -.01em !important;
}

.ai-flash-tune-sidebar-status-dot {
    background: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .13) !important;
}

.ai-flash-tune-sidebar-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 0 2px 8px 0 !important;
}

.ai-flash-tune-sidebar-nav {
    gap: 12px !important;
}

.ai-flash-tune-nav-section {
    gap: 5px !important;
}

.ai-flash-tune-nav-section-label {
    margin: 12px 8px 6px !important;
    padding: 0 !important;
    color: #8ea4cc !important;
    font-size: 10px !important;
    letter-spacing: .16em !important;
    font-weight: 900 !important;
}

.ai-flash-tune-nav-link {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border-radius: 15px !important;
    color: #dbeafe !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.ai-flash-tune-nav-link:hover {
    color: #ffffff !important;
    background: rgba(99, 102, 241, .14) !important;
    border-color: rgba(165, 180, 252, .14) !important;
    transform: translateX(2px) !important;
}

.ai-flash-tune-nav-link.active,
.ai-flash-tune-nav-link.current {
    background: linear-gradient(135deg, #2563eb 0%, #5b21b6 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .14) !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .32) !important;
}

.ai-flash-tune-nav-icon,
.ai-flash-tune-sidebar-nav a i,
.ai-flash-tune-sidebar-nav .ai-flash-tune-nav-link i {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.075) !important;
    color: inherit !important;
    font-size: 13px !important;
    margin: 0 !important;
}

.ai-flash-tune-nav-link.active .ai-flash-tune-nav-icon,
.ai-flash-tune-nav-link.active i {
    background: rgba(255,255,255,.18) !important;
}

.ai-flash-tune-nav-text {
    font-size: 13px !important;
    font-weight: 760 !important;
    letter-spacing: -.01em !important;
}

.aiflt-sidebar-footer-compact {
    flex: 0 0 auto !important;
    margin-top: 12px !important;
    padding: 13px !important;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(37, 99, 235, .22), rgba(124, 58, 237, .18)) !important;
    border: 1px solid rgba(165, 180, 252, .22) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 20px 42px rgba(2, 6, 23, .20) !important;
}

.aiflt-sidebar-footer-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    color: #eaf2ff !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.aiflt-sidebar-footer-top strong {
    color: #ffffff !important;
    font-size: 13px !important;
}

.aiflt-sidebar-footer-progress {
    height: 6px !important;
    margin: 10px 0 9px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: rgba(15, 23, 42, .42) !important;
}

.aiflt-sidebar-footer-progress span {
    display: block !important;
    height: 100% !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #22c55e, #38bdf8) !important;
}

.aiflt-sidebar-footer-compact a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    color: #e0f2fe !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.aiflt-sidebar-footer-compact a:hover {
    color: #ffffff !important;
}

.ai-flash-tune-sidebar.is-collapsed {
    width: 84px !important;
    min-width: 84px !important;
    padding: 14px 10px !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-status,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-logo-wide,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-text,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-top,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-progress,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-compact a {
    display: none !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-header {
    justify-content: center !important;
    padding-bottom: 12px !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand {
    display: none !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-link {
    justify-content: center !important;
    padding: 8px !important;
}

.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-compact {
    padding: 10px !important;
}

.ai-flash-tune-main-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ai-flash-tune-page-content-wrapper {
    width: 100% !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding: 0 2px 36px !important;
}


/* =========================================================
   AI Flash Tune v1.1 clean dashboard, sidebar, and addon polish
   Scope: visual/layout only. No tracking, WooCommerce, or AI logic changes.
   ========================================================= */

.ai-flash-tune-admin-wrapper,
.ai-flash-tune-admin-wrapper * {
    box-sizing: border-box;
}

.ai-flash-tune-admin-wrapper {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
}

.ai-flash-tune-main-content,
.ai-flash-tune-admin-main {
    min-width: 0 !important;
    padding: 26px 28px 42px !important;
}

.ai-flash-tune-page-content-wrapper {
    width: min(100%, 1560px) !important;
    margin: 0 auto !important;
}

/* Shared page header: base plugin + addons */
.ai-flash-tune-page-header {
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 0 20px !important;
    padding: 16px 18px !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, .90) !important;
    border: 1px solid rgba(203, 213, 225, .76) !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .06) !important;
    backdrop-filter: blur(14px);
}

.ai-flash-tune-main-title {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: clamp(24px, 2vw, 31px) !important;
    line-height: 1.12 !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em !important;
}

.aift-page-subtitle,
.ai-flash-tune-page-header p,
.ai-flash-tune-dashboard-title-group p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
}

/* Dashboard header */
.ai-flash-tune-dashboard-header {
    min-height: 72px;
}

.ai-flash-tune-dashboard-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    min-width: 0 !important;
}

.ai-flash-tune-dashboard-title-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #7c3aed 100%) !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .24) !important;
    flex: 0 0 44px !important;
}

.ai-flash-tune-dashboard-header .ai-flash-tune-main-title {
    font-size: clamp(27px, 2.1vw, 34px) !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
}

.ai-flash-tune-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.ai-flash-tune-last-updated {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.ai-flash-tune-refresh-button,
.ai-flash-tune-btn-blue,
.ai-flash-tune-btn.ai-flash-tune-btn-blue {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 38px !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22) !important;
    text-decoration: none !important;
    font-weight: 850 !important;
    font-size: 13px !important;
}

.ai-flash-tune-refresh-button:hover,
.ai-flash-tune-btn-blue:hover,
.ai-flash-tune-btn.ai-flash-tune-btn-blue:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, .28) !important;
}

/* Hero / command center */
.aiflt-command-hero {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr) !important;
    align-items: stretch !important;
    gap: 24px !important;
    min-height: 220px !important;
    padding: 26px !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    background:
        radial-gradient(circle at 100% 100%, rgba(20, 184, 166, .26), transparent 30%),
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, .22), transparent 30%),
        linear-gradient(135deg, #0b2a4a 0%, #172554 50%, #4c1d95 100%) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18) !important;
}

.aiflt-command-hero-bg {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    opacity: .30 !important;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px) !important;
    background-size: 42px 42px !important;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.25));
}

.aiflt-command-hero-main,
.aiflt-command-next-card {
    position: relative !important;
    z-index: 1 !important;
}

.aiflt-command-kicker,
.aiflt-command-chips span,
.aiflt-command-action-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .10) !important;
    color: #eff6ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10) !important;
}

.aiflt-command-kicker {
    width: fit-content !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

.aiflt-command-hero h1 {
    max-width: 760px !important;
    margin: 14px 0 9px !important;
    color: #ffffff !important;
    font-size: clamp(34px, 3vw, 46px) !important;
    line-height: 1.06 !important;
    letter-spacing: -0.045em !important;
    font-weight: 850 !important;
    text-wrap: balance;
}

.aiflt-command-hero-main > p {
    max-width: 880px !important;
    margin: 0 !important;
    color: #e0f2fe !important;
    font-size: 14px !important;
    line-height: 1.58 !important;
    font-weight: 560 !important;
}

.aiflt-command-chips,
.aiflt-command-action-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.aiflt-command-chips {
    margin-top: 16px !important;
}

.aiflt-command-chips span {
    min-height: 34px !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 760 !important;
}

.aiflt-command-chips strong {
    color: #ffffff !important;
    font-weight: 900 !important;
}

.aiflt-command-action-row {
    margin-top: 14px !important;
}

.aiflt-command-action-pill {
    min-height: 36px !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.aiflt-command-action-pill:hover {
    background: rgba(255, 255, 255, .18) !important;
    color: #ffffff !important;
}

.aiflt-command-next-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 22px !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, .13) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 48px rgba(0, 0, 0, .14) !important;
    backdrop-filter: blur(12px) !important;
}

.aiflt-command-next-card strong {
    color: #ffffff !important;
    font-size: 17px !important;
    line-height: 1.28 !important;
    font-weight: 850 !important;
}

.aiflt-command-next-card p {
    color: #dbeafe !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

.aiflt-command-next-card a {
    width: fit-content !important;
    border-radius: 12px !important;
    font-weight: 850 !important;
}

/* Cards and KPI row */
.ai-flash-tune-notice-bar,
.ai-flash-tune-card {
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .065) !important;
}

.ai-flash-tune-card:hover {
    transform: none !important;
}

.ai-flash-tune-key-insights {
    display: grid !important;
    gap: 16px !important;
}

.ai-flash-tune-insight-card {
    min-height: 112px !important;
    padding: 20px !important;
    position: relative !important;
    overflow: hidden !important;
}

.ai-flash-tune-insight-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #22c55e) !important;
}

.ai-flash-tune-insight-label {
    display: block !important;
    margin-bottom: 8px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .10em !important;
    text-transform: uppercase !important;
}

.ai-flash-tune-data-value {
    display: block !important;
    color: #0f172a !important;
    font-size: 31px !important;
    letter-spacing: -0.045em !important;
    line-height: 1 !important;
}

.ai-flash-tune-insight-icon {
    width: 52px !important;
    height: 52px !important;
    border-radius: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eef2ff !important;
    font-size: 23px !important;
}

/* Health + priorities: keep What to Check First beside Health on normal desktop */
.ai-flash-tune-free-insights-row {
    display: grid !important;
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 22px !important;
}

.ai-flash-tune-free-insights-row > .ai-flash-tune-health-score-card,
.ai-flash-tune-free-insights-row > .ai-flash-tune-priority-card {
    width: auto !important;
    min-width: 0 !important;
}

.ai-flash-tune-free-insights-row > .ai-flash-tune-priority-card {
    grid-column: auto !important;
}

.ai-flash-tune-health-score-card,
.ai-flash-tune-priority-card,
.ai-flash-tune-tracking-health-card,
.ai-flash-tune-local-insight-card,
.ai-flash-tune-top-abandoned-products-card,
.ai-flash-tune-drop-off-analysis,
.ai-flash-tune-low-performers,
.ai-flash-tune-checkout-detector,
.ai-flash-tune-growth-cta-card {
    padding: 22px !important;
}

.ai-flash-tune-free-card-header,
.aift-card-heading-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

.ai-flash-tune-card-title,
.aift-card-heading-row h2,
.aift-card-heading-row h3,
.aift-section-title,
.aiftac-section-title,
.aiftpo-section-title,
.aiftrp-section-title {
    color: #0f172a !important;
    font-size: 17px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
}

.ai-flash-tune-section-description {
    color: #475569 !important;
    line-height: 1.55 !important;
}

.ai-flash-tune-free-subtle-label,
.ai-flash-tune-free-badge,
.ai-flash-tune-free-subtle-link,
.ai-flash-tune-badge,
.ai-flash-tune-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 999px !important;
    padding: 6px 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.ai-flash-tune-priority-list,
.ai-flash-tune-top-abandoned-list {
    display: grid !important;
    gap: 10px !important;
}

.ai-flash-tune-priority-item {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    border-left-width: 4px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045) !important;
    padding: 14px !important;
    background: #ffffff !important;
}

.ai-flash-tune-priority-rank {
    width: 34px !important;
    height: 34px !important;
    border-radius: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .18) !important;
}

.ai-flash-tune-priority-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    color: #4f46e5 !important;
}

.ai-flash-tune-priority-body strong {
    display: block !important;
    color: #0f172a !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
}

.ai-flash-tune-priority-body p {
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
}

.ai-flash-tune-priority-action {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border-radius: 999px !important;
    padding: 7px 10px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    font-weight: 850 !important;
    font-size: 12px !important;
}

.ai-flash-tune-priority-action:hover {
    background: #e0e7ff !important;
    color: #3730a3 !important;
}

/* Tracking and snapshot */
.ai-flash-tune-free-ops-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

.ai-flash-tune-tracking-health-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.ai-flash-tune-tracking-health-item,
.ai-flash-tune-top-abandoned-item,
.aift-mini-metric,
.aift-clean-output-card,
.aift-alert-card,
.aift-addon-card,
.aiftas-segment-card {
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .045) !important;
}

.ai-flash-tune-tracking-health-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px !important;
}

.ai-flash-tune-tracking-health-item i {
    color: #22c55e !important;
    margin-top: 2px !important;
}

.ai-flash-tune-tracking-health-item strong {
    display: block !important;
    color: #0f172a !important;
    font-weight: 800 !important;
}

.ai-flash-tune-tracking-health-item span {
    display: block !important;
    color: #64748b !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

.ai-flash-tune-local-insight-box,
.ai-flash-tune-weekly-snapshot-box,
.ai-flash-tune-tracking-test-box {
    border-radius: 16px !important;
    line-height: 1.55 !important;
}

/* Dashboard lower sections */
.aift-performance-alerts-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.ai-flash-tune-top-abandoned-products-card {
    margin-bottom: 0 !important;
}

.ai-flash-tune-top-abandoned-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 13px 14px !important;
}

.ai-flash-tune-top-abandoned-item strong {
    display: block !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

.ai-flash-tune-top-abandoned-item span,
.ai-flash-tune-top-abandoned-value {
    color: #64748b !important;
    font-size: 12.5px !important;
    font-weight: 750 !important;
}

.ai-flash-tune-drop-off-analysis .ai-flash-tune-behavior-item {
    border-radius: 18px !important;
    padding: 18px 14px !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
}

.ai-flash-tune-funnel-section {
    padding: 24px !important;
}

.ai-flash-tune-funnel-flow {
    gap: 20px !important;
    padding: 22px 10px 8px !important;
}

.ai-flash-tune-funnel-step-item {
    width: 146px !important;
    min-height: 136px !important;
    border-radius: 20px !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .10) !important;
}

.ai-flash-tune-funnel-arrow {
    width: 42px !important;
}

.ai-flash-tune-dashboard-lower-grid {
    display: grid !important;
    grid-template-columns: minmax(380px, 1fr) minmax(380px, 1fr) !important;
    gap: 22px !important;
}

.ai-flash-tune-checkout-detector .ai-flash-tune-detector-status {
    align-items: center !important;
    gap: 10px !important;
    line-height: 1.35 !important;
}

.ai-flash-tune-growth-cta-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(79, 70, 229, .10), transparent 30%),
        #ffffff !important;
}

.ai-flash-tune-growth-module-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.ai-flash-tune-growth-module {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    padding: 14px !important;
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* Base/addon page polish */
.aift-module-hero {
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(79, 70, 229, .14), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #dbeafe !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .065) !important;
}

.aift-kicker,
.aift-feature-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 999px !important;
    border: 1px solid #dbeafe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 850 !important;
}

.aift-feature-chip-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.aift-module-form,
.aift-clean-output-card,
.aift-alert-list-card,
.aiftcr-readiness-card,
.aiftas-filter-card,
.aiflt-addon-manager-card,
.ai-flash-tune-settings-card {
    border-radius: 22px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .055) !important;
}

.ai-flash-tune-input,
.ai-flash-tune-admin-wrapper input[type="text"],
.ai-flash-tune-admin-wrapper input[type="number"],
.ai-flash-tune-admin-wrapper input[type="email"],
.ai-flash-tune-admin-wrapper input[type="url"],
.ai-flash-tune-admin-wrapper select,
.ai-flash-tune-admin-wrapper textarea {
    border-radius: 12px !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

.ai-flash-tune-admin-wrapper input:focus,
.ai-flash-tune-admin-wrapper select:focus,
.ai-flash-tune-admin-wrapper textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .14) !important;
}

/* Sidebar stability */
.ai-flash-tune-nav-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.ai-flash-tune-nav-icon i {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-desktop-toggle {
    position: static !important;
    right: auto !important;
    top: auto !important;
}

.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-compact {
    padding: 10px !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-status,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-top,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-progress,
.ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-compact a,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-text,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label,
.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-logo-wide {
    display: none !important;
}

.ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-link {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Responsive cleanup */
@media (max-width: 1180px) {
    .aiflt-command-hero {
        grid-template-columns: 1fr !important;
    }
    .aiflt-command-next-card {
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 1120px) {
    .ai-flash-tune-free-insights-row,
    .ai-flash-tune-free-ops-row,
    .ai-flash-tune-dashboard-lower-grid {
        grid-template-columns: 1fr !important;
    }
    .ai-flash-tune-free-insights-row > .ai-flash-tune-priority-card {
        grid-column: auto !important;
    }
    .ai-flash-tune-growth-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 960px) {
    .ai-flash-tune-admin-wrapper {
        padding-right: 12px !important;
        gap: 14px !important;
    }
    .ai-flash-tune-page-header,
    .ai-flash-tune-dashboard-header,
    .aift-performance-alerts-header,
    .ai-flash-tune-free-card-header,
    .aift-card-heading-row {
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    .ai-flash-tune-header-actions {
        justify-content: flex-start !important;
    }
    .ai-flash-tune-priority-item {
        grid-template-columns: auto auto minmax(0, 1fr) !important;
    }
    .ai-flash-tune-priority-action {
        grid-column: 3 / 4 !important;
        width: fit-content !important;
    }
}

@media (max-width: 767px) {
    .ai-flash-tune-admin-wrapper {
        display: block !important;
        padding: 12px !important;
    }
    .ai-flash-tune-main-content,
    .ai-flash-tune-admin-main {
        padding: 18px 14px 34px !important;
    }
    .ai-flash-tune-sidebar {
        width: 284px !important;
        min-width: 284px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 24px 24px 0 !important;
    }
    .ai-flash-tune-sidebar.is-collapsed {
        width: 284px !important;
        min-width: 284px !important;
        padding: 16px 14px !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-status,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-sidebar-brand-logo-wide,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-section-label,
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-text,
    .ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-top,
    .ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-progress,
    .ai-flash-tune-sidebar.is-collapsed .aiflt-sidebar-footer-compact a {
        display: inherit !important;
    }
    .ai-flash-tune-sidebar.is-collapsed .ai-flash-tune-nav-link {
        justify-content: flex-start !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .ai-flash-tune-sidebar-desktop-toggle {
        display: none !important;
    }
    .aiflt-command-hero h1 {
        font-size: 33px !important;
    }
    .aiflt-command-chips span,
    .aiflt-command-action-pill {
        width: 100% !important;
        justify-content: center !important;
    }
    .ai-flash-tune-key-insights,
    .ai-flash-tune-tracking-health-grid,
    .ai-flash-tune-growth-module-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Fixed Zywrap endpoint display */
.aiflt-fixed-endpoint {
    display: inline-flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-all;
}

/* === AI Flash Tune Funnel Analysis structured AI report renderer === */
.aiflt-funnel-ai-report{display:grid;gap:12px}
.aiflt-funnel-ai-hero{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border:1px solid #bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff);border-radius:18px;padding:16px 18px}
.aiflt-funnel-ai-kicker{display:inline-flex;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;color:#4f46e5;background:#eef2ff;border:1px solid #c7d2fe;border-radius:999px;padding:4px 9px;margin-bottom:8px}
.aiflt-funnel-ai-hero h3{margin:0 0 5px;font-size:18px;font-weight:900;color:#0f172a}.aiflt-funnel-ai-hero p{margin:0;color:#475569;line-height:1.55}
.aiflt-funnel-ai-badges{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.aiflt-funnel-ai-badge{border:1px solid #bfdbfe;background:#fff;color:#1e3a8a;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;white-space:nowrap}.aiflt-funnel-ai-warn{border-color:#fed7aa!important;background:#fff7ed!important;color:#9a3412!important}.aiflt-funnel-ai-safe{border-color:#bbf7d0!important;background:#ecfdf5!important;color:#065f46!important}
.aiflt-funnel-ai-section{border:1px solid #dbeafe;background:#fff;border-radius:18px;padding:16px;margin:0}.aiflt-funnel-ai-section h4{margin:0 0 10px!important;font-size:15px!important;font-weight:900;color:#0f172a!important}.aiflt-funnel-ai-section>p{margin:0;color:#334155;line-height:1.6}.aiflt-funnel-ai-warning{border-color:#fdba74!important;background:#fff7ed!important}
.aiflt-funnel-ai-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}.aiflt-funnel-ai-card{border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;padding:12px 14px;color:#334155;line-height:1.5;position:relative}.aiflt-funnel-ai-card strong{display:block;color:#0f172a;font-weight:900;margin-bottom:5px}.aiflt-funnel-ai-card p{margin:4px 0;color:#334155;line-height:1.5}.aiflt-funnel-ai-card p span{font-weight:900;color:#1d4ed8}.aiflt-funnel-ai-warning-card{border-color:#fdba74!important;background:#fffaf0!important}.aiflt-funnel-ai-step{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #c7d2fe;border-radius:9px;background:#eef2ff;color:#4338ca;font-weight:900;margin-bottom:7px}.aiflt-funnel-ai-advanced{border:1px solid #dbeafe;border-radius:16px;background:#fff;padding:12px}.aiflt-funnel-ai-advanced summary{cursor:pointer;color:#4338ca;font-weight:900}
@media(max-width:760px){.aiflt-funnel-ai-hero{flex-direction:column}.aiflt-funnel-ai-badges{justify-content:flex-start}.aiflt-funnel-ai-grid{grid-template-columns:1fr}}
