/**
 * QR CONSULT - DIAMOND COMPACT FRAMEWORK v2.0
 * System-wide high-density UI enforcement.
 */

/* 1. ROOT SCALING - The anchor of density */
html {
    font-size: 12px !important; /* Standard for Enterprise Dashboards */
    -webkit-text-size-adjust: 100%;
}

@media (min-width: 1921px) {
    html { font-size: 13px !important; } /* Slight scale up for 4K */
}

/* 2. TYPOGRAPHY SCALE - Crushing the gigantism */
h1, .text-7xl, .text-6xl, .text-5xl { 
    font-size: 2rem !important; /* ~24px */
    letter-spacing: -0.04em !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
}

h2, .text-4xl { 
    font-size: 1.5rem !important; /* ~18px */
    letter-spacing: -0.03em !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

h3, .text-3xl { 
    font-size: 1.25rem !important; /* ~15px */
    font-weight: 700 !important;
}

.text-2xl { font-size: 1.1rem !important; }
.text-xl { font-size: 1rem !important; }
.text-lg { font-size: 0.9375rem !important; }
.text-base { font-size: 0.875rem !important; }
.text-sm { font-size: 0.75rem !important; }
.text-xs, .text-\[10px\] { font-size: 0.7rem !important; } /* ~8.5px */

/* 3. PADDING & SPACING COLLAPSE */
/* We reduce large paddings by ~50% */
.p-32, .py-32 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.p-24, .py-24 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.p-20, .py-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.p-16, .py-16 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.p-12, .py-12 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.p-10, .py-10 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.p-8, .py-8 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* 4. ATOMIC COMPONENTS */
/* Checkboxes */
input[type="checkbox"], input[type="radio"] {
    width: 0.8rem !important;
    height: 0.8rem !important;
    border-radius: 0.2rem !important;
}

/* Buttons */
.btn, button, .px-6.py-3 {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    height: auto !important;
    min-height: 2rem !important;
}

/* Form Inputs */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
}

/* 5. SPECIFIC FIXES FOR PRIVACY & CRM */
.glass-card {
    padding: 1rem !important;
    border-radius: 1rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(226, 232, 240, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(71, 85, 105, 0.4) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

/* 6. GLOBAL CARD DEPTH */
.bg-white {
    background-color: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.dark .bg-white, .dark .bg-slate-50 {
    background-color: #0f172a !important; /* Force dark background in dark mode */
    border: 1px solid #1e293b !important;
}

.dark .bg-slate-900, .dark .bg-slate-800, .dark .glass-card {
    background-color: #0f172a !important; 
    border: 1px solid #1e293b !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.dark .text-slate-900 {
    color: #f8fafc !important;
}

/* 7. NUCLEAR BORDER FIX - Stop white blindness */
.dark .border-white\/10, 
.dark .border-white\/5,
.dark aside,
.dark nav,
.dark .border-slate-100,
.dark .border-slate-200,
.dark .border-slate-300,
.dark .border-slate-400 {
    border-color: #1e293b !important;
}

/* Hover States Enhancement */
.group:hover {
    border-color: #6366f1 !important; /* Indigo hover border */
}

.dark .group:hover {
    border-color: #4f46e5 !important;
}

/* 7. UTILITIES */
.gap-12 { gap: 1.5rem !important; }
.gap-8 { gap: 1rem !important; }
.gap-6 { gap: 0.75rem !important; }
.space-y-12 > * + * { margin-top: 1.5rem !important; }
.space-y-8 > * + * { margin-top: 1rem !important; }
.space-y-6 > * + * { margin-top: 0.75rem !important; }
