:root {
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism effects */
.glass {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030712;
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Animations */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse-slow {
    animation: pulse-slow 3s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Form inputs styling override */
input, select, textarea {
    background-color: #111827 !important;
    border-color: #374151 !important;
    color: white !important;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--indigo-500) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
    outline: none !important;
}

/* Custom UI Elements */
.threat-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.threat-high { background-color: rgba(239, 68, 68, 0.2); color: #ef4444; }
.threat-medium { background-color: rgba(234, 179, 8, 0.2); color: #eab308; }
.threat-low { background-color: rgba(34, 197, 94, 0.2); color: #22c55e; }

/* ─── Print / PDF via window.print() ─────────────────────────────────── */
.no-print { display: revert; }

@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* Hide chrome */
    header, .no-print { display: none !important; }
    main { padding: 0 !important; max-width: 100% !important; }
    body { background: white !important; color: #111827 !important; }

    /* Cards → white */
    [class*="bg-gray-9"], [class*="bg-gray-8"] {
        background: white !important;
        border-color: #e5e7eb !important;
        box-shadow: none !important;
    }

    /* Dark text on white */
    [class*="text-gray-1"], [class*="text-gray-2"],
    [class*="text-gray-3"], [class*="text-gray-4"],
    [class*="text-gray-5"], [class*="text-white"] {
        color: #1f2937 !important;
    }

    /* Keep semantic accent colors */
    [class*="text-indigo"]  { color: #4338ca !important; }
    [class*="text-purple"]  { color: #7c3aed !important; }
    [class*="text-green-4"] { color: #16a34a !important; }
    [class*="text-red-4"]   { color: #dc2626 !important; }
    [class*="text-yellow-4"]{ color: #ca8a04 !important; }
    [class*="text-blue-4"]  { color: #2563eb !important; }
    [class*="text-pink-4"]  { color: #db2777 !important; }

    /* Threat badges */
    .threat-high   { background-color: #fee2e2 !important; color: #dc2626 !important; }
    .threat-medium { background-color: #fef3c7 !important; color: #d97706 !important; }
    .threat-low    { background-color: #dcfce7 !important; color: #16a34a !important; }

    /* Score boxes */
    [class*="bg-indigo-5"] { background-color: #eef2ff !important; color: #4338ca !important; }
    [class*="bg-purple-5"] { background-color: #f5f3ff !important; color: #6d28d9 !important; }
    [class*="bg-gray-8/4"] { background-color: #f9fafb !important; }

    /* Tables */
    th { background: #f3f4f6 !important; color: #374151 !important; }
    td { border-color: #e5e7eb !important; }

    /* Borders */
    [class*="border-gray-7"], [class*="border-gray-8"] { border-color: #e5e7eb !important; }
    [class*="divide-gray-8"] > * { border-color: #e5e7eb !important; }

    /* Charts */
    canvas { max-width: 100% !important; }

    /* Page breaks between major sections */
    #report-preview-container > div > div { page-break-inside: avoid; break-inside: avoid; }
}
