/* =========================================
   📦 ARUTALA COMPONENT SYSTEM
   ========================================= */

/* 1. Base Card Styles (Premium Flat Design) */
.arutala-card {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: none !important;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .arutala-card {
        padding: 2rem; /* Md: p-8 / p-10 equivalent */
    }
}

/* 2. Dark Mode Card Styles */
.dark .arutala-card {
    background-color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}

/* 3. Stat Card Specifics */
.stat-value {
    font-weight: 900;
    font-size: 2.25rem;
    line-height: 2.5rem;
    color: #1f2937;
}
.dark .stat-value { color: #f8fafc !important; }

.stat-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

/* 4. Chart & Progress Animations */
.chart-bar { 
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1); 
}

.donut-segment { 
    transition: stroke-dasharray 1.2s ease-in-out; 
}

/* 5. Responsive Grid Utilities */
.stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

/* Table Hover Effects */
tr.hover-row {
    transition: background-color 0.15s ease;
}

tr.hover-row:hover {
    background-color: #f9fafb;
}

.dark tr.hover-row:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* 6. Custom Dropdown Styles */
.custom-dropdown-menu {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.custom-dropdown-menu.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
}

.custom-dropdown-menu:not(.hidden) {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* 7. Select2 Arutala Theme */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    background-color: #f8fafc !important; /* gray-50/50 style */
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    height: 3.1rem !important;
    transition: all 0.2s;
}

.dark .select2-container--default .select2-selection--single {
    background-color: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    font-weight: 700 !important;
    padding-left: 1.25rem !important;
    line-height: 3rem !important; /* Adjusted line-height */
    font-size: 0.875rem !important;
}

.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f8fafc !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 3rem !important;
    right: 1rem !important;
}

.select2-dropdown {
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-top: 5px !important;
    z-index: 9999 !important;
}

.dark .select2-dropdown {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 0.5rem !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.6rem 1rem !important;
    margin: 5px !important;
    width: calc(100% - 10px) !important;
    outline: none !important;
}

.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.select2-results__option {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3b82f6 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
    font-weight: 500 !important;
}
