/* Lifted verbatim from assignment-profile-content.blade.php.
   Inline it was 42,848 bytes of HTML on every render;
   as a file the browser fetches it once. */
/* ===== CREDITS MODAL - Apple/Stripe Style ===== */
.credits-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1rem;
}

.credits-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
    animation: creditsModalIn 0.2s ease-out;
}

[data-kt-theme-mode="dark"] .credits-modal,
.dark .credits-modal {
    background: #1c1c1e;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
}

@keyframes creditsModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.credits-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    color: #86868b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.credits-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

[data-kt-theme-mode="dark"] .credits-modal-close,
.dark .credits-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #98989d;
}

[data-kt-theme-mode="dark"] .credits-modal-close:hover,
.dark .credits-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f7;
}

.credits-modal-content {
    padding: 32px 28px 24px;
    text-align: center;
}

.credits-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(180deg, #f5f5f7 0%, #e8e8ed 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    color: #1d1d1f;
}

[data-kt-theme-mode="dark"] .credits-modal-icon,
.dark .credits-modal-icon {
    background: linear-gradient(180deg, #3a3a3c 0%, #2c2c2e 100%);
    color: #f5f5f7;
}

.credits-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

[data-kt-theme-mode="dark"] .credits-modal-title,
.dark .credits-modal-title {
    color: #f5f5f7;
}

.credits-modal-desc {
    font-size: 14px;
    color: #86868b;
    margin: 0 0 24px;
    line-height: 1.5;
}

[data-kt-theme-mode="dark"] .credits-modal-desc,
.dark .credits-modal-desc {
    color: #98989d;
}

.credits-modal-balance {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

[data-kt-theme-mode="dark"] .credits-modal-balance,
.dark .credits-modal-balance {
    background: #2c2c2e;
}

.credits-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.credits-balance-label {
    font-size: 14px;
    color: #86868b;
}

[data-kt-theme-mode="dark"] .credits-balance-label,
.dark .credits-balance-label {
    color: #98989d;
}

.credits-balance-value {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

[data-kt-theme-mode="dark"] .credits-balance-value,
.dark .credits-balance-value {
    color: #f5f5f7;
}

.credits-balance-required {
    color: #ff3b30;
}

[data-kt-theme-mode="dark"] .credits-balance-required,
.dark .credits-balance-required {
    color: #ff453a;
}

.credits-balance-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 12px 0;
}

[data-kt-theme-mode="dark"] .credits-balance-divider,
.dark .credits-balance-divider {
    background: rgba(255, 255, 255, 0.1);
}

.credits-modal-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credits-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #86868b;
}

.credits-info-row svg {
    color: #34c759;
    flex-shrink: 0;
}

[data-kt-theme-mode="dark"] .credits-info-row,
.dark .credits-info-row {
    color: #98989d;
}

[data-kt-theme-mode="dark"] .credits-info-row svg,
.dark .credits-info-row svg {
    color: #30d158;
}

.credits-modal-actions {
    display: flex;
    gap: 12px;
    padding: 0 28px 28px;
}

.credits-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
}

.credits-btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
}

.credits-btn-secondary:hover {
    background: #e8e8ed;
}

[data-kt-theme-mode="dark"] .credits-btn-secondary,
.dark .credits-btn-secondary {
    background: #3a3a3c;
    color: #f5f5f7;
}

[data-kt-theme-mode="dark"] .credits-btn-secondary:hover,
.dark .credits-btn-secondary:hover {
    background: #48484a;
}

.credits-btn-primary {
    background: #0071e3;
    color: #ffffff;
}

.credits-btn-primary:hover {
    background: #0077ed;
    color: #ffffff;
}

[data-kt-theme-mode="dark"] .credits-btn-primary,
.dark .credits-btn-primary {
    background: #0a84ff;
}

[data-kt-theme-mode="dark"] .credits-btn-primary:hover,
.dark .credits-btn-primary:hover {
    background: #409cff;
}
/* ===== END CREDITS MODAL ===== */

