@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.08);
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

/* --- KEYFRAMES --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

body {
    background: var(--bg-page);
}

#sip-root {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 1200px;
    margin: 32px auto;
    color: var(--text-main);
    line-height: 1.5;
    animation: fadeInUp 0.3s ease;
}

/* --- COMPONENTS --- */
.sip-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}
.sip-card:hover {
    box-shadow: var(--shadow-md);
}

.sip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1.5px solid transparent;
    text-decoration: none;
    letter-spacing: -0.1px;
    position: relative;
    overflow: hidden;
}
.sip-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.15s;
}
.sip-btn:hover::before {
    background: rgba(255,255,255,0.08);
}

.sip-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.sip-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.sip-btn.secondary {
    background: white;
    border-color: var(--border);
    color: var(--text-main);
}
.sip-btn.secondary:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
}

.sip-btn.ghost {
    background: transparent;
    color: var(--text-muted);
}
.sip-btn.ghost:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* Greyed/disabled but still clickable */
.sip-btn:disabled,
.sip-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.sip-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 14px;
    transition: 0.2s;
    outline: none;
    background: #fafbff;
}
.sip-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

/* --- HEADER --- */
.sip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.sip-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sip-title h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.6px;
}

.sip-badge-status {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.6px;
}
.sip-badge-status.premium {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.sip-badge-status.free {
    background: #e2e8f0;
    color: #64748b;
}

.sip-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- DROPDOWN --- */
.sip-dropdown {
    position: relative;
    display: inline-block;
}
.sip-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    padding-top: 8px;
    background: transparent;
    min-width: 150px;
    z-index: 100;
}
.sip-dropdown-menu-inner {
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.sip-dropdown:hover .sip-dropdown-menu { display: block; }
.sip-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.sip-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* --- WELCOME --- */
.sip-welcome-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sip-welcome-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
}
.sip-welcome-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
/* Welcome — max width a bit larger to fit the guided layout */
.sip-welcome-card { max-width: 520px; }
.sip-welcome-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.sip-ws {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.sip-ws-n {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    background: var(--primary-light);
    color: var(--primary);
}
.sip-ws-arrow { color: #cbd5e1; font-weight: 700; }
.sip-choice-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sip-choice-box:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 14px rgba(99,102,241,0.06);
}
.sip-choice-head { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.sip-choice-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }

/* --- STAT CARDS --- */
.sip-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.sip-stat-card {
    padding: 20px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.sip-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    transition: background 0.2s;
}
.sip-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Indexed card */
#stat-card-indexed::before { background: linear-gradient(90deg, #10b981, #34d399); }
#stat-card-indexed:hover { border-color: #10b981 !important; box-shadow: 0 6px 20px rgba(16,185,129,0.18); }

/* Not indexed card */
#stat-card-not_indexed::before { background: linear-gradient(90deg, #ef4444, #f87171); }
#stat-card-not_indexed:hover {
    border-color: #ef4444 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239,68,68,0.18);
}

/* --- STYLED SELECT (period filter) --- */
.sip-select-pill {
    padding: 0 12px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.sip-select-pill:focus, .sip-select-pill:hover {
    border-color: var(--primary);
}

/* --- ACTION BUTTONS (Check / Index groups) --- */
.sip-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.sip-action-google {
    background: white;
    color: #374151;
    border: 1.5px solid #d1d5db;
}
.sip-action-google:not([disabled]):hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0369a1;
}
.sip-action-google[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}
.sip-action-premium {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 1px 6px rgba(99,102,241,0.3);
}
.sip-action-premium:not([disabled]):hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(99,102,241,0.4);
}
.sip-action-premium[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- ULTRA BUTTON (Instant Indexing) --- */
.sip-ultra-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #06b6d4, #6366f1);
    background-size: 200% 200%;
    animation: shimmer 3s linear infinite;
    color: white;
    box-shadow: 0 3px 14px rgba(16,185,129,0.4);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.sip-ultra-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.15s;
}
.sip-ultra-btn:not([disabled]):hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(16,185,129,0.5);
}
.sip-ultra-btn:not([disabled]):hover::before {
    background: rgba(255,255,255,0.1);
}
.sip-ultra-btn[disabled] {
    opacity: 0.5;
    cursor: pointer; /* still clickable for force action */
    animation: none;
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

/* Reset action button in table */
.btn-action-reset {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
    font-size: 14px;
}
.btn-action-reset:hover {
    background: #fde68a;
    border-color: #f59e0b;
    color: #78350f;
}


/* Rate card */
#stat-card-rate::before { background: linear-gradient(90deg, #6366f1, #a855f7); }
#stat-card-rate:hover { box-shadow: 0 6px 20px rgba(99,102,241,0.15); }

.sip-stat-icon {
    font-size: 22px;
    margin-bottom: 2px;
    display: block;
}
.sip-stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1.1;
}
.sip-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- FILTERS BAR --- */
.sip-filters-bar {
    background: white;
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: none;
    flex-wrap: wrap;
}

