/* ============================================================
   CloudScale Code and SQL, Admin UI  v1.7.17
   Colour palette mirrors CloudScale Page Views: electric blue,
   bright green, vivid orange, deep navy, white.
   ============================================================ */

/* Reset within wrap */
#cs-app * { box-sizing: border-box; }
#cs-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: var(--csds-navy, #1a2332);
    max-width: 1200px;
    margin-top: 10px;
    padding-left: 16px;
    padding-right: 20px;
    overflow-x: hidden;
}
@media (max-width: 782px) {
    #cs-app {
        padding-left: 12px;
        padding-right: 12px;
    }
    .cs-panel-body {
        padding: 16px;
    }
    #cs-banner {
        padding: 16px;
    }
    #cs-tab-bar {
        padding: 0 8px;
    }
    .cs-tab {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* ── Banner ─────────────────────────────────────── */
#cs-banner {
    background: linear-gradient(135deg, #0f1f2e 0%, #0d3349 60%, #0f1f2e 100%);
    border-radius: 8px 8px 0 0;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(15, 184, 224, 0.25);
}
#cs-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
#cs-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--csds-border, #e2e8f0);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}
#cs-banner-sub {
    font-size: 11px;
    color: var(--csds-on-dark-mute, #94a3b8);
    margin-top: 0;
    line-height: 1.4;
}
#cs-banner-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.04em;
}
.cs-badge-version {
    background: rgba(15, 184, 224, 0.15);
    border: 1px solid rgba(15, 184, 224, 0.4);
    color: #67e8f9;
}
.cs-badge-green  { background: #166534; border: 1px solid var(--csds-success, #22c55e); color: #bbf7d0; }
.cs-badge-orange { background: #7c2d12; border: 1px solid #f97316; color: #fed7aa; }
.cs-badge-help   { background: rgba(15, 184, 224, 0.15); border: 1px solid rgba(15, 184, 224, 0.4); color: #67e8f9; }

/* ── Tab bar ─────────────────────────────────────── */
#cs-tab-bar {
    background: #1a2d6b;
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
}
#cs-tab-bar::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.cs-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}
.cs-tab:hover { color: #fff; }
.cs-tab:focus { outline: none; box-shadow: none; }
.cs-tab.active { color: #fff; border-bottom-color: #f47c20; }

/* ── Copy All action bar ─────────────────────────── */
#cs-tab-actions {
    background: #f8f9fb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    padding: 6px 20px;
}
.cs-copy-all-btn {
    background: #1a2d6b;
    border: 1px solid #1a2d6b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.cs-copy-all-btn:hover { background: #243d8f; border-color: #243d8f; }
.cs-copy-all-btn:focus { outline: none; box-shadow: none; }
.cs-copy-all-btn.copied {
    background: var(--csds-success, #15803d);
    border-color: var(--csds-success, #15803d);
}

/* ── Tab content ─────────────────────────────────── */
.cs-tab-content { display: none; padding: 20px 0 0; }
.cs-tab-content.active { display: block; }

/* ── Section headers ─────────────────────────────── */
.cs-section-header {
    background: linear-gradient(135deg, var(--csds-accent, #1a3a8f), var(--csds-accent, #1e6fd9));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cs-section-header-green  { background: linear-gradient(135deg, #1a7a3a, var(--csds-success, #1db954)); }
.cs-section-header-orange { background: linear-gradient(135deg, #c45c00, #f47c20); }
.cs-section-header-red    { background: linear-gradient(135deg, #8b1a1a, var(--csds-danger, #e53e3e)); }
.cs-section-header-purple { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.cs-section-header-teal   { background: linear-gradient(135deg, #0d6a5c, #0fb8e0); }
.cs-section-header code {
    background: rgba(255,255,255,.2);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
}
.cs-header-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: .8;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: auto;
    text-align: right;
}
@media (max-width: 480px) {
    .cs-header-hint { display: none; }
    .cs-section-header { gap: 8px; }
}

/* ── Panel sub-headings (optimizer sub-sections) ─── */
.cs-panel-heading {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--csds-navy, #1e293b);
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--csds-border, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cs-panel-heading::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: #4338ca;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Panels / Cards ──────────────────────────────── */
.cs-panel {
    background: #fff;
    border: 1.5px solid #dce3ef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
}
.cs-panel-body {
    padding: 20px 24px;
}
.cs-tab-intro {
    background: var(--csds-surface-2, #f8fafc);
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--csds-text-2, #374151);
    line-height: 1.65;
}
.cs-tab-intro p { margin: 0 0 8px; }
.cs-tab-intro p:last-child { margin-bottom: 0; }

/* ── Field layout ────────────────────────────────── */
.cs-field-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.cs-field {
    flex: 1;
    min-width: 200px;
}
.cs-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--csds-navy, #1a2332);
    margin-bottom: 6px;
}
.cs-input,
.cs-field select {
    width: 100%;
    max-width: 400px;
    padding: 5px 8px;
    border: 1.5px solid #dce3ef;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: var(--csds-navy, #1a2332);
}
.cs-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--csds-success, #1db954);
    font-style: italic;
    padding-left: 8px;
    border-left: 3px solid var(--csds-success, #1db954);
}

/* ── Buttons ─────────────────────────────────────── */
.cs-btn-primary {
    background: linear-gradient(135deg, var(--csds-accent, #1a3a8f), var(--csds-accent, #1e6fd9));
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    cursor: pointer;
    transition: opacity .15s;
}
.cs-btn-primary:hover { opacity: .88; }
.cs-btn-orange {
    background: linear-gradient(135deg, #c45c00, #f47c20);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    cursor: pointer;
    transition: opacity .15s;
}
.cs-btn-orange:hover { opacity: .88; }
.cs-btn-pink {
    background: linear-gradient(135deg, #b5348a, #d946a6);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    cursor: pointer;
    transition: opacity .15s;
}
.cs-btn-pink:hover { opacity: .88; }
.cs-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #f0f4ff;
    color: var(--wp-admin-theme-color, #2271b1);
    border: 1.5px solid #c7d2fe;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.cs-btn-secondary:hover { background: #e0e8ff; }
.cs-pk-test-result { max-width: 220px; }

/* ── Settings saved indicator ────────────────────── */
.cs-settings-saved {
    color: var(--csds-success, #1db954);
    font-weight: 700;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}
.cs-settings-saved.visible {
    opacity: 1;
}

/* ── SQL textarea ────────────────────────────────── */
.cs-sql-textarea {
    width: 100%;
    min-height: 80px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 12px;
    border: 1.5px solid #1a2d6b;
    border-radius: 6px;
    background: #0d1b2a;
    color: #e0e0e0;
    resize: vertical;
    box-sizing: border-box;
}
.cs-sql-textarea:focus {
    outline: none;
    border-color: var(--csds-accent, #1e6fd9);
    box-shadow: 0 0 0 2px rgba(30,111,217,.25);
}

/* ── SQL results table ───────────────────────────── */
.cs-sql-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}
.cs-sql-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--csds-accent, #1a3a8f);
    background: #f0f4ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--csds-accent, #1a3a8f);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.cs-sql-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f4ff;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}
.cs-sql-table tr:nth-child(even) { background: #f8faff; }
.cs-sql-table tr:hover td { background: #edf2ff; }

/* ── Quick query section ─────────────────────────── */
.cs-quick-group-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--csds-accent, #1a3a8f);
    margin: 16px 0 8px;
    padding: 0;
}
.cs-quick-group-label:first-child {
    margin-top: 0;
}
.cs-quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.cs-quick-btn {
    background: #f0f4ff;
    border: 1.5px solid #c5d2f0;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--csds-accent, #1a3a8f);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.cs-quick-btn:hover {
    background: #dce6ff;
    border-color: var(--csds-accent, #1a3a8f);
}

/* ── Migrate toolbar ─────────────────────────────── */
.cs-migrate-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.cs-migrate-toolbar .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    margin-top: 2px;
}
.cs-migrate-hint {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 30px 0;
    font-size: 13px;
}
.cs-status {
    font-size: 12px;
    color: #888;
}

/* ════════════════════════════════════════════════════
   LOGIN SECURITY TAB
   ════════════════════════════════════════════════════ */

/* ── Shared description text ──────────────────────── */
.cs-login-desc {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 18px;
}

/* ── Toggle switch ────────────────────────────────── */
.cs-toggle-row {
    display: flex;
    align-items: center;
}
.cs-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.cs-toggle-label input[type="checkbox"] { display: none; }
.cs-toggle-switch {
    position: relative;
    width: 42px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    transition: background .2s;
    flex-shrink: 0;
}
.cs-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: left .2s;
}
.cs-toggle-label input:checked ~ .cs-toggle-switch { background: var(--csds-accent, #1e6fd9); }
.cs-toggle-label input:checked ~ .cs-toggle-switch::after { left: 23px; }
.cs-toggle-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--csds-navy, #1a2332);
}

/* ── Slug input row ───────────────────────────────── */
.cs-slug-row {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 520px;
}
.cs-slug-base {
    background: #f0f4ff;
    border: 1.5px solid #dce3ef;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-slug-input {
    border-radius: 0 4px 4px 0 !important;
    border-left: 1.5px solid var(--csds-accent, #1e6fd9) !important;
    flex: 1;
    min-width: 120px;
}

/* ── 2FA method selector ──────────────────────────── */
.cs-2fa-method-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.cs-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #dce3ef;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    transition: all .15s;
    background: #fff;
}
.cs-radio-label input[type="radio"] { display: none; }
.cs-radio-label:hover { border-color: var(--csds-accent, #1e6fd9); color: var(--csds-navy, #1a2332); }
.cs-radio-label.cs-radio-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.cs-radio-label.active {
    border-color: var(--csds-accent, #1e6fd9);
    background: #edf2ff;
    color: var(--csds-accent, #1a3a8f);
    box-shadow: 0 0 0 2px rgba(30,111,217,.15);
}
.cs-radio-icon { font-size: 16px; }

/* ── Per-user 2FA rows ────────────────────────────── */
.cs-2fa-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}
.cs-2fa-row-icon { font-size: 28px; flex-shrink: 0; }
.cs-2fa-row-body { flex: 1; min-width: 0; }
.cs-2fa-row-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--csds-navy, #1a2332);
    margin-bottom: 2px;
}
.cs-2fa-row-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}
.cs-2fa-row-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .cs-2fa-row {
        flex-wrap: wrap;
    }
    .cs-2fa-row-icon {
        align-self: flex-start;
        padding-top: 2px;
    }
    .cs-2fa-row-body {
        flex: 1 1 0;
        min-width: 0;
    }
    .cs-2fa-row-action {
        flex: 0 0 100%;
        padding-left: 44px; /* align under text, past icon + gap */
        flex-wrap: wrap;
    }
}
.cs-2fa-divider {
    border: none;
    border-top: 1px solid #f0f4ff;
    margin: 0;
}
.cs-2fa-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}
.cs-2fa-badge-on      { background: #d1fae5; color: #065f46; }
.cs-2fa-badge-off     { background: #f3f4f6; color: var(--csds-muted, #6b7280); }
.cs-2fa-badge-pending { background: #fef3c7; color: #92400e; }

/* ── TOTP Setup Wizard ────────────────────────────── */
.cs-totp-wizard {
    margin-top: 20px;
    border-top: 2px solid #f0f4ff;
    padding-top: 20px;
}
.cs-totp-wizard-inner {
    background: #f8faff;
    border: 1.5px solid #dce3ef;
    border-radius: 8px;
    padding: 24px;
    max-width: 540px;
}
.cs-totp-wizard-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--csds-navy, #1a2332);
    margin: 0 0 18px;
}
.cs-totp-steps {}
.cs-totp-step {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.cs-totp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--csds-accent, #1e6fd9);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.cs-totp-qr-wrap {
    margin: 14px 0 0 32px;
    min-height: 220px;
    display: flex;
    align-items: flex-start;
}
.cs-totp-qr-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
    padding: 16px 0;
}
.cs-totp-qr-img {
    width: 220px;
    height: 220px;
    border: 1.5px solid #dce3ef;
    border-radius: 6px;
    background: #fff;
    display: block;
}
.cs-totp-manual-wrap {
    margin: 10px 0 0 32px;
}
.cs-totp-secret-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.cs-totp-secret-row .cs-totp-secret { margin-top: 0; }
.cs-totp-copy-btn {
    padding: 5px 12px;
    background: #2d3a52;
    color: #a8d8a8;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.cs-totp-copy-btn:hover { background: var(--csds-accent, #1e6fd9); color: #fff; }
.cs-totp-secret {
    display: inline-block;
    background: var(--csds-navy, #1a2332);
    color: #a8d8a8;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 14px;
    letter-spacing: 3px;
    margin-top: 6px;
    font-family: 'SF Mono','Fira Code','Courier New',monospace;
    user-select: all;
    cursor: text;
}
.cs-totp-verify-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 14px 0 0 32px;
    flex-wrap: wrap;
}
.cs-totp-code-input {
    width: 120px !important;
    font-size: 20px !important;
    text-align: center;
    letter-spacing: 4px;
    font-family: 'SF Mono','Fira Code','Courier New',monospace !important;
    padding: 6px 8px !important;
}
.cs-totp-verify-msg {
    margin: 10px 0 0 32px;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Passkey info box ─────────────────────────────── */
/* ── Email pending / port warning notices ────────── */
.cs-email-pending-msg {
    margin-top: 6px;
}
.cs-pending-notice {
    display: inline-block;
    font-size: 12px;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 4px 10px;
    line-height: 1.5;
}
.cs-email-port-warn {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-left: 4px solid #f47c20;
    border-radius: 5px;
    font-size: 12px;
    color: #7c2d12;
    line-height: 1.6;
    max-width: 560px;
}

.cs-passkey-info p {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 12px;
}
.cs-passkey-info p:last-of-type { margin-bottom: 0; }

/* ── Passkey list ── */
.cs-pk-list {
    margin: 8px 0 0 44px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cs-pk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--csds-surface-2, #f8fafc);
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    flex-wrap: wrap;
}
.cs-pk-icon  { font-size: 16px; flex-shrink: 0; }
.cs-pk-name  { flex: 1; min-width: 80px; font-weight: 600; color: #1a202c; }
.cs-pk-date  { color: var(--csds-on-dark-mute, #94a3b8); font-size: 12px; white-space: nowrap; }
.cs-pk-item .cs-btn-secondary,
.cs-pk-item .cs-btn-pink { flex-shrink: 0; }

/* ── Passkey wizard ── */
.cs-pk-wizard { margin-top: 14px; }
.cs-pk-wizard-inner {
    background: var(--csds-surface-2, #f8fafc);
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: 20px 22px;
    max-width: 560px;
}
.cs-pk-wizard-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 8px;
}
.cs-pk-wizard-desc {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 14px;
    line-height: 1.5;
}
.cs-pk-name-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cs-pk-name-input {
    flex: 1;
    min-width: 160px;
}
.cs-pk-wizard-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ── Email-verified modal ───────────────────────── */
.cs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.52);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-modal-card {
    background: #fff;
    border-radius: 18px;
    padding: 44px 52px 36px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: cs-modal-in .25s cubic-bezier(.34,1.4,.64,1);
}
@keyframes cs-modal-in {
    from { opacity: 0; transform: scale(.88) translateY(20px); }
    to   { opacity: 1; transform: none; }
}
.cs-modal-icon   { font-size: 68px; line-height: 1; margin-bottom: 18px; }
.cs-modal-title  { font-size: 22px; font-weight: 800; margin: 0 0 10px; color: #111827; }
.cs-modal-msg    { font-size: 14px; color: #555; margin: 0 0 28px; line-height: 1.6; }
.cs-modal-btn    { min-width: 140px; }
.cs-modal-auto   { font-size: 12px; color: #aaa; margin: 12px 0 0; }

/* ── Server Logs tab ─────────────────────────────── */
.cs-logs-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0 4px;
}
.cs-log-src-btn {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    color: var(--csds-text-2, #334155);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    transition: background .15s, border-color .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cs-log-src-btn::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--csds-border-strong, #cbd5e1);
    flex-shrink: 0;
}
.cs-log-src-btn.status-ok::after          { background: var(--csds-success, #22c55e); }
.cs-log-src-btn.status-not-found          { opacity: .55; }
.cs-log-src-btn.status-not-found::after   { background: var(--csds-on-dark-mute, #94a3b8); }
.cs-log-src-btn.status-permission-denied::after { background: var(--csds-warn, #f59e0b); }
.cs-log-src-btn.status-empty::after       { background: #60a5fa; }
.cs-log-src-btn:hover  { background: #e0e7ff; border-color: #818cf8; }
.cs-log-src-btn:focus  { outline: none; box-shadow: none; }
.cs-log-src-btn.active { background: var(--csds-accent, #1a3a8f); border-color: var(--csds-accent, #1a3a8f); color: #fff; }
.cs-log-src-btn.active::after { background: rgba(255,255,255,.7); }

.cs-logs-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.cs-logs-search {
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 4px;
    font-size: 12px;
    padding: 5px 10px;
    width: 220px;
    min-width: 120px;
}
.cs-logs-level-sel {
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 4px;
    font-size: 12px;
    padding: 5px 8px;
}
.cs-logs-status-msg { font-size: 12px; color: var(--csds-muted, #64748b); }
.cs-logs-auto-label { font-size: 12px; color: var(--csds-muted, #64748b); margin-left: auto; display: flex; align-items: center; gap: 5px; cursor: pointer; }

.cs-logs-viewer {
    background: #0f1117;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.55;
    margin-top: 12px;
    max-height: 620px;
    min-height: 200px;
    overflow-y: auto;
    padding: 12px 16px;
    color: #d4d4d8;
}
.cs-logs-placeholder { color: #4b5563; padding: 40px 0; text-align: center; font-family: inherit; }
.cs-log-line { border-bottom: 1px solid rgba(255,255,255,.04); padding: 2px 0; word-break: break-all; white-space: pre-wrap; }
.cs-log-line.level-emerg  { color: #ff4d4f; font-weight: 700; }
.cs-log-line.level-alert  { color: #ff7875; font-weight: 600; }
.cs-log-line.level-crit   { color: #f87171; }
.cs-log-line.level-error  { color: #fca5a5; }
.cs-log-line.level-warn   { color: #fbbf24; }
.cs-log-line.level-notice { color: #60a5fa; }
.cs-log-line.level-info   { color: #a3e635; }
.cs-log-line.level-debug  { color: var(--csds-muted, #6b7280); }
.cs-log-line.level-default { color: #d4d4d8; }

/* ── Generic notice boxes (used across multiple tabs) ──────────── */
.cs-notice {
    border-radius: 6px;
    font-size: 13px;
    padding: 10px 14px;
    margin-top: 8px;
    line-height: 1.5;
}
.cs-notice-warn  { background: #fef3c7; border: 1px solid var(--csds-warn, #f59e0b); color: #78350f; }
.cs-notice-error { background: #fee2e2; border: 1px solid #f87171; color: #7f1d1d; }
.cs-notice-info  { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

.cs-form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--csds-text-2, #374151);
}
.cs-text-input {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    padding: 6px 10px;
    color: #111827;
    background: #fff;
}
.cs-text-input:focus {
    outline: none;
    border-color: var(--wp-admin-theme-color, #2271b1);
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}

/* ═══════════════════════════════════════════════════════════════════
   Redis Cache Stats tab
   ═══════════════════════════════════════════════════════════════════ */

.cs-redis-loading {
    color: var(--csds-muted, #64748b);
    font-size: 13px;
    padding: 20px 0;
}
.cs-redis-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.cs-redis-card-wide { grid-column: span 2; }
@media (max-width: 640px) { .cs-redis-card-wide { grid-column: span 1; } }

.cs-redis-stat-card {
    background: var(--csds-surface-2, #f8fafc);
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 8px;
    padding: 14px 16px;
}
.cs-redis-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--csds-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.cs-redis-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--csds-navy, #1e293b);
    line-height: 1.1;
}
.cs-redis-stat-value.cs-redis-sm { font-size: 15px; padding-top: 4px; }
.cs-redis-stat-sub {
    font-size: 11px;
    color: var(--csds-on-dark-mute, #94a3b8);
    margin-top: 4px;
}
/* Hit rate colours */
.cs-redis-hit-rate.cs-redis-good { color: var(--csds-success, #15803d); }
.cs-redis-hit-rate.cs-redis-warn { color: #b45309; }
.cs-redis-hit-rate.cs-redis-bad  { color: var(--csds-danger, #dc2626); }

/* Memory progress bar */
.cs-redis-progress-wrap {
    background: var(--csds-border, #e2e8f0);
    border-radius: 4px;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
}
.cs-redis-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}
.cs-bar-green { background: var(--csds-success, #22c55e); }
.cs-bar-amber { background: var(--csds-warn, #f59e0b); }
.cs-bar-red   { background: #ef4444; }

/* Actions row */
.cs-redis-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--csds-border, #e2e8f0);
}
.cs-btn-danger {
    background: linear-gradient(135deg, #991b1b, var(--csds-danger, #dc2626));
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    cursor: pointer;
    transition: opacity .15s;
}
.cs-btn-danger:hover { opacity: .88; }
.cs-redis-flush-msg {
    font-size: 12px;
    color: var(--csds-muted, #64748b);
    margin-left: 4px;
}
.cs-redis-flush-msg.cs-flush-ok  { color: var(--csds-success, #15803d); font-weight: 600; }
.cs-redis-flush-msg.cs-flush-err { color: var(--csds-danger, #dc2626); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   Plugin Vulnerability Scan tab
   ═══════════════════════════════════════════════════════════════════ */

.cs-security-key-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.cs-security-scan-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.cs-vuln-inline-msg {
    display: block;
    font-size: 12px;
    color: var(--csds-muted, #64748b);
    margin-top: 5px;
}
.cs-vuln-inline-msg.cs-vuln-msg-ok  { color: var(--csds-success, #15803d); font-weight: 600; }
.cs-vuln-inline-msg.cs-vuln-msg-err { color: var(--csds-danger, #dc2626); font-weight: 600; }

/* ── Scan progress bar ───────────────────────────────────────────── */
.cs-scan-progress {
    display: none;
    height: 4px;
    background: var(--csds-border, #e2e8f0);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}
.cs-scan-progress.is-active { display: block; }
.cs-scan-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--csds-accent, #3b82f6), var(--csds-accent-2, #6366f1));
    transition: width 2.8s ease;
}
.cs-scan-progress-fill.deep { background: linear-gradient(90deg, #7c3aed, #9333ea); }

/* Summary bar */
.cs-vuln-summary-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--csds-surface-2, #f8fafc);
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 14px;
}
.cs-vuln-sum-bad  { color: var(--csds-danger, #dc2626); }
.cs-vuln-sum-good { color: var(--csds-success, #15803d); }
.cs-vuln-sum-warn { color: #b45309; }

/* Clean state */
.cs-vuln-clean {
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
    color: var(--csds-success, #15803d);
    font-weight: 600;
}
.cs-vuln-clean-icon { font-size: 32px; display: block; margin-bottom: 8px; }

/* Plugin cards */
.cs-vuln-card {
    border: 1px solid var(--csds-border, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.cs-vuln-card-alert { border-color: #fca5a5; }
.cs-vuln-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--csds-surface-2, #f8fafc);
    flex-wrap: wrap;
}
.cs-vuln-card-alert .cs-vuln-card-header { background: #fff5f5; }

.cs-vuln-name    { font-weight: 700; font-size: 13px; color: var(--csds-navy, #1e293b); flex: 1; min-width: 120px; }
.cs-vuln-version { font-size: 12px; color: var(--csds-muted, #64748b); font-family: monospace; }
.cs-vuln-outdated-tag { color: #b45309; font-weight: 600; font-family: sans-serif; }

.cs-vuln-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.cs-vuln-badge-danger { background: #fee2e2; color: var(--csds-danger, #dc2626); }
.cs-vuln-badge-warn   { background: #fef3c7; color: #b45309; }
.cs-vuln-badge-ok     { background: #dcfce7; color: var(--csds-success, #15803d); }

/* Vulnerability list inside a card */
.cs-vuln-list { padding: 8px 14px 12px; }
.cs-vuln-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    font-size: 12px;
}
.cs-vuln-item:last-child { border-bottom: none; }

.cs-vuln-sev {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
}
.cs-vuln-sev-critical { background: #7f1d1d; color: #fff; }
.cs-vuln-sev-high     { background: var(--csds-danger, #dc2626); color: #fff; }
.cs-vuln-sev-medium   { background: var(--csds-warn, #f59e0b); color: #fff; }
.cs-vuln-sev-low      { background: var(--csds-success, #22c55e); color: #fff; }
.cs-vuln-sev-unknown  { background: var(--csds-on-dark-mute, #94a3b8); color: #fff; }

.cs-vuln-title { flex: 1; color: var(--csds-navy, #1e293b); min-width: 100px; }
.cs-vuln-fix   { font-size: 11px; color: var(--csds-success, #15803d); white-space: nowrap; margin-left: auto; }
.cs-vuln-no-fix { color: var(--csds-danger, #dc2626) !important; }
.cs-vuln-ref    {
    font-size: 11px;
    color: var(--wp-admin-theme-color, #2271b1);
    text-decoration: none;
    white-space: nowrap;
}
.cs-vuln-ref:hover { text-decoration: underline; }
.cs-vuln-results { margin-top: 4px; }

/* ── Brute-force failed login log ─────────────────────────────────────── */
.cs-bf-log-wrap {
    margin-top: 28px;
    border-top: 1px solid #e8edf5;
    padding-top: 20px;
}
.cs-bf-log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.cs-bf-log-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--csds-navy, #1a2332);
}
.cs-bf-log-total {
    font-size: 11px;
    color: #666;
    background: #f0f4f8;
    border-radius: 10px;
    padding: 1px 8px;
}
.cs-bf-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.cs-bf-chart {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    flex: 0 0 65%;
    min-width: 200px;
    padding-right: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 700px) {
    .cs-bf-layout    { flex-direction: column; }
    .cs-bf-chart     { flex: none; width: 100%; min-width: 0; }
    .cs-bf-table-wrap { width: 100%; }
}
.cs-bf-yaxis {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    align-self: flex-start;
    flex-shrink: 0;
    width: auto;
    min-width: 36px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    user-select: none;
    line-height: 1;
    box-sizing: border-box;
}
.cs-bf-ytick {
    display: block;
}
.cs-map-layer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 7px;
    border-radius: 20px;
    border: 1.5px solid #d1d5db;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, background .15s, color .15s;
}
.cs-map-layer-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.cs-map-layer-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: background .15s;
}
.cs-map-layer-toggle:has(input:checked) {
    border-color: var(--border);
    background: var(--bg);
    color: var(--text);
}
.cs-map-layer-toggle:has(input:checked) .cs-map-layer-dot {
    background: var(--dot);
}
.cs-bf-day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.cs-bf-bar-track {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: flex-end;
    border-bottom: 2px solid #d1d5db;
}
.cs-bf-bar {
    width: 100%;
    min-height: 3px;
    background: var(--csds-on-dark-mute, #94a3b8);
    border-radius: 3px 3px 0 0;
    transition: height .3s;
    cursor: default;
}
.cs-bf-bar-zero { background: var(--csds-success, #22c55e); }
.cs-bf-bar-mid  { background: var(--csds-warn, #f59e0b); }
.cs-bf-bar-high { background: var(--csds-danger, #e53e3e); }
.cs-bf-day-label {
    font-size: 9px;
    color: #888;
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
}
.cs-bf-table-wrap {
    flex: 1;
    min-width: 0;
    max-height: 165px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #e8edf5;
    border-radius: 4px;
}
.cs-bf-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 12px;
}
.cs-bf-th {
    background: #f5f7fb;
    padding: 6px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #e8edf5;
    white-space: nowrap;
}
.cs-bf-td {
    padding: 5px 10px;
    border-bottom: 1px solid #f0f4f8;
    color: #333;
    vertical-align: middle;
}
.cs-bf-td-time { color: #888; white-space: nowrap; }
.cs-bf-td-user { font-family: 'Consolas', monospace; font-size: 11px; }
.cs-bf-td-ip   { color: #555; font-family: 'Consolas', monospace; font-size: 11px; }
.cs-bf-empty,
.cs-bf-loading { padding: 16px; color: #aaa; font-size: 12px; text-align: center; }

/* ── Security AI settings panel ───────────────────────────────────────── */
.cs-sec-settings { display: flex; flex-direction: column; gap: 16px; }
.cs-sec-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 14px;
}
.cs-sec-row-prompt { align-items: start; }
.cs-sec-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.cs-sec-control { display: flex; flex-direction: column; gap: 4px; }
.cs-sec-key-input { width: 420px; max-width: 100%; font-family: monospace; font-size: 12px; }
.cs-sec-select { width: 320px; max-width: 100%; font-size: 12px; }

@media (max-width: 600px) {
    /* Prevent anything inside the app from creating horizontal scroll */
    #cs-app,
    #cs-app .cs-panel,
    #cs-app .cs-panel-body {
        max-width: 100%;
        overflow-x: hidden;
    }
    .cs-panel-body {
        padding: 14px 10px;
    }
    /* Stack label above control */
    .cs-sec-row {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .cs-sec-label {
        white-space: normal;
        margin-bottom: 0;
    }
    /* Full-width inputs and selects */
    .cs-sec-control,
    .cs-sec-control > * {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    /* Flex rows inside controls wrap instead of overflowing */
    .cs-sec-control > div {
        flex-wrap: wrap;
    }
    .cs-sec-key-input,
    .cs-sec-select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Hint text and inline code must wrap */
    .cs-hint,
    .cs-hint * {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
    }
}
.cs-sec-prompt-area {
    width: 100%;
    max-width: 680px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.55;
    resize: vertical;
    border: 1px solid var(--csds-border-strong, #cbd5e1);
    border-radius: 4px;
    padding: 8px 10px;
    color: var(--csds-navy, #1e293b);
    background: var(--csds-surface-2, #f8fafc);
}
.cs-sec-prompt-area:focus { outline: none; border-color: var(--csds-accent-2, #6366f1); background: #fff; }
.cs-sec-key-status { font-size: 12px; font-weight: 600; }
.cs-sec-key-status.ok  { color: var(--csds-success, #15803d); }
.cs-sec-key-status.err { color: var(--csds-danger, #dc2626); }
.cs-sec-divider { border: none; border-top: 1px solid var(--csds-border, #e2e8f0); margin: 20px 0; }
.cs-hint { font-size: 11px; color: var(--csds-on-dark-mute, #94a3b8); }
.cs-hint a { color: var(--csds-accent-2, #6366f1); text-decoration: none; }
.cs-hint a:hover { text-decoration: underline; }

/* ── AI Security Audit report ─────────────────────────────────────────── */
.cs-audit-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0 20px;
    border-bottom: 1px solid var(--csds-border, #e2e8f0);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cs-audit-score-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid currentColor;
}
.cs-audit-score-num  { font-size: 24px; font-weight: 800; line-height: 1; }
.cs-audit-score-lbl  { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }
.cs-audit-score-excellent { color: var(--csds-success, #15803d); }
.cs-audit-score-good      { color: var(--csds-success, #16a34a); }
.cs-audit-score-fair      { color: var(--csds-warn, #d97706); }
.cs-audit-score-poor      { color: #ea580c; }
.cs-audit-score-critical  { color: var(--csds-danger, #dc2626); }

.cs-audit-meta { flex: 1; }
.cs-audit-summary-text { font-size: 13px; color: var(--csds-text-2, #334155); line-height: 1.6; margin: 0 0 6px; }
.cs-audit-meta-line { font-size: 11px; color: var(--csds-on-dark-mute, #94a3b8); }

.cs-audit-section { margin-bottom: 20px; }
.cs-audit-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 5px 10px;
    border-radius: 4px 4px 0 0;
    margin: 0;
}
.cs-audit-sec-critical .cs-audit-section-title { background: #7f1d1d; color: #fff; }
.cs-audit-sec-high     .cs-audit-section-title { background: var(--csds-danger, #dc2626); color: #fff; }
.cs-audit-sec-medium   .cs-audit-section-title { background: var(--csds-warn, #f59e0b); color: #fff; }
.cs-audit-sec-low      .cs-audit-section-title { background: var(--csds-success, #22c55e); color: #fff; }
.cs-audit-sec-good     .cs-audit-section-title { background: #dcfce7; color: var(--csds-success, #15803d); }

.cs-audit-issue {
    border: 1px solid var(--csds-border, #e2e8f0);
    border-top: none;
    padding: 12px 14px;
    background: #fff;
}
.cs-audit-issue + .cs-audit-issue { border-top: 1px solid #f1f5f9; }
.cs-audit-sec-critical .cs-audit-issue { border-color: #fca5a5; }
.cs-audit-sec-high     .cs-audit-issue { border-color: #fca5a5; }
.cs-audit-issue-title  { font-size: 13px; font-weight: 700; color: var(--csds-navy, #1e293b); margin-bottom: 4px; }
.cs-audit-issue-detail { font-size: 12px; color: #475569; margin-bottom: 6px; line-height: 1.5; }
.cs-audit-issue-fix {
    font-size: 12px;
    color: var(--csds-success, #15803d);
    background: #f0fdf4;
    border-left: 3px solid #4ade80;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
    white-space: pre-wrap;
}
.cs-audit-good-item {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #d1fae5;
    border-top: none;
    background: #f0fdf4;
    font-size: 12px;
    color: var(--csds-success, #15803d);
}
.cs-audit-good-item:first-of-type { border-top: 1px solid #d1fae5; margin-top: 0; }
.cs-audit-good-check { flex-shrink: 0; }
.cs-audit-empty { font-size: 12px; color: var(--csds-on-dark-mute, #94a3b8); padding: 10px 14px; border: 1px solid var(--csds-border, #e2e8f0); border-top: none; }

.cs-scan-col-header { margin-bottom: 10px; }
.cs-scan-col-title  { display: block; font-size: 13px; font-weight: 600; color: var(--csds-navy, #1e293b); margin-bottom: 2px; }
.cs-scan-col-hint   { display: block; font-size: 11px; color: var(--csds-muted, #64748b); }
.cs-btn-deep { background: #6d28d9 !important; border-color: #5b21b6 !important; }
.cs-btn-deep:hover:not(:disabled) { background: #5b21b6 !important; }

/* ── Collapsible section toggle pill ─────────────────────────── */
.cs-details-toggle {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--csds-accent-2, #6366f1);
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 20px;
    padding: 5px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
    min-height: 34px;
    cursor: pointer;
}
/* CSS-driven text for <details>/<summary> toggles */
.cs-details-toggle::after       { content: "Show ▼"; }
details[open] > summary .cs-details-toggle::after { content: "Hide ▲"; }
/* JS-driven variant (violation log), text set by JS, no ::after */
.cs-details-toggle--js::after   { content: none; }