/* ===== DELETE MODAL STYLES - Same pattern as createCheckModal ===== */
.cq-delete-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483645 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
}

.cq-delete-modal-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: deleteModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    isolation: isolate;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

[data-kt-theme-mode="dark"] .cq-delete-modal-container,
.dark .cq-delete-modal-container {
    background: #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes deleteModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cq-delete-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #fef2f2, #ffffff);
}

[data-kt-theme-mode="dark"] .cq-delete-modal-header,
.dark .cq-delete-modal-header {
    border-bottom-color: #374151;
    background: linear-gradient(to bottom, rgba(239, 68, 68, 0.1), #1f2937);
}

.cq-delete-modal-title-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.cq-delete-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cq-delete-modal-icon i {
    font-size: 20px;
    color: #ffffff;
}

.cq-delete-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-title,
.dark .cq-delete-modal-title {
    color: #f9fafb;
}

.cq-delete-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cq-delete-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-close,
.dark .cq-delete-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-close:hover,
.dark .cq-delete-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f9fafb;
}

.cq-delete-modal-close i {
    font-size: 16px;
}

.cq-delete-modal-body {
    padding: 1.5rem;
}

.cq-delete-modal-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin-bottom: 1rem;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-warning-box,
.dark .cq-delete-modal-warning-box {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.cq-delete-modal-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fee2e2;
    border-radius: 10px;
    flex-shrink: 0;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-warning-icon,
.dark .cq-delete-modal-warning-icon {
    background: rgba(239, 68, 68, 0.2);
}

.cq-delete-modal-warning-icon i {
    font-size: 18px;
    color: #dc2626;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-warning-icon i,
.dark .cq-delete-modal-warning-icon i {
    color: #f87171;
}

.cq-delete-modal-warning-text h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-warning-text h4,
.dark .cq-delete-modal-warning-text h4 {
    color: #f9fafb;
}

.cq-delete-modal-warning-text p {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-warning-text p,
.dark .cq-delete-modal-warning-text p {
    color: #9ca3af;
}

.cq-delete-modal-desc {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-desc,
.dark .cq-delete-modal-desc {
    color: #d1d5db;
}

.cq-delete-modal-desc strong {
    color: #111827;
    font-weight: 600;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-desc strong,
.dark .cq-delete-modal-desc strong {
    color: #f9fafb;
}

.cq-delete-modal-details {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-details,
.dark .cq-delete-modal-details {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.cq-delete-modal-details-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-details-header,
.dark .cq-delete-modal-details-header {
    color: #f87171;
}

.cq-delete-modal-details-header i {
    font-size: 14px;
}

.cq-delete-modal-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.cq-delete-modal-list li {
    font-size: 0.75rem;
    color: #b91c1c;
    padding: 0.125rem 0;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-list li,
.dark .cq-delete-modal-list li {
    color: #fca5a5;
}

.cq-delete-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-footer,
.dark .cq-delete-modal-footer {
    border-top-color: #374151;
    background: #111827;
}

.cq-delete-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cq-delete-modal-btn-cancel {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cq-delete-modal-btn-cancel:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-btn-cancel,
.dark .cq-delete-modal-btn-cancel {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

[data-kt-theme-mode="dark"] .cq-delete-modal-btn-cancel:hover,
.dark .cq-delete-modal-btn-cancel:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.cq-delete-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cq-delete-modal-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.cq-delete-modal-btn-danger:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cq-delete-modal-btn-danger i {
    font-size: 14px;
}

/* Engine Badges in Dropdown */
.cq-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cq-option-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Style for selected value display in trigger */
.cq-select-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.cq-engine-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.cq-engine-badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dark .cq-engine-badge-free {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.cq-engine-badge-credit {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.dark .cq-engine-badge-credit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.cq-option-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Auto-Detect Boilerplate Code — toggle card.
   Uses theme tokens (--foreground / --background / --border / --muted /
   --muted-foreground) so it adapts to light AND dark mode automatically
   instead of pinning hex colors. Icon-left layout with title row and
   description; whole card is clickable to flip the switch. */
.cq-base-code-toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card, var(--background, #ffffff));
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    user-select: none;
}
.cq-base-code-toggle:hover {
    background: color-mix(in srgb, var(--muted, #f3f4f6) 70%, transparent);
    border-color: color-mix(in srgb, var(--foreground, #0a0a0a) 18%, transparent);
}

.cq-base-code-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--foreground, #0a0a0a) 6%, transparent);
    color: var(--muted-foreground, #6b7280);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.cq-base-code-toggle:has(input:checked) .cq-base-code-icon {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.cq-base-code-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.cq-base-code-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cq-base-code-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--foreground, #0a0a0a);
    letter-spacing: -0.005em;
    line-height: 1.3;
}

.cq-base-code-badge {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.22);
    line-height: 1;
}

.cq-base-code-desc {
    font-size: 12.5px;
    color: var(--muted-foreground, #6b7280);
    margin: 0;
    line-height: 1.45;
    max-width: 56ch;
}
/* ===================================
   NOTE: Dropdown styles are now handled by CodequirySelect
   See: public/css/codequiry-select.css and public/js/codequiry-select.js
   =================================== */

/* ===================================
   CUSTOM KT-CARD STYLING FOR CONFIG CARD
   =================================== */

/* Card Container - Matching kt-card exactly */
.config-card-custom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: calc(var(--radius, 0.5rem) + 4px);
    color: var(--card-foreground, #1e293b);
    border: 1px solid var(--border, #e2e8f0);
    background-color: var(--card, #ffffff);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Card Header - Matching kt-card-header */
.config-card-header-custom {
    display: flex;
    min-height: calc(var(--spacing, 0.25rem) * 14);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--spacing, 0.25rem) * 2.5);
    border-bottom: 1px solid var(--border, #e2e8f0);
    padding-inline: calc(var(--spacing, 0.25rem) * 5);
    padding-block: calc(var(--spacing, 0.25rem) * 3.5);
}

/* Card Title - Matching kt-card-title */
.config-card-title-custom {
    font-size: var(--text-base, 1rem);
    line-height: 1;
    font-weight: 500;
    letter-spacing: var(--tracking-tight, -0.025em);
    margin: 0;
    font-family: 'Playfair Display', serif;
}

/* Card Content - Matching kt-card-content */
.config-card-content-custom {
    flex-grow: 1;
    padding-inline: calc(var(--spacing, 0.25rem) * 5);
    padding-block: calc(var(--spacing, 0.25rem) * 5);
}

/* Field Wrapper */
.config-field-wrapper {
    margin-bottom: calc(var(--spacing, 0.25rem) * 5);
}

.config-field-wrapper:last-child {
    margin-bottom: 0;
}

/* Label Styling */
.config-label-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground, #1e293b);
    margin-bottom: 0.5rem;
}

/* Help Text */
.config-help-text {
    font-size: 0.75rem;
    color: var(--muted-foreground, #64748b);
    margin-bottom: 0.5rem;
}

/* Live badge — shown next to the Codequiry Libraries source count */
.cq-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px 1px 5px;
    border-radius: 9999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    line-height: 1.4;
}
.cq-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: cq-live-pulse 1.6s ease-out infinite;
}
@keyframes cq-live-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.65); }
    70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);    }
    100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0);    }
}
.dark .cq-live-badge {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
}

/* Profile footer — Back / autosave status / Delete, unified */
.cq-profile-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-top: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.92) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 4px 14px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
}

.cq-profile-footer__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.18s ease;
}
.cq-profile-footer__back i { font-size: 14px; }
.cq-profile-footer__back:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.cq-profile-footer__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 500;
    color: #475569;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.06);
    margin-left: auto;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cq-profile-footer__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}
.cq-profile-footer__icon-saved,
.cq-profile-footer__icon-saving { display: none; }

.cq-profile-footer__status[data-state="saved"] {
    color: #047857;
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.22);
}
.cq-profile-footer__status[data-state="saved"] .cq-profile-footer__icon-saved { display: block; }

.cq-profile-footer__status[data-state="saving"] {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.22);
}
.cq-profile-footer__status[data-state="saving"] .cq-profile-footer__icon-saving {
    display: block;
    animation: cq-spin 0.9s linear infinite;
}

.cq-profile-footer__status[data-state="error"] {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
}
.cq-profile-footer__status[data-state="error"] .cq-profile-footer__icon-saved { display: block; }

@keyframes cq-spin { to { transform: rotate(360deg); } }

/* Hidden by default — autosave is the primary save path. Code that
   still calls saveSettings() programmatically continues to work. */
.cq-profile-footer__manual-save {
    display: none;
}

.cq-profile-footer__delete {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.06);
    color: #b91c1c;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.cq-profile-footer__delete i { font-size: 14px; }
.cq-profile-footer__delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
    transform: translateY(-1px);
}
.cq-profile-footer__delete:active { transform: translateY(0); }

/* Dark mode */
[data-kt-theme-mode="dark"] .cq-profile-footer,
.dark .cq-profile-footer {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.82) 0%, rgba(15, 23, 42, 0.62) 100%);
    border-color: rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 14px rgba(0,0,0,0.22);
}
[data-kt-theme-mode="dark"] .cq-profile-footer__back,
.dark .cq-profile-footer__back {
    background: rgba(15, 23, 42, 0.5);
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.08);
}
[data-kt-theme-mode="dark"] .cq-profile-footer__back:hover,
.dark .cq-profile-footer__back:hover {
    background: rgba(15, 23, 42, 0.75);
    color: #f1f5f9;
    border-color: rgba(255,255,255,0.16);
}
[data-kt-theme-mode="dark"] .cq-profile-footer__status,
.dark .cq-profile-footer__status {
    background: rgba(255,255,255,0.04);
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.08);
}
[data-kt-theme-mode="dark"] .cq-profile-footer__delete,
.dark .cq-profile-footer__delete {
    background: rgba(239, 68, 68, 0.10);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}