.sip-search-box {
    position: relative;
    width: 220px;
}
.sip-search-box input { padding-left: 34px; }
.sip-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* --- ACTION BAR (Check / Index buttons row) --- */
.sip-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 4px;
}

/* Check buttons — stronger visual weight */
#btn-scan, #btn-scan-premium {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(14,165,233,0.3);
    font-weight: 700;
}
#btn-scan:hover:not(:disabled), #btn-scan-premium:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14,165,233,0.4);
}

/* Index buttons — greyed but clickable (opacity handled by JS) */
#btn-bulk-google {
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #374151;
    font-weight: 600;
}
#btn-bulk-google:not([disabled]):hover {
    border-color: #6366f1;
    color: #6366f1;
    background: var(--primary-light);
    transform: translateY(-1px);
}

#btn-bulk-premium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
    font-weight: 700;
}
#btn-bulk-premium:not([disabled]):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245,158,11,0.4);
}

#btn-bulk-instant {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
    font-weight: 700;
}
#btn-bulk-instant:not([disabled]):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16,185,129,0.4);
}

/* Greyed state — visible but semi-transparent, still clickable */
#btn-bulk-google[style*="opacity: 0.5"],
#btn-bulk-premium[style*="opacity: 0.5"],
#btn-bulk-instant[style*="opacity: 0.5"] {
    cursor: pointer !important;
}

/* --- TABLE --- */
.sip-table-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.sip-table {
    width: 100%;
    border-collapse: collapse;
}

.sip-table th {
    text-align: left;
    padding: 11px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sip-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    color: var(--text-main);
    vertical-align: middle;
    transition: background 0.12s;
}

.sip-table tr:last-child td { border-bottom: none; }
.sip-table tr:hover td { background: #fafbff; }

/* Checkbox Cell */
.sip-cell-check { width: 40px; text-align: center; }
.sip-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    accent-color: var(--primary);
}

.sip-url-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sip-url-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 13.5px;
}
.sip-url-link {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: none;
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.15s;
}
.sip-url-link:hover { color: var(--primary); }

/* --- STATUS BADGES --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.status-badge.indexed {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.not-indexed {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge.pending {
    background: #f1f5f9;
    color: #475569;
}
.status-badge.scanning {
    background: #dbeafe;
    color: #1e40af;
}
.status-badge.waiting {
    background: #fef3c7;
    color: #92400e;
}
.status-badge.error {
    background: #ffe4e6;
    color: #9f1239;
}
.status-badge.unknown {
    background: #f1f5f9;
    color: #64748b;
}
/* Live pulse dot for checking/waiting */
.status-badge.scanning::before,
.status-badge.waiting::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

/* --- ACTION BUTTONS IN TABLE ROWS --- */
.action-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-size: 14px;
}
.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* --- FOOTER PAGINATION --- */
.sip-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: white;
}
.sip-pagination-info {
    font-size: 12.5px;
    color: var(--text-muted);
}
.sip-pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sip-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}
.sip-pagination-page {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.sip-pagination-page:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.sip-pagination-page.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    pointer-events: none;
}
.sip-pagination-ellipsis {
    min-width: 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
}

