﻿/* Aurora Finance custom utilities */
.aurora-gradient {
    background: linear-gradient(135deg, #06b6d4 0%, #7c3aed 100%);
}

/* Card styles with theme support */
.aurora-card {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.08);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(229, 231, 235, 1);
}

.dark .aurora-card {
    background-color: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Global transition for smooth theme changes */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Enhanced transitions during theme switching */
.theme-transitioning * {
    transition-duration: 300ms !important;
}

/* Scrollbar theme support */
.dark::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8 0%, #818cf8 100%);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8 0%, #818cf8 100%);
}

/* Form controls styling */
.aurora-select {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    color: #111827;
}

.dark .aurora-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.aurora-select option {
    background-color: #ffffff;
    color: #111827;
}

.dark .aurora-select option {
    background-color: #1f2937;
    color: #ffffff;
}

.aurora-select optgroup {
    background-color: #f9fafb;
    color: #111827;
    font-weight: 600;
}

.dark .aurora-select optgroup {
    background-color: #1f2937;
    color: #ffffff;
    font-weight: 600;
}

.aurora-input {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    color: #111827;
}

.dark .aurora-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.aurora-input::placeholder {
    color: #6b7280;
}

.dark .aurora-input::placeholder {
    color: #9ca3af;
}

/* Textarea specific styling */
.aurora-input:is(textarea) {
    resize: vertical;
    min-height: 80px;
}

/* Currency input styling */
.aurora-input[inputmode="decimal"] {
    text-align: right;
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

.aurora-input[inputmode="decimal"]:focus {
    text-align: left;
}

.aurora-badge {
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8 0%, #818cf8 100%);
    border-radius: 9999px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Mobile navbar toggle */
@media (max-width: 768px) {
    .sidebar-expanded {
        transform: translateX(0);
    }
    .sidebar-collapsed {
        transform: translateX(-100%);
    }

    /* Ensure sidebar is visible when open on mobile */
    [data-sidebar] {
        display: flex !important;
    }

    /* Add overlay when sidebar is open */
    [data-sidebar]:not(.-translate-x-full)::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Responsive table wrapper */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* Responsive text sizes */
    h1 {
        font-size: 1.25rem !important;
    }

    /* Responsive padding */
    main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Responsive cards */
    .aurora-card {
        padding: 1rem;
    }

    /* Stack items vertically on mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Responsive buttons */
    button, .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}
