/* =====================================================
   Global CSS (Tailwind-Compatible, Minimal)
   ===================================================== */

/* Optional CSS variables for non-Tailwind usage (PDFs, charts, canvas) */
:root {
    --primary: #2563eb; /* Tailwind blue-600 */
}

/* Base body reset (Tailwind handles colors & theme) */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Legacy container support (do NOT use in new templates) */
.container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Legacy main wrapper support */
main.main-content {
    min-height: 75vh;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Global link behavior */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
.input-field {
    @apply px-4 py-2 rounded-lg
           bg-gray-100 dark:bg-gray-800
           focus:ring-2 focus:ring-primary-500
           outline-none;
}
.input-field {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
}

.dark .input-field {
    background: #374151;
    border-color: #4b5563;
    color: white;
}

.module-tile {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.module-tile:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.dark .module-tile:hover {
    background: rgba(37, 99, 235, 0.15);
}


/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-element {
    animation: float 3s ease-in-out infinite;
}

/* Add to your existing CSS */
.flash-message {
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.5s ease forwards;
}

.rtl .flash-message {
    transform: translateX(-100%);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rtl .flash-message {
    animation: slideInRTL 0.5s ease forwards;
}

@keyframes slideInRTL {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dark mode adjustments */
.dark .flash-message {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    #globalFlashMessages {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .rtl #globalFlashMessages {
        left: 1rem;
        right: 1rem;
    }
}