/* --- BULK SELECTION BANNER --- */
.sip-selection-banner {
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border: 1.5px solid #c7d2fe;
    color: #3730a3;
    padding: 10px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 14px;
    display: none;
    box-shadow: 0 2px 8px rgba(99,102,241,0.1);
}
.sip-selection-action {
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 8px;
    color: var(--primary);
}

/* --- LOGS --- */
.sip-logs {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11.5px;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #1e293b;
}
.log-item {
    border-bottom: 1px solid #1e293b;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.log-item:last-child { border-bottom: none; }
.log-success { color: #4ade80; }
.log-error   { color: #f87171; }
.log-info    { color: #93c5fd; }

/* --- UTILS --- */
.flex-spacer { flex: 1; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }

/* --- LOCKED / PREMIUM --- */
.btn-locked {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: pointer !important;
    opacity: 0.75;
    position: relative;
}
.btn-locked::after {
    content: "🔒";
    font-size: 10px;
    margin-left: 4px;
}

/* --- UPSELL BANNER --- */
.sip-banner-upsell {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.sip-banner-upsell h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
}
.sip-banner-upsell p {
    margin: 0;
    font-size: 13.5px;
    opacity: 0.88;
}
.sip-banner-btn {
    background: white;
    color: #4f46e5;
    padding: 8px 18px;
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
    font-size: 13.5px;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sip-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

/* --- SETUP MODE CARDS --- */
.sip-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
.sip-mode-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
}
.sip-mode-card:hover:not(.locked) {
    border-color: #a5b4fc;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(99,102,241,0.1);
}
.sip-mode-card.active {
    border-color: var(--primary);
    background: #fafbff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}
.sip-mode-card.active::after {
    content: '✓';
    position: absolute;
    top: 16px; right: 16px;
    background: var(--primary);
    color: white;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}
.sip-mode-card.locked {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
}
.sip-mode-icon { font-size: 32px; margin-bottom: 14px; }
.sip-mode-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.sip-mode-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 16px;
    flex-grow: 1;
}
.sip-mode-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sip-mode-card.active .sip-mode-tag {
    background: #dbeafe;
    color: var(--primary);
}

/* --- ONBOARDING : STEPPER --- */
.sip-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 24px;
    flex-wrap: wrap;
}
.sip-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.sip-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    background: #e2e8f0;
    color: #64748b;
}
.sip-step.active { color: var(--text-main); }
.sip-step.active .sip-step-dot {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.sip-step.done .sip-step-dot { background: var(--success); color: #fff; }
.sip-step-line {
    width: 34px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}

/* --- ONBOARDING : GUIDED STEPS --- */
.sip-guide-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(139,92,246,0.05));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.5;
}
.sip-guide-step {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.sip-guide-step:last-child { border-bottom: none; }
.sip-guide-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px solid rgba(99,102,241,0.25);
}
.sip-guide-body { flex: 1; min-width: 0; }
.sip-guide-title { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.sip-guide-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.sip-guide-desc code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12.5px;
    color: var(--primary);
}
.sip-guide-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
/* Accordéon "clic par clic" */
.sip-guide-details {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}
.sip-guide-details summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sip-guide-details summary::-webkit-details-marker { display: none; }
.sip-guide-details summary::before {
    content: '▸';
    transition: transform 0.15s;
    display: inline-block;
}
.sip-guide-details[open] summary::before { transform: rotate(90deg); }
.sip-guide-details summary:hover { background: #f1f5f9; }
.sip-guide-clicks {
    margin: 0;
    padding: 4px 18px 14px 34px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.7;
}
.sip-guide-clicks li { margin-bottom: 6px; }
.sip-reco-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.sip-sa-email {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
}

/* --- RÉGLAGE WOOCOMMERCE --- */
.sip-woo-setting {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(150, 88, 138, 0.06), rgba(99, 102, 241, 0.04));
    margin-bottom: 24px;
}
.sip-woo-icon { font-size: 26px; flex-shrink: 0; }
.sip-woo-body { flex: 1; min-width: 0; }
.sip-woo-title { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.sip-woo-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Interrupteur */
.sip-switch { position: relative; display: inline-block; width: 48px; height: 27px; flex-shrink: 0; }
.sip-switch input { opacity: 0; width: 0; height: 0; }
.sip-switch-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #cbd5e1; border-radius: 27px; transition: background .2s;
}
.sip-switch-slider:before {
    content: ""; position: absolute; height: 21px; width: 21px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.sip-switch input:checked + .sip-switch-slider { background: var(--success); }
.sip-switch input:checked + .sip-switch-slider:before { transform: translateX(21px); }

/* --- STATUS FILTER CHIPS --- */
.sip-status-chip {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    background: #f1f5f9;
    color: var(--text-muted);
    line-height: 1.5;
}
.sip-status-chip:hover {
    background: #e2e8f0;
    color: var(--text-main);
}
.sip-status-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.sip-status-chip .chip-count {
    opacity: 0.65;
    font-size: 11px;
    font-weight: 500;
}

/* --- VIDEO EMBED --- */
.sip-video-container {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    min-height: 300px;
}
.sip-video-container iframe {
    border: none;
    max-width: 100%;
}
/* --- OFFRE DE RECONQUÊTE (ancien Premium) --- */
.iic-winback {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 12, 24, 0.62);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .2s ease;
}

.iic-winback.is-open { opacity: 1; }

.iic-winback-card {
    position: relative;
    /* box-sizing explicite : l'admin WordPress ne l'impose pas partout, et sans
       lui max-width ne correspondait pas à la largeur réellement rendue. */
    box-sizing: border-box;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 34px 32px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
    transform: translateY(12px) scale(.98);
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
    text-align: center;
}

.iic-winback.is-open .iic-winback-card { transform: none; }

.iic-winback-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}

.iic-winback-close:hover { background: #f1f5f9; color: #475569; }

.iic-winback-badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.iic-winback-title {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 800;
    color: #0f172a;
}

.iic-winback-lead {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.iic-winback-offer {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff, #faf5ff);
    border: 1px solid #e0e7ff;
    margin-bottom: 18px;
}

.iic-winback-pct {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    color: #4f46e5;
    white-space: nowrap;
}

.iic-winback-pct span { font-size: 20px; }

.iic-winback-offer-text strong {
    display: block;
    font-size: 14.5px;
    color: #1e293b;
    margin-bottom: 2px;
}

.iic-winback-offer-text span {
    font-size: 12.5px;
    color: #64748b;
}

.iic-winback-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    text-align: left;
}

.iic-winback-list li {
    position: relative;
    padding: 5px 0 5px 26px;
    font-size: 13.5px;
    color: #334155;
}

.iic-winback-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 5px;
    color: #10b981;
    font-weight: 800;
}

.iic-winback-cta {
    display: block;
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .3);
    transition: transform .15s ease, box-shadow .15s ease;
}

