:root {
    /* Color Palette */
    --color-primary: #16a34a;
    /* Forest Green */
    --color-primary-dark: #15803d;
    --color-secondary: #0d9488;
    /* Ocean Teal */
    --color-secondary-dark: #0f766e;
    --color-highlight: #f59e0b;
    /* Nature Amber */
    --color-bg-white: #ffffff;
    --color-bg-surface: #f8fafc;
    /* Slate 50 */
    --color-text-main: #1e293b;
    /* Dark Slate 800 */
    --color-text-muted: #475569;
    /* Slate 600 */
    --color-text-light: #64748b;
    /* Slate 500 */
    --color-border: #e2e8f0;
    /* Slate 200 */

    /* Typography */
    --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Montserrat', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Global Fixes */
body {
    background-color: var(--color-bg-white);
    color: var(--color-text-main);
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    font-weight: 700;
}

.text-primary {
    color: var(--color-primary) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.border-primary {
    border-color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.bg-secondary {
    background-color: var(--color-secondary) !important;
}

.text-highlight {
    color: var(--color-highlight) !important;
}

.bg-highlight {
    background-color: var(--color-highlight) !important;
}

/* Utility classes for consistent spacing and radius */
.card-standard {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.card-standard:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary-custom {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--color-secondary-dark);
}

/* Premium Button Styles */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: var(--color-secondary-dark);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--color-secondary-dark);
    cursor: pointer;
    text-decoration: none !important;
}

.btn-premium:hover {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
}

.btn-premium:active {
    transform: translateY(0);
}

.btn-premium svg {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-premium:hover svg {
    transform: translateX(4px);
}

.btn-premium-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--color-secondary) !important;
    border: 2px solid var(--color-secondary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none !important;
}

.btn-premium-outline:hover {
    background-color: var(--color-secondary-dark);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* =========================================
   New Utilities for Statistics Page Refactor
   ========================================= */

/* Layout Containers */
.container-xl {
    max-width: 80rem;
    /* ~7xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
    width: 100%;
}

.section-spacing {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.section-gap {
    margin-bottom: 4rem;
}

/* Grids */
.grid-layout {
    display: grid;
    gap: 2rem;
    width: 100%;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Flex Utilities */
.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-wrap-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Typography */
.text-center {
    text-align: center;
}

.text-display {
    font-size: 2.25rem;
    /* ~4xl */
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text-main);
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .text-display {
        font-size: 3rem;
        /* ~5xl */
    }
}

.text-h2 {
    font-size: 1.5rem;
    /* ~2xl */
    font-weight: 600;
    color: var(--color-text-main);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.text-h3 {
    font-size: 1.25rem;
    /* ~xl */
    font-weight: 600;
}

/* Spacing */
.mb-xs {
    margin-bottom: var(--spacing-xs);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.mb-xxl {
    margin-bottom: 5rem;
}

/* ~20 in Tailwind */

.pb-sm {
    padding-bottom: var(--spacing-sm);
}

.pt-lg {
    padding-top: var(--spacing-lg);
}

/* Card overrides for stats */
.stats-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.chart-container {
    position: relative;
    width: 100%;
    /* Heights are set inline or by specific classes if needed,
       but Chart.js parent needs relative positioning */
}

.h-chart-md {
    height: 350px;
}

.h-chart-lg {
    height: 400px;
}

.h-chart-xl {
    height: 420px;
}

/* Stats Badges */
.stats-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-bg-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.stats-badge:hover {
    border-color: #cbd5e1;
    /* slate-300 */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.badge-count {
    color: #111827;
    /* gray-900 */
    margin-right: 0.5rem;
    font-size: 0.75rem;
    /* xs */
    font-weight: 600;
    /* or normal depending on preference */
}

.badge-label {
    color: #000000;
    font-size: 0.75rem;
    /* xs */
    white-space: nowrap;
}

/* =========================================
   Custom Cursor (Dubai Police Style)
   ========================================= */

/* Keep default cursor visible - don't hide it */

/* Hide the small cursor dot - we don't need it */
#cursor-dot {
    display: none;
}

/* Custom Cursor Outline (Small trailing circle behind system cursor) */
#cursor-dot-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border: 1px solid var(--color-secondary-dark);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease-in-out,
        transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        width 0.3s ease,
        height 0.3s ease;
}

/* Show cursor outline when active */
#cursor-dot-outline.active {
    opacity: 1;
}

/* Cursor hover effect on clickable elements */
#cursor-dot-outline.hover {
    width: 12px;
    height: 12px;
    background-color: rgba(21, 128, 61, 0.1);
}