[data-kt-theme-mode="dark"] .cq-profile-footer__delete:hover,
.dark .cq-profile-footer__delete:hover {
    background: #ef4444;
    color: #ffffff;
}

@media (max-width: 640px) {
    .cq-profile-footer {
        gap: 8px;
        padding: 10px;
    }
    .cq-profile-footer__status {
        order: 3;
        flex-basis: 100%;
        margin-left: 0;
        justify-content: center;
    }
    .cq-profile-footer__delete {
        margin-left: auto;
    }
}

/* Quick Stats — compact 2x2 tile grid, small and simple */
.cq-quickstats {
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
.cq-quickstats__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.cq-quickstats__title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.cq-quickstats__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.cq-quickstats__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.cq-quickstats__pill.is-ready {
    color: #047857;
    background: rgba(16, 185, 129, 0.10);
}
.cq-quickstats__pill.is-ready .cq-quickstats__dot {
    background: #10b981;
    animation: cq-quickstats-pulse 2s ease-out infinite;
}
@keyframes cq-quickstats-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.4); }
    50%      { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);   }
}
.cq-quickstats__pill.is-incomplete {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
}
.cq-quickstats__pill.is-incomplete .cq-quickstats__dot { background: #ef4444; }
.cq-quickstats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(15, 23, 42, 0.06);
}
.cq-quickstats__tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: #fff;
    min-width: 0;
}
.cq-quickstats__k {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.01em;
}
.cq-quickstats__v {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cq-quickstats__muted { color: #94a3b8; font-weight: 500; }

/* Dark mode */
[data-kt-theme-mode="dark"] .cq-quickstats,
.dark .cq-quickstats {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255,255,255,0.07) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
[data-kt-theme-mode="dark"] .cq-quickstats__head,
.dark .cq-quickstats__head { border-bottom-color: rgba(255,255,255,0.07); }
[data-kt-theme-mode="dark"] .cq-quickstats__title,
.dark .cq-quickstats__title { color: #f1f5f9; }
[data-kt-theme-mode="dark"] .cq-quickstats__grid,
.dark .cq-quickstats__grid { background: rgba(255,255,255,0.07); }
[data-kt-theme-mode="dark"] .cq-quickstats__tile,
.dark .cq-quickstats__tile { background: rgba(15, 23, 42, 0.6); }
[data-kt-theme-mode="dark"] .cq-quickstats__v,
.dark .cq-quickstats__v { color: #f1f5f9; }
[data-kt-theme-mode="dark"] .cq-quickstats__pill.is-ready,
.dark .cq-quickstats__pill.is-ready { color: #6ee7b7; }
[data-kt-theme-mode="dark"] .cq-quickstats__pill.is-incomplete,
.dark .cq-quickstats__pill.is-incomplete { color: #fca5a5; }

/* Paid-plan info banner — shown above Detection Tools for non-paid users */
.cq-paid-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.65) 100%);
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 10px rgba(37, 99, 235, 0.06);
}
.cq-paid-info-banner__icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.30), inset 0 1px 0 rgba(255,255,255,0.35);
}
.cq-paid-info-banner__body {
    flex: 1;
    min-width: 0;
}
.cq-paid-info-banner__text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #1e3a8a;
    font-weight: 500;
}
.cq-paid-info-banner__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 9px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    align-self: center;
}
.cq-paid-info-banner__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}
[data-kt-theme-mode="dark"] .cq-paid-info-banner,
.dark .cq-paid-info-banner {
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.18) 0%, rgba(30, 58, 138, 0.10) 100%);
    border-color: rgba(59, 130, 246, 0.35);
}
[data-kt-theme-mode="dark"] .cq-paid-info-banner__text,
.dark .cq-paid-info-banner__text { color: #bfdbfe; }

/* PAID lock chip next to engine titles (replaces the old purple CHECKS chip) */
.cq-paid-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
    border: none;
}