.iic-winback-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(99, 102, 241, .38);
}

.iic-winback-code {
    margin-top: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.iic-winback-code code {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    font-weight: 700;
    color: #475569;
    letter-spacing: .04em;
}

.iic-winback-later {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 6px;
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
}

.iic-winback-later:hover { color: #64748b; text-decoration: underline; }

@media (max-width: 480px) {
    .iic-winback-card { padding: 30px 20px 22px; }
    .iic-winback-title { font-size: 19px; }
}

/* --- VUE BING ---
   Bing est un moteur distinct : il a sa propre interface (voir « CHOIX DU
   MOTEUR »), ses groupes d'actions et sa couleur (bleu-sarcelle de la marque). */
.iic-bing-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: block;
}

.iic-bing-group {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    padding: 4px 8px;
}

.iic-bing-group-label {
    font-size: 10px;
    font-weight: 700;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 2px;
}

.iic-bing-bulk {
    background: linear-gradient(135deg, #0d9488, #0078d4);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.25);
}

.iic-bing-bulk .iic-bing-icon {
    width: 14px;
    height: 14px;
}

.iic-bing-bulk:hover:not(:disabled):not(.btn-locked) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 120, 212, 0.35);
}

/* Bouton par ligne */
.btn-action-bing {
    background: linear-gradient(135deg, #0d9488, #0078d4);
    border: none;
    color: #fff;
}

.btn-action-bing .iic-bing-icon {
    width: 14px;
    height: 14px;
}


.btn-action-bing:hover:not(:disabled):not(.btn-locked) {
    filter: brightness(1.08);
}

/* Masquage des éléments de l'autre moteur (prime sur les styles en ligne) */
.iic-hide {
    display: none !important;
}

/* Bouton « Check Bing » : variante claire du bouton d'indexation */
.iic-bing-bulk.iic-bing-check {
    background: #fff;
    color: #0f766e;
    border: 1px solid #5eead4;
    box-shadow: none;
}

.iic-bing-bulk:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-action-bing-check {
    background: #fff;
    border: 1px solid #99f6e4;
    color: #0f766e;
}

/* --- CHOIX DU MOTEUR (Google / Bing) --- */
.iic-engine-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: -12px 0 20px;
}

