body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.font-display {
    font-family: 'Outfit', sans-serif;
}

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Phone Input Overrides */
.h-screen-safe {
    height: 100vh;
    height: 100dvh;
}

.iti {
    width: 100%;
    display: block;
}

.iti__tel-input {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    height: 52px;
    padding-left: 90px !important;
    transition: all 0.2s;
    font-weight: 600;
    color: #334155;
}

.iti__tel-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Math Patterns */
.bg-math-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Loader */
.spinner {
    border: 3px solid rgba(203, 213, 225, 0.3);
    border-radius: 50%;
    border-top: 3px solid #2563eb;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Dragging Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #e2e8f0;
}

.sortable-drag {
    cursor: grabbing;
    opacity: 1;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Dark Mode Global Support */
/* Dark Mode Global Support */
.dark body {
    background-color: #020617;
    /* Slate-950: Richer, darker background */
    color: #e2e8f0;
    /* Slate-200: Softer white for reading */
}

/* CARDS & CONTAINERS */
.dark .bg-white {
    background-color: #1e293b;
    /* Slate-800 */
    color: #f8fafc;
    border-color: #334155;
    /* Slate-700 */
}

/* INPUTS: Darker than cards */
.dark input,
.dark select,
.dark textarea,
.dark .iti__tel-input {
    background-color: #0f172a !important;
    /* Slate-900 */
    border-color: #334155 !important;
    /* Slate-700 */
    color: #f1f5f9 !important;
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: #3b82f6 !important;
    /* Blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b;
}

/* TEXT HIERARCHY */
.dark .text-slate-900,
.dark .text-slate-800 {
    color: #f8fafc !important;
    /* Slate-50: Brightest for headers */
}

.dark .text-slate-600,
.dark .text-slate-500 {
    color: #94a3b8 !important;
    /* Slate-400: Muted text */
}

.dark .text-slate-400 {
    color: #64748b !important;
    /* Slate-500: Subtitles */
}

/* BORDERS & DIVIDERS */
.dark .border-slate-100,
.dark .border-slate-200,
.dark .divide-slate-100>*+* {
    border-color: #334155 !important;
}

/* BACKGROUNDS */
.dark .bg-slate-50,
.dark .bg-slate-100 {
    background-color: #0f172a !important;
    /* Slate-900 */
}

.dark .bg-surface {
    background-color: #020617 !important;
}

/* HOVER STATES */
.dark .hover\:bg-slate-50:hover {
    background-color: #334155 !important;
}

.dark .hover\:text-slate-700:hover {
    color: #e2e8f0 !important;
}

/* SCROLLBAR */
.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border: 1px solid #0f172a;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* UTILS */
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
}