/* Locked-state "Upgrade to a paid plan to unlock" button — blue, not purple */
.cq-unlock-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.10) 100%);
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.cq-unlock-btn:hover {
    border-color: rgba(37, 99, 235, 0.55);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(37, 99, 235, 0.18) 100%);
    transform: translateY(-1px);
}
.cq-unlock-btn i { color: #2563eb; }
[data-kt-theme-mode="dark"] .cq-unlock-btn,
.dark .cq-unlock-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(37, 99, 235, 0.20) 100%);
    border-color: rgba(59, 130, 246, 0.40);
    color: #bfdbfe;
}
[data-kt-theme-mode="dark"] .cq-unlock-btn i,
.dark .cq-unlock-btn i { color: #93c5fd; }

/* Detection Card — premium glass + per-source accent glow */
.detection-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.82) 100%);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 22px rgba(15, 23, 42, 0.04);
}

/* Hairline gradient border, drawn with mask so corners stay crisp */
.detection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.9) 0%,
        rgba(255,255,255,0.1) 35%,
        var(--accent, rgba(99,102,241,0.18)) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.35s ease;
    z-index: 1;
}

/* Accent glow blob — animates in on hover/active */
.detection-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at center,
        var(--accent, rgba(99,102,241,0.30)) 0%,
        transparent 60%);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
    filter: blur(18px);
    z-index: 0;
}