.iic-engine-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.iic-engine-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.iic-engine-tab .iic-engine-icon,
.iic-engine-tab .iic-bing-icon {
    width: 15px;
    height: 15px;
}

.iic-engine-tab:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.iic-engine-tab.is-active[data-engine="google"] {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.iic-engine-tab.is-active[data-engine="bing"] {
    background: linear-gradient(135deg, #0d9488, #0078d4);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.iic-engine-lock {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
}

/* Vue Bing ouverte à tous : IndexNow y est gratuit, contrairement au reste
   (Check/Index Bing) qui reste Premium. Badge vert plutôt que le badge
   "verrou" ambre habituel, pour ne pas donner l'impression que l'onglet
   est bloqué. */
.iic-engine-lock.iic-engine-free {
    background: #dcfce7;
    color: #166534;
}

.iic-engine-hint {
    font-size: 12.5px;
    color: var(--text-muted);
}

.iic-bing-mode-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f766e;
}

.iic-bing-mode-note .iic-bing-icon {
    width: 16px;
    height: 16px;
}

/* --- Thème de la vue Bing ---
   Les cartes et la barre de progression portent des couleurs en ligne :
   !important est nécessaire pour les recolorer. */
#sip-root[data-engine="bing"] .sip-status-chip.active {
    border-color: #0d9488;
    color: #0f766e;
    background: #f0fdfa;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

#sip-root[data-engine="bing"] #stat-pct-value {
    color: #0f766e !important;
}

#sip-root[data-engine="bing"] #stat-pct-bar {
    background: linear-gradient(90deg, #0d9488, #0078d4) !important;
}

#sip-root[data-engine="bing"] #sip-credits-display {
    color: #0f766e !important;
}

#sip-root[data-engine="bing"] #sip-stats-bar > div:last-child {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(0, 120, 212, 0.03)) !important;
    border-color: rgba(13, 148, 136, 0.18) !important;
}

#sip-root[data-engine="bing"] #sip-stats-bar > div:last-child > div:nth-child(3) {
    color: #0d9488 !important;
}

#sip-root[data-engine="bing"] #scan-progress-bar {
    background: linear-gradient(90deg, #0d9488, #0078d4) !important;
}

/* --- 2.0 : BOUTIQUE, HISTORIQUE DES CRÉDITS (fenêtres modales génériques) --- */
.iic-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 12, 24, .55);
    backdrop-filter: blur(3px);
}

.iic-modal-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 30px 30px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.iic-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}

.iic-modal-close:hover { background: #f1f5f9; color: #475569; }

.iic-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.iic-pack-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 10px 14px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all .15s ease;
    font: inherit;
}

.iic-pack-card:hover:not(:disabled) {
    border-color: var(--primary, #6366f1);
    background: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, .15);
    transform: translateY(-2px);
}

.iic-pack-card:disabled { opacity: .5; cursor: default; }

.iic-pack-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Bouton « historique » discret à côté du titre de chaque ligne */
.iic-history-btn {
    border: none;
    background: transparent;
    padding: 0 2px;
    margin-left: 4px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: .45;
    transition: opacity .15s;
    vertical-align: middle;
}

