/* Dashboard Stats Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.stat-card.total::before {
    background: linear-gradient(135deg, var(--primary-color), #d63431);
}

.stat-card.approved::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card.pending::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card.rejected::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card.total .stat-icon {
    background: rgba(234, 85, 71, 0.1);
    color: var(--primary-color);
}

.stat-card.approved .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card.pending .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card.rejected .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Dashboard Row */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.action-card:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(234, 85, 71, 0.15);
}

.action-card:hover::before {
    transform: scaleY(1);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(234, 85, 71, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.action-arrow {
    margin-left: auto;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.action-card:hover .action-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Recent Applications */
.recent-applications {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.apps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.app-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 85, 71, 0.1);
}

/* Hide app-header on desktop - only show on mobile */
.app-header {
    display: none;
}

.app-id {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 80px;
}

.app-details {
    flex: 1;
}

.app-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.app-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.app-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Tablet view - 2 cards per row (768px to 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .stat-title {
        font-size: 0.9rem;
    }
}

/* Also handle exactly 768px */
@media (width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* Mobile Responsive - Improved */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Quick Actions Mobile Fix */
    .quick-actions {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .action-card {
        padding: 1rem;
        gap: 0.875rem;
    }
    
    .action-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .action-content h3 {
        font-size: 0.95rem;
    }
    
    .action-content p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* Recent Applications Mobile Fix */
    .recent-applications {
        padding: 1.25rem;
    }
    
    .app-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    /* Show app-header on mobile */
    .app-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Hide original app-id and status-badge when in mobile layout */
    .app-item > .app-id,
    .app-item > .status-badge {
        display: none;
    }
    
    .app-id {
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .app-details {
        margin-bottom: 0.5rem;
    }
    
    .app-details h4 {
        font-size: 0.9rem;
        margin-bottom: 0.125rem;
    }
    
    .app-date {
        font-size: 0.75rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        align-self: flex-start;
    }
    
    .app-actions {
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (425px and below) */
@media (max-width: 480px) {
    .quick-actions,
    .recent-applications {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }
    
    .action-card {
        padding: 0.875rem;
        border-radius: 8px;
    }
    
    .action-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .action-content h3 {
        font-size: 0.9rem;
    }
    
    .action-content p {
        font-size: 0.75rem;
    }
    
    .app-item {
        padding: 0.875rem;
        border-radius: 8px;
    }
    
    .app-id {
        font-size: 0.8rem;
    }
    
    .app-details h4 {
        font-size: 0.85rem;
    }
    
    .app-date {
        font-size: 0.7rem;
    }
    
    .status-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    
    .action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

/* Landscape Mobile Fix */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .quick-actions,
    .recent-applications {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* Desktop/Laptop view - Ensure proper app-item layout for 1024px+ */
@media (min-width: 1024px) {
    .app-item {
        display: grid !important;
        grid-template-columns: auto 1fr auto auto !important;
        align-items: center !important;
        gap: 1rem !important;
        flex-direction: row !important;
        padding: 1rem;
        border: 1px solid #f1f5f9;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: #fafbfc;
    }
    
    .app-header {
        display: none !important;
    }
    
    .app-id {
        display: block !important;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--primary-color);
        min-width: 80px;
    }
    
    .app-details {
        display: block !important;
        flex: 1;
    }
    
    .status-badge {
        display: inline-block !important;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .app-actions {
        display: flex !important;
        gap: 0.5rem;
        margin-left: auto;
        margin-top: 0 !important;
        justify-content: flex-end;
    }
} 