.detection-card .kt-card-content,
.detection-card .kt-card-footer {
    position: relative;
    z-index: 2;
}

.detection-card:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 4px 8px rgba(15, 23, 42, 0.06),
        0 22px 40px rgba(15, 23, 42, 0.10),
        0 0 0 1px var(--accent-soft, rgba(99,102,241,0.16));
}

.detection-card:hover::before {
    opacity: 1;
}

.detection-card:hover::after {
    opacity: 0.9;
    transform: scale(1);
}

/* Toggle ON — soft halo using the same accent */
.detection-card:has(.detection-switch:checked) {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 0 0 1px var(--accent-soft, rgba(99,102,241,0.22)),
        0 6px 18px rgba(15, 23, 42, 0.05),
        0 0 24px var(--accent-glow, rgba(99,102,241,0.18));
}
.detection-card:has(.detection-switch:checked)::before {
    opacity: 0.85;
}
.detection-card:has(.detection-switch:checked)::after {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Per-source accent palette (matches each card's icon gradient) */
.detection-card[data-tool="wb_check"]               { --accent: rgba(37, 99, 235, 0.30);  --accent-soft: rgba(37, 99, 235, 0.18);  --accent-glow: rgba(37, 99, 235, 0.20); }
.detection-card[data-tool="gh_check"]               { --accent: rgba(36, 41, 46, 0.30);   --accent-soft: rgba(36, 41, 46, 0.18);   --accent-glow: rgba(36, 41, 46, 0.18); }
.detection-card[data-tool="so_check"]               { --accent: rgba(244, 128, 36, 0.32); --accent-soft: rgba(244, 128, 36, 0.20); --accent-glow: rgba(244, 128, 36, 0.20); }
.detection-card[data-tool="gist_check"]             { --accent: rgba(14, 165, 233, 0.30); --accent-soft: rgba(14, 165, 233, 0.18); --accent-glow: rgba(14, 165, 233, 0.20); }
.detection-card[data-tool="swh_check"]              { --accent: rgba(231, 76, 60, 0.30);  --accent-soft: rgba(231, 76, 60, 0.18);  --accent-glow: rgba(231, 76, 60, 0.20); }
.detection-card[data-tool="cq_check"]               { --accent: rgba(37, 99, 235, 0.34);  --accent-soft: rgba(37, 99, 235, 0.22);  --accent-glow: rgba(37, 99, 235, 0.22); }
.detection-card[data-tool="ai_code_detection_check"]{ --accent: rgba(16, 185, 129, 0.30); --accent-soft: rgba(16, 185, 129, 0.18); --accent-glow: rgba(16, 185, 129, 0.20); }

/* Icon badge — keep brand gradient, add inner highlight + ring for depth */
.detection-card .size-12 {
    position: relative;
    overflow: hidden;
}
.detection-card .size-12::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.detection-card .size-12::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
    pointer-events: none;
}

/* Footer — subtle tinted strip */
.detection-card .kt-card-footer {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

/* Dark mode */
[data-kt-theme-mode="dark"] .detection-card,
.dark .detection-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.82) 0%, rgba(15, 23, 42, 0.62) 100%) !important;
    border-color: rgba(255,255,255,0.06) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 1px 2px rgba(0,0,0,0.18),
        0 8px 22px rgba(0,0,0,0.22);
}
[data-kt-theme-mode="dark"] .detection-card::before,
.dark .detection-card::before {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.03) 35%,
        var(--accent, rgba(99,102,241,0.35)) 100%);
}
[data-kt-theme-mode="dark"] .detection-card .kt-card-footer,
.dark .detection-card .kt-card-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.4) 100%);
    border-top-color: rgba(255,255,255,0.04);
}