.iic-history-btn:hover,
.iic-history-btn:focus-visible { opacity: 1; }

.iic-pack-credits { font-size: 22px; font-weight: 800; color: var(--text-main); margin-top: 6px; }
.iic-pack-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.iic-pack-price { font-size: 15px; font-weight: 700; color: var(--primary, #6366f1); margin-top: 8px; }
.iic-pack-per { font-size: 10.5px; color: var(--text-muted); }

/* ================================================================
   2.0 : PRISE EN MAIN (visite guidée, premiers pas, conseils, légende)
   ================================================================ */

/* --- Notifications (toasts) --- */
#iic-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 40px));
}

.iic-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 13.5px;
    line-height: 1.45;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .3);
    border-left: 4px solid #22c55e;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
}

.iic-toast.is-in { opacity: 1; transform: none; }
.iic-toast-info { border-left-color: #6366f1; }
.iic-toast-warning { border-left-color: #f59e0b; }
.iic-toast-error { border-left-color: #ef4444; }
.iic-toast-msg { flex: 1; }

.iic-toast-action {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.iic-toast-action:hover { background: rgba(255, 255, 255, .2); }

.iic-toast-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

/* --- Visite guidée --- */
#iic-tour {
    position: fixed;
    inset: 0;
    z-index: 100001;
    opacity: 0;
    transition: opacity .2s;
}

#iic-tour.is-on { opacity: 1; }

.iic-tour-spot {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .62), 0 0 0 3px rgba(129, 140, 248, .9);
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
    pointer-events: none;
}

.iic-tour-tip {
    position: fixed;
    box-sizing: border-box;
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
    transition: top .25s ease, left .25s ease;
}

.iic-tour-count { font-size: 11px; font-weight: 700; color: #6366f1; letter-spacing: .04em; margin-bottom: 4px; }
.iic-tour-title { font-size: 15.5px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.iic-tour-text { font-size: 13.5px; color: #334155; line-height: 1.55; }
.iic-tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.iic-tour-spacer { flex: 1; }
.iic-tour-nav .sip-btn { height: auto; padding: 7px 14px; font-size: 13px; }

.iic-tour-skip {
    border: none;
    background: none;
    color: #64748b;
    font-size: 12.5px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* --- Premiers pas --- */
.iic-gs {
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .08);
    overflow: hidden;
}

.iic-gs.is-done { border-color: #bbf7d0; }

.iic-gs-head {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, .06), rgba(168, 85, 247, .04));
}

.iic-gs.is-done .iic-gs-head { background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(16, 185, 129, .04)); }

.iic-gs-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.iic-gs-title { font-size: 15px; font-weight: 800; color: var(--text-main); }
.iic-gs-count { font-size: 12.5px; font-weight: 700; color: #4f46e5; }

.iic-gs-bar {
    flex: 1;
    max-width: 220px;
    height: 7px;
    border-radius: 4px;
    background: rgba(99, 102, 241, .15);
    overflow: hidden;
}

.iic-gs-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.iic-gs-chevron { color: var(--text-muted); font-size: 13px; }

.iic-gs-close {
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 20px;
    padding: 0 16px;
    cursor: pointer;
    align-self: stretch;
}

.iic-gs-close:hover { color: #475569; }

.iic-gs-list { list-style: none; margin: 0; padding: 6px 18px 12px; }
.iic-gs.is-collapsed .iic-gs-list,
.iic-gs.is-collapsed .iic-gs-final { display: none; }

.iic-gs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.iic-gs-item:last-child { border-bottom: none; }

.iic-gs-dot {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #eef2ff;
    color: #4f46e5;
    border: 2px solid #c7d2fe;
}

.iic-gs-item.is-done .iic-gs-dot { background: #22c55e; color: #fff; border-color: #22c55e; }
.iic-gs-body { flex: 1; min-width: 0; }
.iic-gs-item-title { font-size: 13.5px; font-weight: 700; color: var(--text-main); }
.iic-gs-item.is-done .iic-gs-item-title { color: #64748b; text-decoration: line-through; text-decoration-color: rgba(100, 116, 139, .4); }
.iic-gs-item-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.iic-gs-cta { flex-shrink: 0; height: auto !important; padding: 7px 14px !important; font-size: 12.5px !important; }
.iic-gs-final { margin: 0; padding: 0 18px 14px; font-size: 13px; color: #15803d; }

/* --- Conseil contextuel sous les filtres --- */
.iic-next-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-main);
    flex-wrap: wrap;
}

.iic-next-icon { font-size: 15px; }
.iic-next-msg { flex: 1; min-width: 200px; }

.iic-next-btn {
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.iic-next-btn:hover { background: #e0e7ff; }

/* --- Légende des statuts --- */
.iic-legend-btn {
    margin-left: auto;
    border: none;
    background: none;
    color: #6366f1;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 6px;
}

.iic-legend {
    padding: 14px 24px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.iic-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px 20px;
}

.iic-legend-row { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-main); }
.iic-legend-row strong { display: block; font-size: 13px; }
.iic-legend-row span:not(.iic-legend-ico) { color: #475569; }
.iic-legend-ico { font-size: 16px; }
.iic-legend-note { margin-top: 12px; font-size: 12.5px; color: #92400e; }

/* --- Configuration Google : vérifications en direct et test de connexion --- */
.iic-live-check { font-size: 12.5px; margin-top: 6px; }
.iic-live-check .is-good { color: #15803d; }
.iic-live-check .is-bad { color: #b91c1c; }

.iic-saved-key {
    font-size: 12.5px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.iic-gtest {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 13.5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.iic-gtest.is-good { background: #f0fdf4; border-color: #bbf7d0; }
.iic-gtest.is-bad { background: #fff7ed; border-color: #fed7aa; }
.iic-gtest-title { font-weight: 800; margin-bottom: 8px; color: var(--text-main); }
.iic-gtest-list { list-style: none; margin: 0; padding: 0; }
.iic-gtest-list li { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.iic-gtest-list li > span { width: 18px; flex-shrink: 0; font-weight: 800; text-align: center; }
.iic-gtest-list .is-ok > span { color: #16a34a; }
.iic-gtest-list .is-ko > span { color: #dc2626; }
.iic-gtest-list .is-skip { color: #94a3b8; }
.iic-gtest-fix { margin-top: 4px; color: #7c2d12; line-height: 1.5; }
.iic-gtest-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.iic-gtest-actions .sip-btn { height: auto; padding: 6px 12px; font-size: 12.5px; }

@keyframes iicFlash {
    0%, 100% { box-shadow: none; }
    30% { box-shadow: 0 0 0 4px rgba(99, 102, 241, .45); }
}

.iic-flash { animation: iicFlash 1.6s ease 2; border-radius: 12px; }

/* --- Aide : guides interactifs --- */
.iic-help-guides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.iic-help-guide {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
    font: inherit;
    transition: transform .15s, box-shadow .15s;
}

.iic-help-guide:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, .15); }
.iic-help-guide-ico { font-size: 26px; }
.iic-help-guide strong { display: block; font-size: 14px; }
.iic-help-guide small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
    .iic-tour-spot, .iic-tour-tip, .iic-toast, .iic-gs-bar span { transition: none; }
    .iic-flash { animation: none; }
}

/* Heure (fuseau du site) sous la date de modification, et fuseau de la console */
.iic-time {
    display: block;
    font-size: 11.5px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.iic-tz-note {
    font-size: 11px;
    color: var(--text-muted);
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px 8px;
}

/* --- 2.0 : FEEDBACK (écrire au support depuis le plugin) --- */
.iic-feedback-card { max-width: 540px; }
.iic-fb-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.iic-fb-type { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; transition: all .15s; }
.iic-fb-type:hover { border-color: #c7d2fe; color: #4338ca; }
.iic-fb-type.is-active { background: #eef2ff; border-color: #6366f1; color: #3730a3; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.iic-fb-label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin: 0 0 6px; }
.iic-fb-message { width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical; font-family: inherit !important; font-size: 13.5px !important; line-height: 1.5; white-space: pre-wrap !important; overflow-x: hidden; }
.iic-fb-count { text-align: right; font-size: 11px; color: #94a3b8; margin: 4px 0 12px; }
#iic-fb-email { width: 100%; box-sizing: border-box; margin-bottom: 14px; }
.iic-fb-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important; }
.iic-fb-diag { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: #475569; line-height: 1.45; cursor: pointer; }
.iic-fb-diag input { margin-top: 2px; }
.iic-fb-diag a { margin-left: 4px; white-space: nowrap; }
.iic-fb-preview { background: #0f172a; color: #e2e8f0; font-size: 11px; line-height: 1.5; padding: 12px; border-radius: 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 10px 0 0; }
.iic-fb-error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 13px; line-height: 1.45; }
.iic-fb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.iic-fb-alt { font-size: 12px; color: #94a3b8; }
.iic-faq-more { padding: 16px 24px; font-size: 13.5px; color: var(--text-muted); background: var(--bg-page); }
.iic-link-btn { background: none; border: none; padding: 0; color: #4f46e5; font-weight: 600; cursor: pointer; font-size: inherit; }
.iic-link-btn:hover { text-decoration: underline; }

/* Encarts partenaires, volontairement discrets : le plugin reste l'offre principale. */
.iic-partner-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; font-size: 12px; line-height: 1.5; color: #64748b; display: flex; flex-direction: column; gap: 3px; }
.iic-partner-note strong { color: #334155; font-size: 12.5px; }
.iic-partner-note a { color: #4f46e5; font-weight: 600; text-decoration: none; align-self: flex-start; }
.iic-partner-note a:hover { text-decoration: underline; }
.iic-host-note { margin: 18px 0 0; font-size: 11.5px; color: #94a3b8; text-align: center; }
.iic-host-note a { color: #64748b; }

/* --- 2.0 : EN-TÊTE DU TABLEAU DE BORD (une ligne, actions regroupées) --- */
.sip-header.iic-topbar { flex-wrap: wrap; gap: 14px 24px; margin-bottom: 24px; }
.iic-topbar-title { flex-shrink: 0; }
.iic-topbar-title h1 { white-space: nowrap; font-size: 22px; }
.iic-topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.iic-top-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px; box-sizing: border-box;
    border: 1px solid #e2e8f0; border-radius: 999px; background: #fff;
    color: #334155; font-size: 13px; font-weight: 600; line-height: 1;
    white-space: nowrap; text-decoration: none; cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.iic-top-btn:hover { border-color: #c7d2fe; color: #4338ca; box-shadow: 0 2px 6px rgba(99, 102, 241, .12); }
.iic-top-btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.iic-top-soft { background: #eef2ff; border-color: transparent; color: #4f46e5; box-shadow: none; }
.iic-top-soft:hover { background: #e0e7ff; border-color: transparent; }
.iic-top-cta { background: linear-gradient(135deg, #6366f1, #a855f7); border: none; color: #fff; box-shadow: 0 4px 12px rgba(99, 102, 241, .3); }
.iic-top-cta:hover { color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, .4); }
.iic-top-icon { width: 34px; padding: 0; font-size: 14px; }
.iic-top-quiet { background: transparent; border-color: transparent; box-shadow: none; color: #94a3b8; font-weight: 500; padding: 0 8px; }
.iic-top-quiet:hover { color: #ef4444; border-color: transparent; box-shadow: none; }
.iic-top-sep { width: 1px; height: 22px; background: #e2e8f0; margin: 0 4px; }
.iic-caret { font-size: 10px; color: #94a3b8; }
.iic-top-menu .sip-dropdown-menu { min-width: 250px; }
.iic-top-menu.is-open .sip-dropdown-menu { display: block; }
.iic-top-menu .sip-dropdown-item { gap: 8px; padding: 9px 14px; white-space: nowrap; }
.iic-menu-sep { height: 1px; background: #eef2f7; margin: 4px 0; }
@media (max-width: 782px) {
    .iic-topbar-actions { justify-content: flex-start; margin-left: 0; }
    .iic-top-sep { display: none; }
}
