/* Main CSS for Gumoz Challenge Project */

/* Force light color scheme to prevent dark mode changes */
html {
    color-scheme: light;
}

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --sidebar-width: 280px;
    --border-radius: 0.75rem;
    --transition: all 0.2s ease;
}

/* Base Styles */
body {
    background-color: var(--light-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color-scheme: light;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    overflow-y: auto;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Header */
.top-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    position: relative;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #f9fafb;
}

.search-bar i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    /* Removed hover animation after refactor */
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Stats cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    height: 100%;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.stats-icon i {
    font-size: 1.25rem;
    color: white;
}

.stats-content {
    flex-grow: 1;
    margin-left: 10px;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.2;
}

.stats-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stats-trend.up {
    color: var(--success-color);
}

.stats-trend.down {
    color: var(--danger-color);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #5855eb;
    border-color: #5855eb;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0.5rem;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    margin-bottom: 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.table td {
    vertical-align: middle;
    color: #6b7280;
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e5e7eb;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
}

.mobile-menu-toggle .btn {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Avatar styles */
.avatar {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-md {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 20px;
}

.avatar-xl {
    width: 96px;
    height: 96px;
    font-size: 28px;
}

.avatar-inline-sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.avatar-inline-md {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-inline-lg {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.avatar-inline-xl {
    width: 64px;
    height: 64px;
    font-size: 20px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Welcome Card Styles */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

/* Вариант 3: Горизонтальный компактный */
.welcome-card-variant-3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.welcome-card-variant-3 .card-body {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

.welcome-title-sm {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.welcome-subtitle-sm {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0;
}

.welcome-avatar-sm {
    display: inline-block;
}

.welcome-content {
    width: 100%;
}

.welcome-actions-desktop {
    flex-shrink: 0;
}

.welcome-actions-mobile {
    margin-top: 1rem;
}

.welcome-actions-mobile .btn-group {
    gap: 0.25rem;
}

.welcome-actions-mobile .btn {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.25rem;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.welcome-card .card-body {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.2;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.challenge-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.welcome-card .btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: none;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-card .btn-outline-primary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.welcome-card .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.welcome-card .btn-success {
    background: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
}

.welcome-card .btn-success:hover {
    background: rgba(16, 185, 129, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.welcome-card .btn-info {
    background: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
}

.welcome-card .btn-info:hover {
    background: rgba(59, 130, 246, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.welcome-card .btn-warning {
    background: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: white;
}

.welcome-card .btn-warning:hover {
    background: rgba(245, 158, 11, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Task specific styles */
.task-item {
    border-radius: 12px;
    /* Removed hover animation after refactor */
}

.task-item.border-danger {
    border-left: 4px solid #dc3545 !important;
}

.task-item.border-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Priority indicators */
.priority-high {
    border-left: 4px solid #dc3545 !important;
}

.priority-medium {
    border-left: 4px solid #ffc107 !important;
}

.priority-low {
    border-left: 4px solid #28a745 !important;
}

/* Button group styles */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group .btn {
    border-radius: 6px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Form styles */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Dropdown styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Expense Details */
.expense-details {
    margin-bottom: 1rem;
    width: 100%;
}

.expense-details.no-border {
    border: none;
}

.expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    width: 100%;
}

.expense-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
}

.expense-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.expense-progress {
    margin-top: 1rem;
}

.animated-progress-container {
    position: relative;
    background: #f3f4f6;
    border-radius: 0.5rem;
    height: 0.5rem;
    overflow: hidden;
}

.animated-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 0.5rem;
    transition: width 1s ease;
}

.profitability-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Circular Progress */
.circular-progress-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.circular-progress {
    transform: rotate(-90deg);
}

.circular-progress-bg {
    stroke: #f1f5f9;
}

.circular-progress-fill {
    stroke: url(#progressGradient);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.circular-progress-text {
    position: absolute;
    text-align: center;
}

.circular-progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.circular-progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Expense Chart */
.expense-chart-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.expense-chart-header {
    text-align: center;
    margin-bottom: 1rem;
}

/* Animated Counters */
.animated-counter {
    transition: all 0.3s ease;
}

.count-up {
    font-weight: 600;
    color: #1f2937;
}

/* Row equal height */
.row-equal-height {
    display: flex;
    flex-wrap: wrap;
}

.row-equal-height > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

.animated-counter {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

.animated-counter:nth-child(1) { animation-delay: 0.1s; }
.animated-counter:nth-child(2) { animation-delay: 0.2s; }
.animated-counter:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.expense-value.count-up {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stats-card {
    animation: fadeInScale 0.8s ease-out;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

/* Убеждаемся, что все градиенты применяются */
.stats-card.bg-gradient-secondary,
.stats-card.bg-gradient-dark {
    color: white;
}

.stats-card.bg-gradient-secondary .stats-number,
.stats-card.bg-gradient-secondary .stats-label,
.stats-card.bg-gradient-dark .stats-number,
.stats-card.bg-gradient-dark .stats-label {
    color: white;
}

/* Отступы между рядами карточек статистики */
.row .col-lg-3,
.row .col-md-6,
.row .col-12 {
    margin-bottom: 1rem;
}

.row .col-lg-3:last-child,
.row .col-md-6:last-child,
.row .col-12:last-child {
    margin-bottom: 0;
}

/* Дополнительные отступы для мобильных устройств */
@media (max-width: 768px) {
    .row .col-12 {
        margin-bottom: 1rem;
    }
    
    .stats-card {
        margin-bottom: 0.5rem;
    }
}

/* Принудительное выравнивание высоты карточек в рядах */
.row .col-lg-3,
.row .col-lg-4,
.row .col-md-6,
.row .col-md-3,
.row .col-12,
.row .col-6 {
    display: flex;
    flex-direction: column;
}

.row .col-lg-3 .stats-card,
.row .col-lg-4 .stats-card,
.row .col-md-6 .stats-card,
.row .col-md-3 .stats-card,
.row .col-12 .stats-card,
.row .col-6 .stats-card {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Предотвращение растягивания последней карточки в ряду */
.row .col-lg-3:last-child,
.row .col-lg-4:last-child,
.row .col-md-6:last-child,
.row .col-md-3:last-child,
.row .col-6:last-child {
    align-self: flex-start;
}

/* Обеспечение одинаковой высоты для всех карточек в ряду */
.row,
.row.row-equal-height {
    align-items: stretch;
}

/* Специальные стили для row-equal-height */
.row.row-equal-height .col-md-3,
.row.row-equal-height .col-6,
.row.row-equal-height .col-12 {
    display: flex;
    flex-direction: column;
}

.row.row-equal-height .col-md-3 .stats-card,
.row.row-equal-height .col-6 .stats-card,
.row.row-equal-height .col-12 .stats-card {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: 4rem;
    }

    .mobile-menu-toggle {
        display: block;
    }
    
    .welcome-card .card-body {
        padding: 1rem;
    }
    
    .welcome-title {
        font-size: 1.25rem;
    }
    
    .welcome-subtitle {
        font-size: 0.8rem;
    }
    
    .welcome-card .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Адаптивность для welcome-card-variant-3 */
    .welcome-card-variant-3 .card-body {
        padding: 1rem;
    }
    
    .welcome-title-sm {
        font-size: 1.1rem;
    }
    
    .welcome-subtitle-sm {
        font-size: 0.8rem;
    }
    
    .welcome-avatar-sm {
        width: 40px;
        height: 40px;
    }
    
    .welcome-actions-mobile .btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.2rem;
    }
    
    .stats-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Дополнительные отступы для Stats Cards на мобильных */
    .row-equal-height .col-12 {
        margin-bottom: 1rem;
    }
    
    .row-equal-height .col-12:last-child {
        margin-bottom: 0;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .task-item .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .text-muted.small {
        font-size: 0.75rem;
    }
    
    .d-flex.flex-row.gap-2 {
        flex-wrap: wrap;
        gap: 0.25rem !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

@media (max-width: 576px) {
    .welcome-card .card-body {
        padding: 0.875rem;
    }
    
    .welcome-title {
        font-size: 1.125rem;
    }
    
    .welcome-subtitle {
        font-size: 0.75rem;
    }
    
    .welcome-card .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .welcome-card .d-flex.flex-column.flex-sm-row {
        gap: 0.375rem !important;
    }
    
    .task-item .card-body {
        padding: 0.75rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .display-6 {
        font-size: 2rem !important;
    }
    
    .h2 {
        font-size: 1.5rem !important;
    }
    
    .d-flex.flex-row.gap-2 {
        gap: 0.2rem !important;
    }
    
    .btn-group-sm .btn {
        padding: 0.2rem 0.3rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 375px) {
    .welcome-card .card-body {
        padding: 0.75rem;
    }
    
    .welcome-title {
        font-size: 1rem;
    }
    
    .welcome-subtitle {
        font-size: 0.7rem;
    }
    
    .welcome-card .btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.65rem;
    }
    
    .welcome-card .btn i {
        font-size: 0.7rem;
    }
    
    .task-item .card-body {
        padding: 0.5rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.15rem 0.25rem;
        font-size: 0.65rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Dark mode support - DISABLED to force light theme */
/*
@media (prefers-color-scheme: dark) {
    .stats-card {
        background: #1f2937;
        border-color: #374151;
        color: white;
    }
    
    .task-item {
        background: #1f2937;
        border-color: #374151;
        color: white;
    }
    
    .welcome-card {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
}
*/

/* Print styles */
@media print {
    .welcome-card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .welcome-card::before {
        display: none;
    }
    
    .welcome-title,
    .welcome-subtitle {
        color: black !important;
    }
    
    .stats-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn,
    .dropdown {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .welcome-card {
        border: 2px solid #000;
    }
    
    .welcome-card .btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .welcome-card,
    .stats-card,
    .task-item,
    .btn {
        transition: none;
    }
    
    .stats-card:hover,
    .task-item:hover,
    .btn:hover {
        transform: none;
    }
}

/* Income and Expense Cards */
.income-cards, .expense-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.income-card, .expense-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.income-card:hover, .expense-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.income-card-header, .expense-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.income-date, .expense-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.income-amount, .expense-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--success-color);
}

.income-card-body, .expense-card-body {
    padding: 1rem;
}

.income-description, .expense-description {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.income-project, .expense-project {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

.income-card-actions, .expense-card-actions {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.income-card-actions .btn, .expense-card-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .income-card, .expense-card {
        margin-bottom: 1rem;
    }
    
    .income-description, .expense-description {
        font-size: 0.8rem;
    }
    
    .income-amount, .expense-amount {
        font-size: 1rem;
    }
    
    .income-card-actions, .expense-card-actions {
        flex-direction: column;
    }
    
    .income-card-actions .btn, .expense-card-actions .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}

/* Challenges and Participants Page Styles */
.challenge-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.challenge-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-excellent { background: #d4edda; color: #155724; }
.status-good { background: #d1ecf1; color: #0c5460; }
.status-average { background: #fff3cd; color: #856404; }
.status-low { background: #f8d7da; color: #721c24; }

.avatar-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.participants-table {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
} 

/* Participant Cards for Mobile */
.participant-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.participant-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.participant-card .card-body {
    padding: 1.25rem;
}

.participant-card .avatar-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.participant-card .avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-card .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.participant-card .progress {
    background-color: #f3f4f6;
    border-radius: 3px;
}

.participant-card .progress-bar {
    border-radius: 3px;
}

.participant-card .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.participant-card .btn {
    border-radius: 8px;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Responsive adjustments for participant cards */
@media (max-width: 576px) {
    .participant-card .card-body {
        padding: 1rem;
    }
    
    .participant-card .avatar-container {
        width: 40px;
        height: 40px;
    }
    
    .participant-card .avatar-placeholder {
        font-size: 1rem;
    }
    
    .participant-card .fw-semibold.h6 {
        font-size: 1rem;
    }
    
    .participant-card .progress {
        height: 4px;
    }
    
    .participant-card .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
}

 