/* Codequiry Libraries — featured "NEW" card with orange glow */
.cq-libraries-card {
    border: 1px solid rgba(249, 115, 22, 0.5) !important;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.25),
        0 0 24px rgba(249, 115, 22, 0.35),
        0 4px 16px rgba(249, 115, 22, 0.15);
    animation: cq-libraries-glow 2.8s ease-in-out infinite;
}
.cq-libraries-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.4),
        0 0 32px rgba(249, 115, 22, 0.55),
        0 12px 28px rgba(249, 115, 22, 0.25);
}
@keyframes cq-libraries-glow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(249, 115, 22, 0.25),
            0 0 18px rgba(249, 115, 22, 0.3),
            0 4px 16px rgba(249, 115, 22, 0.12);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(249, 115, 22, 0.4),
            0 0 32px rgba(249, 115, 22, 0.5),
            0 6px 22px rgba(249, 115, 22, 0.22);
    }
}
.dark .cq-libraries-card,
[data-kt-theme-mode="dark"] .cq-libraries-card {
    border-color: rgba(251, 146, 60, 0.6) !important;
    box-shadow:
        0 0 0 1px rgba(251, 146, 60, 0.3),
        0 0 28px rgba(251, 146, 60, 0.4),
        0 4px 16px rgba(249, 115, 22, 0.2);
}

/* NEW badge — Codequiry Libraries card */
.cq-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.45);
    text-transform: uppercase;
    white-space: nowrap;
}
.cq-new-badge-icon {
    font-size: 9px !important;
    line-height: 1;
}

/* Locked GitHub Card: neutral styling (click-to-unlock handler still attached via .github-locked) */
.github-locked {
    position: relative;
    opacity: 0.85;
}

.github-locked:hover {
    cursor: pointer;
}

.github-locked .kt-switch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cursor-not-allowed {
    cursor: not-allowed !important;
}

/* Peer-only disabled detection tools styling */
.peer-only-disabled {
    opacity: 0.6;
    position: relative;
    border: 2px solid rgba(107, 114, 128, 0.3) !important;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05) 0%, rgba(156, 163, 175, 0.05) 100%) !important;
    cursor: not-allowed;
}

.peer-only-disabled .kt-switch {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.peer-only-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 114, 128, 0.1);
    border-radius: inherit;
    pointer-events: none;
}

[data-kt-theme-mode="dark"] .peer-only-disabled {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(51, 65, 85, 0.5) 100%) !important;
    border-color: rgba(107, 114, 128, 0.4) !important;
}

/* Dark Mode Support for Custom Config Card */
[data-kt-theme-mode="dark"] .config-card-custom {
    background-color: var(--card, #1e293b);
    border-color: var(--border, #334155);
    color: var(--card-foreground, #f1f5f9);
}

[data-kt-theme-mode="dark"] .config-card-header-custom {
    border-color: var(--border, #334155);
}

@media (max-width: 768px) {
    body, #scrollable_content {
        background-color: var(--muted) !important;
    }
    
    /* Reduce padding on cards */
    .kt-card-content,
    .config-card-content-custom {
        padding: 1rem !important;
    }
    
    .config-card-header-custom {
        padding-inline: 1rem !important;
        padding-block: 0.875rem !important;
    }
    
    /* Make left column cards more compact */
    .lg\:col-span-1.order-2 .kt-card,
    .lg\:col-span-1.order-2 .config-card-custom {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    /* Configuration cards grid - reduce gap on mobile */
    .lg\:col-span-1.order-2 > div.grid {
        gap: 1rem !important;
    }
    
    /* Stack stats grid to 2 columns on mobile */
    .grid.grid-cols-2 {
        gap: 0.5rem;
    }
    
    /* Smaller icons in stats */
    .grid.grid-cols-2 .size-10 {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    /* Detection card adjustments */
    .detection-card .kt-card-content {
        padding: 1rem !important;
    }
    
    .detection-card .size-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .detection-card .size-12 i {
        font-size: 1.125rem !important;
    }
    
    /* Add visual separator between sections */
    .order-1 {
        margin-bottom: 1.5rem;
    }
    
    /* Ensure grid takes full width */
    .grid.grid-cols-1 {
        width: 100%;
    }
}

/* Tablet view - show 2 columns for configuration */
@media (min-width: 769px) and (max-width: 1023px) {
    /* Configuration cards in 2 columns on tablet */
    .lg\:col-span-1.order-2 > div.grid {
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* Stack configuration cards to single column on very small screens */
    .lg\:col-span-1.order-2 > div.grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* Further reduce padding on very small screens */
    .kt-card-content {
        padding: 0.75rem !important;
    }
    
    .kt-card-header {
        padding: 0.75rem 1rem !important;
    }
    
    /* Make stat cards even more compact */
    .grid.grid-cols-2 .text-2xs {
        font-size: 0.625rem;
    }
    
    .grid.grid-cols-2 .text-xs {
        font-size: 0.688rem;
    }
}
